plateform
stringclasses
1 value
repo_name
stringclasses
2 values
name
stringlengths
1
78
ext
stringclasses
2 values
path
stringlengths
15
1.11k
size
int64
1
8.55M
source_encoding
stringclasses
11 values
md5
stringlengths
32
32
text
stringlengths
0
8.49M
google
android
mlockall03
.c
platform/external/ltp/testcases/kernel/syscalls/mlockall/mlockall03.c
6,957
utf_8
05da3889a42d8f79d6c26d0249e86252
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ /************************************************************************** * * TEST IDENTIFIER : mlockall03 * * EXECUTED BY : root / superuser * * TEST TITLE : Test for checking basic error conditions for * mlockall(2) *...
google
android
mlockall02
.c
platform/external/ltp/testcases/kernel/syscalls/mlockall/mlockall02.c
6,201
utf_8
c351ff0b835876dce0b5bc18b43f19af
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ /************************************************************************** * * TEST IDENTIFIER : mlockall02 * * EXECUTED BY : root / superuser * * TEST TITLE : Test for checking basic error conditions for * mlockall(2) *...
google
android
mlockall01
.c
platform/external/ltp/testcases/kernel/syscalls/mlockall/mlockall01.c
3,496
utf_8
7715d15a5ca0d2d27e3fe43df085c9a8
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ /************************************************************************** * * TEST IDENTIFIER : mlockall01 * * EXECUTED BY : root / superuser * * TEST TITLE : Basic test for mlockall(2) * * TEST CASE TOTAL : 3 * * * SIG...
google
android
inotify_init1_01
.c
platform/external/ltp/testcases/kernel/syscalls/inotify_init/inotify_init1_01.c
1,025
utf_8
fb84dd942137e21cfcbfab2bb2564360
*/ /*\ * [Description] * * Verify that inotify_init1() returns a file descriptor and sets * the close-on-exec (FD_CLOEXEC) flag on the new file descriptor * only when called with IN_CLOEXEC. */ #include "tst_test.h" #include "lapi/syscalls.h" #define IN_CLOEXEC O_CLOEXEC static void run(void) { int fd, fd_flags...
google
android
inotify_init1_02
.c
platform/external/ltp/testcases/kernel/syscalls/inotify_init/inotify_init1_02.c
1,051
utf_8
97965803f2a28a28c2826d509e39804b
*/ /*\ * [Description] * * Verify that inotify_init1() returns a file descriptor and sets the * O_NONBLOCK file status flag on the open file description referred * to by the new file descriptor only when called with IN_NONBLOCK. */ #include "tst_test.h" #include "lapi/syscalls.h" #define IN_NONBLOCK O_NONBLOCK s...
google
android
epoll_create1_02
.c
platform/external/ltp/testcases/kernel/syscalls/epoll_create1/epoll_create1_02.c
790
utf_8
0b04c30d9458f62c65f123e91d376d78
*/ /*\ * [Description] * * Verify that epoll_create1 returns -1 and set errno to EINVAL with an invalid * value specified in flags. */ #include <sys/epoll.h> #include "tst_test.h" #include "lapi/epoll.h" #include "lapi/syscalls.h" static struct test_case_t { int flags; int exp_err; const char *desc; } tc[] = {...
google
android
epoll_create1_01
.c
platform/external/ltp/testcases/kernel/syscalls/epoll_create1/epoll_create1_01.c
1,031
utf_8
5508002016dd0c74575cd58a0397ff48
*/ /*\ * [Description] * * Verify that epoll_create1 sets the close-on-exec flag for the returned * file descriptor with EPOLL_CLOEXEC. */ #include <sys/epoll.h> #include "tst_test.h" #include "lapi/epoll.h" #include "lapi/syscalls.h" static struct test_case_t { int flags; int exp_flag; const char *desc; } tc[...
google
android
fchmod03
.c
platform/external/ltp/testcases/kernel/syscalls/fchmod/fchmod03.c
1,440
utf_8
1f76c27d03b0ff205bf603e00e00bcc4
*/ /*\ * [Description] * * Verify that, fchmod(2) will succeed to change the mode of a file * and set the sticky bit on it if invoked by non-root (uid != 0) * process with the following constraints, * - the process is the owner of the file. * - the effective group ID or one of the supplementary group ID's of th...
google
android
fchmod06
.c
platform/external/ltp/testcases/kernel/syscalls/fchmod/fchmod06.c
1,623
utf_8
dd9f1503d0350f0335b3acb46341eac5
*/ /* * Test that fchmod() fails and sets the proper errno values. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif #include <errno.h> #include <sys/types.h> #include <pwd.h> #include "tst_test.h" #define MNT_POINT "mntpoint" static int fd1; static int fd2; static int fd3; static struct tcase { int *fd; int mode...
google
android
fchmod05
.c
platform/external/ltp/testcases/kernel/syscalls/fchmod/fchmod05.c
2,053
utf_8
bfa18eae4e99bf68fc776a1f3286dce8
* Author: Wayne Boyer * * Test Description: * Verify that, fchmod(2) will succeed to change the mode of a directory * but fails to set the setgid bit on it if invoked by non-root (uid != 0) * process with the following constraints, * - the process is the owner of the directory. * - the effective group ID or ...
google
android
fchmod04
.c
platform/external/ltp/testcases/kernel/syscalls/fchmod/fchmod04.c
1,418
utf_8
41dd598c12b93ea557fa7ef0968a3aab
*/ /*\ * [Description] * * Verify that, fchmod(2) will succeed to change the mode of a directory * and set the sticky bit on it if invoked by non-root (uid != 0) process * with the following constraints, * - the process is the owner of the directory. * - the effective group ID or one of the supplementary group ...
google
android
fchmod01
.c
platform/external/ltp/testcases/kernel/syscalls/fchmod/fchmod01.c
1,281
utf_8
880d3514d139b433d5e4983cb42b7a92
* Author: Wayne Boyer and William Roske * * Test Description: * fchmod() will succeed to change the mode permissions of a file specified * by file descriptor. */ #include <errno.h> #include "tst_test.h" #include "fchmod.h" static int fd; static int modes[] = { 0, 07, 070, 0700, 0777, 02777, 04777, 06777 }; static...
google
android
fchmod02
.c
platform/external/ltp/testcases/kernel/syscalls/fchmod/fchmod02.c
1,741
utf_8
274270306b86bd102a79f0ae814d8a48
* * Test Description: * Verify that, fchmod() will succeed to change the mode of a file/directory * set the sticky bit on it if invoked by root (uid = 0) process with * the following constraints, * - the process is not the owner of the file/directory. * - the effective group ID or one of the supplementary gro...
google
android
umask01
.c
platform/external/ltp/testcases/kernel/syscalls/umask/umask01.c
1,389
utf_8
0de00b26d432735c994004101b6ac6e7
* 07/2001 Ported by John George */ /* * umask(2) sets the mask from 0000 to 0777 while we create files, * the previous value of the mask should be returned correctly, * and the file mode should be correct for each creation mask. */ #include <errno.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h...
google
android
finit_module
.c
platform/external/ltp/testcases/kernel/syscalls/finit_module/finit_module.c
749
utf_8
3ee63dd14ad87f4de0eec5116129a97e
* * Dummy test module. * * The module accepts a single argument named "status" and it fails * initialization if the status is set to "invalid". */ #include <linux/module.h> #include <linux/init.h> #include <linux/proc_fs.h> #include <linux/kernel.h> static char status[20]; module_param_string(status, status, 20, ...
google
android
finit_module02
.c
platform/external/ltp/testcases/kernel/syscalls/finit_module/finit_module02.c
3,283
utf_8
9411258c338a84f7cb2ed5b1814009fc
*/ /*\ * [Description] * * Basic finit_module() failure tests. * * [Algorithm] * * Tests various failure scenarios for finit_module(). */ #include <linux/capability.h> #include <errno.h> #include "lapi/init_module.h" #include "tst_module.h" #include "tst_capability.h" #define MODULE_NAME "finit_module.ko" #def...
google
android
finit_module01
.c
platform/external/ltp/testcases/kernel/syscalls/finit_module/finit_module01.c
899
utf_8
ec870c2008b80fb6d77c819ac00da9f3
*/ /*\ * [Description] * * Basic finit_module() tests. * * [Algorithm] * * Inserts a simple module after opening and mmaping the module file. */ #include <errno.h> #include "lapi/init_module.h" #include "tst_module.h" #define MODULE_NAME "finit_module.ko" static int fd; static char *mod_path; static void setup...
google
android
kcmp02
.c
platform/external/ltp/testcases/kernel/syscalls/kcmp/kcmp02.c
2,075
utf_8
ebae1ea8582757617063bed698e809a8
*/ /* Description: * Verify that: * 1) kcmp fails with bad pid * 2) kcmp fails with invalid flag * 3) kcmp fails with invalid flag * 4) kcmp fails with invalid flag * 5) kcmp fails with invalid flag * 6) kcmp fails with invalid fd */ #define _GNU_SOURCE #include "tst_test.h" #include "lapi/fcntl.h" #i...
google
android
kcmp03
.c
platform/external/ltp/testcases/kernel/syscalls/kcmp/kcmp03.c
1,743
utf_8
dfca74105cb9563ee2c8093862a3b584
*/ /* * Testname: kcmp03.c * * Description: * 1) kcmp() returns 0 if the processes share the same file system information. * 2) kcmp() returns 0 if the processes share I/O context. * 3) kcmp() returns 0 if the processes share the same list of System V * semaphore undo operations. * 4) kcmp() returns 0 if t...
google
android
kcmp01
.c
platform/external/ltp/testcases/kernel/syscalls/kcmp/kcmp01.c
2,105
utf_8
5716e53189a3d402b063274bb297b95d
*/ /* Description: * Verify that: * 1) kcmp returns 0 with two process and two fd refering to the * same open file * 2) kcmp doesn't return 0 with two process and two fd not * refering to the same open file */ #define _GNU_SOURCE #include "tst_test.h" #include "lapi/fcntl.h" #include "lapi/kcmp.h" #de...
google
android
readlinkat02
.c
platform/external/ltp/testcases/kernel/syscalls/readlinkat/readlinkat02.c
3,079
utf_8
ee3f7ce41f2a7141d54df28f06286d5c
/* * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ /* * Test Description: * Verify that, * 1. bufsiz is 0, EINVAL should be returned. * 2. The named file is not a symbolic link, EINVAL should be returned. * 3. The component of the path prefix is not a directory, ENOTDIR ...
google
android
readlinkat01
.c
platform/external/ltp/testcases/kernel/syscalls/readlinkat/readlinkat01.c
3,642
utf_8
3b2582a6b45ebb3e1a9a09f74f715bbf
/****************************************************************************** * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * This test case will verify basic function of readlinkat * added by kernel 2.6.16 or up. * **********************************************************...
google
android
flistxattr02
.c
platform/external/ltp/testcases/kernel/syscalls/flistxattr/flistxattr02.c
1,899
utf_8
902d03d86a26daab2cbe1460e9394d6d
*/ /* * Test Name: flistxattr02 * * Description: * 1) flistxattr(2) fails if the size of the list buffer is too small * to hold the result. * 2) flistxattr(2) fails if fd is an invalid file descriptor. * * Expected Result: * 1) flistxattr(2) should return -1 and set errno to ERANGE. * 2) flistxattr(2) should return -1 ...
google
android
flistxattr01
.c
platform/external/ltp/testcases/kernel/syscalls/flistxattr/flistxattr01.c
1,767
utf_8
3c63ba09c1774b8411ea652f0e769108
*/ /* * Test Name: verify_flistxattr01 * * Description: * The testcase checks the basic functionality of the flistxattr(2). * flistxattr(2) retrieves the list of extended attribute names * associated with the file itself in the filesystem. * */ #include "config.h" #include <errno.h> #include <sys/types.h> #include <str...
google
android
flistxattr03
.c
platform/external/ltp/testcases/kernel/syscalls/flistxattr/flistxattr03.c
1,735
utf_8
a81401a9d72d4ee90c1b74a0fd940a4f
*/ /* * Test Name: flistxattr03 * * Description: * flistxattr is identical to listxattr. an empty buffer of size zero * can return the current size of the list of extended attribute names, * which can be used to estimate a suitable buffer. */ #include "config.h" #include <errno.h> #include <sys/types.h> #ifdef HAVE_SYS...
google
android
munlockall01
.c
platform/external/ltp/testcases/kernel/syscalls/munlockall/munlockall01.c
3,249
utf_8
cdd9cc7cceea460efd668491b9788f00
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ /************************************************************************** * * TEST IDENTIFIER : munlockall01 * * EXECUTED BY : root / superuser * * TEST TITLE : Basic test for munlockall(2) * * TEST CASE TOTAL : 1 * * * ...
google
android
setpgid02
.c
platform/external/ltp/testcases/kernel/syscalls/setpgid/setpgid02.c
1,332
utf_8
89e67b66dc671918e2bb36e739b62281
* 07/2001 Ported by Wayne Boyer */ /*\ * [Description] * * Verify that setpgid(2) syscall fails with: * * - EINVAL when given pgid is less than 0. * - ESRCH when pid is not the calling process and not a child of * the calling process. * - EPERM when an attempt was made to move a process into a process * grou...
google
android
setpgid03
.c
platform/external/ltp/testcases/kernel/syscalls/setpgid/setpgid03.c
1,374
utf_8
a9d9522345bd172c8c26b575dffbb60f
*/ /*\ * [Description] * * Tests setpgid() erorrs: * * - EPERM The calling process, process specified by pid and the target * process group must be in the same session. * * - EACCESS Proccess cannot change process group ID of a child after child * has performed exec() */ #include <unistd.h>...
google
android
setpgid01
.c
platform/external/ltp/testcases/kernel/syscalls/setpgid/setpgid01.c
3,468
utf_8
8ef0cdbeae1897c5b4193b6022cfe662
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, * Mountain View, CA 94043, or: * * http://www.sgi.com * * For further information regarding this notice, see: * * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ * */ ...
google
android
setpgid03_child
.c
platform/external/ltp/testcases/kernel/syscalls/setpgid/setpgid03_child.c
333
utf_8
a9b4959d248618512c01f5f726f55ae7
*/ #define TST_NO_DEFAULT_MAIN #include "tst_test.h" int main(void) { tst_reinit(); TST_CHECKPOINT_WAKE_AND_WAIT(0); return 0; }
google
android
fstatfs01
.c
platform/external/ltp/testcases/kernel/syscalls/fstatfs/fstatfs01.c
1,212
utf_8
78f8eb3a8f911c636fac927169f43e74
*/ /*\ * [Description] * * Verify that fstatfs() syscall executes successfully for all * available filesystems. */ #include <stdio.h> #include "tst_test.h" #define MNT_POINT "mntpoint" #define TEMP_FILE MNT_POINT"/test_file" static int file_fd; static int pipe_fd; static struct tcase { int *fd; const char *msg;...
google
android
fstatfs02
.c
platform/external/ltp/testcases/kernel/syscalls/fstatfs/fstatfs02.c
1,382
utf_8
02f8c3fe3672242a42f63120f53328fc
*/ /*\ * [Description] * * Testcase to check if fstatfs() sets errno correctly. */ #include <errno.h> #include <stdlib.h> #include <sys/types.h> #include <sys/statfs.h> #include <sys/wait.h> #include "tst_test.h" #include "tst_safe_macros.h" static struct statfs buf; static int fd; static int bad_fd = -1; static s...
google
android
bind06
.c
platform/external/ltp/testcases/kernel/syscalls/bind/bind06.c
2,454
utf_8
cb9c1f28d361aaf542e979f25543c057
* Date: Tue Nov 28 08:03:30 2017 -0800 * * net/packet: fix a race in packet_bind() and packet_notifier() */ #include <sys/socket.h> #include <sys/ioctl.h> #include <linux/if_packet.h> #include <net/ethernet.h> #include <net/if.h> #include "tst_test.h" #include "tst_fuzzy_sync.h" static volatile int fd = -1; sta...
google
android
bind05
.c
platform/external/ltp/testcases/kernel/syscalls/bind/bind05.c
5,617
utf_8
4e9170a7e61322f47f57aa317237f849
*/ /* * Create and bind socket for various standard datagram protocols. * Then connect to it and send some test data. */ #include <string.h> #include <stdlib.h> #include <time.h> #include <pthread.h> #include "tst_test.h" #include "tst_net.h" #include "tst_safe_pthread.h" #include "libbind.h" static struct sockaddr...
google
android
bind03
.c
platform/external/ltp/testcases/kernel/syscalls/bind/bind03.c
1,998
utf_8
d5a10f6e1176dd9f97bf8e1882b7e2ba
*/ /* The commit 0fb44559ffd6 af_unix: move unix_mknod() out of bindlock * changed the behavior of bind() for STREAM UNIX domain sockets if */ #include <errno.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "tst_kvercmp.h" #include "tst_test.h" #include "tst_safe_net.h" #d...
google
android
bind02
.c
platform/external/ltp/testcases/kernel/syscalls/bind/bind02.c
1,449
utf_8
8d05d559d92f1bfc000ecd6f060b8337
*/ /* * Test Description: * Make sure bind() of privileged port gives EACCESS error for non-root users. */ #include <string.h> #include <unistd.h> #include <pwd.h> #include <grp.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include "tst_test.h" /* This port needs to be a privileged por...
google
android
bind04
.c
platform/external/ltp/testcases/kernel/syscalls/bind/bind04.c
5,260
utf_8
0fd9090b638b350834c0b9fd79ceb1d7
*/ /* * Create and bind socket for various standard stream protocols. * Then connect to it and send some test data. */ #include <string.h> #include <stdlib.h> #include <time.h> #include <pthread.h> #include "tst_test.h" #include "tst_net.h" #include "tst_safe_pthread.h" #include "libbind.h" static struct sockaddr_u...
google
android
bind01
.c
platform/external/ltp/testcases/kernel/syscalls/bind/bind01.c
2,297
utf_8
f00da3362e904deaf02769c9326e74af
*/ #include <stdio.h> #include <unistd.h> #include <errno.h> #include <fcntl.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <netinet/in.h> #include "tst_test.h" int inet_socket; int dev_null; struct sockaddr_in sin1, sin2, sin3; struct sockaddr_un sun; static struct test_case { int *so...
google
android
getppid01
.c
platform/external/ltp/testcases/kernel/syscalls/getppid/getppid01.c
605
utf_8
6489ffa7a3fdcaf3c9335f7f9c493fd1
*/ /*\ * [Description] * * Test whether parent process id that getppid() returns is out of range. */ #include <errno.h> #include "tst_test.h" static void verify_getppid(void) { pid_t ppid, pid_max; SAFE_FILE_SCANF("/proc/sys/kernel/pid_max", "%d\n", &pid_max); ppid = getppid(); if (ppid > pid_max) tst_res(TF...
google
android
getppid02
.c
platform/external/ltp/testcases/kernel/syscalls/getppid/getppid02.c
709
utf_8
60693167e1d73af4c51a7d66e2768b96
*/ /*\ * [Description] * * Check that getppid() in child returns the same pid as getpid() in parent. */ #include <errno.h> #include "tst_test.h" static void verify_getppid(void) { pid_t proc_id; pid_t pid; pid_t pproc_id; proc_id = getpid(); pid = SAFE_FORK(); if (pid == 0) { pproc_id = getppid(); if (pp...
google
android
set_robust_list01
.c
platform/external/ltp/testcases/kernel/syscalls/set_robust_list/set_robust_list01.c
3,670
utf_8
a8dcbd068fca602fd5591d138afc2ba1
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Name: set_robust_list01 * * Test Description: * Verify that set_robust_list() returns the proper errno for various failure * cases * * Usage: <for command-line> * set_robust_list01 [-c n] [-e][-i n] [-I x] ...
google
android
write01
.c
platform/external/ltp/testcases/kernel/syscalls/write/write01.c
1,035
utf_8
155af5f1fe748af138d6494e760f3543
*/ #include <stdio.h> #include <string.h> #include <errno.h> #include "tst_test.h" static int fd; static void verify_write(void) { int i, badcount = 0; char buf[BUFSIZ]; memset(buf, 'w', BUFSIZ); SAFE_LSEEK(fd, 0, SEEK_SET); for (i = BUFSIZ; i > 0; i--) { TEST(write(fd, buf, i)); if (TST_RET == -1) { tst_r...
google
android
write04
.c
platform/external/ltp/testcases/kernel/syscalls/write/write04.c
1,182
utf_8
17655b8cadc7d646e7ce228833ec3742
*/ /*\ * [Description] * * Verify that write(2) fails with errno EAGAIN when attempt to write to fifo * opened in O_NONBLOCK mode. */ #include <sys/stat.h> #include <fcntl.h> #include <signal.h> #include <setjmp.h> #include <errno.h> #include <string.h> #include <stdio.h> #include "tst_test.h" static char fifo[10...
google
android
write02
.c
platform/external/ltp/testcases/kernel/syscalls/write/write02.c
798
utf_8
0f7a625710195c6cfe0f450d2678e40d
*/ /* * Tests for a special case NULL buffer with size 0 is expected to return 0. */ #include <errno.h> #include "tst_test.h" static int fd; static void verify_write(void) { TEST(write(fd, NULL, 0)); if (TST_RET != 0) { tst_res(TFAIL | TTERRNO, "write() should have succeeded with ret=0"); return; } tst_re...
google
android
write05
.c
platform/external/ltp/testcases/kernel/syscalls/write/write05.c
2,170
utf_8
a105c5b951db85812480a18de30c465d
*/ /* * DESCRIPTION * Check the return value, and errnos of write(2) * - when the file descriptor is invalid - EBADF * - when the buf parameter is invalid - EFAULT * - on an attempt to write to a pipe that is not open for reading - EPIPE */ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include...
google
android
write06
.c
platform/external/ltp/testcases/kernel/syscalls/write/write06.c
2,301
utf_8
91af3bec5b9587d2ed642c28bcbfe3fd
*/ /*\ * [Description] * * Test the write() system call with O_APPEND. * * The full description of O_APPEND is in open(2) man-pages: * The file is opened in append mode. Before each write(2), the * file offset is positioned at the end of the file, as if with lseek(2). * The modification of the file offset and...
google
android
write03
.c
platform/external/ltp/testcases/kernel/syscalls/write/write03.c
1,574
utf_8
f40f2e3d98548588060609a73f70aa68
* 04/2017 Modified by Jinhui Huang */ /* * DESCRIPTION * Testcase to check that write(2) doesn't corrupt a file when it fails * * ALGORITHM * Create a file for writing, write 100 bytes to it. Then make write(2) * fail with some erroneous parameter, close the fd. Then reopen the * file in RDONLY mode, and read ...
google
android
newuname01
.c
platform/external/ltp/testcases/kernel/syscalls/newuname/newuname01.c
7,643
utf_8
14d21b457e8e0089c2a3afa1f1f4fcfe
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ /******************************************************************************/ /***********************************************************************...
google
android
statfs02
.c
platform/external/ltp/testcases/kernel/syscalls/statfs/statfs02.c
2,342
utf_8
c0bdcdc55b9e35671787c6a9e7195b91
* 07/2001 Ported by Wayne Boyer * */ /*\ * [Description] * * Tests for failures: * * - ENOTDIR A component of the pathname, which is not a directory. * - ENOENT A filename which doesn't exist. * - ENAMETOOLONG A pathname which is longer than MAXNAMLEN. * - EFAULT A pathname pointer outside the address space ...
google
android
statfs03
.c
platform/external/ltp/testcases/kernel/syscalls/statfs/statfs03.c
908
utf_8
ee261a9a7ceca4feaae3a46404dcbc95
*/ /*\ * [Description] * * Verify that statfs(2) fails with errno EACCES when search permission * is denied for a component of the path prefix of path. */ #include <pwd.h> #include "tst_test.h" #define TEMP_DIR "testdir" #define TEMP_DIR2 TEMP_DIR"/subdir" static void setup(void) { struct passwd *ltpuser; SAFE_...
google
android
statfs01
.c
platform/external/ltp/testcases/kernel/syscalls/statfs/statfs01.c
863
utf_8
32556790e7fb4b6ec232890deefbbc21
*/ /*\ * [Description] * * Verify that statfs() syscall executes successfully on all * available filesystems. */ #include "tst_test.h" #define MNT_POINT "mntpoint" #define TEMP_FILE MNT_POINT"/testfile" #define TEXT "dummy text" static void setup(void) { int fd = SAFE_OPEN(TEMP_FILE, O_RDWR | O_CREAT, 0700); SA...
google
android
io_getevents02
.c
platform/external/ltp/testcases/kernel/syscalls/io_getevents/io_getevents02.c
1,116
utf_8
f6b9f3e65735c5d77744ade3740c10a7
*/ /*\ * [Description] * * Test io_getevents invoked via libaio with invalid ctx and expects it to * return -EINVAL. */ #include "config.h" #include "tst_test.h" #ifdef HAVE_LIBAIO #include <libaio.h> static void run(void) { io_context_t ctx; memset(&ctx, 0, sizeof(ctx)); TEST(io_getevents(ctx, 0, 0, NULL, NUL...
google
android
io_getevents01
.c
platform/external/ltp/testcases/kernel/syscalls/io_getevents/io_getevents01.c
768
utf_8
27059f8a6950d095fd12393552902ab1
*/ /*\ * [Description] * * Test io_getevents invoked via syscall(2) with invalid ctx and expects it to * return EINVAL. */ #include <linux/aio_abi.h> #include "config.h" #include "tst_test.h" #include "lapi/syscalls.h" static void run(void) { aio_context_t ctx; memset(&ctx, 0, sizeof(ctx)); TST_EXP_FAIL2(tst_s...
google
android
alarm06
.c
platform/external/ltp/testcases/kernel/syscalls/alarm/alarm06.c
806
utf_8
45da338f1cf58b7b001fa9d91b133f20
* Ported to LTP: Wayne Boyer */ /*\ * [Description] * * Verify that any pending alarm() is canceled when seconds is zero. */ #include "tst_test.h" static volatile int alarms_received; static void sigproc(int sig) { if (sig == SIGALRM) alarms_received++; } static void setup(void) { SAFE_SIGNAL(SIGALRM, sigproc...
google
android
alarm07
.c
platform/external/ltp/testcases/kernel/syscalls/alarm/alarm07.c
862
utf_8
4ab97c16e60b102550819e08c8d23610
*/ /*\ * [Description] * * Verify that SIGALRM signal scheduled by alarm() in the parent process * is not delivered to the child process. */ #include <stdlib.h> #include "tst_test.h" static volatile int alarm_cnt; static void verify_alarm(void) { pid_t pid; alarm_cnt = 0; TST_EXP_PASS_SILENT(alarm(1)); pid = ...
google
android
alarm03
.c
platform/external/ltp/testcases/kernel/syscalls/alarm/alarm03.c
687
utf_8
d53d7f7b47d7c0f86d99398912235ea5
*/ /*\ * [Description] * * Verify that alarms created by alarm() are not inherited by children * created via fork. */ #include <stdlib.h> #include "tst_test.h" static void verify_alarm(void) { pid_t pid; TST_EXP_PASS_SILENT(alarm(100)); pid = SAFE_FORK(); if (pid == 0) { TST_EXP_PASS(alarm(0), "alarm(0) in ...
google
android
alarm05
.c
platform/external/ltp/testcases/kernel/syscalls/alarm/alarm05.c
969
utf_8
adc935e92da399e7c62544fb34b56cca
*/ /*\ * [Description] * * The return value of the alarm system call should be equal to the * amount previously remaining in the alarm clock. * A SIGALRM signal should be received after the specified amount of * time has elapsed. */ #include "tst_test.h" static volatile int alarms_fired; static void run(voi...
google
android
alarm02
.c
platform/external/ltp/testcases/kernel/syscalls/alarm/alarm02.c
1,156
utf_8
3ce355ea4efc7062ad9c0063b329ac3e
*/ /*\ * [Description] * * Verify that alarm() returns: * - zero when there was no previously scheduled alarm * - number of seconds remaining until any previously scheduled alarm */ #include "tst_test.h" static volatile int alarms_received; static struct tcase { char *str; unsigned int sec; } tcases[] = { {"I...
google
android
sigprocmask01
.c
platform/external/ltp/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
6,946
utf_8
b9f7e4f03f078ca10326cd2555280dc8
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Name: sigprocmask01 * * Test Description: * Verify that sigprocmask() succeeds to examine and change the calling * process's signal mask. * Also, verify that sigpending() succeeds to store signal mask that are...
google
android
mq_unlink01
.c
platform/external/ltp/testcases/kernel/syscalls/mq_unlink/mq_unlink01.c
2,665
utf_8
c409ffc6891e9dc51865793f4487e7c7
*/ #include <errno.h> #include <pwd.h> #include <mqueue.h> #include "tst_test.h" #include "tst_safe_posix_ipc.h" #define QUEUE_NAME "/test_mqueue" static uid_t euid; static struct passwd *pw; struct test_case { int as_nobody; char *qname; int ret; int err; }; static struct test_case tcase[] = { { .qname = QUEUE...
google
android
signalfd4_02
.c
platform/external/ltp/testcases/kernel/syscalls/signalfd4/signalfd4_02.c
8,684
ibm852
b18739f1eab430545d3b19e805c3d574
/******************************************************************************/ /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ /***********************************************************************...
google
android
signalfd4_01
.c
platform/external/ltp/testcases/kernel/syscalls/signalfd4/signalfd4_01.c
9,019
ibm852
96c2774cd6325036100b8a157bb93d06
/******************************************************************************/ /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ /***********************************************************************...
google
android
sysinfo01
.c
platform/external/ltp/testcases/kernel/syscalls/sysinfo/sysinfo01.c
4,552
utf_8
fb943751a744c8ffb6462d6faf61f530
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Name : sysinfo01 * * Test description * Verify that sysinfo() succeeds to get the system information and fills * the structure passed. * * Expected Result : * sysinfo() returns value 0 on success and the sysinf...
google
android
sysinfo03
.c
platform/external/ltp/testcases/kernel/syscalls/sysinfo/sysinfo03.c
1,866
utf_8
d07845faa11303df8fcafcfaab3b41ad
*/ /* Test if CLOCK_BOOTTIME namespace offset is applied to sysinfo uptime and that it's consistent with /proc/uptime as well. After a call to unshare(CLONE_NEWTIME) a new timer namespace is created, the process that has called the unshare() can adjust offsets for CLOCK_MONOTONIC and CLOCK_BOOTTIME for its c...
google
android
sysinfo02
.c
platform/external/ltp/testcases/kernel/syscalls/sysinfo/sysinfo02.c
3,385
utf_8
4496f93410d914c9896ce6cf0ba3962e
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Name : sysinfo02 * * Test description * Verify that sysinfo() returns the correct error for an invalid address structure. * * Expected Result : * sysinfo() returns value 0 on success and the sysinfo structure ...
google
android
sbrk02
.c
platform/external/ltp/testcases/kernel/syscalls/sbrk/sbrk02.c
2,155
utf_8
9fbbbbfebe08ccb613b9f0ef8ce57ca5
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* * DESCRIPTION * Check sbrk() with error condition that should produce ENOMEM. */ #include <errno.h> #include <unistd.h> #include "test.h" #define INC 16*1024*1024 char *TCID = "sbrk02"; int TST_TOTAL = 1; static void setup(void); static void sb...
google
android
sbrk01
.c
platform/external/ltp/testcases/kernel/syscalls/sbrk/sbrk01.c
2,611
utf_8
cc9689bdbdb56b6e95e7d2a251316b18
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, * Mountain View, CA 94043, or: * * http://www.sgi.com * * For further information regarding this notice, see: * * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ * */ ...
google
android
sbrk03
.c
platform/external/ltp/testcases/kernel/syscalls/sbrk/sbrk03.c
2,188
utf_8
5ccb86c337691371d13bfba73fb0c568
*/ /* * DESCRIPTION * * Total s390 2^31 addr space is 0x80000000. * * 0x80000000 - 0x10000000 = 0x70000000 * * 0x70000000 is a valid positive intptr_t and adding it to the current offset * produces a valid uintptr_t without overflow (since the MSB being set is OK), * but that is irrelevant for s390 since ...
google
android
writev05
.c
platform/external/ltp/testcases/kernel/syscalls/writev/writev05.c
6,183
utf_8
adcd39764be1b50c774277441d192e7a
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * NAME * writev05.c * * DESCRIPTION * These testcases are written to test writev() on sparse files. This * is same as writev02.c. But the initial write() with valid data is * done at the beginning of the file. * * US...
google
android
writev07
.c
platform/external/ltp/testcases/kernel/syscalls/writev/writev07.c
3,756
utf_8
cb080108f4e7af5dccc3f0e3b1d129d1
*/ /* * Test Description: * Verify writev() behaviour with partially valid iovec list. * Kernel <4.8 used to shorten write up to first bad invalid * iovec. Starting with 4.8, a writev with short data (under * page size) is likely to get shorten to 0 bytes and return * EFAULT. * * This test doesn't ...
google
android
writev03
.c
platform/external/ltp/testcases/kernel/syscalls/writev/writev03.c
3,528
utf_8
bd676f6b6bcee55327164b7159dc4909
*/ /*\ * [Description] * * Check for potential issues in writev() if the first iovec entry is NULL * and the next one is not present in RAM. This can result in a brief window * where writev() first writes uninitialized data into the file (possibly * exposing internal kernel structures) and then overwrites it wit...
google
android
writev01
.c
platform/external/ltp/testcases/kernel/syscalls/writev/writev01.c
2,815
utf_8
e16e5d7b0d555fc5d3b610023ef11772
* Linux Test Project, 2016 */ /* * DESCRIPTION * Testcase to check the basic functionality of writev(2) system call. * Create IO vectors and attempt to writev various components of it. */ #include <errno.h> #include <signal.h> #include <sys/uio.h> #include "tst_test.h" #define CHUNK 64 #define TE...
google
android
writev06
.c
platform/external/ltp/testcases/kernel/syscalls/writev/writev06.c
5,692
utf_8
4e1e170666204d5a51e9dfe9400177b9
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * NAME * writev06.c * * DESCRIPTION * These testcases are written to test fault in pages readable * feature in generic write path. Because before actual write * kernel may want check is buffer passed is realy readable. * ...
google
android
writev02
.c
platform/external/ltp/testcases/kernel/syscalls/writev/writev02.c
5,538
utf_8
3397b6b5ece18ad840528cfa4ee05cfa
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * NAME * writev02.c * * DESCRIPTION * In these testcases, writev() is called with partially valid data * to be written in a sparse file. * * ALGORITHM * The file is created and write() is called with valid buffer to ...
google
android
io_uring02
.c
platform/external/ltp/testcases/kernel/syscalls/io_uring/io_uring02.c
6,499
utf_8
66f985057e844629f58f7ae80f8b01b2
* Date: Fri Feb 7 16:05:21 2020 -0700 * * io_uring: grab ->fs as part of async preparation * * stable 5.4 specific backport: * * commit c4a23c852e80a3921f56c6fbc851a21c84a6d06b * Date: Wed Jan 27 14:34:43 2021 +0100 */ #include <stdio.h> #include <sys/socket.h> #include <sys/un.h> #include "tst_test.h"...
google
android
io_uring01
.c
platform/external/ltp/testcases/kernel/syscalls/io_uring/io_uring01.c
6,574
utf_8
75fe963244e57b77d10e783b61383da7
* * Tests for asynchronous I/O raw API i.e io_uring_setup(), io_uring_register() * and io_uring_enter(). This tests validate basic API operation by creating a * submission queue and a completion queue using io_uring_setup(). User buffer * registered in the kernel for long term operation using io_uring_register(). ...
google
android
setrlimit03
.c
platform/external/ltp/testcases/kernel/syscalls/setrlimit/setrlimit03.c
1,766
utf_8
6ba0ef3227414cd4f6933de24da23ef0
* beyond the system limit. * 2) Test for EINVAL when rlim->rlim_cur is greater than rlim->rlim_max. */ #include <errno.h> #include <sys/time.h> #include <sys/resource.h> #include <linux/fs.h> #include "tst_test.h" #if !defined(NR_OPEN) // Taken from definition in /usr/include/linux/fs.h # define NR_OPEN (1024*1...
google
android
setrlimit01
.c
platform/external/ltp/testcases/kernel/syscalls/setrlimit/setrlimit01.c
7,026
utf_8
fc765a4f96e295a54dba9c7d65a79dfc
/* * * conditions. * * 07/2001 Ported by Wayne Boyer */ #include <sys/types.h> #include <sys/resource.h> #include <sys/stat.h> #include <sys/time.h> #include <sys/wait.h> #include <errno.h> #include <fcntl.h> #include <stdlib.h> #include <unistd.h> #include "test.h" #include "safe_macros.h" char *TCID = "setrlimit...
google
android
setrlimit05
.c
platform/external/ltp/testcases/kernel/syscalls/setrlimit/setrlimit05.c
1,470
utf_8
cc5f0f3c3ca9da8da6660bfb289098ea
*/ /* * Test for EFAULT when rlim points outside the accessible address space. */ #define _GNU_SOURCE #include <errno.h> #include <sys/resource.h> #include <sys/time.h> #include <sys/wait.h> #include <stdlib.h> #include "tst_test.h" static void *bad_addr; static void verify_setrlimit(void) { int status; pid_t pid;...
google
android
setrlimit06
.c
platform/external/ltp/testcases/kernel/syscalls/setrlimit/setrlimit06.c
2,378
utf_8
e8ef9c5ba2d94453637de8c6c647222e
*/ /* * Description: * Set CPU time limit for a process and check its behavior * after reaching CPU time limit. * 1) Process got SIGXCPU after reaching soft limit of CPU time. * 2) Process got SIGKILL after reaching hard limit of CPU time. * * Note: * This is also a regression test for the following kernel bug...
google
android
setrlimit04
.c
platform/external/ltp/testcases/kernel/syscalls/setrlimit/setrlimit04.c
1,316
utf_8
380445dc87b64c58d955417760d3a34e
* * Attempt to run a trivial binary with stack < 1MB. * * Early patches for stack guard gap caused that gap size was * contributing to stack limit. This caused failures * for new processes (E2BIG) when ulimit was set to anything * lower than size of gap. commit 1be7107fbe18 "mm: larger * stack guard gap, betwee...
google
android
setrlimit02
.c
platform/external/ltp/testcases/kernel/syscalls/setrlimit/setrlimit02.c
1,267
utf_8
3141c0747d0f01089f4c5fe9502cc997
*/ /* * Testcase to test the different errnos set by setrlimit(2) system call. */ #include <pwd.h> #include <errno.h> #include "tst_test.h" static char nobody_uid[] = "nobody"; static struct rlimit rlim; static struct tcase { int resource; struct rlimit *rlim; int exp_errno; } tcases[] = { {-1, &rlim, EINVAL}, }...
google
android
mq_timedsend01
.c
platform/external/ltp/testcases/kernel/syscalls/mq_timedsend/mq_timedsend01.c
4,592
utf_8
854ba3d107e98e2f4c446278eab88362
*/ #include <errno.h> #include <limits.h> static int fd, fd_root, fd_nonblock, fd_maxint = INT_MAX - 1, fd_invalid = -1; #include "mq_timed.h" static struct tst_ts ts; static void *bad_addr; static struct test_case tcase[] = { { .fd = &fd, .len = 0, .ret = 0, .err = 0, }, { .fd = &fd, .len = 1, .ret =...
google
android
setitimer01
.c
platform/external/ltp/testcases/kernel/syscalls/setitimer/setitimer01.c
4,398
utf_8
59d7f4ff3f1be53abc369072c07802d5
* 03/2001 - Written by Wayne Boyer */ /*\ * [Description] * * Spawn a child, verify that setitimer() syscall passes and it ends up * counting inside expected boundaries. Then verify from the parent that * the syscall sent the correct signal to the child. */ #include <time.h> #include <errno.h> #include <sys/tim...
google
android
setitimer02
.c
platform/external/ltp/testcases/kernel/syscalls/setitimer/setitimer02.c
1,333
utf_8
82f5731d249ece2b3cf737eaa37fabc7
* 03/2001 - Written by Wayne Boyer * */ /*\ * [Description] * * Check that setitimer() call fails: * * 1. EFAULT with invalid itimerval pointer * 2. EINVAL when called with an invalid first argument */ #include <errno.h> #include <sys/time.h> #include <stdlib.h> #include "tst_test.h" #include "lapi/syscalls.h...
google
android
string01
.c
platform/external/ltp/testcases/kernel/syscalls/string/string01.c
9,121
utf_8
29959fb3f528a23a6442906e8122826f
/* * /* * NAME * string01.c - check string functions. * * CALLS * strchr, strrchr, strcat, strcmp, strcpy, strlen, * strncat, strncmp, strncpy * * ALGORITHM * Test functionality of the string functions: * (strchr, strrchr, strcat, strcmp, strcpy, strlen, * strncat, strncmp, strncpy ) * */ #include <...
google
android
stime02
.c
platform/external/ltp/testcases/kernel/syscalls/stime/stime02.c
1,297
utf_8
a4117fff4d084cc543ab08b0e045d554
* * Test Description: * Verify that the system call stime() fails to set the system's idea * of data and time if invoked by "non-root" user. * * Expected Result: * stime() should fail with return value -1 and set errno to EPERM. * * History * 07/2001 John George * -Ported */ #include <sys/types.h> #in...
google
android
stime01
.c
platform/external/ltp/testcases/kernel/syscalls/stime/stime01.c
1,430
utf_8
486178f0ee5ca8daef5d337c28fe391a
* * Test Description: * Verify that the system call stime() successfully sets the system's idea * of date and time if invoked by "root" user. * * Expected Result: * stime() should succeed to set the system data/time to the specified time. * * History * 07/2001 John George * -Ported */ #include <time.h> ...
google
android
waitpid02
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid02.c
3,778
utf_8
aea50f354db2e5882c02a5f9388212f4
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * NAME * waitpid02.c * * DESCRIPTION * Check that when a child gets killed by an integer zero * divide exception, the waiting parent is correctly notified. * * ALGORITHM * Fork a child and send a SIGFPE to it. The pa...
google
android
waitpid13
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid13.c
1,861
utf_8
f8ab7e9816b3a69bf0483404ff37f6a5
/* * along with this program. * * History * 07/2001 John George * -Ported * 04/2002 wjhuie sigset cleanups */ /* * DESCRIPTION * Tests to see if pids returned from fork and waitpid are same * * ALGORITHM * Check proper functioning of waitpid with pid = 0 and < -1 with arg * WUNTRACED */ #include "wa...
google
android
waitpid08
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid08.c
1,667
utf_8
07c9ef39d58c70a2f2b3acc269697d76
/* * along with this program. * * History * 07/2001 John George * -Ported * 04/2002 wjhuie sigset cleanups */ /* * DESCRIPTION * Tests to see if pids returned from fork and waitpid are same. * * ALGORITHM * Check proper functioning of waitpid with pid = -1 and arg = * WUNTRACED */ #include "waitpid_...
google
android
waitpid06
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid06.c
1,482
utf_8
36b7e213ed95496313b991ff876d9bbf
/* * along with this program. * * History * 07/2001 John George * -Ported * 04/2002 wjhuie sigset cleanups */ /* * DESCRIPTION * Tests to see if pids returned from fork and waitpid are same. * * ALGORITHM * Check proper functioning of waitpid with pid = -1 and arg = 0 */ #include "waitpid_common.h" s...
google
android
waitpid11
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid11.c
1,677
utf_8
dfd5f9a2a4e94f20773b30f58bfa2adb
/* * along with this program. * * History * 07/2001 John George * -Ported * 04/2002 wjhuie sigset cleanups */ /* * DESCRIPTION * Tests to see if pids returned from fork and waitpid are same * * ALGORITHM * Check proper functioning of waitpid with pid = 0 and < -1 with arg 0 */ #include "waitpid_commo...
google
android
waitpid07
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid07.c
1,632
utf_8
2cbe486f2b00d6c656f51011329344f1
/* * along with this program. * * History * 07/2001 John George * -Ported * 04/2002 wjhuie sigset cleanups */ /* * DESCRIPTION * Tests to see if pids returned from fork and waitpid are same. * * ALGORITHM * Check proper functioning of waitpid with pid = -1 and arg = WNOHANG */ #include "waitpid_commo...
google
android
waitpid04
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid04.c
3,338
utf_8
b1822e99df3761908da8f0ef262b8310
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * NAME * waitpid04.c * * DESCRIPTION * test to check the error conditions in waitpid sys call * * USAGE: <for command-line> * waitpid04 [-c n] [-e] [-i n] [-I x] [-P x] [-t] * -e : Turn on errno ...
google
android
waitpid12
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid12.c
1,896
utf_8
e8b9a7c106645001a975c27f36f1fd68
/* * along with this program. * * History * 07/2001 John George * -Ported * 04/2002 wjhuie sigset testx for SIG_ERR not < 0, TPASS|TFAIL issued * 04/2002 wjhuie sigset cleanups */ /* * DESCRIPTION * Tests to see if pids returned from fork and waitpid are same * * ALGORITHM * Check proper functio...
google
android
waitpid01
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid01.c
1,261
utf_8
c560dcca209c2b918f6ba8508f328c3c
*/ /* * Check that when a child kills itself by SIGALRM the waiting parent is * correctly notified. * * Fork a child that raises(SIGALRM), the parent checks that SIGALRM was * returned. */ #include <stdlib.h> #include <sys/wait.h> #include "tst_test.h" static void run(void) { pid_t pid; int status; pid = SAFE...
google
android
waitpid03
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid03.c
4,367
utf_8
4763ed34f3ca8ede72bf8c7e7c7a8c85
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * NAME * waitpid03.c * * DESCRIPTION * Check that parent waits unitl specific child has returned. * * ALGORITHM * Parent forks numerous (22 = MAXUPRC - 3) children, and starts waits : * Should only wait for the speci...
google
android
waitpid09
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid09.c
2,967
utf_8
62cbe47b9cdc97124935fe9aa5eb8a6b
*/ /* * case 0: * waitpid(pid, WNOHANG) should return 0 if there is a running child * case 1: * waitpid(pid, WNOHANG) should return the pid of the child if * the child has exited * case 2: * waitpid(-1, 0) should return -1 with ECHILD if * there are no children to wait for. ...
google
android
waitpid10
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid10.c
2,432
utf_8
b72cf5aba72d0cabfcca97781398d2db
/* * along with this program. */ /* * Tests to see if pids returned from fork and waitpid are same * * Fork 8 kids, 2 will immediately exit, 2 will sleep, 2 will be compute bound * and 2 will fork/reap a child for 50 times. */ #include "waitpid_common.h" static void do_compute(void); static void do_fork(void); s...