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
posix_fadvise03
.c
platform/external/ltp/testcases/kernel/syscalls/fadvise/posix_fadvise03.c
2,754
utf_8
8cc159d724b4b151d20d098f97708de8
*/ /* * NAME * posix_fadvise03.c * * DESCRIPTION * Check the value that posix_fadvise returns for wrong ADVISE value. * * USAGE * posix_fadvise03 * * HISTORY * * RESTRICTIONS * None */ #include <fcntl.h> #include <unistd.h> #include <signal.h> #include <errno.h> #include <limits.h> #include <string.h> #i...
google
android
posix_fadvise04
.c
platform/external/ltp/testcases/kernel/syscalls/fadvise/posix_fadvise04.c
1,497
utf_8
c550657ca13b0777d7c441cf73265eb9
*/ /* * NAME * posix_fadvise04.c * * DESCRIPTION * Check the value that posix_fadvise returns for pipe descriptor. * * USAGE * posix_fadvise04 * * HISTORY * * RESTRICTIONS * None */ #include <fcntl.h> #include <unistd.h> #include <signal.h> #include <errno.h> #include <string.h> #include "tst_test.h" #in...
google
android
posix_fadvise02
.c
platform/external/ltp/testcases/kernel/syscalls/fadvise/posix_fadvise02.c
1,735
utf_8
fab7081f8812ea59166e0b7ccd5af35e
*/ /* * NAME * posix_fadvise02.c * * DESCRIPTION * Check the value that posix_fadvise returns for wrong file descriptor. * * USAGE * posix_fadvise02 * * HISTORY * * RESTRICTIONS * None */ #include <fcntl.h> #include <unistd.h> #include <signal.h> #include <errno.h> #include <string.h> #include "tst_test....
google
android
posix_fadvise01
.c
platform/external/ltp/testcases/kernel/syscalls/fadvise/posix_fadvise01.c
1,474
utf_8
d3274b6cf7d6876dc3338c483d8a17fc
*/ /* * NAME * posix_fadvise01.c * * DESCRIPTION * Check the value that posix_fadvise returns for wrong ADVISE value. * * USAGE * posix_fadvise01 * * HISTORY * * RESTRICTIONS * None */ #include <fcntl.h> #include <unistd.h> #include <signal.h> #include <errno.h> #include <string.h> #include "tst_test.h" ...
google
android
socketcall02
.c
platform/external/ltp/testcases/kernel/syscalls/socketcall/socketcall02.c
1,494
utf_8
73848a9fd6abac3e1842bbc3feea6b9d
* * This is a error test for the socketcall(2) system call. */ #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <linux/net.h> #include <sys/un.h> #include <netinet/in.h> #include "tst_test.h" #include "lapi/syscalls.h" static unsigned long args_valid[3] = {PF_INET, SOCK_...
google
android
socketcall03
.c
platform/external/ltp/testcases/kernel/syscalls/socketcall/socketcall03.c
1,460
utf_8
36aabddc67a1caa92538b6fcb0a67b22
* * This is a basic test for the socketcall(2) for bind(2) and listen(2). */ #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <linux/net.h> #include <sys/un.h> #include <netinet/in.h> #include "tst_test.h" #include "lapi/syscalls.h" static struct sockaddr_in si; static v...
google
android
socketcall01
.c
platform/external/ltp/testcases/kernel/syscalls/socketcall/socketcall01.c
1,258
utf_8
1ba0df2a176c54bfcca00028961baa0a
* * This is a basic test for the socketcall(2) system call. */ #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <linux/net.h> #include <sys/un.h> #include <netinet/in.h> #include "tst_test.h" #include "lapi/syscalls.h" struct test_case_t { int call; unsigned long args[...
google
android
rt_sigsuspend01
.c
platform/external/ltp/testcases/kernel/syscalls/rt_sigsuspend/rt_sigsuspend01.c
1,462
utf_8
91492c4db61172d1337893297df6d09b
* * Waits for SIGALRM in rt_sigsuspend() then checks that process mask wasn't * modified. */ #include <signal.h> #include <errno.h> #include "tst_test.h" #include "lapi/syscalls.h" #include "lapi/safe_rt_signal.h" #include "lapi/signal.h" static void sig_handler(int sig) { (void) sig; } static void verify_rt_sigsu...
google
android
mkdir04
.c
platform/external/ltp/testcases/kernel/syscalls/mkdir/mkdir04.c
1,078
utf_8
c2f513934cec6dfeab22901279ee9bc6
*/ /* * Verify that user cannot create a directory inside directory owned by another * user with restrictive permissions and that the errno is set to EACCESS. */ #include <errno.h> #include <sys/types.h> #include <pwd.h> #include "tst_test.h" #include "tst_uid.h" #define TESTDIR "testdir" #define TESTSUBDIR "testd...
google
android
mkdir09
.c
platform/external/ltp/testcases/kernel/syscalls/mkdir/mkdir09.c
3,025
utf_8
fc5bab8d480b28d9a8c581185b38605a
*/ /*\ * [Description] * * Create multiple processes which create subdirectories in the * same directory multiple times within test time. */ #include <stdio.h> #include <sys/param.h> #include "tst_test.h" #include "tst_safe_pthread.h" #define MNTPOINT "mntpoint" #define MODE_RWX 07770 #define DIR_NAME MNTPOINT "/...
google
android
mkdir05
.c
platform/external/ltp/testcases/kernel/syscalls/mkdir/mkdir05.c
1,221
utf_8
93770570fe46a89092f98e0317ac91c6
* Ported to LTP: Wayne Boyer */ /* DESCRIPTION * This test will verify the mkdir(2) creates a new directory successfully and * it is owned by the effective UID and GID of the process. */ #include <errno.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <pwd.h> #include "tst_test.h" #defi...
google
android
mkdir02
.c
platform/external/ltp/testcases/kernel/syscalls/mkdir/mkdir02.c
1,441
utf_8
48c9acc502b1af5c5205362b691cb997
*/ /*\ * [Description] * * Verify that new directory created by mkdir(2) inherites the group ID from * the parent directory and S_ISGID bit, if the S_ISGID bit is set in the * parent directory. */ #include <sys/stat.h> #include <sys/types.h> #include <pwd.h> #include "tst_test.h" #include "tst_uid.h" #define TES...
google
android
mkdir03
.c
platform/external/ltp/testcases/kernel/syscalls/mkdir/mkdir03.c
2,159
utf_8
88f34f5bc2d13eaf2ada5f2c058df799
* Ported to LTP: Wayne Boyer */ /* * DESCRIPTION * check mkdir() with various error conditions that should produce * EFAULT, ENAMETOOLONG, EEXIST, ENOENT, ENOTDIR, ELOOP and EROFS */ #include <errno.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> #include <fcntl.h> #include <sys/mount.h> #in...
google
android
ioctl_ns03
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_ns03.c
1,163
utf_8
d6ad6d39815b6e3d98657180e5741b8f
*/ /*\ * [Description] * * Test ioctl_ns with NS_GET_OWNER_UID request. * * Calls ioctl for a UTS namespace, which isn't a user namespace. * This should make the call fail with EINVAL. * */ #define _GNU_SOURCE #include <errno.h> #include "tst_test.h" #include "lapi/ioctl_ns.h" static void setup(void) { int ex...
google
android
ioctl_loop07
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_loop07.c
4,390
utf_8
dec99d20d57535fb4da53e5f48947f91
*/ /*\ * [Description] * * Tests ioctl() on loopdevice with LOOP_SET_STATUS64 and LOOP_GET_STATUS64 flags. * * Tests lo_sizelimit field. If lo_sizelimit is 0, it means max * available. If sizelimit is less than loop_size, loopsize will * be truncated. * * Also uses LOOP_CONFIGURE ioctl to test lo_sizelimit fi...
google
android
ioctl03
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl03.c
2,167
utf_8
1d9009602b55e31c62d9775872965ba6
*/ /* * This program tests whether all the valid IFF flags are * returned properly by implementation of TUNGETFEATURES ioctl * on kernel 2.6.27 */ #include <sys/types.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include <linux/if_tun.h> #include "tst_test.h" #ifndef TUNGET...
google
android
ioctl04
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl04.c
1,787
utf_8
77d3ecfc9f19d9c0dad803a1628abf15
*/ /* * Basic test for the BLKROSET and BLKROGET ioctls. * * - Set the device read only, read the value back. * - Try to mount the device read write, expect failure. * - Try to mount the device read only, expect success. */ #include <errno.h> #include <sys/mount.h> #include "tst_test.h" static int fd; static voi...
google
android
ioctl_sg01
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_sg01.c
2,914
utf_8
6b06f05ed266be2fdeb397a5b01ff210
* Date: Fri May 18 16:23:18 2018 +0200 * * scsi: sg: allocate with __GFP_ZERO in sg_build_indirect() */ #include <sys/types.h> #include <dirent.h> #include <fcntl.h> #include <unistd.h> #include <ctype.h> #include <scsi/sg.h> #include <sys/ioctl.h> #include <stdio.h> #include "tst_test.h" #include "tst_memutils...
google
android
ioctl_loop05
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_loop05.c
5,035
utf_8
096d5545b21cf8174d4d5e548a3c0f42
*/ /*\ * [Description] * * Tests ioctl() on loopdevice with LOOP_SET_DIRECT_IO flag. * * Tests whether LOOP_SET_DIRECT_IO can update a live loop device dio mode. * It requires the backing file also supports dio mode and the lo_offset is * aligned with the logical block size. * * The direct I/O error handling ...
google
android
ioctl08
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl08.c
3,301
utf_8
15afc88a8f836c195d563a9e87dbf65f
* * Tests the ioctl functionality to deduplicate fileranges using * btrfs filesystem. * * 1) Sets the same contents for two files and deduplicates it. * Deduplicates 3 bytes and set the status to * FILE_DEDUPE_RANGE_SAME. * 2) Sets different content for two files and tries to * deduplicate it. 0 bytes get dedu...
google
android
ioctl_loop01
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_loop01.c
4,584
utf_8
e8e410518a0f78e1cb983b6896b2e986
*/ /*\ * [Description] * * Tests ioctl() on loopdevice with LO_FLAGS_AUTOCLEAR and LO_FLAGS_PARTSCAN flags. * * For LO_FLAGS_AUTOCLEAR flag, only checks autoclear field value in sysfs * and also gets lo_flags by using LOOP_GET_STATUS. * * For LO_FLAGS_PARTSCAN flag, it is the same as LO_FLAGS_AUTOCLEAR flag. ...
google
android
ioctl_loop03
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_loop03.c
1,901
utf_8
9f4476b5689eca88a392d92d9d0a4164
*/ /*\ * [Description] * * Tests ioctl() on loopdevice with LOOP_CHANGE_FD flag. * * Tests whether LOOP_CHANGE_FD can not succeed (get EINVAL error) * when loop_dev is not read only. */ #include <stdio.h> #include <unistd.h> #include <string.h> #include "lapi/loop.h" #include "tst_test.h" static char dev_path[1...
google
android
ioctl_ns07
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_ns07.c
1,094
utf_8
654c4ecc80b068756d3f9ed660ca7f61
*/ /*\ * [Description] * * Test ioctl_ns with NS_GET_* request for file descriptors * that aren't namespaces. * * Calling ioctl with test directory's file descriptor * should make the call fail with ENOTTY. */ #define _GNU_SOURCE #include <errno.h> #include "tst_test.h" #include "lapi/ioctl_ns.h" static int re...
google
android
ioctl_ns04
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_ns04.c
1,130
utf_8
65ae45d52bd1b4958bd396b8c547a653
*/ /*\ * [Description] * * Test ioctl_ns with NS_GET_USERNS request. * * Owning user namespace of process calling ioctl is out of scope, * which should make the call fail with EPERM. */ #define _GNU_SOURCE #include <errno.h> #include "tst_test.h" #include "lapi/ioctl_ns.h" static void setup(void) { int exists ...
google
android
ioctl_loop04
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_loop04.c
2,565
utf_8
890d0450c63c7c8a11af1b3c0095c63b
*/ /*\ * [Description] * * Tests ioctl() on loopdevice with LOOP_SET_CAPACITY flag. * * Tests whether LOOP_SET_CAPACITY can update a live * loop device size after change the size of the underlying * backing file. Also checks sysfs value. */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <s...
google
android
ioctl_ns01
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_ns01.c
1,834
utf_8
a2aaf657c7f9ba399c95d19b38c4c92e
*/ /*\ * [Description] * * Test ioctl_ns with NS_GET_PARENT request. * * Parent process tries to get parent of initial namespace, which should * fail with EPERM because it has no parent. * * Child process has a new pid namespace, which should make the call fail * with EPERM error. */ #define _GNU_SOURCE #inc...
google
android
ioctl01
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl01.c
2,391
utf_8
bf7ff416279b1cb3e816931262c1ca56
* 07/2001 Ported by Wayne Boyer * 04/2002 Fixes by wjhuie * * Testcase to check the errnos set by the ioctl(2) system call. * * ALGORITHM * 1. EBADF: Pass an invalid fd to ioctl(fd, ..) and expect EBADF. * 2. EFAULT: Pass an invalid address of arg in ioctl(fd, .., arg) * 3. EINVAL: Pass invalid cmd in ioctl(fd...
google
android
ioctl_loop06
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_loop06.c
3,602
utf_8
b203f087bc512d7989f2724f92dcf8b3
*/ /*\ * [Description] * * Tests invalid block size of loopdevice by using ioctl() with * LOOP_SET_BLOCK_SIZE and LOOP_CONFIGURE flags. */ #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <stdlib.h> #include "lapi/loop.h" #include "tst_test.h" static char dev_path[1024]; static int dev_num, ...
google
android
ioctl_loop02
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_loop02.c
4,487
utf_8
c4b4cc5d6962ae08ec7ac6787fe3087f
*/ /*\ * [Description] * * Tests ioctl() on loopdevice with LO_FLAGS_READ_ONLY (similar as losetup -r) and * LOOP_CHANGE_FD flags. * * For LOOP_CHANGE_FD, this operation is possible only if the loop device * is read-only and the new backing store is the same size and type as the * old backing store. * * When...
google
android
ioctl02
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl02.c
10,813
utf_8
761ff98e0b460c66091c5cdd0436e239
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * NAME * ioctl02.c * * DESCRIPTION * Testcase to test the TCGETA, and TCSETA ioctl implementations for * the tty driver * * ALGORITHM * In this test, the parent and child open the parentty and the childtty * respective...
google
android
ioctl09
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl09.c
3,073
utf_8
d7e28206542f4205a1e25d28fc2a5cf2
* * Basic test for the BLKRRPART ioctl, it is the same as blockdev * --rereadpt command. */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <sys/mount.h> #include <stdbool.h> #include "lapi/loop.h" #include "tst_test.h" #define RETVAL_CHECK(x) \ ({ value ? TST_RETVAL_EQ0(x) : TST_RETVAL_N...
google
android
ioctl05
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl05.c
1,597
utf_8
c547c60225ca1df885bf395791866d8f
*/ /* * Basic test for the BLKGETSIZE and BLKGETSIZE64 ioctls. * * - BLKGETSIZE returns size in 512 byte blocks BLKGETSIZE64 in bytes * compare that they return the same value. * - lseek to the end of the device, this should work * - try to read from the device, read should return 0 */ #include <stdint.h> #in...
google
android
ioctl_ns06
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_ns06.c
2,395
utf_8
a06b74fa58b5fb4bed951e8fe85fffc4
*/ /*\ * [Description] * * Test ioctl_ns with NS_GET_USERNS request. * * After the call to clone with the CLONE_NEWUSER flag, * child is created in a new user namespace. That's checked by * comparing its /proc/self/ns/user symlink and the parent's one, * which should be different. */ #define _GNU_SOURCE #incl...
google
android
ioctl_ns05
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_ns05.c
2,514
utf_8
4b7de0998464be69e6c6805ce8e237db
*/ /*\ * [Description] * * Test ioctl_ns with NS_GET_PARENT request. * * Child cloned with the CLONE_NEWPID flag is created in a new pid namespace. * That's checked by comparing its /proc/self/ns/pid symlink and the parent's * one. Also child thinks its pid is 1. */ #define _GNU_SOURCE #include <errno.h> #incl...
google
android
ioctl06
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl06.c
1,248
utf_8
d11d948c2965241e17410bab6e9485fb
*/ /* * Basic test for the BLKRASET and BLKRAGET ioctls. * * Sets device read-ahead, reads it back and compares the values. * * The read-ahead value was choosen to be multiple of 512, since it's rounded * based on page size on BLKRASET and 512 should be safe enough for everyone. */ #include <errno.h> #include <...
google
android
ioctl_ns02
.c
platform/external/ltp/testcases/kernel/syscalls/ioctl/ioctl_ns02.c
1,159
utf_8
df6e275c7c6f359acf0d697b30e6c29d
*/ /*\ * [Description] * * Test ioctl_ns with NS_GET_PARENT request. * * Test tries to get namespace parent for UTS namespace, which * should make the call fail with EINVAL, being a nonhierarchical * namespace. */ #define _GNU_SOURCE #include <errno.h> #include "tst_test.h" #include "lapi/ioctl_ns.h" static vo...
google
android
getdtablesize01
.c
platform/external/ltp/testcases/kernel/syscalls/getdtablesize/getdtablesize01.c
3,102
utf_8
7d58dcbe041803a7be701d15ae434841
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ /********************************************************** * * TEST IDENTIFIER : getdtablesize01 * * EXECUTED BY : root / superuser * * TEST TITLE : Basic tests for getdtablesize01(2) * * TEST CASE TOTAL : 1 ...
google
android
sgetmask01
.c
platform/external/ltp/testcases/kernel/syscalls/sgetmask/sgetmask01.c
7,365
utf_8
4930122f85f94dfa78c344ce1de332fd
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* */ /******************************************************************************/ /***********************************************************************...
google
android
select01
.c
platform/external/ltp/testcases/kernel/syscalls/select/select01.c
2,976
utf_8
5ade0227925494bd4cf51bbaf2b679b3
* http://www.sgi.com * * AUTHOR : Richard Logan * CO-PILOT : William Roske * * 1.) select(2) to fd of regular file with no I/O and small timeout * 2.) select(2) to fd of system pipe with no I/O and small timeout * 3.) select(2) of fd of a named-pipe (FIFO) with no I/O and small timeout value...
google
android
select04
.c
platform/external/ltp/testcases/kernel/syscalls/select/select04.c
1,967
utf_8
e2d632ea31775f72b04d53c8e79718f1
*/ /*\ * [Description] * * Test to check if fd set bits are cleared by select(). * * [Algorithm] * - Check that writefds flag is cleared on full pipe * - Check that readfds flag is cleared on empty pipe */ #include <unistd.h> #include <errno.h> #include <sys/time.h> #include <sys/types.h> #include <fcntl.h> ...
google
android
select03
.c
platform/external/ltp/testcases/kernel/syscalls/select/select03.c
3,272
utf_8
5e38be5cc596422cfd5b7c524aaeb3fe
* * Failure tests. */ #include <unistd.h> #include <errno.h> #include <stdlib.h> #include <sys/time.h> #include <sys/types.h> #include <sys/wait.h> #include <fcntl.h> #include "select_var.h" static fd_set readfds_reg, writefds_reg, fds_closed; static fd_set *preadfds_reg = &readfds_reg, *pwritefds_reg = &writefds_re...
google
android
select02
.c
platform/external/ltp/testcases/kernel/syscalls/select/select02.c
1,052
utf_8
59b4554c5d17c586012b46b80f356832
*/ /* * Check that select() timeouts correctly. */ #include <unistd.h> #include <errno.h> #include <sys/time.h> #include <sys/types.h> #include <fcntl.h> #include "tst_timer_test.h" #include "select_var.h" static int fds[2]; static int sample_fn(int clk_id, long long usec) { struct timeval timeout = tst_us_to_timev...
google
android
adjtimex01
.c
platform/external/ltp/testcases/kernel/syscalls/adjtimex/adjtimex01.c
1,409
utf_8
ae34d6c3cadc3a153e2c88f4d040031b
*/ #include <errno.h> #include <sys/timex.h> #include "tst_test.h" #define SET_MODE (ADJ_OFFSET | ADJ_FREQUENCY | ADJ_MAXERROR | ADJ_ESTERROR | \ ADJ_STATUS | ADJ_TIMECONST | ADJ_TICK) static struct timex *tim_save; static struct timex *buf; void verify_adjtimex(void) { *buf = *tim_save; buf->modes = SET_MODE; TES...
google
android
adjtimex03
.c
platform/external/ltp/testcases/kernel/syscalls/adjtimex/adjtimex03.c
2,389
utf_8
78c0fe46685bd45b5144fe1099428fa4
* * CVE-2018-11508 * * Test 4-byte kernel data leak via adjtimex * * On calling the adjtimex() function call with invalid mode (let's say * 0x8000), ideally all the parameters should return with null data. But, * when we read the last parameter we will receive 4 bytes of kernel data. * This proves that there a...
google
android
adjtimex02
.c
platform/external/ltp/testcases/kernel/syscalls/adjtimex/adjtimex02.c
3,854
utf_8
90881a12c937e32ec4496d616918419e
*/ /*\ * [Description] * * Tests for adjtimex() error conditions: * * - EPERM with SET_MODE as nobody * - EFAULT with SET_MODE and invalid timex pointer * - EINVAL with ADJ_TICK greater than max tick * - EINVAL with ADJ_TICK smaller than min tick * * On kernels older than 2.6.26: * * - EINVAL with AJD_OFFS...
google
android
fallocate04
.c
platform/external/ltp/testcases/kernel/syscalls/fallocate/fallocate04.c
7,102
utf_8
92f9576ac7cd165ec794835e8ada7bc4
* * Test allocates a file with specified size then tests the following modes: * FALLOC_FL_PUNCH_HOLE, FALLOC_FL_ZERO_RANGE and FALLOC_FL_COLLAPSE_RANGE. */ #define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include "tst_test.h"...
google
android
fallocate02
.c
platform/external/ltp/testcases/kernel/syscalls/fallocate/fallocate02.c
4,373
utf_8
16c6577949221d4a941d3e2fa811e541
/****************************************************************************** * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ***************************************************************************/ /* * DESCRIPTION * check fallocate() with various error conditions that should prod...
google
android
fallocate05
.c
platform/external/ltp/testcases/kernel/syscalls/fallocate/fallocate05.c
3,639
utf_8
80b1e01fd057e29e1694a114bc4c15fd
*/ /* * Tests that writing to fallocated file works when filesystem is full. * Test scenario: * - fallocate() some empty blocks * - fill the filesystem * - write() into the preallocated space * - try to fallocate() more blocks until we get ENOSPC * - write() into the extra allocated space * - deallocate part o...
google
android
fallocate01
.c
platform/external/ltp/testcases/kernel/syscalls/fallocate/fallocate01.c
8,142
utf_8
0863534746bc5ed79b4e83eff7489cae
/****************************************************************************** * fallocate01.c * Mon Dec 24 2007 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ***************************************************************************/ /********************************************...
google
android
fallocate03
.c
platform/external/ltp/testcases/kernel/syscalls/fallocate/fallocate03.c
8,187
utf_8
152c0653a51dde87162c9ecc7f3316d5
/****************************************************************************** * fallocate03.c * Mon Dec 24 2007 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ***************************************************************************/ /********************************************...
google
android
fallocate06
.c
platform/external/ltp/testcases/kernel/syscalls/fallocate/fallocate06.c
6,017
utf_8
86d07c4dbd02afcf9383d5502eda6d44
*/ /*\ * [Description] * * Tests misaligned fallocate() * * Test scenario: * * 1. write() several blocks worth of data * 2. fallocate() some more space (not aligned to FS blocks) * 3. try to write() into the allocated space * 4. deallocate misaligned part of file range written in step 1 * 5. read() the deal...
google
android
vfork02
.c
platform/external/ltp/testcases/kernel/syscalls/vfork/vfork02.c
5,956
utf_8
b6c23df8b22b402acc75a93b7eab6c8c
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Name: vfork02 * * Test Description: * Fork a process using vfork() and verify that, the pending signals in * the parent are not pending in the child process. * $ * Expected Result: * The signal which is pend...
google
android
vfork01
.c
platform/external/ltp/testcases/kernel/syscalls/vfork/vfork01.c
9,067
utf_8
067379737bb6605698d558ffea3a0435
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Name: vfork01 * * Test Description: * Fork a process using vfork() and verify that, the attribute values like * euid, ruid, suid, egid, rgid, sgid, umask, inode and device number of * root and current working direc...
google
android
iopl02
.c
platform/external/ltp/testcases/kernel/syscalls/iopl/iopl02.c
1,700
utf_8
d5d72ce47d60f789d1c6f6950ca87dea
*/ #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> static struct tcase { int level; char *desc; int exp_errno; } tcases[] = { {4, "Invalid privilege level", EINVAL}, {1, "Non super-user", EPE...
google
android
iopl01
.c
platform/external/ltp/testcases/kernel/syscalls/iopl/iopl01.c
1,401
utf_8
ec332e7d00d31fafdb198e36aabf457c
*/ #include <errno.h> #include <unistd.h> #include "tst_test.h" #if defined __i386__ || defined(__x86_64__) #include <sys/io.h> static void verify_iopl(void) { int total_level = 4; int level; for (level = 0; level < total_level; ++level) { TEST(iopl(level)); if (TST_RET == -1) { tst_res(TFAIL | TTERRNO, "iop...
google
android
recvmmsg01
.c
platform/external/ltp/testcases/kernel/syscalls/recvmmsg/recvmmsg01.c
3,092
utf_8
a054a3e243c693559d73329ff985f3d8
/*\ * Test recvmmsg() errors: * * - EBADF Bad socket file descriptor * - EFAULT Bad message vector address * - EINVAL Bad seconds value for the timeout argument * - EINVAL Bad nanoseconds value for the timeout argument * - EFAULT Bad timeout address */ #define _GNU_SOURCE #include "../sendmmsg/sendmmsg.h" stat...
google
android
geteuid01
.c
platform/external/ltp/testcases/kernel/syscalls/geteuid/geteuid01.c
2,120
utf_8
eeb395f9ec2f7d949c528f809f06d7e2
/* * 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
geteuid02
.c
platform/external/ltp/testcases/kernel/syscalls/geteuid/geteuid02.c
1,833
utf_8
1ad9714cc98a505750748e4b26e27700
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include <pwd.h> #include <errno.h> #include "test.h" #include "compat_16.h" TCID_DEFINE(geteuid02); int TST_TOTAL = 1; static void setup(void); static void cleanup(void); int main(int ac, char **av) { struct passwd *pwent; int lc;...
google
android
sync01
.c
platform/external/ltp/testcases/kernel/syscalls/sync/sync01.c
1,268
utf_8
2ce940734b16e62ac76f3f3f2ab03c52
*/ /* * sync03 * * It basically tests sync() to sync test file having large dirty file pages * to block device. Also, it tests all supported filesystems on a test block * device. */ #define _GNU_SOURCE #include <errno.h> #include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include "tst_test.h" #define ...
google
android
umount03
.c
platform/external/ltp/testcases/kernel/syscalls/umount/umount03.c
1,275
utf_8
12275ffc615aecc01068167ab662bc55
* * Verify that umount(2) returns -1 and sets errno to EPERM if the user * is not the super-user. */ #include <errno.h> #include <pwd.h> #include <sys/mount.h> #include <sys/types.h> #include <unistd.h> #include "tst_test.h" #define MNTPOINT "mntpoint" static int mount_flag; static void verify_umount(void) { TEST...
google
android
umount02
.c
platform/external/ltp/testcases/kernel/syscalls/umount/umount02.c
2,111
utf_8
9aa7eec7f9df0422887b4648dd93650f
* * Check for basic errors returned by umount(2) system call. * * Verify that umount(2) returns -1 and sets errno to * 1) EBUSY if it cannot be umounted, because dir is still busy. * 2) EFAULT if specialfile or device file points to invalid address space. * 3) ENOENT if pathname was empty or has a nonexistent co...
google
android
umount01
.c
platform/external/ltp/testcases/kernel/syscalls/umount/umount01.c
1,176
utf_8
6fff7d5cfd6f2fcb56fe04708ee9d40a
* * Phase I test for the umount(2) system call. * It is intended to provide a limited exposure of the system call. */ #include <errno.h> #include <sys/mount.h> #include "tst_test.h" #define MNTPOINT "mntpoint" static int mount_flag; static void verify_umount(void) { if (mount_flag != 1) { SAFE_MOUNT(tst_device->...
google
android
vmsplice02
.c
platform/external/ltp/testcases/kernel/syscalls/vmsplice/vmsplice02.c
2,136
utf_8
e1542b322d9df24e2ba0f181d4fec20d
*/ /* * Description: * Verify that, * 1) vmsplice() returns -1 and sets errno to EBADF if fd * is not valid. * 2) vmsplice() returns -1 and sets errno to EBADF if fd * doesn't refer to a pipe. * 3) vmsplice() returns -1 and sets errno to EINVAL if * nr_segs is greater than IOV_MAX. */ #...
google
android
vmsplice03
.c
platform/external/ltp/testcases/kernel/syscalls/vmsplice/vmsplice03.c
1,379
utf_8
8b5b03d52a29b68b464e96d3271bb6b1
* * Test vmsplice() from a pipe into user memory */ #define _GNU_SOURCE #include "tst_test.h" #include "lapi/fcntl.h" #include "lapi/vmsplice.h" #define TEST_BLOCK_SIZE (64*1024) /* 64K */ static char buffer[TEST_BLOCK_SIZE]; static struct iovec *iov; static void vmsplice_test(void) { int written, i; int pipes[2];...
google
android
vmsplice01
.c
platform/external/ltp/testcases/kernel/syscalls/vmsplice/vmsplice01.c
2,494
utf_8
362f9d7b0fbbc0103db14eada0f17b95
*/ #define _GNU_SOURCE #include <errno.h> #include <string.h> #include <signal.h> #include <sys/types.h> #include <sys/poll.h> #include "tst_test.h" #include "lapi/fcntl.h" #include "lapi/splice.h" #include "lapi/vmsplice.h" #define TEST_BLOCK_SIZE (1<<17) /* 128K */ #define TESTFILE "vmsplice_test_file" static int fd...
google
android
vmsplice04
.c
platform/external/ltp/testcases/kernel/syscalls/vmsplice/vmsplice04.c
1,983
utf_8
7b72ad42fa80bb9c2f8fb99e577cc48f
* * Test vmsplice() to a full pipe with SPLICE_F_NONBLOCK and without. * * With SPLICE_F_NONBLOCK vmsplice() should return with errno EAGAIN * Without SPLICE_F_NONBLOCK it should block. */ #define _GNU_SOURCE #include "tst_test.h" #include "lapi/vmsplice.h" #include "lapi/fcntl.h" #include <stdlib.h> static int p...
google
android
rt_sigtimedwait01
.c
platform/external/ltp/testcases/kernel/syscalls/rt_sigtimedwait/rt_sigtimedwait01.c
2,385
utf_8
bf5fd6d41fecc73f6128a83381694dc7
#include "time64_variants.h" #include "libsigwait.h" static int my_rt_sigtimedwait(const sigset_t * set, siginfo_t * info, void *timeout) { /* _NSIG is always the right number of bits of signal map for all arches */ return tst_syscall(__NR_rt_sigtimedwait, set, info, timeout, _NSIG/8); } #if (__NR_rt_sigtime...
google
android
openat02_child
.c
platform/external/ltp/testcases/kernel/syscalls/openat/openat02_child.c
935
utf_8
a7b505fd44b7b7200d6b956620dbe2cf
/* * with this program. */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <unistd.h> #define STR "abc" char *TCID = "openat02_child"; int main(int argc, char **argv) { int fd; int ret; if (argc != 2) { fprintf(stderr, "%s <fd>\n", argv[0]); exit(1); } fd = atoi(argv[1]...
google
android
openat02
.c
platform/external/ltp/testcases/kernel/syscalls/openat/openat02.c
6,643
utf_8
618d2e1591c8e279e9fbbc13d6c23425
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* * Description: * Verify that, * 1)openat() succeeds to open a file in append mode, when * 'flags' is set to O_APPEND. * 2)openat() succeeds to enable the close-on-exec flag for a * file descriptor, when 'flags' is set to O_CLOE...
google
android
openat04
.c
platform/external/ltp/testcases/kernel/syscalls/openat/openat04.c
4,422
utf_8
93a337364597edc2c5920e4325111f12
* Date: Thu July 14 14:11:26 2022 +0800 * * fs: Add missing umask strip in vfs_tmpfile * * The most code is pasted form creat09.c. */ #define _GNU_SOURCE #include <stdlib.h> #include <sys/types.h> #include <pwd.h> #include <sys/mount.h> #include <unistd.h> #include <stdio.h> #include "tst_test.h" #include "la...
google
android
openat03
.c
platform/external/ltp/testcases/kernel/syscalls/openat/openat03.c
5,797
utf_8
5d905fba33c0fa4f7918ec63083b820e
/* * */ #define _GNU_SOURCE #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <errno.h> #include "test.h" #include "safe_macros.h" #include "lapi/fcntl.h" #include "openat.h" char *TCID = "openat03"; int TST_TOTAL = 3; static ssize_t size; static char buf[1024]; static const ssize_t blocks_num...
google
android
openat01
.c
platform/external/ltp/testcases/kernel/syscalls/openat/openat01.c
2,482
utf_8
bdbeafde5e5de60868aef927a8571fd5
*/ /*\ * [Description] * * This test case will verify basic function of openat. * * - pathname is relative, then it is interpreted relative to the directory * referred to by the file descriptor dirfd * * - pathname is absolute, then dirfd is ignored * * - ENODIR pathname is a relative pathname and dirfd is...
google
android
sigaltstack02
.c
platform/external/ltp/testcases/kernel/syscalls/sigaltstack/sigaltstack02.c
4,987
utf_8
b7fcdb349aa670e47bb11e2dcefceed7
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Name: sigalstack02 * * Test Description: * Verify that, * 1. sigaltstack() fails and sets errno to EINVAL when "ss_flags" field * pointed to by 'ss' contains invalid flags. * 2. sigaltstack() fails and...
google
android
sigaltstack01
.c
platform/external/ltp/testcases/kernel/syscalls/sigaltstack/sigaltstack01.c
6,080
utf_8
b28be099491acef5641ace4a4a002794
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Test Name: sigalstack01 * * Test Description: * Send a signal using the main stack. While executing the signal handler * compare a variable's address lying on the main stack with the stack * boundaries returned by ...
google
android
mq_notify02
.c
platform/external/ltp/testcases/kernel/syscalls/mq_notify/mq_notify02.c
2,108
utf_8
9579406c66fbb9e2488af39e15b0c77d
/* * with this program. */ /* * ALGORITHM * test 1: * sevp->sigev_notify = -1, EINVAL should be returned. * test 2: * sevp->sigev_notify = SIGEV_SIGNAL and sevp->sigev_signo > _NSG, * EINVAL should be returned. */ #include <errno.h> #include <mqueue.h> #include "test.h" char *TCID = "mq_notify02"; static vo...
google
android
mq_notify01
.c
platform/external/ltp/testcases/kernel/syscalls/mq_notify/mq_notify01.c
4,272
utf_8
986ded0adc070b08d01e7a727c9cd02e
*/ #include <limits.h> #include <errno.h> #include "tst_test.h" #include "tst_safe_posix_ipc.h" static int fd, fd_root, fd_nonblock, fd_maxint = INT_MAX - 1, fd_invalid = -1; #include "mq.h" #define USER_DATA 0x12345678 static char *str_debug; static volatile sig_atomic_t notified, cmp_ok; static siginfo_t info;...
google
android
getpriority01
.c
platform/external/ltp/testcases/kernel/syscalls/getpriority/getpriority01.c
1,308
utf_8
e907550982fdbe0fd4a24e9416e1ff59
*/ /* * Verify that getpriority(2) succeeds get the scheduling priority of * the current process, process group or user, and the priority values * are in the ranges of [0, 0], [0, 0] and [-20, 0] by default for the * flags PRIO_PROCESS, PRIO_PGRP and PRIO_USER respectively. */ #include <errno.h> #include <sys/res...
google
android
getpriority02
.c
platform/external/ltp/testcases/kernel/syscalls/getpriority/getpriority02.c
1,502
utf_8
332c634b79cc445734a8670a6f6b95d9
*/ /* * Verify that, * 1) getpriority(2) fails with -1 and sets errno to EINVAL if 'which' * argument was not one of PRIO_PROCESS, PRIO_PGRP, or PRIO_USER. * 2) getpriority(2) fails with -1 and sets errno to ESRCH if no * process was located for 'which' and 'who' arguments. */ #include <errno.h> #inclu...
google
android
getcontext01
.c
platform/external/ltp/testcases/kernel/syscalls/getcontext/getcontext01.c
860
utf_8
b5d2c35c738995d1cc41a51088dc9400
*/ /*\ * [Description] * * Basic test for getcontext(). * * Calls a getcontext() then jumps back with a setcontext(). */ #include "config.h" #include "tst_test.h" #ifdef HAVE_GETCONTEXT #include <ucontext.h> static volatile int flag; static void run(void) { ucontext_t ptr; flag = 0; TST_EXP_PASS(getcontext(&p...
google
android
delete_module01
.c
platform/external/ltp/testcases/kernel/syscalls/delete_module/delete_module01.c
1,233
utf_8
7853f4ba93eec1c1f1a52092c1887bf0
* * DESCRIPTION: * Basic tests for delete_module(2) * 1) insmod dummy_del_mod.ko * 2) call delete_module(2) to remove dummy_del_mod.ko */ #include <errno.h> #include "tst_test.h" #include "tst_module.h" #include "lapi/syscalls.h" #define MODULE_NAME "dummy_del_mod" #define MODULE_NAME_KO "dummy_del_mod.ko" static...
google
android
dummy_del_mod_dep
.c
platform/external/ltp/testcases/kernel/syscalls/delete_module/dummy_del_mod_dep.c
882
utf_8
386e9a3a82e0719d5c8f2b16eb233043
*/ /* * Description: * This is a kernel loadable module programme used by delete_module03 * testcase which inserts this module as part of setup. This module * has dependency on dummy_del_mod module (calls function of dummy_del_mod * during initialization). */ #include <linux/module.h> #include <linux/init.h> #in...
google
android
delete_module03
.c
platform/external/ltp/testcases/kernel/syscalls/delete_module/delete_module03.c
1,924
utf_8
025412e71ce509d4e1bdceee36bc0446
* * DESCRIPTION * Verify that, delete_module(2) returns -1 and sets errno to EWOULDBLOCK, * if tried to remove a module while other modules depend on this module. */ #include <errno.h> #include "tst_test.h" #include "tst_module.h" #include "lapi/syscalls.h" #define DUMMY_MOD "dummy_del_mod" #define DUMMY_MOD_KO ...
google
android
dummy_del_mod
.c
platform/external/ltp/testcases/kernel/syscalls/delete_module/dummy_del_mod.c
823
utf_8
13cb41b4bbcbad7bb8dd67988fd9d70c
*/ /* * Description: * This is a kernel loadable module programme used by delete_module* * testcases which insert this module as part setup. */ #include <linux/module.h> #include <linux/init.h> #include <linux/proc_fs.h> #include <linux/kernel.h> /* Dummy function called by dependent module */ int dummy_func_test(...
google
android
delete_module02
.c
platform/external/ltp/testcases/kernel/syscalls/delete_module/delete_module02.c
2,524
utf_8
de200fa993e6a59e0ebbdaf729297dde
* * DESCRIPTION * Verify that, * 1. delete_module(2) returns -1 and sets errno to ENOENT for nonexistent * module entry. * 2. delete_module(2) returns -1 and sets errno to EFAULT, if * module name parameter is outside program's accessible address space. * 3. delete_module(2) returns -1 and sets errno to E...
google
android
eventfd01
.c
platform/external/ltp/testcases/kernel/syscalls/eventfd/eventfd01.c
15,962
utf_8
9db1891fc358f147a6fccab6d2dbbc05
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * NAME * eventfd01.c * * DESCRIPTION * Test cases for eventfd syscall. * * USAGE: <for command-line> * eventfd01 [-c n] [-i n] [-I x] [-P x] [-t] * -i n : Execute test n times. * -I...
google
android
setpriority01
.c
platform/external/ltp/testcases/kernel/syscalls/setpriority/setpriority01.c
2,953
utf_8
018dc5865045ae8e831429b9e0ea7059
*/ /* * Verify that setpriority(2) succeeds set the scheduling priority of * the current process, process group or user. */ #define _GNU_SOURCE #include <errno.h> #include <pwd.h> #include <stdlib.h> #include <sys/resource.h> #include "tst_test.h" static const char *username = "ltp_setpriority01"; static int pid, u...
google
android
setpriority02
.c
platform/external/ltp/testcases/kernel/syscalls/setpriority/setpriority02.c
2,669
utf_8
6fc8f3363e9a186c18e72aec2504d7be
*/ /* * Verify that, * 1) setpriority(2) fails with -1 and sets errno to EINVAL if 'which' * argument was not one of PRIO_PROCESS, PRIO_PGRP, or PRIO_USER. * 2) setpriority(2) fails with -1 and sets errno to ESRCH if no * process was located for 'which' and 'who' arguments. * 3) setpriority(2) fails w...
google
android
clone04
.c
platform/external/ltp/testcases/kernel/syscalls/clone/clone04.c
943
utf_8
f7910c90e84957c26cd46c7628f1ece1
*/ /*\ * [Description] * * Verify that clone(2) fails with * * - EINVAL if child stack is set to NULL */ #include <stdlib.h> #include "tst_test.h" #include "clone_platform.h" static int child_fn(void *arg LTP_ATTRIBUTE_UNUSED); static struct tcase { int (*child_fn)(void *arg); void *child_stack; int exp_errno...
google
android
clone06
.c
platform/external/ltp/testcases/kernel/syscalls/clone/clone06.c
1,318
utf_8
42862d3d61c2294102bba051d7dc31df
*/ /*\ * [Description] * * Test to verify inheritance of environment variables by child. */ #include <stdio.h> #include <stdlib.h> #include <sched.h> #include "tst_test.h" #include "clone_platform.h" #define MAX_LINE_LENGTH 256 #define ENV_VAL "LTP test variable value" #define ENV_ID "LTP_CLONE_TEST" static void *...
google
android
clone09
.c
platform/external/ltp/testcases/kernel/syscalls/clone/clone09.c
2,025
utf_8
2acbe414b55ed972cc3442c272de38cf
*/ #define _GNU_SOURCE #include <stdlib.h> #include <errno.h> #include "tst_test.h" #include "clone_platform.h" #include "lapi/syscalls.h" #include "lapi/sched.h" static void *child_stack; static int sysctl_net = -1; static int sysctl_net_new = -1; static const char sysctl_path[] = "/proc/sys/net/ipv4/conf/lo/tag"; st...
google
android
clone05
.c
platform/external/ltp/testcases/kernel/syscalls/clone/clone05.c
1,115
utf_8
6168e9ada248ccadc389d1d090f6f95c
*/ /*\ * [Description] * * Call clone() with CLONE_VFORK flag set. verify that * execution of parent is suspended until child finishes */ #define _GNU_SOURCE #include <stdlib.h> #include <sched.h> #include "tst_test.h" #include "clone_platform.h" static volatile int child_exited; static void *child_stack; static ...
google
android
clone03
.c
platform/external/ltp/testcases/kernel/syscalls/clone/clone03.c
1,178
utf_8
7448dca85f8945e95aaa89f8ffaecc2b
*/ /*\ * [Description] * * Check for equality of getpid() from a child and return value of clone(2) */ #include <stdio.h> #include <stdlib.h> #include "tst_test.h" #include "clone_platform.h" static void *child_stack; static int *child_pid; static int child_fn(void *arg LTP_ATTRIBUTE_UNUSED) { *child_pid = getpid...
google
android
clone02
.c
platform/external/ltp/testcases/kernel/syscalls/clone/clone02.c
10,595
utf_8
498e1e196263e3db71583be5202bd82a
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ /* * TEST1 * ----- * Call clone() with all resources shared. * * CHILD: * modify the shared resources * return 1 on success * PARENT: * wait for child to finish * verify that the shared resourses are modified * return 1 o...
google
android
clone07
.c
platform/external/ltp/testcases/kernel/syscalls/clone/clone07.c
1,248
utf_8
47584acfaa27db326c7c3c95ac85a239
*/ /*\ * [Description] * * Test for a libc bug where exiting child function by returning from * it caused SIGSEGV. */ #include <sched.h> #include <stdio.h> #include <stdlib.h> #include "tst_test.h" #include "lapi/syscalls.h" #include "clone_platform.h" static void *child_stack; static int do_child(void *arg LTP_A...
google
android
clone08
.c
platform/external/ltp/testcases/kernel/syscalls/clone/clone08.c
4,654
utf_8
ab5f6ec3433995bc0a28a282b967f9c6
*/ #define _GNU_SOURCE #include <stdlib.h> #include <stdio.h> #include <errno.h> #include <sched.h> #include <sys/wait.h> #include "tst_test.h" #include "clone_platform.h" #include "lapi/syscalls.h" #include "lapi/futex.h" static pid_t ptid, ctid, tgid; static void *child_stack; static void test_clone_parent(int t); s...
google
android
clone01
.c
platform/external/ltp/testcases/kernel/syscalls/clone/clone01.c
1,214
utf_8
74d916e499e65e5ecf67321822c70f62
*/ /*\ * [Description] * * Basic clone() test. * * Use clone() to create a child process, and wait for the child process to exit, * verify that the child process pid is correct. */ #include <stdlib.h> #include "tst_test.h" #include "clone_platform.h" static void *child_stack; static int do_child(void *arg LTP_A...
google
android
lstat02
.c
platform/external/ltp/testcases/kernel/syscalls/lstat/lstat02.c
3,118
utf_8
dc3a23c6331b784d51f1856146caf336
*/ /* * This test verifies that: * * 1) lstat(2) returns -1 and sets errno to EACCES if search permission is * denied on a component of the path prefix. * 2) lstat(2) returns -1 and sets errno to ENOENT if the specified file * does not exists or empty string. * 3) lstat(2) returns -1 and sets errno to EFA...
google
android
lstat01
.c
platform/external/ltp/testcases/kernel/syscalls/lstat/lstat01.c
1,602
utf_8
263b98c3e967edfd821bac720bd0e60e
*/ /* * Basic test for lstat(): * * Tests if lstat() writes correct information about a symlink * into the stat structure. */ #include <errno.h> #include <string.h> #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> #include "tst_test.h" #define TESTFILE "tst_file" #define TESTSYML "ts...
google
android
capset03
.c
platform/external/ltp/testcases/kernel/syscalls/capset/capset03.c
1,324
utf_8
f2274ce756a71101345db73796452149
* * capset() fails with errno set or EPERM if the new_Inheritable is * not a subset of old_Inheritable and old_Permitted without CAP_SETPCAP. */ #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include "tst_test.h" #include "lapi/syscalls.h" #include <linux/capability.h> #define CAP1 (1 << CAP_KILL) ...
google
android
capset04
.c
platform/external/ltp/testcases/kernel/syscalls/capset/capset04.c
1,336
utf_8
4a2dc4798deadd0e829ca651b57b331c
* * Tests whether we can use capset() to modify the capabilities of a thread * other than itself. Now, most linux distributions with kernel supporting * VFS capabilities, this should be never permitted. */ #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include "tst_test.h" #include "lapi/syscalls....