Skip to content

Commit

Permalink
fs/xfstests: Move local.config copy operation
Browse files Browse the repository at this point in the history
With upstream as a target, xfstest test fails to copy local.config

(1/1) fs/xfstests.py:Xfstests.test;run-disk_type-fs_type-fs_xfs_4k-run_type-upstream-8eea: ERROR: stat: path should be string, bytes, os.PathLike or integer, not NoneType (23.60 s)

This happens since teststmpdir directory is changed during compilation
of upstream code (various progs).

Move the stub before the upstream as a target check stanza to avoid
this failure.

Signed-off-by: Sachin Sant <[email protected]>
  • Loading branch information
sacsant committed Mar 25, 2024
1 parent 74f107d commit 8948eff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/xfstests.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ def setUp(self):
if os.path.exists(f"{self.teststmpdir}/results"):
shutil.rmtree(f"{self.teststmpdir}/results")

shutil.copyfile(self.get_data('local.config'),
os.path.join(self.teststmpdir, 'local.config'))

self.devices = []
self.part = None

Expand Down Expand Up @@ -351,9 +354,6 @@ def setUp(self):
if self.fs_to_test == "btrfs":
self.num_loop_dev = 5

shutil.copyfile(self.get_data('local.config'),
os.path.join(self.teststmpdir, 'local.config'))

if self.dev_type == 'loop':
loop_size = self.params.get('loop_size', default='7GiB')
if not self.base_disk:
Expand Down

0 comments on commit 8948eff

Please sign in to comment.