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 | s-c2 | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/s-c2.c | 10,994 | utf_8 | 235300ae7e87fdefecb878dd1f09e7a3 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a scalability test for the pthread_mutex_lock function.
* The goal is to test if there is a limit on the number
* of concurrent mutex having threads pending.
* The steps are:
* -> create some mutex attributes objects
* -> As long... |
google | android | testfrmw | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_lock/testfrmw.c | 1,768 | utf_8 | c518fd5b07318c5668acb2e8bcd21721 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
* with either the Linux Test Project or the Open POSIX Test Suite.
* The following function are defined:
* void output_init()
* void output_fini()
* void output(char * ... |
google | android | stress | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_once/stress.c | 5,809 | utf_8 | 6c721f0c4d298ecb0d3a7c0ea05b551a | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This stress test aims to test the following assertion:
* The init_routine from pthread_once never execute
* more or less than once.
* The steps are:
* -> Create several threads
* -> All threads call pthread_once at the same time
* -> Check the init_rou... |
google | android | testfrmw | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_once/testfrmw.c | 2,029 | utf_8 | fe34fe00f0671f7dca61db117e8be805 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
* with either the Linux Test Project or the Open POSIX Test Suite.
* The following function are defined:
* void output_init()
* void output_fini()
* void output(char * ... |
google | android | stress1 | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress1.c | 18,163 | utf_8 | 00c658065a7e458aebb1310cccbfabe4 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This file is a stress test for the function pthread_cond_wait.
*
*It aims to check the following assertion:
* When inside the function, the thread releases the mutex
* before waiting for the conditionnal variable.
* Those two operations are at... |
google | android | stress | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress.c | 17,705 | utf_8 | d8c63c2c922d1f53de9315f2553a532d | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This file is a stress test for the function pthread_cond_timedwait.
*
* It aims to check the following assertion:
* When a cancel request unblocks the thread,
* it must not consume any pending condition signal request.
* The steps are:
* -> C... |
google | android | testfrmw | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/testfrmw.c | 2,029 | utf_8 | fe34fe00f0671f7dca61db117e8be805 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
* with either the Linux Test Project or the Open POSIX Test Suite.
* The following function are defined:
* void output_init()
* void output_fini()
* void output(char * ... |
google | android | stress2 | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_wait/stress2.c | 17,705 | utf_8 | d8c63c2c922d1f53de9315f2553a532d | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This file is a stress test for the function pthread_cond_timedwait.
*
* It aims to check the following assertion:
* When a cancel request unblocks the thread,
* it must not consume any pending condition signal request.
* The steps are:
* -> C... |
google | android | stress | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_trylock/stress.c | 10,753 | utf_8 | a68088068272b67786f7e9253aa5ff9e | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This file is a stress test for the pthread_mutex_trylock function.
*
* It aims to check that when EBUSY is returned, the mutex has not been locked.
* The steps are:
* -> do
* -> Set up a timeout. The test fails if this timeout expires.
* -> ... |
google | android | testfrmw | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_trylock/testfrmw.c | 2,029 | utf_8 | fe34fe00f0671f7dca61db117e8be805 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
* with either the Linux Test Project or the Open POSIX Test Suite.
* The following function are defined:
* void output_init()
* void output_fini()
* void output(char * ... |
google | android | stress | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_kill/stress.c | 7,404 | utf_8 | 98f976609b7f40fe7cedd22baf5c2829 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This stress test aims to test the following assertions:
* -> pthread_kill() does not make the system unstable
* -> no signal get lost when they are not already pending.
* The steps are:
* -> create 2 threads which send signals heavily to a 3rd thread.... |
google | android | testfrmw | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_kill/testfrmw.c | 2,029 | utf_8 | fe34fe00f0671f7dca61db117e8be805 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
* with either the Linux Test Project or the Open POSIX Test Suite.
* The following function are defined:
* void output_init()
* void output_fini()
* void output(char * ... |
google | android | s-c | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/s-c.c | 9,238 | utf_8 | 168f3acfd8777033af0916819f0b75b9 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a scalability test for the pthread_mutex_init function.
* The steps are:
* -> Restrict the memory to 32Mb * SCALABILITY_FACTOR
* -> While there is free memory
* -> allocate memory for 10 mutex
* -> time = 0
* -> in... |
google | android | stress | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/stress.c | 5,914 | utf_8 | eb305c55792313d62daac9532b007d06 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a stress test for the pthread_mutex_init function.
* The steps are:
* -> Create some threads
* -> each thread loops on initializing and destroying a mutex
* -> the whole process stop when receiving signal SIGUSR1
*/
/*************... |
google | android | testfrmw | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_mutex_init/testfrmw.c | 1,768 | utf_8 | c518fd5b07318c5668acb2e8bcd21721 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
* with either the Linux Test Project or the Open POSIX Test Suite.
* The following function are defined:
* void output_init()
* void output_fini()
* void output(char * ... |
google | android | threads_scenarii | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_exit/threads_scenarii.c | 15,603 | utf_8 | 4a4d6187fde38fab4ea05bfb8a3edeae | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This file is a helper file for the pthread_create tests
* It defines the following objects:
* scenarii: array of struct __scenario type.
* NSCENAR : macro giving the total # of scenarii
* scenar_init(): function to call before use the scenarii arr... |
google | android | stress | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_exit/stress.c | 7,884 | utf_8 | c1656343f4bef8657cd73c2ca5f7ecfa | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This file is a stress test for the function pthread_exit.
*
* It aims to check that:
* -> when the threads are joinable, pthread_join always retrieve the
* correct value.
* -> pthread_exit() frees all the resources used by the threads.
*
... |
google | android | testfrmw | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_exit/testfrmw.c | 2,029 | utf_8 | fe34fe00f0671f7dca61db117e8be805 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
* with either the Linux Test Project or the Open POSIX Test Suite.
* The following function are defined:
* void output_init()
* void output_fini()
* void output(char * ... |
google | android | stress | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cancel/stress.c | 5,500 | utf_8 | 9f5cf4e563635619554378d624ac4b12 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This stress test aims to test the following assertion:
* Heavy cancelation does not break the system or the user application.
* The steps are:
* Create some threads which:
* Create a thread.
* Cancel this thread, as it terminates.
* Check the return... |
google | android | testfrmw | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cancel/testfrmw.c | 2,029 | utf_8 | fe34fe00f0671f7dca61db117e8be805 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
* with either the Linux Test Project or the Open POSIX Test Suite.
* The following function are defined:
* void output_init()
* void output_fini()
* void output(char * ... |
google | android | stress1 | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/stress1.c | 18,163 | utf_8 | ddf4b4af7767fef015f92425d307a375 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This file is a stress test for the function pthread_cond_timedwait.
*
*It aims to check the following assertion:
* When inside the function, the thread releases the mutex
* before waiting for the conditionnal variable.
* Those two operations a... |
google | android | s-c | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/s-c.c | 23,341 | utf_8 | 02c4328ab31ae190fa2e5f5f5330ae38 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a scalability test for the pthread_cond_timedwait function.
*
* It aims to measure the time between end of timeout and actual wakeup
* with different factors.
* The steps are:
* -*- Number of threads waiting on the conditionnal va... |
google | android | testfrmw | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/testfrmw.c | 1,768 | utf_8 | c518fd5b07318c5668acb2e8bcd21721 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
* with either the Linux Test Project or the Open POSIX Test Suite.
* The following function are defined:
* void output_init()
* void output_fini()
* void output(char * ... |
google | android | stress2 | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/threads/pthread_cond_timedwait/stress2.c | 17,469 | utf_8 | 2369ebbb0dd3765a04f63add7ab18c8e | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This file is a stress test for the function pthread_cond_timedwait.
*
* It aims to check the following assertion:
* When a cancel request unblocks the thread,
* it must not consume any pending condition signal request.
* The steps are:
* -> C... |
google | android | multi_send_rev_2 | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_2.c | 3,165 | utf_8 | 5c6ab3410cb8f12929e3d8847ef0cb69 | /*
* source tree.
*
* Test whether message queue can work correctly under lots of usage.
* 1. Many threads sending/receiving on the same message queue.
* 2. Set different Priority to the messages in the message queue, to see
* whether the highest priority is received first.
*/
#include <stdio.h>
#include <unistd... |
google | android | multi_send_rev_1 | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/mqueues/multi_send_rev_1.c | 3,718 | utf_8 | 26ab02b60112015ee62ea8fbcb148d57 | /*
* source tree.
*
* Test whether message queue can work correctly under lots of usage.
* 1. Many threads sending/receiving on different message queue.
* 2. Set different Priority to the messages in the message queue, to see whether the highest priority is received first.
*/
#include <stdio.h>
#include <unistd.h... |
google | android | multi_con_pro | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/semaphores/multi_con_pro.c | 5,568 | utf_8 | 7b620fd4fd4366751a4b719202c167f7 | /*
* source tree.
*
* This is a test about multiple producers and consumers. Producers send data
* to a buffer. Consumers keeps reading data from the buffer.
*/
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <string.h>
#include <ge... |
google | android | sigismember_stress_1 | .c | platform/external/ltp/testcases/open_posix_testsuite/stress/signals/sigismember_stress_1.c | 846 | utf_8 | 3127a035fccba30665de8cc229b83027 | /*
* source tree.
*
* Test that the results are undefined if sigismember() is called without
* first calling sigemptyset() or sigfillset().
* Any results are acceptable; however, the system should not crash, hang,
* or do something equally as harmful.
*/
#include <stdio.h>
#include <signal.h>
#include <posix... |
google | android | t0 | .c | platform/external/ltp/testcases/open_posix_testsuite/tools/t0.c | 3,335 | utf_8 | 668ff59644cd6afd5b74243f3848fcde | /*
* The syntax is:
* $ ./t0 n exe arglist
* where n is the timeout duration in seconds,
* exe is the executable filename to run,
* arglist is the arguments to be passed to executable.
*
* The use of this utility is intended to be "transparent", which means
* everything is as if
* $ exe arglist
... |
google | android | pthread_cond_wait_2 | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/threads/condvar/pthread_cond_wait_2.c | 3,919 | utf_8 | ae29d8e6c946bcbb4d4978d65a9b3bc5 | /*
* source tree.
*
* Test that pthread_cond_broadcast()
* shall wakeup a high priority thread even when a low priority thread
* is running
*
* Steps:
* 1. Create a condition variable
* 2. Create a high priority thread and make it wait on the cond
* 3. Create a low priority thread and let it busy-loop
* ... |
google | android | pthread_cond_wait_1 | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/threads/condvar/pthread_cond_wait_1.c | 3,913 | utf_8 | f781b5559b1d4b5b62fd3206b8e1e1da | /*
* source tree.
*
* Test that pthread_cond_signal()
* shall wakeup a high priority thread even when a low priority thread
* is running
*
* Steps:
* 1. Create a condition variable
* 2. Create a high priority thread and make it wait on the cond
* 3. Create a low priority thread and let it busy-loop
* 4. ... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/threads/schedule/1-2.c | 4,457 | utf_8 | 50f11fa7aa247a5ce9b87498dbc4f088 | /*
* source tree.
*
* Test that pthread_mutex_unlock()
* shall wakeup a high priority thread even when a low priority thread
* is running
*
* Steps:
* 1. Create a mutex and lock
* 2. Create a high priority thread and make it wait on the mutex
* 3. Create a low priority thread and let it busy-loop
* 4. Both l... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/threads/schedule/1-1.c | 3,873 | utf_8 | e557bced2421fe8cccad8321333ea452 | /*
* source tree.
*
* Test that pthread_barrier_wait()
* shall wakeup a high priority thread even when a low priority thread
* is running
*
* Steps:
* 1. Create a barrier object
* 2. Create a high priority thread and make it wait on the barrier
* 3. Create a low priority thread and let it busy-loop
* 4. Both... |
google | android | send_rev_2 | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/mqueues/send_rev_2.c | 3,578 | utf_8 | 4cf4f1a9d5da914510d37601382b303b | /*
* source tree.
*
* 1. Two threads sending/receiving on different message queue.
* 2. Set different Priority to the messages in the message queue, to
* see whether the highest priority is received first.
*/
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/wait.h>
#incl... |
google | android | send_rev_1 | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/mqueues/send_rev_1.c | 2,546 | utf_8 | b4373c8cba034b1c642df75ba7ca74ba | /*
* source tree.
*
* Test two processes can read/write from the same message queue
* at the same time.
*
*/
#include <sys/mman.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <limits.h>
#include <mqueue.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "posixtest.h"
... |
google | android | sem_readerwriter | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/semaphores/sem_readerwriter.c | 3,903 | utf_8 | 061dd846cb041ccccad66f4c4632cb25 | /*
* source tree.
*
* This test use semaphore to implement reader and writer problem. Some readers
* and some writers read/write on one blackboard. Only one writer allow to
* write on the board at the same time. Reader and Writer can't use the board
* the same time. Reader has higher priority than writer, which m... |
google | android | sem_lock | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/semaphores/sem_lock.c | 1,978 | utf_8 | 4114c73179728c6b72c19895a91f592e | /*
* source tree.
*
* This test use semaphore to protect critical section between several
* processes.
*/
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <string.h>
#include <errno.h>
#include <semaphore.h>
#include "posixtest.h"
#d... |
google | android | sem_philosopher | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/semaphores/sem_philosopher.c | 3,332 | utf_8 | 330f40b9ec40e1f3ae44082857322674 | /*
* source tree.
*
* Test the well-known philosophy problem.
*
*/
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <string.h>
#include <errno.h>
#include <semaphore.h>
#include <pthread.h>
#include "posixtest.h"
#define PH_NUM 5
#d... |
google | android | sem_sleepingbarber | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/semaphores/sem_sleepingbarber.c | 4,256 | utf_8 | 23096b4fe7f04ea004a103561153f81b | /*
* source tree.
*
* Test the well-known sleeping barber problem.
*/
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <string.h>
#include <errno.h>
#include <pthread.h>
#include <semaphore.h>
#include <time.h>
#include "posixtest.h"
... |
google | android | sem_conpro | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/semaphores/sem_conpro.c | 3,121 | utf_8 | 513fb19faad9891c5185ea74ce018062 | /*
* source tree.
*
* This is a test about producer and consumer. Producer sends data
* to a buffer. Consumer keeps reading data from the buffer.
*/
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <string.h>
#include <errno.h>
#incl... |
google | android | invaliddates | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/timers/clocks/invaliddates.c | 2,330 | utf_8 | 3740cface8a04b73a9ee97968ef94ea8 | /*
* source tree.
*
* Test that the clock time can be set to a large number, Y2K
* critical dates, and times around daylight savings.
*
* Test for CLOCK_REALTIME. (N/A for CLOCK_MONOTONIC as that clock
* cannot be set.)
*/
#include <stdio.h>
#include <time.h>
#include <stdint.h>
#include "posixtest.h"
#define ... |
google | android | twopsetclock | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/timers/clocks/twopsetclock.c | 2,579 | utf_8 | 61aed71877dedd1b8a32429d997397ed | /*
* source tree.
*
* Test having two processes attempt to set the clock at the same time.
* Ensure that both actually set the clock, and it is the later one that
* takes effect. [Note: It would be hard to test that they both set
* the clock without setting up atomic operations. Will just test that
* at least... |
google | android | twoptimers | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/timers/timers/twoptimers.c | 3,517 | utf_8 | d8496c41270055d39027295c4e9b021c | /*
* source tree.
*
* Test having two timers in different processes set to expire at the
* same time, and ensure they both expire at the same time.
*/
#include <stdio.h>
#include <time.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include "posixtest.h"... |
google | android | twoevtimers | .c | platform/external/ltp/testcases/open_posix_testsuite/functional/timers/timers/twoevtimers.c | 2,644 | utf_8 | b573935edbab882caefa751bfe839004 | /*
* source tree.
*
* Test having two timers in different processes set to expire at the
* same time, and ensure they both expire at the same time.
*/
#include <stdio.h>
#include <time.h>
#include <signal.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include "posixtest.h"... |
google | android | stack_space | .c | platform/external/ltp/testcases/kernel/mem/vmtests/stack_space.c | 8,502 | utf_8 | bb4423808049b8e16cde517ab09ff0da | /*
*
/*
* NAME
* stack_space.c - stack test
*
* Test VM for set of stack-space intensive programs.
* This code very similar to tdat.c, only uses stack-based "file".
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <unistd.h>... |
google | android | data_space | .c | platform/external/ltp/testcases/kernel/mem/vmtests/data_space.c | 9,845 | utf_8 | 8eac9474559d4edd66c6eeeccc8640ad | /*
*
/*
* NAME
* data_space.c -- test data space
*
* CALLS
* malloc (3)
*
* ALGORITHM
* Test VM for set of data-space intensive programs
*
*/
#define _XOPEN_SOURCE 500
#include <stdio.h>
#include <signal.h>
#include <sys/types.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <unistd.h... |
google | android | mem02 | .c | platform/external/ltp/testcases/kernel/mem/mem/mem02.c | 6,462 | utf_8 | 3e510946ab62d4a99018251a98954be1 | /*
*
/*======================================================================
/ =================== TESTPLAN SEGMENT ===================
>KEYS: < calloc, malloc, free, realloc, valloc
>WHAT: < check that memory can be allocated and freed. check for zeroed
< memory.
>HOW: < Allocate a big chunk of memory, verify it... |
google | android | hugemmap07 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap07.c | 3,094 | utf_8 | 8afdbcf79b127c2ef818e2f75be7c376 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* Certain kernels have a bug where brk() does not perform the same
* checks that a MAP_FIXED mmap() will, allowing brk() to create a
* normal page VMA in a hugepage only address region. This can lead
* to oopses or other badness.
*/
#define _GNU_SOUR... |
google | android | hugemmap04 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c | 3,049 | utf_8 | 198772a1e2ddbeed6d7fe9a202fd8400 | *
* Test Name: hugemmap04
*
* Test Description:
* Verify that, a hugetlb mmap() succeeds when used to map the largest
* size possible.
*
* Expected Result:
* mmap() should succeed returning the address of the hugetlb mapped region.
* The number of free huge pages should decrease.
*
* Test:
* Loop if t... |
google | android | hugemmap12 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap12.c | 2,067 | utf_8 | 0997c1973e585fa74c62287937cf20c2 | * Author: Mel Gorman
*/
/*\
* [Description]
*
* fadvise() on some kernels can cause the reservation counter to get
* corrupted. The problem is that the patches are allocated for the
* reservation but not faulted in at the time of allocation. The counters
* do not get updated and effectively "leak". This test id... |
google | android | hugemmap25 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap25.c | 2,375 | utf_8 | ddf6b7921819ef3c58e98fe88c80dc44 | * Author: David Gibson
*/
/*\
* [Description]
*
* The kernel has bug for mremap() on some architecture. mremap() can
* cause crashes on architectures with holes in the address space
* (like ia64) and on powerpc with it's distinct page size "slices".
*
* This test get the normal mapping address and mremap() hug... |
google | android | hugemmap13 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap13.c | 3,125 | utf_8 | d498914d206c2164e89e605a2235fc7f | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* On some old ppc64 kernel, when hpage is mmaped on 32 bit boundary and
* normal page below it, it triggers the bug caused by off-by-one error.
*
* WARNING: The offsets and addresses used within are specifically
* calculated to trigger the bug as it ... |
google | android | hugemmap10 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap10.c | 12,661 | utf_8 | e57635f1cc4fcd7a99c1ef5a96d892c0 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* This Test perform mmap, munmap and write operation on hugetlb file
* based mapping. Mapping can be shared or private. and it checks for
* Hugetlb counter (Total, Free, Reserve, Surplus) in /proc/meminfo and
* compare them with expected (calculated) ... |
google | android | hugemmap22 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap22.c | 2,014 | utf_8 | 7def3400600a338631779e5784c382e2 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* This baseline test validates that a mapping of a certain size can be
* created, correctly. Once created, all the pages are filled with a
* pattern and rechecked to test for corruption. The mapping is then
* released. This process is repeated for a s... |
google | android | hugemmap14 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap14.c | 4,376 | utf_8 | 938643e4c1233fbde3aac8d103c1889f | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
* On some old ppc64 kernel, when huge page is mapped at below touching
* 32 bit boundary (4GB - hpage_size), and normal page is mmaped
* at just above it, it triggers a bug caused by off-by-one error.
*
* WARNING: The offsets and addresses used within a... |
google | android | hugemmap11 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap11.c | 1,816 | utf_8 | 16538505a3da9a56e27084acbe2d2101 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* This Test perform Direct Write/Read from/To hugetlbfs file
* which is mapped to process address space. The test is checking if it
* succeeds and data written or read is not corrupted.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/mount.h>
... |
google | android | hugemmap19 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap19.c | 4,296 | utf_8 | 04b44fd312527afa79ae35088412f1f9 | * Author: David Gibson & Adam Litke
*/
/*\
* [Descripiton]
*
* At one stage, a misconversion of hugetlb_vmtruncate_list to a
* prio_tree meant that on 32-bit machines, truncates at or above 4GB
* could truncate lower pages, resulting in BUG_ON()s.
*
* WARNING: The offsets and addresses used within are specific... |
google | android | hugemmap29 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap29.c | 2,426 | utf_8 | 0b377114dc4785078d936ecd85713f08 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* The test do mmap() with shared mapping and write. It matches the data
* with private mmap() and then change it with other data. It checks
* shared mapping data if data is not contaiminated by private mapping.
* Similiarly checks for private data if ... |
google | android | hugemmap31 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap31.c | 1,587 | utf_8 | 5a937a80766e4b8e566bc6df6b390f67 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* This test is basic shared mapping test. Two shared mappings are created
* with same offset on a file. It checks if writing to one mapping can be
* seen to other mapping or not?
*/
#include "hugetlb.h"
#define RANDOM_CONSTANT 0x1234ABCD
#define MNTPO... |
google | android | hugemmap02 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c | 4,219 | utf_8 | 2c3b042b72a4e8573169b5736510786a | *
* Test Name: hugemmap02
*
* Test Description: There is both a low hugepage region (at 2-3G for use by
* 32-bit processes) and a high hugepage region (at 1-1.5T). The high region
* is always exclusively for hugepages, but the low region has to be activated
* before it can be used for hugepages. When the kerne... |
google | android | hugemmap16 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap16.c | 2,076 | utf_8 | 9d4d50e93a3f2aa5fa0f361b26bb137c | * Author: Eric B Munson and Mel Gorman
*/
/*\
* [Description]
*
* madvise() on some kernels can cause the reservation counter to get
* corrupted. The problem is that the patches are allocated
* for the reservation but not faulted in at the time of allocation. The
* counters do not get updated and effectively "l... |
google | android | hugemmap18 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap18.c | 4,041 | utf_8 | 2433b1783c81135417ff505f27363819 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* Just as normal mmap()s can't have an address, length or offset which
* is not page aligned, so hugepage mmap()s can't have an address, length
* or offset with is not hugepage aligned.
*
* However, from time to time when the various mmap() /
* get_... |
google | android | hugemmap28 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap28.c | 1,327 | utf_8 | a43c503d7dfe9b626611f1b9d3b560dd | * Author: Joonsoo Kim
*/
/*\
* [Description]
*
* Test to correct handling for reserve count. If no reserved mapping is
* created to reserved file region, it should be considered as reserve
* mapping. Otherwise, reserve count will be overflowed.
*/
#include "hugetlb.h"
#define MNTPOINT "hugetlbfs/"
static long h... |
google | android | hugemmap27 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap27.c | 2,639 | utf_8 | b5b70c73b09a0022a12a7b1dedd2a349 | * Author: Joonsoo Kim
*/
/*\
* [Description]
*
* Test to preserve a reserved page against no-reserved mapping. If all
* hugepages are reserved, access to no-reserved shared mapping cause a
* process die, instead of stealing a hugepage which is reserved for other
* process.
*/
#include <setjmp.h>
#include "huge... |
google | android | hugemmap06 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap06.c | 3,082 | utf_8 | 9fd3c78bffc039fdd37da049a61b8ece | *
* DESCRIPTION
*
* There is a race condition if we map a same file on different processes.
* Region tracking is protected by mmap_sem and hugetlb_instantiation_mutex.
* When we do mmap, we don't grab a hugetlb_instantiation_mutex, but only
* mmap_sem (exclusively). This doesn't prevent other tasks from... |
google | android | hugemmap01 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c | 2,499 | utf_8 | 9e4053d7ea28fc9f8f6989f17e2c59fd | *
* Test Name: hugemmap01
*
* Test Description:
* Verify that, mmap() succeeds when used to map a file in a hugetlbfs.
*
* Expected Result:
* mmap() should succeed returning the address of the hugetlb mapped region.
* The number of free huge pages should decrease.
*
* Test:
* Loop if the proper options ... |
google | android | hugemmap09 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap09.c | 1,733 | utf_8 | bb09c6f4bb41394ee525a2141da1a70e | * Author: Joonsoo Kim
*/
/*\
* [Description]
*
* Test sanity of cow optimization on page cache. If a page in page cache
* has only 1 ref count, it is mapped for a private mapping directly and
* is overwritten freely, so next time we access the page, we can see
* corrupt data.
*/
#define _GNU_SOURCE
#include <s... |
google | android | hugemmap15 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap15.c | 6,378 | utf_8 | 155b27b4077af66a02d7b4b6d77f7e22 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* Older ppc64 kernels don't properly flush dcache to icache before
* giving a cleared page to userspace. With some exceedingly
* hairy code, this attempts to test for this bug.
*
* This test will never trigger (obviously) on machines with coherent
... |
google | android | hugemmap21 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap21.c | 2,613 | utf_8 | 331580e901c6935b77f3b49346ea95a0 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* Tests copy-on-write semantics of large pages where a number of threads
* map the same file with the MAP_PRIVATE flag. The threads then write
* into their copy of the mapping and recheck the contents to ensure they
* were not corrupted by the other t... |
google | android | hugemmap17 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap17.c | 2,485 | utf_8 | dbed2dbd3d1229c9e8c1ca1b825c6491 | *
* WARNING: The offsets and addresses used within are specifically
* calculated to trigger the bug as it existed. Don't mess with them
* unless you *really* know what you're doing.
*
* The kernel bug in question was fixed with commit
* 856fc2950555.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/moun... |
google | android | hugemmap05 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c | 8,294 | utf_8 | e30b975fb225e8c42aedc42ec050f84b | *
* hugetlbfs allows to overcommit hugepages and there are tunables in
* sysfs and procfs. The test here want to ensure it is possible to
* overcommit by either mmap or shared memory. Also ensure those
* reservation can be read/write, and several statistics work correctly.
*
* First, it resets nr_hugepages and n... |
google | android | hugemmap23 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap23.c | 4,792 | utf_8 | 462e63dbf821acabd97c9e53b13527eb | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* This test uses mprotect to change protection of hugepage mapping and
* perform read/write operation. It checks if the operation results in
* expected behaviour as per the protection.
*/
#include <setjmp.h>
#include "hugetlb.h"
#define MNTPOINT "huge... |
google | android | hugemmap24 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap24.c | 4,411 | utf_8 | 7c5a2d1278eff0086293ac7df455cf0e | * Author: David Gibson
*/
/*\
* [Description]
*
* Kernel has bug in mremap for some architecture. mremap() can cause
* crashes on architectures with holes in the address space (like ia64)
* and on powerpc with it's distict page size slices.
*
* This test perform mremap() with normal and hugepages around powerp... |
google | android | hugemmap20 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap20.c | 1,873 | utf_8 | a209b09645b9199a159a3d8409e1854b | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* The test checks that mlocking hugetlb areas works with all combinations
* of MAP_PRIVATE and MAP_SHARED with and without MAP_LOCKED specified.
*/
#include "hugetlb.h"
#define MNTPOINT "hugetlbfs/"
static int fd = -1;
static unsigned long hpage_size;
... |
google | android | hugemmap08 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap08.c | 3,533 | utf_8 | 0b4b099ab395a98839a3cfdd96d50536 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* Some kernel versions after hugepage demand allocation was added used a
* dubious heuristic to check if there was enough hugepage space available
* for a given mapping. The number of not-already-instantiated pages in
* the mapping was compared again... |
google | android | hugemmap26 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap26.c | 2,115 | utf_8 | 37e2d256112aa2c301276df3d3d9ea2f | * Author: David Gibson
*/
/*\
* [Description]
*
* Test Description: The kernel has bug for mremap() on some architecture.
* mremap() can cause crashes on architectures with holes in the address
* space (like ia64) and on powerpc with it's distinct page size "slices".
*
* This test get the huge mapping address ... |
google | android | hugemmap30 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugemmap/hugemmap30.c | 1,753 | utf_8 | 887209a7d631929d56711357f66f0d04 | * Author: Mel Gorman
*/
/*\
* [Description]
*
* readahead() on some kernels can cause the reservation counter to get
* corrupted. The problem is that the pages are allocated for the
* reservation but not faulted in at the time of allocation. The
* counters do not get updated and effectively "leak". This test
*... |
google | android | hugeshmdt01 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmdt/hugeshmdt01.c | 3,856 | utf_8 | 195cc6a9d9ac658ac5ce7a65dd7b466e | *
* DESCRIPTION
* hugeshmdt01 - check that largr shared memory is detached correctly
*
* ALGORITHM
* create a large shared memory resource
* attach it to the current process and give it a value
* call shmdt() using the TEST macro
* check the return code
* if failure, issue a FAIL message.
* otherwise,
* ... |
google | android | hugetlb | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/lib/hugetlb.c | 3,283 | utf_8 | fcb03f66e2df01f5e2790602250b6a25 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* NAME
* hugetlb.c
*
* DESCRIPTION
* common routines for the hugepage tests.
*
* The library contains the following routines:
*
* getipckey()
* getuserid()
* rm_shm()
*/
#define TST_NO_DEFAULT_MAIN
#include <sys/t... |
google | android | hugeshmctl02 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl02.c | 2,894 | utf_8 | 9280b1fc24dfa94fa43027df7bc62f1c | */
/*
* DESCRIPTION
* hugeshmctl02 - check for EACCES, EFAULT and EINVAL errors
*
* ALGORITHM
* create a large shared memory segment without read or write permissions
* create a large shared memory segment with read & write permissions
* loop if that option was specified
* call shmctl() using five different ... |
google | android | hugeshmctl01 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl01.c | 7,454 | utf_8 | d414b7b526e06f7521cad788a2ef36cb | */
/*
* DESCRIPTION
* hugeshmctl01 - test the IPC_STAT, IPC_SET and IPC_RMID commands as
* they are used with shmctl()
*
* ALGORITHM
* loop if that option was specified
* create a large shared memory segment with read and write permission
* set up any test case specific conditions
* call shmctl() using th... |
google | android | hugeshmctl03 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmctl/hugeshmctl03.c | 3,173 | utf_8 | c13172c65e61274c7b01d6fc9061168b | */
/*
* DESCRIPTION
* hugeshmctl03 - check for EACCES, and EPERM errors
*
* ALGORITHM
* create a large shared memory segment with root only read & write
* permissions fork a child process
* if child
* set the ID of the child process to that of "ltpuser1"
* call do_child()
* loop if that option was spec... |
google | android | hugeshmget03 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget03.c | 2,480 | utf_8 | f085582bc53e7e48a2ea5aeea7832a64 | *
* DESCRIPTION
* hugeshmget03 - test for ENOSPC error
*
* HISTORY
* 03/2001 - Written by Wayne Boyer
* 04/2004 - Updated by Robbie Williamson
*/
#include <limits.h>
#include "hugetlb.h"
/*
* The MAXIDS value is somewhat arbitrary and may need to be increased
* depending on the system being tested.
*/
#defin... |
google | android | hugeshmget01 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c | 1,741 | utf_8 | bdc7e5f1d44888c5a8011e1105c5e3f8 | *
* DESCRIPTION
* hugeshmget01 - test that shmget() correctly creates a large
* shared memory segment
*
* HISTORY
* 03/2001 - Written by Wayne Boyer
* 04/2004 - Updated by Robbie Williamson
*/
#include <limits.h>
#include "hugetlb.h"
static size_t shm_size;
static int shm_id_1 = -1;
static void test_hugeshmg... |
google | android | hugeshmget02 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget02.c | 2,470 | utf_8 | 8f6ea1735fb69e449018760baa50e412 | *
*
* DESCRIPTION
* hugeshmget02 - check for ENOENT, EEXIST and EINVAL errors
*
* HISTORY
* 03/2001 - Written by Wayne Boyer
* 04/2004 - Updated by Robbie Williamson
*/
#include <limits.h>
#include "hugetlb.h"
static size_t shm_size;
static int shm_id_1 = -1;
static int shm_nonexistent_key = -1;
static key_t s... |
google | android | hugeshmget05 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget05.c | 2,045 | utf_8 | 61a34accfe1c05f423e39dcd1ff9e93f | *
* DESCRIPTION
* hugeshmget05 - test for EACCES error
*
* HISTORY
* 03/2001 - Written by Wayne Boyer
* 04/2004 - Updated by Robbie Williamson
*/
#include <sys/types.h>
#include <sys/wait.h>
#include <limits.h>
#include "hugetlb.h"
static size_t shm_size;
static int shm_id_1 = -1;
static uid_t ltp_uid;
static c... |
google | android | hugefork01 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugefork/hugefork01.c | 2,010 | utf_8 | 37ef50111904957eaa16abfe8cf12639 | * Author: David Gibson
*/
/*\
* [Description]
*
* This checks copy-on-write semantics, specifically the semantics of a
* MAP_PRIVATE mapping across a fork(). Some versions of the powerpc
* kernel had a bug in huge_ptep_set_wrprotect() which would fail to
* flush the hash table after setting the write protect b... |
google | android | hugefork02 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugefork/hugefork02.c | 1,830 | utf_8 | 84c848f1325432fe02c048d7819fbb96 | * Author: David Gibson & Adam Litke
*/
/*\
* [Description]
*
* Test shared memory behavior when multiple threads are attached to a
* segment. A segment is created and then children are spawned which
* attach, write, read (verify), and detach from the shared memory segment.
*/
#include "tst_safe_sysv_ipc.h"
#inc... |
google | android | hugefallocate02 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugefallocate/hugefallocate02.c | 2,032 | utf_8 | e6fc08be6464540aea7a81fc4e80ec93 | * Author: Mike Kravetz
*/
/*\
* [Description]
*
* It tests basic fallocate functionality in hugetlbfs. Preallocate huge
* pages to a file in hugetlbfs, and then remove the pages via hole punch.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/mount.h>
#include <limits.h>
#include <sys/param.h>
#include <s... |
google | android | hugefallocate01 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugefallocate/hugefallocate01.c | 4,365 | utf_8 | 4378f132a31f2c8b686cb7911f1dc5fd | * Author: Mike Kravetz
*/
/*\
* [Description]
*
* It tests alignment of fallocate arguments. fallocate will take non-huge
* page aligned offsets and addresses. However, operations are only
* performed on huge pages. This is different that than fallocate
* behavior in "normal" filesystems.
*/
#define _GNU_SOU... |
google | android | hugeshmat05 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat05.c | 2,443 | utf_8 | 6504406c525c30e9ae5ad296b64cc4da | *
*
* DESCRIPTION
* shmget()/shmat() fails to allocate huge pages shared memory segment
* with EINVAL if its size is not in the range [ N*HUGE_PAGE_SIZE - 4095,
* N*HUGE_PAGE_SIZE ]. This is a problem in the memory segment size round
* up algorithm. The requested size is rounded up to PAGE_SIZE (4096), but
* if... |
google | android | hugeshmat04 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat04.c | 2,848 | utf_8 | e27498d09def6e8aa94f4b6a302c3c97 | *
* DESCRIPTION
* hugeshmat04 - test for hugepage leak inspection.
*
* It is a regression test for shared hugepage leak, when over 1GB
* shared memory was alocated in hugepage, the hugepage is not released
* though process finished.
*
* You need more than 2GB memory in test job
*
* HISTORY
* 05/2014 - Writ... |
google | android | hugeshmat01 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat01.c | 4,383 | utf_8 | baa40d74730541adb79a45765b79de6f | *
* DESCRIPTION
* hugeshmat01 - test that shmat() works correctly
*
* ALGORITHM
* create a large shared memory resouce with read/write permissions
* loop if that option was specified
* call shmat() with the TEST() macro using three valid conditions
* check the return code
* if failure, issue a FAIL message.... |
google | android | hugeshmat02 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat02.c | 2,576 | utf_8 | 9daa986099e009b758e1f23977173363 | *
* DESCRIPTION
* hugeshmat02 - check for EINVAL and EACCES errors with hugetlb
*
* ALGORITHM
* loop if that option was specified
* call shmat() using three invalid test cases
* check the errno value
* issue a PASS message if we get EINVAL or EACCES
* otherwise, the tests fails
* issue a FAIL m... |
google | android | hugeshmat03 | .c | platform/external/ltp/testcases/kernel/mem/hugetlb/hugeshmat/hugeshmat03.c | 2,350 | utf_8 | 1ffdf962c91cf0fe7d3c2b143c981115 | *
* DESCRIPTION
* hugeshmat03 - test for EACCES error
*
* ALGORITHM
* create a shared memory segment with root only read & write permissions
* fork a child process
* if child
* set the ID of the child process to that of "nobody"
* loop if that option was specified
* call shmat() using the TEST() macr... |
google | android | mtest01 | .c | platform/external/ltp/testcases/kernel/mem/mtest01/mtest01.c | 6,152 | utf_8 | 640adf58f4805cd464934370a5084c96 | *
* DESCRIPTION:
*
* mtest01 mallocs memory <chunksize> at a time until malloc fails.
*
* Parent process starts several child processes (each child process is
* tasked with allocating some amount of memory), it waits until all child
* processes send SIGRTMIN signal and resumes all children by sending the
... |
google | android | page01 | .c | platform/external/ltp/testcases/kernel/mem/page/page01.c | 6,584 | utf_8 | 72e8b11c406770c76abfc05d0be14926 | /*
*
/* page01.c */
/*======================================================================
=================== TESTPLAN SEGMENT ===================
CALLS: malloc(3)
Run with KILL flag
>KEYS: < paging behavior
>WHAT: < Does the system balk at heavy demands on it's paging facilities?
>HOW: < Create a numbe... |
google | android | page02 | .c | platform/external/ltp/testcases/kernel/mem/page/page02.c | 6,271 | utf_8 | 5e7d31f8ae492a0a934d422e593d2215 | /*
*
/* page02.c */
/*======================================================================
=================== TESTPLAN SEGMENT ===================
CALLS: malloc(3)
Run with KILL flag.
>KEYS: < paging behavior
>WHAT: < Does the system balk at heavy demands on it's paging facilities?
>HOW: < Create a numb... |
google | android | swapping01 | .c | platform/external/ltp/testcases/kernel/mem/swapping/swapping01.c | 4,675 | utf_8 | 80a80cd6412fc974568d83f860cfe50e | */
/*\
* [Description]
*
* Detect heavy swapping during first time swap use.
*
* This case is used for testing kernel commit:
* 50a15981a1fa ("[S390] reference bit testing for unmapped pages")
*
* The upstream commit fixed a issue on s390/x platform that heavy
* swapping might occur in some condition, however... |
google | android | oom02 | .c | platform/external/ltp/testcases/kernel/mem/oom/oom02.c | 2,156 | utf_8 | ea6bc92a022a4c22c1f5a92c0bcd2a58 | /*
* Out Of Memory (OOM) for mempolicy - need NUMA system support
*
* The program is designed to cope with unpredictable like amount and
* system physical memory, swap size and other VMM technology like KSM,
* memcg, memory hotplug and so on which may affect the OOM
* behaviours. It simply increase the memory con... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.