[LTP] [PATCH v2] syscalls: Add timer measurement library

Cyril Hrubis chrubis@suse.cz
Tue Jun 20 13:49:51 CEST 2017


Hi!
> - clock_getres/clock_gettime requires -rt for glibc < 2.17
> On RHEL5/6 I had to modify these Makefiles:
> #       modified:   include/mk/testcases.mk
> #       modified:   lib/newlib_tests/Makefile
> #       modified:   lib/tests/Makefile
> #       modified:   testcases/kernel/containers/netns/Makefile
> #       modified:   testcases/kernel/containers/share/Makefile

Hrm, looks like we have the very same problem as we had with the
mq_open() either we link everything with -lrt or figure out how to
separate the timer library and link it only with the timer testcases.
The problem here is that we call a funcition from the timer library from
the main library. And we cannot use weak stubs since we link statically.

Thinking of it using raw clock_* syscalls to avoid the dependency is not
a good option either since these are VDSO. These could still be reached
via syscall() it would be only slower and possibly broken since glibc
defaults to VDSO...

Or do you have a better idea how to avoid linking whole LTP with -lrt?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list