Changeset 2484

Show
Ignore:
Timestamp:
02/04/07 18:17:02 (2 years ago)
Author:
ensc
Message:

- reworked the large pagesize patch; it seems to be always PAGESIZE*2+1

bytes required to trigger a SIGBUS. Since PAGESIZE is not available
directly, use sysconf(3) to get this value and memset(3) to initialize
buffer

- removed byte crap

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib_internal/testsuite/sigbus.c

    r2461 r2484  
    3434int wrapper_exit_code = 1; 
    3535 
    36 #define TEST_BLOCKSIZE  0x20000 
     36#define TEST_BLOCKSIZE          (sysconf(_SC_PAGESIZE)*2 + 0x10000) 
     37 
    3738static bool                     is_gremlin = false; 
    3839static int                      sync_p[2]; 
     
    8283  int           fd_src    = mkstemp(f_name0); 
    8384  int           fd_dst    = mkstemp(f_name1); 
    84   char          buf[TEST_BLOCKSIZE] = { [0] = '\0' }
     85  char          buf[TEST_BLOCKSIZE]
    8586  struct stat   st; 
    8687  bool          res; 
    87    
    88   fd_src =  
    89    
    90   write(fd_src, buf, sizeof(buf)); 
     88 
     89  memset(buf, 0, TEST_BLOCKSIZE); 
     90  write(fd_src, buf, TEST_BLOCKSIZE); 
    9191  close(fd_src); 
    9292  close(fd_dst);