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 | 13-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/13-1.c | 1,327 | utf_8 | 2d43d0d73437b6d705ef1547d244d5c7 | /*
*
* Test that the file is not open for write access when the applications
* specify the value of O_RDONLY.
*
* The test uses ftruncate to check that the file is not open for write access.
*/
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>... |
google | android | 5-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/5-1.c | 2,595 | utf_8 | 793ec224e339b4fd6e9b203b216a6940 | /*
*
* Test that when name begins with the slash character, then processes calling
* shm_open() with the same value of name refer to the same shared memory
* object, as long as that name has not been removed.
*
* Steps:
* 1. Create a child process.
* (The child process)
* 2. Open a shared memory file O_RDWR ... |
google | android | 26-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/26-2.c | 3,317 | utf_8 | 8ffc441f1113be8b196a7e9b9d19b77b | /*
*
* Test that the owner is unchanged when O_TRUNC is set, the shared memory
* object exists and it is successfully opened O_RDWR.
*
* In most case this test will be unresolved if not run by root.
* Steps:
* 1. Create a shared memory object.
* 2. Set a non zero size for this object (to force the modificatio... |
google | android | 28-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/28-2.c | 2,217 | utf_8 | 3ce7d2f37401c8e0af6db69136f5e762 | /*
*
* Test that the state of the shared memory object, including all data
* associated with the shared memory object, persists until all mapping
* references are gone even if the shared memory object is unlinked and there
* is no open reference anymore.
*
* Steps:
* 1. Create a shared memory object, map it an... |
google | android | 38-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/38-1.c | 1,016 | utf_8 | 2714e75db2ccad701a68c0635087536f | /*
*
* Test that the shm_open() function sets errno = EMFILE if too many file
* descriptors are currently in use by this process.
*/
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include "posixtest.h"
#define SHM_NAME "posixtest_38-1"
int main(void)
{
int fd ... |
google | android | 20-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-2.c | 1,585 | utf_8 | d3f3f462e905ef2a49c3683cdd94f4c6 | /*
*
* Test that shm_open open the shared memory object for writing when calling
* shm_open with O_RDWR even if the mode don't set write permission.
*
* The test use ftruncate to check the object is open for writing.
*/
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <f... |
google | android | 20-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/20-3.c | 1,732 | utf_8 | 64b5783e776f56a4938e7bf060458273 | /*
*
* Test that shm_open open the shared memory object for reading when calling
* shm_open even if the mode don't set read permission.
*
* The test use mmap to check the object is open for reading.
*/
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/1-1.c | 2,106 | utf_8 | 5899b2b081930c75c36d56960f26f0db | /*
*
* Test that the shm_open() function establish a connection between a shared
* memory object and a file descriptor.
*
* Step:
* 1. Create a file a shared memory object using shm_open().
* 2. Write in the file referenced by the file descriptor return by
* shm_open().
* 3. Reopen the file with shm_ope... |
google | android | 15-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/15-1.c | 1,704 | utf_8 | 838eec161c3968e39cb16bd9183f8bdb | /*
*
* Test that the shared memory object is created if the shared memory object
* does not exists and the O_CREAT flags is set.
*
* Steps:
* 1. Ensure that the shared memory object does not exists using shm_unlink.
* 2. Call shm_open() with O_CREAT flags set.
* 3. Check that the shared memory object exists ... |
google | android | 18-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/18-1.c | 2,508 | utf_8 | 81a4c8dca51ec86b90e13d28e8b995f9 | /*
*
* Test that the permission bits of the shared memory object are set to the
* value of the mode argument except those set in the file mode creation mask
* of the process when the shared memory object does not exists and the O_CREAT
* flags is set.
*
* Steps:
* 1. Set umask to UMASK_FLAGS.
* 2. Ensure tha... |
google | android | 25-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/25-1.c | 1,808 | utf_8 | 510f04e94dd9566d85c63e95fad28576 | /*
*
* Test that the object is truncated to zero length when O_TRUNC is set, the
* shared memory object exists and it is successfully opened O_RDWR.
*
* Steps:
* 1. Create a shared memory object and set it to a non zero size.
* 2. Call shm_open with O_TRUNC and O_RDWR set.
* 3. Check that the shared memory o... |
google | android | 34-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/34-1.c | 2,138 | utf_8 | 19a7ca63aebb3ffe25c5ab277413bbd4 | /*
*
* Test that the shm_open() function sets errno = EACCES if O_TRUNC is
* specified and write permission is denied
*/
/* FIXME : ambiguite de la spec */
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>... |
google | android | 39-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/39-2.c | 1,710 | utf_8 | b1237d9ab04bb9e31f6185799e57c74b | /*
*
* Test that the shm_open() function sets errno = ENAMETOOLONG if the length
* of the name argument exceeds {PATH_MAX} (including the terminating null).
*
* The used name follow the scheme:
* aaaaaa/aaaaaa/aaaaaa/aaa ...
*/
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#in... |
google | android | 8-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/8-1.c | 1,611 | utf_8 | ac5109c2101544412f86d0329a7da6e4 | /*
*
* Test that shm_open() return a file descriptor for the shared memory object
* that is the lowest numbered file descriptor not currently open for that
* process
*
* Steps:
* 1. Open a temporary file.
* 2. Open a shared memory object.
* 3. Check that the file descriptor number of the shared memory objec... |
google | android | 41-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/41-1.c | 1,225 | utf_8 | a5f3812cb7888ce2439db8a2f7255cfe | /*
*
* Test that the shm_open() function sets errno = ENOENT if O_CREAT is not set
* and the named shared memory object does not exist.
*/
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include "posixtest.h"
#define SHM_NAME "posixtest_41-1"
int main(void)
{
i... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/2-1.c | 972 | utf_8 | 51e91677911c5733f7c0a6a704b2c903 | /*
* source tree.
Test adding signo to a signal set without first calling
sigemptyset() or sigfillset().
Results are undefined; however, we should definitely not see system
crashes or hangs or other equally harmful behavior.
So, if the system is able to return test results, then this test case
passes... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-2.c | 1,091 | utf_8 | 0f855d1358de77be9a724765060d34cc | /*
* source tree.
*
* Test that sigaddset() will add signo to the set signal set.
* Test steps:
* 1) Initialize an empty or full signal set.
* 2) Add the SIGALRM signal to the empty signal set.
* 3) Verify that SIGALRM is a member of the signal set.
*/
#include <stdio.h>
#include <signal.h>
#include "posixte... |
google | android | 1-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-3.c | 1,539 | utf_8 | 3abc3e601a47243f5956971db9554035 | /*
* source tree.
*
* Test that sigaddset() will add all defined signal numbers to a signal
* set.
*
* Test steps:
* 1) Initialize an empty signal set.
* For each signal number:
* 2) Add the signal to the empty signal set.
* 3) Verify that the signal is a member of the signal set.
*/
#include <stdio.... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/1-1.c | 1,092 | utf_8 | 7f101b45794aaf985c4c49a12a587a0d | /*
* source tree.
*
* Test that sigaddset() will add signo to the set signal set.
* Test steps:
* 1) Initialize an empty or full signal set.
* 2) Add the SIGALRM signal to the empty signal set.
* 3) Verify that SIGALRM is a member of the signal set.
*/
#include <stdio.h>
#include <signal.h>
#include "posixte... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigaddset/4-1.c | 1,380 | utf_8 | f22ef615f9a9c4bc47e79e9c61c171dc | /*
* source tree.
* Testing sending invalid signals to sigaddset().
* After invalid signal set, sigaddset() should return -1 and set
* errno to indicate the error.
* Test steps:
* 1) Initialize an empty signal set.
* 2) Add the invalid signal to the empty signal set.
* 3) Verify that -1 is returned, the inv... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-2.c | 3,695 | utf_8 | 38bd516f6bbb48b402071d0501309b48 | /*
*
* Testing (b)
*
* STEPS:
* 1. Create a thread
* 2. In the thread, push a cancelation handler
* 3. Main will cancel the thread before the thread exits
* 4. Verify that the cleanup handler was called
*/
#include <pthread.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include "posixtest.h"
#d... |
google | android | 1-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-3.c | 2,120 | utf_8 | 63193f9780ebd1fd31806e3e8f6eab4c | /*
*
* STEPS:
* 1. Create a thread
* 2. The thread will push a cleanup handler routine, then pop the cleanup handler routine.
* 3. Verify that the cleanup handler was called.
*
*/
#include <pthread.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include "posixtest.h"
#define CLEANUP_NOTCALLED 0
#de... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_push/1-1.c | 2,153 | utf_8 | 6b5acfbc6ee2527bc74d8943bf1a4a45 | /*
*
* Testing (a)
*
* STEPS:
* 1. Create a thread
* 2. The thread will push a cleanup handler routine and then exit befor the cleanup_pop
* routine is reached.
* 3. Verify that the cleanup handler was called.
*
*/
#include <pthread.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include "po... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/1-1.c | 5,024 | utf_8 | 1524fc6edb6453dc15d0043a19efeda3 | /*
* source tree.
* Test pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock)
*
* The function shall apply a write lock like the pthread_rwlock_wrlock(), with the exception
* that the function shall fail if any thread currently holds rwlock(for reading and writing).
*
* Steps:
* 1. Initialize a pthread_rwlock_t ... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlock_trywrlock/speculative/3-1.c | 1,389 | utf_8 | 33a626a6f31908c871cccf4e46283ed3 | /*
* source tree.
* Test pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock)
*
* It may fail if:
* [EINVAL] rwlock does not refer to an initialized read-write lock object
*
* Steps:
* 1. Call pthread_rwlock_trywrlock with an uninitialized rwlock object
* 2. Test for the return code. It may be EINVAL or 0.
*/
... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/2-1.c | 680 | utf_8 | 9cbf0b670f94e26c49b17f18691a3ee8 | /*
*
*
* Test that sched_yield() return 0 upon success.
*/
#include <sched.h>
#include <stdio.h>
#include "posixtest.h"
int main(void)
{
if (sched_yield() == 0) {
printf("Test PASSED\n");
return PTS_PASS;
}
printf("sched_yield() does not return 0.\n");
return PTS_FAIL;
} |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/1-1.c | 2,861 | utf_8 | bb28612953f7cd5561c40fad60240333 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author: Peter W. Morreale <pmorreale AT novell DOT com>
* Date: 11/08/2011
*/
#include "affinity.h"
#include <stdio.h>
#include <sys/wait.h>
#include <errno.h>
#include <string.h>
#include <signal.h>
#include <pthrea... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/3-1.c | 2,135 | utf_8 | 381cfb378010a6c5769ae602f63baf7a | /*
* source tree.
* Test pthread_spin_destroy(pthread_spinlock_t *lock) may fail if:
*
* [EBUSY] The implementation has detected an attempt to
* initialize or destroy a spin lock while it is in use
* (for example, while being used in a pthread_spin_lock()
* call) by another thread.
*
* Note: This test will alw... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_destroy/1-1.c | 1,714 | utf_8 | 35f6542f28c4bf486344c9a66d76bd26 | /*
* source tree.
*
* Test pthread_spin_destroy(pthread_spinlock_t * lock)
*
* pthread_spin_destroy() function shall destroy the spin lock
* referenced by lock and release any resources used by the lock.
*
* Steps:
* 1. Initialize a pthread_spinlock_t object 'spinlock' with
* pthread_spin_init()
* 2. M... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-2.c | 2,368 | utf_8 | c7b4b6cbc60caa8d6bb19c0c0bed3941 | /*
* source tree.
*
* void pthread_cleanup_pop(int execution);
*
* Shall remove the routine at the top of the calling thread's cancelation cleanup stack and
* optionally invoke it (if execute is non-zero).
*
* STEPS:
* 1. Create a thread
* 2. The thread will push a cleanup handler routine, then call pthread_... |
google | android | 1-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-3.c | 2,491 | utf_8 | 13784e010856d43c61433d661d0962ce | /*
* source tree.
*
* void pthread_cleanup_pop(int execution);
*
* Shall remove the routine at the top of the calling thread's cancelation cleanup stack and
* optionally invoke it (if execute is non-zero).
*
* STEPS:
* 1. Create a thread
* 2. The thread will push 3 cleanup handler routines, then it will call... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cleanup_pop/1-1.c | 2,365 | utf_8 | 90c0126dd0a217327c9ecd9e32a3daef | /*
* source tree.
*
* void pthread_cleanup_pop(int execution);
*
* Shall remove the routine at the top of the calling thread's cancelation cleanup stack and
* optionally invoke it (if execute is non-zero).
*
* STEPS:
* 1. Create a thread
* 2. The thread will push a cleanup handler routine, then call pthread_... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/2-1.c | 3,867 | utf_8 | f4a6f3bd24b5bbdf539f405fdce996bd | /*
* source tree.
*
* pthread_barrier_destroy()
*
* Attempt to destroy a barrier which has a waiter. The standard recommends
* that EBUSY is returned, but the required behaviour is undefined. At the
* time of writing, glibc blocks until there are no threads waiting on the
* barrier.
*
* Hypothetically, on som... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_destroy/1-1.c | 1,199 | utf_8 | e2908104a9bb5884d6cd08c86e2ca9ca | /*
* source tree.
*
* pthread_barrier_destroy()
*
*
* The pthread_barrier_destroy() function shall destroy the barrier
* referenced by barrier and release any resources used by the barrier.
*
* Steps:
* 1. Main initialize barrier with count 2
* 2. Main destroy the barrier
* 3. Repeat step 1,2 for N times
*... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setspecific/1-2.c | 2,996 | utf_8 | 701bfbc50567884cbc98a40f77f24f47 | /*
* source tree.
* Test that pthread_setspecific()
*
* shall acssociate a thread-specific value with a key obtained via a previouse call to
* pthread_key_create. Different threads may bind different values to the same key.
* Calling pthread_setspecific with a key value not obtiained from pthread_key_create of a... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setspecific/1-1.c | 1,988 | utf_8 | c238d7fc9191739e6a9edc2c3160ea51 | /*
* source tree.
* Test that pthread_setspecific()
*
* shall associate a thread-specific value with a key obtained via a previouse call to
* pthread_key_create. Different threads may bind different values to the same key.
* Calling pthread_setspecific with a key value not obtiained from pthread_key_create of af... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/2-1.c | 3,068 | utf_8 | ee9fa243872640676b1fc1e4cc01f17a | /*
* source tree.
* Test pthread_attr_setstacksize()
*
* Steps:
* 1. Initialize pthread_attr_t object (attr)
* 2. set stacksize to attr
* 3. create a thread with the attr
* 4. In the created thread, read stacksize
*/
/* For pthread_getattr_np(3) -- not a POSIX compliant API */
#ifndef _GNU_SOURCE
#define _... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/1-1.c | 2,298 | utf_8 | fc663bb17240020f7647bd01c31f2db3 | /*
* source tree.
* Test pthread_attr_setstacksizesize()
*
* Steps:
* 1. Initialize pthread_attr_t object (attr)
* 2. set stacksize to attr
* 3. create a thread with the attr
*/
#include <sys/param.h>
#include <errno.h>
#include <limits.h>
#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include ... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/4-1.c | 1,567 | utf_8 | 1bd2186734b49e6442567b1db3148573 | /*
* source tree.
* Test pthread_attr_setstacksize()
*
* Steps:
* 1. Initialize pthread_attr_t object (attr)
* 2. set the stacksize less tha PTHREAD_STACK_MIN
*/
#include <pthread.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/param.h>
#include <errno.h>
#includ... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/2-1.c | 5,158 | utf_8 | cb488c32b5d141ad038f7436deb77964 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author: Peter W. Morreale <pmorreale AT novell DOT com>
*
* Date: 20/05/2011
*/
#include "affinity.h"
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/1-2.c | 1,154 | utf_8 | 9942a032f565f703a00b6e0c73f288a6 | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author: Peter W. Morreale <pmorreale AT novell DOT com>
*
* Date: 20/05/2011
*/
#include "common.h"
int main(void)
{
int rc;
struct params p;
p.policy = SCHED_FIFO;
p.priority = PRIORITY_FIFO;
p.policy_label = "S... |
google | android | 5-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/5-1.c | 1,499 | utf_8 | 85878013b50eb271305228cb4ce60fd6 | /*
* source tree.
*
*
* Re-written by Peter W. Morreale <pmorreale AT novell DOT com>
* 24/05/2011
*
* Test pthread_attr_setschedpolicy()
*
* Steps:
* 1. Initialize a pthread_attr_t object using pthread_attr_init()
* 2. Test pthread_attr_setschedpolicy for all required supported policies
*
*/
#include <p... |
google | android | 1-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/1-3.c | 1,148 | utf_8 | ad9d9fae75d7a76294c81b4d3fb5603c | /*
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Author: Peter W. Morreale <pmorreale AT novell DOT com>
*
* Date: 20/05/2011
*/
#include "common.h"
int main(void)
{
int rc;
struct params p;
p.policy = SCHED_RR;
p.priority = PRIORITY_RR;
p.policy_label = "SCHED... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/1-1.c | 757 | utf_8 | 51f7b55a133f2c1983c084e15f60f55d | /*
* source tree.
* This test case initializes an attr and sets its schedpolicy,
* then create a thread with the attr.
*
* Complete rewrite by Peter W. Morreale <pmorreale AT novell DOT com>
* Date: 20/05/2011
*/
#include "common.h"
int main(void)
{
int rc;
struct params p;
p.policy = SCHED_OTHER;
p.priority... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setschedpolicy/4-1.c | 1,202 | utf_8 | 6333de442ee3071b64c0ab21d4378cc6 | /*
* source tree.
*
* Test pthread_attr_setschedpolicy()
*
* Fix coding style: Peter W. Morreale <pmorreale AT novell DOT com>
*
* Steps:
* 1. Initialize a pthread_attr_t object using pthread_attr_init()
* 2. Call pthread_attr_setschedpolicy with invalid policy
*
*/
#include <pthread.h>
#include <stdio.h>... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/3-1.c | 2,145 | utf_8 | d1c3beaf42507e8cb76052d5e41309bb | /*
* source tree.
Assumption: The test assumes that this program is run under normal conditions,
and not when the processor and other resources are too stressed.
This program checks to see that sigsuspend does not return when sent a signal
whose action is to terminate the process.
Steps:
1. Fork() a child.
2. H... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/1-1.c | 4,674 | utf_8 | 6e64fb0f8154c6796c3a0d7b008d596d | /*
* source tree.
Assumption: The test assumes that this program is run under normal conditions,
and not when the processor and other resources are too stressed.
This program tries to verify two things:
1. sigsuspend() replaces the original signal mask (containing SIGUSR1)
with the new signal mask (containing ... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/4-1.c | 3,692 | utf_8 | cb8b5b057bbca1e783b3278ff3670706 | /*
* source tree.
Assumption: The test assumes that this program is run under normal conditions,
and not when the processor and other resources are too stressed.
Steps:
1. Fork() a child process. In the child, add SIGUSR1 to the process's signal mask.
This is its original signal mask. Now suspend the child, pa... |
google | android | 6-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigsuspend/6-1.c | 2,190 | utf_8 | 883da6b203fe82ac963bbc13748a5081 | /*
* source tree.
Assumption: The test assumes that this program is run under normal conditions,
and not when the processor and other resources are too stressed.
Steps:
1. Fork() a child process. Have the child suspend itself.
2. From the parent, send the child a SIGUSR1 signal so that the child returns from
... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getscope/1-1.c | 2,103 | utf_8 | 96203e3cc13fd5f2675c0301c8d449e1 | /*
* source tree.
* Test pthread_attr_getscope()
*
* Steps:
* 1. Initialize a pthread_attr_t object using pthread_attr_init()
* 2. Call pthread_attr_setscope with contentionscope parameter
* 3. Call pthread_attr_getscope to get the contentionscope
* NOTE: The contension scope value is a may requirement.
*
... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_getschedparam/1-1.c | 2,682 | utf_8 | 4f92e0691bffef05bced0734b1bd278d | /*
* source tree.
* Test pthread_attr_getschedparam()
*
* Steps:
* 1. Initialize a pthread_attr_t object using pthread_attr_init()
* 2. Call pthread_attr_setschedpolicy with policy parameter
* 3. Call pthread_attr_setschedparam with a sched param parameter
* 4. Call pthread_attr_getschedparam to get the sch... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-1.c | 1,356 | utf_8 | ed2adc0b3f01865dad4de225e8e58a27 | /*
* source tree.
*
* Test that timer_gettime() sets itimerspec.it_value = 0 if the timer
* was previously disarmed because it had just been created.
*
* For this test, signal SIGCONT will be used so that the test will
* not abort. Clock CLOCK_REALTIME will be used.
*/
#include <time.h>
#include <signal.h>
#in... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-2.c | 2,262 | utf_8 | c52db42dc6dc876eb14216d8a14a926a | /*
* source tree.
* Test that timer_gettime() sets sets itimerspec.it_value to the
* amount of time remaining in the middle of a timer.
* - Create and arm a timer for TIMERSEC seconds.
* - Sleep for SLEEPSEC < TIMERSEC.
* - Call timer_gettime().
* - Ensure the value returned is within ACCEPTABLEDELTA less than
... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/3-1.c | 2,292 | utf_8 | c39b1db29baaa60340a3ab95e172d62c | /*
* source tree.
* Test that timer_gettime() returns a relative amount even on
* absolute timers.
* - Create and arm an absolute timer.
* - Call timer_gettime()
* - Ensure the value returned is within ACCEPTABLEDELTA less than
* the TIMERSEC. If it is, the values returned were indeed relative.
*
* Signal S... |
google | android | 1-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-3.c | 2,291 | utf_8 | c3a393efc7efffbf5b4e9a1fb17105e3 | /*
* source tree.
* Test that timer_gettime() sets sets itimerspec.it_value to the
* amount of time remaining in the middle of a timer.
* - Create and arm a timer for TIMERNSEC nanoseconds.
* - Sleep for SLEEPNSEC < TIMERNSEC.
* - Call timer_gettime().
* - Ensure the value returned is within ACCEPTABLEDELTA less... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-1.c | 2,018 | utf_8 | a5fe7487a7d7127f39aed977665544e3 | /*
* source tree.
* Test that timer_gettime() sets sets itimerspec.it_value to the
* amount of time remaining.
* - Create and arm a timer.
* - Call timer_gettime().
* - Ensure the value returned is within ACCEPTABLEDELTA less than
* the value set.
*
* Signal SIGCONT will be used so that it will not affect th... |
google | android | 1-4 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/1-4.c | 3,257 | utf_8 | 2b5875ba7dc18d6dd86e631afaeaa418 | /*
* source tree.
* Test that timer_gettime() sets itimerspec.it_value to the amount of
* time remaining after it has expired once and is reloaded. Also
* test that timer_gettime() sets itimerspec.it_interval to the
* interval remaining.
* - Create and arm a timer for TIMERVALSEC seconds with interval
* TIMER... |
google | android | 2-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/2-2.c | 1,789 | utf_8 | 398403b8b8703ceffc408c9e2878a053 | /*
* source tree.
*
* Test that timer_gettime() sets itimerspec.it_value = 0 if
* the timer was previously disarmed because it had just expired with
* no repeating interval.
*
* For this test, signal SIGCONT will be used so that the test will
* not abort. Clock CLOCK_REALTIME will be used.
*/
#include <time.h... |
google | android | 6-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-3.c | 1,340 | utf_8 | 43785e13967816e57f746ba80cb0c12c | /*
* source tree.
*
* Test to see if timer_gettime() sets errno = EINVAL when timerid =
* a timer ID of a deleted timer. Since this assertion is a "may"
* assertion, either way is a pass.
*
* For this test, signal SIGCONT will be used.
* Clock CLOCK_REALTIME will be used.
*/
#include <time.h>
#include <signal... |
google | android | 6-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-2.c | 1,275 | utf_8 | f555280db7d836cbf6068bb055a71955 | /*
* source tree.
*
* Test to see if timer_gettime() sets errno = EINVAL timerid != a timer ID
* created via timer_create(). [Try to set timerid to a timer ID
* created + 1.] Since this assertion is a "may," either way is a pass.
*
* For this test, signal SIGCONT will be used, clock CLOCK_REALTIME
* will be u... |
google | android | 6-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_gettime/speculative/6-1.c | 989 | utf_8 | 3698a82fb812689fd32a6599f7e4b5a3 | /*
* source tree.
*
* Test to see if timer_gettime() sets errno = EINVAL if no timers have been
* created yet and it is called with a bogus timer ID. Since this is a "may"
* assertion, either way is pass.
*/
#include <time.h>
#include <stdio.h>
#include <errno.h>
#include "posixtest.h"
#define BOGUSTID 9999
int ... |
google | android | 6-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/6-3.c | 6,016 | utf_8 | 2a394e827bfc9898c430735913f48ab7 | /*
* 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_join
* -> check that EINTR is never returned
*/
#include <pthread.h>
#include <stdarg.h>
#include ... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/2-1.c | 2,213 | utf_8 | 27903ae77b8424590ed9ea6f9e5e89b3 | /*
* source tree.
*
* Test that pthread_join()
*
* On return from a successful pthread_join() call with a non-NULL 'value_ptr'
* argument, the avlue passed to pthread_exit() by the terminating thread shall
* be made available in the location referenced by 'value_ptr'.
*
* Steps:
* 1. Create a new thread. Ha... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/1-2.c | 3,969 | utf_8 | e2bc15bc2cb3359870737ee2a7894b85 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This sample test aims to check the following assertion:
*
* pthread_join() returns only when the joined thread has terminated.
*
* The steps are:
* -> create a thread
* -> the thread yields then read clock and exit
* -> check the read clock value is b... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/3-1.c | 2,870 | utf_8 | 4a72bbc5c6f8c3416ccbbf4cdebd298c | /*
* source tree.
*
* Test that pthread_join()
*
* When pthread_join() returns successfully, the target thread has been
* terminated.
*
* Steps:
* 1. Create a new thread.
* 2. Send a cancel request to it from main, then use pthread_join to
* wait for it to end.
* 3. The thread will sleep for 3 second... |
google | android | 5-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/5-1.c | 1,154 | utf_8 | 2b1aae674b50bab8616f94c96ee99131 | /*
* source tree.
*
* Test that pthread_join()
*
* Upon successful completion, it returns 0;
*
* Steps:
* 1. Create a new thread.
* 2. Join that thread to main. If the return code is not 0,
* or the other valid error codes of EINVAL, ESRCH or EDEADLK,
* then the test fails.
*/
#include <pthread.h... |
google | android | 6-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/6-2.c | 1,762 | utf_8 | 7da1c8935e7b546653158fc70bd15be2 | /*
* source tree.
*
* Test that pthread_join()
*
* pthread_join() SHALL fail if:
*
* -[ESRCH] No thread could be found corresponding to that thread ID
*
* pthread_join() MAY fail if:
*
* -[EINVAL] The implementation has detected that the value specified by
* 'thread' does not refer to a joinable thread.
*... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/1-1.c | 1,638 | utf_8 | 2de49e6f393fd84ac76dce96f80ce481 | /*
* source tree.
*
* Test that pthread_join()
*
* shall suspend the execution of the calling thread until the target
* 'thread' terminates, unless 'thread' has already terminated.
*
* Steps:
* 1. Create a new thread. Have it sleep for 3 seconds.
* 2. The main() thread should wait for the new thread to fin... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/4-1.c | 4,484 | utf_8 | a78bd92e882ef74951c1ae561c3b773c | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This sample test aims to check the following assertion:
*
* If the thread calling pthread_join is canceled, the joined thread
* remains joinable.
*
* The steps are:
* -> create a thread blocked on a mutex.
* -> create another thread which tries and jo... |
google | android | 6-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_join/speculative/6-1.c | 1,651 | utf_8 | a36778ba77723e2d96960828c4c4c7b0 | /*
* source tree.
*
* Test that pthread_join()
*
* pthread_join() SHALL fail if:
*
* -[ESRCH] No thread could be found corresponding to that thread ID
*
* pthread_join() MAY fail if:
*
* -[EINVAL] The implementation has detected that the value specified by
* 'thread' does not refer to a joinable thread.
*... |
google | android | 4-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/4-2.c | 3,332 | utf_8 | 076c03146e471aab46b0ceb88e11ec41 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* sem_unlink will return -1 and set errno to ENOENT when the named semaphore
* does not exist.
* The steps are:
* -> Unlink once to make sure this name does not exist. Ignore the error.
* -> Unl... |
google | android | 7-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/7-1.c | 4,251 | utf_8 | bd37a7e0bfcb32a2620a33961ed3bce7 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* sem_unlink does not block.
* The steps are:
* -> open a semaphore
* -> create a thread which blocks on the semaphore
* -> call sem_unlink
* -> clean up
* The test fails when it hangs on sem_un... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/2-1.c | 1,227 | utf_8 | 136e2489e61da8398862b22b9f4342c9 | /*
source tree.
*/
/*
* this test case verifies that the named semaphore has been removed after
* calling sem_unlink.
*/
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <semaphore.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "posixtest.h"
#define TEST "2-1"
#define FUNCTION "sem_unlin... |
google | android | 9-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/9-1.c | 4,724 | utf_8 | 3ebf2c9e809088cfc3b228cf67460e7d | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* When the semaphore is referenced by other processes, the function has
* no effect on the state of the semaphore.
* The steps are:
* -> Create a named semaphore
* -> create a thread which waits... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/3-1.c | 5,672 | utf_8 | a900f0ae8f9eb9e5c5f06b5496ce0a52 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* sem_unlink will return -1 and set errno to EACCESS if the process has not
* priviledge to unlink the sem.
* The steps are:
* -> open a semaphore with 0744 mask
* -> fork
* -> change child uid
... |
google | android | 5-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/5-1.c | 5,720 | utf_8 | 7f8d2dbc984445dc990d8872aea9ceeb | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* sem_unlink will return -1 and set errno to ENAMETOOLONG when the semaphore
* name length is greater than PATH_MAX or a component length is greater than
* NAME_MAX.
* The steps are:
* -> If PAT... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/1-1.c | 1,141 | utf_8 | e502bf06746b7e068751134e7eb8096b | /*
source tree.
*/
/*
* sem_wait shall lock the unlocked semaphore and decrement the semaphore
* value by one.
*/
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <semaphore.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "posixtest.h"
#define TEST "1-1"
#define FUNCTION "sem_unlink"
#def... |
google | android | 2-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/2-2.c | 6,034 | utf_8 | c937005514f0f6ee5904786e711b5186 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* Destruction of the semaphore is postponed until all processes which were using
* the semaphore have called sem_close, _exit or exec.
* The steps are:
* -> Create a named semaphore with value =... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/4-1.c | 845 | utf_8 | 0f99b28ae0b2aa06dbe7b952fac227aa | /*
source tree.
*/
/*
* Trying to unlink a semaphore which it doesn't exist. It give an ERROR:
* ENOENT.
*/
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <semaphore.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "posixtest.h"
#define TEST "4-1"
#define FUNCTION "sem_unlink"
#define E... |
google | android | 6-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/6-1.c | 4,840 | utf_8 | fae948a6783587cfbea353b315e64488 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* A call to sem_open with the same name refers to a new semaphore, once
* sem_unlink has been called.
* The steps are:
* -> open a semaphore
* -> unlink
* -> try to reconnect (should fail)
* -> ... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/killpg/2-1.c | 664 | utf_8 | 1340f9d8351b010c3286e2599ff25069 | /*
* source tree.
Call killpg on the current process with 0 as the signal number. If killpg
returns success, then we pass.
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "posixtest.h"
int main(void)
{
if (killpg(getpgrp(), 0) != 0) {
printf("Could not call killpg with ... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/killpg/1-2.c | 2,290 | utf_8 | 7565e4f9f500fb31f9d69a4d571b6082 | /*
* source tree.
* Steps:
* 1) Fork a child process.
* 2) In the parent process, call killpg with signal SIGTOTEST for the
* process group id of the child. Have the parent ignore such a signal
* incase the process group id of the parent is the same as process
* group id of the child.
* In the ... |
google | android | 5-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/killpg/5-1.c | 824 | utf_8 | a276780e334956bc29170933b09c7aba | /*
* source tree.
* Test that the killpg() function shall return -1 on failure.
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include "posixtest.h"
int main(void)
{
int pgrp;
if ((pgrp = getpgrp()) == -1) {
printf("Could not get process group number\n");
... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/killpg/1-1.c | 1,526 | utf_8 | 6b42974f8599328b8eec4570e58d1a22 | /*
* source tree.
* Test that the killpg() function shall send signal sig to the process
group specified by prgp.
Steps:
* 1. Set up a signal handler for the signal that says we have caught the
* signal.
* 2. Call killpg on the current process group id, raising the signal.
* 3. If signal handler w... |
google | android | 8-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/killpg/8-1.c | 898 | utf_8 | 4b568e7c9b65399c805c3e2a6489cc1b | /*
* source tree.
* Test that the killpg() function shall set errno to ESRCH if it is
passed an invalid process group number
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include "posixtest.h"
int main(void)
{
if (killpg(999999, 0) != -1) {
printf
... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/killpg/4-1.c | 746 | utf_8 | defbb15c43a7992b50435818e6ba5cef | /*
* source tree.
* Test that the killpg() function shall return 0 upon success.
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "posixtest.h"
int main(void)
{
int pgrp;
if ((pgrp = getpgrp()) == -1) {
printf("Could not get process group number\n");
return PTS_UNRESO... |
google | android | 6-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/killpg/6-1.c | 1,014 | utf_8 | 24e1a50a6e8e6f253184b2e2aff09a05 | /*
* source tree.
* Test that the killpg() function shall set errno to EINVAL if it is
passed an invalid signal number
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include "posixtest.h"
int main(void)
{
int pgrp;
if ((pgrp = getpgrp()) == -1) {
printf... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/2-1.c | 3,009 | utf_8 | 16c7d8d15c00cff623ec17e6a8206711 | /*
* source tree.
* Test pthread_cancelstate
* It will have no affect on the calling thread if cancelability is disabled.
*
* STEPS:
* 1. Create a thread.
* 2. In the thread function, set the state to
* PTHREAD_CANCEL_DISABLE and the cancel_flag to -1.
* 3. Send out a thread cancel request to the new thread... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/1-1.c | 4,533 | utf_8 | 04748e55c94edac5263418c8ece19630 | /*
* source tree.
* Test pthread_testcancel
* Atomically sets the cancelability type to 'type' and returns the old
* cancelability type in the location referenced by 'oldtype'.
* 'state' can either be PTHREAD_CANCEL_DEFERRED, or PTHREAD_CANCEL_ASYNCHRONOUS.
*
* Test when a thread is PTHREAD_CANCEL_DEFERRED
*
*... |
google | android | 9-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/9-2.c | 2,204 | utf_8 | c661944a89ae61ff48e1c49b5b540951 | /*
* source tree.
*/
/*
* assertion:
*
* aio_write() shall fail or the error status of the operation shall be [EINVAL] if:
* aio_offset would be invalid, or aio_reqprio is not a valid value, or
* aio_nbytes is an invalid value.
*
* Testing invalid reqprio
*
* method:
*
* - setup an aiocb with an invalid ai... |
google | android | 7-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/7-1.c | 2,286 | utf_8 | d7c3b6381b2c8bb37f5d5fb44014806b | /*
* source tree.
*/
/*
* assertion:
*
* aio_write() shall fail with [EAGAIN] if:
* The requested AIO operation was not queued to the system
* due to system resource limitations.
*
* method:
*
* - open file
* - queue NUM_AIOCBS 512-byte aio_write
* - wait until one returns EAGAIN
*
* NUM_AIOCBS might nee... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/2-1.c | 3,181 | utf_8 | 38972e32943bc49293c1c3997efa7100 | /*
* source tree.
*/
/*
* assertion:
*
* If O_APPEND is set for the file descripton, write operations append to
* the file in the same order as the calls were made.
*
* method:
*
* - open file in append mode
* - call aio_write thrice with different buffers and sizes
* - read all file
* - check read data
*... |
google | android | 9-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/9-1.c | 2,201 | utf_8 | 561eec02add6d6c613501dc9cbeef0af | /*
* source tree.
*/
/*
* assertion:
*
* aio_write() shall fail or the error status of the operation shall be [EINVAL] if:
* aio_offset would be invalid, or aio_reqprio is not a valid value, or
* aio_nbytes is an invalid value.
*
* Testing invalid offset
*
* method:
*
* - setup an aiocb with an invalid aio... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/1-2.c | 3,185 | utf_8 | 955bca4a590c85871a510d60511d1de3 | /*
* source tree.
*/
/*
* assertion:
*
* The aio_write() function shall write aio_nbytes to the files associated
* with aio_fildes from the buffer pointer to by aio_buf.
*
* method:
*
* - open file
* - write 2*1024 0x00 bytes using synchronous write
* - write 1024 0xaa bytes at offset 512 using aio_write
*... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/3-1.c | 2,424 | utf_8 | 77fb85b3529d05565a80f0ea325495d0 | /*
* source tree.
*/
/*
* assertion:
*
* aio_lio_opcode shall be ignored.
*
* method:
*
* - open file
* - fill in an aiocb with an LIO_READ aio_lio_opcode
* - call aio_write with this aiocb
* - read all file
* - check read data
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <... |
google | android | 5-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/5-1.c | 1,946 | utf_8 | 3984983381d47e626cfb86c6b4ed0053 | /*
* source tree.
*/
/*
* assertion:
*
* The aio_write() function shall return the value zero if operation is
* successfuly queued.
*
* method:
*
* - open file
* - write 512 bytes using aio_write
* - check return code
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/1-1.c | 2,692 | utf_8 | a0143caa9305f40fd5944dc57005fcb5 | /*
* source tree.
*/
/*
* assertion:
*
* The aio_write() function shall write aio_nbytes to the files associated
* with aio_fildes from the buffer pointer to by aio_buf.
*
* method:
*
* - open file
* - write 512 bytes using aio_write
* - read 513 bytes
* - check read data
*
*/
#include <stdio.h>
#include... |
google | android | 8-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-2.c | 2,040 | utf_8 | 2a48bed06a5f5dd6072ddb5b9101d5e1 | /*
* source tree.
*/
/*
* assertion:
*
* aio_write() shall fail or the error status of the operation shall be [EBADF] if:
* aio_fildes argument is not a valid file descriptor open for writing.
*
* method: Test with an invalid file descriptor opened read-only
*
* - setup an aiocb with an read-only aio_fildes
... |
google | android | 8-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/8-1.c | 1,690 | utf_8 | 345ad245ee0fb502d555ba27f0524d76 | /*
* source tree.
*/
/*
* assertion:
*
* aio_write() shall fail or the error status of the operation shall be [EBADF] if:
* aio_fildes argument is not a valid file descriptor open for writing.
*
* method: Test with an invalid file descriptor (-1)
*
* - setup an aiocb with an invalid aio_fildes
* - call aio_w... |
google | android | 6-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_write/6-1.c | 1,309 | utf_8 | ade6300e908d5a339a58005a2a564286 | /*
* source tree.
*/
/*
* assertion:
*
* The aio_write() function shall return the value -1 and set errno to
indicate error if the operation is not succesfully queued.
*
* method:
*
* - if Prioritized Input and Output option is supported, fill in an
* aiocb with invalid aio_reqprio
* - call aio_write
* -... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.