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
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_get_priority_max/1-1.c
881
utf_8
da60adce99531d867d7214de5b8ece1b
/* * * * Test that sched_get_priority_max() returns the maximum 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_max(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_max/1-4.c
890
utf_8
e68b50f946b9099b81727efa1895eea9
/* * * * Test that sched_get_priority_max() returns the maximum 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_max(SCHED_OTHER); if (result != -1 && errno == 0) { printf...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-2.c
3,828
utf_8
9fa79acb6484514af3b90637ad9adea2
/* * source tree. * * Test pthread_spin_unlock(pthread_spinlock_t *lock) * * The function shall release the spin lock referenced by 'lock' which * was locked via the pthread_spin_lock() or pthread_spin_trylock(). * * CAUTION: If setting the priority of the process running this case * higher than other process ...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/3-1.c
3,072
utf_8
6117236bd41ef82cc9583ede0f77a407
/* * source tree. * * Test pthread_spin_unlock(pthread_spinlock_t *lock) * * This case will always PASS. * * The functions may fail if: * The pthread_spin_unlock() function may fail if: * [EPERM] The calling thread does not hold the lock. * * Steps: * 1. Create a thread that will initialize and lock a spinl...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-1.c
3,284
utf_8
72f2ac61f8aa6af2465945f1418fd801
/* * source tree. * * Test pthread_spin_unlock(pthread_spinlock_t *lock) * * The function shall release the spin lock referenced by 'lock' which * was locked via the pthread_spin_lock() or pthread_spin_trylock(). * * Steps: * 1. Initialize a pthread_spinlock_t object 'spinlock' with * pthread_spin_init()...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/difftime/1-1.c
819
utf_8
8f453d3f54cad59abba9bd13e33e2ba3
/* * source tree. Test that the difftime function shall return the difference between two calendar times. */ #define WAIT_DURATION 1 #include <time.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/time.h> #include "posixtest.h" int main(void) { time_t time0; double time_diff; time0 = t...
google
android
4-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/4-2.c
8,696
utf_8
98e97706c39be096d4e49f470a8ed9d2
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * The function does not return an error code of EINTR * The steps are: * * -> Create a thread which wait in a condition. * -> Create a second thread which signals this condition. * -> Anoth...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/2-1.c
4,067
utf_8
a8720ef4374e64a5fdc45e650e894d6c
/* * source tree. * Test that pthread_cond_signal() * When each thread unblocked as a result of pthread_cond_signal() * returns from its call to pthread_cond_wait(), the thread shall * own the mutex with which it called pthread_cond_wait(). */ #include <pthread.h> #include <stdio.h> #include <stdlib.h> #inc...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/1-2.c
16,963
utf_8
3e0df7e6eede8d39f346523315b3c655
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * pthread_cond_signal() unblocks at least one thread which is blocked * on the conditional variable, if any. * The steps are: * -> Create a lot of threads/process which will wait on a con...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/1-1.c
4,295
utf_8
959af4e10322012e22f0d169c29e3758
/* * source tree. * Test that pthread_cond_signal() * shall unblock at least one of the threads currently blocked on * the specified condition variable cond. */ #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include "posixtest.h" #define THREAD_NUM 3 stati...
google
android
2-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/2-2.c
4,008
utf_8
7369f12eddaa0ffac51831a7321fed9d
/* * source tree. * Test that pthread_cond_signal() * When each thread unblocked as a result of pthread_cond_signal() * returns from its call to pthread_cond_timedwait(), the thread shall * own the mutex with which it called pthread_cond_timedwait(). */ #include <pthread.h> #include <stdio.h> #include <stdl...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_signal/4-1.c
3,240
utf_8
64ba198be7ba5f55efbb526e9fd97e23
/* * source tree. * Test that pthread_cond_signal() * Upon successful completion, a value of zero shall be returned. */ #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <signal.h> #include "posixtest.h" #define THREAD_NUM 5 static struct testdata { pthr...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigemptyset/2-1.c
617
utf_8
f33e6557d77a4cf48e72afa5dd2d7a66
/* * source tree. Simply, if sigemptyset returns a 0 here, test passes. */ #include <stdio.h> #include <signal.h> #include "posixtest.h" int main(void) { sigset_t signalset; if ((int)sigemptyset(&signalset) != 0) { perror("sigemptyset failed -- returned -- test aborted"); return PTS_FAIL; } printf("sigemptyse...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigemptyset/1-1.c
1,370
utf_8
901c2e71c4ce7f3225a369f7459e6986
/* * source tree. Make sure that none of the signals listed in this array below are found in "signalset" after sigemptyset() is called on it. */ #include <stdio.h> #include <signal.h> #include <string.h> #include "posixtest.h" #define NUMSIGNALS (sizeof(siglist) / sizeof(siglist[0])) int main(void) { int siglist[] ...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-2.c
2,282
utf_8
2d8821fd8c0f796d932c420ab23979d6
/* * source tree. * Test that pthread_mutexattr_getprioceiling() * * Gets the priority ceiling attribute of a mutexattr object (which was prev. created * by the function pthread_mutexattr_init()). * * Steps: * 1. Initialize a pthread_mutexattr_t object with pthread_mutexattr_init() * 2. Get the min and max b...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/3-1.c
1,393
utf_8
39fda6ff903b472432f8f4c6a4a23d38
/* * source tree. * Test that pthread_mutexattr_getprioceiling() * * It MAY fail if: * * [EINVAL] - 'attr' or 'prioceiling' is invalid. * [EPERM] - The caller doesn't have the privilege to perform the operation. * * This function shall not return an error code of [EINTR] * * Steps: * 1. Call pthread_mutexa...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-1.c
2,200
utf_8
9a6185c7f4b00a8a04bb330d32b23045
/* * source tree. * Test that pthread_mutexattr_getprioceiling() * * Gets the priority ceiling attribute of a mutexattr object (which was prev. created * by the function pthread_mutexattr_init()). * * Steps: * 1. Initialize a pthread_mutexattr_t object with pthread_mutexattr_init() * 2. Call pthread_mutexatt...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprotocol/1-2.c
1,642
utf_8
af4b15d0d7197a6fa4511a58afea601f
/* * source tree. * Test that pthread_mutexattr_getprotocol() * * Gets the protocol attribute of a mutexattr object (which was prev. created * by the function pthread_mutexattr_init()). * */ #include <pthread.h> #include <stdio.h> #include <sched.h> #include "posixtest.h" int main(void) { pthread_mutexattr_t mt...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprotocol/1-1.c
1,189
utf_8
83de47b7e3cbf3466a1eca1fe6003621
/* * source tree. * Test that pthread_mutexattr_getprotocol() * * Gets the protocol attribute of a mutexattr object (which was prev. created * by the function pthread_mutexattr_init()). * * Steps: * 1. Initialize a pthread_mutexattr_t object with pthread_mutexattr_init() * 2. Call pthread_mutexattr_getprotoc...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_destroy/3-1.c
1,382
utf_8
abb5a6dac7159e86d7f73ca98497a531
/* * source tree. * * * pthread_rwlock_destroy() function may fail if: * [EBUSY] The implementation has detected an attempt to destroy the object referenced * by rwlock while it is locked. * *Steps: * 1. Initialize a read-write lock. * 2. Lock it. * 3. Attempt to destroy it while it is still locked. */ #in...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_destroy/1-1.c
1,094
utf_8
459f2a22227f53bd9bdf5343d662cb0c
/* * source tree. * * The function shall destroy the read-write lock object referenced by rwlock * and release any resources used by the lock. * * Note: This case does not test the resources used by the lock has been released. *Steps: * Loop for COUNT times: * 1. Initialize a read-write lock * 2. Destroy it...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/2-1.c
2,424
utf_8
6a716dbf3051f5758b8bf82e6d9fec96
/* * source tree. * * Test pthread_rwlock_init(). * * If attr is NULL, the default read-write lock attributes shall be used; * the effect is the same as passing the address of a default read-write * lock attributes object. * * Steps: * 1. Initialize a pthread_rwlock_t object 'rwlock' with pthread_rwlock_init...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/3-1.c
1,999
utf_8
382e0d3ffdbe2bf90a3f4c9315cbd543
/* * source tree. * * Test pthread_rwlock_init(). * * Once initialized, the lock can be used any number of times without being * reinitialized. * * Steps: * 1. Initialize a pthread_rwlock_t object 'rwlock' with pthread_rwlock_init() * 2. Loop for COUNT time: lock for reading, unlock, lock for writing, unlo...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/1-1.c
2,778
utf_8
8cc3ef0e2109da1c7588a6761409ca29
/* * source tree. * * Test pthread_rwlock_init(). * * pthread_rwlock_init() function shall allocate any resources * required to use the read-write lock referenced by rwlock and * initializes the lock to an unlocked state with attributes referenced * by attr. * * Steps: * 1. Initialize a pthread_rwlock_t obj...
google
android
6-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_init/6-1.c
1,607
utf_8
0c8534dd5110681a25332724ea8adb0b
/* * source tree. * * Test pthread_rwlock_init(). * * May fail if: * [EBUSY] The implementation has detected an attempt to reinitialize the object * referenced by rwlock, a previously initialized but not yet destroyed read-write * lock. * * Steps: * 1. Initialize a pthread_rwlock_t object 'rwlock' with pth...
google
android
5-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/5-2.c
6,196
utf_8
a73f020304419bf3446b47e9fd6ef6de
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * It is safe to destroy an initialized unlocked mutex. * The steps are: * -> Initialize a mutex with a given attribute. * -> Lock the mutex * -> unlock the mutex * -> Destroy the mutex -...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/2-1.c
1,093
utf_8
cc8ad0f8352f7510253200842d6784ba
/* * source tree. * Test pthread_mutex_destroy() that * a destroyed mutex object can be reinitialized using pthread_mutex_init() * */ #include <pthread.h> #include <stdio.h> #include "posixtest.h" int main(void) { pthread_mutex_t mutex; /* Initialize a mutex attributes object */ if (pthread_mutex_init(&mutex,...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/3-1.c
1,178
utf_8
8ce1dc18450333ca690b02a5425bfc42
/* * source tree. * Test that pthread_mutex_destroy() * Upon succesful completion, it shall return a 0 * */ #include <pthread.h> #include <stdio.h> #include <errno.h> #include "posixtest.h" int main(void) { pthread_mutex_t mutex; int rc; /* Initialize a mutex object */ if ((rc = pthread_mutex_init(&mutex, NU...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/5-1.c
1,273
utf_8
98c7ab24d761ed84f5ccd54f030cee96
/* * source tree. * Test that pthread_mutex_destroy() * It shall be safe to destroy an initialized mutex that is unlocked. */ #include <pthread.h> #include <stdio.h> #include <unistd.h> #include "posixtest.h" static pthread_mutex_t mutex; int main(void) { int rc; /* Initialize mutex with the default mutex attrib...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/1-1.c
2,020
utf_8
aced2af42a4ecb9849cfe7b69c918a9a
/* * source tree. * Test that pthread_mutex_destroy() * shall destroy the mutex referenced by 'mutex'; the mutex object in effect * becomes uninitialized. * */ #include <pthread.h> #include <stdio.h> #include "posixtest.h" static pthread_mutex_t mutex1, mutex2; static pthread_mutex_t mutex3 = PTHREAD_MUTEX_IN...
google
android
2-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/2-2.c
6,475
utf_8
bcfab08617d5ca1b81ec1191ad711270
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * pthread_mutex_init() can be used to re-initialize a destroyed mutex. * The steps are: * -> Initialize a mutex with a given attribute. * -> Destroy the mutex * -> Initialize again the mu...
google
android
4-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_destroy/speculative/4-2.c
1,271
utf_8
95d17096377391ebb91a68d06139a8ef
/* * source tree. * Test that when a pthread_mutex_destroy is called on a * locked mutex, it fails and returns EBUSY * Steps: * 1. Create a mutex * 2. Lock the mutex * 3. Try to destroy the mutex * 4. Check that this may fail with EBUSY */ #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/2-1.c
1,412
utf_8
b559abb24ab425499b73600138759bdc
/* * source tree. * Test that pthread_mutex_lock() * Upon succesful completion, it shall return a 0 * */ #include <pthread.h> #include <stdio.h> #include <errno.h> #include "posixtest.h" int main(void) { pthread_mutex_t mutex; int rc; /* Initialize a mutex object with the default mutex attributes */ if ((rc ...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/3-1.c
10,116
utf_8
c0972002919be07995ab6455b5bb4f5b
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This sample test aims to check the following assertion: * The function does not return an error code of EINTR * The steps are: * * -> Create a thread which loops on pthread_mutex_lock and pthread_mutex_unlock * operations. * -> Create an...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/5-1.c
8,636
utf_8
5a7ffe808cf05881e907301eb86c38ab
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * This sample test aims to check the following assertion: * If a signal is delivered to a thread waiting for a mutex, * upon return from the signal handler the thread resumes * waiting for the mutex as if it had not been interrupted. * The steps ...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/1-1.c
2,966
utf_8
9233baec4e95d1d8f5c4244893afee9e
/* * source tree. * Test that pthread_mutex_lock() * shall lock the mutex object referenced by 'mutex'. If the mutex is * already locked, the calling thread shall block until the mutex becomes * available. This operation shall return with the mutex object referenced * by 'mutex' in the locked state with ...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_lock/4-1.c
7,585
utf_8
99b57e91eccd3379c83cb3cdd174908c
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * If the mutex type is PTHREAD_MUTEX_RECURSIVE, * then the mutex maintains the concept of a lock count. * When a thread successfully acquires a mutex for the first time, * the lock count i...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-1.c
7,675
utf_8
b0e9f411e9162cd489a493abde798cc3
/* * source tree. * Test that pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) * * If the Thread Execution Scheduling option is supported, * and the threads involved in the lock are executing with the * scheduling policies SCHED_FIFO or SCHED_RR, the calling thread shall not * acquire the lock if a writer holds ...
google
android
2-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-3.c
7,087
utf_8
8ed6b8b2fe642c605a81ba6f15870f62
/* * source tree. * Test that pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) * * If the Thread Execution Scheduling option is supported, * and the threads involved in the lock are executing with the * scheduling policies SCHED_FIFO or SCHED_RR, the calling thread shall not * acquire the lock if a writer holds ...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/5-1.c
1,497
utf_8
82257168692a7375080f0099f970110d
/* * source tree. * Test that pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) * * A thread may hold multiple concurrent read locks on 'rwlock' and the application shall * ensure that the thread will perform matching unlocks for each read lock. * * Steps: * 1. Initialize a pthread_rwlock_t object 'rwlock' with ...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/1-1.c
5,189
utf_8
28ea56abf47c7fc55aedd4f20e7e4d85
/* * source tree. * Test that pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) * * pthread_rwlock_rdlock() function shall apply a read lock to the * read-write lock referenced by rwlock. The calling thread acquires * the read lock if a writer does not hold the lock and there are * no writers blocked on the lock. ...
google
android
2-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/2-2.c
7,694
utf_8
054e59d287a1b97fdf578a09e6d643b2
/* * source tree. * Test that pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) * * If the Thread Execution Scheduling option is supported, * and the threads involved in the lock are executing with the * scheduling policies SCHED_FIFO or SCHED_RR, the calling thread shall not * acquire the lock if a writer holds ...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_rdlock/4-1.c
5,302
utf_8
23258f31bba29ad7b4ca0a015f8df4fe
/* * source tree. * Test pthread_rwlock_rdlock(pthread_rwlock_t * rwlock) * * If a signal is delivered to a thread waiting for a read-write lock for reading, upon * return from the signal handler the thread resumes waiting for the read-write lock for * reading as if it was not interrupted. * * Steps: * 1. main...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/2-1.c
3,634
utf_8
3dc786f85778eb0633c29181ba1220bb
/* * source tree. * Test that if the signal specified by set does not become pending, and the timespec structure pointed to by timeout is zero-valued, the sigtimedwait() function shall return immediately with an error. NOTE: This program has commented out areas. The commented out functionality sets a...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/5-1.c
2,749
utf_8
e45a6c573d02964e7317e75c60066127
/* * source tree. Test that sigtimedwait() returns -1 upon unsuccessful completion. NOTE: This program has commented out areas. The commented out functionality sets a timer in case sigtimedwait() never returns, to help the program from hanging. To make this program runnable on a typical system, I'v...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/1-1.c
3,672
utf_8
f7cb1eaad508c65d0261b608a810f17c
/* * source tree. * Test that if the signal specified by set does not become pending, the sigtimedwait() function shall wait for the time interval specified in the timespec structure referenced by timeout. NOTE: This program has commented out areas. The commented out functionality sets a timer in cas...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/4-1.c
1,595
utf_8
b376e430bc909b05aa8afdbc1034992a
/* * source tree. * Test that the sigtimedwait() function shall return the selected signal number upon success. Steps: 1. Register signal SIGTOTEST with the handler myhandler 2. Block SIGTOTEST from the process 3. Raise the signal, causing it to be pending 4. Call sigtimedwait() and verify th...
google
android
6-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigtimedwait/6-1.c
2,951
utf_8
bc6c340fd2b0cdeb8d0ad4210d9e3016
/* * source tree. Test that sigtimedwait() sets errno to [EAGAIN] if no signal specified by set was generated within the specified timeout period. NOTE: This program has commented out areas. The commented out functionality sets a timer in case sigtimedwait() never returns, to help the program from ...
google
android
7-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/7-1.c
1,318
utf_8
7ee6c8dd733548df0af87f7cd5a3bbea
/* * source tree. * author: adam li * Test that clock_getres() returns the resolution of clock_id in res. * * The clock chosen for this test is CLOCK_PROCESS_CPUTIME_ID. */ #include <unistd.h> #include <stdio.h> #include <time.h> #include "posixtest.h" #define LARGENUM 100000 int main(void) { #if _POSIX_CPUTIME !...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/3-1.c
1,177
utf_8
e084901f18b07605ce72f4666519b185
/* * source tree. * pt:MON * Test that clock_getres() supports a clock_id of CLOCK_MONOTONIC if * pt:MON. */ #include <stdio.h> #include <time.h> #include "posixtest.h" #define LARGENUM 100000 int main(void) { #ifdef CLOCK_MONOTONIC struct timespec res; /* Initialize res to a number much larger than the resoluti...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/5-1.c
613
utf_8
cfe05dbacf075b60a9966ef81c4c9c66
/* * source tree. * Test that clock_getres() returns -1 on failure. */ #include <stdio.h> #include <time.h> #include "posixtest.h" #define INVALIDCLOCKID 99999 int main(void) { struct timespec res; if (clock_getres(INVALIDCLOCKID, &res) == -1) { printf("Test PASSED\n"); return PTS_PASS; } printf("Test FAILED...
google
android
6-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/6-2.c
1,610
utf_8
3ba4fa31db5a05d4981c65353bb841c0
/* * source tree. * Test that clock_getres() sets errno=EINVAL for a variety of * invalid clock_ids. * * The following invalid clock_ids will be used: * - Boundary values for integers (TBD if clock_id is an integer) * MIN INT = INT32_MIN * MAX INT = INT32_MAX * MIN INT - 1 = 2147483647 (this is what gcc...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/1-1.c
1,107
utf_8
9588565e857222bde04568eea5a6c071
/* * source tree. * Test that clock_getres() returns the resolution of clock_id in res. * * The clock chosen for this test is CLOCK_REALTIME. */ #include <stdio.h> #include <time.h> #include "posixtest.h" #define LARGENUM 100000 int main(void) { struct timespec res; /* Initialize res to a number much larger than...
google
android
8-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/8-1.c
1,344
utf_8
fd9df4b55ffe287660d8b9fa20f55ef3
/* * source tree. * author: adam li * Test that clock_getres() returns the resolution of clock_id in res. * * The clock chosen for this test is CLOCK_THREAD_CPUTIME_ID. */ #include <unistd.h> #include <stdio.h> #include <time.h> #include "posixtest.h" #define LARGENUM 100000 int main(void) { #if _POSIX_THREAD_CPU...
google
android
6-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_getres/6-1.c
832
utf_8
22487bcacb8d6ed78fbcc95614abc40c
/* * source tree. * Test that clock_getres() sets errno=EINVAL if clock_id does not * refer to a known clock. */ #include <stdio.h> #include <time.h> #include <errno.h> #include "posixtest.h" #define INVALIDCLOCKID 99999 int main(void) { struct timespec res; if (clock_getres(INVALIDCLOCKID, &res) == -1) { if (E...
google
android
3-6
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-6.c
2,164
utf_8
975dd960859f9eb7d044ed523fffc310
/* * * Test that mlockall lock the shared memory pages currently mapped into the * address space of the process when MCL_CURRENT is set. * * This test use msync to check that the page is locked. */ #include <sys/mman.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <unistd.h> #include <errn...
google
android
13-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/13-1.c
890
utf_8
e8ee9a27fc3bf4fc76b7dc27a2160bdc
/* * * Test that the mlockall() function set errno = EINVAL if the flags argument * is zero. */ #include <sys/mman.h> #include <stdio.h> #include <errno.h> #include "posixtest.h" int main(void) { int result; result = mlockall(0); if (result == -1 && errno == EINVAL) { printf("Test PASSED\n"); return PTS_PASS...
google
android
3-7
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/3-7.c
1,961
utf_8
58d79da6405a4181cb403befea72b3f4
/* * * Test that mlockall lock the mapped files pages currently mapped into the * address space of the process when MCL_CURRENT is set. * * This test use msync to check that the page is locked. */ #include <sys/mman.h> #include <stdio.h> #include <unistd.h> #include <errno.h> #include <fcntl.h> #include <stdlib.h...
google
android
15-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/15-1.c
2,148
utf_8
9afb3562d7ce0ba99e21555de198df66
/* * * Test that the mlockall() function set errno = EPERM if the calling process * does not have the appropriate privilege to perform the requested operation * * It is a may assertion. */ #include <sys/mman.h> #include <stdio.h> #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <pwd.h> #incl...
google
android
13-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/13-2.c
937
utf_8
f3a26686c78dac7be510cd6bd47ae45f
/* * * Test that the mlockall() function set errno = EINVAL if the flags argument * includes unimplemented flags. */ #include <sys/mman.h> #include <stdio.h> #include <errno.h> #include "posixtest.h" int main(void) { int result; result = mlockall(~(MCL_CURRENT | MCL_FUTURE)); if (result == -1 && errno == EINVAL)...
google
android
8-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/8-1.c
1,031
utf_8
dbc6aef6d8b8e655dc3201552b387155
/* * * Test that mlockall return a value of zero upon successful completion. * */ #include <sys/mman.h> #include <stdio.h> #include <errno.h> #include "posixtest.h" int main(void) { int result; result = mlockall(MCL_CURRENT); if (result == 0 && errno == 0) { printf("Test PASSED\n"); return PTS_PASS; } else ...
google
android
15-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/speculative/15-1.c
2,148
utf_8
9afb3562d7ce0ba99e21555de198df66
/* * * Test that the mlockall() function set errno = EPERM if the calling process * does not have the appropriate privilege to perform the requested operation * * It is a may assertion. */ #include <sys/mman.h> #include <stdio.h> #include <unistd.h> #include <errno.h> #include <sys/types.h> #include <pwd.h> #incl...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/2-1.c
3,415
utf_8
38c33c6f59c3858abfc0783d0441fdb5
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * pthread_once returns only when init routine has completed. * The steps are: * -> call pthread_once (the init routine lasts for 1 second) * -> check the init_routine executed * The test fails if...
google
android
4-1-buildonly
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/4-1-buildonly.c
508
utf_8
33c0d29b27f85e1894eaa46a52fbc086
/* * source tree. Test pthread_once() *The constant PTHREAD_ONCE_INIT is defined in the pthread.h header. */ #include <pthread.h> #include "posixtest.h" static pthread_once_t dummy PTS_ATTRIBUTE_UNUSED = PTHREAD_ONCE_INIT;
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-2.c
3,407
utf_8
952b205f249d8a2879ca5a63c6a05bc9
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * In a process, the first call to pthread_once with a given once_control * calls the init routine. * The steps are: * -> call pthread_once * -> check the init_routine executed * The test fails if...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/3-1.c
3,168
utf_8
ac75a7a16ef73889aa4df194b8c3f365
/* * source tree. * * Test pthread_once() * * The pthread_once() function is not a cancelation point. However if * 'init_routine'is a cancelation point and is canceled, the effect on * 'once_control' shall be as if pthread_once() was never called. * * STEPS: * 1. Create a cancelable thread. * 2. In the thre...
google
android
1-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-3.c
4,469
utf_8
47303a4e70ac2f4890ae1726ec917c0b
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * Subsequent calls with the same once_control do not call init routine. * The steps are: * -> Create several threads * -> each call pthread_once * -> check the init_routine executed once * The te...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c
1,799
utf_8
ae490a54aedf1da7ff5e56e2f99055ff
/* * source tree. * Test that pthread_once() * * Dynamic package installation. Tihe first call to pthread_once() by any * thread in a process, with a given 'once_control', shall call the * 'init_routine' with no arguments. Subsequent calls of pthread_once() * with the same once_control shall not call the '...
google
android
6-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/6-1.c
7,787
utf_8
7e4b911264b595087c31458ab2c52c7e
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * The function does not return EINTR * The steps are: * -> kill a thread which calls pthread_once * -> check that EINTR is never returned */ /*****************************************************...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/munlockall/5-1.c
1,797
utf_8
729b92332f1c0005dff33d117d37429b
/* * * Test that the munlockall() function always return a value of zero if it is * supported by the implementation. */ #include <unistd.h> #include <sys/mman.h> #include <stdio.h> #include <errno.h> #include "posixtest.h" #if !defined(_POSIX_MEMLOCK) || _POSIX_MEMLOCK == -1 int main(void) { printf("Does not suppo...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/2-1.c
1,514
utf_8
43748de942e0edc288e8c1e85dbfbce6
/* * source tree. * Test pthread_mutexattr_destroy() * A destroyed 'attr' attributes object can be reinitialized using * pthread_mutexattr_init(); the results of otherwise referencing the * object after it has been destroyed are undefined. * * Steps: * 1. Initialize a pthread_mutexattr_t object using pth...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/3-1.c
1,114
utf_8
0a5d0523522a8b7ad12dc7e97a6725b2
/* * source tree. * Test pthread_mutexattr_destroy() * Upon successful completion, pthread_mutexattr_destroy() shall * return a value of 0. * * Steps: * 1. Initialize a pthread_mutexattr_t object using pthread_mutexattr_init() * 2. Destroy that initialized attribute using pthread_mutexattr_destroy(). * ...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/1-1.c
1,119
utf_8
03330b599ddafa201067bb305cef237d
/* * source tree. * Test that pthread_mutexattr_destroy() * shall destroy a mutex attributes object. * * Steps: * 1. Initialize a pthread_mutexattr_t object using pthread_mutexattr_init() * 2. Destroy the attributes object using pthread_mutexattr_destroy() * */ #include <pthread.h> #include <stdio.h> #in...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_destroy/4-1.c
1,253
utf_8
19626516f2509cb656df781ab3f156a6
/* * source tree. * Test pthread_mutexattr_destroy() * If it fails, an error number shall be returned to indicate the error: * [EINVAL] The value specified by 'attr' is invalid * * Steps: * Try to destroy a NULL mutex attributes object using pthread_mutexattr_destroy(). * If it returns EINVAL, the ...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-1.c
3,332
utf_8
addb260a650ebcdfd0130e23fdc3940e
/* * source tree. * Test that pthread_cond_wait() * Upon successful return, the mutex shall have been locked and shall be owned * by the calling thread. */ #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include "posixtest.h" static struct testdata { pthrea...
google
android
2-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-3.c
12,264
utf_8
d184a62b321180777711d9f63247c715
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * This function is a cancelation point: when cancelability * is PTHREAD_CANCEL_DEFERRED and a cancel request arrives, the thread * must relock the mutex before the first (if any) clean up h...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/3-1.c
2,840
utf_8
7dcb8317690e3c94cde6a082d0accbb8
/* * source tree. * Test that pthread_cond_wait() * Upon successful completion, a value of zero shall be returned. */ #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <signal.h> #include "posixtest.h" static struct testdata { pthread_mutex_t mutex; pthr...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/1-1.c
2,949
utf_8
f218460bc7ac38ac0712f2d4a2c060c3
/* * source tree. * Test that pthread_cond_wait() * shall block on a condition variable. It shall be called with mutex locked * by the calling thread or undefined behavior results. */ #include <pthread.h> #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <signal.h> #include "posixtest.h" stat...
google
android
2-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/2-2.c
17,781
utf_8
a572100a31ddd5f1198a76e6ae0915ae
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * When the function returns successfully, everything is as if * the thread had locked the mutex. * * The steps are: * -> For each mutex type; * -> with and without process-shared primi...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/4-1.c
9,178
utf_8
c6148590b98e7554f1be802e21e1b31b
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * The function does not return an error code of EINTR * The steps are: * * -> Create a thread which wait in a condition for a small time. * -> Another thread will signal this condition from ...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/ctime/1-1.c
811
utf_8
c15673c9d838e2818fdea0d870219170
/* * source tree. * * * This test case checks if the return value of the ctime call is * not NULL after converting the time value to a date and time string. */ #include <stdio.h> #include <time.h> #include "posixtest.h" int main(void) { time_t current_time; char *result; time(&current_time); result = ctime(&c...
google
android
8-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-3.c
1,602
utf_8
a1d8c62217b8292e451c480a96514e8c
/* * source tree. Steps: 1. Add only SIGABRT to the signal mask. 2. Make a call such as this: sigprocmask(SIG_UNBLOCK, NULL, &oactl). At this point, we have obtained the signal mask in oactl. 3. Now call is_changed to make sure that SIGABRT is still in oactl, and that no other signal in the set is in oactl. */ #...
google
android
7-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/7-1.c
1,701
utf_8
eb33d1f8d777d46e48b5ae5b2b98b96b
/* * source tree. Go through all the signals (with the exception of SIGKILL and SIGSTOP since they cannot be added to a process's signal mask) and add each one to the signal mask. Every time a signal gets added to the signal mask (using the sigprocmask() function), make sure that all signals added before it in p...
google
android
9-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/9-1.c
2,349
utf_8
2c57a779309fb48ef3361f4b58b5efda
/* Test case for assertion #1 of the sigaction system call that shows sigaction (when used with a non-null act pointer) changes the action for a signal. Steps: 1. Use sigaction to setup a signal handler for SIGABRT 2. Add SIGABRT to the signal mask. 3. Raise SIGABRT. Now, SIGABRT is pending. 4. Call si...
google
android
17-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/17-1.c
954
utf_8
c877f1001c6ea9d8f85f02509d287b55
/* * * After sigprocmask() is called on an invalid how it should return -1 and set * errno to EINVAL. */ #include <stdio.h> #include <signal.h> #include <errno.h> #include <stdint.h> #include <stdlib.h> #include "posixtest.h" int main(void) { sigset_t set; int r, i, fails = 0; sigemptyset(&set); sigaddset(&set,...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/5-1.c
1,853
utf_8
7f980c330a9357c11647db06408768b4
/* * source tree. The resulting set shall be the signal set pointed to by set, if the value of the argument how is SIG_SETMASK */ #include <signal.h> #include <stdio.h> #include "posixtest.h" static volatile int handler_called; static void handler(int signo PTS_ATTRIBUTE_UNUSED) { handler_called = 1; } int main(voi...
google
android
10-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/10-1.c
1,266
utf_8
95ab1ae2048e1cda1c5d9e4851bbf497
/* * source tree. Attempt to add SIGKILL and SIGSTOP to the process's signal mask and verify that: - They do not get added. - sigprocmask() does not return -1. */ #include <signal.h> #include <stdio.h> #include "posixtest.h" int main(void) { sigset_t set1, set2; int sigprocmask_return_val = 1; sigemptyset(&set1...
google
android
12-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/12-1.c
2,365
utf_8
c4b7467b3e73590e6ed4a796291006bf
/* * source tree. Steps: 1. Set the signal mask to only having SIGABRT. 2. Call sigprocmask again, this time with a randomly generated value of how that is checked to make sure it does not equal any of the three defined values of how which are SIG_SETMASK, SIG_BLOCK, or SIG_UNBLOCK. This should cause sigprocmask...
google
android
8-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-2.c
1,602
utf_8
04fd971c62b2394df709ea79f4b3d499
/* * source tree. Steps: 1. Add only SIGABRT to the signal mask. 2. Make a call such as this: sigprocmask(SIG_SETMASK, NULL, &oactl). At this point, we have obtained the signal mask in oactl. 3. Now call is_changed to make sure that SIGABRT is still in oactl, and that no other signal in the set is in oactl. */ #...
google
android
15-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/15-1.c
638
utf_8
278897777f72acdea2482f72394080bf
/* * source tree. Simply, if sigignore returns a 0 here, test passes. */ #include <stdio.h> #include <signal.h> #include "posixtest.h" int main(void) { sigset_t set; sigaddset(&set, SIGABRT); if (sigprocmask(SIG_SETMASK, &set, NULL) != 0) { perror("sigprocmask failed -- returned -- test aborted"); return PTS_F...
google
android
8-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/8-1.c
1,598
utf_8
1bf4e0247588732b1d1c9bbb28cd090d
/* * source tree. Steps: 1. Add only SIGABRT to the signal mask. 2. Make a call such as this: sigprocmask(SIG_BLOCK, NULL, &oactl). At this point, we have obtained the signal mask in oactl. 3. Now call is_changed to make sure that SIGABRT is still in oactl, and that no other signal in the set is in oactl. */ #in...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/4-1.c
2,218
utf_8
a5ac6068f4cb5f241f5b8aac2ca22268
/* * source tree. The resulting set shall be the union of the current set and the signal set pointed to by set, if the value of the argument how is SIG_BLOCK. */ #include <signal.h> #include <stdio.h> #include "posixtest.h" static volatile int handler_called; static void handler(int signo PTS_ATTRIBUTE_UNUSED) { ha...
google
android
6-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigprocmask/6-1.c
2,630
utf_8
efb51592b04bab359d06fb3d79aee6be
/* * source tree. The resulting set shall be the intersection of the current set and the complement of the signal set pointed to by set, if the value of the argument how is SIG_UNBLOCK */ #include <signal.h> #include <stdio.h> #include "posixtest.h" static volatile int handler_called; static void handler(int signo ...
google
android
7-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/7-1.c
839
utf_8
a0246e84fd0232380e786edcc83d4b80
/* * source tree. */ /* * mq_unlink() test plan: * mq_unlink() fails with ENOENT, if the named message queue does not * exist. * */ #include <stdio.h> #include <errno.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include "posixtest.h" #define TEST ...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-1.c
5,073
utf_8
0ad3662321c02888af26df091695f7c3
/* * source tree. */ /* * mq_unlink() test plan: * If one or more process have the message queue open, destruction of the * message queue will be postponed until all reference to the message queue * have been closed. At this time, call to mq_open() with O_CREAT flag may fail * until the message queue is act...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/1-1.c
1,445
utf_8
9dd51b34603ce02767ee906e15866184
/* * source tree. */ /* * mq_unlink() test plan: * mq_unlink() will remove the message queue named by the pathname name * and return 0 on success. After the success call to mq_unlink() with name, * a call to mq_open() with name will fail if the flag O_CREAT is not set. * */ #include <stdio.h> #include <mque...
google
android
2-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/2-2.c
5,176
utf_8
e79559da51cf0e7a1c34f62a5b426b42
/* * source tree. */ /* * mq_unlink() test plan: * If one or more process have the message queue open, destruction of the * message queue will be postponed until all reference to the message queue * have been closed. At this time, call to mq_open() with O_CREAT flag may fail * until the message queue is act...
google
android
7-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_unlink/speculative/7-2.c
924
utf_8
bfd916acf4a74d6cb815ec3617ba8862
/* * source tree. */ /* * mq_unlink() test plan: * mq_unlink() fails with ENOENT, if the named message queue does not * exist. * */ #include <stdio.h> #include <errno.h> #include <string.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include "posixt...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_error/2-1.c
2,111
utf_8
73bf3ab7fcfb3f76f28cc1078708d380
/* * source tree. */ /* * assertion: * * It the operations has not yet completed, [EINPROGRESS] shall be * returned. * * method: * * queue a lot of aio_write() to a given fildes. * then check if at least on is EINPROGRESS * if yes, result is pass otherwise unresolved * */ #include <stdio.h> #include <sys/...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c
1,601
utf_8
fcc3967b0b63e799b3b7e3b031c65c8f
/* * source tree. */ /* * assertion: * * aio_error() may fail if: * [EINVAL] The aiocbp argument does not refer to an asynchronous * operation whose return status has not yet been retrieved. * * method: * * call aio_error() with an invalid aiocbp * */ #include <stdio.h> #include <sys/types.h> #include <uni...