Skip to content

Commit

Permalink
Merge pull request avocado-framework-tests#2778 from sacsant/xfstest
Browse files Browse the repository at this point in the history
Xfstest fixes with upstream as a target
  • Loading branch information
PraveenPenguin authored Mar 29, 2024
2 parents dd7d9b7 + 3fc8e18 commit 86b6fbf
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions fs/xfstests.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,21 @@ def __setUp_packages(self):
packages.extend(['acl', 'bc', 'indent', 'libtool', 'lvm2',
'xfsdump', 'psmisc', 'sed', 'libacl-devel',
'libattr-devel', 'libaio-devel', 'libuuid-devel',
'openssl-devel', 'xfsprogs-devel', 'gettext',
'libblkid-devel', 'lzo-devel', 'zlib-devel',
'e2fsprogs-devel', 'asciidoc', 'xmlto',
'libzstd-devel', 'systemd-devel', 'meson',
'gcc-c++'])
'xfsprogs-devel', 'gcc-c++'])
if self.detected_distro.name == 'rhel' and (
self.detected_distro.version.startswith('9')):
packages.extend(['inih-devel'])

if self.detected_distro.name == 'SuSE':
packages.extend(['libbtrfs-devel', 'libcap-progs',
'liburcu-devel', 'libinih-devel'])
'liburcu-devel', 'libinih-devel',
'libopenssl-devel', 'gettext-tools'])
else:
packages.extend(['btrfs-progs-devel', 'userspace-rcu-devel'])
packages.extend(['btrfs-progs-devel', 'userspace-rcu-devel'
'openssl-devel', 'gettext'])

packages_remove = ['indent', 'btrfs-progs-devel']
if self.detected_distro.name == 'rhel' and (
Expand Down Expand Up @@ -218,9 +222,6 @@ def setUp(self):
self.use_dd = True

self.dev_type = self.params.get('type', default='loop')

self.__setUp_packages()

self.logflag = self.params.get('logdev', default=False)
self.fs_to_test = self.params.get('fs', default='ext4')
self.args = self.params.get('args', default='-g quick')
Expand All @@ -243,9 +244,14 @@ 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

self.__setUp_packages()

if self.run_type == 'upstream':
prefix = "/usr/local"
bin_prefix = "/usr/local/bin"
Expand Down Expand Up @@ -348,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 86b6fbf

Please sign in to comment.