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 | netns_netlink | .c | platform/external/ltp/testcases/kernel/containers/netns/netns_netlink.c | 3,223 | utf_8 | 015f0e42a09acb1bc30740ff88d5220e | */
/*\
* [Description]
*
* Tests a netlink interface inside a new network namespace.
*
* - Unshares a network namespace (so network related actions
* have no effect on a real system).
* - Forks a child which creates a NETLINK_ROUTE netlink socket
* and listens to RTMGRP_LINK (network interface create/delet... |
google | android | pidns02 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns02.c | 803 | utf_8 | ff9f54c13b220486c4850e65a6011437 | */
/*\
* [Description]
*
* Clone a process with CLONE_NEWNS flag and check:
*
* - child session ID must be 1
* - parent process group ID must be 1
*/
#include "tst_test.h"
#include "lapi/sched.h"
static int child_func(LTP_ATTRIBUTE_UNUSED void *arg)
{
pid_t sid, pgid;
sid = getsid(0);
pgid = getpgid(0);
TST... |
google | android | pidns01 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns01.c | 865 | utf_8 | 63a73e11bce54dbb483a29cb415abb07 | */
/*\
* [Description]
*
* Clone a process with CLONE_NEWNS flag and check:
*
* - child process ID must be 1
* - parent process ID must be 0
*/
#include "tst_test.h"
#include "lapi/sched.h"
static int child_func(LTP_ATTRIBUTE_UNUSED void *arg)
{
pid_t cpid, ppid;
cpid = getpid();
ppid = getppid();
TST_EXP_P... |
google | android | pidns32 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns32.c | 1,363 | utf_8 | ea3d91618713637568dc650237dfb996 | */
/*\
* [Description]
*
* Clone a process with CLONE_NEWPID flag and check for the maxium amount of
* nested containers.
*/
#define _GNU_SOURCE
#include <sys/mman.h>
#include "tst_test.h"
#include "lapi/sched.h"
#define MAXNEST 32
static int *level;
static int child_func(LTP_ATTRIBUTE_UNUSED void *arg)
{
pid_t ... |
google | android | pidns17 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns17.c | 4,171 | utf_8 | 9a6ce66369c1bc0f9f7b749a44f31f12 | /*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
***************************************************************************
* File: pidns17.c
* *
* * Description:
* * The pidns17.c testcase verifies inside the container, if kill(-1, SIGUSR1)
* * terminates all children running insi... |
google | android | pidns05 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns05.c | 6,577 | utf_8 | b11822a987b8135f28b13318084b312c | /*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
***************************************************************************
*
* Assertion:
* a) Create a container.
* b) Create many levels of child containers inside this container.
* c) Now do kill -9 init , outside of the cont... |
google | android | pidns12 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns12.c | 1,430 | utf_8 | 9729f1024b6fc2ab5f1232154ebdc3bf | */
/*\
* [Description]
*
* Clone a process with CLONE_NEWPID flag and verifies that siginfo->si_pid is
* set to 0 if sender (parent process) is not in the receiver's namespace.
*/
#include "tst_test_macros.h"
#define _GNU_SOURCE 1
#include <signal.h>
#include "tst_test.h"
#include "lapi/sched.h"
static volatile p... |
google | android | pidns03 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns03.c | 1,189 | utf_8 | 1a97547f2733f95875958d3236d24af0 | */
/*\
* [Description]
*
* Clone a process with CLONE_NEWPID flag and check if procfs mounted folder
* belongs to the new pid namespace by looking at /proc/self .
*/
#include <sys/mount.h>
#include "tst_test.h"
#include "lapi/sched.h"
#define PROCDIR "proc"
static int child_func(LTP_ATTRIBUTE_UNUSED void *arg)
{
... |
google | android | pidns10 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns10.c | 3,047 | utf_8 | 19006ebf36f482b330b74e6ae699e043 | /*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
***************************************************************************
* File: pidns10.c
* *
* * Description:
* * The pidns10.c testcase verifies inside the container, if kill(-1, signal)
* * fails with ESRCH when there are no pr... |
google | android | pidns13 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns13.c | 2,931 | utf_8 | 15087c2157ee77b3b6ff19780a9b1a8c | */
/*\
* [Description]
*
* The pidns13.c testcase checks container init, for async I/O
* triggered by peer namespace process.
*
* [Algorithm]
* * create a pipe in parent namespace
* * create two PID namespace containers(cinit1 and cinit2)
* * in cinit1, set pipe read end to send SIGUSR1 for asynchronous I/O
... |
google | android | pidns16 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns16.c | 4,397 | utf_8 | ec3edbc479aac12ff2893b20cf655766 | /*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
***************************************************************************
* * Test Assertion.
* *----------------
* * kill -USR1 container_init
* * - from the parent process and also inside a container
* * - Where init has defined a c... |
google | android | pidns06 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns06.c | 4,158 | utf_8 | c94de230ae9579886eee0e58c5e48a38 | /*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*************************************************************************
* Description:
* Testcase tries killing of the parent namespace pid by the container-init.
* It also tries killing of non-existent PID, by the container-init.
* ... |
google | android | pidns30 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns30.c | 7,370 | utf_8 | 8520590a592f377502bdf6ad1e5fe84b | /*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
***************************************************************************
* File: pidns30.c
*
* Description:
* This testcase checks if the si_pid is correctly set when a process
* that has registered for notification on a posi... |
google | android | pidns31 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns31.c | 8,397 | utf_8 | 4a11a5e86bafb04cf27da267977e1776 | /*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
***************************************************************************
* File: pidns31.c
*
* Description:
* This testcase checks if the si_pid is correctly set when a process
* that has registered for notification on a posi... |
google | android | pidns20 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns20.c | 1,962 | utf_8 | 021ae59ba115006d2f71e4445bdc2752 | */
/*\
* [Description]
*
* Clone a process with CLONE_NEWPID flag, block SIGUSR1 signal before sending
* it from parent and check if it's received once SIGUSR1 signal is unblocked.
*/
#define _GNU_SOURCE 1
#include <signal.h>
#include "tst_test.h"
#include "lapi/sched.h"
static volatile int signals;
static volati... |
google | android | pidns04 | .c | platform/external/ltp/testcases/kernel/containers/pidns/pidns04.c | 3,987 | utf_8 | f785ce6d00d719b1e59da5aa97b8fe7b | /*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
***************************************************************************
* File: pidns04.c
*
* Description:
* The pidns04.c testcase builds into the ltp framework to verify
* the basic functionality of PID Namespace.
*
* Verify tha... |
google | android | userns07 | .c | platform/external/ltp/testcases/kernel/containers/userns/userns07.c | 1,907 | utf_8 | 94285e38895f788642874b7aa859d81f | */
/*\
* [Description]
*
* Verify that the kernel allows at least 32 nested levels of user namespaces.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/wait.h>
#include "common.h"
#include "tst_test.h"
#define MAXNEST 32
static void setup(void)
{
check_newuser();
}
static int child_fn1(void *arg)
{
pid_t ... |
google | android | userns06 | .c | platform/external/ltp/testcases/kernel/containers/userns/userns06.c | 2,768 | utf_8 | b6e853f80a1a1c971867dd3305df6a7b | */
/*\
* [Description]
*
* Verify that when a process with non-zero user IDs performs an execve(),
* the process's capability sets are cleared.
* When a process with zero user IDs performs an execve(), the process's
* capability sets are set.
*/
#include "tst_test.h"
#include "config.h"
#ifdef HAVE_LIBCAP
#defi... |
google | android | userns03 | .c | platform/external/ltp/testcases/kernel/containers/userns/userns03.c | 5,819 | utf_8 | 2d7f6efe3bb609a9b6d98a9bc6cd5921 | */
/*\
* [Description]
*
* Verify that /proc/PID/uid_map and /proc/PID/gid_map contains three values
* separated by white space:
*
* ID-inside-ns ID-outside-ns length
*
* ID-outside-ns is interpreted according to which process is opening the file.
*
* If the process opening the file is in the same user n... |
google | android | userns01 | .c | platform/external/ltp/testcases/kernel/containers/userns/userns01.c | 2,397 | utf_8 | 032ba521a43a43845e6cf409a61f797f | */
/*\
* [Description]
*
* Verify that if a user ID has no mapping inside the namespace, user ID and
* group ID will be the value defined in the file /proc/sys/kernel/overflowuid
* (defaults to 65534) and /proc/sys/kernel/overflowgid (defaults to 65534). A
* child process has a full set of permitted and effectiv... |
google | android | userns08 | .c | platform/external/ltp/testcases/kernel/containers/userns/userns08.c | 3,106 | utf_8 | a71af399c966041f1280c5f5f5fff017 | */
/*\
* [Description]
*
* Reproducer of CVE-2018-18955; broken uid/gid mapping for nested
* user namespaces with >5 ranges
*
* See original reproducer and description by Jan Horn:
* https://bugs.chromium.org/p/project-zero/issues/detail?id=1712
*
* Note that calling seteuid from root can cause the dumpable b... |
google | android | userns02 | .c | platform/external/ltp/testcases/kernel/containers/userns/userns02.c | 1,612 | utf_8 | a2c5a33c98cd1ad5bb76f9550552e87f | */
/*\
* [Description]
*
* Verify that the user ID and group ID, which are inside a container,
* can be modified by its parent process.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include "common.h"
#include "tst_test.h"
/*
* child_fn1() - Inside a new user namespace
*/
static int child_fn1(LTP_ATTRIBUTE_UNUSED ... |
google | android | userns04 | .c | platform/external/ltp/testcases/kernel/containers/userns/userns04.c | 1,875 | utf_8 | e017df22a12e283af6f81badf9bbe6ed | */
/*\
* [Description]
*
* Verify that if a namespace isn't another namespace's ancestor, the process in
* first namespace does not have the CAP_SYS_ADMIN capability in the second
* namespace and the setns() call fails.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include "common.h"
#include "tst_test.h"
#include ... |
google | android | userns06_capcheck | .c | platform/external/ltp/testcases/kernel/containers/userns/userns06_capcheck.c | 1,454 | utf_8 | 155b99b7657694b6c9b3092104da58b8 | *
* When a process with non-zero user IDs performs an execve(), the
* process's capability sets are cleared. When a process with zero
* user IDs performs an execve(), the process's capability sets
* are set.
*/
#define TST_NO_DEFAULT_MAIN
#include "tst_test.h"
#include "config.h"
#ifdef HAVE_LIBCAP
#define _GNU_S... |
google | android | userns05 | .c | platform/external/ltp/testcases/kernel/containers/userns/userns05.c | 2,730 | utf_8 | e404196dee07e24cbf0c9e96ae4b7f72 | */
/*\
* [Description]
*
* Verify that if a process created via fork(2) or clone(2) without the
* CLONE_NEWUSER flag is a member of the same user namespace as its parent.
*
* When unshare an user namespace, the calling process is moved into a new user
* namespace which is not shared with any previously existing... |
google | android | timens01 | .c | platform/external/ltp/testcases/kernel/containers/timens/timens01.c | 1,698 | utf_8 | 1f272c629eaf8e0029245818443d3cd6 | */
/*
Basic test for timens_offsets error handling.
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 children by writing to the '/proc/self/timens_offsets'.
*/
#define _GNU_SOURC... |
google | android | libclone | .c | platform/external/ltp/testcases/kernel/containers/libclone/libclone.c | 3,426 | utf_8 | fd5a271100082390eafdc1461e2b4bc1 | /*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
***************************************************************************/
#include "libclone.h"
int do_clone_tests(unsigned long clone_flags,
int (*fn1) (void *arg), void *arg1,
int (*fn2) (void *arg), void *arg2)
{
int re... |
google | android | ns_ifmove | .c | platform/external/ltp/testcases/kernel/containers/share/ns_ifmove.c | 3,217 | utf_8 | b6f8018b29731b44a9bca14c9e0e86e5 | *
***********************************************************************
* Moves a network interface to the namespace of a process specified by a PID.
*
*/
#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <asm/types.h>
#include <sys/socket.h>
#include <li... |
google | android | ns_create | .c | platform/external/ltp/testcases/kernel/containers/share/ns_create.c | 2,495 | utf_8 | 46a3e942a429684ced243ab3358ff881 | *
***********************************************************************
* Creates a child process in the new specified namespace(s), child is then
* daemonized and is running in the background. PID of the daemonized child
* process is printed on the stdout. As the new namespace(s) is(are) maintained
* by the da... |
google | android | setns_check | .c | platform/external/ltp/testcases/kernel/containers/share/setns_check.c | 1,060 | utf_8 | c31054f6edb916a14aba2d4e8871aff7 | *
***********************************************************************
* Check for setns() availability, should be called before ns_exec.
*
*/
#include "test.h"
#include "lapi/syscalls.h"
char *TCID = "setns_check";
int main(void)
{
if (syscall(__NR_setns, -1, 0) == -1 && errno == ENOSYS)
tst_brkm(TCONF, NUL... |
google | android | ns_exec | .c | platform/external/ltp/testcases/kernel/containers/share/ns_exec.c | 3,367 | utf_8 | 394b27bd441e72d67ffc444d077fc72c | *
***********************************************************************
* Enters the namespace(s) of a process specified by a PID and then executes
* the indicated program inside that namespace(s).
*
*/
#define _GNU_SOURCE
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
... |
google | android | mountns01 | .c | platform/external/ltp/testcases/kernel/containers/mountns/mountns01.c | 2,513 | utf_8 | 93a53caa38fc881e2e958f46386756b2 | */
/*\
* [Description]
*
* Tests a shared mount: shared mount can be replicated to as many
* mountpoints and all the replicas continue to be exactly same.
*
* [Algorithm]
*
* - Creates directories DIR_A, DIR_B and files DIR_A/"A", DIR_B/"B"
* - Unshares mount namespace and makes it private (so mounts/umounts ... |
google | android | mountns03 | .c | platform/external/ltp/testcases/kernel/containers/mountns/mountns03.c | 2,819 | utf_8 | 35caf38e404ce9fad79fa163778447ce | */
/*\
* [Description]
*
* Tests a slave mount: slave mount is like a shared mount except that
* mount and umount events only propagate towards it.
*
* [Algorithm]
*
* - Creates directories DIRA, DIRB and files DIRA/"A", DIRB/"B"
* - Unshares mount namespace and makes it private (so mounts/umounts have no
* ... |
google | android | mountns04 | .c | platform/external/ltp/testcases/kernel/containers/mountns/mountns04.c | 1,407 | utf_8 | 1ed18c9f47fb31470bdf253608fd53cc | */
/*\
* [Description]
*
* Tests an unbindable mount: unbindable mount is an unbindable
* private mount.
*
* - Creates directories DIRA, DIRB and files DIRA/"A", DIRB/"B"
* - Unshares mount namespace and makes it private (so mounts/umounts have no
* effect on a real system)
* - Bind mounts directory DIRA to... |
google | android | mountns02 | .c | platform/external/ltp/testcases/kernel/containers/mountns/mountns02.c | 2,530 | utf_8 | 3f3e598356af632853549676d2bc258c | */
/*\
* [Description]
*
* Tests a private mount: private mount does not forward or receive
* propagation.
*
* [Algorithm]
*
* - Creates directories DIR_A, DIR_B and files DIR_A/"A", DIR_B/"B"
* - Unshares mount namespace and makes it private (so mounts/umounts have no
* effect on a real system)
* - Bind ... |
google | android | utstest | .c | platform/external/ltp/testcases/kernel/containers/utsname/utstest.c | 7,995 | utf_8 | 01b8393e978fab9da69c9990f6da72ea | /*
*
* test1:
P1: A=gethostname
P2: B=gethostname
Ensure(A==B)
* test2:
P1: sethostname(A);
P2: (wait); B=gethostname
Ensure (A==B)
* test3:
P1: A=gethostname; unshare(utsname); sethostname(newname); C=gethostname
P2: B=gethostname; (wait); (wait); D=gethostname
Ensure (A==B && A==D && C!=D)
* test4:
P1:... |
google | android | shmem_2nstest | .c | platform/external/ltp/testcases/kernel/containers/sysvipc/shmem_2nstest.c | 2,597 | utf_8 | dcc5b412f34ace3376e8f4bf83de0ea3 | */
/*\
* [Description]
*
* Test if SysV IPC shared memory is properly used between two namespaces.
*
* [Algorithm]
*
* Create two 'containers'.
* In container1, create Shared Memory segment with a specific key.
* In container2, try to access the MQ created in container1.
*
* Test is PASS if flag = none and ... |
google | android | shmnstest | .c | platform/external/ltp/testcases/kernel/containers/sysvipc/shmnstest.c | 1,721 | utf_8 | d16aeeee682905827467c60745522c81 | */
/*\
* [Description]
*
* Test if SysV IPC shared memory with a specific key is shared between
* processes and namespaces.
*/
#define _GNU_SOURCE
#include <sys/wait.h>
#include <sys/msg.h>
#include <sys/types.h>
#include "tst_safe_sysv_ipc.h"
#include "tst_test.h"
#include "common.h"
#define TESTKEY 0xEAEAEA
sta... |
google | android | msg_comm | .c | platform/external/ltp/testcases/kernel/containers/sysvipc/msg_comm.c | 2,382 | utf_8 | 53184511d331ae9819ca922ca1876ff9 | */
/*\
* [Description]
*
* Test SysV IPC message passing through different processes.
*
* [Algorithm]
*
* 1. Clones two child processes with CLONE_NEWIPC flag, each child
* gets System V message queue (msg) with the _identical_ key.
* 2. Child1 appends a message with identifier #1 to the message queue.
* ... |
google | android | mesgq_nstest | .c | platform/external/ltp/testcases/kernel/containers/sysvipc/mesgq_nstest.c | 2,595 | utf_8 | 3674004137e23249b64fc35c5b8f8b4f | */
/*\
* [Description]
*
* Test SysV IPC message passing through different namespaces.
*
* [Algorithm]
*
* In parent process create a new mesgq with a specific key.
* In cloned process try to access the created mesgq.
*
* Test will PASS if the mesgq is readable when flag is None.
* Test will FAIL if the mes... |
google | android | shm_comm | .c | platform/external/ltp/testcases/kernel/containers/sysvipc/shm_comm.c | 2,174 | utf_8 | b52aa2dff98c6cf4c875e31cec8abcc8 | */
/*\
* [Description]
*
* Test if SysV IPC shared memory is properly working between two different
* namespaces.
*
* [Algorithm]
*
* 1. Clones two child processes with CLONE_NEWIPC flag, each child
* allocates System V shared memory segment (shm) with the _identical_
* key and attaches that segment in... |
google | android | sem_comm | .c | platform/external/ltp/testcases/kernel/containers/sysvipc/sem_comm.c | 2,290 | utf_8 | b2d6c2bffde0b15dfc69c86f02e89fff | */
/*\
* [Description]
*
* Test SysV IPC semaphore usage between cloned processes.
*
* [Algorithm]
*
* 1. Clones two child processes with CLONE_NEWIPC flag, each child
* creates System V semaphore (sem) with the _identical_ key.
* 2. Child1 locks the semaphore.
* 3. Child2 locks the semaphore.
* 4. Locki... |
google | android | semtest_2ns | .c | platform/external/ltp/testcases/kernel/containers/sysvipc/semtest_2ns.c | 3,605 | utf_8 | 7511816e1329014ec8c0bd6486bc6ede | */
/*\
* [Description]
*
* Test SysV IPC semaphore usage between namespaces and processes.
*
* [Algorithm]
*
* Create 2 'containers'
* In container1 create semaphore with a specific key and lock it
* In container2 try to access the semaphore created in container1 and try to
* unlock it.
*
* If mode = None,... |
google | android | sem_nstest | .c | platform/external/ltp/testcases/kernel/containers/sysvipc/sem_nstest.c | 2,090 | utf_8 | 3cd389fd0020b5e3915a2b47fb3a2c60 | */
/*\
* [Description]
*
* Test SysV IPC semaphore usage between namespaces.
*
* [Algorithm]
*
* In parent process create a new semaphore with a specific key.
* In cloned process, try to access the created semaphore
*
* Test PASS if the semaphore is readable when flag is None.
* Test FAIL if the semaphore i... |
google | android | mqns_01 | .c | platform/external/ltp/testcases/kernel/containers/mqns/mqns_01.c | 3,724 | utf_8 | 9ac04763101a563165cc025243343240 | /*
*
* Check mqns isolation: father mqns cannot be accessed from newinstance
*
* Mount mqueue fs
* Create a posix mq -->mq1
* unshare
* In unshared process:
* Mount newinstance mqueuefs
* Check that mq1 is not readable from new ns
***************************************************************************/
#ifnde... |
google | android | mqns_02 | .c | platform/external/ltp/testcases/kernel/containers/mqns/mqns_02.c | 4,264 | utf_8 | 41a0265a51928d12018276ac33f6bed7 | /*
*
* Check mqns isolation: child mqns cannot be accessed from father
*
* Mount mqueue fs
* unshare
* In unshared process:
* Mount newinstance mqueuefs
* Create a posix mq -->mq1
* Check that mq1 is not readable from father
*
* Changelog:
* Dec 16: accomodate new mqns semantics (Serge Hallyn)
*******************... |
google | android | mqns_03 | .c | platform/external/ltp/testcases/kernel/containers/mqns/mqns_03.c | 4,609 | utf_8 | e105c599a0f8586c041820f62815f0d3 | /*
*
* Check ipcns+sb longevity
*
* Mount mqueue fs
* unshare
* In unshared process:
* Create "/mq1" with mq_open()
* Mount mqueuefs
* Check that /mq1 exists
* Create /dev/mqueue/mq2 through vfs (create(2))
* Umount /dev/mqueue
* Remount /dev/mqueue
* Check that both /mq1 and /mq2 exist
***********... |
google | android | mqns_04 | .c | platform/external/ltp/testcases/kernel/containers/mqns/mqns_04.c | 4,090 | utf_8 | 347f050069b07a3b3b3ddfc2b18cf521 | /*
*
* Check mqueuefs lifetime
* . parent creates /dev/mqueue2
* . child mounts mqueue there
* . child does mq_open("/ab")
* . parent checks for /dev/mqueue2
* . child exits
* . parent checks for /dev/mqueue2
* . parent tries 'touch /dev/mqueue2/dd' -> should fail
* . parent umounts /dev/mqueue2
***********************... |
google | android | tdrm | .c | platform/external/ltp/testcases/kernel/device-drivers/drm/kernel_space/tdrm.c | 4,773 | utf_8 | 67b3149e53aaf5e12f1dd15841793ff5 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* This example module shows how a test driver
* can be driven through various ioctl calls in
* a user space program that has attained the
* appropriate file descriptor for this device.
*
* author: Kai Zhao
* date: 09/03/... |
google | android | user_tdrm | .c | platform/external/ltp/testcases/kernel/device-drivers/drm/user_space/user_tdrm.c | 11,244 | utf_8 | 30e1319fdffb81fa184ae9bd28f3e148 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* This is the main of your user space test program,
* which will open the correct kernel module, find the
* file descriptor value and use that value to make
* ioctl calls to the system
*
*
* author: Kai Zhao
* date: 09/... |
google | android | ltp_block_dev | .c | platform/external/ltp/testcases/kernel/device-drivers/block/block_dev_kernel/ltp_block_dev.c | 10,520 | utf_8 | 1e088665975f2186afd239d2ad8222b3 | *
* Only those functions are tested here which are declared in <linux/fs.h>
*
* Changes:
* 16 Jan 2009 0.2 Added "tc" parameter to run test cases separately
* 11 Jan 2009 0.1 First release
*/
#include <linux/module.h>
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/genhd.h>
#include <linux/bl... |
google | android | test_genhd | .c | platform/external/ltp/testcases/kernel/device-drivers/block/block_dev_kernel/test_genhd.c | 951 | utf_8 | d0846256bf2536e82104a4a73ad61f89 | /*
* Module under test: linux/block/genhd.c
*
* Only those functions are tested here which are declared in <linux/genhd.h>
*
* Usage:
* 1. make
* 2. su
* 3. insmod ./test_genhd.ko
* 4. Check the test results in "dmesg"
* 5. rmmod test_genhd
*/
#include <linux/module.h>
#include <linux/genhd.h>
#def... |
google | android | block_dev | .c | platform/external/ltp/testcases/kernel/device-drivers/block/block_dev_user/block_dev.c | 2,467 | utf_8 | c6942983ab37fef2a1829c0d444be47e | /*
*
* Test checks block device kernel API.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "test.h"
#include "safe_macros.h"
#include "old_module.h"
char *TCID = "block_dev";
int TST_TOTAL = 9;
static const char module_name[] = "ltp_block_dev.ko";
stati... |
google | android | ltp_tbio | .c | platform/external/ltp/testcases/kernel/device-drivers/tbio/tbio_kernel/ltp_tbio.c | 12,279 | utf_8 | 03acacb883af01d7e3d0ef7e669f72ba | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* This module will test block io layer.
*
* module: tbio
*
* FILE : tbio.c
* USAGE : kernel_space:./load_tbio.sh
* user_space :./test_bio
*
* DESCRIPTION : The module will test block i/o layer for kernel 2.... |
google | android | tbio | .c | platform/external/ltp/testcases/kernel/device-drivers/tbio/tbio_user/tbio.c | 7,235 | utf_8 | 135e54a85d9fcd854473de4a6ff4534e | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* This is the main of your user space test program,
* which will open the correct kernel bioule, find the
* file descriptor value and use that value to make
* ioctl calls to the system
*
* Use the ki_generic and other ki_testname functions
... |
google | android | tusb | .c | platform/external/ltp/testcases/kernel/device-drivers/usb/tusb/tusb.c | 11,683 | utf_8 | ba3f7c721fabb09e3d73ad6de3d90b67 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* This is a kernel module for testing usb
* kernel functions found in /usr/src/<linux_
* dir>/drivers/usb. The module is registered
* as a char device with the system so that
* ioctl calls can be made in a user space
* prog... |
google | android | tusb_ki | .c | platform/external/ltp/testcases/kernel/device-drivers/usb/user_usb/tusb_ki.c | 2,239 | utf_8 | 084ab86bddc95a040bd6bd0e3b55ac37 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*
* This file will include functions that will drive the
* kernel module tusb to test various usb functions
* and kernel calls. Each function will need to setup the tif
* structure so that the in parameters and out parameter... |
google | android | user_tusb | .c | platform/external/ltp/testcases/kernel/device-drivers/usb/user_usb/user_tusb.c | 3,935 | utf_8 | 88b2d6d4c6522cd247b39f632b1a8d7a | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include "../tusb/tusb.h"
static int tusb_fd = -1; /... |
google | android | rtc01 | .c | platform/external/ltp/testcases/kernel/device-drivers/rtc/rtc01.c | 6,025 | utf_8 | 208de47e8f3765b6b665a0a9e427ea83 | /* rtc-test.c
*
* Tests for the Real Time Clock driver.
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/rtc.h>
#include <errno.h>
#include <time.h>
#include... |
google | android | rtc02 | .c | platform/external/ltp/testcases/kernel/device-drivers/rtc/rtc02.c | 3,390 | utf_8 | 919fb5b8e8a1cb24b4896585e4d9ded4 | */
/*\
* [Description]
*
* RTC device set time function test.
*
* [Algorithm]
*
* - Save RTC time
* - Set RTC time
* - Read the RTC time back
* - Check if the set time and the read time are identical
* - Restore RTC time
*/
#include <stdio.h>
#include "tst_rtctime.h"
#include "tst_wallclock.h"
#include "ts... |
google | android | zram03 | .c | platform/external/ltp/testcases/kernel/device-drivers/zram/zram03.c | 6,377 | utf_8 | 9658fc0a035ba9b7cec796b6bca63110 | */
/*\
* [Description]
*
* zram: generic RAM based compressed R/W block devices
* http://lkml.org/lkml/2010/8/9/227
*
* This case check whether data read from zram device is consistent with
* thoese are written.
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <errno.h>
#include <... |
google | android | video_dummy | .c | platform/external/ltp/testcases/kernel/device-drivers/v4l/kernel_space/video_dummy.c | 2,521 | utf_8 | cd32d52beda0907adda91983e14bf71f | #include <linux/module.h>
#include <linux/version.h>
#include <linux/fs.h>
#include <linux/videodev2.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-dev.h>
struct dummy_dev {
struct video_device *vfd;
};
static int dummy_open(struct inode *inode, struct file *file)
{
int minor = iminor(inode);
printk(KERN_DEBU... |
google | android | ltp_acpi | .c | platform/external/ltp/testcases/kernel/device-drivers/acpi/ltp_acpi.c | 3,784 | utf_8 | a0351aaf7a550d9ff1abb8dbaeca7fe3 | /*
*/
#include <stdio.h>
#include <stdlib.h>
#include "test.h"
#include "old_module.h"
#include "safe_macros.h"
#include "ltp_acpi.h"
char *TCID = "ltp_acpi";
int TST_TOTAL = ACPI_TC_NUM;
static const char dev_result[] = "/sys/devices/" ACPI_TEST_NAME "/result";
static const char dev_path[] = "/sys/devices/" ACPI_TEST... |
google | android | ltp_acpi_cmds | .c | platform/external/ltp/testcases/kernel/device-drivers/acpi/ltp_acpi_cmds.c | 17,408 | utf_8 | f22541199f3daeef6e94172c0d7a378a | /*
* -Ported
* updated - 01/09/2005 Updates from Intel to add functionality
*
* - Updated for Linux kernel 2.6.28
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
#include <linux/ioctl.h>
#include <linux/... |
google | android | includeTest | .c | platform/external/ltp/testcases/kernel/device-drivers/include/includeTest.c | 6,618 | utf_8 | 6216839c0f607a9f10493d336bbd40b8 | /*
*
* Module: includeTest
*
*/
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/ioctl.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/pm.h>
#include <linux/genhd.h>
#include <linux/in.h>
#include <asm/types.h>
#include <linux/lockd/bind.h>
#include <acpi... |
google | android | userBlockInclude | .c | platform/external/ltp/testcases/kernel/device-drivers/include/userBlockInclude.c | 3,538 | utf_8 | 6903ab63065811f08fb75a834e3d25d2 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/kd.h>
#i... |
google | android | uaccess | .c | platform/external/ltp/testcases/kernel/device-drivers/uaccess/uaccess.c | 2,847 | utf_8 | 45e045266914a8238992546b5e4d161f | /*
*
* Test checks kernel API to safely access user-space memory using
* copy_to_user(), copy_from_user(), get_user(), put_user() functions.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "test.h"
#include "old_module.h"
#include "safe_macros.h"
#include "ltp_uaccess.h"
char *TCID = DEV_N... |
google | android | ltp_uaccess | .c | platform/external/ltp/testcases/kernel/device-drivers/uaccess/ltp_uaccess.c | 3,439 | utf_8 | 84a95ff1f99621d54f3a32cec30d87c3 | /*
*
*/
#include <linux/module.h>
#include <linux/device.h>
#include <linux/uaccess.h>
#include "ltp_uaccess.h"
#define prk_err(fmt, ...) \
pr_err(DEV_NAME ": " fmt "\n", ##__VA_ARGS__)
#define prk_info(fmt, ...) \
pr_info(DEV_NAME ": " fmt "\n", ##__VA_ARGS__)
/*
* Test-case result,
* if test is passed, value wi... |
google | android | tbase.mod | .c | platform/external/ltp/testcases/kernel/device-drivers/base/tbase/tbase.mod.c | 1,052 | utf_8 | a9a7f8d7ff54e1063dfd0c454b052a56 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <linux/module.h>
#include <linux/vermagic.h>
#include <linux/compiler.h>
MODULE_INFO(vermagic, VERMAGIC_STRING);
static const char __module_depends[]
__attribute_used__ __attribute__ ((section(".modinfo"))) = "depends=... |
google | android | tbase | .c | platform/external/ltp/testcases/kernel/device-drivers/base/tbase/tbase.c | 19,925 | utf_8 | d22ecd916d4965d511d4a29d847ab719 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* This test module is for executing and testing
* the kernel code from drivers/base. This module
* is driven by a user space program through
* calls to the ioctl
*
* author: Sean Ruyle
* date: 07/14/2003
*
* module... |
google | android | tbase_ki | .c | platform/external/ltp/testcases/kernel/device-drivers/base/user_base/tbase_ki.c | 1,984 | utf_8 | 6cb2e6a21d7b0033579eb2b039fde464 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* This file will include user space functions that will drive
* the kernel module to test various functions and kernel
* calls. Each function will need to setup the tif structure
* so that the in parameters and out parameters... |
google | android | user_tbase | .c | platform/external/ltp/testcases/kernel/device-drivers/base/user_base/user_tbase.c | 6,612 | utf_8 | 17fb61d9326e654f0c53e046cde6d8da | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* This is the main of your user space test program,
* which will open the correct kernel module, find the
* file descriptor value and use that value to make
* ioctl calls to the system
*
* Use the ki_generic and other ki_te... |
google | android | nlsTest | .c | platform/external/ltp/testcases/kernel/device-drivers/nls/nlsTest.c | 6,668 | utf_8 | 5e844e9b338e1b1097a462a1ae8cf9d0 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Legacy Power Management (PM) was removed from the kernel, removed it from
* here also. ( http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6afe1a1fe8ff83f6ac2726b04665e76ba7b14f3e )
*
*/
#inclu... |
google | android | userBlockNLS | .c | platform/external/ltp/testcases/kernel/device-drivers/nls/userBlockNLS.c | 3,506 | utf_8 | 50ee209ba4e12b2148e76bac6faa4b66 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/kd.h>
#i... |
google | android | tagp | .c | platform/external/ltp/testcases/kernel/device-drivers/agp/kernel_space/tagp.c | 17,153 | utf_8 | 3b177854ad31437ef69f73cc83d9f3d5 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* This example module shows how a test driver
* can be driven through various ioctl calls in
* a user space program that has attained the
* appropriate file descriptor for this device.
*
* author: Kai Zhao
* date: 08... |
google | android | tagp_ki | .c | platform/external/ltp/testcases/kernel/device-drivers/agp/user_space/tagp_ki.c | 2,706 | utf_8 | 7ad482dc9a08d667594d87604b4aa657 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* This file will include user space functions that will drive
* the kernel module to test various functions and kernel
* calls. Each function will need to setup the tif structure
* so that the in parameters and out parame... |
google | android | user_tagp | .c | platform/external/ltp/testcases/kernel/device-drivers/agp/user_space/user_tagp.c | 7,976 | utf_8 | b42bb1ae2e061c815f09e80df017820c | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* This is the main of your user space test program,
* which will open the correct kernel module, find the
* file descriptor value and use that value to make
* ioctl calls to the system
*
* Use the ki_generic and other k... |
google | android | tmod.mod | .c | platform/external/ltp/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.mod.c | 1,098 | utf_8 | dfefd626b16f96596d7e2951016aa4a8 | #include <linux/module.h>
/*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <linux/vermagic.h>
#include <linux/compiler.h>
const char vermagic[]
__attribute__ ((section("__vermagic"))) = VERMAGIC_STRING;
static const char __module_depends[]
__attribute_used__ __... |
google | android | tmod | .c | platform/external/ltp/testcases/kernel/device-drivers/dev_sim_framework/kernel_space/tmod.c | 6,573 | utf_8 | 0341b38b1608cfce1a6daa6f1dd2c0b7 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* This example module shows how a test driver
* can be driven through various ioctl calls in
* a user space program that has attained the
* appropriate file descriptor for this device.
*
* author: Sean Ruyle
* date: 06/1... |
google | android | tmod_ki | .c | platform/external/ltp/testcases/kernel/device-drivers/dev_sim_framework/user_space/tmod_ki.c | 2,705 | utf_8 | 54a5bd8749e03fa5bc890a4060947b3c | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* This file will include user space functions that will drive
* the kernel module to test various functions and kernel
* calls. Each function will need to setup the tif structure
* so that the in parameters and out parameters... |
google | android | user_tmod | .c | platform/external/ltp/testcases/kernel/device-drivers/dev_sim_framework/user_space/user_tmod.c | 3,663 | utf_8 | 2a72a25d63b598604e2fc19f88b590d8 | /*
/*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* This is the main of your user space test program,
* which will open the correct kernel module, find the
* file descriptor value and use that value to make
* ioctl calls to the system
*
* Use the ki_generic and other ki... |
google | android | test-cmpxchg-nolock | .c | platform/external/ltp/testcases/kernel/device-drivers/misc_modules/per_cpu_atomic_operations_vs_interrupt_disabling_module/test-cmpxchg-nolock.c | 8,325 | utf_8 | 7ca53f31dc0f97bd996995729ad2ba51 | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/* usage :
make
insmod test-cmpxchg-nolock.ko
in... |
google | android | test_per_cpu_allocator_module | .c | platform/external/ltp/testcases/kernel/device-drivers/misc_modules/per_cpu_allocator_module/test_per_cpu_allocator_module.c | 6,390 | utf_8 | 9ba2a3c6b975a761d0504e69e20a56b8 | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | ltp_tpci | .c | platform/external/ltp/testcases/kernel/device-drivers/pci/tpci_kernel/ltp_tpci.c | 15,693 | utf_8 | f2daf16e37d10b456f1d793b50309a95 | /*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* This pci and pci-express testing kernel module will allow test calls
* to be driven through various ioctl calls in a
* user space program that has attained the appropriate
* file descriptor for this device. For the functions of
... |
google | android | tpci | .c | platform/external/ltp/testcases/kernel/device-drivers/pci/tpci_user/tpci.c | 2,682 | utf_8 | 2110c6ca92c4e807069dafb666855817 | /*
*
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include "test.h"
#include "safe_macros.h"
#include "old_module.h"
#include "../tpci_kernel/tpci.h"
char *TCID = "test_pci";
int TST_TOTAL = PCI_TCASES_NUM;
static const char module_name[] = P... |
google | android | cpufreq_boost | .c | platform/external/ltp/testcases/kernel/device-drivers/cpufreq/cpufreq_boost.c | 5,552 | utf_8 | e4844c5c029e666291ebf0262bc55b94 | /*
*
* Check support for disabling dynamic overclocking in acpi_cpufreq driver.
* Required Linux 3.7+.
*
* The test compares time spent on sum calculation with/without
* boost-disable bit. If boost is enabled we can get a slightly shorter
* time period. Measure elapsed time instead of sysfs cpuinfo_cur_freq valu... |
google | android | irqbalance01 | .c | platform/external/ltp/testcases/kernel/irq/irqbalance01.c | 6,686 | utf_8 | 6cad878fd48f715141daca886b5e6558 | /*\
* [Description]
*
* Check that something (e.g. irqbalance daemon) is performing IRQ
* load balancing.
*
* On many systems userland needs to set /proc/irq/$IRQ/smp_affinity
* to prevent many IRQs being delivered to the same CPU.
*
* Note some drivers and IRQ controllers will distribute IRQs
* evenly. Some ... |
google | android | pivot_root01 | .c | platform/external/ltp/testcases/kernel/syscalls/pivot_root/pivot_root01.c | 4,295 | utf_8 | 202099f6fd19c2af6a83d4ea640c49af | #define _GNU_SOURCE
#include "config.h"
#include <errno.h>
#include <lapi/syscalls.h>
#include <sched.h>
#include <stdlib.h>
#include "tst_test.h"
#include "lapi/mount.h"
#ifdef HAVE_UNSHARE
#ifdef HAVE_LIBCAP
#include <sys/capability.h>
#endif
#define CHROOT_DIR "chroot"
#define NEW_ROOT "/new_root"
#define PUT_OLD "... |
google | android | sigwait01 | .c | platform/external/ltp/testcases/kernel/syscalls/sigwait/sigwait01.c | 743 | utf_8 | 79a7956fc556bd0c68060aee8c7eea60 | #include "libsigwait.h"
static int my_sigwait(const sigset_t * set,
siginfo_t * info LTP_ATTRIBUTE_UNUSED,
void *timeout LTP_ATTRIBUTE_UNUSED)
{
int ret;
int err = sigwait(set, &ret);
if (err == 0)
return ret;
errno = err;
return -1;
}
struct sigwait_test_desc tests[] = {
{ test_unmasked_matchin... |
google | android | remap_file_pages02 | .c | platform/external/ltp/testcases/kernel/syscalls/remap_file_pages/remap_file_pages02.c | 3,705 | utf_8 | 340a459c0a244d73148d109f75704f27 | *
* DESCRIPTION
* The remap_file_pages() system call is used to create a non-linear
* mapping, that is, a mapping in which the pages of the file are mapped
* into a non-sequential order in memory. The advantage of using
* remap_file_pages() over using repeated calls to mmap(2) is that
* the ... |
google | android | remap_file_pages01 | .c | platform/external/ltp/testcases/kernel/syscalls/remap_file_pages/remap_file_pages01.c | 7,218 | utf_8 | 0076eaabbd6140d4d725f6605c9ee6b7 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/*
* NAME
* remap_file_pages01
*
* DESCRIPTION
* The remap_file_pages() system call is used to create a non-linear
* mapping, that is, a mapping in which the pages of the file are mapped
* into a non-sequential order in memory.... |
google | android | execv01_child | .c | platform/external/ltp/testcases/kernel/syscalls/execv/execv01_child.c | 594 | utf_8 | 9a4c45983f3114160d729b04397de947 | * AUTHOR : William Roske
* CO-PILOT : Dave Fenner
*/
#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[... |
google | android | execv01 | .c | platform/external/ltp/testcases/kernel/syscalls/execv/execv01.c | 898 | utf_8 | 095abbdf7e1c58a8d3e64734b18c3bc6 | * AUTHOR : William Roske
* CO-PILOT : Dave Fenner
*/
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include "tst_test.h"
static void verify_execv(void)
{
pid_t pid;
char *const args[] = { "execv01_child", "canary", NULL};
char p... |
google | android | modify_ldt01 | .c | platform/external/ltp/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c | 4,745 | utf_8 | a4e6e79aaee68245a95105cc36e94bb6 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* NAME
* modify_ldt01.c
*
* DESCRIPTION
* Testcase to check the error conditions for modify_ldt(2)
*
* CALLS
* modify_ldt()
*
* ALGORITHM
* block1:
* Invoke modify_ldt() with a func value which is neither
* 0 o... |
google | android | modify_ldt03 | .c | platform/external/ltp/testcases/kernel/syscalls/modify_ldt/modify_ldt03.c | 2,008 | utf_8 | 0843911dad444b5f9e780983730c6000 | /*
* with this program.
*/
/*
* DESCRIPTION
* Basic test for modify_ldt(2) using func=0 argument.
*/
#include "config.h"
#include "test.h"
char *TCID = "modify_ldt03";
int TST_TOTAL = 1;
#if defined(__i386__) && defined(HAVE_MODIFY_LDT)
#ifdef HAVE_ASM_LDT_H
# include <asm/ldt.h>
#endif
extern int modify_ldt(int, ... |
google | android | modify_ldt02 | .c | platform/external/ltp/testcases/kernel/syscalls/modify_ldt/modify_ldt02.c | 4,354 | utf_8 | aa35d8164864c273a96ce5df41ae5d8e | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* NAME
* modify_ldt02.c
*
* DESCRIPTION
* Testcase to check the error conditions for modify_ldt(2)
*
* ALGORITHM
* block1:
* Create a segment at entry 0 and a valid base address.
* Read the contents of the segment... |
google | android | recvfrom01 | .c | platform/external/ltp/testcases/kernel/syscalls/recvfrom/recvfrom01.c | 8,165 | utf_8 | 03e18a8eca539c9acd621f92f490712c | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Test Name: recvfrom01
*
* Test Description:
* Verify that recvfrom() returns the proper errno for various failure cases
*
* Usage: <for command-line>
* recvfrom01 [-c n] [-e] [-i n] [-I x] [-P x] [-t]
* ... |
google | android | readahead02 | .c | platform/external/ltp/testcases/kernel/syscalls/readahead/readahead02.c | 10,834 | utf_8 | 020b44a39fde57a8459e4218e53b9f92 | */
/*
* functional test for readahead() syscall
*
* This test is measuring effects of readahead syscall.
* It mmaps/reads a test file with and without prior call to readahead.
*
* The overlay part of the test is regression for:
* b833a3660394
* ("ovl: add ovl_fadvise()")
* Introduced by:
* 5b910bd615ba
*... |
google | android | readahead01 | .c | platform/external/ltp/testcases/kernel/syscalls/readahead/readahead01.c | 1,869 | utf_8 | 92df2658aebe3ae80fff7a15af2c31fc | */
/*\
* [Description]
*
* Verify that readahead() syscall fails with:
*
* - EBADF when fd is not a valid file descriptor or is not open for reading.
* - EINVAL when fd does not refer to a file type to which readahead()
* can be applied.
*/
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#in... |
google | android | rt_tgsigqueueinfo01 | .c | platform/external/ltp/testcases/kernel/syscalls/rt_tgsigqueueinfo/rt_tgsigqueueinfo01.c | 3,851 | utf_8 | 36119980020237751aae2ab7b30fcbf3 | */
/*
* Test rt_tgsigqueueinfo
*
* This tests the rt_tgsigqueueinfo() syscall. It sends the signal and data
* to the single thread specified by the combination of tgid, a thread group
* ID, and tid, a thread in that thread group.
*
* Also this implement 3 tests differing on the basis of signal sender:
* - Send... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.