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/aio_error/1-1.c
1,797
utf_8
54d4b8d094e1a7f4935a81ddcf30db27
/* * source tree. */ /* * assertion: * * The aio_error() function shall return the error status (errno) * associated with tha aiobcp argument. * * method: * * execute aio_write() * and check result with aio_error() * */ #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <sys/stat.h> #in...
google
android
3-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_return/3-2.c
2,537
utf_8
f90dccff8c9c6c415d103f83c00da348
/* * source tree. */ /* * assertion: * * If the aiocbp is used to submit another asynchronous operation, * then aio_return may be successfully used to retrieve the return status. * * method: * * - open a file * - fill in an aiocb for writing * - call aio_write using this aiocb * - call aio_return to get th...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_return/2-1.c
2,376
utf_8
eb02466859840a35bcc676f9b79c350d
/* * source tree. */ /* * assertion: * * aio_return() may be called exactly once to retrieve the return status. * * method: * * - open a file * - fill in an aiocb for writing * - call aio_write using this aiocb * - call aio_return to get the aiocb status (number of bytes written) * - call aio_return again,...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_return/3-1.c
2,965
utf_8
45e029e94c83144ae7aae2444971f482
/* * source tree. */ /* * assertion: * * If the aiocbp is used to submit another asynchronous operation, * then aio_return may be successfully used to retrieve the return status. * * method: * * - open a file * - fill in an aiocb for writing * - call aio_write using this aiocb * - call aio_return to get th...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_return/1-1.c
2,087
utf_8
72de55440b1ac2de94256acf8d3c2109
/* * source tree. */ /* * assertion: * * aio_return() shall return the status associated with aiocbp. * * method: * * - open a file * - fill in an aiocb for writing * - call aio_write using this aiocb * - call aio_return to get the aiocb status (number of bytes written) * */ #include <stdio.h> #include <s...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_return/4-1.c
2,512
utf_8
db4d13eeca34242cebc3e4c9de4922ee
/* * source tree. */ /* * assertion: * * aio_return() may fail with [EINVAL] * If the aiocbp does not refer to an operation whose return status * has not yet been retrieved. * * method: * * - Open a file * - fill in an aiocb for writing * - call aio_write usign this aiocb * - fill in a new aiocb * - call...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-2.c
1,794
utf_8
ac7fe8ca26b24d4d4619b2141f78127b
/* * source tree. * Test that pthread_mutexattr_getpshared() * * It shall obtain the value of the process-shared attribute from 'attr'. * * Steps: * 1. Initialize a pthread_mutexattr_t object with pthread_mutexattr_init() * 2. Set 'pshared' of the object to PTHREAD_PROCESS_SHARED. * 3. Call pthread_mutexat...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/3-1.c
1,452
utf_8
753df044842eec904995577beea30d5a
/* * source tree. * Test that pthread_mutexattr_getpshared() * * It MAY fail if: * * [EINVAL] - 'attr' is invalid. * * Steps: * 1. Pass to pthread_mutexattr_getpshared() an uninitialized and invalid 'attr' object. * 2. The error code returned may be EINVAL. * */ #include <pthread.h> #include <stdio.h> #in...
google
android
1-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-3.c
1,837
utf_8
3cbb44936804c89dbc8a629dd944d4a3
/* * source tree. * Test that pthread_mutexattr_getpshared() * * It shall obtain the value of the process-shared attribute from 'attr'. * * Steps: * 1. Initialize a pthread_mutexattr_t object with pthread_mutexattr_init() * 2. Set 'pshared' of the object to PTHREAD_PROCESS_PRIVATE. * 3. Call pthread_mutexa...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getpshared/1-1.c
1,550
utf_8
ee3cf17dd7d657776810930638c684d6
/* * source tree. * Test that pthread_mutexattr_getpshared() * * It shall obtain the value of the process-shared attribute from 'attr'. * * Steps: * 1. Initialize a pthread_mutexattr_t object with pthread_mutexattr_init() * 2. Call pthread_mutexattr_getpshared() to check if the process-shared * attribut...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/2-1.c
1,595
utf_8
7496d27f2fb61357d601822f9ad71e55
/* * source tree. * Test pthread_condattr_destroy() * A destroyed 'attr' attributes object can be reinitialized using * pthread_condattr_init(); the results of otherwise referencing the * object after it has been destroyed are undefined. * * Steps: * 1. Initialize a pthread_condattr_t object using pthrea...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/3-1.c
1,163
utf_8
af5840d8a392a12cc42496ebedc3f812
/* * source tree. * Test pthread_condattr_destroy() * Upon successful completion, pthread_condattr_destroy() shall * return a value of 0. * * Steps: * 1. Initialize a pthread_condattr_t object using pthread_condattr_init() * 2. Destroy that initialized attribute using pthread_condattr_destroy(). * Th...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/1-1.c
1,181
utf_8
c7905fb8b2d1e4dcc19487ffb5d8e056
/* * source tree. * Test that pthread_condattr_destroy() * shall destroy a condition variable attributes object. * * Steps: * 1. Initialize a pthread_condattr_t object using pthread_condattr_init() * 2. Destroy the attributes object using pthread_condattr_destroy() * */ #include <pthread.h> #include <std...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_condattr_destroy/4-1.c
1,284
utf_8
eb46e8b26bf33d88c2c236f5533c434f
/* * source tree. * Test pthread_condattr_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 condition variable attributes object using pthread_condattr_destroy(). * If it returns E...
google
android
3-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-3.c
978
utf_8
0f68f6528e4128e8ee6e924698fad3e9
/* * source tree. */ /* mq_close test plan: Attempt to close a invalid descriptor and verify that returns the correct error. */ /* Note: Add a new test case. Use a large number as fd. Idea from * Drepper's patch */ #include <mqueue.h> #include <errno.h> #include <stdio.h> #include "posixtest.h" int main(void)...
google
android
3-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-2.c
826
utf_8
fbbf5a9bc73fc6b3075adc22cf031d45
/* * source tree. */ /* mq_close test plan: Attempt to close a invalid descriptor and verify that returns the correct error. */ #include <mqueue.h> #include <errno.h> #include <stdio.h> #include "posixtest.h" int main(void) { if (mq_close((mqd_t) - 1) != -1) { printf("mq_close() did not return -1 on invalid...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_close/2-1.c
5,670
utf_8
3b46d0a955517aafae89c51119c27473
/* * source tree. */ /* mq_close test plan: 1. Create pipes to communicate with child process 2. Fork, child waits for command on pipe 3. Create and open message queue, set up notification, sends command 4. Child opens message queue and tries to set up notification, sends command 5. Parent closes the queu...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_close/3-1.c
1,505
utf_8
569170cd28923d2ebf2ca240a3f41b40
/* * source tree. */ /* mq_close test plan: 1. Create a new message queue 2. Close the message queue, verify success 3. Attempt to close the same descriptor again, and verify that mq_close returns EBADF */ #include <stdio.h> #include <mqueue.h> #include <sys/types.h> #include <unistd.h> #include <fcntl....
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_close/1-1.c
1,132
utf_8
fe5ad95f29511edf64f8210c204f0d29
/* * source tree. */ /* * mq_close test case that attempts to open a new message queue, * close the message queue and verify that mq_close returns 0. */ #include <stdio.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
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_close/4-1.c
1,645
utf_8
2857ae9a15ab9021a18cbead392d11ab
/* * source tree. */ /* Test that a closed message queue descriptor has been disassociated from its message queue by attempting to set a notification on the descriptor and verifying that mq_notify returns -1 and sets errno to EBADF */ #include <stdio.h> #include <mqueue.h> #include <sys/types.h> #include <unis...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mktime/1-1.c
979
utf_8
3c5ccc55162aad25cd2860da0053e510
/* * source tree. * * * This test case shall return PASS on converting the broken down July 4th 2001 * into a time since the Epoch, which is the same encoding as of the value * returned by time(), otherwise it fails with -1. */ #include <stdio.h> #include <time.h> #include "posixtest.h" static struct tm tm_ptr; ...
google
android
4-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-2.c
11,585
utf_8
4c5e9f171de276568d95fcb6607bd8d4
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * If the mutex was already locked, the call returns EBUSY immediatly. * The steps are: * -> Set a timeout. * -> For each kind of mutex, * -> Lock the mutex. * -> create a new child (...
google
android
4-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-3.c
10,587
utf_8
db993ff2c16494129b39ccda55ab9b0f
/* * 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: * -> A thread is killed several times while calling pthread_mutex_trylock * -> check that EINTR is never returned */ /***************...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/2-1.c
11,673
utf_8
239310e5b29b46c6695a63b75ab38b3c
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * If the mutex is of type PTHREAD_MUTEX_RECURSIVE, * and the calling thread already owns the mutex, * the call is successful (the lock count is incremented). * The steps are: * * -> tr...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/1-2.c
12,170
utf_8
4748045c268d957faa0469f48e62d592
/* * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * This sample test aims to check the following assertion: * * The pthread_mutex_trylock() function locks the mutex object * when it is unlocked. * The steps are: * * -> For each kind of mutex, * -> trylock the mutex. It shall suceed. * -> tr...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/3-1.c
1,416
utf_8
face9fe22d98f1897fc3371df1cda0c5
/* * source tree. * Test that pthread_mutex_trylock() * 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 ((...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/1-1.c
2,664
utf_8
f4f30a8d2cfe72248019417a0d7bf1a9
/* * source tree. * Test that pthread_mutex_trylock() * is equivalent to pthread_mutex_lock() except that if the mutex object * referenced by 'mutex' is currently locked (by any thread, including the * current thread), the call shall return immediately. * Steps: * -- Initilize a mutex object * -- Crea...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/4-1.c
1,197
utf_8
67f47557e6779c71bece22ccc7ab0339
/* * source tree. * Test that pthread_mutex_trylock() * Upon failure, it shall return: * -[EBUSY] The mutex could not be acquired because it was already locked. * Steps: * -- Initilize a mutex object * -- Lock the mutex using pthread_mutex_lock() * -- Try to lock the mutex using pthread_mutex_tryloc...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/strchr/1-1.c
3,562
utf_8
15a714980019d2ee5beba79da7679126
/* * source tree. */ /* * assertion: * * The function will locate the first occurrence of c (converted to a char) * in the string pointed to by s. The terminating NUL character is * considered to be part of the string. Upon completion, the function will * return a pointer to the byte, or a null pointer if the b...
google
android
4-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-2.c
1,575
utf_8
8fcba954672efbdac0dfadab9fde7301
/* * 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 <time.h> #include "posixtest.h" #define NAMESIZE 50 #define MSGS...
google
android
5-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-3.c
3,618
utf_8
e8bcb648867cd65b803383627b8cb507
/* * source tree. */ /* * Test that if the message queue is full and O_NONBLOCK is not set, * mq_timedsend() will block until abs_timeout is reached. * * 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 the * paren...
google
android
14-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/14-1.c
1,933
utf_8
9148bc641aa0879705c5effb37a1d9eb
/* * 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 <time.h> #include "posi...
google
android
5-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-2.c
3,615
utf_8
f0f0563192455e581a4b03132e6d9bbd
/* * source tree. */ /* * Test that if the message queue is full and O_NONBLOCK is not set, * mq_timedsend() 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 ...
google
android
4-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-3.c
2,066
utf_8
a155d914c0b23ffec52c5da30467eccf
/* * 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
20-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/20-1.c
2,730
utf_8
7f9cf5e74c9260eecaf813171f7ab30e
/* * source tree. */ /* * Test that mq_timedsend() will return ETIMEDOUT if O_NONBLOCK * was not set when mq_open() was called and the message could * not be added to the queue because it timed out. * * Test by sending messages until a block happens and then verify * that mq_timedsend() times out. */ #include ...
google
android
7-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/7-1.c
2,713
utf_8
fbb30ea8d06a104123ce389cf90f2384
/* * source tree. */ /* * Test that if O_NONBLOCK is set and the message queue is full, mq_timedsend() * 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...
google
android
3-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/3-2.c
4,425
utf_8
75c6e517f1aeeca409eeb174b82f6534
/* * source tree. */ /* * Test that mq_timedsend() 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 * ...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/2-1.c
1,694
utf_8
387643a8b6f3ab7b4eb7c14d9cb0cb80
/* * source tree. */ /* * Test that mq_timedsend() 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 <time.h> #include "posixtest.h" #define NAMESIZE 50 #defin...
google
android
9-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/9-1.c
2,360
utf_8
f478c7b8df6b0d3cffb1f9496a263fb6
/* * source tree. */ /* * Test that mq_timedsend() 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...
google
android
11-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/11-1.c
1,687
utf_8
892202f10560ace07feb69e301d18e34
/* * source tree. */ /* * Test that mq_timedsend() 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 <time.h> #inclu...
google
android
16-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/16-1.c
4,063
utf_8
0c84749d0364153fd45577eac338016a
/* */ /* * Test that if the message queue is full and O_NONBLOCK is not set, * mq_timedsend() will block until abs_timeout is reached. * * 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 the * parent wait for the t...
google
android
19-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/19-1.c
2,683
utf_8
c85367a99134235dac61320646a5baf1
/* * source tree. */ /* * Test that mq_timedsend() will return EINVAL if the message queue is * full and abs_timeout has a tv_nsec < 0 or >= 1000 million. * * Fill message queue until full and then call mq_timedsend with invalid * abs_timeout values. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> ...
google
android
13-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/13-1.c
1,951
utf_8
86f3f665d6e57d7ff120ed2ef806ec9e
/* * 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_timedsend/3-1.c
4,130
utf_8
e5d97ddd5cd7f3208a2e5c6376ff16c9
/* * source tree. */ /* * Test that mq_timedsend() 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 ...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/5-1.c
3,605
utf_8
4bcde894018ffe4fb952ec7ef51f4162
/* * source tree. */ /* * Test that if the message queue is full and O_NONBLOCK is not set, * mq_timedsend() 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, ha...
google
android
10-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/10-1.c
2,032
utf_8
4fd5da36d380b6eb9a46b2ac4ccc547d
/* * source tree. */ /* * Test that if O_NONBLOCK is set and the message queue is full, mq_timedsend() * 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> ...
google
android
12-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/12-1.c
5,373
utf_8
eac2da48a76c70854dac46750a3b1e0e
/* * source tree. */ /* * Test mq_timedsend() will set errno == EINTR if it is interrupted by a signal. * * Steps: * 1. Create a thread and set up a signal handler for SIGUSR1 * 2. Thread indicates to main that it is ready to start calling mq_timedsend * until it blocks for a timeout of 10 seconds. * 3. In ...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/1-1.c
2,096
utf_8
944cd11cd84979e76fbd5cb6869eabf5
/* * source tree. */ /* * Basic test that mq_timedsend() 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....
google
android
15-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/15-1.c
2,704
utf_8
426083f24fb2d52e4781198d64b3ee60
/* * source tree. */ /* * Test that if abs_timeout has already passed when mq_timedsend is * called, then the timeout shall expire. * * Test by setting the timeout to a time in the past and then sending * messages until one would block. Ensure that the error on this message * that would block is * ETIMEDOUT a...
google
android
18-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/18-1.c
1,442
utf_8
72e06f9835a3187267782bf4b16f94a7
/* * source tree. */ /* * Basic test that if the queue already has room, then mq_timedsend() * does not fail. * * Test by calling mq_timedsend() with an already expired timeout value * on an empty queue. Should succeed. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include...
google
android
8-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/8-1.c
2,028
utf_8
5d1021ad6079797b1ea600ca624f356c
/* * source tree. */ /* * Test that mq_timedsend() 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> #in...
google
android
11-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/11-2.c
1,669
utf_8
6db6598bba04173fcb089948c71e96c0
/* * source tree. */ /* * Test that mq_timedsend() 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 <time.h> #include "posixtest.h"...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/4-1.c
1,578
utf_8
69f0f01318956deba3bb8900224b46e4
/* * 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 <time.h> #include "posixtest.h" #define NAMESIZE 50 #define MSGST...
google
android
18-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedsend/speculative/18-2.c
1,464
utf_8
77e969eba9abf423458e15397688dc2e
/* * source tree. */ /* * Basic test that if the queue already has room, then mq_timedsend() * does not need to check abs_timeout for validity. * * This is a speculative test because if abs_timeout _is_ checked for * validity, it is not a failure. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #in...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock/2-1.c
1,042
utf_8
40dd53a8f6f5b8d00bfa054a7b4aa8a6
/* * Test that CLOCKS_PER_SEC == 1,000,000 in <time.h> */ // Applied patch from Craig Rodrigues; no longer assumes CLOCKS_PER_SEC is long // 12-18-02 Per suggestion by neal REMOVE-THIS AT cs DOT uml DOT edu started // using intmax_h and INTMAX_C. Also added use of PRIdMAX per his suggestion. #include <time.h> #inclu...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock/1-1.c
1,387
utf_8
537d6d894c45b24863161fbc1d69ffb9
/* * source tree. * * Test that clock() returns a clock_t containing the processor time * since a specific point in time. * Dividing the return value by CLOCKS_PER_SEC gives time in seconds. * * 12/17/02 - Checking in correction made by * jim.houston REMOVE-THIS AT attbi DOT com * Test ne...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/2-1.c
1,972
utf_8
232bed94764c8bc2055c74ab950326d1
/* * source tree. * Test that pthread_attr_setdetachstate() * * If the thread is created detached, then use of the ID of the newly created * thread by the pthread_detach() or pthread_join() function is an error. * * Steps: * 1. Initialize a pthread_attr_t object using pthread_attr_init(). * 2. Using pthread_...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/1-2.c
1,962
utf_8
fc387d98a95e9f8532f2ec88db7c1964
/* * source tree. * Test that pthread_attr_setdetachstate() * * shall set the detachstate attribute in the 'attr' object. * The detach state is either PTHREAD_CREATE_DETACHED or * PTHEAD_CREATE_JOINABLE. * A value of PTHREAD_CREATE_DETACHED shall cause all threads created with * 'attr' to be in the detached st...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/1-1.c
1,962
utf_8
7b9863e78e520eef19ed01d2c58d7735
/* * source tree. * Test that pthread_attr_setdetachstate() * * shall set the detachstate attribute in the 'attr' object. * The detach state is either PTHREAD_CREATE_DETACHED or * PTHEAD_CREATE_JOINABLE. * A value of PTHREAD_CREATE_DETACHED shall cause all threads created with * 'attr' to be in the detached st...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setdetachstate/4-1.c
1,173
utf_8
acf665cb9f63ea3ee6f41ddfaea8f1bd
/* * source tree. * Test that pthread_attr_setdetachstate() * * shall fail if: * -[EINVAL] The value of detachstate was not valid * * Steps: * 1. Initialize a pthread_attr_t object using pthread_attr_init() * 2. Call pthread_attr_setdetachstate() using an invalid value of 0 * */ #include <pthread.h> #incl...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sighold/2-1.c
576
utf_8
bc39fde38459e63db60848480be89b31
/* * source tree. Simply, if sighold returns a 0 here, test passes. */ #include <stdio.h> #include <signal.h> #include "posixtest.h" int main(void) { if (sighold(SIGABRT) != 0) { perror("sighold failed -- returned -- test aborted"); return PTS_UNRESOLVED; } printf("Test PASSED\n"); return PTS_PASS; }
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sighold/3-1.c
1,028
utf_8
01cb17c2faea8ca6afe394a815026691
/* * source tree. * * * After sighold is called on an invalid signal it should return -1 and set * errno to EINVAL */ #include <stdio.h> #include <signal.h> #include <errno.h> #include <stdint.h> #include "posixtest.h" static const int sigs[] = {-1, -10000, INT32_MIN, INT32_MIN + 1}; #define NUMSIGNALS (sizeof(si...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sighold/1-1.c
1,508
utf_8
839c58ac82970048bfd2be5cf94e6c1d
/* * source tree. Steps: 1. Set up a handler for signal SIGABRT, such that it is called if signal is ever raised. 2. Call sighold on that SIGABRT. 3. Raise a SIGABRT and verify that the signal handler was not called. */ #include <signal.h> #include <stdio.h> #include <time.h> #include <unistd.h> #include "posixtes...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/2-1.c
5,105
utf_8
87f7e4dce2e9a4be0e7186f20047e5ab
/* * source tree. * Test pthread_rwlock_wrlock(pthread_rwlock_t * rwlock) * * If a signal is delivered to a thread waiting for a read-write lock for writing, upon * return from the signal handler the thread resumes waiting for the read-write lock for * writing as if it was not interrupted. * * Steps: * 1. main...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/3-1.c
2,249
utf_8
32c83eda58512852dde03e7fd82eedfa
/* * source tree. * Test pthread_rwlock_wrlock(pthread_rwlock_t *rwlock) * * It may fail if: * [EDEADLK] The current thread already owns the rwlock for writing or reading. * * Steps: * 1. Create and initialize an rwlock * 2. Perform a write lock via pthread_rwlock_wrlock() * 3. Perform a write lock _again_ wi...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_wrlock/1-1.c
5,245
utf_8
ca1c2ff8b2f9a0d78b0d32bf727c90ba
/* * source tree. * Test pthread_rwlock_wrlock(pthread_rwlock_t *rwlock) * * The function shall apply a write lock to the read-write lock referenced by * 'rwlock'. The calling thread acquires the write lock if no other thread * (reader or writer) holds the read-write lock 'rwlock'. Otherwise, the thread * shall ...
google
android
14-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/14-1.c
1,669
utf_8
81931f7db6bc61867ff49f85970fc09d
/* * source tree. Steps: 1. Call pthread_sigmask with correct parameter, and check that 0 is returned. */ #include <pthread.h> #include <errno.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include "posixtest.h" static void *a_thread_func() { sigset_t actl; /* printf("SIG_SETMASK=%d\n", SIG_SETMASK...
google
android
8-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-3.c
2,379
utf_8
14b45f509585876d10b929f6c3e874df
/* * source tree. Steps: 1. Add only SIGABRT to the signal mask. 2. Make a call such as this: pthread_sigmask(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/pthread_sigmask/7-1.c
2,601
utf_8
df787d4cabef7490a90a01f5d65eed8c
/* * 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 pthread_sigmask() function), make sure that all signals added before it in pre...
google
android
9-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/9-1.c
3,179
utf_8
6c5cebd108cdd7f99ecfb818626ba65d
/* 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 pt...
google
android
16-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/16-1.c
2,134
utf_8
cdc7dda6d532d9712be64c8d6e5c70da
/* * source tree. Steps: 1. Call pthread_sigmask 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 pthread_sigmask() to return EINVAL. If it doesn't, then fail, otherwise...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/5-1.c
3,716
utf_8
31f4168ae6b3caa7d949dbecea0fe216
/* * source tree. The resulting set shall be the the signal set pointed to by set Steps: 1. Have main create a new thread and wait for its termination. 2. Inside the new thread, set up the signal mask such that it contains only SIGABRT (by passing SIG_SETMASK value to pthread_sigmask) 4. Raise SIGABRT, and make sure t...
google
android
10-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/10-1.c
2,124
utf_8
afedeac7f6622c6effbb454f9f8fa7a9
/* * source tree. Attempt to add SIGKILL and SIGSTOP to the process's signal mask and verify that: - They do not get added. - pthread_sigmask() does not return -1. */ #include <pthread.h> #include <signal.h> #include <stdio.h> #include "posixtest.h" static void *a_thread_func() { sigset_t set1, set2; int pthread...
google
android
12-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/12-1.c
3,473
utf_8
91faa176ca998603b8a72c5836e250fc
/* * source tree. Steps: 1. Set the signal mask to only having SIGABRT. 2. Call pthread_sigmask 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 pthrea...
google
android
8-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-2.c
2,379
utf_8
c70a942b3218f29b20f925cbf3a2fa6c
/* * source tree. Steps: 1. Add only SIGABRT to the signal mask. 2. Make a call such as this: pthread_sigmask(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/pthread_sigmask/15-1.c
664
utf_8
4df714118182a56b0cdadb3652751c48
/* * source tree. Simply, if pthread_sigmask 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 (pthread_sigmask(SIG_SETMASK, &set, NULL) != 0) { perror("pthread_sigmask failed -- returned -- test aborted"); ...
google
android
18-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c
7,918
utf_8
dc4cad5743ec5c24b9709910f092a2d3
/* * 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_sigmask * -> check that EINTR is never returned */ /**************************************************...
google
android
8-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/8-1.c
2,375
utf_8
75996ccf599832aaf7732c095860a51e
/* * source tree. Steps: 1. Add only SIGABRT to the signal mask. 2. Make a call such as this: pthread_sigmask(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. */...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/4-1.c
3,776
utf_8
b6cab1cfdd84685c77134ed453b8ca35
/* * 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. Steps: 1. Have main create a new thread and wait for its termination. 2. Inside the new thread, set up the signal mask such that it contains only SIGAB...
google
android
6-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/6-1.c
4,220
utf_8
2fc59aa5f6453c7984e0943f2618b374
/* * source tree. The resulting set shall be the intersection of the current set and the complement of the set pointed to by set. Steps: 1. Have main create a new thread and wait for its termination. 2. Inside the new thread, set up the signal mask such that it contains both SIGABRT and SIGALRM 3. Also insid...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigpause/2-1.c
3,070
utf_8
d9509a7f5d8c22716be64fbe3084faa1
/* * source tree. This program verifies that sigpause() restores sig to the signal mask before returning. Steps: 1. From the main() function, create a new thread. Give the new thread a a second to set up for receiving a signal, add SIGTOTEST to its signal mask and to suspend itself using sigpause(SIGTOTEST...
google
android
1-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigpause/1-2.c
2,087
utf_8
8a018de832326ba9c8c8e9f59e93e456
/* * source tree. This program verifies that sigpause() suspends the calling process until it receives a signal. Steps: 1. From the main() function, create a new thread. Give the new thread a a second to set up for receiving a signal, and to suspend itself using sigpause(). 2. For about ten seconds, keep ...
google
android
3-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigpause/3-1.c
2,214
utf_8
587b9227deab5261c3531715dd44adfc
/* * source tree. This program verifies that sigpause() returns -1 and sets errno to EINTR when it returns. Steps: 1. From the main() function, create a new thread. Give the new thread a a second to set up for receiving a signal, and to suspend itself using sigpause(). 2. From the main() thread, send sign...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigpause/1-1.c
1,810
utf_8
09a437e89fe1f0875e624e9c66a7d261
/* * source tree. This program verifies that sigpause() removes sig from the signal mask. Steps: 1. From the main() function, create a new thread. Give the new thread a a second to set up for receiving a signal, and to suspend itself using sigpause(). 2. Have main() send the signal indicated by SIGTOTEST t...
google
android
4-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigpause/4-1.c
1,469
utf_8
95f15c89b62b2d20c2c29047b9ac89c0
/* * source tree. This program verifies that sigpause() returns -1 and sets errno to EINVAL if passed an invalid signal number. */ #include <pthread.h> #include <stdio.h> #include <signal.h> #include <errno.h> #include <unistd.h> #include "posixtest.h" #define SIGTOTEST SIGABRT int main(void) { printf("Function de...
google
android
5-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-3.c
2,607
utf_8
273339ceea09b007b1b466498f0e6c09
/* * source tree. */ /* * mq_timedreceive() test plan: * Test that if the message queue is empty and O_NONBLOCK is not set, * mq_timedreceive() will block until mq_timedreceive() is interrupted by a * signal. * * NOTE: This test makes some assumptions and has some potential race * conditions, but seems the be...
google
android
17-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-2.c
1,954
utf_8
6b7dc6e2124b475c28feea8688a3093b
/* * source tree. */ /* * mq_timedreceive() test plan: * mq_timedreceive() will fail with EINVAL if message queue is * empty and nanoseconds field value of abs_timeout greater than * or equal to 1000 million. * */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/type...
google
android
14-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/14-1.c
1,896
utf_8
0b9a89d2352d129c2d2f38a0df4f4ec2
/* * source tree. */ /* * mq_timedreceive() test plan: * mq_timedreceive() will fail with EBADF, if mqdes is not a valid message * message queue descriptor. */ #include <stdio.h> #include <errno.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <st...
google
android
5-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-2.c
2,680
utf_8
a5d40c85ebd0b95b157fcedd43178665
/* * source tree. */ /* * mq_timedreceive() test plan: * Test that if the message queue is empty and O_NONBLOCK is not set, * mq_timedreceive() will block until timeout expires. * */ #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include <fcntl.h> #include <mqueue.h> #include <signal.h> #inc...
google
android
10-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-2.c
2,256
utf_8
520e8c0423d2239c436b206936c725e9
/* */ /* * If the message can be removed from the message queue immedietely, * the operation will not fail even if abs_timeout is the past time. * Test Steps: * 1. Set the abs_timeout to be a past time, when there is message * than can be removed from the message queue immediately. * 2. Timeout error is not o...
google
android
17-3
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-3.c
1,946
utf_8
105680bb762cba43ff76f5f643a753b5
/* * source tree. */ /* * mq_timedreceive() test plan: * mq_timedreceive() will fail with EINVAL if message queue is * empty and nanoseconds field value of abs_timeout greater than * 1000 million. * */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #includ...
google
android
7-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/7-1.c
1,828
utf_8
db5b5f131b1e8111170cd5089059a520
/* * source tree. */ /* * mq_timedreceive() 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_timedreceive will return an * error. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/type...
google
android
2-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/2-1.c
1,958
utf_8
7af96e2c3695682f061cef21a6ab851c
/* * source tree. */ /* * mq_timedreceive 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 ...
google
android
11-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/11-1.c
2,827
utf_8
a1ef5d05498e39e9479280001ad3798f
/* * source tree. */ /* * mq_timedreceive test plan: * On success, mq_timedreceive 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_timedreceive() twice, if the two received messages are the same, *...
google
android
17-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/17-1.c
1,920
utf_8
ac51c06018d4715ca1a0fdb5eb6fc56f
/* * source tree. */ /* * mq_timedreceive() test plan: * mq_timedreceive() will fail with EINVAL if message queue is * empty and nanoseconds field value of abs_timeout is less than 0. * */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h>...
google
android
13-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/13-1.c
1,891
utf_8
198c8701274bb5ad2e6a08cbe1599569
/* * source tree. */ /* * mq_timedreceive() test plan: * mq_timedreceive() 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...
google
android
5-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/5-1.c
2,640
utf_8
21a13f3e50ce6f2bf67459e4b4f6f59a
/* * source tree. */ /* * mq_timedreceive() test plan: * Test that if the message queue is empty and O_NONBLOCK is not set, * mq_timedreceive() will block until a message is enqueued on the * message queue. * * NOTE: This test makes some assumptions and has some potential race * conditions, but seems the best...
google
android
18-2
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/18-2.c
2,682
utf_8
82e0906b8eafd3396d93359f27b666bf
/* * source tree. */ /* * mq_timedreceive() test plan: * Test that if abs_timeout has already passed the time * at the time mq_timedreceive() called, the timeout will expire. * mq_timedreceive() will return with ETIMEDOUT. * */ #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include <errno.h...
google
android
10-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/10-1.c
1,931
utf_8
a0778369d09c949122296e76e0f513db
/* * source tree. */ /* * mq_timedreceive test plan: * If message can be removed from message queue immediately, * mq_timedreceive will never fail with a timeout. */ #include <stdio.h> #include <mqueue.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <string.h> #incl...
google
android
1-1
.c
platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mq_timedreceive/1-1.c
2,983
utf_8
a1a175a52dabe99f65ad182451f90dec
/* * source tree. */ /* * mq_timedreceive test plan: * mq_timedreceive 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> #incl...