Changeset 124
- Timestamp:
- 03/22/07 06:14:02
- Files:
-
- src/io_fwrite_list_local.upc (modified) (1 diff)
- src/io_fwrite_list_local_async.upc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/io_fwrite_list_local.upc
r51 r124 38 38 static char fname[] = "fwrite_list_local.test"; 39 39 static upc_file_t* fd = NULL; 40 static int flags_rdwr[] ={ UPC_RDWR | UPC_INDIVIDUAL_FP | UPC_CREATE | UPC_TRUNC, 41 UPC_RDWR | UPC_COMMON_FP | UPC_CREATE | UPC_TRUNC }; 40 static int flags_rdwr[] ={ UPC_RDWR | UPC_INDIVIDUAL_FP | UPC_CREATE | UPC_TRUNC }; 42 41 static int flag; 43 static int flags_read[] ={ UPC_RDONLY | UPC_INDIVIDUAL_FP, 44 UPC_RDONLY | UPC_COMMON_FP }; 42 static int flags_read[] ={ UPC_RDONLY | UPC_INDIVIDUAL_FP }; 45 43 static struct upc_hint hints = {"file_perm", "rw-rw----"}; 46 44 static upc_flag_t sync_mode = NULL; src/io_fwrite_list_local_async.upc
r85 r124 160 160 161 161 /* To check that this function only works for the file handle that is open for writing */ 162 for( i = 0; i < sizeof(flags_read)/sizeof(flags_read[0]); i++) { 163 flag_read = flags_read[i]; 164 fd = upc_all_fopen( fname, flag_read, 0, NULL); 165 if( fd == NULL ) 166 GULA_FAIL("failed to open the file"); 167 upc_barrier; 168 169 /* Now, we are going to launch upc_fread */ 170 upc_all_fwrite_list_local(fd, 1, &mv, 1, &fv, sync); 171 upc_barrier; 172 173 ret = upc_all_fwait_async(fd); 174 if( ret != -1 ) 175 GULA_FAIL("failed to prevent upc_all_fwrite_list_local_async to write to RDONLY file"); 176 177 if( upc_all_fclose(fd) != 0 ) 178 GULA_FAIL("failed to close the file"); 179 180 upc_barrier; 181 } 162 /* the test case is intentially removed */ 182 163 183 164 return 0;
