[PATCH 0/3] selftests: openat2: migrate to kselftests harness

Aleksa Sarai posted 3 patches 18 hours ago
tools/testing/selftests/openat2/Makefile           |   2 -
tools/testing/selftests/openat2/helpers.c          | 109 ------
tools/testing/selftests/openat2/helpers.h          | 164 ++++++---
tools/testing/selftests/openat2/openat2_test.c     | 223 ++++++-------
.../testing/selftests/openat2/rename_attack_test.c | 161 +++++----
tools/testing/selftests/openat2/resolve_test.c     | 368 ++++++++++++---------
6 files changed, 494 insertions(+), 533 deletions(-)
[PATCH 0/3] selftests: openat2: migrate to kselftests harness
Posted by Aleksa Sarai 18 hours ago
These tests were written in the early days of selftests' TAP support,
the more modern kselftest harness is much easier to follow and maintain.
The actual contents of the tests are unchanged by this change.

Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
---
Aleksa Sarai (3):
      selftests: openat2: move helpers to header
      selftests: openat2: switch from custom ARRAY_LEN to ARRAY_SIZE
      selftests: openat2: migrate to kselftest harness

 tools/testing/selftests/openat2/Makefile           |   2 -
 tools/testing/selftests/openat2/helpers.c          | 109 ------
 tools/testing/selftests/openat2/helpers.h          | 164 ++++++---
 tools/testing/selftests/openat2/openat2_test.c     | 223 ++++++-------
 .../testing/selftests/openat2/rename_attack_test.c | 161 +++++----
 tools/testing/selftests/openat2/resolve_test.c     | 368 ++++++++++++---------
 6 files changed, 494 insertions(+), 533 deletions(-)
---
base-commit: 5e4e16d498eccca363db526433803932921dd74f
change-id: 20260317-openat2-selftests-kunit-6939af23ee27


Kind regards,
-- 
Aleksa Sarai
https://www.cyphar.com/
Re: [PATCH 0/3] selftests: openat2: migrate to kselftests harness
Posted by Christian Brauner 17 hours ago
On Wed, Apr 01, 2026 at 12:43:30AM +1100, Aleksa Sarai wrote:
> These tests were written in the early days of selftests' TAP support,
> the more modern kselftest harness is much easier to follow and maintain.
> The actual contents of the tests are unchanged by this change.
> 
> Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
> ---

Looks all good to me. Do you want to maybe migrate the tests to the
filesystems/ subfolder as well?
Re: [PATCH 0/3] selftests: openat2: migrate to kselftests harness
Posted by Aleksa Sarai 17 hours ago
On 2026-03-31, Christian Brauner <brauner@kernel.org> wrote:
> On Wed, Apr 01, 2026 at 12:43:30AM +1100, Aleksa Sarai wrote:
> > These tests were written in the early days of selftests' TAP support,
> > the more modern kselftest harness is much easier to follow and maintain.
> > The actual contents of the tests are unchanged by this change.
> > 
> > Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
> > ---
> 
> Looks all good to me. Do you want to maybe migrate the tests to the
> filesystems/ subfolder as well?

Good point, I'll move it over in v2.

-- 
Aleksa Sarai
https://www.cyphar.com/