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 | wqueue03 | .c | platform/external/ltp/testcases/kernel/watchqueue/wqueue03.c | 856 | utf_8 | 8f4d1f107b3b88c7b849216556b6e747 | */
/*\
* [Description]
*
* Test if keyctl revoke is correctly recognized by watch queue.
*/
#define _GNU_SOURCE
#include "tst_test.h"
#include "lapi/keyctl.h"
#include "common.h"
static void saw_key_revoked(struct watch_notification *n, size_t len,
unsigned int wtype)
{
if (wqueue_key_event(n, len, wtype, ... |
google | android | wqueue08 | .c | platform/external/ltp/testcases/kernel/watchqueue/wqueue08.c | 987 | utf_8 | 9620f53fc98ded28fae7604386180969 | */
/*\
* [Description]
*
* Test if key watch removal is correctly recognized by watch queue.
*/
#define _GNU_SOURCE
#include "tst_test.h"
#include "lapi/keyctl.h"
#include "common.h"
static void saw_watch_removal(struct watch_notification *n,
LTP_ATTRIBUTE_UNUSED size_t len,
unsigned int wtype)
{... |
google | android | wqueue07 | .c | platform/external/ltp/testcases/kernel/watchqueue/wqueue07.c | 887 | utf_8 | 6c1e69ae415863e86a3d62e367837b8c | */
/*\
* [Description]
*
* Test if keyctl setperm is correctly recognized by watch queue.
*/
#define _GNU_SOURCE
#include "tst_test.h"
#include "lapi/keyctl.h"
#include "common.h"
static void saw_key_setattr(struct watch_notification *n, size_t len,
unsigned int wtype)
{
if (wqueue_key_event(n, len, wtype,... |
google | android | wqueue09 | .c | platform/external/ltp/testcases/kernel/watchqueue/wqueue09.c | 1,285 | utf_8 | fa4a8c4f417c6b747d1a494865d3e53d | */
/*\
* [Description]
*
* Fill the watch queue and wait for a notification loss.
*/
#define _GNU_SOURCE
#include <unistd.h>
#include "tst_test.h"
#include "lapi/keyctl.h"
#include "common.h"
#define WATCH_QUEUE_NOTE_SIZE 128
static int data_lost;
static key_serial_t key;
static int fd;
static void saw_data_loss(s... |
google | android | wqueue02 | .c | platform/external/ltp/testcases/kernel/watchqueue/wqueue02.c | 886 | utf_8 | 8f175aed648fe8535d5b3ec9a2983ba7 | */
/*\
* [Description]
*
* Test if keyctl unlink is correctly recognized by watch queue.
*/
#define _GNU_SOURCE
#include "tst_test.h"
#include "lapi/keyctl.h"
#include "common.h"
static void saw_key_unlinked(struct watch_notification *n, size_t len,
unsigned int wtype)
{
if (wqueue_key_event(n, len, wtype... |
google | android | wqueue01 | .c | platform/external/ltp/testcases/kernel/watchqueue/wqueue01.c | 864 | utf_8 | df9cb84f1104aff4a8f4a679a46ee9b4 | */
/*\
* [Description]
*
* Test if keyctl update is correctly recognized by watch queue.
*/
#define _GNU_SOURCE
#include "tst_test.h"
#include "lapi/keyctl.h"
#include "common.h"
static void saw_key_updated(struct watch_notification *n, size_t len,
unsigned int wtype)
{
if (wqueue_key_event(n, len, wtype, ... |
google | android | wqueue05 | .c | platform/external/ltp/testcases/kernel/watchqueue/wqueue05.c | 881 | utf_8 | 3369dd58e4a9108b32b2229483236a1d | */
/*\
* [Description]
*
* Test if keyctl invalidate is correctly recognized by watch queue.
*/
#define _GNU_SOURCE
#include "tst_test.h"
#include "lapi/keyctl.h"
#include "common.h"
static void saw_key_invalidated(struct watch_notification *n, size_t len,
unsigned int wtype)
{
if (wqueue_key_event(n, len, wt... |
google | android | wqueue06 | .c | platform/external/ltp/testcases/kernel/watchqueue/wqueue06.c | 869 | utf_8 | bc49ea5c9dd2b1849d49ebd7508517a8 | */
/*\
* [Description]
*
* Test if keyctl clear is correctly recognized by watch queue.
*/
#define _GNU_SOURCE
#include "tst_test.h"
#include "lapi/keyctl.h"
#include "common.h"
static void saw_key_cleared(struct watch_notification *n, size_t len,
unsigned int wtype)
{
if (wqueue_key_e... |
google | android | wqueue04 | .c | platform/external/ltp/testcases/kernel/watchqueue/wqueue04.c | 870 | utf_8 | a988de420f15050901c6b298b86fd4e4 | */
/*\
* [Description]
*
* Test if keyctl link is correctly recognized by watch queue.
*/
#define _GNU_SOURCE
#include "tst_test.h"
#include "lapi/keyctl.h"
#include "common.h"
static void saw_key_linked(struct watch_notification *n, size_t len,
unsigned int wtype)
{
if (wqueue_key_event(n, len, wtype, NOTI... |
google | android | fw_load | .c | platform/external/ltp/testcases/kernel/firmware/fw_load_user/fw_load.c | 5,199 | utf_8 | 7aa61b0d98425e0243274e37ef6d5a86 | /*
*
* Test checks device firmware loading.
*/
#define _GNU_SOURCE
#include <sys/utsname.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "test.h"
#include "safe_macros.h"
#include "old_module.h"
/* number of test firmware files */
#define FW_FILES 5
char *TCID = "fw_load";
... |
google | android | ltp_fw_load | .c | platform/external/ltp/testcases/kernel/firmware/fw_load_kernel/ltp_fw_load.c | 4,335 | utf_8 | e80182df2b8473a4455afaf84122ecc3 | /*
*
* This module is trying to load external test firmware files (n#_load_tst.fw).
* In the end, it writes results to /sys/devices/ltp_fw_load/result file.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/string.h>
#include <linux/firmware.h>
... |
google | android | af_alg01 | .c | platform/external/ltp/testcases/kernel/crypto/af_alg01.c | 1,946 | utf_8 | c92164ba1bbc02effcd9420123273221 | */
/*
* Regression test for commit af3ff8045bbf ("crypto: hmac - require that the
* underlying hash algorithm is unkeyed"), or CVE-2017-17806. This test
* verifies that the hmac template cannot be nested inside itself.
*/
#include <errno.h>
#include <stdio.h>
#include "tst_test.h"
#include "tst_af_alg.h"
#include... |
google | android | crypto_user02 | .c | platform/external/ltp/testcases/kernel/crypto/crypto_user02.c | 4,099 | utf_8 | 01c459b7cb8396bd33c1bce924b9c7a6 | */
/*
* Regression test for kernel commit 21d4120ec6f5 ("crypto: user - prevent
* operating on larval algorithms"). See the commit message for a detailed
* explanation of the problem. Basically, this test tries to cause a NULL
* pointer dereference in the kernel by abusing the CRYPTO_MSG_DELALG message in
* the... |
google | android | af_alg02 | .c | platform/external/ltp/testcases/kernel/crypto/af_alg02.c | 2,104 | utf_8 | ce2f68f96f1ecad51a8b5fd3abacaa70 | */
/*
* Regression test for commit ecaaab564978 ("crypto: salsa20 - fix
* blkcipher_walk API usage"), or CVE-2017-17805. This test verifies that an
* empty message can be encrypted with Salsa20 without crashing the kernel.
*
* Fix for kernels < 4.14:
* With kernels missing commit 2d97591ef43d ("crypto: af_alg -... |
google | android | crypto_user01 | .c | platform/external/ltp/testcases/kernel/crypto/crypto_user01.c | 5,296 | utf_8 | 8111c10f3b6a5c2c348f288c836f52f8 | */
/*
* Regression test for commit f43f39958beb ("crypto: user - fix leaking
* uninitialized memory to userspace"), or CVE-2018-19854; it was also a
* re-introduction of CVE-2013-2547. This bug caused uninitialized kernel stack
* memory to be leaked in some string fields in the replies to CRYPTO_MSG_GETALG
* mes... |
google | android | af_alg05 | .c | platform/external/ltp/testcases/kernel/crypto/af_alg05.c | 1,771 | utf_8 | a1986ab99752026122714b901cd5f250 | */
/*
* Regression test for commit 8088d3dd4d7c ("crypto: skcipher - fix crash
* flushing dcache in error path"). This test verifies the kernel doesn't crash
* when trying to encrypt a message with size not aligned to the block cipher's
* block size, and where the destination buffer starts exactly at a page
* bo... |
google | android | af_alg07 | .c | platform/external/ltp/testcases/kernel/crypto/af_alg07.c | 3,253 | utf_8 | a5ea2cfad6e83808a3c858a0164e9b9f | */
/*
* CVE-2019-8912
*
* Check for possible use-after-free in sockfs_setattr() on AF_ALG socket
* closed by dup2() or dup3(). Unlike regular close(), dup*() syscalls don't
* set sock->sk = NULL after closing the socket. Racing fchownat() against
* dup2() may then result in sockfs_setattr() using the stale point... |
google | android | pcrypt_aead01 | .c | platform/external/ltp/testcases/kernel/crypto/pcrypt_aead01.c | 1,945 | utf_8 | e3f4846279c6379253e14a0895e9beb8 | *
* Originally found by syzkaller:
* https://groups.google.com/forum/#!topic/syzkaller-bugs/NKn_ivoPOpk
*
* Test for CVE-2017-5754 - pcrypt mishandles freeing instances.
*
* The test works by adding and then removing pcrypt-AEAD instances.
* See commit d76c68109f37 crypto: pcrypt - fix freeing pcrypt instances.... |
google | android | af_alg03 | .c | platform/external/ltp/testcases/kernel/crypto/af_alg03.c | 906 | utf_8 | bf61190dcfffd0ad70e9de1f3825439e | */
/*
* Regression test for commit e57121d08c38 ("crypto: chacha20poly1305 - validate
* the digest size"). This test verifies that the rfc7539 template can't be
* instantiated with a hash algorithm whose digest size is not 16 bytes.
*/
#include "tst_test.h"
#include "tst_af_alg.h"
static void run(void)
{
tst_req... |
google | android | af_alg06 | .c | platform/external/ltp/testcases/kernel/crypto/af_alg06.c | 1,397 | utf_8 | 566bbf203ef13f54d4189b2725811cb3 | */
/*
* Regression test for commit 8f9c46934848 ("crypto: authenc - fix parsing key
* with misaligned rta_len"). Based on the reproducer from the commit message.
*/
#include <errno.h>
#include "tst_test.h"
#include "tst_af_alg.h"
#include "lapi/socket.h"
/*
* include after <sys/socket.h> (via tst_test.h), to work... |
google | android | af_alg04 | .c | platform/external/ltp/testcases/kernel/crypto/af_alg04.c | 1,886 | utf_8 | 6c2a2f43eabe896b48ce69c4d557f2f4 | */
/*
* Regression test for commit bb2964810233 ("crypto: vmac - separate tfm and
* request context"). This test verifies that a VMAC transform can be used by
* multiple concurrent hash requests without crashing the kernel. Based on the
* reproducer from the commit message.
*/
#include <stdio.h>
#include <sys/w... |
google | android | cpuctl_def_task01 | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c | 9,309 | utf_8 | dbcad2193b6fe961d1c1cf86441d2cbf | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cpuctl_latency_test | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl/cpuctl_latency_test.c | 4,506 | utf_8 | a2a1c4c6ebefefedcf1e4c4fdbe437b3 | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cpuctl_test02 | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl/cpuctl_test02.c | 10,796 | utf_8 | 56d92edc9a43fa2edb9111164f6d07ea | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cpuctl_test01 | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl/cpuctl_test01.c | 10,517 | utf_8 | 75a051c229dd3c02046e63418c538b56 | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cpuctl_def_task02 | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c | 9,461 | utf_8 | bd2d39b6c1658d0e30a7341ba600afba | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cpuctl_def_task03 | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c | 9,415 | utf_8 | 80e83c0df643c8aa81ef01a8ba96c549 | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cpuctl_def_task04 | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c | 9,564 | utf_8 | 1a37986e7f1c260f2937edf9379917ce | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cpuctl_latency_check_task | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl/cpuctl_latency_check_task.c | 6,132 | utf_8 | ebf25aac63cdc852169bbd4a49c04ad7 | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cpuctl_test04 | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl/cpuctl_test04.c | 10,009 | utf_8 | ee467456715d7a25331962e6ad50e5d1 | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cpuctl_test03 | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl/cpuctl_test03.c | 9,595 | utf_8 | fe37c5c6afe571699de0934f3d313304 | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | vfork | .c | platform/external/ltp/testcases/kernel/controllers/freezer/vfork.c | 8,563 | utf_8 | c6f70ab5e54d2b8a94a6c547abbde4f2 | /*
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* Usage: $0 <num>
*
* vfork <num> times, stopping after each vfork. TODO: Requires an external process
* to send SIGCONT to goto the next vfork. <num> SIGCONT signals must be
* received before exiting.
*
* We can't do anything ... |
google | android | timed_forkbomb | .c | platform/external/ltp/testcases/kernel/controllers/freezer/timed_forkbomb.c | 2,240 | utf_8 | 20c526a82a787f8937af91fd1df47283 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include <signal.h>
int main(int argc, char **argv)
{
struct timeval start, no... |
google | android | fork_exec_loop | .c | platform/external/ltp/testcases/kernel/controllers/freezer/fork_exec_loop.c | 1,201 | utf_8 | fc3d5a69d32f67595d055dfbd05b0bb7 | /*
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
int main(int argc, char **argv)
{
int count = argc > 1 ? atoi(argv[1]) : 20;
while (1) {
int i, s;
for (i = 0; i < count; i++)... |
google | android | memctl_test01 | .c | platform/external/ltp/testcases/kernel/controllers/memctl/memctl_test01.c | 7,270 | utf_8 | b7e820a285f4a473097590966eeeb2c8 | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cpuctl_fj_cpu-hog | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl_fj/cpuctl_fj_cpu-hog.c | 2,526 | utf_8 | 0e58f2052cd096c68962a92de46f2576 | /******************************************************************************/
/* */
/******************************************************************************/
#include <stdio.h>
#include <math.h>
#include <err.h>
#include <errno.h>
#inc... |
google | android | cpuctl_fj_simple_echo | .c | platform/external/ltp/testcases/kernel/controllers/cpuctl_fj/cpuctl_fj_simple_echo.c | 2,616 | utf_8 | e00a5e9ba302bac5f43766096dfa38c4 | /******************************************************************************/
/* */
/******************************************************************************/
/*++ simple_echo.c
*
* DESCRIPTION:
* The command "echo" can't return the ... |
google | android | io_control01 | .c | platform/external/ltp/testcases/kernel/controllers/io/io_control01.c | 3,999 | utf_8 | ae7569b62adeb6c95a3920b0c51cb55c | */
/*\
*
* [Description]
*
* Perform some I/O on a file and check if at least some of it is
* recorded by the I/O controller.
*
* The exact amount of I/O performed is dependent on the file system,
* page cache, scheduler and block driver. We call sync and drop the
* file's page cache to force reading and writ... |
google | android | pids_task1 | .c | platform/external/ltp/testcases/kernel/controllers/pids/pids_task1.c | 1,481 | utf_8 | 3f8cc4584511e3e8650503ecdd3ab2a4 | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Description:
* Write the current process in argv[1]
* and returns:
* -> 2 if fork fails with EAGAIN,
* -> 1 if there is another problem
* -> 0 if everything worked
*/
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <er... |
google | android | pids_task2 | .c | platform/external/ltp/testcases/kernel/controllers/pids/pids_task2.c | 838 | utf_8 | f5c80e70be79606dcbefbb8885851510 | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <unistd.h>
int main(void)
{
pause();
return 0;
} |
google | android | libcontrollers | .c | platform/external/ltp/testcases/kernel/controllers/libcontrollers/libcontrollers.c | 6,974 | utf_8 | 860e0c2a20e6993bfaa09f64c82dc717 | /******************************************************************************/
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
/* */
/***********************************************************************... |
google | android | cgroup_xattr | .c | platform/external/ltp/testcases/kernel/controllers/cgroup_xattr/cgroup_xattr.c | 10,387 | utf_8 | f40778d953f0cc3a81ab4a9b9757ee79 | /*
*
* Test checks following preconditions:
* since Linux kernel 3.7 it is possible to set extended attributes
* to cgroup files.
*/
#include <sys/stat.h>
#include <sys/mount.h>
#include <sys/types.h>
#include <sys/xattr.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <dirent.h>
#include <uni... |
google | android | cpuset_mem_hog | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_mem_hog.c | 3,383 | utf_8 | 6cb79456814877231dbd5c796f10324a | /******************************************************************************/
/* */
/******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h... |
google | android | cpuset_sched_domains_check | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_check.c | 4,323 | utf_8 | 1d55431d22cbd573476679e586da8add | /******************************************************************************/
/* */
/******************************************************************************/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h... |
google | android | cpuset_cpu_hog | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_cpu_hog.c | 7,227 | utf_8 | a22e2457ea2efdbb7f9f8bb431c817cd | /******************************************************************************/
/* */
/******************************************************************************/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h... |
google | android | cpuset_memory_pressure | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/cpuset_memory_pressure.c | 2,727 | utf_8 | ad80260833ce1093dc0f9642d9fd8a3d | /******************************************************************************/
/* */
/******************************************************************************/
#include <sys/mman.h>
#include <err.h>
#include <errno.h>
#include <libgen.h>... |
google | android | cpuset_syscall_test | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c | 5,793 | utf_8 | 0e6105d07c091de83c8c2fbf6d11f94a | /******************************************************************************/
/* */
/******************************************************************************/
#define _GNU_SOURCE
#include "config.h"
#include <sched.h>
#include <unistd.h... |
google | android | cpuset_memory_test | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_test.c | 9,096 | utf_8 | 5266eb68dc4b6c4bdbc9684a30aa7542 | /******************************************************************************/
/* */
/******************************************************************************/
#include "config.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h... |
google | android | cpuset_list_compute | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_list_compute.c | 2,172 | utf_8 | e2281b555ac169e6751daff24c560ac3 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <dirent.h>
#include <sys/types.h>
#include <pwd.h>
#include <err.h>
#include "../cpuset_lib/common.h"
#include "../cpuset_lib/bitmask.h"
#define MAX_STRING_SIZE 400
#define MAX_NBITS 1024
#define USAGE ("Usage :... |
google | android | meminfo | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/meminfo.c | 2,134 | utf_8 | 5a7883e781e4d1f78ee6aec078fd8651 | #include <stdio.h>
#include <string.h>
#include "common.h"
#include "bitmask.h"
#include "cpuset.h"
#include "meminfo.h"
#define LIST_PRESENT_MEM_FILE "/sys/devices/system/node/possible"
#define LIST_ONLINE_MEM_FILE "/sys/devices/system/node/online"
int nmems;
int mems_nbits;
/*
* get the bitmask of the online nod... |
google | android | cpuinfo | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/cpuinfo.c | 9,656 | utf_8 | 1f70dbbfb5ab8fa03741d7c1c981f2d5 | #include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
#include <err.h>
#include <errno.h>
#include "bitmask.h"
#include "cpuset.h"
#include "common.h"
#include "cpuinfo.h"
#if HAVE_LINUX_MEMPOLICY_H
#define CPUINFO_FILE "/proc/cpuinfo"
#define SCHE... |
google | android | libcpuset | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/libcpuset.c | 98,154 | utf_8 | ac6104982781e194a0d5cb21db4a9d3a | /*
* cpuset user library implementation.
*
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define _GNU_SOURCE /* need to see pread() and syscall() */
#include <unistd.h>
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <fts.h>
#include <limits.h>
... |
google | android | libbitmask | .c | platform/external/ltp/testcases/kernel/controllers/cpuset/cpuset_lib/libbitmask.c | 16,397 | utf_8 | 8a4eb40a489c983a5abd0b1714eff251 | /*
* bitmask user library implementation.
*
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include "bitmask.h"
#include "tst_minmax.h"
struct bitmask {
unsigned int size;
unsigned long *maskp;
};
/* How... |
google | android | cgroup_regression_getdelays | .c | platform/external/ltp/testcases/kernel/controllers/cgroup/cgroup_regression_getdelays.c | 12,938 | utf_8 | 395fdf7bd0a27476ddc959d4a54ca7d0 | */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <poll.h>
#include <string.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <signal.h>
#include <linux/types.h>
#include "config.h"
#ifdef HAVE_LINUX_GENETLINK_H
#include <linux/g... |
google | android | cgroup_core02 | .c | platform/external/ltp/testcases/kernel/controllers/cgroup/cgroup_core02.c | 3,212 | utf_8 | a4f9a93efc2c60ae09d11ef98ee144b8 | */
/*\
* [Description]
*
* When a task is writing to an fd opened by a different task, the perm check
* should use the cgroup namespace of the latter task.
*
* It is copy from kernel selftests cgroup test_core test_cgcore_lesser_ns_open
* subcase. Note that this case only runs on cgroup2 as cgroup1 doesn't have... |
google | android | cgroup_regression_fork_processes | .c | platform/external/ltp/testcases/kernel/controllers/cgroup/cgroup_regression_fork_processes.c | 482 | utf_8 | 28b9495963d3a8e7667e6dff5e05949a | */
#include <sys/types.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <unistd.h>
int main(void)
{
int i;
pid_t pid;
while (1) {
for (i = 0; i < 200; i++) {
pid = fork();
if (pid == 0) {
exit(0);
} else if (pid == -1) {
continue;
}
}
for (i = 0; i < 200; i++)
if (wait(NULL) < 0)
... |
google | android | cgroup_core01 | .c | platform/external/ltp/testcases/kernel/controllers/cgroup/cgroup_core01.c | 2,691 | utf_8 | 5e3a5741aeec54a45707a8567b6c5114 | */
/*\
* [Description]
*
* When a task is writing to an fd opened by a different task, the perm check
* should use the credentials of the latter task.
*
* It is copy from kernel selftests cgroup test_core test_cgcore_lesser_euid_open
* subcase. The difference is that kernel selftest only supports cgroup v2 but
... |
google | android | memcontrol01 | .c | platform/external/ltp/testcases/kernel/controllers/memcg/memcontrol01.c | 1,698 | utf_8 | bf31b70b04c19777fd6c229ce59da55b | /*\
*
* [Description]
*
* Conversion of the first kself test in cgroup/test_memcontrol.c.
* This test creates two nested cgroups with and without enabling the
* memory controller.
*
* The LTP API automatically adds controllers to subtree_control when
* a child cgroup is added. So unlike the kselftest we remove... |
google | android | memcontrol02 | .c | platform/external/ltp/testcases/kernel/controllers/memcg/memcontrol02.c | 3,854 | utf_8 | 795f1ea727c2edde4dda1f95cb551076 | /*\
*
* [Description]
*
* Conversion of second kself test in cgroup/test_memcontrol.c.
*
* Original description:
* "This test creates a memory cgroup, allocates some anonymous memory
* and some pagecache and check memory.current and some memory.stat
* values."
*
* Note that the V1 rss and cache counters were... |
google | android | memcontrol04 | .c | platform/external/ltp/testcases/kernel/controllers/memcg/memcontrol04.c | 6,135 | utf_8 | 259380864f6623b12b9c6dc66cb513b6 | /*\
*
* [Description]
*
* Conversion of the forth kself test in cgroup/test_memcontrol.c.
*
* Original description:
* "First, this test creates the following hierarchy:
* A memory.low = 50M, memory.max = 200M
* A/B memory.low = 50M, memory.current = 50M
* A/B/C memory.low = 75M, memory.current ... |
google | android | memcontrol03 | .c | platform/external/ltp/testcases/kernel/controllers/memcg/memcontrol03.c | 6,173 | utf_8 | 2213d547c839cdc66a89fe93324fb994 | /*\
*
* [Description]
*
* Conversion of the third kself test in cgroup/test_memcontrol.c.
*
* Original description:
* "First, this test creates the following hierarchy:
* A memory.min = 50M, memory.max = 200M
* A/B memory.min = 50M, memory.current = 50M
* A/B/C memory.min = 75M, memory.current ... |
google | android | memcg_process_stress | .c | platform/external/ltp/testcases/kernel/controllers/memcg/stress/memcg_process_stress.c | 1,817 | utf_8 | d58a84f11d56a1b315fc282669876069 | */
#include <sys/mman.h>
#include <err.h>
#include <math.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int flag_exit;
int flag_ready;
int interval;
unsigned long memsize;
char **pages;
int nr_page;
void touch_memory(void)
{
int i;
for (i = 0; i < nr_page; i++)
pages[i][0] = 0xe... |
google | android | memcg_test_2 | .c | platform/external/ltp/testcases/kernel/controllers/memcg/regression/memcg_test_2.c | 691 | utf_8 | b512a06161629b54b2419a1074b044b2 | #include <sys/mman.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
void sigusr_handler(int __attribute__ ((unused)) signo)
{
char *p;
int size = getpagesize() * 2;
p = mmap(NULL, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_LOCKED, 0, 0);
if (p == MAP_FAILED)... |
google | android | memcg_test_4 | .c | platform/external/ltp/testcases/kernel/controllers/memcg/regression/memcg_test_4.c | 807 | utf_8 | 5754688d2c3ab0ada7b9c24efcd1eaab | #include <sys/mman.h>
#include <err.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <unistd.h>
#define MEM_SIZE (1024 * 1024 * 100)
void sigusr_handler(int __attribute__ ((unused)) signo)
{
char *p;
p = mmap(NULL, MEM_SIZE, PROT_READ | PROT_WRITE,
MAP_... |
google | android | memcg_test_1 | .c | platform/external/ltp/testcases/kernel/controllers/memcg/regression/memcg_test_1.c | 1,109 | utf_8 | 0238856a98ef079649d47255864cb6a6 | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/wait.h>
#define MAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS|MAP_LOCKED)
#define LOOP 40
#define FORKED_PROC_COUNT 10
int main(int argc, char *argv[])
{
char buf[10];
int i;
int loop;
int pid;
int fd;
int ... |
google | android | memcg_test_3 | .c | platform/external/ltp/testcases/kernel/controllers/memcg/regression/memcg_test_3.c | 1,652 | utf_8 | 50e73ffa7683887a097d06c65d13e2a1 | */
/*
* This is a regression test for a crash caused by memcg function
* reentrant on buggy kernel. When doing rmdir(), a pending signal can
* interrupt the execution and lead to cgroup_clear_css_refs()
* being entered repeatedly, this results in a BUG_ON().
*/
#include <errno.h>
#include <unistd.h>
#include <st... |
google | android | mem_process | .c | platform/external/ltp/testcases/kernel/controllers/memcg/control/mem_process.c | 2,037 | utf_8 | 8fd2c1d700b6e258c36920aba02cc622 | // Author: Mohamed Naufal Basheer
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
/*
* Named pipe to act as a communication channel between
* shell script & this process
*/
#define STA... |
google | android | memcg_process | .c | platform/external/ltp/testcases/kernel/controllers/memcg/functional/memcg_process.c | 6,106 | utf_8 | 00e718172a6fc223e988b8b60bc7f8f6 | */
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
#include <limits.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define TST_NO_DEFAULT_MAIN
#inclu... |
google | android | cgroup_fj_proc | .c | platform/external/ltp/testcases/kernel/controllers/cgroup_fj/cgroup_fj_proc.c | 1,071 | utf_8 | c625a627056f4afc043736bdd6988884 | #include <sys/types.h>
#include <sys/wait.h>
#include <err.h>
#include <errno.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#define UNUSED __attribute__ ((unused))
static int test_switch = 0;
void sighandler(UNUSED int signo)
{
test_switch = !test_switch;
}
int main(void)
{
sigset_... |
google | android | cpuacct_task | .c | platform/external/ltp/testcases/kernel/controllers/cpuacct/cpuacct_task.c | 1,626 | utf_8 | 4f4247eb190a3590d1d4753d4a2ec515 | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Description:
* Write the current process in argv[1]
*/
#include <stdio.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
static void sig_handler(int signo)
{
_exi... |
google | android | input02 | .c | platform/external/ltp/testcases/kernel/input/input02.c | 2,249 | utf_8 | 628404aefada9c1286c97c5ef8b81be5 | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Create a virtual device (mouse), send events to /dev/uinput
* and check that the events are not received in /dev/input/eventX
* because the device is grabbed by another process
*/
#include <linux/input.h>
#include "test.h"
#inclu... |
google | android | input03 | .c | platform/external/ltp/testcases/kernel/input/input03.c | 2,933 | utf_8 | 5ba2c5fb02ed4fe34020298925e0958c | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Create a virtual device (mouse), send events to /dev/uinput
* and check that the events are well received in /dev/input/mice
*/
#include <linux/input.h>
#include <linux/uinput.h>
#include "test.h"
#include "safe_macros.h"
#include "... |
google | android | input_helper | .c | platform/external/ltp/testcases/kernel/input/input_helper.c | 5,861 | utf_8 | 879a3a33f99ad1fdd8e383d529bbdfdc | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <linux/input.h>
#include <linux/uinput.h>
#include <fnmatch.h>
#include <errno.h>
#include <poll.h>
#include "test.h"
#include "safe_macros.h"
#include "input_helper.h"
#define VIRTUAL_DEVICE "virtual-device-ltp"
#define VIRTUAL_DEVICE_R... |
google | android | input04 | .c | platform/external/ltp/testcases/kernel/input/input04.c | 2,113 | utf_8 | 4bde48b780ecc864458982bfea92703d | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Create a virtual device (mouse), send empty events to /dev/uinput
* and check that the events are not received in /dev/inputX
*/
#include <linux/input.h>
#include "test.h"
#include "safe_macros.h"
#include "lapi/fcntl.h"
#include "i... |
google | android | input06 | .c | platform/external/ltp/testcases/kernel/input/input06.c | 5,200 | utf_8 | 8972f351bbddc93ce738c7a8b2eba4d1 | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Create a virtual device, activate auto-repeat and
* and check that auto repeat is working
*/
#include <linux/input.h>
#include <linux/uinput.h>
#include <linux/kd.h>
#include "test.h"
#include "safe_macros.h"
#include "lapi/fcntl.h"... |
google | android | input05 | .c | platform/external/ltp/testcases/kernel/input/input05.c | 2,200 | utf_8 | 48bbb9b20fd6a90770d9389ff48ccd05 | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Create a virtual device (mouse), send events to /dev/uinput
* and Check that events not advertised in the input device bits
* are filtered.
*/
#include <linux/input.h>
#include <linux/uinput.h>
#include "test.h"
#include "safe_ma... |
google | android | input01 | .c | platform/external/ltp/testcases/kernel/input/input01.c | 3,557 | utf_8 | 1133928f1f8d78f62ded9f5b0a0c2d86 | /*
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Create a virtual device (mouse), send events to /dev/uinput
* and check that the events are well received in /dev/input/eventX
*/
#include <linux/input.h>
#include "input_helper.h"
#include "test.h"
#include "safe_macros.h"
#include... |
google | android | kmsg01 | .c | platform/external/ltp/testcases/kernel/logging/kmsg/kmsg01.c | 14,171 | utf_8 | 0f4088386f74b8be4d51d6fbe9893e99 | */
/*
* Test /dev/kmsg based on kernel doc: Documentation/ABI/testing/dev-kmsg
* - read() blocks
* - non-blocking read() fails with EAGAIN
* - partial read fails (buffer smaller than message)
* - can write to /dev/kmsg and message seqno grows
* - first read() after open() returns same message
* - if messages ge... |
google | android | fsx-linux | .c | platform/external/ltp/testcases/kernel/fs/fsx-linux/fsx-linux.c | 31,720 | utf_8 | 1c84e48f37fa3eeb659c8426ce6d21c7 | /*
*
* File: fsx.c
* Author: Avadis Tevanian, Jr.
*
* File system exerciser.
*
*/
#include <sys/types.h>
#include <sys/stat.h>
#if defined(_UWIN) || defined(__linux__)
#include <sys/param.h>
#include <limits.h>
#include <time.h>
#include <string.h>
#include <sys/time.h>
#endif
#include <fcntl.h>
#include <sys/mm... |
google | android | databin | .c | platform/external/ltp/testcases/kernel/fs/doio/databin.c | 7,324 | utf_8 | 0baf396c2d29a27067fa694ff1d86431 | /*
* 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/
*/
#in... |
google | android | forker | .c | platform/external/ltp/testcases/kernel/fs/doio/forker.c | 8,523 | utf_8 | 193c42a8fa3f2ca84cef5f87de17c268 | /*
* 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 | datapid | .c | platform/external/ltp/testcases/kernel/fs/doio/datapid.c | 8,918 | utf_8 | a317b5f4c9aaf84a16ad20ec5ac7c679 | /*
* 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 | file_lock | .c | platform/external/ltp/testcases/kernel/fs/doio/file_lock.c | 5,100 | utf_8 | c2b048e6166878ad18eb75fc4fdea4dc | /*
* 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/
*/
#in... |
google | android | doio | .c | platform/external/ltp/testcases/kernel/fs/doio/doio.c | 129,998 | utf_8 | a3e79c66339536a498e75d5f6939c3e4 | /*
* 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 | growfiles | .c | platform/external/ltp/testcases/kernel/fs/doio/growfiles.c | 82,265 | utf_8 | aaa8bdead1491e4d43269946fd112921 | /*
* 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 | open_flags | .c | platform/external/ltp/testcases/kernel/fs/doio/open_flags.c | 8,069 | utf_8 | 93ae8555c1351cf46a39805e28de705e | /*
* 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 | iogen | .c | platform/external/ltp/testcases/kernel/fs/doio/iogen.c | 53,411 | utf_8 | 1cff647c9f1dcd1e3f538911aa93fe0d | /*
* 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 | pattern | .c | platform/external/ltp/testcases/kernel/fs/doio/pattern.c | 3,728 | utf_8 | 0361289957506cdd5eb5c93eb50d737e | /*
* 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/
*/
#in... |
google | android | bytes_by_prefix | .c | platform/external/ltp/testcases/kernel/fs/doio/bytes_by_prefix.c | 5,345 | utf_8 | f002bbd807b3c5fc5358a37c4a0b497b | /*
* 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/
*/
#in... |
google | android | write_log | .c | platform/external/ltp/testcases/kernel/fs/doio/write_log.c | 14,352 | utf_8 | 844a86b4640bbbd9dcaef525fc1b3e81 | /*
* 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 | dataascii | .c | platform/external/ltp/testcases/kernel/fs/doio/dataascii.c | 5,267 | utf_8 | 6a56a33db627b53473178adb62c4945c | /*
* 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/
*/
#in... |
google | android | string_to_tokens | .c | platform/external/ltp/testcases/kernel/fs/doio/string_to_tokens.c | 3,618 | utf_8 | 6a4d396b9be24decefb1e3e6cccaad1f | /*
* 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 | main | .c | platform/external/ltp/testcases/kernel/fs/scsi/ltpfs/main.c | 13,431 | utf_8 | cc5ce8d41a8efe08d9e2a697f92f950a |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <math.h>
#include <time.h>
#include <ftw.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/kd.h>
#include <linux/errno.h>
#include "Ltpf... |
google | android | LtpfsCmds | .c | platform/external/ltp/testcases/kernel/fs/scsi/ltpfs/LtpfsCmds.c | 7,086 | utf_8 | f8cd36b54d76e483d2722734207ece31 | #include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/ioctl.h>
#include <linux/pm.h>
#include <linux/genhd.h>
#include <linux/bio.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/bio.h>
#include <linux/blk.h>
#include <... |
google | android | llseek | .c | platform/external/ltp/testcases/kernel/fs/scsi/ltpscsi/llseek.c | 2,900 | utf_8 | 55394c85b4b6c6996d3c8471fa3189bc | /*
* llseek.c -- stub calling the llseek system call
*
*
* This file is borrowed from the util-linux-2.10q tarball's implementation
* of fdisk. It allows seeks to 64 bit offsets, if supported.
* Changed "ext2_" prefix to "llse".
*/
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
#include <sys/sysca... |
google | android | sg_err | .c | platform/external/ltp/testcases/kernel/fs/scsi/ltpscsi/sg_err.c | 54,748 | utf_8 | afaf468e4f5b326d4e48802ec90b3d86 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sg_include.h"
#include "sg_err.h"
/* This file is a huge cut, paste and hack from linux/drivers/scsi/constant.c
* which I guess was written by:
* any later version.
*
* ASCII values for a number of symbolic constants, printing functions, etc.
*
* ... |
google | android | scsimain | .c | platform/external/ltp/testcases/kernel/fs/scsi/ltpscsi/scsimain.c | 194,782 | utf_8 | bf7cedcd4dda274e72685818255a510f | /* Test code for D. Gilbert's extensions to the Linux OS SCSI generic ("sg")
device driver.
* any later version.
This program scans the "sg" device space (ie actual + simulated SCSI
generic devices).
Options: -w open writable (new driver opens readable unless -i)
-n numeric scan: scan /dev/... |
google | android | inode01 | .c | platform/external/ltp/testcases/kernel/fs/inode/inode01.c | 19,163 | utf_8 | 82c8ee2c9707fb03f3ec572a83ec2856 | /*
*
/* inode1.c */
/*======================================================================
=================== TESTPLAN SEGMENT ===================
CALLS: mkdir, stat, open
run using TERM mode
>KEYS: < file system management I/O
>WHAT: < Do the system's file system management and I/O functions work
< corr... |
google | android | inode02 | .c | platform/external/ltp/testcases/kernel/fs/inode/inode02.c | 22,435 | utf_8 | 6e63bd050e12c94918b0b3963db416be | /*
*
/*inode02.c */
/*======================================================================
=================== TESTPLAN SEGMENT ===================
CALLS: mkdir, stat, open
Run with TERM mode.
>KEYS: < file system and I/O management, system resource constraints.
>WHAT: < Can the system handle a heavy load ... |
google | android | proc01 | .c | platform/external/ltp/testcases/kernel/fs/proc/proc01.c | 13,096 | utf_8 | 9aae558499c34bd18047704772ad2010 | /*
* proc01.c - Tests Linux /proc file reading.
*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <unist... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.