Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-runner: rework output dir construction #17167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robn
Copy link
Member

@robn robn commented Mar 22, 2025

[Sponsors: Klara, Inc., Wasabi Technology, Inc.]

Motivation and Context

Test output dirs are inconsistent. Sometimes things go under functional/, sometimes not, and single test mode doesn't always do the same thing as the full test suite, even though the runfile group appears the same.

Description

The old code would compare all the test group names to work out some sort of common path, but it didn't appear to work consistently, sometimes placing output in a top-level dir, other times in one or more subdirs. (I confess, I do not quite understand what it's supposed to do).

This is a very simple rework that simply looks at all the test group paths, removes common leading components, and uses the remainder as the output directory. This should work because groups paths are unique, and means we get a output dir tree of roughly the same shape as the test groups in the runfiles and the test source dirs themselves.

How Has This Been Tested?

Playing with running different tests and comparing output. The main comparison is a full ZTS run and comparing the output dir structure with one from a few days ago: before after.

Simple example. The acl tag has some subgroups, alloc_class does not. Without this change:

/var/tmp/test_results/20250216T104228/acl/off
/var/tmp/test_results/20250216T104228/acl/posix:Linux
/var/tmp/test_results/20250216T104228/acl/posix-sa:Linux
/var/tmp/test_results/20250216T104228/functional/alloc_class

With:

/var/tmp/test_results/20250321T152726/output/acl/off
/var/tmp/test_results/20250321T152726/output/acl/posix:Linux
/var/tmp/test_results/20250321T152726/output/acl/posix-sa:Linux
/var/tmp/test_results/20250321T152726/output/alloc_class

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

The old code would compare all the test group names to work out some
sort of common path, but it didn't appear to work consistently,
sometimes placing output in a top-level dir, other times in one or more
subdirs. (I confess, I do not quite understand what it's supposed to
do).

This is a very simple rework that simply looks at all the test group
paths, removes common leading components, and uses the remainder as the
output directory. This should work because groups paths are unique, and
means we get a output dir tree of roughly the same shape as the test
groups in the runfiles and the test source dirs themselves.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
@robn robn force-pushed the zts-sensible-output-dirs branch from c807046 to a7cd900 Compare March 22, 2025 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant