2 Check that we can set the personality for a process.
4 Check that we get EINVAL for a bad personality.
6 Check that exit returns the correct values to the waiting parent
8 Check that exit flushes output file buffers and closes files upon
11 Basic test for wait(2) system call.
13 check that a call to wait4() correctly waits for a child
16 check for ECHILD errno when using an illegal pid value
19 Check that when a child kills itself by generating an alarm
20 exception, the waiting parent is correctly notified.
22 Check that when a child kills itself by generating an integer zero
23 divide exception, the waiting parent is correctly notified.
25 Check that parent waits until specific child has returned.
27 test to check the error conditions in waitpid sys call
29 Check that when a child kills itself with a kill statement after
30 determining its process id by using getpid, the parent receives a
31 correct report of the cause of its death. This also indirectly
32 checks that getpid returns the correct process id.
34 Tests to see if pid's returned from fork and waitpid are same.
36 Tests to see if pid's returned from fork and waitpid are same.
38 Tests to see if pid's returned from fork and waitpid are same
40 Check ability of parent to wait until child returns, and that the
41 child's process id is returned through the waitpid. Check that
42 waitpid returns immediately if no child is present.
44 Tests to see if pid's returned from fork and waitpid are same
46 Tests to see if pid's returned from fork and waitpid are same
48 Tests to see if pid's returned from fork and waitpid are same
50 Tests to see if pid's returned from fork and waitpid are same
52 Test F_DUPFD, F_SETFL cmds of fcntl
54 Basic test for fcntl(2) using F_DUPFD argument.
56 Basic test for fcntl(2) using F_GETFD argument.
58 Basic test for fcntl(2) using F_GETFL argument.
60 Basic test for fcntl(2) using F_GETLK argument.
62 Error checking conditions for remote locking of regions of a file.
64 Close-On-Exec functional test.
66 Close-On-Exec of named pipe functional test.
68 Basic test for fcntl(2) using F_SETFL argument.
70 Basic test for fcntl(2) using F_SETLK argument.
72 Basic test for fcntl(2) using F_SETLKW argument.
74 Testcase to check locking of regions of a file
78 Testcase to test that fcntl() sets EMFILE for F_DUPFD command.
82 Testcase to test that fcntl() sets errno correctly.
86 File locking test cases for fcntl. In Linux, S_ENFMT is not implemented
87 in the kernel. However all standard Unix kernels define S_ENFMT as
88 S_ISGID. So this test defines S_ENFMT as S_ISGID.
92 Check that file locks are removed when file closed
96 Additional file locking test cases for checking proper notification
97 of processes on lock change
101 Check deadlock detection for file locking
105 Test to check the error conditions in fcntl system call
109 Testcase to check locking of regions of a file
113 Check locking of regions of a file
117 Check locking of regions of a file
121 Basic test for dup(2).
125 Negative test for dup(2) with bad fd.
129 Negative test for dup(2) (too many fds).
133 Basic test for dup(2) of a system pipe descriptor.
137 Basic test for dup(2) of a named pipe descriptor.
141 Negative tests for dup2() with bad fd (EBADF), and for "too many
146 Is the access mode the same for both file descriptors?
147 0: read only ? "0444"
148 1: write only ? "0222"
149 2: read/write ? "0666"
153 Testcase to check the basic functionality of dup2().
157 Testcase to check the basic functionality of dup2(2).
162 Verify that, msync() succeeds, when the region to synchronize, is part
163 of, or all of a mapped region.
167 Verify that msync() succeeds when the region to synchronize is mapped
168 shared and the flags argument is MS_INVALIDATE.
172 Verify that, msync() fails, when the region to synchronize, is outside
173 the address space of the process.
177 Verify that, msync() fails, when the region to synchronize, is mapped
178 but the flags argument is invalid.
182 Verify that, msync() fails, when the region to synchronize, was not
188 Testcase to test the basic functionality of the sendfile(2) system call.
192 Testcase to test that sendfile(2) system call returns appropriate
196 Basic test for fork(2).
198 Test correct operation of fork:
200 pid > 0 in parent from wait;
202 Check that child can use a large text space and do a large
203 number of operations.
205 Child inheritance of Environment Variables after fork().
207 Make sure LDT is propagated correctly
209 Test that a process can fork children a large number of
212 Check that all children inherit parent's file descriptor
214 Check if the parent's file descriptors are affected by
215 actions in the child; they should not be.
217 Check that child has access to a full set of files.
219 Check inheritance of file descriptor by children, they
220 should all be referring to the same file.
222 Test that parent gets a pid from each child when doing wait
224 Fork a process using vfork() and verify that, the attribute values like
225 euid, ruid, suid, egid, rgid, sgid, umask, inode and device number of
226 root and current working directories are same as that of the parent
229 Fork a process using vfork() and verify that, the pending signals in
230 the parent are not pending in the child process.
233 Testcase to check the errnos set by the ioctl(2) system call.
237 Testcase to test the TCGETA, and TCSETA ioctl implementations for
242 Verify that ioctl() on sockets returns the proper errno for various
246 check that a correct call to getitimer() succeeds
250 check that a getitimer() call fails as expected
251 with an incorrect second argument.
254 check that a getitimer() call fails as expected
255 with an incorrect first argument.
258 check that a reasonable setitimer() call succeeds.
262 check that a setitimer() call fails as expected
263 with incorrect values.
266 check that a setitimer() call fails as expected
267 with incorrect values.
270 increase CPUs workload - verify that results of some math functions are stable
271 trigonometric (acos, asin, atan, atan2, cos, sin, tan),
272 hyperbolic (cosh, sinh, tanh),
275 increase CPUs workload - verify that results of some math functions are stable
276 exponential and logarithmic functions (exp, log, log10),
277 Functions that manipulate floating-point numbers (modf, ldexp, frexp),
278 Euclidean distance function (hypot),
281 increase CPUs workload - verify that results of some math functions are stable
282 Bessel (j0, j1, y0, y1),
283 Computes the natural logarithm of the gamma function (lgamma),
286 increase CPUs workload - verify that results of some math functions are stable
287 Computes sqrt, power, fmod
290 increase CPUs workload - verify that results of some math functions are stable
293 Creates a tree of threads
301 Creates a tree of threads does calculations, and
302 returns result to parent
307 Write/close flushes data to the file.
312 Basic test for fpathconf(2)
316 Basic test for gethostid(2)
321 Basic test for pathconf(2)
325 Basic test for the setpgrp(2) system call.
329 Testcase to check the basic functionality of the setpgrp(2) syscall.
334 Basic test for the ulimit(2) system call.
338 Performs General Stress with Race conditions
342 Test the LINUX memory manager. The program is aimed at
343 stressing the memory manager by simultaneous map/unmap/read
344 by light weight processes, the test is scheduled to run for
345 a minimum of 24 hours.
349 Test the LINUX memory manager. The program is aimed at
350 stressing the memory manager by repeated map/write/unmap of a
351 of a large gb size file.
355 Test the LINUX memory manager. The program is aimed at
356 stressing the memory manager by repeated map/write/unmap
357 of file/memory of random size (maximum 1GB) this is done by
362 Tests mmapping a big file and writing it once
366 Verify that, mmap() succeeds when used to map a file where size of the
367 file is not a multiple of the page size, the memory area beyond the end
368 of the file to the end of the page is accessible. Also, verify that
369 this area is all zeroed and the modifications done to this area are
370 not written to the file.
374 Call mmap() with prot parameter set to PROT_READ and with the file
375 descriptor being open for read, to map a file creating mapped memory
376 with read access. The minimum file permissions should be 0444.
380 Call mmap() to map a file creating a mapped region with execute access
381 under the following conditions -
382 - The prot parameter is set to PROT_EXE
383 - The file descriptor is open for read
384 - The file being mapped has execute permission bit set.
385 - The minimum file permissions should be 0555.
387 The call should succeed to map the file creating mapped memory with the
392 Call mmap() to map a file creating a mapped region with read/exec access
393 under the following conditions -
394 - The prot parameter is set to PROT_READ|PROT_EXEC
395 - The file descriptor is open for read
396 - The file being mapped has read and execute permission bit set.
397 - The minimum file permissions should be 0555.
399 The call should succeed to map the file creating mapped memory with the
405 Call mmap() to map a file creating mapped memory with no access under
406 the following conditions -
407 - The prot parameter is set to PROT_NONE
408 - The file descriptor is open for read(any mode other than write)
409 - The minimum file permissions should be 0444.
411 The call should succeed to map the file creating mapped memory with the
416 Call mmap() to map a file creating a mapped region with read access
417 under the following conditions -
418 - The prot parameter is set to PROT_READ
419 - The file descriptor is open for writing.
421 The call should fail to map the file.
426 Call mmap() to map a file creating a mapped region with read access
427 under the following conditions -
428 - The prot parameter is set to PROT_WRITE
429 - The file descriptor is open for writing.
430 - The flags parameter has MAP_PRIVATE set.
432 The call should fail to map the file.
436 Verify that mmap() fails to map a file creating a mapped region
437 when the file specified by file descriptor is not valid.
442 Verify that, mremap() succeeds when used to expand the existing
443 virtual memory mapped region to the requested size where the
444 virtual memory area was previously mapped to a file using mmap().
449 mremap() fails when used to expand the existing virtual memory mapped
450 region to the requested size, if the virtual memory area previously
451 mapped was not page aligned or invalid argument specified.
456 mremap() fails when used to expand the existing virtual memory mapped
457 region to the requested size, if there already exists mappings that
458 cover the whole address space requested or the old address specified was
464 mremap() fails when used to expand the existing virtual memory mapped
465 region to the requested size, if the memory area cannot be expanded at
466 the current virtual address and MREMAP_MAYMOVE flag not set.
470 Verify that, munmap call will succeed to unmap a mapped file or
471 anonymous shared memory region from the calling process's address space
472 and after successful completion of munmap, the unmapped region is no
477 Verify that, munmap call will succeed to unmap a mapped file or
478 anonymous shared memory region from the calling process's address space
479 if the region specified by the address and the length is part or all of
484 Verify that, munmap call will fail to unmap a mapped file or anonymous
485 shared memory region from the calling process's address space if the
486 address and the length of the region to be unmapped points outside the
487 calling process's address space
490 Test the basic functionality of brk.
493 Basic test for the sbrk(2) system call.
498 Testcase to check the error conditions for mprotect(2)
502 Testcase to check the mprotect(2) system call.
506 Testcase to check the mprotect(2) system call.
509 create a message queue, then issue the IPC_STAT command
510 and RMID commands to test the functionality
514 create a message queue, then issue the IPC_SET command
515 to lower the msg_qbytes value.
519 create a message queue, then issue the IPC_RMID command
524 test for EACCES, EFAULT and EINVAL errors using
525 a variety of incorrect calls.
534 create a message queue, write a message to it and
539 test for EEXIST and ENOENT errors
543 test for an ENOSPC error by using up all available
547 test for an EACCES error by creating a message queue
548 with no read or write permission and then attempting
549 to access it with various permissions.
552 test that msgrcv() receives the expected message
555 test for EACCES and EFAULT errors
558 test for EINVAL error
561 test for E2BIG and ENOMSG errors
570 test that msgsnd() enqueues a message correctly
573 test for EACCES and EFAULT errors
576 test for EINVAL error
579 test for EAGAIN error
590 Basic test for link(2)
598 Negative test cases for link(2)
602 Multi links (EMLINK) negative test
606 Verify that, readlink will succeed to read the contents of the symbolic
607 link created the process.
611 Basic test for the readlink(2) system call
616 1) readlink(2) returns -1 and sets errno to EACCES if search/write
617 permission is denied in the directory where the symbolic link
619 2) readlink(2) returns -1 and sets errno to EINVAL if the buffer size
621 3) readlink(2) returns -1 and sets errno to EINVAL if the specified
622 file is not a symbolic link file.
623 4) readlink(2) returns -1 and sets errno to ENAMETOOLONG if the
624 pathname component of symbolic link is too long (ie, > PATH_MAX).
625 5) readlink(2) returns -1 and sets errno to ENOENT if the component of
626 symbolic link points to an empty string.
630 Verify that, readlink call will succeed to read the contents of the
631 symbolic link if invoked by non-root user who is not the owner of the
637 Test of various file function calls, such as rename or open, on a symbolic
642 Basic test for the symlink(2) system call.
647 1) symlink(2) returns -1 and sets errno to EACCES if search/write
648 permission is denied in the directory where the symbolic link is
650 2) symlink(2) returns -1 and sets errno to EEXIST if the specified
651 symbolic link already exists.
652 3) symlink(2) returns -1 and sets errno to EFAULT if the specified
653 file or symbolic link points to invalid address.
654 4) symlink(2) returns -1 and sets errno to ENAMETOOLONG if the
655 pathname component of symbolic link is too long (ie, > PATH_MAX).
656 5) symlink(2) returns -1 and sets errno to ENOTDIR if the directory
657 component in pathname of symbolic link is not a directory.
658 6) symlink(2) returns -1 and sets errno to ENOENT if the component of
659 symbolic link points to an empty string.
663 Verify that, symlink will succeed to create a symbolic link of an existing
669 Verify that, symlink will succeed to create a symbolic link of an
670 non-existing object name path.
675 Basic test for the unlink(2) system call.
679 Test for the unlink(2) system call of a FIFO.
683 Tests for error handling for the unlink(2) system call.
687 More tests for error handling for the unlink(2) system call.
692 Regression test for max links per file
696 This test will verify the rename(2) syscall basic functionality.
697 Verify rename() works when the "new" file or directory does not exist.
701 Basic test for the rename(2) system call
705 This test will verify that rename(2) functions correctly
706 when the "new" file or directory exists
710 This test will verify that rename(2) failed when newpath is
711 a non-empty directory and return EEXIST or ENOTEMPTY
715 This test will verify that rename(2) fails with EISDIR
719 This test will verify that rename(2) failed in EINVAL
723 This test will verify that rename(2) failed in ENOTDIR
727 This test will verify that rename(2) syscall failed in EFAULT
731 check rename() fails with EACCES
735 This test will verify that rename(2) syscall fails with ENAMETOOLONG
740 This test will verify that rename(2) failed in EBUSY
744 check rename() fails with EPERM
748 Verify rename() return successfully and performs no other action
749 when "old" file and "new" file link to the same file.
753 This test will verify that rmdir(2) syscall basic functionality.
754 verify rmdir(2) returns a value of 0 and the directory being
759 This test will verify that rmdir(2) fail in
770 check rmdir() fails with EPERM or EACCES
774 Basic test for the rmdir(2) system call
778 Verify that rmdir(2) returns a value of -1 and sets errno to indicate the error.
784 Basic errno test for mkdir(2)
788 This test will verify that new directory created
789 by mkdir(2) inherits the group ID from the parent
790 directory and S_ISGID bit, if the S_ISGID bit is set
791 in the parent directory.
795 Check mkdir() with various error conditions that should produce
796 EFAULT, ENAMETOOLONG, EEXIST, ENOENT and ENOTDIR
800 Attempt to create a directory in a directory having no permissions.
804 This test will verify the mkdir(2) syscall basic functionality
808 Basic test for mkdir(2)
813 Basic test for mknod(2)
817 Verify that mknod(2) succeeds when used to create a filesystem
818 node with set group-ID bit set on a directory without set group-ID bit set.
819 The node created should have set group-ID bit set and its gid should be
820 equal to that of its parent directory.
824 Verify that mknod(2) succeeds when used to create a filesystem
825 node with set group-ID bit set on a directory with set group-ID bit set.
826 The node created should have set group-ID bit set and its gid should be
827 equal to the effective gid of the process.
831 Verify that mknod(2) succeeds when used to create a filesystem
832 node on a directory with set group-ID bit set.
833 The node created should not have group-ID bit set and its gid should be
834 equal to the effective gid of the process.
838 Verify that mknod(2) succeeds when used by root to create a filesystem
839 node with set group-ID bit set on a directory with set group-ID bit set.
840 The node created should have set group-ID bit set and its gid should be
841 equal to that of its parent directory.
847 1) mknod(2) returns -1 and sets errno to EEXIST if specified path
849 2) mknod(2) returns -1 and sets errno to EFAULT if pathname points
850 outside user's accessible address space.
851 3) mknod(2) returns -1 and sets errno to ENOENT if the directory
852 component in pathname does not exist.
853 4) mknod(2) returns -1 and sets errno to ENAMETOOLONG if the pathname
854 component was too long.
855 5) mknod(2) returns -1 and sets errno to ENOTDIR if the directory
856 component in pathname is not a directory.
861 1) mknod(2) returns -1 and sets errno to EPERM if the process id of
862 the caller is not super-user.
863 2) mknod(2) returns -1 and sets errno to EACCES if parent directory
864 does not allow write permission to the process.
868 Verify that mknod(2) succeeds when used to create a filesystem
869 node on a directory without set group-ID bit set. The node created
870 should not have set group-ID bit set and its gid should be equal to that
871 of its parent directory.
878 Basic test for access(2) using F_OK, R_OK, W_OK, and X_OK arguments.
882 Verify that access() succeeds to check the read/write/execute permissions
883 on a file if the mode argument passed was R_OK/W_OK/X_OK.
885 Also verify that, access() succeeds to test the accessibility of the file
886 referred to by symbolic link if the pathname points to a symbolic link.
890 EFAULT error testing for access(2).
895 1. access() fails with -1 return value and sets errno to EACCES
896 if the permission bits of the file mode do not permit the
897 requested (Read/Write/Execute) access.
898 2. access() fails with -1 return value and sets errno to EINVAL
899 if the specified access mode argument is invalid.
900 3. access() fails with -1 return value and sets errno to EFAULT
901 if the pathname points outside allocate address space for the
903 4. access() fails with -1 return value and sets errno to ENOENT
904 if the specified file doesn't exist (or pathname is NULL).
905 5. access() fails with -1 return value and sets errno to ENAMETOOLONG
906 if the pathname size is > PATH_MAX characters.
910 Verify that access() succeeds to check the existence of a file if
911 search access is permitted on the pathname of the specified file.
915 EFAULT error testing for access(2).
919 Testcase to check the whether chroot sets errno to EPERM.
923 Test functionality of chroot(2)
927 Testcase to test whether chroot(2) sets errno correctly.
931 This tool can be used to beat on system or named pipes.
932 See the help() function below for user information.
936 Testcase to check the basic functionality of the pipe(2) syscall:
937 Check that both ends of the pipe (both file descriptors) are
938 available to a process opening the pipe.
942 Check what happens when pipe is passed a bad file descriptor.
946 Check what happens when the system runs out of pipes.
950 Check that a SIGPIPE signal is generated when a write is
951 attempted on an empty pipe.
955 Check that two processes can use the same pipe at the same time.
959 Check that parent can open a pipe and have a child read from it
963 Check if many children can read what is written to a pipe by the
969 Creates a semaphore and two processes. The processes
970 each go through a loop where they semdown, delay for a
971 random amount of time, and semup, so they will almost
972 always be fighting for control of the semaphore.
975 The application creates several threads using pthread_create().
976 One thread performs a semop() with the SEM_UNDO flag set. The
977 change in semaphore value performed by that semop should be
978 "undone" only when the last pthread exits.
983 test the 10 possible semctl() commands
987 test for EACCES error
991 test for EINVAL and EFAULT errors
1000 test for ERANGE error
1004 test that semget() correctly creates a semaphore set
1008 test for EACCES and EEXIST errors
1012 test for ENOENT error
1016 test for ENOSPC error
1020 test for EINVAL error
1024 test that semop() basic functionality is correct
1028 test for E2BIG, EACCES, EFAULT and EINVAL errors
1032 test for EFBIG error
1036 test for EAGAIN error
1040 test for EINTR and EIDRM errors
1045 create a message queue, then issue the IPC_STAT command
1046 and RMID commands to test the functionality
1050 create a message queue, then issue the IPC_SET command
1051 to lower the msg_qbytes value.
1055 create a message queue, then issue the IPC_RMID command
1060 test for EACCES, EFAULT and EINVAL errors using
1061 a variety of incorrect calls.
1065 test for EPERM error
1070 create a message queue, write a message to it and
1075 test for EEXIST and ENOENT errors
1079 test for an ENOSPC error by using up all available
1083 test for an EACCES error by creating a message queue
1084 with no read or write permission and then attempting
1085 to access it with various permissions.
1088 test that msgrcv() receives the expected message
1091 test for EACCES and EFAULT errors
1094 test for EINVAL error
1097 test for E2BIG and ENOMSG errors
1100 test for EINTR error
1103 test for EIDRM error
1106 test that msgsnd() enqueues a message correctly
1109 test for EACCES and EFAULT errors
1112 test for EINVAL error
1115 test for EAGAIN error
1118 test for EINTR error
1122 test for EIDRM error
1125 test that shmat() works correctly
1128 check for EINVAL and EACCES errors
1132 test for EACCES error
1136 test the IPC_STAT, IPC_SET and IPC_RMID commands as
1137 they are used with shmctl()
1141 check for EACCES, EFAULT and EINVAL errors
1145 check for EACCES, and EPERM errors
1149 check that shared memory is detached correctly
1153 check for EINVAL error
1157 test that shmget() correctly creates a shared memory segment
1161 check for ENOENT, EEXIST and EINVAL errors
1165 test for ENOSPC error
1169 test for EACCES error
1173 test for EACCES error
1177 Creates files and opens simultaneously
1181 Open a file with oflag = O_CREAT set, does it set the sticky bit off?
1183 Open "/tmp" with O_DIRECTORY, does it set the S_IFDIR bit on?
1187 Test if open without O_CREAT returns -1 if a file does not exist.
1191 Basic test for open(2)
1195 Testcase to check that open(2) sets EMFILE if a process opens files
1196 more than its descriptor size
1200 Testcase to check open(2) sets errno to EACCES correctly.
1204 Testcase to check open(2) sets errno to ENXIO correctly.
1208 Test the open(2) system call to ensure that it sets ELOOP correctly.
1212 Check for the following errors:
1223 Creates files and opens simultaneously
1228 Check proper operation of chdir(): tests whether the
1229 system call can it change the current, working directory, and find a
1230 file there? Will it fail on a non-directory entry ?
1234 Basic test for chdir(2).
1238 Testcase for testing that chdir(2) sets EACCES errno
1242 Testcase to test whether chdir(2) sets errno correctly.
1247 Verify that, chmod(2) succeeds when used to change the mode permissions
1252 Basic test for chmod(2).
1256 Verify that, chmod(2) will succeed to change the mode of a file
1257 and set the sticky bit on it if invoked by non-root (uid != 0)
1258 process with the following constraints,
1259 - the process is the owner of the file.
1260 - the effective group ID or one of the supplementary group ID's of the
1261 process is equal to the group ID of the file.
1265 Verify that, chmod(2) will succeed to change the mode of a directory
1266 and set the sticky bit on it if invoked by non-root (uid != 0) process
1267 with the following constraints,
1268 - the process is the owner of the directory.
1269 - the effective group ID or one of the supplementary group ID's of the
1270 process is equal to the group ID of the directory.
1274 Verify that, chmod(2) will succeed to change the mode of a directory
1275 but fails to set the setgid bit on it if invoked by non-root (uid != 0)
1276 process with the following constraints,
1277 - the process is the owner of the directory.
1278 - the effective group ID or one of the supplementary group ID's of the
1279 process is not equal to the group ID of the directory.
1284 1) chmod(2) returns -1 and sets errno to EPERM if the effective user id
1285 of process does not match the owner of the file and the process is
1287 2) chmod(2) returns -1 and sets errno to EACCES if search permission is
1288 denied on a component of the path prefix.
1289 3) chmod(2) returns -1 and sets errno to EFAULT if pathname points
1290 outside user's accessible address space.
1291 4) chmod(2) returns -1 and sets errno to ENAMETOOLONG if the pathname
1292 component is too long.
1293 5) chmod(2) returns -1 and sets errno to ENOTDIR if the directory
1294 component in pathname is not a directory.
1295 6) chmod(2) returns -1 and sets errno to ENOENT if the specified file
1300 Verify that, chmod(2) will succeed to change the mode of a file/directory
1301 and sets the sticky bit on it if invoked by root (uid = 0) process with
1302 the following constraints,
1303 - the process is not the owner of the file/directory.
1304 - the effective group ID or one of the supplementary group ID's of the
1305 process is equal to the group ID of the file/directory.
1310 Basic test for chown(2).
1314 Verify that, when chown(2) invoked by super-user to change the owner and
1315 group of a file specified by path to any numeric owner(uid)/group(gid)
1317 - clears setuid and setgid bits set on an executable file.
1318 - preserves setgid bit set on a non-group-executable file.
1322 Verify that, chown(2) succeeds to change the group of a file specified
1323 by path when called by non-root user with the following constraints,
1324 - euid of the process is equal to the owner of the file.
1325 - the intended gid is either egid, or one of the supplementary gids
1327 Also, verify that chown() clears the setuid/setgid bits set on the file.
1332 1) chown(2) returns -1 and sets errno to EPERM if the effective user id
1333 of process does not match the owner of the file and the process is
1335 2) chown(2) returns -1 and sets errno to EACCES if search permission is
1336 denied on a component of the path prefix.
1337 3) chown(2) returns -1 and sets errno to EFAULT if pathname points
1338 outside user's accessible address space.
1339 4) chown(2) returns -1 and sets errno to ENAMETOOLONG if the pathname
1340 component is too long.
1341 5) chown(2) returns -1 and sets errno to ENOTDIR if the directory
1342 component in pathname is not a directory.
1343 6) chown(2) returns -1 and sets errno to ENOENT if the specified file
1348 Verify that, chown(2) succeeds to change the owner and group of a file
1349 specified by path to any numeric owner(uid)/group(gid) values when invoked
1355 Test that closing a regular file and a pipe works correctly
1359 Check that an invalid file descriptor returns EBADF
1363 Basic test for close(2).
1368 create a directory and cd into it.
1372 try to cd into a bad directory (bad fd).
1377 Basic test for Fchmod(2).
1381 Verify that, fchmod(2) will succeed to change the mode of a file/directory
1382 set the sticky bit on it if invoked by root (uid = 0) process with
1383 the following constraints,
1384 - the process is not the owner of the file/directory.
1385 - the effective group ID or one of the supplementary group ID's of the
1386 process is equal to the group ID of the file/directory.
1390 Verify that, fchmod(2) will succeed to change the mode of a file
1391 and set the sticky bit on it if invoked by non-root (uid != 0)
1392 process with the following constraints,
1393 - the process is the owner of the file.
1394 - the effective group ID or one of the supplementary group ID's of the
1395 process is equal to the group ID of the file.
1399 Verify that, fchmod(2) will succeed to change the mode of a directory
1400 and set the sticky bit on it if invoked by non-root (uid != 0) process
1401 with the following constraints,
1402 - the process is the owner of the directory.
1403 - the effective group ID or one of the supplementary group ID's of the
1404 process is equal to the group ID of the directory.
1408 Verify that, fchmod(2) will succeed to change the mode of a directory
1409 but fails to set the setgid bit on it if invoked by non-root (uid != 0)
1410 process with the following constraints,
1411 - the process is the owner of the directory.
1412 - the effective group ID or one of the supplementary group ID's of the
1413 process is not equal to the group ID of the directory.
1418 1) fchmod(2) returns -1 and sets errno to EPERM if the effective user id
1419 of process does not match the owner of the file and the process is
1421 2) fchmod(2) returns -1 and sets errno to EBADF if the file descriptor
1422 of the specified file is not valid.
1426 Verify that, fchmod(2) succeeds when used to change the mode permissions
1427 of a file specified by file descriptor.
1432 Basic test for fchown(2).
1436 Verify that, when fchown(2) invoked by super-user to change the owner and
1437 group of a file specified by file descriptor to any numeric
1438 owner(uid)/group(gid) values,
1439 - clears setuid and setgid bits set on an executable file.
1440 - preserves setgid bit set on a non-group-executable file.
1444 Verify that, fchown(2) succeeds to change the group of a file specified
1445 by path when called by non-root user with the following constraints,
1446 - euid of the process is equal to the owner of the file.
1447 - the intended gid is either egid, or one of the supplementary gids
1449 Also, verify that fchown() clears the setuid/setgid bits set on the file.
1454 1) fchown(2) returns -1 and sets errno to EPERM if the effective user id
1455 of process does not match the owner of the file and the process is
1457 2) fchown(2) returns -1 and sets errno to EBADF if the file descriptor
1458 of the specified file is not valid.
1462 Verify that, fchown(2) succeeds to change the owner and group of a file
1463 specified by file descriptor to any numeric owner(uid)/group(gid) values
1464 when invoked by super-user.
1468 Verify that, lchown(2) succeeds to change the owner and group of a file
1469 specified by path to any numeric owner(uid)/group(gid) values when invoked
1476 1) lchown(2) returns -1 and sets errno to EPERM if the effective user id
1477 of process does not match the owner of the file and the process is
1479 2) lchown(2) returns -1 and sets errno to EACCES if search permission is
1480 denied on a component of the path prefix.
1481 3) lchown(2) returns -1 and sets errno to EFAULT if pathname points
1482 outside user's accessible address space.
1483 4) lchown(2) returns -1 and sets errno to ENAMETOOLONG if the pathname
1484 component is too long.
1485 5) lchown(2) returns -1 and sets errno to ENOTDIR if the directory
1486 component in pathname is not a directory.
1487 6) lchown(2) returns -1 and sets errno to ENOENT if the specified file
1493 Testcase to check the basic functionality of the creat(2) system call.
1497 Testcase to check whether the sticky bit cleared.
1501 Testcase to check creat(2) fails with EACCES
1505 Testcase to check that creat(2) system call returns EMFILE.
1509 Testcase to check creat(2) sets the following errnos correctly:
1519 Testcase to check creat(2) sets the following errnos correctly:
1524 Basic test for creat(2) using 0700 argument.
1528 Verify that, truncate(2) succeeds to truncate a file to a specified
1534 Verify that, truncate(2) succeeds to truncate a file to a certain length,
1535 but the attempt to read past the truncated length will fail.
1541 1) truncate(2) returns -1 and sets errno to EACCES if search/write
1542 permission denied for the process on the component of the path prefix
1544 2) truncate(2) returns -1 and sets errno to ENOTDIR if the component of
1545 the path prefix is not a directory.
1546 3) truncate(2) returns -1 and sets errno to EFAULT if pathname points
1547 outside user's accessible address space.
1548 4) truncate(2) returns -1 and sets errno to ENAMETOOLONG if the component
1549 of a pathname exceeded 255 characters or entire pathname exceeds 1023
1551 5) truncate(2) returns -1 and sets errno to ENOENT if the named file
1556 Verify that, ftruncate(2) succeeds to truncate a file to a specified
1557 length if the file indicated by file descriptor opened for writing.
1561 Verify that, ftruncate(2) succeeds to truncate a file to a certain length,
1562 but the attempt to read past the truncated length will fail.
1567 1) ftruncate(2) returns -1 and sets errno to EINVAL if the specified
1568 truncate length is less than 0.
1569 2) ftruncate(2) returns -1 and sets errno to EBADF if the file descriptor
1570 of the specified file is not valid.
1574 Check the return value, and errno of vhangup(2)
1575 when a non-root user calls vhangup().
1579 To test the basic functionality of vhangup(2)
1582 This program will grow a list of files.
1583 Each file will grow by grow_incr before the same
1584 file grows twice. Each file is open and closed before next file is opened.
1588 Testcase to check the basic functionality of the pipe(2) syscall:
1589 Check that both ends of the pipe (both file descriptors) are
1590 available to a process opening the pipe.
1594 Check what happens when pipe is passed a bad file descriptor.
1598 Check what happens when the system runs out of pipes.
1602 Check that a SIGPIPE signal is generated when a write is
1603 attempted on an empty pipe.
1607 Check that two processes can use the same pipe at the same time.
1611 Check that parent can open a pipe and have a child read from it
1615 Check if many children can read what is written to a pipe by the
1620 This tool can be used to beat on system or named pipes.
1621 See the help() function below for user information.
1623 /ipc_stress/message_queue_test_01.c
1624 /ipc_stress/pipe_test_01.c
1625 /ipc_stress/semaphore_test_01.c
1626 /ipc_stress/single_test_01.c
1629 Recursively reads all files within /proc filesystem.
1632 The purpose of this test is to verify the file size limitations of a filesystem.
1633 It writes one buffer at a time and lseeks from the beginning of the file to the
1634 end of the last write position. The intent is to test lseek64.
1639 Verify that, llseek() call succeeds to set the file pointer position
1640 to an offset larger than file size. Also, verify that any attempt
1641 to write to this location fails.
1646 1. llseek() returns -1 and sets errno to EINVAL, if the 'Whence' argument
1647 is not a proper value.
1648 2. llseek() returns -1 and sets errno to EBADF, if the file handle of
1649 the specified file is not valid.
1653 Basic test for lseek(2)
1657 Negative test for lseek(2)
1661 Negative test for lseek(2) whence
1665 Negative test for lseek(2) of a fifo
1669 Negative test for lseek(2) of a pipe
1673 Verify that, lseek() call succeeds to set the file pointer position
1674 to less than or equal to the file size, when a file is opened for
1679 Verify that, lseek() call succeeds to set the file pointer position
1680 to more than the file size, when a file is opened for reading/writing.
1684 Verify that, lseek() call succeeds to set the file pointer position
1685 to the end of the file when 'whence' value set to SEEK_END and any
1686 attempts to read from that position should fail.
1690 Verify that, lseek() call succeeds to set the file pointer position
1691 to the current specified location, when 'whence' value is set to
1692 SEEK_CUR and the data read from the specified location should match
1698 1. lseek() returns -1 and sets errno to ESPIPE, if the file handle of
1699 the specified file is associated with a pipe, socket, or FIFO.
1700 2. lseek() returns -1 and sets errno to EINVAL, if the 'Whence' argument
1701 is not a proper value.
1702 3. lseek() returns -1 and sets errno to EBADF, if the file handle of
1703 the specified file is not valid.
1707 A wrapper for doio and iogen.
1710 a general purpose io initiator with system call and
1711 write logging. See doio.h for the structure which defines
1712 what doio requests should look like.
1714 Currently doio can handle read,write,reada,writea,ssread,
1715 sswrite, and many varieties of listio requests.
1716 For disk io, if the O_SSD flag is set doio will allocate
1717 the appropriate amount of ssd and do the transfer - thus, doio
1718 can handle all of the primitive types of file io.
1721 A tool for generating file/sds io for a doio process
1725 Verify the functionality of pread() by writing known data using pwrite()
1726 to the file at various specified offsets and later read from the file from
1727 various specified offsets, comparing the data read against the data
1733 1) pread() fails when attempted to read from an unnamed pipe.
1734 2) pread() fails if the specified offset position was invalid.
1739 Verify the functionality of pwrite() by writing known data using pwrite()
1740 to the file at various specified offsets and later read from the file from
1741 various specified offsets, comparing the data written against the data
1747 1) pwrite() fails when attempted to write to an unnamed pipe.
1748 2) pwrite() fails if the specified offset position was invalid.
1753 Basic test for the read(2) system call
1757 test 1: Does read return -1 if file descriptor is not valid, check for EBADF
1759 test 2: Check if read sets EISDIR, if the fd refers to a directory
1761 test 3: Check if read sets EFAULT, if buf is -1.
1765 Testcase to check that read() sets errno to EAGAIN
1769 Testcase to check if read returns the number of bytes read correctly.
1774 Testcase to check the basic functionality of the readv(2) system call.
1778 Testcase to check the error conditions of the readv(2) system call.
1782 Basic test for write(2) system call.
1786 Basic functionality test: does the return from write match the count
1787 of the number of bytes written.
1792 Testcase to check that write(2) doesn't corrupt a file when it fails
1796 Testcase to check that write() sets errno to EAGAIN
1800 Check the return value, and errnos of write(2)
1801 - when the file descriptor is invalid - EBADF
1802 - when the buf parameter is invalid - EFAULT
1803 - on an attempt to write to a pipe that is not open for reading - EPIPE
1808 Testcase to check the basic functionality of writev(2) system call.
1813 In these testcases, writev() is called with partially valid data
1814 to be written in a sparse file.
1819 The testcases are written calling writev() with partially valid data
1820 to overwrite the contents, to write in the beginning and to write in
1821 the end of the file.
1825 The testcases are written calling writev() with partially valid data
1826 to overwrite the contents, to write in the beginning and to write in
1827 the end of the file. This is same as writev03, but the length of
1828 buffer used here is 8192 bytes.
1832 These testcases are written to test writev() on sparse files. This
1833 is same as writev02. But the initial write() with valid data is
1834 done at the beginning of the file.
1838 Does repeated accesses to a filespec and optionally writes to, reads from,
1839 and verifies the data. By default, disktest makes assumptions about
1840 the running environment which allows for a quick start of IO generation.
1841 However, Disktest has a large number of command line options which can
1842 be used to adapt the test for a variety of uses including data integrity,
1843 medium integrity, performance, and simple application simulation.
1849 get a directory entry
1852 check that we get a failure with a bad file descriptor
1856 check for an EINVAL error
1860 check for an ENOTDIR error
1863 check that we get a failure with a bad dirp address.
1865 Spawn creates a tree
1866 of processes with Dval depth and Bval breadth. Each parent will spawn
1867 Bval children. Each child will store information about themselves
1868 in shared memory. The leaf nodes will communicate the existence
1869 of one another through message queues, once each leaf node has
1870 received communication from all of her siblings she will reduce
1871 the semaphore count and exit. Meanwhile all parents are waiting
1872 to hear from their children through the use of semaphores. When
1873 the semaphore count reaches zero then the parent knows all the
1874 children have talked to one another. Locking of the connter semaphore
1875 is provided by the use of another (binary) semaphore.
1881 Exports required environment variables and runs sched_driver
1883 This program uses system calls to change the
1884 priorities of the throughput measurement testcases.
1885 When real-time is in effect, priorities 50 through 64
1886 are used. (MAX_PRI and MIN_PRI) When user-time
1887 (normal) is in effect, 0-14 (corresponding to nice()
1888 calls) is used. The driver only keeps track of
1889 values from 50 to 64, and the testcases will scale
1890 them down to 0 to 14 when needed, to change the
1891 priority of a user-time process.
1894 This programme will determine the context switch
1895 (scheduling) overhead on a system. It takes into
1896 account SMP machines. True context switches are
1899 This utility spawns N tasks, each task sets its priority
1900 by making a system call to the scheduler. The thread
1901 function reads the priority that the scheduler sets for
1902 this task and also reads from /proc the processor this
1903 task last executed on the information that is gathered
1904 by the thread function may be in real-time. Its only an
1907 sched_getscheduler01
1909 Testcase to check sched_getscheduler() returns correct return value
1911 sched_getscheduler02
1913 To check for the errno ESRCH
1916 sched_setscheduler01
1918 Testcase to test whether sched_setscheduler(2) sets the errnos
1921 sched_setscheduler02
1923 Testcase to test whether sched_setscheduler(2) sets the errnos
1929 Testcase to check that sched_yield returns correct values.
1934 Verify that root can provide a negative value to nice()
1935 and hence root can decrease the nice value of the process
1936 using nice() system call
1940 Verify that any user can successfully increase the nice value of
1941 the process by passing a higher increment value (> max. applicable limits)
1942 to nice() system call.
1946 Verify that any user can successfully increase the nice value of
1947 the process by passing an increment value (< max. applicable limits) to
1952 Verify that, nice(2) fails when, a non-root user attempts to increase
1953 the priority of a process by specifying a negative increment value.
1957 Basic test for nice(2)
1962 Verify that valid open file descriptor must be provided to poll() to
1967 Basic test for the select(2) system call to a fd of regular file with no I/O
1972 Basic test for the select(2) system call to fd of system pipe with no I/O
1977 Basic test for the select(2) system call to fd of a named-pipe (FIFO)
1981 Verify that select(2) returns immediately (does not block) if the
1982 timeout value is zero.
1986 Verify that select(2) fails when one or more of the file descriptor sets
1987 specify a file descriptor which is not valid.
1991 Verify that select(2) fails when a signal is delivered before any of the
1992 selected events occur and before the timeout interval expires.
1996 Verify that select(2) fails when an invalid timeout interval is specified.
2000 Verify the functionality of select(2) by passing non-null writefds
2001 which points to a regular file, pipes or FIFO's.
2005 Verify the functionality of select(2) by passing non-null readfds
2006 which points to a regular file, pipes or FIFO's.
2010 Verify that a successful call to select() shall return the desired
2011 number of modified descriptors for which bits are set in the bit masks,
2012 where descriptors points to a regular file, pipes or FIFO's.
2015 Creates a semaphore and two processes. The processes
2016 each go through a loop where they semdown, delay for a
2017 random amount of time, and semup, so they will almost
2018 always be fighting for control of the semaphore.
2021 The application creates several threads using pthread_create().
2022 One thread performs a semop() with the SEM_UNDO flag set. The
2023 change in semaphore value performed by that semop should be
2024 "undone" only when the last pthread exits.
2029 test the 10 possible semctl() commands
2033 test for EACCES error
2037 test for EINVAL and EFAULT errors
2041 test for EPERM error
2046 test for ERANGE error
2050 test that semget() correctly creates a semaphore set
2054 test for EACCES and EEXIST errors
2058 test for ENOENT error
2062 test for ENOSPC error
2066 test for EINVAL error
2070 test that semop() basic functionality is correct
2074 test for E2BIG, EACCES, EFAULT and EINVAL errors
2078 test for EFBIG error
2082 test for EAGAIN error
2086 test for EINTR and EIDRM errors
2090 test that shmat() works correctly
2093 check for EINVAL and EACCES errors
2097 test for EACCES error
2101 test the IPC_STAT, IPC_SET and IPC_RMID commands as
2102 they are used with shmctl()
2106 check for EACCES, EFAULT and EINVAL errors
2110 check for EACCES, and EPERM errors
2114 check that shared memory is detached correctly
2118 check for EINVAL error
2122 test that shmget() correctly creates a shared memory segment
2126 check for ENOENT, EEXIST and EINVAL errors
2130 test for ENOSPC error
2134 test for EACCES error
2138 test for EACCES error
2141 Test the LINUX memory manager. The program is aimed at
2142 stressing the memory manager by repeated shmat/write/read/
2143 shmatd of file/memory of random size (maximum 1000 * 4096)
2144 done by multiple processes.
2148 This program is designed to stress the Memory management sub -
2149 system of Linux. This program will spawn multiple pairs of
2150 reader and writer threads. One thread will create the shared
2151 segment of random size and write to this memory, the other
2152 pair will read from this memory.
2156 Test some features of sigaction (see below for more details)
2161 Testcase to check the basic errnos set by the sigaction(2) syscall.
2166 Send a signal using the main stack. While executing the signal handler
2167 compare a variable's address lying on the main stack with the stack
2168 boundaries returned by sigaltstack().
2174 1. sigaltstack() fails and sets errno to EINVAL when "ss_flags" field
2175 pointed to by 'ss' contains invalid flags.
2176 2. sigaltstack() fails and sets errno to ENOMEM when the size of alternate
2177 stack area is less than MINSIGSTKSZ.
2181 Basic test for the sighold02(2) system call.
2185 set the signal handler to our own function
2189 Test that we get an error using illegal signals
2193 Boundary value and other invalid value checking of signal setup and signal
2198 restore signals to default behavior
2202 set signals to be ignored
2207 Verify that sigprocmask() succeeds to examine and change the calling
2208 process's signal mask.
2209 Also, verify that sigpending() succeeds to store signal mask that are
2210 blocked from delivery and pending for the calling process.
2214 Basic test for the sigrelse(2) system call.
2218 Verify that sigsuspend() succeeds to change process's current signal
2219 mask with the specified signal mask and suspends the process execution
2220 until the delivery of a signal.
2223 Test case to check the basic functionality of kill().
2227 Sending a signal to processes with the same process group ID
2231 Test case to check that kill fails when given an invalid signal.
2235 Test case to check that kill() fails when passed a non-existent pid.
2239 Test case to check that kill() fails when passed a pid owned by another
2244 Test case to check the basic functionality of kill() when killing an
2245 entire process group with a negative pid.
2249 Test case to check that SIGKILL can not be caught.
2253 Test case to check the basic functionality of kill() when kill an
2254 entire process group.
2257 Basic test for kill(2)
2260 Signal flooding test.
2264 mallocs memory <chunksize> at a time until malloc fails.
2267 This program is designed to stress the VMM by doing repeated */
2268 mallocs and frees, with out using the swap space. This is */
2269 achieved by spawning N threads with repeatedly malloc and free*/
2270 a memory of size M. The stress can be increased by increasing */
2271 the number of repetitions over the default number using the */
2276 Sender: Read contents of data file. Write each line to socket, then
2277 read line back from socket and write to standard output.
2278 Receiver: Read a stream socket one line at a time and write each line
2280 Usage: pthcli [port number]
2285 Verify that socket() returns the proper errno for various failure cases
2290 Verify that socketpair() returns the proper errno for various failure cases
2295 Verify that ioctl() on sockets returns the proper errno for various
2300 Verify that connect() returns the proper errno for various failure cases
2304 Verify that getpeername() returns the proper errno for various failure cases
2309 Verify that getsockname() returns the proper errno for various failure cases
2313 Verify that getsockopt() returns the proper errno for various failure cases
2317 Verify that listen() returns the proper errno for various failure cases
2321 Verify that accept() returns the proper errno for various failure cases
2325 Verify that bind() returns the proper errno for various failure cases
2330 Verify that recv() returns the proper errno for various failure cases
2335 Verify that recvfrom() returns the proper errno for various failure cases
2340 Verify that recvmsg() returns the proper errno for various failure cases
2344 Verify that send() returns the proper errno for various failure cases
2348 Verify that sendmsg() returns the proper errno for various failure cases
2351 Verify that sendto() returns the proper errno for various failure cases
2355 Verify that setsockopt() returns the proper errno for various failure cases
2360 Basic test for fstat(2)
2364 Verify that, fstat(2) succeeds to get the status of a file and fills
2365 the stat structure elements though file pointed to by file descriptor
2366 not opened for reading.
2370 Verify that, fstat(2) returns -1 and sets errno to EBADF if the file
2371 pointed to by file descriptor is not valid.
2375 Verify that, fstat(2) succeeds to get the status of a file pointed by
2376 file descriptor and fills the stat structure elements.
2381 Basic test for fstatfs(2)
2385 Testcase to check fstatfs() sets errno correctly.
2389 Verify that, lstat(2) succeeds to get the status of a file pointed to by
2390 symlink and fills the stat structure elements.
2394 Basic test for lstat(2)
2399 1) lstat(2) returns -1 and sets errno to EACCES if search permission is
2400 denied on a component of the path prefix.
2401 2) lstat(2) returns -1 and sets errno to ENOENT if the specified file
2402 does not exists or empty string.
2403 3) lstat(2) returns -1 and sets errno to EFAULT if pathname points
2404 outside user's accessible address space.
2405 4) lstat(2) returns -1 and sets errno to ENAMETOOLONG if the pathname
2406 component is too long.
2407 5) lstat(2) returns -1 and sets errno to ENOTDIR if the directory
2408 component in pathname is not a directory.
2412 Verify that, stat(2) succeeds to get the status of a file and fills the
2413 stat structure elements.
2417 Verify that, stat(2) succeeds to get the status of a file and fills the
2418 stat structure elements though process doesn't have read access to the
2425 1) stat(2) returns -1 and sets errno to EACCES if search permission is
2426 denied on a component of the path prefix.
2427 2) stat(2) returns -1 and sets errno to ENOENT if the specified file
2428 does not exists or empty string.
2429 3) stat(2) returns -1 and sets errno to EFAULT if pathname points
2430 outside user's accessible address space.
2431 4) stat(2) returns -1 and sets errno to ENAMETOOLONG if the pathname
2432 component is too long.
2433 5) stat(2) returns -1 and sets errno to ENOTDIR if the directory
2434 component in pathname is not a directory.
2438 Basic test for the stat05(2) system call.
2442 Basic test for the statfs(2) system call.
2446 Testcase to check that statfs(2) sets errno correctly.
2451 Basic test for the read(2) system call
2455 test 1: Does read return -1 if file descriptor is not valid, check for EBADF
2457 test 2: Check if read sets EISDIR, if the fd refers to a directory
2459 test 3: Check if read sets EFAULT, if buf is -1.
2463 Testcase to check that read() sets errno to EAGAIN
2467 Testcase to check if read returns the number of bytes read correctly.
2471 Basic test for the umask(2) system call.
2475 Check that umask changes the mask, and that the previous
2476 value of the mask is returned correctly for each value.
2480 Check that umask changes the mask, and that the previous
2481 value of the mask is returned correctly for each value.
2487 Getgroups system call critical test
2491 Basic test for getgroups(2)
2495 Verify that, getgroups() system call gets the supplementary group IDs
2496 of the calling process.
2501 getgroups() fails with -1 and sets errno to EINVAL if the size
2502 argument value is -ve.
2506 Basic test for gethostname(2)
2511 Testcase to check the basic functionality of getpgid().
2515 Testcase to check the basic functionality of getpgid().
2518 Basic test for getpgrp(2)
2523 Verify that getpriority() succeeds get the scheduling priority of
2524 the current process, process group or user.
2530 1) getpriority() sets errno to ESRCH if no process was located
2531 was located for 'which' and 'who' arguments.
2532 2) getpriority() sets errno to EINVAL if 'which' argument was
2533 not one of PRIO_PROCESS, PRIO_PGRP, or PRIO_USER.
2537 Verify that getresgid() will be successful to get the real, effective
2538 and saved user id of the calling process.
2542 Verify that getresgid() will be successful to get the real, effective
2543 and saved user ids after calling process invokes setregid() to change
2544 the effective/saved gids to that of specified user.
2548 Verify that getresgid() will be successful to get the real, effective
2549 and saved user ids after calling process invokes setresgid() to change
2550 the effective gid to that of specified user.
2555 Verify that getresuid() will be successful to get the real, effective
2556 and saved user id of the calling process.
2560 Verify that getresuid() will be successful to get the real, effective
2561 and saved user ids after calling process invokes setreuid() to change
2562 the effective/saved uids to that of specified user.
2566 Verify that getresuid() will be successful to get the real, effective
2567 and saved user ids after calling process invokes setresuid() to change
2568 the effective uid to that of specified user.
2573 call getsid() and make sure it succeeds
2577 call getsid() with an invalid PID to produce a failure
2582 Testcase to check the basic functionality of setfsgid(2) system
2587 Testcase to test the basic functionality of the setfsuid(2) system
2593 Basic test for the setgid(2) system call.
2597 Testcase to ensure that the setgid() system call sets errno to EPERM
2602 Basic test for the setgroups(2) system call.
2607 1. setgroups() fails with -1 and sets errno to EINVAL if the size
2608 argument value is > NGROUPS
2609 2. setgroups() fails with -1 and sets errno to EPERM if the
2610 calling process is not super-user.
2614 Verify that, only root process can invoke setgroups() system call to
2615 set the supplementary group IDs of the process.
2620 Basic test for setpgid(2) system call.
2624 Testcase to check that setpgid() sets errno correctly.
2628 Test to check the error and trivial conditions in setpgid system call
2632 set the priority for the test process lower.
2636 test for an expected failure by trying to raise
2637 the priority for the test process while not having
2638 permissions to do so.
2642 test for an expected failure by using an invalid
2647 test for an expected failure by using an invalid
2652 test for an expected failure by trying to change
2653 a process with an ID that is different from the
2658 Basic test for the setregid(2) system call.
2662 Test that setregid() fails and sets the proper errno values when a
2663 non-root user attempts to change the real or effective group id to a
2664 value other than the current gid or the current effective gid.
2668 Test setregid() when executed by a non-root user.
2672 Test setregid() when executed by root.
2676 Test setresuid() when executed by root.
2680 Test that a non-root user can change the real, effective and saved
2681 uid values through the setresuid system call.
2686 Test that the setresuid system call sets the proper errno
2687 values when a non-root user attempts to change the real, effective or
2688 saved uid to a value other than one of the current uid, the current
2689 effective uid of the current saved uid. Also verify that setresuid
2690 fails if an invalid uid value is given.
2694 Basic test for the setreuid(2) system call.
2698 Test setreuid() when executed by root.
2702 Test setreuid() when executed by an unprivileged user.
2707 Test that root can change the real and effective uid to an
2712 Test the setreuid() feature, verifying the role of the saved-set-uid
2713 and setreuid's effect on it.
2717 Test that EINVAL is set when setreuid is given an invalid user id.
2721 Testcase to check the basic functionality of the setrlimit system call.
2726 Testcase to test the different errnos set by setrlimit(2) system call.
2730 Test for EPERM when the super-user tries to increase RLIMIT_NOFILE
2731 beyond the system limit.
2735 Test to check the error and trivial conditions in setsid system call
2739 Basic test for the setuid(2) system call.
2743 Basic test for the setuid(2) system call as root.
2747 Test to check the error and trivial conditions in setuid
2751 Regression test for Linux filesystem permissions.
2754 Basic test for the uname(2) system call.
2758 Call uname() with an invalid address to produce a failure
2762 Call uname() and make sure it succeeds
2765 Testcase for testing the basic functionality of sysctl(2) system call.
2766 This testcase attempts to read the kernel parameters using
2767 sysctl({CTL_KERN, KERN_ }, ...) and compares it with the known
2772 Testcase to check that sysctl(2) sets errno to EPERM correctly.
2777 Testcase to check that sysctl(2) sets errno to ENOTDIR
2782 Testcase to check that sysctl(2) sets errno to EFAULT
2786 Basic test for the time(2) system call.
2791 Verify that time(2) returns the value of time in seconds since
2792 the Epoch and stores this value in the memory pointed to by the parameter.
2796 Basic test for the times(2) system call.
2800 Testcase to test that times() sets errno correctly
2804 Testcase to check the basic functionality of the times() system call.
2808 Verify that the system call utime() successfully sets the modification
2809 and access times of a file to the current time, if the times argument
2810 is null, and the user ID of the process is "root".
2814 Verify that the system call utime() successfully sets the modification
2815 and access times of a file to the current time, under the following
2817 - The times argument is null.
2818 - The user ID of the process is not "root".
2819 - The file is owned by the user ID of the process.
2823 Verify that the system call utime() successfully sets the modification
2824 and access times of a file to the current time, under the following
2826 - The times argument is null.
2827 - The user ID of the process is not "root".
2828 - The file is not owned by the user ID of the process.
2829 - The user ID of the process has write access to the file.
2834 Verify that the system call utime() successfully sets the modification
2835 and access times of a file to the time specified by times argument, if
2836 the times argument is not null, and the user ID of the process is "root".
2841 Verify that the system call utime() successfully sets the modification
2842 and access times of a file to the value specified by the times argument
2843 under the following constraints,
2844 - The times argument is not null,
2845 - The user ID of the process is not "root".
2846 - The file is owned by the user ID of the process.
2851 1. Verify that the system call utime() fails to set the modification
2852 and access times of a file to the current time, under the following
2854 - The times argument is null.
2855 - The user ID of the process is not "root".
2856 - The file is not owned by the user ID of the process.
2857 - The user ID of the process does not have write access to the
2859 2. Verify that the system call utime() fails to set the modification
2860 and access times of a file if the specified file doesn't exist.
2864 Testcase to check the basic functionality of settimeofday().
2869 Testcase to check that settimeofday() sets errnos correctly.
2873 Verify that the system call stime() successfully sets the system's idea
2874 of data and time if invoked by "root" user.
2878 Verify that the system call stime() fails to set the system's idea
2879 of data and time if invoked by "non-root" user.
2883 Testcase to check that gettimeofday(2) sets errno to EFAULT.
2889 Basic test for alarm(2).
2893 Boundary Value Test for alarm(2).
2897 Alarm(2) cleared by a fork.
2901 Check that when an alarm request is made, the signal SIGALRM is received
2902 even after the process has done an exec().
2906 Check the functionality of the Alarm system call when the time input
2907 parameter is non zero.
2911 Check the functionality of the Alarm system call when the time input
2916 Check the functionality of the alarm() when the time input
2917 parameter is non-zero and the process does a fork.
2921 Basic test for getegid(2)
2926 Basic test for geteuid(2)
2931 Basic test for getgid(2)
2935 Testcase to check the basic functionality of getgid().
2939 Testcase to check the basic functionality of getegid().
2944 Basic test for getpid(2)
2949 Verify that getpid() system call gets the process ID of the of the
2955 Testcase to check the basic functionality of the getppid() syscall.
2960 Basic test for getuid(2)
2964 Testcase to check the basic functionality of the geteuid() system call.
2968 Testcase to check the basic functionality of the getuid() system call.
2972 Verify that nanosleep() will be successful to suspend the execution
2973 of a process for a specified time.
2977 Verify that nanosleep() will be successful to suspend the execution
2978 of a process, returns after the receipt of a signal and writes the
2979 remaining sleep time into the structure.
2983 Verify that nanosleep() will fail to suspend the execution
2984 of a process for a specified time if interrupted by a non-blocked signal.
2988 Verify that nanosleep() will fail to suspend the execution
2989 of a process if the specified pause time is invalid.