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
2-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/2-2.c
3,054
utf_8
6da6c27d51ab44729fb83f92500b0d9b
/* * source tree. * Test pthread_attr_setinheritsched() * * Steps: * 1. Initialize pthread_attr_t object (attr) * 2. Set schedule policy (policy) in attr to SCHED_FIFO * 3. Set inheritsched to PTHREAD_EXPLICIT_SCHED in attr * 4. Call pthread_create with attr * 5. Call pthread_getschedparam in the created ...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setinheritsched/4-1.c
1,256
utf_8
4e9e1c8c8428a667e9d77d6311a09b0c
/* * source tree. * Test pthread_attr_setinheritsched() * * Steps: * 1. Initialize a pthread_attr_t object using pthread_attr_init() * 2. Call pthread_attr_setinheritsched with unsupported inheritsched * parameter * */ #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #includ...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/2-1.c
935
utf_8
f5dc947b6acf6b28de13306a98a033f7
/* * * * Test that sched_get_priority_min() returns -1 on failure */ #include <stdio.h> #include <sched.h> #include <errno.h> #include "posixtest.h" int main(void) { int result = -1; result = sched_get_priority_min(-1); if (result == -1 && errno == EINVAL) { printf("Test PASSED\n"); return PTS_PASS; } if (...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-2.c
899
utf_8
8643e47cadaa59734f19ed26b34d1e10
/* * * * Test that sched_get_priority_min() returns the appropriate minimum value on * success for SCHED_FIFO policy. */ #include <stdio.h> #include <sched.h> #include <errno.h> #include "posixtest.h" int main(void) { int result = -1; result = sched_get_priority_min(SCHED_FIFO); if (result != -1 && errno == 0) ...
google
android
1-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-3.c
1,193
utf_8
f7f1b9eb60eb708a04df7e2a0c97a86a
/* * * * Test that sched_get_priority_min() returns the appropriate minimum value on * success for SCHED_SPORADIC policy. */ #include <stdio.h> #include <sched.h> #include <errno.h> #include <unistd.h> #include "posixtest.h" #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)||defined(_POSIX_THREAD...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-1.c
881
utf_8
1d063cc3a5e77bbb6156ed757081dc19
/* * * * Test that sched_get_priority_min() returns the minimum value on * success for SCHED_RR policy. */ #include <stdio.h> #include <sched.h> #include <errno.h> #include "posixtest.h" int main(void) { int result = -1; result = sched_get_priority_min(SCHED_RR); if (result != -1 && errno == 0) { printf("The ...
google
android
1-4
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_min/1-4.c
902
utf_8
f01dc94b896b1e106d0485d57970e7fb
/* * * * Test that sched_get_priority_min() returns the appropriate minimum value on * success for SCHED_OTHER policy. */ #include <stdio.h> #include <sched.h> #include <errno.h> #include "posixtest.h" int main(void) { int result = -1; result = sched_get_priority_min(SCHED_OTHER); if (result != -1 && errno == 0...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getstack/1-1.c
2,137
utf_8
a2a515721c6407666db683ca2441e7bb
/* * source tree. * Test pthread_attr_getstack() * * Steps: * 1. Initialize pthread_attr_t object (attr) * 2. set the stackaddr and stacksize to attr * 3. get the stackaddr and stacksize */ #include <pthread.h> #include <limits.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <sys/param...
google
android
9-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/9-1.c
4,692
utf_8
eee0792eae061d8f60cf7b76d0b43c80
/* * source tree. */ /* * assertion: * * aio_suspend() shall fail if: * [EAGAIN] No AIO indicated in the list completed before timeout * * method: * * - write to a file * - submit a list of read requests * - check that the selected request has not completed * - suspend on selected request * - check that t...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/3-1.c
2,283
utf_8
7edd019c3ff5af1eb89fe1dd0a142404
/* * source tree. */ /* * assertion: * * The list array may contain NULL pointers which are ignored. * * method: * * - submit a bunch of aio_write * - prepare suspend list with NULL pointers * - call aio_suspend with this list * */ #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <sys...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/5-1.c
670
utf_8
7d41b88f1087a510cb40276276530e58
/* * source tree. */ /* * assertion: * * If the monotonic clock option is supported, the clock that shall be * used to measure this time interval shall be CLOCK_MONOTONIC clock. * * method: * * UNTESTED */ #include <stdlib.h> #include <unistd.h> #include "posixtest.h" int main(void) { if (sysconf(_SC_ASYNCH...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/1-1.c
5,234
utf_8
09cd34bf8ae8224b395a9943cef70cb6
/* * source tree. */ /* * assertion: * * The aio_suspend() function shall suspend the calling thread until at * least one of the asynchronous I/O operations referenced by the list * argument has completed, until a signal interrupts the function, or, * if timeout is not NULL, until the time interval specified by...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/4-1.c
5,192
utf_8
8abf8b3845bd5c659551f7cdd939c0d0
/* * source tree. */ /* * assertion: * * On a timeout exit, aio_suspend shall return with an error. * * method: Testing for a non NULL timeout * * - submit a list of write requests * - check that the selected request has not completed * - suspend on selected request * - check that the suspend timed out * -...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/2-1.c
1,537
utf_8
8faf9c5b6b2abcc2f98986e8d3a439a7
/* * * * sched_rr_get_interval() returns 0 on success. */ #include <errno.h> #include <sched.h> #include <stdio.h> #include <string.h> #include <time.h> #include "posixtest.h" int main(void) { struct timespec interval; int result = -2; struct sched_param param; param.sched_priority = sched_get_priority_min(SCHE...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/3-1.c
1,869
utf_8
4502829ad2b013b27381964e1c3c0c0f
/* * * * Test that sched_rr_get_interval() returns -1 on failure. * * The test create a child process which exit immediately and call * sched_rr_get_interval with the pid of defunct child. */ #include <errno.h> #include <sched.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #inclu...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/1-1.c
1,576
utf_8
7e2d809eddf90b1bda44304af563f508
/* * * * Test that the current execution time limit is returned for the calling * process when pid = 0. */ #include <errno.h> #include <sched.h> #include <stdio.h> #include <string.h> #include <time.h> #include <unistd.h> #include "posixtest.h" int main(void) { struct timespec interval0; struct timespec interval...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_rr_get_interval/speculative/5-1.c
1,218
utf_8
d36d56c37d0db665f2a6034b5379d2f3
/* * * * Test if sched_rr_get_interval() sets errno == EFAULT or EINVAL if *interval * points to NULL. * * This behavior is not specified in the specs, so this test is speculative. */ #include <stdio.h> #include <sched.h> #include <errno.h> #include <time.h> #include "posixtest.h" int main(void) { int result = ...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getclock/1-2.c
1,284
utf_8
2828e467bfefac46df89d017818e7ec7
/* * source tree. * Test that pthread_condattr_getclock() * shall get the 'clock' attribute of a condattr object. * * Steps: * 1. Initialize a pthread_condattr_t object * 2. Set the clock attribute to CLOCK_REALTIME * 3. Get the clock attribute * 4. Check that it was successful * */ #include <pthread.h>...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_getclock/1-1.c
1,069
utf_8
859f4d34a027bc4564b136db9a42c37b
/* * source tree. * Test that pthread_condattr_getclock() * shall get the 'clock' attribute in a condattr object * * Steps: * 1. Initialize a pthread_condattr_t object * 2. Get the clock attribute * 3. Check that it was successful * */ #include <pthread.h> #include <stdio.h> #include "posixtest.h" int mai...
google
android
3-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/3-2.c
1,718
utf_8
3622423b4192355c6e8c493528cb36a7
/* * source tree. * Test pthread_spin_lock(pthread_spinlock_t *lock) * * 35543 These functions may fail if: * 35544 [EINVAL] The value specified by lock does not * refer to an initialized spin lock object. * * This case will always pass. */ #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c
3,954
utf_8
fc1c775bf0b38c1b126d74c9b301cbda
/* * source tree. * Test pthread_spin_lock(pthread_spinlock_t *lock) * * The function shall lock the spin lock referenced by lock. The calling thread * shall acquire the lock if it is not held by another thread. Otherwise, the * thread shall spin (that is, shall not return from the pthread_spin_lock()) * until t...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/3-1.c
2,145
utf_8
c259161d145d5266eea3e2277c096853
/* * source tree. * Test pthread_spin_lock(pthread_spinlock_t *lock) * * The pthread_spin_lock() function may fail if: * [EDEADLK] The calling thread already holds the lock. * * This case will always pass. The thread might keep spin * when re-lock the spin lock. * */ #include <pthread.h> #include <stdio.h> #i...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c
4,127
utf_8
a9e08a347e1af487e6ce087ee3da320f
/* * source tree. * Test pthread_spin_lock(pthread_spinlock_t *lock) * * The function shall lock the spin lock referenced by lock. The calling thread * shall acquire the lock if it is not held by another thread. Otherwise, the * thread shall spin (that is, shall not return from the pthread_spin_lock()) * until t...
google
android
3-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/3-2.c
4,467
utf_8
8d6dee36639e1ca9111457d85745c009
/* * source tree. * * pthread_barrier_wait() * * If a signal is delivered to a thread blocked on a barrier.. * otherwise, the thread shall continue as normal from the completed barrier wait. Until * the thread in the signal handler returns from it, it is unspecified whether other threads may * proceed past the ...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/2-1.c
3,369
utf_8
28271b3d576407f2a4f95f4b490ad6c4
/* * source tree. * * pthread_barrier_wait() * * When the required number of threads have called pthread_barrier_wait() * specifying the barrier, the constant PTHREAD_BARRIER_SERIAL_THREAD shall * be returned to one unspecified thread and zero shall be returned * to each of the remaining threads. At this point,...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/3-1.c
4,925
utf_8
e919a8be75cd59888a19fc982388d1ab
/* * source tree. * * pthread_barrier_wait() * * If a signal is delivered to a thread blocked on a barrier, upon return * from the signal handler the thread shall resume waiting at the barrier * if the barrier wait has not completed (that is, if the * required number of threads have not arrived at the barrier ...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/1-1.c
3,947
utf_8
93191673f815812220679a58466cc271
/* * source tree. * * pthread_barrier_wait() * * The pthread_barrier_wait() function shall synchronize participating threads * at the barrier referenced by barrier. The calling thread shall block * until the required number of threads have called pthread_barrier_wait() * specifying the barrier. * * Steps: * ...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_getspecific/3-1.c
1,332
utf_8
c25ae727fb29171c20df160c1624c037
/* * source tree. * Test that pthread_getspecific() * * It shall return the thread-specific data value associated with the given 'key'. If no * thread-specific data value is associated with 'key, then the value NULL shall be returned. * It does not return any errors. * * Steps: * 1. Create pthread_key_t obje...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_getspecific/1-1.c
1,862
utf_8
69833f6ab2b3b8121098e1eb54a8ff48
/* * source tree. * Test that pthread_getspecific() * * shall return the value currently bound to the specified key on behalf of the calling thread. * Calling pthread_getspecific() with a key value not obtained from pthread_key_create() or * after key has been deleted with pthread_key_delete() is undefined. *...
google
android
7-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/7-1.c
2,058
utf_8
255476404974021c398a0617524c7ada
/* * * * Test that sched_getscheduler() sets errno == EPERM when the requesting * process does not have permission */ #include <stdio.h> #include <sched.h> #include <errno.h> #include <unistd.h> #include <sys/types.h> #include <pwd.h> #include <string.h> #include "posixtest.h" /* Set the euid of this process to a ...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/3-1.c
1,430
utf_8
b6142ff42fe591fba786f3b3bf0ed8be
/* * * * Test that the values that can be returned by sched_getscheduler() are * defined in the sched.h header */ #include <stdio.h> #include <sched.h> #include <errno.h> #include "posixtest.h" static struct unique { int value; char *name; } sym[] = { #ifdef SCHED_FIFO { SCHED_FIFO, "SCHED_FIFO"}, #endif #ifde...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/5-1.c
1,527
utf_8
7d3a2003f42ecdac2638e8cb7a3f9904
/* * * * Test that sched_getscheduler() returns -1 on failure. * * The test create a child process which exit immediately and call * sched_getscheduler with the pid of defunct child. */ #include <stdio.h> #include <sched.h> #include <errno.h> #include <unistd.h> #include <stdlib.h> #include <sys/wait.h> #include...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/1-1.c
1,001
utf_8
3acf450b6309ea9a5677c16a6ad28335
/* * * * Test that the scheduling policy is returned for the calling process when * pid = 0 */ #include <stdio.h> #include <sched.h> #include <errno.h> #include <unistd.h> #include "posixtest.h" int main(void) { int result0 = -1; int result1 = -1; result0 = sched_getscheduler(0); result1 = sched_getscheduler(g...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/4-1.c
891
utf_8
7ef14c7e7515eeb55517e3d3a57cda26
/* * * * Test that sched_getscheduler() returns the scheduling policy of the * specified process on success. */ #include <stdio.h> #include <sched.h> #include <errno.h> #include "posixtest.h" int main(void) { int result = -1; result = sched_getscheduler(0); if (result != -1 && errno == 0) { printf("Test PASSE...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_destroy/2-1.c
1,458
utf_8
84db0a87b4540e4c56d030b58d5ee755
/* * source tree. * Test pthread_rwlockattr_destroy() * A destroyed 'attr' attributes object can be reinitialized using * pthread_rwlockattr_init() * * Steps: * 1. Initialize a pthread_rwlockattr_t object using pthread_rwlockattr_init() * 2. Destroy that initialized attribute using pthread_rwlockattr_dest...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_destroy/1-1.c
1,117
utf_8
1ff5a26f300cc36b2147a6c5bcbbaba1
/* * source tree. * Test that pthread_rwlockattr_destroy() * shall destroy a read write attributes object. * * Steps: * 1. Initialize a pthread_rwlockattr_t object using pthread_rwlockattr_init() * 2. Destroy the attributes object using pthread_rwlockattr_destroy() * */ #include <pthread.h> #include <std...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_init/2-1.c
2,214
utf_8
e93098d6bab61666501e9d7700bc29f9
/* * source tree. * * After a read-write lock attributes object has been used to initialize * one or more read-write locks, any function affecting the attributes object * (including destruction) shall not affect any previously * initialized read-write locks. * Steps: * 1. Initialize a pthread_rwlockattr_t obje...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_init/1-1.c
1,762
utf_8
8f4865905a97599ed069433b61ba0ae3
/* * source tree. * Test that pthread_rwlockattr_init() * shall initialize a read-write attributes object 'attr' with the default * value for all of the attributes defined by the implementation. * Steps: * 1. Initialize a pthread_rwlockattr_t object with pthread_rwlockattr_init() * 2. Call pthread_rwlockat...
google
android
7-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigset/7-1.c
1,917
utf_8
812f2d2ebb8ca5baebb6ac9570d3abdf
/* * * This program tests the assertion that if disp is SIG_HOLD, then the * signal's disposition shall remain unchanged * * Steps: * 1. Register SIGCHLD with myhandler * 2. Add SIGCHLD to the process's signal mask using sigset with disp * equal to SIG_HOLD * 3. raise SIGCHLD * 4. remove SIGCHLD from the s...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigset/2-1.c
1,525
utf_8
cfa9729b1d737c53f294961e7b7a34d1
/* * source tree. This program tests the assertion that the signal shall be ignored if the value of the dist parameter is SIG_IGN. How this program tests this assertion is by setting up a handler "myhandler" for SIGUSR1. Then another call to signal() is made about SIGUSR1, this time with SIG_IGN as the value of t...
google
android
9-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigset/9-1.c
1,043
utf_8
37d7a711fb92539e4e9978fcbeb6685a
/* * source tree. This program tests the assertion that sigset shall return the signal's previous disposition if signal had not been blocked. */ #include <signal.h> #include <stdio.h> #include <stdlib.h> #include "posixtest.h" static void myhandler(int signo PTS_ATTRIBUTE_UNUSED) { printf("SIGUSR1 called. Inside ha...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigset/3-1.c
1,194
utf_8
a16ac8f8cb28cdbfd6a341420d05638e
/* * source tree. This program tests the assertion that the function shall be executed when the signal occurs if the disp parameter is the address of a function. How this program tests this assertion is by setting up a handler "myhandler" for SIGCHLD, and then raising that signal. If the handler_called variable i...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigset/5-1.c
1,774
utf_8
f7d7899c6e81d9dba494abafaf62727f
/* * source tree. This program tests the assertion that the process's signal mask will be restored to the state that it was in prior to the delivery of the signal Steps: 1. Empty the signal mask 2. Deliver the signal 3. When we return from the signal handler, verify that the signal mask is still empty, other...
google
android
10-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigset/10-1.c
861
utf_8
69ae707cb682d43230abf06cf9b863f7
/* * source tree. This program tests the assertion that when unsuccessful, SIG_ERROR shall be returned, and errno set to EINVAL. */ #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include "posixtest.h" int main(void) { if (sigset(SIGKILL, SIG_IGN) == SIG_ERR) { if (errno != EINVAL) ...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigset/1-1.c
1,562
utf_8
f5173333af1c859c5292e2b5fadb687d
/* * source tree. This program tests the assertion that the default handling of the signal shall occur if the value of the disp parameter is SIG_DFL. How this program tests this assertion by setting up a handler "myhandler" for SIGCHLD. Then another call to sigset() is made about SIGCHLD, this time with SIG_DFL a...
google
android
8-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigset/8-1.c
866
utf_8
09f9fd9746b86c1b2d7b7aeb7f275f65
/* * source tree. This program tests the assertion that if signal has been blocked, then sigset shall return SIG_HOLD */ #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include "posixtest.h" int main(void) { sigset_t st; sigemptyset(&st); sigaddset(&st, SIGCHLD);...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigset/4-1.c
1,054
utf_8
957aaf65f15317e7c0f32f0e9fe69b13
/* * source tree. This program tests the assertion that the signal will be added to the signal mask before its handler is executed. */ #include <signal.h> #include <stdio.h> #include <stdlib.h> #include "posixtest.h" static int signal_blocked = 0; static void myhandler(int signo PTS_ATTRIBUTE_UNUSED) { printf("SIGC...
google
android
6-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigset/6-1.c
1,592
utf_8
0e72e9303c358d278fbcd26439429fc6
/* * source tree. This program tests the assertion that if disp is SIG_HOLD, then the signal shall be added to the process's signal mask. Steps: 1. Register SIGCHLD with myhandler 2. Add SIGCHLD to the process's signal mask using sigset with disp equal to SIG_HOLD 3. raise SIGCHLD 4. Verify that SIGCHLD is ...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/2-1.c
2,321
utf_8
3d90b7f735637fa3f3ba369c386f1a8c
/* * source tree. */ /* * mq_setattr() test plan: * If omqstat is non_NULL, the mq_setattr() function will store, in the * location referenced by omqstat, the previous message queue attributes and * the current queue status. These values will be the same as would be * returned by a call to mq_getattr() at that p...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/1-2.c
2,151
utf_8
36bd14540ce6e6301295443e31557ef4
/* * source tree. */ /* * mq_setattr test plan: * Test that the values of mq_maxmsg, mq_msgsize, mq_curmsgs members of * the mq_attr structure will be ignored by mq_setattr(). * * 2/17/2004 call mq_close and mq_unlink before exit to release mq * resources */ #include <stdio.h> #include <mqueue.h> #inclu...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/5-1.c
1,893
utf_8
e1e20f0ade5cf3663bf59352a38527ba
/* * source tree. */ /* * mq_setattr() test plan: * Test if mqdes argument is not a valid message queue descriptor, * mq_setattr() function will fail with EBADF, and the function will * return a value of -1. * * 2/17/2004 call mq_close and mq_unlink before exit to release mq * resources */ #include <stdio...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_setattr/1-1.c
2,109
utf_8
daf2aef79ff2eb61a485b2e912f7a95e
/* * source tree. */ /* * mq_setattr() test plan: * mq_setattr() set attributes of the open message queue, * then verify that mq_setattr() returns 0 on success. * * 2/17/2004 call mq_close and mq_unlink before exit to release mq * resources */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #i...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-2.c
1,588
utf_8
10b54ef80f1d471252f4e8eb8d74a8f8
/* * source tree. * Test that after a timer is deleted by calling timer_delete(), it * cannot be armed by calling timer_settime(). * Steps: * - Create a timer * - Delete that timer * - Try to call timer_settime() on that timer and ensure it fails * with errno==EINVAL. * * For this test, signal SIGTOTEST wil...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/1-1.c
2,253
utf_8
4e1559cefffe7a61b4db2419e89dc898
/* * source tree. * Test that timer_delete() deletes a timer. * Steps: * - Create a timer to send SIGTOTEST on expiration and set up a signal * handler to catch it. * - Activate the timer. * - Delete the timer before the timer had a chance to expire. [Potential * false failure here if the timer cannot be d...
google
android
5-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/speculative/5-2.c
2,265
utf_8
6d7ee10a2a8ceacb7ed56bab9db4ac01
/* * source tree. * Test to see if timer_delete() returns -1 and sets errno==EINVAL when * trying to delete a timer that has already been deleted or not. * Since this is a "may" assertion, either option is a pass. * Steps: * - Run test case 1-1.c and then try to delete the timer again. * * For this test, signal...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_delete/speculative/5-1.c
990
utf_8
b879f4af9631a75a3541ada6ed5756c1
/* * source tree. * Test to see if timer_delete() returns -1 and sets errno==EINVAL if * timerid is not a valid timer ID or not. * Since this is a "may" requirement, either option is a PASS. */ #include <time.h> #include <stdio.h> #include <errno.h> #include "posixtest.h" #define BOGUSTIMERID 99999 int main(void) ...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/3-1.c
1,987
utf_8
f81e036fde03a2dd0ef1b929d7d817c7
/* * source tree. */ /* * Test case verifies sem_destroy shall destroy on initialized semaphore * upon which no threads are currently blocked. */ #include <sys/types.h> #include <stdio.h> #include <errno.h> #include <unistd.h> #include <semaphore.h> #include <sys/stat.h> #include <fcntl.h> #include <pthread.h> #i...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/4-1.c
990
utf_8
de1082b4e0858a94a7a7e44802255cb2
/* source tree. */ /* * This test case verify the unamed semaphore is destroyed by calling * sem_destroy to return 0 on successful call. */ #include <sys/types.h> #include <stdio.h> #include <errno.h> #include <unistd.h> #include <semaphore.h> #include <sys/stat.h> #include <fcntl.h> #include "posixtest.h" #defi...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/2-1.c
1,360
utf_8
51ad4592fe419a75561e13b92b5991e3
/* * source tree. * A destroyed 'attr' attributes object can be reinitialized using * pthread_attr_init(); the results of otherwise referencing the object * after it has been destroyed are undefined. * * Steps: * 1. Initialize a pthread_attr_t object using pthread_attr_init() * 2. Destroy that initialized att...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/3-1.c
1,003
utf_8
3d3bc73d339b5615bc50147a76da5637
/* * source tree. * Upon successful completion, pthread_attr_destroy() shall return a value of 0. * * Steps: * 1. Initialize a pthread_attr_t object using pthread_attr_init() * 2. Destroy that initialized attribute using pthread_attr_destroy(). * This should return 0; * */ #include <pthread.h> #include <...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_destroy/1-1.c
2,156
utf_8
9ccfd77888aa321098e7b25c7b92b79c
/* * source tree. * Test that pthread_attr_destroy() * shall destroy a thread attributes object. An implementation may cause * pthread_attr_destroy() to set 'attr' to an implementation-defined invalid * value. * * Steps: * 1. Initialize a pthread_attr_t object using pthread_attr_init() * 2. Destroy that...
google
android
4-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-2.c
1,470
utf_8
ca76c22270c9eea406ac98a094bde1c3
/* * source tree. */ /* * Test that msg_prio cannot be equal to MQ_PRIO_MAX. */ #include <stdio.h> #include <limits.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include "posixtest.h" #define NAMESIZE 50 #define MSGSTR "0123456789" in...
google
android
14-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/14-1.c
1,821
utf_8
ad3b855aa3e022fd53c887fa222efba9
/* * source tree. */ /* * Test that EMSGSIZE is returned if msg_len is not <= mq_attr->mq_msgsize. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <stdint.h> #include "posixtest.h" #define N...
google
android
5-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-2.c
3,450
utf_8
a95cb87c4617d11cb349051838ce8517
/* * source tree. */ /* * Test that if the message queue is full and O_NONBLOCK is not set, mq_send() * will block until it is interrupted by a signal. * * Have a child send signals until it starts to block. At that point, have * the parent send a signal to the child. Test passes if send was interrupted * by ...
google
android
4-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-3.c
1,957
utf_8
5c706d83686f9b8f142e9bda2734149c
/* * source tree. */ /* * Test that msg_prio can be equal to MQ_PRIO_MAX-1. * * 3/13/03 - Added fix from Gregoire Pichon for specifying an attr * with a mq_maxmsg >= BUFFER. * */ #include <stdio.h> #include <limits.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> ...
google
android
7-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/7-1.c
2,675
utf_8
954851937c47ca1fcb2547a23be7ad5d
/* * source tree. */ /* * Test that if O_NONBLOCK is set and the message queue is full, mq_send() * will just return an error message and the message will not be queued. * * Test by sending messages with increasing priority number until a failure * is received. Then test that the message just sent (highest prio...
google
android
3-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/3-2.c
4,196
utf_8
0f8d7711a00e747cdb6a8ea16cd4f11b
/* * source tree. */ /* * Test that mq_send() inserts messages into the message queue according * to the priority given. Specifically, test that messages with equal * priority values are placed after previously sent messages. * * Test similar to 3-1.c; however, messages 3 and 4 will have equal priority * order...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/2-1.c
1,592
utf_8
4f2e5307cbbe4a348b95a0c4385545dd
/* * source tree. */ /* * Test that mq_send() will fail if msg_len is not <= mq_attr->mq_msgsize. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include "posixtest.h" #define NAMESIZE 50 #define MSGSTR "0123456789012...
google
android
9-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/9-1.c
2,260
utf_8
7528398aa2952659e1ab5b19232a0c14
/* * source tree. */ /* * Test that mq_send() returns -1 on failure, no message is queued, and * errno is set. * The failure case chosen is an invalid message queue descriptor. * * 3/13/03 - Added fix from Gregoire Pichon for specifying an attr * with a mq_maxmsg >= BUFFER. */ #include <stdio.h> #inc...
google
android
11-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/11-1.c
1,577
utf_8
a188cd88b3ea0384d6c231101184e755
/* * source tree. */ /* * Test that mq_send() returns errno == EBADF if mqdes is not a valid * message queue descriptor. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include <errno.h> #include "posixtest.h" #defin...
google
android
13-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/13-1.c
1,846
utf_8
4a459bb5e0c4e03d08a139b7590b73f4
/* * source tree. */ /* * Test that errno == EINVAL if msg_prio is >= MQ_PRIO_MAX or < 0 (<0 N/A * for an unsigned, so not tested). */ #include <stdio.h> #include <limits.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include <errno.h...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/3-1.c
3,901
utf_8
96cc3e9ab8af96ea74762ae708aaffbb
/* * source tree. */ /* * Test that mq_send() inserts messages into the message queue according * to the priority given. * Test by inserting multiple messages into the queue not in priority order. * Ensure messages are received in priority order. * * 3/13/03 - Added fix from Gregoire Pichon for specifying an at...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/5-1.c
3,810
utf_8
e23462b8fcec8412050f2d210a677aec
/* * source tree. */ /* * Test that if the message queue is full and O_NONBLOCK is not set, mq_send() * will block until it can place the message in the queue. * * Test by sending messages in a child process until the message queue is full. * At this point, the child should be blocking on sending. Then, have th...
google
android
10-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/10-1.c
1,928
utf_8
ea4b1aff90537bbe596b5a19e9023c6a
/* * source tree. */ /* * Test that if O_NONBLOCK is set and the message queue is full, mq_send() * will set errno == EAGAIN (subset of 7-1.c). */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include <stdint.h> #incl...
google
android
12-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/12-1.c
3,205
utf_8
d35ad9e82155d12254801ad13721f690
/* * source tree. */ /* * Test mq_send() will set errno == EINTR if it is interrupted by a signal. * * Have a child send signals until it starts to block. At that point, have * the parent send a signal to interrupt the child. Test passes if errno == * EINVAL. * * Test very similar to 5-2.c except we don't ha...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/1-1.c
1,986
utf_8
f8d7efbc7a49234d502ee14912437cc1
/* * source tree. */ /* * Basic test that mq_send() actually places a message into mqdes. Verify * by ensuring the message can be received. * * 3/13/03 - Added fix from Gregoire Pichon for specifying an attr * with a mq_maxmsg >= BUFFER. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #i...
google
android
8-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/8-1.c
1,919
utf_8
96ea3f152fe1dd819d25b66e706e727d
/* * source tree. */ /* * Test that mq_send() returns 0 on success. * * 3/13/03 - Added fix from Gregoire Pichon for specifying an attr * with a mq_maxmsg >= BUFFER. * */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include...
google
android
11-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/11-2.c
1,559
utf_8
cb0a02b9a3295e939f068a720449db03
/* * source tree. */ /* * Test that mq_send() returns errno == EBADF if mqdes is not open for * writing. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include <errno.h> #include "posixtest.h" #define NAMESIZE 50 #d...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_send/4-1.c
1,473
utf_8
b4a769d13578598f6c4e2a38da577514
/* * source tree. */ /* * Test that msg_prio must be less than MQ_PRIO_MAX. */ #include <stdio.h> #include <limits.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include "posixtest.h" #define NAMESIZE 50 #define MSGSTR "0123456789" int...
google
android
7-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/7-1.c
1,721
utf_8
d8b17b824244d68ae25b31171f617369
/* * source tree. */ /* * mq_receive() test plan: * If message queue is empty and O_NONBLOCK is set in the message queue, * no message will be removed from the queue, mq_receive will return an * error. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #incl...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/2-1.c
1,850
utf_8
51b13af7688bd32c2480d430d3afd33d
/* * source tree. */ /* * mq_receive test plan: * If the buffer size is less than the mq_msgsize attribute, the function * will fail and return an error. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include "posi...
google
android
11-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/11-1.c
1,782
utf_8
6205ba52858756f1c0971e3089fe2369
/* * source tree. */ /* * mq_receive() test plan: * mq_receive() will fail with EBADF, if mqdes is not a valid message * message queue descriptor. */ #include <sys/stat.h> #include <sys/types.h> #include <errno.h> #include <fcntl.h> #include <mqueue.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #i...
google
android
13-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/13-1.c
2,319
utf_8
f38fb92e676daee2651ecc6661482c98
/* * source tree. */ /* * mq_receive() test plan: * mq_receive() will fail with EINTR if mq_receive() is interrupted by a signal. * */ #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include <errno.h> #include <fcntl.h> #include <limits.h> #include <mqueue.h> #include <signal.h> #include <stdi...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/5-1.c
2,559
utf_8
8485b81deb692575c1b9a4b6d5c96b99
/* * source tree. */ /* * mq_receive() test plan: * Test that if the message queue is empty and O_NONBLOCK is not set, * mq_receive() will block until a message is enqueued on the message queue * or until mq_receive() is interrupted by a signal. * * NOTE: This test makes some assumptions and has some potential...
google
android
10-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/10-1.c
1,786
utf_8
7b623f28356a4f17584a8d22d4241167
/* * source tree. */ /* * mq_receive() test plan: * mq_receive() will fail with EAGAIN, if message queue is empty and * O_NONBLOCK is set in the message queue, */ #include <stdio.h> #include <errno.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include...
google
android
12-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/12-1.c
1,969
utf_8
57b0957f2157a97e63bf5d46f9a108d2
/* * source tree. */ /* * mq_receive test plan: * mq_receive will return EMSGSIZE when msg_len is less than the * message size attribute of the message queue. */ #include <stdio.h> #include <errno.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/1-1.c
2,795
utf_8
b9b4358c824581f8c3fc2ae012024da4
/* * source tree. */ /* * mq_receive test plan: * mq_receive will receive the oldest of the highest priority messages * from the message queue. The selected message will be removed from the * queue and copied to the buffer pointed by the msg_ptr argument. */ #include <stdio.h> #include <mqueue.h> #include <fcntl...
google
android
8-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/8-1.c
2,664
utf_8
c6edcd48da0ec128141fb831690fb7bf
/* * source tree. */ /* * mq_receive test plan: * On success, mq_receive will return the length of the selected message * and the message will be removed from the queue. * step: * 1. send two messages to the message queue * 2. call mq_receive() twice, if the two received messages are the same, * which means...
google
android
11-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_receive/11-2.c
1,743
utf_8
52558f54ce14464231f6e267b95f8436
/* * source tree. */ /* * mq_receive() test plan: * mq_receive() will fail with EBADF, if message queue * is not open for reading. */ #include <stdio.h> #include <errno.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #include <stdlib.h...
google
android
7-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/7-1.c
2,070
utf_8
ed220809dbddf885ffbe39c9aa931379
/* * source tree. */ /* sem_wait hangs when it tries to lock a locked semaphore, and then killed * by sending a kill signal. */ #include <stdio.h> #include <errno.h> #include <unistd.h> #include <semaphore.h> #include <sys/stat.h> #include <fcntl.h> #include <signal.h> #include <sys/wait.h> #include "posixtest.h" #...
google
android
11-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/11-1.c
1,470
utf_8
9a7a46c806868daf6a4f92a21d2b0f55
/* * source tree. */ /* * sem_trywait shall try to lock the unlocked semaphore and decrement * the semaphore value by one. */ #include <stdio.h> #include <errno.h> #include <unistd.h> #include <semaphore.h> #include <sys/stat.h> #include <fcntl.h> #include "posixtest.h" #define TEST "11-1" #define FUNCTION "sem_tr...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/1-2.c
1,520
utf_8
cb37e4fce57c239b844887e707a683cd
/* * source tree. */ /* * Keep calling sem_wait until the sempahore is locked. That is * decrementing the semaphore value by one until its zero or locked. */ #include <stdio.h> #include <errno.h> #include <unistd.h> #include <semaphore.h> #include <sys/stat.h> #include <fcntl.h> #include <signal.h> #include "posi...
google
android
13-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/13-1.c
2,983
utf_8
af392c221320f0476090626a58cdedfc
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * If the semaphore count is 0, the call blocks until the semphore can be * locked or the operation is interrupted by a signal. * The steps are: * -> Initialize a semaphore to 0 count * -> Regist...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/3-1.c
1,441
utf_8
ea321fdaef48dfdeb4ca583b7482c4ed
/* * source tree. */ /* This test case verifies that the semaphore shall be locked until the * sem_post is executed and returns successfully. * Lines: 39056-39057 */ #include <stdio.h> #include <errno.h> #include <unistd.h> #include <semaphore.h> #include <sys/stat.h> #include <fcntl.h> #include <signal.h> #includ...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/5-1.c
1,232
utf_8
4a22fa57baa1122d3c287da167ac3639
/* * source tree. */ /* * errno return EAGAIN: The semaphore can't be immediately locked by * sem_trywait when its already locked. */ #include <stdio.h> #include <errno.h> #include <unistd.h> #include <semaphore.h> #include <sys/stat.h> #include <fcntl.h> #include "posixtest.h" #define TEST "5-1" #define FUNCTION ...
google
android
12-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/12-1.c
1,215
utf_8
5fadac555fecb22955b6bab2ae8d9d92
/* * source tree. */ /* * sem_trywait shall try to lock the locked semaphore and decrement * the semaphore value by one. */ #include <stdio.h> #include <errno.h> #include <unistd.h> #include <semaphore.h> #include <sys/stat.h> #include <fcntl.h> #include "posixtest.h" #define TEST "12-1" #define FUNCTION "sem_tryw...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/1-1.c
1,438
utf_8
a913077a9f4c8d55207fe96c3f9d2e54
/* * source tree. */ /* * sem_wait shall lock the unlocked semaphore and decrement the semaphore * value by one. */ #include <stdio.h> #include <errno.h> #include <unistd.h> #include <semaphore.h> #include <sys/stat.h> #include <fcntl.h> #include "posixtest.h" #define TEST "1-1" #define FUNCTION "sem_wait" #define...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/2-1.c
935
utf_8
94a5d5532845d86a0d8e1f6f24a9028c
/* * * * Test that sched_get_priority_max() returns -1 on failure. */ #include <stdio.h> #include <sched.h> #include <errno.h> #include "posixtest.h" int main(void) { int result = -1; result = sched_get_priority_max(-1); if (result == -1 && errno == EINVAL) { printf("Test PASSED\n"); return PTS_PASS; } if ...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-2.c
887
utf_8
617ac32494a4f272eabeae6f56cec5d5
/* * * * Test that sched_get_priority_max() returns the maximum value on * success for SCHED_FIFO policy. */ #include <stdio.h> #include <sched.h> #include <errno.h> #include "posixtest.h" int main(void) { int result = -1; result = sched_get_priority_max(SCHED_FIFO); if (result != -1 && errno == 0) { printf("...
google
android
1-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-3.c
1,181
utf_8
8e2a1917265488a7f2aca4653963e90e
/* * * * Test that sched_get_priority_max() returns the maximum value on * success for SCHED_SPORADIC policy. */ #include <stdio.h> #include <sched.h> #include <errno.h> #include <unistd.h> #include "posixtest.h" #if defined(_POSIX_SPORADIC_SERVER)&&(_POSIX_SPORADIC_SERVER != -1)||defined(_POSIX_THREAD_SPORADIC_SE...