Changeset 988 for vendor/current/tests
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- Location:
- vendor/current/tests
- Files:
-
- 2 added
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/tests/fcntl_lock.c
r414 r988 63 63 lock.l_type = F_WRLCK; 64 64 lock.l_whence = SEEK_SET; 65 lock.l_start = 0 ;65 lock.l_start = 0x100000000LL; 66 66 lock.l_len = 4; 67 67 lock.l_pid = getpid(); … … 93 93 lock.l_whence = SEEK_SET; 94 94 lock.l_start = 0; 95 lock.l_len = 4;95 lock.l_len = 0x100000004LL; 96 96 lock.l_pid = getpid(); 97 97 98 /* set a 4 byte write lock*/99 fcntl(fd,F_SETLK,&lock);98 /* set a 100000004 byte write lock, should conflict with the above */ 99 ret = fcntl(fd,F_SETLK,&lock); 100 100 101 101 sys_waitpid(pid, &status, 0); 102 102 103 103 unlink(DATA); 104 105 if (ret != 0) { 106 fprintf(stderr,"ERROR: failed to lock %s (errno=%d)\n", 107 DATA, (int)errno); 108 exit(1); 109 } 110 111 if (lock.l_len < 0x100000004LL) { 112 fprintf(stderr,"ERROR: settign lock overflowed\n"); 113 exit(1); 114 } 104 115 105 116 #if defined(WIFEXITED) && defined(WEXITSTATUS) -
vendor/current/tests/summary.c
r414 r988 3 3 void exit(int); 4 4 5 main()5 int main() 6 6 { 7 exit (0); 8 #if !(defined(HAVE_FCNTL_LOCK) || defined(HAVE_STRUCT_FLOCK64)) 9 printf("ERROR: No locking available. Running Samba would be unsafe\n"); 10 exit(1); 7 #if !defined(HAVE_FCNTL_LOCK) 8 #error "ERROR: No locking available. Running Samba would be unsafe" 11 9 #endif 12 10 13 #if !(defined(HAVE_IFACE_ IFCONF) || defined(HAVE_IFACE_IFREQ) || defined(HAVE_IFACE_AIX))14 printf("WARNING: No automated network interface determination\n"); 11 #if !(defined(HAVE_IFACE_GETIFADDRS) || defined(HAVE_IFACE_IFCONF) || defined(HAVE_IFACE_IFREQ) || defined(HAVE_IFACE_AIX)) 12 #warning "WARNING: No automated network interface determination" 15 13 #endif 16 14 17 #if !(defined(USE_SETEUID) || defined(USE_SETREUID) || defined(USE_SETRESUID) || defined(USE_SETUIDX)) 18 printf("ERROR: no seteuid method available\n"); 19 exit(1); 15 #if !(defined(USE_SETEUID) || defined(USE_SETREUID) || defined(USE_SETRESUID) || defined(USE_SETUIDX) || defined(USE_LINUX_THREAD_CREDENTIALS)) 16 #error "ERROR: no seteuid method available" 20 17 #endif 21 18 22 #if !(defined(STAT_STATVFS) || defined(STAT_STATVFS64) || defined(STAT_STATFS3_OSF1) || defined(STAT_STATFS2_BSIZE) || defined(STAT_STATFS4) || defined(STAT_STATFS2_FSIZE) || defined(STAT_STATFS2_FS_DATA)) 23 printf("ERROR: No disk free routine!\n"); 24 exit(1); 19 #if !(defined(STAT_STATVFS) || defined(STAT_STATFS3_OSF1) || defined(STAT_STATFS2_BSIZE) || defined(STAT_STATFS4) || defined(STAT_STATFS2_FSIZE) || defined(STAT_STATFS2_FS_DATA)) 20 #error "ERROR: No disk free routine!" 25 21 #endif 26 22 27 23 #if !((defined(HAVE_RANDOM) || defined(HAVE_RAND)) && (defined(HAVE_SRANDOM) || defined(HAVE_SRAND))) 28 printf("ERROR: No random or srandom routine!\n"); 29 exit(1); 24 #error "ERROR: No random or srandom routine!" 30 25 #endif 31 26
Note:
See TracChangeset
for help on using the changeset viewer.