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: zpool_split_indirect deletes zfstest log file #10324

Merged
merged 1 commit into from
May 14, 2020
Merged

ZTS: zpool_split_indirect deletes zfstest log file #10324

merged 1 commit into from
May 14, 2020

Conversation

jwk404
Copy link
Contributor

@jwk404 jwk404 commented May 13, 2020

Signed-off-by: John Kennedy john.kennedy@delphix.com

Motivation and Context

The cleanup routine for this test attempts to remove some temporary
files with rm -f $VDEV_*, but VDEV_ is undefined. As a result, all
files in the current working directory (/var/tmp/test_results/current)
get removed instead. This includes the complete log file of all tests.

Description

Change the rm to explicitly delete the created files.

How Has This Been Tested?

Ran the suite without any changes, and verified the log disappears during zpool_split_indirect.
Then ran the suite again with this change and verified the log doesn't get deleted.

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)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes.
  • I have run the ZFS Test Suite with this change applied.
  • All commit messages are properly formatted and contain Signed-off-by.

The cleanup routine for this test attempts to remove some temporary
files with `rm -f $VDEV_*`, but VDEV_ is undefined. As a result, all
files in the current working directory (/var/tmp/test_results/current)
get removed instead. This includes the complete log file of all tests.

Signed-off-by: John Kennedy <john.kennedy@delphix.com>
@behlendorf behlendorf added Status: Code Review Needed Ready for review and testing Component: Test Suite Indicates an issue with the test framework or a test case labels May 13, 2020
@behlendorf
Copy link
Contributor

cc: @gamanakis

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Heh, that's a good one :)

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels May 13, 2020
@gamanakis
Copy link
Contributor

Good catch, thank you!

@behlendorf behlendorf merged commit e1fcd94 into openzfs:master May 14, 2020
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
The cleanup routine for this test attempts to remove some temporary
files with `rm -f $VDEV_*`, but VDEV_ is undefined. As a result, all
files in the current working directory (/var/tmp/test_results/current)
get removed instead. This includes the complete log file of all tests.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: George Amanakis <gamanakis@gmail.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: John Kennedy <john.kennedy@delphix.com>
Closes openzfs#10324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants