metan-ucw / runltp-ng

Minimalistic LTP testrunner
11 stars 16 forks source link

Some update for Fedora supporting #28

Closed wangli5665 closed 3 years ago

wangli5665 commented 3 years ago

Some update for runltp-ng:

  1. add support for fedora
  2. support excluding more tests (e.g. --exclude="access03 access04")
  3. support including more tests (e.g. --include="access02 access03")
  4. use SPDX-License-Identifier
  5. rebase to the latest main branch
pevik commented 3 years ago

Reviewed-by: Petr Vorel <petr.vorel@gmail.com> to whole patchset. although it's simple enough to be merged, I prefer to wait for @metan-ucw.

metan-ucw commented 3 years ago

The whole patchset looks good to me.

I do have local changes that add a few more dependencies into install phase, mkfs, quota, etc.

diff --git a/install_pkg.pm b/install_pkg.pm
index 1ea2516..dfb300b 100755
--- a/install_pkg.pm
+++ b/install_pkg.pm
@@ -34,7 +34,27 @@ sub foo_to_pkg
                'pkg-config' => 'pkg-config',
                'make' => 'make',
                'gcc' => 'gcc',
+               'bc' => 'bc',

+               # mkfs.foo
+               'dosfstools' => 'dosfstools',
+               'xfsprogs' => 'xfsprogs',
+               'e2fsprogs' => 'e2fsprogs',
+               'btrfsprogs' => 'btrfsprogs',
+               'btrfsprogs-debian' => 'btrfs-progs',
+
+               # FS quota tools
+               'quota' => 'quota',
+
+               # NFS tools
+               'nfs-utils' => 'nfs-utils',
+               'nfs-utils-debian' => 'nfs-kernel-server',
+
+               # kernel devel
+               'kernel-devel' => 'kernel-devel',
+               'kernel-devel-debian' => 'linux-headers-`uname -r`',
+
+               # devel libs
                'libaio-devel-debian' => 'libaio-dev',
                'libacl-devel-debian' => 'libacl1-dev',
                'libattr-devel-debian' => 'libattr1-dev',
@@ -136,7 +156,7 @@ sub install_ltp_pkgs
        return unless defined($distro);

        # Attempt to install required packages
-       my @required_pkgs = ('make', 'autoconf', 'automake', 'pkg-config', 'gcc');
+       my @required_pkgs = ('make', 'autoconf', 'automake', 'pkg-config', 'gcc', 'bc');

        # We need at least one
        push(@required_pkgs, 'git');
@@ -151,6 +171,24 @@ sub install_ltp_pkgs
                'libnuma-devel');
        push(@required_pkgs, @devel_libs);

+       # We need mkfs.foo at runtime
+       my @mkfs = (
+               'dosfstools',
+               'xfsprogs',
+               'e2fsprogs',
+               'btrfsprogs',
+       );
+       push(@required_pkgs, @mkfs);
+
+       # FS quota tests needs quota tools
+       push(@required_pkgs, ('quota'));
+
+       # NFS tests needs exportfs
+       push(@required_pkgs, ('nfs-utils'));
+
+       # Kernel devel so that we can build modules
+       push(@required_pkgs, ('kernel-devel'));
+
        my @cmds = ();
        push(@cmds, update_pkg_db($distro));
        push(@cmds, install_pkg($distro, \@required_pkgs));

It may be cleaner to apply these changes first then update the patch that adds fedora support so that we have all required fedora packages added in a single patch.

wangli5665 commented 3 years ago

It may be cleaner to apply these changes first then update the patch that adds fedora support so that we have all required fedora packages added in a single patch.

Sure, feel free to update your main branch, and I will rebase the patch accordingly.

pevik commented 3 years ago

And I then update https://github.com/metan-ucw/runltp-ng/pull/30.

metan-ucw commented 3 years ago

FYI I've pushed the changes.

wangli5665 commented 3 years ago

FYI rebased to the latest.

pevik commented 3 years ago

@wangli5665 maybe you want to add Fedora setup in pkg_to_m32().

wangli5665 commented 3 years ago

@wangli5665 maybe you want to add Fedora setup in pkg_to_m32().

Sure, I'll have a look when available. Thanks!