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
waitpid05
.c
platform/external/ltp/testcases/kernel/syscalls/waitpid/waitpid05.c
5,713
utf_8
68bda5ad7f27d724ee0dc70e80753a19
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * NAME * waitpid05.c * * DESCRIPTION * Check that when a child kills itself with a kill statement after * determining its process id by using getpid, the parent receives a * correct report of the cause of its death. Th...
google
android
ioperm02
.c
platform/external/ltp/testcases/kernel/syscalls/ioperm/ioperm02.c
2,175
utf_8
ccc2387c0dc8bbb514453429b280e7bd
*/ #include <stdlib.h> #include <errno.h> #include <unistd.h> #include <pwd.h> #include "tst_test.h" #include "tst_safe_macros.h" #if defined __i386__ || defined(__x86_64__) #include <sys/io.h> #define NUM_BYTES 3 #ifndef IO_BITMAP_BITS #define IO_BITMAP_BITS 1024 /* set to default value since some H/W may not support...
google
android
ioperm01
.c
platform/external/ltp/testcases/kernel/syscalls/ioperm/ioperm01.c
1,499
utf_8
6ba09fcf08f36edb85bc59f9615fdce1
*/ #include <errno.h> #include <unistd.h> #include "tst_test.h" #if defined __i386__ || defined(__x86_64__) #include <sys/io.h> unsigned long io_addr; #define NUM_BYTES 3 #ifndef IO_BITMAP_BITS #define IO_BITMAP_BITS 1024 #endif static void verify_ioperm(void) { TEST(ioperm(io_addr, NUM_BYTES, 1)); if (TST_RET == -1...
google
android
exit_group01
.c
platform/external/ltp/testcases/kernel/syscalls/exit_group/exit_group01.c
2,432
utf_8
ba3f06d54283afe28ef9adfcb610b734
/****************************************************************************** * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * * ******************************************************************************/...
google
android
getresgid02
.c
platform/external/ltp/testcases/kernel/syscalls/getresgid/getresgid02.c
5,011
utf_8
0697eb1c46224a496fb5d88674311bda
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Name: getresgid02 * * Test Description: * Verify that getresgid() will be successful to get the real, effective * and saved user ids after calling process invokes setregid() to change * the effective/saved gid...
google
android
getresgid01
.c
platform/external/ltp/testcases/kernel/syscalls/getresgid/getresgid01.c
4,053
utf_8
68398890638eecdbab8c48b5621b21de
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Name: getresgid01 * * Test Description: * Verify that getresgid() will be successful to get the real, effective * and saved user id of the calling process. * * Expected Result: * getresgid() should return wi...
google
android
getresgid03
.c
platform/external/ltp/testcases/kernel/syscalls/getresgid/getresgid03.c
5,224
utf_8
5618c93b42ca16f34a9a1f18d38e7232
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Name: getresgid03 * * Test Description: * Verify that getresgid() will be successful to get the real, effective * and saved user ids after calling process invokes setresgid() to change * the effective gid to t...
google
android
clone301
.c
platform/external/ltp/testcases/kernel/syscalls/clone3/clone301.c
3,768
utf_8
029db4d107b1ffeb086064c989bb8c29
*/ /*\ * [Description] * * Basic clone3() test. */ #define _GNU_SOURCE #include <stdlib.h> #include <sys/wait.h> #include "tst_test.h" #include "lapi/sched.h" #include "lapi/pidfd.h" #define CHILD_SIGNAL SIGUSR1 #define DATA 777 static int pidfd, child_tid, parent_tid, parent_received_signal; static volatile int c...
google
android
clone302
.c
platform/external/ltp/testcases/kernel/syscalls/clone3/clone302.c
3,251
utf_8
30fdb212eaddf54020581d0adfc6ac7a
*/ /*\ * [Description] * * Basic clone3() test to check various failures. */ #define _GNU_SOURCE #include <stdlib.h> #include "tst_test.h" #include "lapi/sched.h" static struct clone_args *valid_args, *invalid_args; unsigned long stack; static int *invalid_address; static struct tcase { const char *name; struct ...
google
android
fgetxattr02
.c
platform/external/ltp/testcases/kernel/syscalls/fgetxattr/fgetxattr02.c
6,855
utf_8
b6a2c242edf881e7750cb54d30afb1cd
*/ /* * In the user.* namespace, only regular files and directories can * have extended attributes. Otherwise fgetxattr(2) will return -1 * and set proper errno. * * There are 7 test cases: * * 1. Get attribute from a regular file: * - fgetxattr(2) should succeed * - checks returned value to be the same...
google
android
fgetxattr03
.c
platform/external/ltp/testcases/kernel/syscalls/fgetxattr/fgetxattr03.c
1,548
utf_8
c408f767d7945238dfd2f79adb29dfbc
*/ /* * An empty buffer of size zero can be passed into fgetxattr(2) to return * the current size of the named extended attribute. */ #include "config.h" #include <sys/types.h> #include <sys/stat.h> #include <sys/wait.h> #include <errno.h> #include <fcntl.h> #include <unistd.h> #include <signal.h> #include <stdio.h...
google
android
fgetxattr01
.c
platform/external/ltp/testcases/kernel/syscalls/fgetxattr/fgetxattr01.c
3,364
utf_8
3054ba679a31d08e72c72ee9ed437dc8
*/ /* * Basic tests for fgetxattr(2) and make sure fgetxattr(2) handles error * conditions correctly. * * There are 3 test cases: * 1. Get an non-existing attribute: * - fgetxattr(2) should return -1 and set errno to ENODATA * 2. Buffer size is smaller than attribute value size: * - fgetxattr(2) should...
google
android
sighold02
.c
platform/external/ltp/testcases/kernel/syscalls/sighold/sighold02.c
2,061
utf_8
584c9f035faccde096abdc87b5635f3a
* 1. sighold action to turn off the receipt of all signals was done without error. * 2. After signals were held, and sent, no signals were trapped. */ #define _XOPEN_SOURCE 600 #include <signal.h> #include "tst_test.h" #ifndef NSIG # define NSIG _NSIG #endif #ifndef NUMSIGS # define NUMSIGS NSIG #endif static int si...
google
android
mount_setattr01
.c
platform/external/ltp/testcases/kernel/syscalls/mount_setattr/mount_setattr01.c
3,269
utf_8
4ab46b8b3a25df86d77018a28b5c3d34
*/ /*\ * [Description] * * Basic mount_setattr() test. * Test whether the basic mount attributes are set correctly. * * Verify some MOUNT_SETATTR(2) attributes: * * - MOUNT_ATTR_RDONLY - makes the mount read-only * - MOUNT_ATTR_NOSUID - causes the mount not to honor the * set-user-ID and set-group-ID mode ...
google
android
unlinkat01
.c
platform/external/ltp/testcases/kernel/syscalls/unlinkat/unlinkat01.c
2,475
utf_8
568ce2e001743cf5097b92a767193e1b
*/ /*\ * [Description] * Basic unlinkat() test. */ #include "tst_test.h" #include "lapi/syscalls.h" #include "tst_safe_stdio.h" #include "lapi/fcntl.h" static const char pathname[] = "unlinkattestdir", subpathname[] = "unlinkatsubtestdir", subpathdir[] = "unlinkattestdir/unlinkatsubtestdir", testfile[] ...
google
android
ulimit01
.c
platform/external/ltp/testcases/kernel/syscalls/ulimit/ulimit01.c
6,560
utf_8
e0a2f94cc401a871f93a0263c7e69ade
/* * 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
statvfs01
.c
platform/external/ltp/testcases/kernel/syscalls/statvfs/statvfs01.c
1,458
utf_8
e4c21fb282e751ee3b15fc6eb1bec3e0
*/ /*\ * [Description] * * Verify that statvfs() executes successfully for all * available filesystems. Verify statvfs.f_namemax field * by trying to create files of valid and invalid length names. */ #include <sys/statvfs.h> #include "tst_test.h" #define MNT_POINT "mntpoint" #define TEST_PATH MNT_POINT"/testfil...
google
android
statvfs02
.c
platform/external/ltp/testcases/kernel/syscalls/statvfs/statvfs02.c
1,595
utf_8
1644bfb9bea37725f6e02be871f611ee
*/ /*\ * [Description] * * Verify that statvfs() fails with: * - EFAULT when path points to an invalid address. * - ELOOP when too many symbolic links were encountered in translating path. * - ENAMETOOLONG when path is too long. * - ENOENT when the file referred to by path does not exist. * - ENOTDIR a compone...
google
android
swapoff02
.c
platform/external/ltp/testcases/kernel/syscalls/swapoff/swapoff02.c
2,196
utf_8
965fd88e53909b3df1a24d918195b4b2
*/ /*\ * [Description] * * This test case checks whether swapoff(2) system call returns * 1. EINVAL when the path does not exist * 2. ENOENT when the path exists but is invalid * 3. EPERM when user is not a superuser */ #include <errno.h> #include <pwd.h> #include "tst_test.h" #include "lapi/syscalls.h" #in...
google
android
swapoff01
.c
platform/external/ltp/testcases/kernel/syscalls/swapoff/swapoff01.c
1,288
utf_8
5b90e7ed23e3a36a68a00ece0fc235d5
*/ /*\ * [Description] * * Check that swapoff() succeeds. */ #include <unistd.h> #include <errno.h> #include <stdlib.h> #include "tst_test.h" #include "lapi/syscalls.h" #include "libswap.h" static void verify_swapoff(void) { if (tst_syscall(__NR_swapon, "./swapfile01", 0) != 0) { tst_res(TFAIL | TERRNO, "Failed...
google
android
mq_timedreceive01
.c
platform/external/ltp/testcases/kernel/syscalls/mq_timedreceive/mq_timedreceive01.c
3,900
utf_8
5e480698d553a3c2b65c9847d8200a3d
*/ #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, .send = 1, .ret = 0, .err = 0, }, { .fd = &fd, .len ...
google
android
llistxattr02
.c
platform/external/ltp/testcases/kernel/syscalls/llistxattr/llistxattr02.c
2,268
utf_8
fe8cce18e164964b6f737f971b59f13d
*/ /* * Test Name: llistxattr02 * * Description: * 1) llistxattr(2) fails if the size of the list buffer is too small * to hold the result. * 2) llistxattr(2) fails if path is an empty string. * 3) llistxattr(2) fails when attempted to read from a invalid address. * 4) llistxattr(2) fails if path is longer than allowed...
google
android
llistxattr01
.c
platform/external/ltp/testcases/kernel/syscalls/llistxattr/llistxattr01.c
1,999
utf_8
98af3646de9f90ca509c89ce239f0221
*/ /* * Test Name: llistxattr01 * * Description: * The testcase checks the basic functionality of the llistxattr(2). * llistxattr(2) retrieves the list of extended attribute names * associated with the link itself in the filesystem. * */ #include "config.h" #include <errno.h> #include <sys/types.h> #include <string.h> ...
google
android
llistxattr03
.c
platform/external/ltp/testcases/kernel/syscalls/llistxattr/llistxattr03.c
1,659
utf_8
db32399429d64d0b8baa1dceaa25c9a2
*/ /* * Test Name: llistxattr03 * * Description: * llistxattr 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
execvp01
.c
platform/external/ltp/testcases/kernel/syscalls/execvp/execvp01.c
778
utf_8
b77f13fbc75f5016b6c5026f82f3a7b0
* AUTHOR : William Roske * CO-PILOT : Dave Fenner */ #include <sys/types.h> #include <sys/wait.h> #include <errno.h> #include <string.h> #include <signal.h> #include <stdlib.h> #include "tst_test.h" static void verify_execvp(void) { pid_t pid; char *const args[] = {"execvp01_child", "canary", NULL}; pid =...
google
android
execvp01_child
.c
platform/external/ltp/testcases/kernel/syscalls/execvp/execvp01_child.c
465
utf_8
aab9397c5a397f677681285940931e41
*/ #define TST_NO_DEFAULT_MAIN #include "tst_test.h" int main(int argc, char *argv[]) { tst_reinit(); if (argc != 2) tst_brk(TFAIL, "argc is %d, expected 2", argc); if (strcmp(argv[1], "canary")) tst_brk(TFAIL, "argv[1] is %s, expected 'canary'", argv[1]); tst_res(TPASS, "%s executed", argv[0]); return 0; }
google
android
setfsgid01
.c
platform/external/ltp/testcases/kernel/syscalls/setfsgid/setfsgid01.c
903
utf_8
7448e3d877bead2e0b421dc39340d809
*/ /*\ * [Description] * * Verify that setfsgid() correctly updates the filesystem group ID * to the value given in fsgid argument. */ #include <pwd.h> #include <unistd.h> #include "tst_test.h" #include "compat_tst_16.h" static gid_t nobody_gid; static void setup(void) { struct passwd *nobody; nobody = SAFE_GET...
google
android
setfsgid03
.c
platform/external/ltp/testcases/kernel/syscalls/setfsgid/setfsgid03.c
2,373
utf_8
84a8fe61d89a8b348e1c23d4cbd6699c
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Testcase to check the basic functionality of setfsgid(2) system * call fails when called by a non-root user. */ #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <errno.h> #include <pwd.h> #include <grp.h...
google
android
setfsgid02
.c
platform/external/ltp/testcases/kernel/syscalls/setfsgid/setfsgid02.c
1,503
utf_8
a2c25b7796addffd943813ec520d69d0
*/ /*\ * [Description] * * Testcase for setfsgid() syscall to check that * * - privileged user can change a filesystem group ID different from saved * value of previous setfsgid() call * - unprivileged user cannot change it */ #include <pwd.h> #include "tst_test.h" #include "compat_tst_16.h" static gid_t gid;...
google
android
gettid01
.c
platform/external/ltp/testcases/kernel/syscalls/gettid/gettid01.c
2,107
utf_8
4ae22768169db2c4e1f63316e545c2d6
/* * Crackerjack Project * #include <sys/types.h> #include <linux/unistd.h> #include <errno.h> #include "test.h" void setup(); void cleanup(); char *TCID = "gettid01"; int TST_TOTAL = 1; pid_t my_gettid(void) { return (pid_t) syscall(__NR_gettid); } int main(int ac, char **av) { int lc; tst_parse_opts(ac, av, NULL...
google
android
fmtmsg01
.c
platform/external/ltp/testcases/kernel/syscalls/fmtmsg/fmtmsg01.c
6,086
utf_8
4343497f8b695a65bc375d2c9931911e
/* * /* * fmtmsg(3C) and addseverity(3C) * * ALGORITHM * Check basic functionality using various messages and severity levels. */ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <ctype.h> #include <stdio.h> #if !defined(__UCLIBC__) #include <fmtmsg.h> /* interface definition */ #end...
google
android
pwritev202
.c
platform/external/ltp/testcases/kernel/syscalls/pwritev2/pwritev202.c
2,613
utf_8
ddd9d3ccc1feec614713aeac95b0ed49
*/ /* * Description: * Check various errnos for pwritev2(2). * 1) pwritev2() fails and sets errno to EINVAL if iov_len is invalid. * 2) pwritev2() fails and sets errno to EINVAL if the vector count iovcnt is * less than zero. * 3) pwritev2() fails and sets errno to EOPNOTSUPP if flag is invalid. * 4) pwritev...
google
android
pwritev201
.c
platform/external/ltp/testcases/kernel/syscalls/pwritev2/pwritev201.c
2,666
utf_8
af5770ca1ab6ee3e35bf36e6450ab777
*/ /* * Description: * Testcase to check the basic functionality of the pwritev2(2). * 1) If the file offset argument is not -1, pwritev2() should succeed * in writing the expected content of data and the file offset is * not changed after writing. * 2) If the file offset argument is -1, pwritev2() should ...
google
android
flock04
.c
platform/external/ltp/testcases/kernel/syscalls/flock/flock04.c
2,032
utf_8
72787872709a21f77c14ed476815746f
* Author: Vatsal Avasthi * * Test Description: * This test verifies that flock() behavior with different locking * combinations along with LOCK_SH and LOCK_EX: * 1) flock() succeeded in acquiring shared lock on shared lock file. * 2) flock() failed to acquire exclusive lock on shared lock file. * 3) flock() f...
google
android
flock03
.c
platform/external/ltp/testcases/kernel/syscalls/flock/flock03.c
2,070
utf_8
30daadf3ceb886a355a4e84324d703d6
* Author: Cyril Hrubis * * Test Description: * This test verifies that flock() cannot unlock a file locked by another * task. * * Test Steps: * Fork a child processes The parent flocks a file with LOCK_EX Child waits * for that to happen, then checks to make sure it is locked. Child then * tries to unlo...
google
android
flock02
.c
platform/external/ltp/testcases/kernel/syscalls/flock/flock02.c
1,552
utf_8
21490d4b12f8e1d09d26f54a220f6960
* Author: Vatsal Avasthi * * Test Description: * 1) flock() returns -1 and sets error number to EBADF if the file descriptor * is invalid. * 2) flock() returns -1 and sets error number to EINVAL if the argument * operation does not include LOCK_SH,LOCK_EX,LOCK_UN. * 3) flock() returns -1 and sets err...
google
android
flock01
.c
platform/external/ltp/testcases/kernel/syscalls/flock/flock01.c
1,043
utf_8
b90fcb4e2f9b0b4ced063ea3d0d161f4
* Author: Vatsal Avasthi * * Test Description: * This test verifies that flock() succeeds with all kind of locks. */ #include <errno.h> #include <sys/file.h> #include "tst_test.h" static int fd = -1; static struct tcase { int operation; char *opt; } tcases[] = { {LOCK_SH, "Shared Lock" }, {LOCK_UN, "Unlock"},...
google
android
flock06
.c
platform/external/ltp/testcases/kernel/syscalls/flock/flock06.c
1,744
utf_8
b610ed05b3b19af3f2076840dec3d3bc
* Author: Matthew Wilcox * * Test Description: * This test verifies that flock locks held on one fd conflict with flock * locks held on a different fd. * * Test Steps: * The process opens two file descriptors on the same file. It acquires * an exclusive flock on the first descriptor, checks that attemptin...
google
android
fchmodat01
.c
platform/external/ltp/testcases/kernel/syscalls/fchmodat/fchmodat01.c
2,303
utf_8
e3ea7599c318994941458821b26b7054
*/ /*\ * [Description] * * This test case will verify basic function of fchmodat. */ #define _GNU_SOURCE #include <unistd.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include "tst_test.h" #include "lapi/syscalls.h" #ifndef AT_FDCWD #define AT_FDCWD -100 #endif static char pathname[256]; static ch...
google
android
lgetxattr02
.c
platform/external/ltp/testcases/kernel/syscalls/lgetxattr/lgetxattr02.c
2,195
utf_8
1038f48fc643f7adccba87fb9e3d93d1
*/ /* * Test Name: lgetxattr02 * * Description: * 1) lgetxattr(2) fails if the named attribute does not exist. * 2) lgetxattr(2) fails if the size of the value buffer is too small * to hold the result. * 3) lgetxattr(2) fails when attemptes to read from a invalid address. * * Expected Result: * 1) lgetxattr(2) shoul...
google
android
lgetxattr01
.c
platform/external/ltp/testcases/kernel/syscalls/lgetxattr/lgetxattr01.c
2,329
utf_8
925deeec77864dd95402d14a1e8cd944
*/ /* * Test Name: lgetxattr01 * * Description: * The testcase checks the basic functionality of the lgetxattr(2). * In the case of a symbolic link, we only get the value of the * extended attribute related to the link itself by name. * */ #include "config.h" #include <errno.h> #include <sys/types.h> #include <string.h...
google
android
sendmsg01
.c
platform/external/ltp/testcases/kernel/syscalls/sendmsg/sendmsg01.c
14,855
utf_8
c24be82783566b1478cf0c189b2fc901
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ /* * Test Name: sendmsg01 * * Test Description: * Verify that sendmsg() returns the proper errno for various failure cases * * HISTORY * 07/2001 Ported by Wayne Boyer * 05/2003 Modified by Manoj Iyer - Make setup fun...
google
android
sendmsg03
.c
platform/external/ltp/testcases/kernel/syscalls/sendmsg/sendmsg03.c
2,756
utf_8
e71089cec948d31cb245c973fbb9224e
* Date: Sun Dec 10 03:50:58 2017 +0000 * * net: ipv4: fix for a race condition in raw_sendmsg */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include "tst_test.h" #include "tst_fuzzy_sync.h" #define IOVEC_COUNT 4 #define PACKET_SIZE 100 static int sockfd = -1; static struct msghdr msg...
google
android
sendmsg02
.c
platform/external/ltp/testcases/kernel/syscalls/sendmsg/sendmsg02.c
5,479
utf_8
31687715b09d8ba750d4ddab21361752
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. */ /* * reproducer for: * BUG: unable to handle kernel NULL ptr deref in selinux_socket_unix_may_send * fixed in 3.9.0-0.rc5: * commit ded34e0fe8fe8c2d595bfa30626654e4b87621e0 * Date: Mon Mar 25 03:18:33 2013 +0000 * ...
google
android
setreuid06
.c
platform/external/ltp/testcases/kernel/syscalls/setreuid/setreuid06.c
1,269
utf_8
eee3f49c24545f9cd170e0c65d809b7e
*/ /*\ * [Description] * * Verify that setreuid(2) syscall fails with EPERM errno when the calling * process is not privileged and a change other than * (i) swapping the effective user ID with the real user ID, or * (ii) setting one to the value of the other or * (iii) setting the effective user ID to the value...
google
android
setreuid03
.c
platform/external/ltp/testcases/kernel/syscalls/setreuid/setreuid03.c
2,848
utf_8
bba05a2ded08a7535b29180eceb8b469
*/ /*\ * [Description] * * Test setreuid() when executed by an unpriviledged user. */ #include <sys/types.h> #include <pwd.h> #include "tst_test.h" #include "tst_uid.h" #include "compat_tst_16.h" static uid_t root_uid, nobody_uid, other_uid, neg_one = -1; static struct test_data_t { uid_t *real_uid; uid_t *eff_u...
google
android
setreuid04
.c
platform/external/ltp/testcases/kernel/syscalls/setreuid/setreuid04.c
3,482
utf_8
1e006f331879053f7b91b605781b7389
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Ported by John George */ /* * Test that root can change the real and effective uid to an * unpriviledged user. */ #include <errno.h> #include <stdlib.h> #include <pwd.h> #include <sys/wait.h> #include "test.h" #include "compat_...
google
android
setreuid02
.c
platform/external/ltp/testcases/kernel/syscalls/setreuid/setreuid02.c
2,064
utf_8
0d1a54db2a254dc626bc353075eb8919
*/ /*\ * [Description] * * Test setreuid() when executed by root. */ #include <sys/types.h> #include <pwd.h> #include "tst_test.h" #include "tst_uid.h" #include "compat_tst_16.h" static uid_t root_uid, nobody_uid, other_uid, neg_one = -1; static struct test_data_t { uid_t *real_uid; uid_t *eff_uid; uid_t *exp_r...
google
android
setreuid05
.c
platform/external/ltp/testcases/kernel/syscalls/setreuid/setreuid05.c
3,065
utf_8
bb002d2a255afb93b9c5abc85ead5952
*/ /*\ * [Description] * * Test the setreuid() feature, verifying the role of the saved-set-uid * and setreuid's effect on it. */ #include <sys/types.h> #include <pwd.h> #include <stdlib.h> #include "tst_test.h" #include "tst_uid.h" #include "compat_tst_16.h" static uid_t root_uid, nobody_uid, main_uid, other_uid...
google
android
setreuid01
.c
platform/external/ltp/testcases/kernel/syscalls/setreuid/setreuid01.c
857
utf_8
c6c198c644b3a068507487e5be45ccd0
*/ /*\ * [Description] * * Verify the basic functionality of setreuid(2) system call when executed * as non-root user. */ #include "tst_test.h" #include "compat_tst_16.h" static uid_t ruid, euid; static void run(void) { ruid = getuid(); UID16_CHECK(ruid, setreuid); euid = geteuid(); UID16_CHECK(euid, setreuid...
google
android
setreuid07
.c
platform/external/ltp/testcases/kernel/syscalls/setreuid/setreuid07.c
4,199
utf_8
a2b60ffe36209d5fff718f26051d799d
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Created by Renaud Lottiaux */ /* * Check if setreuid behaves correctly with file permissions. * The test creates a file as ROOT with permissions 0644, does a setreuid * and then tries to open the file with RDWR permissions. * ...
google
android
pread02
.c
platform/external/ltp/testcases/kernel/syscalls/pread/pread02.c
1,698
utf_8
98b4e6c25cc48f51a8af896965dbbf73
* 07/2001 Ported by Wayne Boyer */ /*\ * [Description] * * Tests basic error handling of the pread syscall. * * - ESPIPE when attempted to read from an unnamed pipe * - EINVAL if the specified offset position was invalid * - EISDIR when fd refers to a directory */ #include <fcntl.h> #include <stdlib.h> #inclu...
google
android
pread01
.c
platform/external/ltp/testcases/kernel/syscalls/pread/pread01.c
2,638
utf_8
f2b01ac4319ed5097f907cd45302a2df
* 07/2001 Ported by Wayne Boyer */ /*\ * [Description] * * Verify the functionality of pread() by writing known data using pwrite() * to the file at various specified offsets and later read from the file from * various specified offsets, comparing the data read against the data written. */ #include <stdlib.h> #...
google
android
mmap09
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap09.c
2,868
utf_8
50ed0bf374cd1815cebb450646c331ba
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Description: * Verify that truncating a mmaped file works correctly. * * Expected Result: * ftruncate should be allowed to increase, decrease, or zero the * size of a file that has been mmaped * * Test: * Use...
google
android
mmap06
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap06.c
3,333
utf_8
356c7874568c0d0a30c832692fd4fc51
/* * - The prot parameter is set to PROT_READ * - The file descriptor is open for writing. * * The call should fail to map the file. * * Expected Result: * mmap() should fail returning -1 and errno should get set to EACCES. * * HISTORY * 07/2001 Ported by Wayne Boyer */ #include <stdio.h> #include <stdlib....
google
android
mmap08
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap08.c
3,372
utf_8
599489078d127650b807b2ae43f35707
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Description: * Verify that mmap() fails to map a file creating a mapped region * when the file specified by file descriptor is not valid. * * Expected Result: * mmap() should fail returning -1 and errno should get ...
google
android
mmap19
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap19.c
2,197
utf_8
a79cc54aef1c3bbd57bcdc39de67ec26
* Author: carl.vanschaik at nicta.com.au */ /*\ * [Description] * * If the kernel fails to correctly flush the TLB entry, the second mmap * will not show the correct data. * * [Algorithm] * - create two files, write known data to the files * - mmap the files, verify data * - unmap files * - remmap files...
google
android
mmap05
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap05.c
5,094
utf_8
d88e52552e16a0cef1da550efa763519
/* * - The prot parameter is set to PROT_NONE * - The file descriptor is open for read(any mode other than write) * - The minimum file permissions should be 0444. * * The call should succeed to map the file creating mapped memory with the * required attributes. * * Expected Result: * mmap() should succeed r...
google
android
mmap02
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap02.c
4,501
utf_8
7ff37bd53a4934c6212b486c5dba4bc1
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Description: * Call mmap() with prot parameter set to PROT_READ and with the file * descriptor being open for read, to map a file creating mapped memory * with read access. The minimum file permissions should be 044...
google
android
mmap07
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap07.c
3,406
utf_8
5412533115ff0b0c16999c18cc7fb6d1
/* * - The prot parameter is set to PROT_WRITE * - The file descriptor is open for writing. * - The flags parameter has MAP_PRIVATE set. * * The call should fail to map the file. * * Expected Result: * mmap() should fail returning -1 and errno should get set to EACCES. * * HISTORY * 07/2001 Ported by Wayne...
google
android
mmap17
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap17.c
2,018
utf_8
a6cd69542e8bb0af08ab86b8a94dda61
*/ /* * Test mmap with MAP_FIXED_NOREPLACE flag * * We are testing the MAP_FIXED_NOREPLACE flag of mmap() syscall. To check * if an attempt to mmap at an exisiting mapping fails with EEXIST. * The code allocates a free address by passing NULL to first mmap call * Then tries to mmap with the same address using MA...
google
android
mmap13
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap13.c
3,212
utf_8
0b3584d10044d2f06c65d73854dea656
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Description: * Verify error signal SIGBUS. * "Attempted access to a portion of the buffer that does not correspond * to the file." * * Expected Result: * mmap() should succeed returning the address of the mapped...
google
android
mmap10
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap10.c
5,776
utf_8
d1218ef865836303738adb0178d0545e
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. */ /* * mmap/munmap /dev/zero: a common way of malloc()/free() anonymous * memory on Solaris. * * The basic purpose of this is a to test if it is possible to map and * unmap /dev/zero, and to read and write the mapping. Being ...
google
android
mmap18
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap18.c
6,061
utf_8
283dfa43250d04bf448e9a14f7fc7c61
*/ /* * Test mmap() MAP_GROWSDOWN flag * * # Test1: * * We assign the memory region partially allocated with MAP_GROWSDOWN flag to * a thread as a stack and expect the mapping to grow when we touch the * guard page by calling a recusive function in the thread that uses the * growable mapping as a stack...
google
android
mmap001
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap001.c
3,951
utf_8
028cef56ad4a0352a77a715be8c892f5
/* * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * mmap001.c - Tests mmapping a big file and writing it once */ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/mman.h> #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <errno.h> #inclu...
google
android
mmap11
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap11.c
3,895
utf_8
f49a3c8b332f35cd5578b56266818b7e
/* * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* * munmap() don't check sysctl_max_mapcount * * From http://lkml.org/lkml/2009/10/2/85: * * On ia64, the following test program exit abnormally, because glibc * thread library called abort(). * * ====================================...
google
android
mmap12
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap12.c
2,738
utf_8
a994bc06f45e8ea86c48575e62cc9beb
*/ /* * Test Description: * Verify MAP_POPULATE works fine. * "For a file mapping, this causes read-ahead on the file. * Later accesses to the mapping will not be blocked by page faults" * * Expected Result: * mmap() with MAP_POPULATE should succeed returning the address of the * mapped region and this f...
google
android
mmap14
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap14.c
2,856
utf_8
9da1399179fbd3f7150b258a9aa68491
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Description: * Verify MAP_LOCKED works fine. * "Lock the pages of the mapped region into memory in the manner of mlock(2)." * * Expected Result: * mmap() should succeed returning the address of the mapped region, ...
google
android
mmap15
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap15.c
2,536
utf_8
a1c5b6eba106067f1805581a00f75462
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Description: Test that a normal page cannot be mapped into a high * memory region. */ #include <sys/types.h> #include <sys/mman.h> #include <sys/mount.h> #include <sys/stat.h> #include <errno.h> #include <fcntl.h> #inclu...
google
android
mmap16
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap16.c
4,513
utf_8
1b68551a536dddd9f1cc7e69886d2456
* Date: Thu Feb 12 23:00:17 2015 -0500 * * ext4: fix mmap data corruption in nodelalloc mode when blocksize < pagesize * * commit d6320cbfc92910a3e5f10c42d98c231c98db4f60 * Date: Wed Oct 1 21:49:46 2014 -0400 * * ext4: fix mmap data corruption when blocksize < pagesize */ #define _GNU_SOURCE #...
google
android
mmap04
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap04.c
4,576
utf_8
7f49cb32c30ad9a1df38f4a54a4fbfac
/* * - The prot parameter is set to PROT_READ|PROT_EXEC * - The file descriptor is open for read * - The file being mapped has read and execute permission bit set. * - The minimum file permissions should be 0555. * * The call should succeed to map the file creating mapped memory with the * required attributes....
google
android
mmap01
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap01.c
4,941
utf_8
9b3334a146c6d72873dc98a8201c47d5
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Description: * Verify that, mmap() succeeds when used to map a file where size of the * file is not a multiple of the page size, the memory area beyond the end * of the file to the end of the page is accessible. Also...
google
android
mmap03
.c
platform/external/ltp/testcases/kernel/syscalls/mmap/mmap03.c
5,688
utf_8
bb3537ed90286d0ca07afc66bf0afbb6
/* * - The prot parameter is set to PROT_EXE * - The file descriptor is open for read * - The file being mapped has execute permission bit set. * - The minimum file permissions should be 0555. * * The call should succeed to map the file creating mapped memory with the * required attributes. * * Expected Resu...
google
android
futex_waitv03
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_waitv03.c
2,753
utf_8
7cf1f4111e4f1e434fd658dff85b8beb
*/ /*\ * [Description] * * This test verifies futex_waitv syscall using shared data. */ #define _GNU_SOURCE #include <unistd.h> #include <time.h> #include <sys/shm.h> #include "tst_test.h" #include "lapi/futex.h" #include "lapi/syscalls.h" #include "futex2test.h" #include "futex_utils.h" #include "tst_safe_pthread...
google
android
futex_waitv01
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_waitv01.c
3,444
utf_8
5f29abacf3e86a56c5de7d78414f82b7
*/ /*\ * [Description] * * This test verifies EINVAL for futex_waitv syscall. */ #include <time.h> #include <stdlib.h> #include "tst_test.h" #include "lapi/futex.h" #include "futex2test.h" #include "tst_safe_clocks.h" static uint32_t *futex; static struct futex_waitv *waitv; static void setup(void) { futex = SAFE...
google
android
futex_wait_bitset01
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_wait_bitset01.c
2,913
utf_8
cde5a80645e6fe46d2cc1dd1b46c892c
* * 1. Block on a bitset futex and wait for timeout, the difference between * normal futex and bitset futex is that that the later have absolute timeout. * 2. Check that the futex waited for expected time. */ #include "tst_test.h" #include "tst_timer.h" #include "futextest.h" #define THRESHOLD_US 100000 #define...
google
android
futex_wake02
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_wake02.c
3,377
utf_8
e7d65ff27732bc91700098f1f358d7f5
* * Block several threads on a private mutex, then wake them up. */ #include <sys/types.h> #include "futextest.h" #include "futex_utils.h" #include "tst_safe_pthread.h" static futex_t futex = FUTEX_INITIALIZER; static volatile int threads_flags[55]; static struct futex_test_variants variants[] = { #if (__NR_futex !=...
google
android
futex_wake04
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_wake04.c
3,550
utf_8
68d8ee8eccc45858c6ca1e2bf53856ea
* * DESCRIPTION: * * It is a regression test for commit: * http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/ * commit/?id=13d60f4 * * The implementation of futex doesn't produce unique keys for futexes * in shared huge pages, so threads waiting on different futexes may * end up on th...
google
android
futex_waitv02
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_waitv02.c
2,338
utf_8
c7a72a3fbe843b618b132f4bcb4f4b4b
*/ /*\ * [Description] * * This test verifies futex_waitv syscall using private data. */ #define _GNU_SOURCE #include <unistd.h> #include <time.h> #include "tst_test.h" #include "lapi/futex.h" #include "lapi/syscalls.h" #include "futex2test.h" #include "futex_utils.h" #include "tst_safe_pthread.h" #include "tst_sa...
google
android
futex_cmp_requeue02
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_cmp_requeue02.c
2,517
utf_8
ef99b4f6990ea05af6bd3c6bafe4d4ea
* * Description: * Check various errnos for futex(FUTEX_CMP_REQUEUE). * 1) futex(FUTEX_CMP_REQUEUE) with invalid val returns EINVAL. * 2) futex(FUTEX_CMP_REQUEUE) with invalid val2 returns EINVAL. * 3) futex(FUTEX_CMP_REQUEUE) with mismatched val3 returns EAGAIN. * * It's also a regression test for CVE-2018-692...
google
android
futex_wait03
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_wait03.c
1,669
utf_8
d6de21c5371c4678878d8716069c7636
* * Block on a futex and wait for wakeup. * * This tests uses private mutexes with threads. */ #include "futextest.h" #include "futex_utils.h" #include "tst_safe_pthread.h" static futex_t futex = FUTEX_INITIALIZER; static struct futex_test_variants variants[] = { #if (__NR_futex != __LTP__NR_INVALID_SYSCALL) { .f...
google
android
futex_wake01
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_wake01.c
1,548
utf_8
200c3cc0d8ae5d6992a8d53ab3e694e5
* * futex_wake() returns 0 (0 woken up processes) when no processes wait on the mutex. */ #include <limits.h> #include "futextest.h" struct testcase { futex_t *f_addr; int nr_wake; int opflags; }; static futex_t futex = FUTEX_INITIALIZER; static struct testcase testcases[] = { /* nr_wake = 0 is noop */ {&futex,...
google
android
futex_wait01
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_wait01.c
2,127
utf_8
29719439034deb8ebee48265913d6cf2
* * 1. Block on a futex and wait for timeout. * 2. Test if FUTEX_WAIT op returns -EWOULDBLOCK if the futex value differs * from the expected one. */ #include "futextest.h" struct testcase { futex_t *f_addr; futex_t f_val; int opflags; int exp_errno; }; static futex_t futex = FUTEX_INITIALIZER; static struct...
google
android
futex_wait05
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_wait05.c
891
utf_8
9678c95ac06a623fa3f2b4a67bf745a9
*/ /* * 1. Block on a futex and wait for timeout. * 2. Check that the futex waited for expected time. */ #include <errno.h> #include "tst_timer_test.h" #include "futextest.h" int sample_fn(int clk_id, long long usec) { struct timespec to = tst_timespec_from_us(usec); futex_t futex = FUTEX_INITIALIZER; tst_timer_...
google
android
futex_wake03
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_wake03.c
2,428
utf_8
2c150a3cf4b2f1d428f984a1e52e8998
* * Block several processes on a mutex, then wake them up. */ #include <sys/types.h> #include <sys/wait.h> #include "futextest.h" #include "futex_utils.h" static futex_t *futex; static struct futex_test_variants variants[] = { #if (__NR_futex != __LTP__NR_INVALID_SYSCALL) { .fntype = FUTEX_FN_FUTEX, .desc = "syscal...
google
android
futex_wait02
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_wait02.c
1,702
utf_8
908fa97b841b231c39a466dd74a8d114
* * Block on a futex and wait for wakeup. * * This tests uses shared memory page to store the mutex variable. */ #include <sys/mman.h> #include <sys/wait.h> #include "futextest.h" #include "futex_utils.h" static futex_t *futex; static struct futex_test_variants variants[] = { #if (__NR_futex != __LTP__NR_INVALID_S...
google
android
futex_cmp_requeue01
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_cmp_requeue01.c
5,964
utf_8
d49a52657eadb59d913c66419bb22711
* * Description: * Testcase to check the basic functionality of futex(FUTEX_CMP_REQUEUE). * futex(FUTEX_CMP_REQUEUE) can wake up the number of waiters specified * by val argument and then requeue the number of waiters limited by val2 * argument(i.e. move some remaining waiters from uaddr to uaddr2 address). */ #...
google
android
futex_wait04
.c
platform/external/ltp/testcases/kernel/syscalls/futex/futex_wait04.c
1,614
utf_8
fa65ebb18ec1687c988f95ee5eb484c5
* * Wait on uninitialized heap. It shold be zero and FUTEX_WAIT should return * immediately. This test tests zero page handling in futex code. */ #include <errno.h> #include "futextest.h" static struct futex_test_variants variants[] = { #if (__NR_futex != __LTP__NR_INVALID_SYSCALL) { .fntype = FUTEX_FN_FUTEX, .tst...
google
android
rename07
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename07.c
853
utf_8
a463516ce79eaff1ec3fd94cc6111400
*/ /*\ * [Description] * * Verify that rename(2) fails with ENOTDIR, when * oldpath is a directory and newpath exists but is not a directory. * */ #include <stdio.h> #include "tst_test.h" #define MNT_POINT "mntpoint" #define TEMP_DIR "tmpdir" #define TEMP_FILE "tmpfile" static void setup(void) { SAFE_CHDIR(MNT_...
google
android
rename03
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename03.c
1,894
utf_8
3020de66b5c23dbc40a9eca8ae089000
*/ /*\ * [Description] * * Verify rename(2) functions correctly when the newpath * file or directory (empty) exists. */ #include <sys/stat.h> #include <stdio.h> #include "tst_test.h" #define MNT_POINT "mntpoint" #define OLD_FILE_NAME MNT_POINT"/oldfile" #define NEW_FILE_NAME MNT_POINT"/newfile" #define OLD_DIR_NA...
google
android
rename11
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename11.c
4,655
utf_8
e299d95b48727e579ac65d83ba200f14
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Description: * Verify that, * 1. rename() fails with -1 return value and sets errno to ELOOP, if too * many symbolic links were encountered in resolving oldpath or newpath. * 2. rename() fails with -1 return ...
google
android
rename06
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename06.c
814
utf_8
3733471287fb58cbc4279df2f38a70c4
*/ /*\ * [Description] * * Verify that rename(2) fails with EINVAL when * an attempt is made to make a directory a subdirectory of itself. */ #include <stdio.h> #include "tst_test.h" #define MNT_POINT "mntpoint" #define DIR1 "dir1" #define DIR2 DIR1"/dir2" static void setup(void) { SAFE_CHDIR(MNT_POINT); SAFE_M...
google
android
rename12
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename12.c
1,559
utf_8
3e1c657db74dfed96a11c5a63fd26cde
*/ /*\ * [Description] * * Verify that rename() fails with EPERM or EACCES when the directory * containing oldpath has the sticky bit (S_ISVTX) set and the caller * is not privileged. */ #include <stdio.h> #include <pwd.h> #include "tst_test.h" #define MNT_POINT "mntpoint" #define TEMP_DIR "tempdir" #define TEMP...
google
android
rename01
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename01.c
1,988
utf_8
72d721e2dbae656222289a95b7fde37e
*/ /*\ * [Description] * * Verify rename() when the newpath file or directory does not exist. */ #include <stdio.h> #include "tst_test.h" #define MNT_POINT "mntpoint" static const char *old_file_name = "oldfile"; static const char *old_dir_name = "olddir"; static const char *new_file_name = "newfile"; static const...
google
android
rename13
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename13.c
1,165
utf_8
dc06e42b1f384dfac700fb92e20c88f6
*/ /*\ * [Description] * * Verify that rename() does nothing and returns a success status when * oldpath and newpath are existing hard links referring to the same file. */ #include <stdio.h> #include "tst_test.h" #define MNT_POINT "mntpoint" #define TEMP_FILE1 MNT_POINT"/tmpfile1" #define TEMP_FILE2 MNT_POINT"/tm...
google
android
rename09
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename09.c
1,436
utf_8
cc78051851208758672657bcaf4c2e81
*/ /*\ * [Description] * * Check that renaming/moving a file from directory where the current user does * not have write permissions fails with EACCES. */ #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include "tst_test.h" #include "tst_safe_file_ops.h" #include "tst_uid.h" #define SRCDIR "srcdi...
google
android
rename08
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename08.c
887
utf_8
fd041f33fd47581e60041ae806ee408f
*/ /*\ * [Description] * * Verify that rename(2) fails with EFAULT, when * oldpath or newpath points outside of accessible address space. */ #include <stdio.h> #include "tst_test.h" #define MNT_POINT "mntpoint" #define TEMP_FILE "tmpfile" #define INVALID_PATH ((void *)-1) static void setup(void) { SAFE_CHDIR(MNT...
google
android
rename05
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename05.c
846
utf_8
4ab58d8cae566d27865d9a977ea4eb25
*/ /*\ * [Description] * * Verify that rename(2) fails with EISDIR when * oldpath is not a directory and newpath is an existing directory. */ #include <stdio.h> #include "tst_test.h" #define MNT_POINT "mntpoint" #define TEMP_FILE "tmpfile" #define TEMP_DIR "tmpdir" static void setup(void) { SAFE_CHDIR(MNT_POINT)...
google
android
rename10
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename10.c
836
utf_8
a44c88c75e0c7d7ba29699dcff32e103
*/ /*\ * [Description] * * Verify that rename(2) fails with ENAMETOOLONG, when * oldpath or newpath is too long. */ #include <stdio.h> #include "tst_test.h" #define MNT_POINT "mntpoint" #define TEMP_FILE "tmpfile" static char long_path[NAME_MAX + 1] = {[0 ... NAME_MAX] = 'a'}; static void setup(void) { SAFE_CHDI...
google
android
rename14
.c
platform/external/ltp/testcases/kernel/syscalls/rename/rename14.c
3,331
utf_8
05d3bc4da8cb7e17dc4a9825f914087e
/* * /* * NAME * rename14.c - create and rename files * * CALLS * create, unlink, rename * * ALGORITHM * Creates two processes. One creates and unlinks a file. * The other renames that file. * */ #include <stdio.h> #include <errno.h> #include <signal.h> #include <stdlib.h> #include <unistd.h> #include <sys...