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
cve-2017-17052
.c
platform/external/ltp/testcases/cve/cve-2017-17052.c
2,220
utf_8
3da7c056823c85cb403467076ff67916
*/ /* * Test for CVE-2017-17052, original reproducer taken from kernel commit: * 2b7e8665b4ff51c034c55df3cff76518d1a9ee3a * * CAUTION!! * This test will crash unpatched kernels! * Use at your own risk! * */ #include <unistd.h> #include <pthread.h> #include <sys/wait.h> #include <sys/syscall.h> #include <sys/ty...
google
android
cve-2017-2618
.c
platform/external/ltp/testcases/cve/cve-2017-2618.c
1,169
utf_8
08f750be7da5cc09df81bcb1903911ef
* Date: Tue Jan 31 11:54:04 2017 -0500 * * selinux: fix off-by-one in setprocattr */ #include <errno.h> #include <stdlib.h> #include <unistd.h> #include "tst_test.h" #define LOOPS 100 #define PATH_ATTRFS "/proc/self/attr/fscreate" static void setup(void) { if (access(PATH_ATTRFS, F_OK)) tst_brk(TCONF, "%s do...
google
android
cve-2017-16939
.c
platform/external/ltp/testcases/cve/cve-2017-16939.c
2,428
utf_8
eaee2e5ead5938ab1a5a104c47743a3b
*/ /* Regression test for commit: * 1137b5e2529a ipsec: Fix aborted xfrm policy dump crash aka CVE-2017-16939 * * Based on the reproducing code from Mohammed Ghannam, published on * https://blogs.securiteam.com/index.php/archives/3535 * * CAUTION! If your system is vulnerable to this CVE, the kernel * WILL DIE!...
google
android
cve-2016-7117
.c
platform/external/ltp/testcases/cve/cve-2016-7117.c
4,036
utf_8
267f24444b3a482ff7f4717a2fbf1c2a
*/ /* * CVE-2016-7117 * * This tests for a use after free caused by a race between recvmmsg() and * close(). The exit path for recvmmsg() in (a2e2725541f: net: Introduce * recvmmsg socket syscall) called fput() on the active file descriptor before * checking the error state and setting the socket's error field. ...
google
android
meltdown
.c
platform/external/ltp/testcases/cve/meltdown.c
7,632
utf_8
fe861bb2b609f1f9a9765af2bff166e7
*/ #include "config.h" #include "tst_test.h" #include <stdio.h> #include <string.h> #include <signal.h> #include <ucontext.h> #include <unistd.h> #include <fcntl.h> #include <ctype.h> #include <sys/utsname.h> /* emmintrin.h may exist for some non-x86 systems as an emulation */ #if defined(HAVE_EMMINTRIN_H) && (defined...
google
android
cve-2017-2671
.c
platform/external/ltp/testcases/cve/cve-2017-2671.c
3,232
utf_8
fc44f4614f698bd5b923d58c0b7a5326
* Original POC by Daniel Jiang */ /* * Test for CVE-2017-2671 faulty locking on ping socket * * When sys_connect() is called with sockaddr.sin_family set to AF_UNSPEC on a * ping socket; __udp_disconnect() gets called, which in turn calls the buggy * function ping_unhashed(). This function does not obtain a rwlo...
google
android
cve-2015-3290
.c
platform/external/ltp/testcases/cve/cve-2015-3290.c
13,262
utf_8
108c686726cf8144e079fcf93e32d466
*/ /* NOTE: rather than checking for full nested NMI exploitation we simply check that the NMI stack state can be corrupted with this code. http://www.openwall.com/lists/oss-security/2015/08/04/8 > +++++ CVE-2015-3290 +++++ > > High impact NMI bug on x86_64 systems 3.13 and newer, embargoed. Also fixed by: > > https:...
google
android
cve-2014-0196
.c
platform/external/ltp/testcases/cve/cve-2014-0196.c
3,935
utf_8
1a8b6ed1456ec51d073c0a6514d5baab
*/ /* * This test attempts to cause a buffer overflow using the race condition * described in CVE-2014-0196. If the test is successful in causing an * overflow it will most likely result in an immediate Oops, restart or * freeze. However if it overwrites memory not accessed during the test then * it could happen ...
google
android
icmp_rate_limit01
.c
platform/external/ltp/testcases/cve/icmp_rate_limit01.c
6,570
utf_8
8de644472cd0f5648103963ca8958c8a
*/ /*\ * CVE-2020-25705 * * Test of ICMP rate limiting behavior that may be abused for DNS cache * poisoning attack. Send a few batches of 100 packets to a closed UDP port * and count the ICMP errors. If the number of errors is always the same * for each batch (not randomized), the system is vulnerable. Send pac...
google
android
cve-2016-10044
.c
platform/external/ltp/testcases/cve/cve-2016-10044.c
1,656
utf_8
7993d325796b863c99ebd2e25cb2b173
*/ /* * Test for CVE-2016-10044, which was fixed in commit * 22f6b4d34fcf039c aio: mark AIO pseudo-fs noexec. * * The test checks that we can not implicitly mark AIO mappings as * executable using the READ_IMPLIES_EXEC personality. */ #include <stdio.h> #include <stdint.h> #include <string.h> #include "lapi/pers...
google
android
cve-2016-7042
.c
platform/external/ltp/testcases/cve/cve-2016-7042.c
1,699
utf_8
9885138a7bfd6b10ad053d2121ee3ed5
* Date: Wed Oct 26 15:01:54 2016 +0100 * * KEYS: Fix short sprintf buffer in /proc/keys show function */ #include <errno.h> #include <stdio.h> #include "tst_test.h" #include "lapi/keyctl.h" #define PATH_KEYS "/proc/keys" static key_serial_t key; static int fd; static void do_test(void) { char buf[BUFSIZ]; key...
google
android
cve-2022-4378
.c
platform/external/ltp/testcases/cve/cve-2022-4378.c
2,591
utf_8
d0e07656cc1562bb8c02137de2e69381
* Date: Mon Dec 5 12:09:06 2022 -0800 * * proc: proc_skip_spaces() shouldn't think it is working on C strings */ #include <stdlib.h> #include "tst_test.h" static char *buf; static unsigned int bufsize; static int fd = -1; static struct testcase { const char *path; int err; } testcase_list[] = { {"/proc/sys/net...
google
android
cve-2017-17053
.c
platform/external/ltp/testcases/cve/cve-2017-17053.c
3,248
utf_8
9522f32fa591d21f88b9ae70ab45ba00
*/ /* Regression test for CVE-2017-17053, original reproducer can be found * here: * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ccd5b3235180eef3cfec337df1c8554ab151b5cc * * Be careful! This test may crash your kernel! */ #include "config.h" #include "tst_test.h" #ifdef HAVE_ASM_...
google
android
stack_clash
.c
platform/external/ltp/testcases/cve/stack_clash.c
6,085
utf_8
582e40b2ccf84b0650a0dff14caf1ab6
*/ /* This is a regression test of the Stack Clash [1] vulnerability. This tests * that there is at least 256 PAGE_SIZE of stack guard gap which is considered * hard to hop above. Code adapted from the Novell's bugzilla [2]. * * The code `mmap(2)`s region close to the stack end. The code then allocates * memory o...
google
android
ebizzy
.c
platform/external/ltp/utils/benchmark/ebizzy-0.3/ebizzy.c
11,901
utf_8
95a042d14d7c763e1d8f1e3c09534737
/* * Ebizzy - replicate a large ebusiness type of workload. * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * */ /* * This program is designed to replicate a common web search app * workload. A lot of search applications have the basic pattern: Get * a request to find a certain ...
google
android
test_1_to_1_events
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_events.c
6,530
utf_8
37de18e684617d872116b43526798545
/* SCTP kernel Implementation * Boston, MA 02111-1307, USA. * * Please send any bug reports or fixes you make to the * email address(es): * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * * Any bugs reported given to us we will try to fix... any fixes shared ...
google
android
test_assoc_abort
.c
platform/external/ltp/utils/sctp/func_tests/test_assoc_abort.c
8,138
utf_8
ea697e61bc065871975418267939341a
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a functional test to ver...
google
android
test_1_to_1_sockopt
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_sockopt.c
16,282
utf_8
4eebc2e6f811a8e5c9f7ccfda49720d3
/* SCTP kernel Implementation * * This file has test cases to test negative scenarios for getsockopt () * setsockopt () call for 1-1 style sockets * * setsockopt () Tests: * ------------------- * TEST1: setsockopt: Bad socket descriptor * TEST2: setsockopt: Invalid socket * TEST3: setsockopt: Invalid level * ...
google
android
test_1_to_1_connect
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_connect.c
8,076
utf_8
3ffd6f42d51fb5eff02816c8f7b98bee
/* SCTP kernel Implementation * * This file has test cases to test the connect () call for 1-1 style sockets * * TEST1: Bad socket descriptor * TEST2: Invalid socket * TEST3: Invalid address * TEST4: Invalid address length * TEST5: Invalid address family * TEST6: Valid blocking connect * TEST7: Connect when a...
google
android
test_1_to_1_rtoinfo
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_rtoinfo.c
3,828
utf_8
6fc5bc56ce00824947f6af87b2b2b6b3
/* SCTP kernel Implementation * any later version. * * The SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * * Or submit a bug report through the following website: * http://www.sf.net/proje...
google
android
test_1_to_1_recvfrom
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_recvfrom.c
6,786
utf_8
68dfdf667bab5ab5e17edd4c9c48bd1c
/* SCTP kernel Implementation * any later version. * * The SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * * Or submit a bug report through the following website: * http://www.sf.net/proje...
google
android
test_1_to_1_accept_close
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_accept_close.c
8,267
utf_8
497d5b5e20eb7453b67fe68d6c920656
/* SCTP kernel Implementation * * This file has test cases to test the accept () and close () call for * 1-1 style sockets * * accept () Tests: * --------------- * TEST1: Bad socket descriptor * TEST2: Invalid socket * TEST3: Invalid address * TEST4: On a non-listening socket * TEST5: On a established socke...
google
android
test_1_to_1_sendto
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_sendto.c
5,375
utf_8
f43a0a1ea97d743116661738fb59576d
/* SCTP kernel Implementation * any later version. * * The SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * * Or submit a bug report through the following website: * http://www.sf.net/proje...
google
android
test_1_to_1_sendmsg
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_sendmsg.c
12,949
utf_8
199709342b7cfa47fcf3ce9a547de35d
/* SCTP kernel Implementation * * This file has test cases to test the sendmsg() call for 1-1 style sockets * * TEST1: Bad socket descriptor * TEST2: Invalid socket * TEST3: On a listening socket * TEST4: Invalid iovec pointer * TEST5: Invalid iovec length * TEST6: Invalid msghdr pointer * TEST7: Invalid sinf...
google
android
test_timetolive
.c
platform/external/ltp/utils/sctp/func_tests/test_timetolive.c
14,057
utf_8
240507caf55e6e39e9615122dc8ec9ac
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* * This is a basic functional te...
google
android
test_1_to_1_nonblock
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_nonblock.c
7,250
utf_8
677020e0c30971edd3a569cb722bb070
/* SCTP kernel Implementation * any later version. * * The SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * * Or submit a bug report through the following website: * http://www.sf.net/proje...
google
android
test_sctp_sendrecvmsg
.c
platform/external/ltp/utils/sctp/func_tests/test_sctp_sendrecvmsg.c
12,056
utf_8
71e427cb9adb13e85a1d1068ec6eebfa
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: * To compile the v6 version, set the s...
google
android
test_basic
.c
platform/external/ltp/utils/sctp/func_tests/test_basic.c
14,303
utf_8
f4121abf910d57b94cd94f50d492a12b
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a basic functional test ...
google
android
test_inaddr_any
.c
platform/external/ltp/utils/sctp/func_tests/test_inaddr_any.c
8,809
utf_8
9a591eec54b7798f99b0104aeaa0fcbc
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a functional test to ver...
google
android
test_1_to_1_initmsg_connect
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_initmsg_connect.c
3,058
utf_8
6411fe68238d2515bab5b1401bbf933b
* * When init timeout is set to zero, a connect () crashed the system. This case * tests the fix for the same. */ #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> /* for sockaddr_in */ #in...
google
android
test_fragments
.c
platform/external/ltp/utils/sctp/func_tests/test_fragments.c
10,133
utf_8
14ce176d84dfa7d8981a537065da742f
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a functional test to ver...
google
android
test_peeloff
.c
platform/external/ltp/utils/sctp/func_tests/test_peeloff.c
9,852
utf_8
c324459e8f55e863701683ce433eb7fb
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a Functional test to ver...
google
android
test_assoc_shutdown
.c
platform/external/ltp/utils/sctp/func_tests/test_assoc_shutdown.c
8,188
utf_8
33683a17fdbd8bf78903ee57ca2d41e6
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a functional test to ver...
google
android
test_getname
.c
platform/external/ltp/utils/sctp/func_tests/test_getname.c
9,826
utf_8
3cf621a93f4d6272d5c4743a49f967c9
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported given to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a kernel test to v...
google
android
test_1_to_1_shutdown
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_shutdown.c
7,328
utf_8
0ddc50662cd1f8059a97a22ab59b8bb7
/* SCTP kernel Implementation * any later version. * * The SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * * Or submit a bug report through the following website: * http://www.sf.net/proje...
google
android
test_1_to_1_addrs
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_addrs.c
9,730
utf_8
de30e361403de66f9938ada2170619dc
/* SCTP kernel Implementation * * This file has test cases to test the sctp_getladdrs (), sctp_freealddrs (), * sctp_getpaddrs (), sctp_freeapaddrs () for 1-1 style sockets * * sctp_getladdrs () Tests: * ----------------------- * TEST1: Bad socket descriptor * TEST2: Invalid socket * TEST3: Socket of different...
google
android
test_connect
.c
platform/external/ltp/utils/sctp/func_tests/test_connect.c
7,446
utf_8
681cf465994e30c68dbbb733e2aa3cce
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported given to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a kernel test to v...
google
android
test_autoclose
.c
platform/external/ltp/utils/sctp/func_tests/test_autoclose.c
5,546
utf_8
82332f669e8af20af661cf6aab986e81
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a Functional Test to ver...
google
android
test_connectx
.c
platform/external/ltp/utils/sctp/func_tests/test_connectx.c
9,838
utf_8
7102cc96a95ba398887ef907f48d6992
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported given to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a kernel test to v...
google
android
test_1_to_1_recvmsg
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_recvmsg.c
7,153
utf_8
9af8571888739c776a9e9bc5dc8e2a17
/* SCTP kernel Implementation * any later version. * * The SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * * Or submit a bug report through the following website: * http://www.sf.net/proje...
google
android
test_1_to_1_send
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_send.c
7,706
utf_8
2726526f2934552752034cbe22754290
/* SCTP kernel Implementation * any later version. * * The SCTP implementation is distributed in the hope that it * will be useful, but WITHOUT ANY WARRANTY; without even the implied * ************************ * * Or submit a bug report through the following website: * http://www.sf.net/proje...
google
android
test_1_to_1_connectx
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_connectx.c
7,491
utf_8
e620ced3dc9568a50db971f204489c6d
/* SCTP kernel Implementation * you can redistribute it and/or modify it under the terms of * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported given to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release ...
google
android
test_1_to_1_socket_bind_listen
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_socket_bind_listen.c
9,739
utf_8
042cf0ed4818a38d1dd17b161d06dc66
/* SCTP kernel Implementation * * This file has test cases to test the socket (), bind () and listen () for * 1-1 style sockets * * socket () Tests: * --------------- * TEST1: Invalid domain * TEST2: Invalid type * TEST3: Opening a TCP style socket * * bind () Tests: * ------------- * TEST4: Invalid addres...
google
android
test_recvmsg
.c
platform/external/ltp/utils/sctp/func_tests/test_recvmsg.c
5,248
utf_8
023a48f69cdc0bbeb578a94ed81d8eb6
/* SCTP kernel Implementation * Boston, MA 02111-1307, USA. * * Please send any bug reports or fixes you make to the * email address(es): * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. */ /* This is a kernel test to verify * 1. MSG_EOR flag...
google
android
test_sockopt
.c
platform/external/ltp/utils/sctp/func_tests/test_sockopt.c
43,185
utf_8
0cc9a214ffcf19a629a1af792a753d76
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ /* This is a functional test to ver...
google
android
test_1_to_1_threads
.c
platform/external/ltp/utils/sctp/func_tests/test_1_to_1_threads.c
5,821
utf_8
25b364bf151259a4dd7b9558c7139a33
/* SCTP kernel Implementation * Boston, MA 02111-1307, USA. * * Please send any bug reports or fixes you make to the * email address(es): * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported given to us we will try to fix... any fixes shared wil...
google
android
test_tcp_style
.c
platform/external/ltp/utils/sctp/func_tests/test_tcp_style.c
15,272
utf_8
6288c257304c95e5f114ccbbc0433843
/* SCTP kernel Implementation * Boston, MA 02111-1307, USA. * * Please send any bug reports or fixes you make to the * email address(es): */ /* This is a kernel test to verify the TCP-style socket interfaces. */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #incl...
google
android
bindx
.c
platform/external/ltp/utils/sctp/lib/bindx.c
2,108
utf_8
4b91afd88770029798391c5c15ed951d
/* SCTP kernel Implementation: User API extensions. * * bindx.c * */ #include <sys/socket.h> /* struct sockaddr_storage, setsockopt() */ #include <netinet/in.h> #include <netinet/sctp.h> /* SCTP_SOCKOPT_BINDX_* */ #include <errno.h> /* Support the sctp_bindx() interface. * * See Sockets API Extensions for SCTP....
google
android
connectx
.c
platform/external/ltp/utils/sctp/lib/connectx.c
4,834
utf_8
770ab1ebc835311ea4ce76b5bde9be8a
/* SCTP kernel Implementation: User API extensions. * * connectx.c * */ #include <sys/socket.h> /* struct sockaddr_storage, setsockopt() */ #include <netinet/in.h> #include <netinet/sctp.h> /* SCTP_SOCKOPT_CONNECTX_* */ #include <errno.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> /* Support the s...
google
android
peeloff
.c
platform/external/ltp/utils/sctp/lib/peeloff.c
1,364
utf_8
2394663af09357cec1958efe58c7846e
/* SCTP kernel Implementation: User API extensions. * * peeloff.c * */ #include <sys/socket.h> /* struct sockaddr_storage, setsockopt() */ #include <netinet/sctp.h> /* SCTP_SOCKOPT_BINDX_* */ #include <errno.h> /* Branch off an association into a seperate socket. This is a new SCTP API * described in the sectio...
google
android
opt_info
.c
platform/external/ltp/utils/sctp/lib/opt_info.c
1,836
utf_8
f8222dfa1d6f5819d0666a18664be29d
/* SCTP kernel Implementation: User API extensions. * * opt_info.c * */ #include <sys/socket.h> /* struct sockaddr_storage, setsockopt() */ #include <netinet/sctp.h> /* SCTP_SOCKOPT_BINDX_* */ #include <errno.h> /* Support the sctp_opt_info() interface. * * See Sockets API Extensions for SCTP. Section 7. * * ...
google
android
recvmsg
.c
platform/external/ltp/utils/sctp/lib/recvmsg.c
2,936
utf_8
e96509d80d663304922896fa35ce1f75
/* SCTP kernel Implementation: User API extensions. * * sctp_recvmsg.c * * * An implementation may provide a library function (or possibly system * call) to assist the user with the advanced features of SCTP. Note * that in order for the sctp_sndrcvinfo structure to be filled in by * sctp_recvmsg() the caller m...
google
android
sendmsg
.c
platform/external/ltp/utils/sctp/lib/sendmsg.c
3,073
utf_8
2c2ec0565148396cf58ec3761ce5fd4a
/* SCTP kernel Implementation: User API extensions. * * sendmsg.c * */ #include <string.h> #include <sys/socket.h> /* struct sockaddr_storage, setsockopt() */ #include <netinet/sctp.h> /* This library function assists the user with the advanced features * of SCTP. This is a new SCTP API described in the section...
google
android
addrs
.c
platform/external/ltp/utils/sctp/lib/addrs.c
3,995
windows_1250
4322689841f6595c7b03793cb6e57484
/* SCTP kernel Implementation: User API extensions. * * addrs.c * */ #include <malloc.h> #include <netinet/in.h> #include <netinet/sctp.h> #include <string.h> #include <errno.h> /* * Common getsockopt() layer * If the NEW getsockopt() API fails this function will fall back to using * the old API */ static int...
google
android
sctputil
.c
platform/external/ltp/utils/sctp/testlib/sctputil.c
11,737
utf_8
b31f3d8f125192312444e048fb36163b
/* SCTP kernel Implementation * * Or submit a bug report through the following website: * http://www.sf.net/projects/lksctp * * Any bugs reported to us we will try to fix... any fixes shared will * be incorporated into the next SCTP release. * * Written or modified by: */ #include <stdio.h> #include <errno....
google
android
sparse-ltp
.c
platform/external/ltp/tools/sparse/sparse-ltp.c
7,574
utf_8
eaba901a9281a69ee8b877427dd78bd8
* * Sparse allows us to perform checks on the AST (struct symbol) or on * a linearized representation. In the latter case we are given a set * of entry points (functions) containing basic blocks of * instructions. * * The basic blocks contain byte code in SSA form. This is similar to * the intermediate represen...
google
android
ltpapicmd
.c
platform/external/ltp/tools/apicmds/ltpapicmd.c
9,769
utf_8
0347faf991afbaa4cbdb10a073028f5b
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ /* * File: ltpapicmd.c * * Description: This program impliments a command line version of some of the * LTP harness API's. This will enable tests written in shell and * other scripts to report...
google
android
stress
.c
platform/external/ltp/tools/genload/stress.c
21,982
utf_8
40237a7107adfb81fce2e6983cab7a75
/* A program to put stress on a POSIX system (stress). * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include <ctype.h> #include <errno.h> #include <libgen.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include <time.h> #include <unistd.h> #i...
google
android
genload
.c
platform/external/ltp/tools/genload/genload.c
21,982
utf_8
40237a7107adfb81fce2e6983cab7a75
/* A program to put stress on a POSIX system (stress). * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include <ctype.h> #include <errno.h> #include <libgen.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include <time.h> #include <unistd.h> #i...
google
android
ltp-pan
.c
platform/external/ltp/pan/ltp-pan.c
37,736
utf_8
005a1179761b22a4276d20c6a1e1451f
/* * 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/ * * C...
google
android
splitstr
.c
platform/external/ltp/pan/splitstr.c
5,227
utf_8
0885f31df79f02ca55dfe1f39e08cfb7
/* * 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
ltp-bump
.c
platform/external/ltp/pan/ltp-bump.c
2,966
utf_8
1035d3612d880070faf09d43ef2f4db2
/* * 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
zoolib
.c
platform/external/ltp/pan/zoolib.c
9,331
utf_8
ab5f96e9198d7f69887d917cf693fc90
/* * 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
cleanup
.c
platform/external/ltp/include/old/cleanup.c
1,582
utf_8
ca80b1e2c6c1d2049079e97872693928
/* * Default cleanup logic because linux_syscall_numbers.h's need for cleanup * and binutils bugs suck. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ #ifndef __CLEANUP_C__ #define __CLEANUP_C__ /* Did the user define a cleanup function? */ #ifndef CLEANUP #define USING_DUMMY_CLEANUP 1 #defi...
google
android
tst_numa
.c
platform/external/ltp/libs/libltpnuma/tst_numa.c
4,471
utf_8
7cb5a1f8e0590ac8e50317fa0a4d3d95
*/ #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include "config.h" #ifdef HAVE_NUMA_V2 # include <numa.h> # include <numaif.h> #endif #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "tst_numa.h" #include "lapi/numaif.h" void tst_nodemap_print_counters(struct tst_nodemap *nodes) { unsigned int...
google
android
tst_uinput
.c
platform/external/ltp/libs/libltpuinput/tst_uinput.c
2,719
utf_8
be431f02a7cfc4c0a586f9bc0fdf6997
*/ #include <linux/input.h> #include <linux/uinput.h> #include <stdio.h> #include <string.h> #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "tst_uinput.h" #define VIRTUAL_DEVICE "virtual-device-ltp" static const char *uinput_paths[] = { "/dev/input/uinput", "/dev/uinput", }; int open_uinput(void) { unsi...
google
android
libnewipc
.c
platform/external/ltp/libs/libltpnewipc/libnewipc.c
1,716
utf_8
69786c10d84a8090f4374cd372ccb22f
*/ /* * DESCRIPTION * common routines for the IPC system call tests. */ #include <errno.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/msg.h> #include <sys/shm.h> #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "libnewipc.h" #includ...
google
android
sigwait
.c
platform/external/ltp/libs/libltpsigwait/sigwait.c
9,694
utf_8
1e91169b2f2c669e0f3cc2ed151d68e1
#define TST_NO_DEFAULT_MAIN #include <errno.h> #include <stdlib.h> #include <limits.h> #include "libsigwait.h" #include "tst_sig_proc.h" #include "lapi/syscalls.h" void test_empty_set(swi_func sigwaitinfo, int signo, enum tst_ts_type type LTP_ATTRIBUTE_UNUSED) { sigset_t sigs; siginfo_t si; pid_t child; SAFE_...
google
android
libswap
.c
platform/external/ltp/libs/libltpswap/libswap.c
1,658
utf_8
213fce1fb941989f64bb1137e71842b5
*/ #include <errno.h> #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "libswap.h" #include "lapi/syscalls.h" /* * Make a swap file */ int make_swapfile(const char *swapfile, int safe) { if (!tst_fs_has_free(".", sysconf(_SC_PAGESIZE) * 10, TST_BYTES)) tst_brk(TBROK, "Insufficient disk space to create s...
google
android
libipc
.c
platform/external/ltp/libs/libltpipc/libipc.c
4,846
utf_8
87d2c494251d4a6ff3e8b051a635745b
/* * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * NAME * libmsg.c * * DESCRIPTION * common routines for the IPC system call tests. * * The library contains the following routines: * * getipckey() * rm_queue() * init_buf() * rm_sema() * getuserid() * rm_shm() ...
google
android
libmsgctl
.c
platform/external/ltp/libs/libltpipc/libmsgctl.c
3,573
utf_8
b0b423efc74e150fbb0e7c3879381661
/* * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/msg.h> #include "libmsgctl.h" int doreader(long key, int tid, long type, int child, int ...
google
android
vdso_helpers
.c
platform/external/ltp/libs/libltpvdso/vdso_helpers.c
1,998
utf_8
74e30408edb2563d4f57a6c83ef9114a
*/ #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "parse_vdso.h" #include "config.h" #ifdef HAVE_GETAUXVAL # include <sys/auxv.h> #endif /* HAVE_GETAUXVAL */ static unsigned long sysinfo_ehdr; static void vdso_init(void) { #ifdef HAVE_GETAUXVAL if (sysinfo_ehdr) return; sysinfo_ehdr = getauxval(AT_SYSI...
google
android
parse_vdso
.c
platform/external/ltp/libs/libltpvdso/parse_vdso.c
6,996
utf_8
986971ed0c3064c2683faea3c18c20b6
/* * parse_vdso.c: Linux reference vDSO parser * Written by Andrew Lutomirski, 2011-2014. * * This code is meant to be linked in to various programs that run on Linux. * As such, it is available with as few restrictions as possible. This file * * The vDSO is a regular ELF DSO that the kernel maps into user spac...
google
android
tst_lockdown
.c
platform/external/ltp/lib/tst_lockdown.c
1,544
utf_8
80c7420efbd9efd4b92fae6ec9f681a2
#define TST_NO_DEFAULT_MAIN #define PATH_LOCKDOWN "/sys/kernel/security/lockdown" #include <stdio.h> #include <stdlib.h> #include <sys/mount.h> #include "tst_test.h" #include "tst_safe_macros.h" #include "tst_safe_stdio.h" #include "tst_lockdown.h" #include "tst_private.h" #define EFIVAR_SECUREBOOT "/sys/firmware/efi/e...
google
android
tst_coredump
.c
platform/external/ltp/lib/tst_coredump.c
731
utf_8
0e64e1a58d5ecb47e93c9ced7acee069
*/ #define TST_NO_DEFAULT_MAIN #include <sys/time.h> #include <sys/resource.h> #include "tst_test.h" #include "tst_coredump.h" void tst_no_corefile(int verbose) { struct rlimit new_r, old_r; if (verbose) { tst_res(TINFO, "Avoid dumping corefile for process(pid=%d)", getpid()); } } }
google
android
tst_assert
.c
platform/external/ltp/lib/tst_assert.c
2,266
utf_8
a7dec41de6df2392c183792661086f2c
*/ #include <stdio.h> #define TST_NO_DEFAULT_MAIN #include "tst_assert.h" #include "tst_test.h" void tst_assert_int(const char *file, const int lineno, const char *path, int val) { int sys_val; safe_file_scanf(file, lineno, NULL, path, "%d", &sys_val); if (val == sys_val) { tst_res_(file, lineno, TPASS, "%s = %d"...
google
android
safe_pthread
.c
platform/external/ltp/lib/safe_pthread.c
2,219
utf_8
1e106f5b8fb435c8eacf5d8444f4cb24
*/ #include <pthread.h> #include <stdio.h> #define TST_NO_DEFAULT_MAIN #include "tst_test.h" int safe_pthread_create(const char *file, const int lineno, pthread_t *thread_id, const pthread_attr_t *attr, void *(*thread_fn)(void *), void *arg) { int rval; rval = pthread_create(thread_id, attr, thread_fn, arg); ...
google
android
tst_clone
.c
platform/external/ltp/lib/tst_clone.c
820
utf_8
eb77f143e667f188cb8bbeef64894525
*/ #define TST_NO_DEFAULT_MAIN #include <stddef.h> #include "tst_test.h" #include "lapi/sched.h" pid_t tst_clone(const struct tst_clone_args *tst_args) { struct clone_args args = { .flags = tst_args->flags, .exit_signal = tst_args->exit_signal, }; int flags; pid_t pid = -1; tst_flush(); errno = ENOSYS; if (...
google
android
tst_arch
.c
platform/external/ltp/lib/tst_arch.c
1,851
utf_8
26f28797a44509d8d18a0c17028407f1
*/ #include <string.h> #include <stdlib.h> #define TST_NO_DEFAULT_MAIN #include "tst_arch.h" #include "tst_test.h" const struct tst_arch tst_arch = { #if defined(__x86_64__) .name = "x86_64", .type = TST_X86_64, #elif defined(__i386__) || defined(__i586__) || defined(__i686__) .name = "x86", ...
google
android
tst_net
.c
platform/external/ltp/lib/tst_net.c
5,441
utf_8
8918b249ecfa3ff4408b54bbd2ef6f88
*/ #include <errno.h> #include <netdb.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "tst_net.h" #include "tst_private.h" #include "lapi/sched.h" void tst_print_svar(const char *name, const char *val) { if (name && val) printf("export %s=\"%...
google
android
tst_safe_sysv_ipc
.c
platform/external/ltp/lib/tst_safe_sysv_ipc.c
5,970
utf_8
50dbfad3546daf0da1e554c934d1e82b
*/ #include <sys/types.h> #include <sys/msg.h> #include <sys/shm.h> #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "tst_safe_sysv_ipc.h" #include "lapi/ipc.h" #include "lapi/sem.h" /* * The IPC_STAT, IPC_SET, IPC_RMID can return either 0 or -1. */ static int msg_ret_check(int cmd, int ret) { switch (cmd...
google
android
tst_sig
.c
platform/external/ltp/lib/tst_sig.c
7,238
utf_8
bbfdbaf3bf53b488a2ed3be3f84fe1fa
/* * 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
tst_path_has_mnt_flags
.c
platform/external/ltp/lib/tst_path_has_mnt_flags.c
2,015
utf_8
58975df8c7fc1a57318476335e4c933c
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include <unistd.h> #include <mntent.h> #include <stdio.h> #include <string.h> #include "test.h" /* * Check whether a path is on a filesystem that is mounted with * specified flags. */ int tst_path_has_mnt_flags_(void (cleanup_fn)(void), const c...
google
android
tst_cgroup
.c
platform/external/ltp/lib/tst_cgroup.c
37,116
utf_8
00c9c31bee1096cf715f539c93b5ef56
*/ #define TST_NO_DEFAULT_MAIN #include <stdio.h> #include <stddef.h> #include <stdlib.h> #include <mntent.h> #include "tst_test.h" #include "lapi/fcntl.h" #include "lapi/mount.h" #include "lapi/mkdirat.h" #include "tst_safe_file_at.h" struct cgroup_root; /* A node in a single CGroup hierarchy. It exists mainly for *...
google
android
tst_tmpdir
.c
platform/external/ltp/lib/tst_tmpdir.c
8,455
utf_8
70a75c281f18e44c875aeb4d12b6c45b
/********************************************************** * 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: * * ...
google
android
tst_device
.c
platform/external/ltp/lib/tst_device.c
14,199
utf_8
df139345972d6d1f1494441180204f20
*/ #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <sys/mount.h> #include <mntent.h> #include <errno.h> #include <unistd.h> #include <stdlib.h> #include <linux/loop.h> #include <stdint.h> #include <inttypes.h> #include <sys/sysmacros.h> #include <linux/btrfs.h> #include <linux/limits.h> #i...
google
android
tst_rtnetlink
.c
platform/external/ltp/lib/tst_rtnetlink.c
9,090
utf_8
8dfb1f43e62e5537a6b0e27e97735eea
*/ #include <stdlib.h> #include <limits.h> #include <asm/types.h> #include <linux/netlink.h> #include <linux/rtnetlink.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/poll.h> #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "tst_rtnetlink.h" struct tst_rtnl_context { int socket; pid_t pid; ...
google
android
tlibio
.c
platform/external/ltp/lib/tlibio.c
61,538
utf_8
4ec1aa2d8082df021a37d9146c5d631c
/* * 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
tst_safe_io_uring
.c
platform/external/ltp/lib/tst_safe_io_uring.c
3,427
utf_8
75bb3cb7ae753ba92859d405b64ec49a
*/ #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "tst_safe_io_uring.h" int safe_io_uring_init(const char *file, const int lineno, unsigned int entries, struct io_uring_params *params, struct tst_io_uring *uring) { errno = 0; uring->fd = io_uring_setup(entries, params); if (uring->fd == -1) { if (er...
google
android
safe_net
.c
platform/external/ltp/lib/safe_net.c
13,209
utf_8
d6955433a74a3bd1af0536cb4fbc4e40
/* * */ #include <errno.h> #include "test.h" #include "safe_macros_fn.h" #include "safe_net_fn.h" char *tst_sock_addr(const struct sockaddr *sa, socklen_t salen, char *res, size_t len) { char portstr[8]; switch (sa->sa_family) { case AF_INET: { struct sockaddr_in *sin = (struct sockaddr_in *)sa; if (!ine...
google
android
tst_capability
.c
platform/external/ltp/lib/tst_capability.c
2,076
utf_8
d78352cff3f1501ec0054881c00bd03f
*/ #include <string.h> #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "tst_capability.h" #include "lapi/syscalls.h" int tst_capget(struct tst_cap_user_header *hdr, struct tst_cap_user_data *data) { return tst_syscall(__NR_capget, hdr, data); } int tst_capset(struct tst_cap_user_header *hdr, ...
google
android
tst_uid
.c
platform/external/ltp/lib/tst_uid.c
2,656
utf_8
4eda0f39e8538fde82906aa0fd399b12
*/ #include <sys/types.h> #include <grp.h> #include <errno.h> #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "tst_uid.h" #define MAX_GID 32767 gid_t tst_get_free_gid_(const char *file, const int lineno, gid_t skip) { gid_t ret; errno = 0; for (ret = 1; ret < MAX_GID; ret++) { if (ret == skip || getgrg...
google
android
tst_fill_file
.c
platform/external/ltp/lib/tst_fill_file.c
2,366
utf_8
9ffa6b94b3a8a8b4fc74280060bd81ba
/* * */ #define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include "lapi/fallocate.h" #include "test.h" int tst_fill_fd(int fd, char pattern, size_t bs, size_t bcount) { size_t i; char *buf; /* Filling a memory buffer with...
google
android
tst_fs_has_free
.c
platform/external/ltp/lib/tst_fs_has_free.c
1,265
utf_8
7b5ee31abe11fd63471ecc512b3feac5
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* * DESCRIPTION * Check if the mounted file system has enough free space, * if it is, tst_fs_has_free() returns 1, otherwise 0. */ #include <stdint.h> #include <sys/vfs.h> #include "test.h" #include "tst_fs.h" int tst_fs_has_free_(void (*cleanup...
google
android
tst_kvercmp
.c
platform/external/ltp/lib/tst_kvercmp.c
3,933
utf_8
e256ffbcbbf205a12c88bfc1075a76ec
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include <ctype.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <limits.h> #include <sys/utsname.h> #include "test.h" #define OSRELEASE_PATH "/etc/os-release" static char *parse_digit(const char *str, int *d) ...
google
android
safe_macros
.c
platform/external/ltp/lib/safe_macros.c
30,494
utf_8
fa1de7928888b9e1247d259194eca11a
*/ #define _GNU_SOURCE #include <sys/types.h> #include <sys/mman.h> #include <sys/resource.h> #include <sys/stat.h> #include <sys/wait.h> #include <sys/mount.h> #include <sys/xattr.h> #include <sys/sysinfo.h> #include <errno.h> #include <libgen.h> #include <limits.h> #include <pwd.h> #include <stdarg.h> #include <stdl...
google
android
tst_memutils
.c
platform/external/ltp/lib/tst_memutils.c
3,823
utf_8
642c35ba561a462fb29521be2b0406bf
*/ #include <stdio.h> #include <unistd.h> #include <limits.h> #include <sys/sysinfo.h> #include <stdlib.h> #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "tst_capability.h" #include "lapi/syscalls.h" #define BLOCKSIZE (16 * 1024 * 1024) void tst_pollute_memory(size_t maxsize, int fillchar) { size_t i, map...
google
android
tst_hugepage
.c
platform/external/ltp/lib/tst_hugepage.c
2,090
utf_8
78e8deea3a458a34397af446d621935f
*/ #define TST_NO_DEFAULT_MAIN #include "tst_test.h" #include "tst_hugepage.h" unsigned long tst_hugepages; char *nr_opt; char *Hopt; size_t tst_get_hugepage_size(void) { if (access(PATH_HUGEPAGES, F_OK)) return 0; return SAFE_READ_MEMINFO("Hugepagesize:") * 1024; } unsigned long tst_reserve_hugepages(struct tst_h...
google
android
tst_mkfs
.c
platform/external/ltp/lib/tst_mkfs.c
2,925
utf_8
4396d69d7d0250cdffd0d611e30249f9
/* */ #include "test.h" #include "ltp_priv.h" #include "tst_mkfs.h" #include "tst_device.h" #define OPTS_MAX 32 void tst_mkfs_(const char *file, const int lineno, void (cleanup_fn)(void), const char *dev, const char *fs_type, const char *const fs_opts[], const char *const extra_opts[]) { int i, pos = ...
google
android
tst_virt
.c
platform/external/ltp/lib/tst_virt.c
4,340
utf_8
e23736bd218adcb46ed12d98604f9434
/* * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. */ #include <unistd.h> #include <sys/stat.h> #include "test.h" #include "safe_macros.h" static int file_exist(const char *path) { struct stat st; if (!access(path, R_OK) && !stat(path, &st)) return 1; return 0; } static int is...