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

zts: add a debug option to get full test output #16096

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

robn
Copy link
Member

@robn robn commented Apr 16, 2024

Motivation and Context

The test runner accumulates output from individual tests, then writes it to the log at the end. If a test hangs or crashes the system half way through, we get no insight into how it got to where it did.

Description

This adds a -D option for "debug". When set, all test output is written to stdout.

How Has This Been Tested?

By hand. Traditional:

$ /usr/local/share/zfs/zfs-tests.sh -Kt zfs_bookmark_cliargs
[    5.995077] ZTS run /usr/local/share/zfs/zfs-tests/tests/functional/cli_root/zfs_bookmark/setup
Test: /usr/local/share/zfs/zfs-tests/tests/functional/cli_root/zfs_bookmark/setup (run as root) [00:00] [PASS]
[    6.353040] ZTS run /usr/local/share/zfs/zfs-tests/tests/functional/cli_root/zfs_bookmark/zfs_bookmark_cliargs.ksh
Test: /usr/local/share/zfs/zfs-tests/tests/functional/cli_root/zfs_bookmark/zfs_bookmark_cliargs.ksh (run as root) [00:01] [PASS]
[    8.264240] ZTS run /usr/local/share/zfs/zfs-tests/tests/functional/cli_root/zfs_bookmark/cleanup
Test: /usr/local/share/zfs/zfs-tests/tests/functional/cli_root/zfs_bookmark/cleanup (run as root) [00:00] [PASS]

New recipe:

$ /usr/local/share/zfs/zfs-tests.sh -DKt zfs_bookmark_cliargs
[    4.893933] ZTS run /usr/local/share/zfs/zfs-tests/tests/functional/cli_root/zfs_bookmark/setup
NOTE: begin default_setup_noexit
SUCCESS: zpool create -f testpool loop0
SUCCESS: zfs create testpool/testfs
SUCCESS: zfs set mountpoint=/var/tmp/testdir testpool/testfs
SUCCESS: zfs create testpool/testfs/child
SUCCESS: zfs create testpool/testfs_with_suffix
SUCCESS: zfs create testpool/testfs/recv
Test: /usr/local/share/zfs/zfs-tests/tests/functional/cli_root/zfs_bookmark/setup (run as root) [00:00] [PASS]
[    5.264179] ZTS run /usr/local/share/zfs/zfs-tests/tests/functional/cli_root/zfs_bookmark/zfs_bookmark_cliargs.ksh
ASSERTION: 'zfs bookmark' should work only when passed valid arguments.
SUCCESS: zfs snapshot testpool/testfs@snapshot
SUCCESS: zfs bookmark testpool/testfs@snapshot testpool/testfs#bookmark
SUCCESS: eval bkmarkexists testpool/testfs#bookmark
SUCCESS: zfs destroy testpool/testfs#bookmark
SUCCESS: zfs bookmark @snapshot testpool/testfs#bookmark
SUCCESS: eval bkmarkexists testpool/testfs#bookmark
...

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 test runner accumulates output from individual tests, then writes it
to the log at the end. If a test hangs or crashes the system half way
through, we get no insight into how it got to where it did.

This adds a -D option for "debug". When set, all test output is written
to stdout.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Rob Norris <[email protected]>
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I'm sure this will be useful.

@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Apr 16, 2024
@behlendorf behlendorf merged commit cf60db6 into openzfs:master Apr 16, 2024
25 checks passed
robn added a commit to robn/zfs that referenced this pull request Jul 17, 2024
The test runner accumulates output from individual tests, then writes it
to the log at the end. If a test hangs or crashes the system half way
through, we get no insight into how it got to where it did.

This adds a -D option for "debug". When set, all test output is written
to stdout.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Akash B <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes openzfs#16096
(cherry picked from commit cf60db6)
robn added a commit to robn/zfs that referenced this pull request Jul 17, 2024
The test runner accumulates output from individual tests, then writes it
to the log at the end. If a test hangs or crashes the system half way
through, we get no insight into how it got to where it did.

This adds a -D option for "debug". When set, all test output is written
to stdout.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Akash B <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes openzfs#16096
(cherry picked from commit cf60db6)
@robn robn mentioned this pull request Jul 17, 2024
13 tasks
robn added a commit to robn/zfs that referenced this pull request Jul 17, 2024
The test runner accumulates output from individual tests, then writes it
to the log at the end. If a test hangs or crashes the system half way
through, we get no insight into how it got to where it did.

This adds a -D option for "debug". When set, all test output is written
to stdout.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Akash B <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes openzfs#16096
(cherry picked from commit cf60db6)
robn added a commit to robn/zfs that referenced this pull request Jul 18, 2024
The test runner accumulates output from individual tests, then writes it
to the log at the end. If a test hangs or crashes the system half way
through, we get no insight into how it got to where it did.

This adds a -D option for "debug". When set, all test output is written
to stdout.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Akash B <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes openzfs#16096
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Sep 4, 2024
The test runner accumulates output from individual tests, then writes it
to the log at the end. If a test hangs or crashes the system half way
through, we get no insight into how it got to where it did.

This adds a -D option for "debug". When set, all test output is written
to stdout.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Akash B <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes openzfs#16096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants