Tests: select_poll_epoll: Add support for _time64
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 11 Nov 2022 22:35:12 +0000 (17:35 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 17 Apr 2023 20:36:38 +0000 (16:36 -0400)
commit2a2ac572b7d75ef18ce4dfe73b89a00da44bcb61
tree16e3de1e913d518181667178078dfcf275b76167
parent671e39d79a1ad9c3f13c4784a26710a5b1f14237
Tests: select_poll_epoll: Add support for _time64

Add support for the 64-bit time_t syscalls SYS_ppoll_time64
and SYS_pselect6_time64.

These syscalls exist on 32-bit platforms since the 5.1 kernel. 32-bit
platforms with a 64-bit time_t only have these and don't have the
original syscalls (such as 32-bit RISC-V).

In doing so, the original syscalls were renamed to add the `_time32`
suffix which causes the validation steps to fail.

This patch ensures that the 64-bit version of the pselect and ppoll
syscalls are called whenever they are available, allowing the tests to
succeed.

It also ensures that we don't attempt to use the 32-bit versions that
don't exist on newer 32-bit platforms like RISCV-32.

The test is also cleaned-up:

  - The *invalid_pointer, *invalid_fd, *ulong_max, and *buffer_overflow
    tests are identical except for the syscall(...) invocation. They are
    combined to share as much code as possible regardless of which
    syscalls the platform's ABI supports.

  - Harmonized test names between the test script and test application

  - Test names are printed when using the list option and used to launch
    a test (rather than a numeric id)

  - Allow the test application to print the list of supported tested
    syscalls

Fixes: https://github.com/lttng/lttng-tools/pull/162
Change-Id: I974f780022441fedfa45414d672092606e657cf6
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/kernel/select_poll_epoll.cpp
tests/regression/kernel/test_select_poll_epoll
tests/regression/kernel/validate_select_poll_epoll.py
This page took 0.025065 seconds and 4 git commands to generate.