This repository has been archived by the owner on Dec 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
111 lines (101 loc) · 2.81 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#include <stdio.h>
#include <time.h>
#include <stdarg.h>
#include "id_kernel.h"
#include "id_glibc.h"
#include "tests.h"
#include "test_clock_gettime_settime.h"
#include "test_ctime.h"
#include "test_difftime.h"
#include "test_gmtime.h"
#include "test_gmtime_r.h"
#include "test_mktime.h"
#include "test_ctime_r.h"
#include "test_timegm.h"
#include "test_clock_nanosleep.h"
#include "test_timespec_get.h"
#include "test_futimens.h"
#include "test_futimes.h"
#include "test_utimensat.h"
#include "test_timer_gettime_settime.h"
#include "test_timerfd_gettime_settime.h"
#include "test_stat.h"
#include "test_fstat.h"
#include "test_lstat.h"
#include "test_fstatat.h"
#include "test_time.h"
#include "test_gettimeofday_settimeofday.h"
#include "test_mq_timedreceive.h"
#include "test_mq_timedsend.h"
#include "test_msgctl.h"
#include "test_sched_rr_get_interval.h"
#include "test_nanosleep.h"
#include "test_adjtime.h"
#include "test_adjtimex.h"
#include "test_clock_adjtime.h"
#include "test_utime.h"
#include "test_set_getitimer.h"
#include "test_ppoll.h"
#include "test_recvmmsg.h"
#include "test_pthread_timedjoin_np.h"
#include "test_pthread_cond_timedwait.h"
#include "test_pthread_rwlock_timed.h"
#include "test_sem_timedwait.h"
# if defined(_TIME_BITS) && _TIME_BITS==64
#define _TIME_T_SIZE 8
#else
#define _TIME_T_SIZE 4
#endif
int main(int argc __attribute__((unused)), char*argv[] __attribute__((unused)))
{
int time_t_size = sizeof(time_t);
if (time_t_size != _TIME_T_SIZE)
{
printf("sizeof(time_t) = %d (expected %d)\n", time_t_size, _TIME_T_SIZE) ;
return 1;
}
int err = print_kernel_version();
if (!err) err = print_glibc_version();
if (err) return 1;
printf("\n");
tests_init();
test_run(test_clock_gettime_settime);
test_run(test_difftime);
test_run(test_ctime);
test_run(test_gmtime);
test_run(test_gmtime_r);
test_run(test_mktime);
test_run(test_ctime_r);
test_run(test_timegm);
test_run(test_clock_nanosleep);
test_run(test_timespec_get);
test_run(test_futimens);
test_run(test_futimes);
test_run(test_utimensat);
test_run(test_ppoll);
test_run(test_timer_gettime_settime);
test_run(test_timerfd_gettime_settime);
test_run(test_stat);
test_run(test_fstat);
test_run(test_lstat);
test_run(test_fstatat);
test_run(test_time_);
test_run(test_gettimeofday_settimeofday);
test_run(test_mq_timedreceive);
test_run(test_mq_timedsend);
test_run(test_msgctl);
test_run(test_sched_rr_get_interval);
test_run(test_nanosleep);
test_run(test_adjtime);
test_run(test_adjtimex);
test_run(test_clock_adjtime);
test_run(test_pthread_timedjoin_np);
test_run(test_pthread_cond_timedwait);
test_run(test_pthread_rwlock_timed);
test_run(test_sem_timedwait);
test_run(test_utime);
test_run(test_recvmmsg);
test_run(test_set_getitimer);
tests_report();
return 0;
}