/third_party/musl/libc-test/src/functionalext/thread/ |
H A D | pthread_mutex_ext.c | 28 GetDelayedTimeByClockid(&ts, DELAY_TIME_100_MS, CLOCK_REALTIME); in PthreadClocklockOutRealTime() 29 TEST(pthread_mutex_clocklock(mtx, CLOCK_REALTIME, &ts) == ETIMEDOUT); in PthreadClocklockOutRealTime() 31 clock_gettime(CLOCK_REALTIME, &tsNow); in PthreadClocklockOutRealTime() 39 * @tc.desc : test pthread_mutex_clocklock whith timeout by CLOCK_REALTIME 64 GetDelayedTimeByClockid(&ts, DELAY_TIME_100_MS, CLOCK_REALTIME); in PthreadClocklockNoOutRealTime() 65 TEST(pthread_mutex_clocklock(mtx, CLOCK_REALTIME, &ts) == 0); in PthreadClocklockNoOutRealTime() 71 * @tc.desc : test pthread_mutex_clocklock with no timeout by CLOCK_REALTIME 164 GetDelayedTimeByClockid(&ts, DELAY_TIME_100_MS, CLOCK_REALTIME); in PthreadClocklockOutRealTime2() 165 clock_gettime(CLOCK_REALTIME, &tsNow); in PthreadClocklockOutRealTime2() 167 clock_settime(CLOCK_REALTIME, in PthreadClocklockOutRealTime2() [all...] |
H A D | pthread_cond_timedwait.c | 63 EXPECT_EQ(clock_gettime(CLOCK_REALTIME, &ts), 0); in pthread_cond_timedwait_0010() 90 EXPECT_EQ(clock_gettime(CLOCK_REALTIME, &ts), 0); in pthread_cond_timedwait_0020() 113 EXPECT_EQ(clock_gettime(CLOCK_REALTIME, &ts), 0); in pthread_cond_timedwait_time64_0010() 202 clockid_t clock_id = CLOCK_REALTIME; in pthread_cond_clockwait_0010() 249 clock_gettime(CLOCK_REALTIME, &ts); in ClockWaitTimedwait2() 253 clockid_t clock_id = CLOCK_REALTIME; in ClockWaitTimedwait2() 261 * @tc.desc : Test the case of pthread_cond_clockwait timewait by CLOCK_REALTIME 283 clockid_t clock_id = CLOCK_REALTIME; in ClockWaitTimeOut() 286 clock_gettime(CLOCK_REALTIME, &tsNow); in ClockWaitTimeOut() 298 * @tc.desc : Test the case of pthread_cond_clockwait timeout by CLOCK_REALTIME [all...] |
/third_party/ltp/testcases/open_posix_testsuite/functional/timers/clocks/ |
H A D | twopsetclock.c | 16 * The clock_id chosen for this test is CLOCK_REALTIME. 36 if (clock_gettime(CLOCK_REALTIME, &tsreset) != 0) { in main() 47 if (clock_settime(CLOCK_REALTIME, &tschild) != 0) { in main() 50 if (clock_gettime(CLOCK_REALTIME, &tpget) == -1) { in main() 61 if (clock_settime(CLOCK_REALTIME, &tsparent) != 0) { in main() 73 if (clock_gettime(CLOCK_REALTIME, &tpget) == -1) { in main() 84 if (clock_settime(CLOCK_REALTIME, &tsreset) != 0) { in main()
|
H A D | invaliddates.c | 11 * Test for CLOCK_REALTIME. (N/A for CLOCK_MONOTONIC as that clock 38 if (clock_gettime(CLOCK_REALTIME, &tsreset) != 0) { in main() 46 if (clock_settime(CLOCK_REALTIME, &tpset) == 0) { in main() 47 if (clock_gettime(CLOCK_REALTIME, &tpget) == -1) { in main() 71 if (clock_settime(CLOCK_REALTIME, &tsreset) != 0) { in main() 77 if (clock_settime(CLOCK_REALTIME, &tsreset) != 0) { in main()
|
/third_party/ltp/testcases/kernel/syscalls/clock_gettime/ |
H A D | leapsec01.c | 14 * A bug in the hrtimer subsystem caused all TIMER_ABSTIME CLOCK_REALTIME 99 SAFE_CLOCK_GETTIME(CLOCK_REALTIME, &now); in test_hrtimer_early_expiration() 105 ret = clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &target, NULL); in test_hrtimer_early_expiration() 111 SAFE_CLOCK_GETTIME(CLOCK_REALTIME, &now); in test_hrtimer_early_expiration() 128 SAFE_CLOCK_GETTIME(CLOCK_REALTIME, &now); in run_leapsec() 142 SAFE_CLOCK_SETTIME(CLOCK_REALTIME, &now); in run_leapsec() 165 SAFE_CLOCK_GETTIME(CLOCK_REALTIME, &now); in run_leapsec() 172 SAFE_CLOCK_SETTIME(CLOCK_REALTIME, &start); in run_leapsec() 192 SAFE_CLOCK_GETTIME(CLOCK_REALTIME, &now); in cleanup() 195 SAFE_CLOCK_SETTIME(CLOCK_REALTIME, in cleanup() [all...] |
H A D | clock_gettime04.c | 29 CLOCK_REALTIME, 64 if (clk_id != CLOCK_REALTIME) in my_gettimeofday() 97 clock_getres(CLOCK_REALTIME, &res); in setup() 133 /* Do gettimeofday() test only for CLOCK_REALTIME */ in run() 134 if (tv->clock_gettime == my_gettimeofday && clks[i] != CLOCK_REALTIME) in run() 186 if (variants[j].clock_gettime == my_gettimeofday && clks[i] != CLOCK_REALTIME) in run()
|
/third_party/musl/libc-test/src/functionalext/supplement/thread/thread_gtest/ |
H A D | pthread_cond_test.cpp | 83 pthread_condattr_setclock(&condAttr, CLOCK_REALTIME); in HWTEST_F() 103 pthread_condattr_setclock(&condAttr, CLOCK_REALTIME); in HWTEST_F() 115 * @tc.desc: Set the negative timeout time of the CLOCK_REALTIME clock as the function to determine whether the return 116 * is invalid, set the large timeout time of the CLOCK_REALTIME clock as the function to determine whether 117 * the return is invalid, and set the normal timeout time of the CLOCK_REALTIME clock as the function to 124 MakeTimeout(CLOCK_REALTIME, pthread_cond_timedwait); in HWTEST_F() 168 * @tc.desc: Set the negative timeout time of the CLOCK_REALTIME clock as the function to determine whether the return 169 * is invalid, set the large timeout time of the CLOCK_REALTIME clock as the function to determine whether 170 * the return is invalid, and set the normal timeout time of the CLOCK_REALTIME clock as the function to 177 MakeTimeout(CLOCK_REALTIME, [](pthread_cond_ in HWTEST_F() [all...] |
H A D | thread_mutex_test.cpp | 183 clock_gettime(CLOCK_REALTIME, &timeSpec_); in HWTEST_F() 188 clock_gettime(CLOCK_REALTIME, &timeSpec_); in HWTEST_F() 203 clock_gettime(CLOCK_REALTIME, &timeSpec_); in HWTEST_F() 212 clock_gettime(CLOCK_REALTIME, &ts); in HWTEST_F() 308 clock_gettime(CLOCK_REALTIME, &timeSpec_); in HWTEST_F() 309 EXPECT_EQ(ETIMEDOUT, pthread_mutex_clocklock(&mutex_, CLOCK_REALTIME, &timeSpec_)); in HWTEST_F() 311 EXPECT_EQ(EINVAL, pthread_mutex_clocklock(&mutex_, CLOCK_REALTIME, &timeSpec_)); in HWTEST_F() 313 clock_gettime(CLOCK_REALTIME, &timeSpec_); in HWTEST_F() 315 EXPECT_EQ(0, pthread_mutex_clocklock(&mutex_, CLOCK_REALTIME, &timeSpec_)); in HWTEST_F() 358 clock_gettime(CLOCK_REALTIME, in HWTEST_F() [all...] |
/third_party/ltp/testcases/kernel/syscalls/clock_adjtime/ |
H A D | clock_adjtime02.c | 87 .clktype = CLOCK_REALTIME, 92 .clktype = CLOCK_REALTIME, 99 .clktype = CLOCK_REALTIME, 106 .clktype = CLOCK_REALTIME, 139 rval = tv->clock_adjtime(CLOCK_REALTIME, tst_timex_get(txcptr)); in verify_clock_adjtime() 202 rval = tv->clock_adjtime(CLOCK_REALTIME, tst_timex_get(&saved)); in setup() 248 rval = tv->clock_adjtime(CLOCK_REALTIME, tst_timex_get(&saved)); in cleanup()
|
/third_party/ltp/testcases/kernel/syscalls/clock_settime/ |
H A D | clock_settime02.c | 30 .type = CLOCK_REALTIME, 37 .type = CLOCK_REALTIME, 44 .type = CLOCK_REALTIME, 51 .type = CLOCK_REALTIME, 119 TEST(tv->clock_gettime(CLOCK_REALTIME, tst_ts_get(&spec))); in verify_clock_settime() 122 tst_clock_name(CLOCK_REALTIME)); in verify_clock_settime()
|
H A D | clock_settime01.c | 49 ret = tv->clock_gettime(CLOCK_REALTIME, tst_ts_get(ts)); in do_clock_gettime() 51 tst_brk(TBROK | TERRNO, "clock_settime(CLOCK_REALTIME) failed"); in do_clock_gettime() 64 TEST(tv->clock_settime(CLOCK_REALTIME, tst_ts_get(change))); in verify_clock_settime() 67 tst_clock_name(CLOCK_REALTIME)); in verify_clock_settime() 85 TEST(tv->clock_settime(CLOCK_REALTIME, tst_ts_get(change))); in verify_clock_settime() 88 tst_clock_name(CLOCK_REALTIME)); in verify_clock_settime()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_timedwait/ |
H A D | 10-1.c | 9 * the CLOCK_REALTIME clock. If the Timers option is not supported, 44 #ifdef CLOCK_REALTIME in main() 45 printf("Test CLOCK_REALTIME\n"); in main() 46 if (clock_gettime(CLOCK_REALTIME, &ts) != 0) { in main() 66 #ifdef CLOCK_REALTIME in main() 67 if (clock_gettime(CLOCK_REALTIME, &ts_2) != 0) { in main()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/ |
H A D | 7-1.c | 8 * Test that if clock_settime() changes the time for CLOCK_REALTIME, 9 * then any threads blocked on clock_nanosleep() for the CLOCK_REALTIME 41 /* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */ in main() 47 if (clock_gettime(CLOCK_REALTIME, &tsT0) != 0) { in main() 61 if (clock_nanosleep(CLOCK_REALTIME, flags, &tsT1, NULL) != 0) { in main() 66 if (clock_gettime(CLOCK_REALTIME, &tsT2) != 0) { in main() 93 if (clock_settime(CLOCK_REALTIME, &tsT0) != 0) { in main()
|
H A D | 8-1.c | 39 /* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */ in main() 45 if (clock_gettime(CLOCK_REALTIME, &tsT0) != 0) { in main() 58 if (clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL) != 0) { in main() 63 if (clock_gettime(CLOCK_REALTIME, &tsend) != 0) { in main() 92 if (clock_settime(CLOCK_REALTIME, &tsT0) != 0) { in main()
|
H A D | 4-1.c | 8 * Test that if clock_settime() changes the value for CLOCK_REALTIME, 52 /* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */ in main() 80 if (clock_gettime(CLOCK_REALTIME, &tpT0) != 0) { in main() 85 if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) { in main() 102 if (clock_settime(CLOCK_REALTIME, &tpT0) != 0) { in main() 112 if (clock_gettime(CLOCK_REALTIME, &tpT2) != 0) { in main()
|
H A D | 7-2.c | 8 * Test that if clock_settime() changes the time for CLOCK_REALTIME, 9 * then any threads blocked on clock_nanosleep() for the CLOCK_REALTIME 40 /* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */ in main() 46 if (clock_gettime(CLOCK_REALTIME, &tsT0) != 0) { in main() 63 if (clock_nanosleep(CLOCK_REALTIME, flags, &tsT1, NULL) != 0) { in main() 68 if (clock_gettime(CLOCK_REALTIME, &tsT3) != 0) { in main() 96 if (clock_settime(CLOCK_REALTIME, &tsT2) != 0) { in main()
|
/third_party/rust/crates/nix/test/ |
H A D | test_time.rs | 14 nix::time::clock_getres(ClockId::CLOCK_REALTIME).expect("assertion failed"); in test_clock_getres() 19 clock_gettime(ClockId::CLOCK_REALTIME).expect("assertion failed"); in test_clock_gettime() 38 ClockId::CLOCK_REALTIME.res().unwrap(); in test_clock_id_res() 43 ClockId::CLOCK_REALTIME.now().unwrap(); in test_clock_id_now()
|
/third_party/ltp/testcases/kernel/syscalls/timer_create/ |
H A D | timer_create02.c | 53 {CLOCK_REALTIME, NULL, &timer_id, EFAULT, "invalid sigevent struct"}, 54 {CLOCK_REALTIME, &sig_ev, NULL, EFAULT, "invalid timer ID"}, 56 {CLOCK_REALTIME, &sig_ev_inv_not, &timer_id, EINVAL, "wrong sigev_notify"}, 57 {CLOCK_REALTIME, &sig_ev_inv_sig, &timer_id, EINVAL, "wrong sigev_signo"},
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/ |
H A D | 2-1.c | 26 /* Test for CLOCK_REALTIME */ 117 #ifdef CLOCK_REALTIME in f1() 118 printf("Test CLOCK_REALTIME\n"); in f1() 119 rc = clock_gettime(CLOCK_REALTIME, &ts); in f1() 143 #ifdef CLOCK_REALTIME in f1() 144 rc = clock_gettime(CLOCK_REALTIME, &ts); in f1()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/timer_settime/ |
H A D | 6-1.c | 16 * For this test, signal SIGTOTEST will be used, clock CLOCK_REALTIME 72 if (timer_create(CLOCK_REALTIME, &ev, &tid) != 0) { in main() 88 if (clock_gettime(CLOCK_REALTIME, &tsbefore) != 0) { in main() 103 if (clock_gettime(CLOCK_REALTIME, &tsafter) != 0) { in main() 129 if (clock_gettime(CLOCK_REALTIME, &tsafter) != 0) { in main()
|
/third_party/musl/libc-test/src/functionalext/supplement/thread/ |
H A D | pthread_rwlock_timedrdlock.c | 32 clock_gettime(CLOCK_REALTIME, &ts); in pthread_rwlock_timedrdlock_0100() 58 clock_gettime(CLOCK_REALTIME, &ts); in pthread_rwlock_timedrdlock_0200() 82 clock_gettime(CLOCK_REALTIME, &ts); in pthread_rwlock_timedrdlock_0300() 104 clock_gettime(CLOCK_REALTIME, &ts); in pthread_rwlock_timedrdlock_time64_0100()
|
H A D | pthread_rwlock_timedwrlock.c | 32 clock_gettime(CLOCK_REALTIME, &ts); in pthread_rwlock_timedwrlock_0100() 58 clock_gettime(CLOCK_REALTIME, &ts); in pthread_rwlock_timedwrlock_0200() 82 clock_gettime(CLOCK_REALTIME, &ts); in pthread_rwlock_timedwrlock_0300() 104 clock_gettime(CLOCK_REALTIME, &ts); in pthread_rwlock_timedwrlock_time64_0100()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_nanosleep/ |
H A D | 1-1.c | 23 if (clock_gettime(CLOCK_REALTIME, &tsbefore) != 0) { in main() 30 if (clock_nanosleep(CLOCK_REALTIME, 0, &tssleep, NULL) != 0) { in main() 35 if (clock_gettime(CLOCK_REALTIME, &tsafter) == -1) { in main()
|
H A D | 3-1.c | 31 if (clock_gettime(CLOCK_REALTIME, &tsbefore) != 0) { in main() 41 if (clock_nanosleep(CLOCK_REALTIME, flags, &tssleep, NULL) != 0) { in main() 46 if (clock_gettime(CLOCK_REALTIME, &tsafter) == -1) { in main()
|
H A D | 2-1.c | 30 if (clock_gettime(CLOCK_REALTIME, &tsbefore) != 0) { in main() 40 if (clock_nanosleep(CLOCK_REALTIME, flags, &tssleep, NULL) != 0) { in main() 45 if (clock_gettime(CLOCK_REALTIME, &tsafter) == -1) { in main()
|