Changeset 124

Show
Ignore:
Timestamp:
03/22/07 06:14:02
Author:
kunxi
Message:

Remove the common file pointer flags for io_fwrite_list_local_async, io_fwrite_list_local
Remove the unnecessary test case for write operation on io_fwrite_list_local_async since the behavior is not determined in the spec.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/io_fwrite_list_local.upc

    r51 r124  
    3838static char fname[] = "fwrite_list_local.test"; 
    3939static 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 }; 
     40static int flags_rdwr[] ={  UPC_RDWR | UPC_INDIVIDUAL_FP | UPC_CREATE | UPC_TRUNC  }; 
    4241static int flag; 
    43 static int flags_read[] ={  UPC_RDONLY | UPC_INDIVIDUAL_FP,  
    44                                 UPC_RDONLY | UPC_COMMON_FP }; 
     42static int flags_read[] ={  UPC_RDONLY | UPC_INDIVIDUAL_FP  }; 
    4543static struct upc_hint hints = {"file_perm", "rw-rw----"}; 
    4644static upc_flag_t sync_mode = NULL; 
  • src/io_fwrite_list_local_async.upc

    r85 r124  
    160160 
    161161        /* 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 */ 
    182163 
    183164        return 0;