Message ID | 20200429112834.24908-1-vincenzo.frascino@arm.com (mailing list archive) |
---|---|
Headers | show |
Series | kselftest: Extend vDSO tests | expand |
On Wed, Apr 29, 2020 at 1:34 PM Vincenzo Frascino <vincenzo.frascino@arm.com> wrote: > > This series extends the kselftests for the vDSO library making sure: that > they compile correctly on non x86 platforms, that they can be cross > compiled and introducing new tests that verify the correctness of the > library. > > The so extended vDSO kselftests have been verified on all the platforms > supported by the unified vDSO library [1]. > > The only new patch that this series introduces is the first one, patch 2 and > patch 3 have already been reviewed in past as part of other series [2] [3]. > > [1] https://lore.kernel.org/lkml/20190621095252.32307-1-vincenzo.frascino@arm.com > [2] https://lore.kernel.org/lkml/20190621095252.32307-26-vincenzo.frascino@arm.com > [3] https://lore.kernel.org/lkml/20190523112116.19233-4-vincenzo.frascino@arm.com Hi Vincenzo, Not sure if you are aware of the recent bug report about clock_gettime64() returning invalid times on some arm32 kernels: https://github.com/raspberrypi/linux/issues/3579 Regardless of when that gets fixed or by whom, I wonder if kselftest should also check for consistency, i.e. call both the vdso and the syscall version of clock_gettime() and clock_gettime64() and check that the results are always in sequence. Arnd
Hi Arnd, On 5/5/20 3:50 PM, Arnd Bergmann wrote: > On Wed, Apr 29, 2020 at 1:34 PM Vincenzo Frascino > <vincenzo.frascino@arm.com> wrote: >> >> This series extends the kselftests for the vDSO library making sure: that >> they compile correctly on non x86 platforms, that they can be cross >> compiled and introducing new tests that verify the correctness of the >> library. >> >> The so extended vDSO kselftests have been verified on all the platforms >> supported by the unified vDSO library [1]. >> >> The only new patch that this series introduces is the first one, patch 2 and >> patch 3 have already been reviewed in past as part of other series [2] [3]. >> >> [1] https://lore.kernel.org/lkml/20190621095252.32307-1-vincenzo.frascino@arm.com >> [2] https://lore.kernel.org/lkml/20190621095252.32307-26-vincenzo.frascino@arm.com >> [3] https://lore.kernel.org/lkml/20190523112116.19233-4-vincenzo.frascino@arm.com > > Hi Vincenzo, > > Not sure if you are aware of the recent bug report about clock_gettime64() > returning invalid times on some arm32 kernels: > https://github.com/raspberrypi/linux/issues/3579 > No, I was not aware of the problem. There has been no mention on the arm list (unless I missed it). I can try to have a look at it as soon as I get some time. > Regardless of when that gets fixed or by whom, I wonder if kselftest should > also check for consistency, i.e. call both the vdso and the syscall version of > clock_gettime() and clock_gettime64() and check that the results are always > in sequence. > The test #4 partially does that: it calls syscall-vdso-syscall and verifies that the sequencing is correct. I reused the x86 code for that. I could extend it to clock_gettime64() and make sure it builds on all the platforms. > Arnd >
On Tue, May 5, 2020 at 5:03 PM Vincenzo Frascino <vincenzo.frascino@arm.com> wrote: > On 5/5/20 3:50 PM, Arnd Bergmann wrote: > > On Wed, Apr 29, 2020 at 1:34 PM Vincenzo Frascino <vincenzo.frascino@arm.com> wrote: > > > > Not sure if you are aware of the recent bug report about clock_gettime64() > > returning invalid times on some arm32 kernels: > > https://github.com/raspberrypi/linux/issues/3579 > > > > No, I was not aware of the problem. There has been no mention on the arm list > (unless I missed it). I can try to have a look at it as soon as I get some time. Right, it was on only on the musl list, and I had pinged you on IRC, but you must have been offline. > > Regardless of when that gets fixed or by whom, I wonder if kselftest should > > also check for consistency, i.e. call both the vdso and the syscall version of > > clock_gettime() and clock_gettime64() and check that the results are always > > in sequence. > > > > The test #4 partially does that: it calls syscall-vdso-syscall and verifies that > the sequencing is correct. I reused the x86 code for that. I could extend it to > clock_gettime64() and make sure it builds on all the platforms. Sounds good to me. Arnd
Hi Arnd, On 5/5/20 4:07 PM, Arnd Bergmann wrote: > On Tue, May 5, 2020 at 5:03 PM Vincenzo Frascino > <vincenzo.frascino@arm.com> wrote: >> On 5/5/20 3:50 PM, Arnd Bergmann wrote: >>> On Wed, Apr 29, 2020 at 1:34 PM Vincenzo Frascino <vincenzo.frascino@arm.com> wrote: >>> >>> Not sure if you are aware of the recent bug report about clock_gettime64() >>> returning invalid times on some arm32 kernels: >>> https://github.com/raspberrypi/linux/issues/3579 >>> >> >> No, I was not aware of the problem. There has been no mention on the arm list >> (unless I missed it). I can try to have a look at it as soon as I get some time. > > Right, it was on only on the musl list, and I had pinged you on IRC, but you > must have been offline. > Sorry about that, I did not get your message :( The only thing I can think it is that if it was last to last week, I was on holiday... Anyway thanks for pointing this out. >>> Regardless of when that gets fixed or by whom, I wonder if kselftest should >>> also check for consistency, i.e. call both the vdso and the syscall version of >>> clock_gettime() and clock_gettime64() and check that the results are always >>> in sequence. >>> >> >> The test #4 partially does that: it calls syscall-vdso-syscall and verifies that >> the sequencing is correct. I reused the x86 code for that. I could extend it to >> clock_gettime64() and make sure it builds on all the platforms. > > Sounds good to me. > > Arnd >
This series extends the kselftests for the vDSO library making sure: that they compile correctly on non x86 platforms, that they can be cross compiled and introducing new tests that verify the correctness of the library. The so extended vDSO kselftests have been verified on all the platforms supported by the unified vDSO library [1]. The only new patch that this series introduces is the first one, patch 2 and patch 3 have already been reviewed in past as part of other series [2] [3]. [1] https://lore.kernel.org/lkml/20190621095252.32307-1-vincenzo.frascino@arm.com [2] https://lore.kernel.org/lkml/20190621095252.32307-26-vincenzo.frascino@arm.com [3] https://lore.kernel.org/lkml/20190523112116.19233-4-vincenzo.frascino@arm.com Changes: -------- v2: - Addressed review comments from Andy. - Rebased on 5.7-rc3. Cc: Shuah Khan <shuah@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andy Lutomirski <luto@kernel.org> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Vincenzo Frascino (4): kselftest: Enable vDSO test on non x86 platforms kselftest: Extend vDSO selftest kselftest: Extend vDSO selftest to clock_getres kselftest: Move test_vdso to the vDSO test suite tools/testing/selftests/Makefile | 1 + tools/testing/selftests/vDSO/Makefile | 16 +- .../selftests/vDSO/vdso_clock_getres.c | 124 +++++++++ tools/testing/selftests/vDSO/vdso_config.h | 90 +++++++ .../vdso_correctness_test_x86.c} | 0 tools/testing/selftests/vDSO/vdso_full_test.c | 244 ++++++++++++++++++ tools/testing/selftests/x86/Makefile | 2 +- 7 files changed, 472 insertions(+), 5 deletions(-) create mode 100644 tools/testing/selftests/vDSO/vdso_clock_getres.c create mode 100644 tools/testing/selftests/vDSO/vdso_config.h rename tools/testing/selftests/{x86/test_vdso.c => vDSO/vdso_correctness_test_x86.c} (100%) create mode 100644 tools/testing/selftests/vDSO/vdso_full_test.c