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 | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigdelset/4-1.c | 1,483 | utf_8 | 48ac35c98332235b9e137e3d756e9359 | /*
* source tree.
*
* Testing sending invalid signals to sigdelset().
* After invalid signal sent, sigdelset() should return -1 and set
* errno to indicate the error.
* Test steps:
* 1) Initialize a full signal set.
* 2) Remove the invalid signal from the full signal set.
* 3) Verify that -1 is returned, th... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-1.c | 2,350 | utf_8 | 4524b6c6a20c2312e66f65a6fff63078 | /*
* source tree.
*
* Test that timer_getoverrun() returns the number of overruns that
* have happened due to signals being sent from a timer.
*
* Steps (testing with just one overrun):
* - Block signal SIGCONT (SIGCONT used so test will not terminate)
* - Set up a timer to send SIGCONT on expiration with an in... |
google | android | 2-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-3.c | 4,929 | utf_8 | 7413d5602d7649c61ba07c4d0037a199 | /*
* source tree.
*
* Test that timer_getoverrun() returns the number of overruns that
* have happened due to signals being sent from a timer. Test with
* timer seconds in smallest possible increments.
*
* valuensec = clock resolution
* intervalnsec = 2*valuensec
* expectedoverruns = (1,000,000,000 - valuense... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/1-1.c | 2,805 | utf_8 | 18e018f86aa2ff3c3c17787c6dd39749 | /*
* source tree.
*
* Test that only a single timer expiration signal can be sent to
* the process at a time.
*
* - Block signal SIGTOTEST.
* - Set up a repeating timer to expire with signal SIGTOTEST.
* - Sleep for enough time for > 2 signals to be sent.
* - After the signals are unblocked, ensure only one si... |
google | android | 2-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/2-2.c | 2,927 | utf_8 | dfb3e05a06553df34472ae8aa3101692 | /*
* source tree.
*
* Test that timer_getoverrun() returns the number of overruns that
* have happened due to signals being sent from a timer. Test with
* timer seconds in nanoseconds.
*
* INTERVALNSEC = clock resolution
*
* Steps (testing with just one overrun):
* - Block signal SIGCONT (SIGCONT used so tes... |
google | android | 6-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-3.c | 1,286 | utf_8 | d9278774da87b6abcf018c73747cb1d5 | /*
* source tree.
*
* Test to see if timer_getoverrun() sets errno = EINVAL for 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 option is a pass.
*
* For this test, signal SIGCONT will be used, clock CLOCK_REALTIM... |
google | android | 6-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-2.c | 1,442 | utf_8 | d5e5078d50ed8fe6f62985e154b4b5c0 | /*
* source tree.
*
* Test to see if timer_getoverrun() returns -1 and sets errno==EINVAL when
* trying to call timer_getoverrun on a timer that has been deleted or not.
* Since this assertion is a "may," either option is a pass.
*
* For this test, signal SIGCONT will be used, clock CLOCK_REALTIME
* will be use... |
google | android | 6-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_getoverrun/speculative/6-1.c | 935 | utf_8 | f0132b258c1b8bc6eb224d3fb3503f81 | /*
* source tree.
*
* Test to see if timer_getoverrun() sets errno=EINVAL if no timers have been
* created yet or not. Since this is a "may" assertion, either way is
* a pass.
*/
#include <time.h>
#include <stdio.h>
#include <errno.h>
#include "posixtest.h"
#define BOGUSTID 9999
int main(void)
{
timer_t tid;
i... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_post/2-1.c | 1,280 | utf_8 | 6dd2268cbab748e47a1db546f2b01988 | /*
source tree.
*/
/*
* This test case verifies the semaphore value is 0, then shows a successful
* call to release the unlock from mysemp.
*/
#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"
#defi... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_post/1-2.c | 1,409 | utf_8 | 2858ea4d4ac1ac2a49d5a342f24546f6 | /*
source tree.
*/
/*
* sem_post shall increment the value of the semaphore when its unlocked
* and in positive value
*/
#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-2"
#define FUNCTION "sem_post"... |
google | android | 5-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_post/5-1.c | 2,024 | utf_8 | 6241bf9b9b0187b23d5f26a03927bfb1 | /*
* source tree.
*/
/*
* sem_post() can be entered into again if interrupted by a signal
* --> This is tough to do with 100% guarantees. This test does a
* best attempt.
*
* 1) Set up a signal catching function for SIGALRM.
* 2) Set up a semaphore
* 3) Call sleep(1) and then alarm(1)
* 4) Call sempost() imm... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_post/1-1.c | 1,395 | utf_8 | 4932bcf4fc27115d3123f5c66a09bf6c | /*
source tree.
*/
/*
* sem_post shall unlock the locked semaphore and increment 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_post"
#defin... |
google | android | 8-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_post/8-1.c | 6,067 | utf_8 | 57ce8bf5422a9f88d4f005bff231a8ea | /*
*/
/*
* If the Process Scheduling option is supported, the thread to be unblocked
* shall be chosen in a manner appropriate to the scheduling policies
* and parameters in effect for the blocked threads.
* In the case of the schedulers SCHED_FIFO and SCHED_RR, the highest
* priority waiting thread shall be unbl... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_post/4-1.c | 1,133 | utf_8 | e78e98d5e9bdbebe1a34b336224ae69e | /*
source tree.
*/
/*
* This test case verifies the sem_post returns 0 on successful call.
*/
#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_post"
#define ERROR_PREFIX "unexp... |
google | android | 6-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_post/6-1.c | 2,162 | utf_8 | 142a6f4fa93305c21cdbf68b8f804156 | /*
*
* source tree.
*/
/*
* sem_post() can be called from within a signal catching function
*
* 1) Set up a signal catching function for SIGALRM.
* 2) Set up a semaphore
* 3) Call alarm(1)
* 4) Call sempost() from within the handler for SIGALRM
* 5) If sempost() succeeds (verified if val is incremented by 1),... |
google | android | 7-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/7-1.c | 2,251 | utf_8 | f5ebcda37fd09537a7766768772c6f27 | /*
* source tree.
* pt:MON
*
* Test that CLOCK_MONOTONIC is supported by timer_create().
*
* Same test as 1-1.c with CLOCK_MONOTONIC.
*/
#include <time.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include "posixtest.h"
#define SIGTOTEST SIGALRM
#define TIMERSEC 2
#define SLE... |
google | android | 9-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/9-1.c | 1,887 | utf_8 | 5e750b4d551f88b98653a66057362190 | /*
* source tree.
* Test that timers are disarmed and deleted by an exec.
*
* Steps:
* 1. Set up a timer
* 2. Call execl to sleep for a few seconds
* 3. If timer does not interrupt the execl, it will return success.
* If it does interrupt, or if execl fails, return failure.
*
* For this test, signal SI... |
google | android | 11-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/11-1.c | 2,474 | utf_8 | 2ac7e8894a63fd6cf91c31b13ab3bfe1 | /*
* source tree.
* adam li
*
* Test that CLOCK_THREAD_CPUTIME_ID is supported by timer_create().
*
* Same test as 1-1.c.
*/
#include <time.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include "posixtest.h"
#define SIGTOTEST SIGALRM
#define TIMERSEC 2
#define ACCEPTABLEDELTA... |
google | android | 16-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/16-1.c | 953 | utf_8 | 8f039297afacfa58523b0cbad7766c68 | /*
* source tree.
* Test that timer_create() sets errno to EINVAL if clock_id is not
* a defined clock ID.
*/
#include <time.h>
#include <signal.h>
#include <stdio.h>
#include <errno.h>
#include "posixtest.h"
#define INVALIDCLOCKID 99999
int main(void)
{
struct sigevent ev;
timer_t tid;
ev.sigev_notify = SIGEV_S... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/3-1.c | 1,482 | utf_8 | 93614b3111b87726851ba8d6d4469d9b | /*
* source tree.
* Test that a timer is in the disarmed state when it is first created.
*
* Test by creating a timer, sleeping for SLEEPTIME, and ensuring
* the sleep was not interrupted.
*
* For this test, CLOCK_REALTIME will be used. Signal SIGTOTEST will be
* used.
*/
#include <time.h>
#include <signal.h>... |
google | android | 10-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/10-1.c | 2,449 | utf_8 | 06d5914d15a449abc59027ab4b8049b2 | /*
* source tree.
* adam li
*
* Test that CLOCK_PROCESS_CPUTIME_ID is supported by timer_create().
*
* Same test as 1-1.c.
*/
#include <time.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include "posixtest.h"
#define SIGTOTEST SIGALRM
#define TIMERSEC 2
#define ACCEPTABLEDELT... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/1-1.c | 2,507 | utf_8 | 15f0616b48bbe254e028f1d905e93d4a | /*
* source tree.
* Test that timer_create() creates a timer.
* Steps:
* 1. Set up sigevent structure to send signal SIGTOTEST on timer
* expiration.
* 2. Set up sigaction structure to catch signal SIGTOTEST on timer
* expiration
* 3. Create timer using timer_create().
* 4. Activate timer using tim... |
google | android | 8-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/8-1.c | 3,872 | utf_8 | d287d1945e942669eecb2cedc9d8969d | /*
* source tree.
* Test that timers are not inherited across a fork().
* Steps:
* 1. Set up a signal handler for timer in parent.
* 2. Create timer using timer_create().
* 3. Activate timer using timer_settime().
* 4. Immediately fork a new process [Note: There is some risk here if
* the system does no... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/2-1.c | 1,682 | utf_8 | 021f94390e703ae5c8deea7a4d65ff78 | /*
* source tree.
* Test that timer_create() returns a unique timer ID for the current
* process.
* For this test, signal SIGALRM will be used, clock CLOCK_REALTIME
* will be used.
*/
#include <errno.h>
#include <time.h>
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sear... |
google | android | 5-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/5-1.c | 2,823 | utf_8 | 65d212db5cab45b2ce69a98d0f8ded7c | /*
* source tree.
* Test that the following scenarios are identical:
* evp == NULL
* and
* evp.sigev_notify=SIGEV_SIGNAL
* evp.sigev_signo="default signal" (assumed to be SIGALRM in speculative)
* evp.sigev_value=timerid
*
* This is a speculative test because it is speculating on the value
* of the default si... |
google | android | 15-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_create/speculative/15-1.c | 1,575 | utf_8 | 6e7df1484fa8e023adc2da67d167f50a | /*
* source tree.
* Test that timer_create() sets errno to EAGAIN if the system doesn't
* have enough queuing resources to honor this request or the creation
* of the timer would exceed the allowable timers that the calling process
* can create.
*
* Finding the true limits of the system would be a stress test, s... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigismember/3-1.c | 805 | utf_8 | b126a8cc9e4fa9cdc559135ade4bcfc8 | /*
* source tree.
*
* Tests assertion 3 by filling a signal set and arbitrarily querying
* it for a SIGABRT function. Sigmember should return a 1.
*/
#include <stdio.h>
#include <signal.h>
#include "posixtest.h"
int main(void)
{
sigset_t signalset;
if (sigfillset(&signalset) == -1) {
perror("sigfillset failed ... |
google | android | 5-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigismember/5-1.c | 1,416 | utf_8 | ac41c565d92eadfd482745e29997477d | /*
* source tree.
*
* Testing invalid signals with sigismember().
* After invalid signal set sigismember() should return -1 and set
* errno to indicate the error.
* Test steps:
* 1) Initialize a full signal set.
* 2) Check for invalid signal from the full signal set.
* 3) Verify that -1 is returned and errn... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sigismember/4-1.c | 836 | utf_8 | 24b8823ff45eb3548d9746b0eb0e3ed3 | /*
* source tree.
*
* Tests assertion 4 by emptying a signal set and querying it for
* a SIGABRT function. Sigmember should return a 0 indicating that
* the signal is not a member of the set.
*/
#include <stdio.h>
#include <signal.h>
#include "posixtest.h"
int main(void)
{
sigset_t signalset;
if (sigemptyset(&s... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/strlen/1-1.c | 1,577 | utf_8 | f24b2a51c407ec33c214dae3b740e010 | /*
* source tree.
*/
/*
* assertion:
* The function will compute the number of bytes in the string to which s points,
* not including the terminating NUL character. and will return the length of s.
*
* method:
* -Generate sample string s1 of variable lengths in a loop.
* -Use strlen() for generated strings and... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/localtime/1-1.c | 811 | utf_8 | 7a8186b62c35231b649aa5607d5d486d | /*
* source tree.
*
*
* This test shall return a pointer to the tm structure when converting
* a time value to a broken down local time.
*/
#include <stdio.h>
#include <time.h>
#include "posixtest.h"
int main(void)
{
time_t current_time;
struct tm *timeptr;
current_time = time(NULL);
timeptr = NULL;
timeptr ... |
google | android | 3-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/3-3.c | 7,248 | utf_8 | 8fd8122aa90783c7a88f0460b425e024 | /*
* 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_atfork
* -> check that EINTR is never returned
*/
/***************************************************... |
google | android | 3-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/3-2.c | 5,202 | utf_8 | 8536108fc39c741948b8bccdcf5e9021 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* If there is not enough memory to store handler adresses,
* the function returns ENOMEM.
* The steps are:
* -> Register up to 10000 handlers.
* -> In case of failure, check the error code is ENO... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/2-1.c | 1,477 | utf_8 | 0dc3b68b40963452721e3a5836652fd7 | /*
* source tree.
*
* int pthread_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void))
*
* If no handling is desired at one or more of these three points, the corresponding fork
* handler address(es) may be set to NULL.
*
* STEPS:
* 1. Call pthread_atfork() with all NULL parameters
* 2.... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/1-2.c | 5,743 | utf_8 | 22fe902f67c5a9311eaa23268780b9e5 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertions:
*
* pthread_atfork registers the 'prepare' handler to be called before fork()
* processing in the context of the fork() calling thread.
*
* pthread_atfork registers the 'parent' handler to be call... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/1-1.c | 2,632 | utf_8 | 361aedb6c8625868baf021cb6d065f4b | /*
* source tree.
*
* int pthread_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void))
*
* shall declare fork handlers to be called before and after a fork() command, in the context
* of the thread that called the fork(). The 'prepare' fork handler shall be called before
* fork() proce... |
google | android | 2-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/2-2.c | 6,432 | utf_8 | a0b6e63541aa990f9666acf363e349d7 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* NULL can be passed as any of these handlers when no treatment is required.
* The steps are:
* -> Create a new thread
* -> Try all NULL / non NULL combinations (7) of pthread_atfork parameters.
... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_atfork/4-1.c | 5,728 | utf_8 | cccffb3198e1a9194d5a0da9596d9f23 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* When pthread_atfork is called several times, the prepare handlers are executed
* in reversed order as they were registered, and child and parent handlers are
* executed in the same order as the... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/kill/2-1.c | 816 | utf_8 | 858fd03c524c6b3e0f605a2f6e3a2174 | #include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "posixtest.h"
/*
* source tree.
* Test that if the signal is the null signal (0), no signal is sent.
* 1) Call kill on the current process with the null signal.
* 2) If process is still functional after kill() is called, cons... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/kill/1-2.c | 2,660 | utf_8 | ac45a908100325ab6bac67f6aef2453e | /*
* source tree.
* Test that the kill() function shall send signal sig to the process
* specified by pid when the process specified by pid is not the calling
* process.
* 1) Fork a child process.
* 2) In the parent process, call kill with signal SIGTOTEST for the
* pid of the child.
* In the child,
... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/kill/3-1.c | 1,144 | utf_8 | 3cff944134b153f821d0cd0404771612 | /*
* source tree.
This program tests the assertion that if the user id of the sending process
doesn't match the user id of the receiving process (pid), then the kill function
will fail with errno set to EPERM.
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#inc... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/kill/1-1.c | 1,494 | utf_8 | 71bd89faf62fc3b188e71cc5b51adcbe | /*
* source tree.
* Test that the kill() function shall send signal sig to the process
* specified by pid.
* 1) Set up a signal handler for the signal that says we have caught the
* signal.
* 2) Call kill on the current process with the signal.
* 3) If signal handler was called, test passed.
* This te... |
google | android | 2-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/kill/2-2.c | 2,094 | utf_8 | dbb7b1f60486284431934c8019f46944 | #include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include "posixtest.h"
/*
* source tree.
* Test that when the null signal is sent to kill(), error checking is
* still performed.
* 1) Send a signal to generate an ESRCH error.
* ==> Send... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_init/3-1.c | 1,198 | utf_8 | a84f2f96b6bcaa2c49903626fd255550 | /*
* source tree.
* Test that pthread_mutexattr_init()
* Upon successful completion, pthread_mutexattr_init() shall return a value of 0.
* Steps:
* 1. Initialize a pthread_mutexattr_t object with pthread_mutexattr_init()
* 2. ENOMEM is the only error it returns, so if it doesn't return that error,
* the ... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_init/1-1.c | 1,698 | utf_8 | e1c95c437c500731ec48f45f55f6cd96 | /*
* source tree.
* Test that pthread_mutexattr_init()
* shall initialize a mutex attributes object 'attr' with the default
* value for all of the attributes defined by the implementation.
* Steps:
* 1. Initialize a pthread_mutexattr_t object with pthread_mutexattr_init()
* 2. Call pthread_mutexattr_getpsh... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_rwlockattr_setpshared/1-1.c | 2,351 | utf_8 | 2457d479feafeaeb72749464825e7fc6 | /*
* source tree.
* Test that pthread_rwlockattr_setpshared()
*
* It shall set the value of the process-shared attribute from 'attr'.
*
* Steps:
* 1. Initialize a pthread_rwlockattr_t object with pthread_rwlockattr_init().
* 2. Set the process shared to PTHREAD_PROCESS_PRIVATE.
* 3. Get the attribute and t... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_setpshared/2-1.c | 1,552 | utf_8 | f7468b8152d23125fb164cffc3269aa7 | /*
* source tree.
*
* pthread_barrierattr_setpshared()
*
* The pthread_barrierattr_setpshared() function may fail if:
* [EINVAL] The new value specified for the process-shared attribute is not one of
* the legal values PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE.
* This case will always pass
*/
#include ... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrierattr_setpshared/1-1.c | 2,084 | utf_8 | 63008fa1ee292fe7c3dd53c8e1d2b0eb | /*
* source tree.
*
* pthread_barrierattr_setpshared()
*
* The pthread_barrierattr_setpshared() function shall
* set the process-shared attribute in an initialized attributes object referenced by attr.
*/
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include ... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/2-1.c | 3,076 | utf_8 | 7f3a9a0d6dd76a52ebc1b2445bcc385d | /*
* source tree.
* Test pthread_cancelstate
* The cancelability state of a newly created thread is PTHREAD_CANCEL_ENABLE.
*
* STEPS:
* 1. Create a thread.
* 2. In the thread function, set cancel_flag to 1.
* 3. Send out a thread cancel request to the new thread
* 4. If the cancel request was honored, the canc... |
google | android | 1-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/1-2.c | 3,115 | utf_8 | 41fa92c95800710437c64618ac16e3b5 | /*
* source tree.
* Test pthread_cancelstate
* Atomically sets the cancelability state to 'state' and returns the old
* cancelability state in the location referenced by 'oldstate'.
* 'state' can either be PTHREAD_CANCEL_ENABLE, or PTHREAD_CANCEL_DISABLE.
*
* Test when a thread is PTHREAD_CANCEL_DISABLE
*
* ST... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/3-1.c | 1,856 | utf_8 | 32d2ff08cb291f0b5b86562e3999e7ad | /*
* source tree.
* Test pthread_cancelstate
* It returns a 0 on success. It may return an error code of:
*
* [EINVAL] The specified state is not PTHREAD_CANCEL_ENABLE or
* PTHREAD_CANCEL_DISABLE.
* It will not return EINTR.
*
* STEPS:
* 1. Create a thread.
* 2. In the thread function, set the state to an i... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcancelstate/1-1.c | 3,329 | utf_8 | ebb9d70d5dd9be598561ce3b455db3d7 | /*
* source tree.
* Test pthread_cancelstate
* Atomically sets the cancelability state to 'state' and returns the old
* cancelability state in the location referenced by 'oldstate'.
* 'state' can either be PTHREAD_CANCEL_ENABLE, or PTHREAD_CANCEL_DISABLE.
*
* Test when a thread is PTHREAD_CANCEL_ENABLE
*
* STE... |
google | android | 7-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/7-1.c | 3,543 | utf_8 | f872821c0f4b6e01de84b3c32491ab6c | /*
* source tree.
*/
/*
* assertion:
*
* aio_cancel() shall return AIO_NOTCANCELED if at least one of the
* requested operations cannot be canceled because it is in progress.
*
* method:
*
* queue a lot of aio_write() to a given file descriptor
* then cancel all operation belonging to this file descriptor
*... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/2-1.c | 2,067 | utf_8 | 39c254dee85d6447ce220f6c397ac378 | /*
* source tree.
*/
/*
* assertion:
*
* if aiobcp is NULL, all outstanding cancelable AIO against fildes
* shall be canceled.
*
* method:
*
* open a file and queue a write to it with aio_write()
* execute aio_cancel() on this file
* check aio_cancel() is not -1
* -> aio_cancel() works on fildes used with ... |
google | android | 9-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/9-1.c | 1,017 | utf_8 | edf5790516dd24f41e3f7c1d89b2ff67 | /*
* source tree.
*/
/*
* assertion:
*
* io_cancel() shall return -1 and set errno in all other case.
*
* method:
*
* call aio_cancel() with invalid parameter and check result is -1
* and errno is not 0
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/3-1.c | 3,726 | utf_8 | 53c21b023a8f4a500304142b1126423d | /*
* source tree.
*/
/*
* assertion:
*
* Asynchronous notification shall occur for AIO that are successfully
* cancelled.
*
* method:
*
* we queue a lot of aio_write() with a valid sigevent to a file descriptor
* next we try to cancel all operations on this file descriptor
* we guess some have been finished... |
google | android | 5-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/5-1.c | 3,274 | utf_8 | df90560a0da4166cb597cb3451693733 | /*
* source tree.
*/
/*
* assertion:
*
* iocbp not successfully canceled shall not be modified
*
* method:
*
* queue a some aio_write() to a file descriptor
* cancel all operations for this file descriptor
* for all operations not canceled at end of operations
* verify that values in aiocb is the good ones
... |
google | android | 10-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/10-1.c | 1,044 | utf_8 | c56930f5f42988dcbcd351c023592b4c | /*
* source tree.
*/
/* assertion:
*
* aio_cancel() shall fail if:
* [EBADF] The fildes argument is not a valid descriptor.
*
* method:
*
* use -1 as fildes and check return value is -1 and errno is EBADF
*
*/
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/1-1.c | 1,950 | utf_8 | 8352a9c66689c10871ed21c5cbb12c5d | /*
* source tree.
*/
/*
* assertion:
*
* The aiocbp argument points to the AIO control block to be canceled.
*
* method:
*
* - create a valid aiocb with a call to aio_write()
* - call aio_cancel() with this aiocb and check return value is not -1
* -> aio_cancel() works with a valid (finished or not) aiocb
*... |
google | android | 2-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/2-2.c | 1,349 | utf_8 | cd97f91b12f526f880559fb02b5906fc | /*
* source tree.
*/
/*
* assertion:
*
* if aiobcp is NULL, all outstanding cancelable AIO against fildes
* shall be canceled.
*
* method:
*
* open a file
* execute aio_cancel() on this file
* check aio_cancel() is not -1
* -> aio_cancel() works on standard fildes
*
*/
#include <stdio.h>
#include <sys/ty... |
google | android | 8-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/8-1.c | 1,996 | utf_8 | 25ad909b7c1d421e9b56925d6768e41c | /*
* source tree.
*/
/*
* assertion:
*
* aio_cancel() shall return AIO_ALLDONE if all operation have already
* completed
*
* method:
*
* execute one aio_write(), wait it is finished
* execute aio_cancel
* if result is AIO_ALLDONE, test is passed
* otherwise it is failed
*
*/
#include <stdio.h>
#include <... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/4-1.c | 3,050 | utf_8 | fa61c51cfa2a38c1a6be873600d34bfd | /*
* source tree.
*/
/*
* assertion:
*
* Error status should be set to [ECANCELED] and return shall be -1 for
* successfully canceled AIO.
*
* method:
*
* we queue a lot of aio_write() operation to a file descriptor
* then we try to cancel all aio operation of this file descriptor
* we check with aio_error(... |
google | android | 6-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_cancel/6-1.c | 3,116 | utf_8 | 55b54fd0d5e5b5b89888382acadc9f69 | /*
* source tree.
*/
/*
* assertion:
*
* aio_cancel() shall return AIO_CANCELED if the requested operations
* were canceled.
*
* method:
*
* queue a lot of aio_write() to a given fildes.
* try to cancel the last one submited
* if aio_error() is ECANCELED and aio_cancel() is AIO_CANCELED
* test is passed
*... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/2-1.c | 2,836 | utf_8 | 288011aae37a8dfda6f7f9390ec7de40 | /*
* source tree.
* Test the resulting attributes object (possibly modified by setting individual
* attribute values) when used by pthread_create() defines the attributes of
* the thread created.
*
* Steps:
* 1. Initialize a pthread_attr_t object using pthread_attr_init()
* 2. Pass the newly created attribute... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/3-1.c | 1,537 | utf_8 | 942d3b9a390e06f56110479a1bad38a0 | /*
* source tree.
* A single attributes object can be used in multiple simultaneous calls to
* pthread_create().
* NOTE: Results are undefined if pthread_attr_init() is called specifying an
* already initialized 'attr' attributes object.
*
* Steps:
* 1. Initialize a pthread_attr_t object using pthread_attr_ini... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/1-1.c | 1,645 | utf_8 | 8044697112ff5a53d9afeb1826b642c7 | /*
* source tree.
* Test that pthread_attr_init()
* shall initialize a thread attributes object 'attr' with the default value
* for all the individual attributes used by a given implementation.
* NOTE: Since most default values are implementation specific, only the
* attribute of the detachstate will be teste... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_init/4-1.c | 1,218 | utf_8 | 6d9f13d229b477ebca3c0a6685bdf4b4 | /*
* source tree.
* Test that pthread_attr_init()
* Upon successful completion, pthread_attr_init() shall return a value of 0.
* Steps:
* 1. Initialize a pthread_attr_t object using pthread_attr_init()
* 2. ENOMEM is the only error it returns, so if it doesn't return that error,
* the return number should ... |
google | android | 7-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_read/7-1.c | 1,712 | utf_8 | 876b851a6526f0244f9d2f29d59211ed | /*
* source tree.
*/
/*
* assertion:
*
* The aio_read() function shall return the value zero if operation is
* successfuly queued.
*
* method:
*
* - write data to a file
* - read file using aio_read
* - check aio_read return value
*/
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <s... |
google | android | 3-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_read/3-2.c | 2,189 | utf_8 | c01957779bb9701d87ffb726d3b1bf59 | /*
* source tree.
*/
/*
* assertion:
*
* aiocbp may be be used as an argument to aio_error() and aio_return().
*
* method: (short read)
*
* - write data to a file
* - read file using aio_read
* - check error and return codes using previous aiocb
*/
#include <stdio.h>
#include <sys/types.h>
#include <unistd.... |
google | android | 9-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_read/9-1.c | 2,276 | utf_8 | f360f3c53a46f4a392521372c22ba2d1 | /*
* source tree.
*/
/*
* assertion:
*
* aio_read() 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 need... |
google | android | 11-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_read/11-1.c | 2,309 | utf_8 | 964837bfe8e71e3afa605cd888834748 | /*
* source tree.
*/
/*
* assertion:
*
* aio_read() shall fail with [EINVAL] 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:
*
* - Create an aiocb with a... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_read/3-1.c | 2,090 | utf_8 | dc5e4e25ace27b900c10db96e0a8203a | /*
* source tree.
*/
/*
* assertion:
*
* aiocbp may be be used as an argument to aio_error() and aio_return().
*
* method:
*
* - write data to a file
* - read file using aio_read
* - check error and return codes using previous aiocb
*/
#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_read/5-1.c | 2,445 | utf_8 | 6291ae387b186bb3dbc271b36763206f | /*
* source tree.
*/
/*
* assertion:
*
* aio_lio_opcode shall be ignored.
*
* method:
*
* - write data to a file
* - fill in an aiocb with an LIO_WRITE aio_lio_opcode
* - call aio_read with this aiocb
* - check data is effectively read (ignoring aio_lio_opcode)
*/
#include <stdio.h>
#include <sys/types.h>
... |
google | android | 10-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_read/10-1.c | 1,657 | utf_8 | f238f4f22521818a63836318e32f2486 | /*
* source tree.
*/
/*
* assertion:
*
* aio_read() shall fail with [EBADF] or the error status of the operation
* shall be [EBADF] if aio_fildes argument is not a valid file descriptor
* open for reading.
*
* method:
*
* - Create an aiocb with an invalid aio_filedes
* - call aio_read with this aiocb
* - c... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_read/1-1.c | 2,373 | utf_8 | 2e4105302feced2727feb41a934fdc01 | /*
* source tree.
*/
/*
* assertion:
*
* aio_read() shall read aio_nbytes from the files aio_fildes into the
* buffer aio_buf.
*
* method:
*
* - write 1024 bytes into a file
* - read 256 bytes using aio_read
*/
#include <sys/stat.h>
#include <aio.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#... |
google | android | 8-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_read/8-1.c | 1,213 | utf_8 | 30248a21af78f2581f77d6fe9a840e83 | /*
* source tree.
*/
/*
* assertion:
*
* The aio_read() 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_read
* ... |
google | android | 11-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_read/11-2.c | 1,738 | utf_8 | 52aadd5e1488b0d9052eb4d3559cca32 | /*
* source tree.
*/
/*
* assertion:
*
* aio_read() shall fail with [EINVAL] 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:
*
* - Create an aiocb with ... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/aio_read/4-1.c | 2,424 | utf_8 | 62d9e15204f28381898795c573cdfa97 | /*
* source tree.
*/
/*
* assertion:
*
* The file is read at offset given by aio_offset.
*
* method:
*
* - write data to a file
* - read file using aio_read at a given offset
* - check data is consistent
*/
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h... |
google | android | 7-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/munlock/7-1.c | 1,290 | utf_8 | 9679e25b096d2101d0cdc4446839ee68 | /*
*
* Test that munlock return a value of zero upon successful completion.
*
*/
#include <sys/mman.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include "posixtest.h"
#define BUFSIZE 8
int main(void)
{
int result;
void *ptr;
ptr = malloc(BUFSIZE);
if (ptr == NULL) {
printf("Can not allocate m... |
google | android | 11-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/munlock/11-1.c | 1,622 | utf_8 | 28c72276e8a209942290dd4439b6bfe1 | /*
*
* Test that munlock() set errno = EINVAL when addr is not a multiple of
* {PAGESIZE} if the implementation requires that addr be a multiple of
* {PAGESIZE}.
*/
#include <sys/mman.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include "posixtest.h"
int main(void)
{
int resul... |
google | android | 10-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/munlock/10-1.c | 1,705 | utf_8 | 2709a3b00e6e6c6c9d61c58015bc438c | /*
*
* Test that the munlock() function sets errno = ENOMEM if some or all of the
* address range specified by the addr and len arguments does not correspond to
* valid mapped pages in the address space of the process.
*
* Assume that the value LONG_MAX is an invalid pointer.
*
* aarch64 linux versions v5.4-rc1... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-1.c | 1,706 | utf_8 | 5117c2ab77ca7b6b3e4ace7ab375b32f | /*
* source tree.
* Test that if TIMER_ABSTIME is set in flags, then clock_nanosleep()
* sleeps for the absolute time specified in rqtp.
*
* - Get the current time.
* - Set clock_nanosleep() to sleep for current time + SLEEPSEC
* seconds.
* - Get the current time after sleeping and ensure it is within
* AC... |
google | android | 9-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/9-1.c | 2,705 | utf_8 | 3dc2c7d5eab232950ccc55a4072f2754 | /*
* source tree.
* Test that when clock_nanosleep() is interrupted by a signal, rmtp
* contains the amount of time remaining (test with relative sleep).
*
*/
#include <stdio.h>
#include <time.h>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <errno.h>
#include "posixtes... |
google | android | 11-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/11-1.c | 1,173 | utf_8 | b18d57a537b1515f8ec1dabc5f2050bd | /*
* source tree.
* Test that clock_nanosleep() sets errno to EINVAL if rqtp contained a
* nanosecond value < 0 or >= 1,000 million
*/
#include <stdio.h>
#include <time.h>
#include <errno.h>
#include <stdint.h>
#include "posixtest.h"
#define NUMINVALIDTESTS 9
static int invalid_tests[NUMINVALIDTESTS] = {
INT32_MIN... |
google | android | 1-5 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-5.c | 2,434 | utf_8 | 284a68ef65734b611c803159489150dd | /*
* source tree.
* Test that clock_nanosleep() does not stop if a signal is received
* that has no signal handler. clock_nanosleep() should still respond
* to the signal, but should resume after a SIGCONT signal is received.
*
* SIGSTOP will be used to stop the sleep.
*/
#include <stdio.h>
#include <time.h>
#i... |
google | android | 2-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-3.c | 2,006 | utf_8 | 676cae2d63d8002fc58e0987bb492980 | /*
* source tree.
* Test that clock_nanosleep() causes the current thread to be suspended
* until a signal whose action is to terminate the process is received
* for an absolute clock. [Same as test 1-4.c except with TIMER_ABSTIME
* set.]
*/
#include <stdio.h>
#include <time.h>
#include <signal.h>
#include <unis... |
google | android | 13-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/13-1.c | 776 | utf_8 | 5fb8c6d952183014ba7dabf6e593d7c7 | /*
* source tree.
* Test that clock_nanosleep() sets errno to EINVAL if clock_id does
* not refer to a known clock.
*/
#include <stdio.h>
#include <time.h>
#include <errno.h>
#include "posixtest.h"
#define SLEEPSEC 4
#define BOGUSCLOCKID 99999
int main(void)
{
struct timespec tssleep;
tssleep.tv_sec = SLEEPSEC;
... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/3-1.c | 1,775 | utf_8 | ce21d64da169c507055594d128700654 | /*
* source tree.
* Test that if TIMER_ABSTIME is set in flags, then if clock_nanosleep()
* parameter rqtp specifies a time in the past, clock_nanosleep()
* returns immediately and no suspension occurs.
*
* - Get the current time.
* - Set clock_nanosleep() to sleep until current time - SLEEPSEC
* seconds.
* ... |
google | android | 10-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/10-1.c | 1,795 | utf_8 | 6ec028fcc1f2be7f88ec945f6a8cc4f6 | /*
* source tree.
* Test that clock_nanosleep() sets errno=EINTR if it was interruped
* by a signal. Test for relative sleep.
*/
#include <stdio.h>
#include <time.h>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
#include <errno.h>
#include "posixtest.h"
#include "proc.h"
#define SLEEPSEC 30
#define... |
google | android | 1-3 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-3.c | 2,525 | utf_8 | 8d48bf964d277ca3edac83a0feabe570 | /*
* source tree.
* Test that clock_nanosleep() causes the current thread to be suspended
* until a signal whose action is to invoke a signal handling function
* is received.
*
* Note: This test case has some limitations:
* - clock_nanosleep() could not be executed at all, and the test would
* pass [Hopefull... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-1.c | 1,482 | utf_8 | aac29b640dba5bf23bf5ce3059bcfcb8 | /*
* source tree.
* Test that clock_nanosleep() causes the current thread to be suspended
* until the time interval in rqtp passes if TIMER_ABSTIME is not set
* in flags.
*/
#include <stdio.h>
#include <time.h>
#include "posixtest.h"
#define SLEEPNSEC 3000000
int main(void)
{
struct timespec tssleep, tsbefore, ts... |
google | android | 1-4 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/1-4.c | 1,794 | utf_8 | 2a54ce390f5af1373c0191f6bafea50a | /*
* source tree.
* Test that clock_nanosleep() causes the current thread to be suspended
* until a signal whose action is to terminate the process is received.
*/
#include <stdio.h>
#include <time.h>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
#include "posixtest.h"
#include "proc.h"
#define SLEE... |
google | android | 2-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/2-2.c | 2,725 | utf_8 | 1e5475c27655d4ce93527f8a1e829969 | /*
* source tree.
* Test that clock_nanosleep() causes the current thread to be suspended
* until a signal whose action is to invoke a signal handling function
* is received for an absolute nanosleep (same as 1-3.c with
* TIMER_ABSTIME set).
*
* Note: This test case has some limitations:
* - clock_nanosleep() ... |
google | android | 2-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/2-1.c | 21,103 | utf_8 | 039d3b59771d39f9dcc4122984deef87 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* This sample test aims to check the following assertion:
*
* It is safe to destroy a condition variable when no thread is blocked on it.
* The steps are:
* -> Some threads are waiting on a condition variable.
* -> A thread broadcasts and destroy... |
google | android | 3-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/3-1.c | 1,191 | utf_8 | 46b44ff0fe7076390da712dfa374b700 | /*
* source tree.
* Test that pthread_cond_destroy()
* Upon succesful completion, it shall return a 0
*
*/
#include <pthread.h>
#include <stdio.h>
#include <errno.h>
#include "posixtest.h"
int main(void)
{
pthread_cond_t cond;
int rc;
/* Initialize a cond object */
if ((rc = pthread_cond_init(&cond, NULL)) !... |
google | android | 1-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/1-1.c | 2,069 | utf_8 | 77dda64b2cd9d08b48e1ffa79c041600 | /*
* source tree.
* Test that pthread_cond_destroy()
* shall destroy the condition variable referenced by 'cond';
* the condition variable object in effect becomes uninitialized.
*
*/
#include <pthread.h>
#include <stdio.h>
#include "posixtest.h"
static pthread_cond_t cond1, cond2;
static pthread_cond_t cond3... |
google | android | 4-1 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/speculative/4-1.c | 2,382 | utf_8 | ecd43f46459e1b405eb7612d2d84c5b9 | /*
* source tree.
*
* Test that EBUSY is returned when pthread_cond_destroy() is called on a cond
* var that has waiters. POSIX only recommends this behaviour, the required
* behaviour is undefined.
*
* This test is very similar to pthread_barrier_destroy 2-1 which has more
* explanation attached.
*/
#include ... |
google | android | threads_scenarii | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/testfrmw/threads_scenarii.c | 15,292 | utf_8 | 1b36752b550e1b733bfa6b3988879428 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a helper file for the pthread_create tests
* It defines the following objects:
* scenarii: array of struct __scenario type.
* NSCENAR : macro giving the total # of scenarii
* scenar_init(): function to call before use the scenarii ... |
google | android | testfrmw | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/testfrmw/testfrmw.c | 1,804 | utf_8 | fa6f35d0cfa4da6af98460ed21a78b73 | /*
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This file is a wrapper to use the tests from the NPTL Test & Trace Project
* with either the Linux Test Project or the Open POSIX Test Suite.
* The following function are defined:
* void output_init()
* void output_fini()
* void output(char * ... |
google | android | 5-2 | .c | platform/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/5-2.c | 1,829 | utf_8 | 050cab376170813d27e3a1becbb32757 | /*
* source tree.
* Test that nanosleep() returns -1 if interrupted.
* Test by sending a signal to a child doing nanosleep(). If nanosleep
* returns -1, return success from the child.
*/
#include <stdio.h>
#include <time.h>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
#include "posixtest.h"
#defi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.