From 8948eff2c9a393d20ace0d56457009a05bb8a1ce Mon Sep 17 00:00:00 2001 From: Sachin Sant Date: Wed, 20 Mar 2024 12:22:41 +0530 Subject: [PATCH] fs/xfstests: Move local.config copy operation 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 --- fs/xfstests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/xfstests.py b/fs/xfstests.py index 5e6652def..6c7a0311e 100644 --- a/fs/xfstests.py +++ b/fs/xfstests.py @@ -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 @@ -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: