test/test_common.h

00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #if !defined(TEST_COMMON_H)
00018 #define TEST_COMMON_H 1
00019 
00020 #include "globus_xio.h"
00021 #include "test_common.h"
00022 #include "globus_common.h"
00023 #include "globus_xio_test_transport.h"
00024 #include "globus_xio_test_transport.h"
00025 
00026 typedef struct test_info_s
00027 {
00028     int                                     write_count;
00029     int                                     read_count;
00030 
00031     /* always points to nothing */
00032     globus_byte_t *                         buffer;
00033     globus_size_t                           buffer_length;
00034     globus_size_t                           chunk_size;
00035 
00036     globus_size_t                           nwritten;
00037     globus_size_t                           nread;
00038     globus_size_t                           total_write_bytes;
00039     globus_size_t                           total_read_bytes;
00040 
00041     int                                     failure;
00042     int                                     closed;
00043     globus_bool_t                           write_done;
00044     globus_bool_t                           read_done;
00045 
00046     globus_bool_t                           server;
00047 
00048     globus_reltime_t                        delay;
00049 
00050     globus_mutex_t                          mutex;
00051 } test_info_t;
00052 
00053 extern test_info_t                         globus_l_test_info;
00054 
00055 void
00056 failed_exit(
00057     char *                                  fmt,
00058     ...);
00059 void
00060 test_res(
00061     int                                     location,
00062     globus_result_t                         res,
00063     int                                     line,
00064     char *                                  filename);
00065 
00066 void
00067 parse_parameters(
00068     int                                     argc,
00069     char **                                 argv,
00070     globus_xio_stack_t                      stack,
00071     globus_xio_attr_t                       attr);
00072 
00073 int
00074 unload_main(
00075     int                                     argc,
00076     char **                                 argv);
00077 
00078 int
00079 read_barrier_main(
00080     int                                     argc,
00081     char **                                 argv);
00082 
00083 int
00084 close_barrier_main(
00085     int                                     argc,
00086     char **                                 argv);
00087 
00088 int
00089 close_barrier2_main(
00090     int                                     argc,
00091     char **                                 argv);
00092 
00093 int
00094 framework_main(
00095     int                                     argc,
00096     char **                                 argv);
00097 
00098 int
00099 timeout_main(
00100     int                                     argc,
00101     char **                                 argv);
00102 
00103 int
00104 cancel_main(
00105     int                                     argc,
00106     char **                                 argv);
00107 
00108 int
00109 attr_main(
00110     int                                     argc,
00111     char **                                 argv);
00112 
00113 int
00114 close_cancel_main(
00115     int                                     argc,
00116     char **                                 argv);
00117 
00118 int
00119 space_main(
00120     int                                     argc,
00121     char **                                 argv);
00122 
00123 int
00124 server2_main(
00125     int                                     argc,
00126     char **                                 argv);
00127 
00128 int
00129 block_barrier_main(
00130     int                                     argc,
00131     char **                                 argv);
00132 
00133 int
00134 blocking_dd_main(
00135     int                                     argc,
00136     char **                                 argv);
00137 
00138 int
00139 stack_main(
00140     int                                     argc,
00141     char **                                 argv);
00142 
00143 void
00144 test_common_end();
00145 
00146 
00147 #endif

Generated on 5 Nov 2016 for globus_xio by  doxygen 1.4.7