From 19da88bb9209c7495f272a8d41d0ab9e804b1f76 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 17 Feb 2021 15:59:34 -0300 Subject: y2038: Add test coverage A new 'tests-y2038' rule is added, which adds the required 64 bit time flags and included in the 'tests' rule. The current coverage is: * libc: - adjtime - adjtimex - clock_adjtime - clock_getres tst-clock, tst-cpuclock1 - clock_gettime tst-clock, tst-clock2, tst-cpuclock1 - clock_nanosleep tst-clock_nanosleep, tst-cpuclock1 - clock_settime tst-clock2 - ctime tst-ctime - ctime_r - difftime tst-difftime - fstat - fstatat - futimens - futimes - futimesat - getitimer - getrusage - gettimeofday tst-clock_nanosleep - gmtime - gmtime_r - lstat - lutimes - mktime - mq_timedreceive tst-mqueue{1248} - mq_timedsend tst-mqueue{1248} - nanosleep tst-cpuclock2, tst-mqueue8, tst-clock, tst-cpuclock1 - ntp_adjtime - ntp_gettime - ntp_gettimex - ppoll64 - pselect - recvmmsg tst-cancel4_2 - sched_rr_get_interval - select - semtimedop - setitimer - settimeofday - sigtimedwait - stat - time tst-mqueue1, tst-mqueue2, tst-mqueue4, tst-mqueue8 - timegm - timer_gettime tst-timer4 - timer_settime - timerfd_gettime - timerfd_settime - timespec_get - utime - utimensat - utimes - wait3 - wait4_time64 * libpthread: - cnd_timedwait - mtx_timedlock - pthread_clockjoin_np - pthread_cond_clockwait - pthread_cond_timedwait - pthread_mutex_clocklock - pthread_mutex_timedlock - pthread_rwlock_clockrdlock - pthread_rwlock_clockwrlock - pthread_rwlock_timedrdlock - pthread_rwlock_timedwrlock - pthread_timedjoin_np - sem_clockwait - sem_timedwait - thrd_sleep * librt: - aio_suspend - mq_timedreceive tst-mqueue{1248} - mq_timedsend tst-mqueue{1248} - timer_gettime tst-timer4 - timer_settime tst-timer4 * libanl: - gai_suspend_time --- Makerules | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Makerules') diff --git a/Makerules b/Makerules index ca9885436e..0a14d01160 100644 --- a/Makerules +++ b/Makerules @@ -771,7 +771,7 @@ endif $(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \ $(patsubst %.oS,%.d,$(filter %.oS,$(extra-objs))) \ $(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \ - $(addsuffix .d,$(tests) $(tests-internal) $(xtests) $(test-srcs)) + $(addsuffix .d,$(tests) $(tests-internal) $(xtests) $(test-srcs) $(tests-y2038)) ifeq ($(build-programs),yes) +depfiles += $(addsuffix .d,$(others) $(sysdep-others)) endif @@ -1286,6 +1286,17 @@ check: tests .PHONY: xcheck xcheck: xtests +# Handle tests-y2038 tests they should be built with LFS and 64-bit time +# support. +include $(o-iterator) +define o-iterator-doit +$(foreach f,$(tests-y2038),$(objpfx)$(f)$(o)): CFLAGS += -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 +endef +object-suffixes-left := $(all-object-suffixes) +include $(o-iterator) + +tests += $(foreach t,$(tests-y2038),$(t)) + # The only difference between MODULE_NAME=testsuite and MODULE_NAME=nonlib is # that almost all internal declarations from config.h, libc-symbols.h, and # include/*.h are not available to 'testsuite' code, but are to 'nonlib' code. -- cgit v1.2.1