]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: support check for uuidgen utility
authorBrian Foster <bfoster@redhat.com>
Thu, 16 Jun 2016 12:28:48 +0000 (08:28 -0400)
committerEryu Guan <eguan@redhat.com>
Tue, 21 Jun 2016 05:54:44 +0000 (13:54 +0800)
A recent test uses the uuidgen utility to generate UUID-based
filenames, but this package is not necessarily installed as part of
the core packages of every distro.

As such, add the UUIDGEN_PROG environment variable to the common
configuration and update the test to require the existence of
uuidgen to run.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
README
common/config
tests/xfs/306

diff --git a/README b/README
index 3800df767f006a06020c0e1d39fd73f4fef99947..2647e1272abe0e4524d7b293d3d655d135e2fe9d 100644 (file)
--- a/README
+++ b/README
@@ -8,7 +8,8 @@ Building Linux:
          For example, for Ubuntu:
                "sudo apt-get install xfslibs-dev uuid-dev libtool-bin e2fsprogs
                 automake gcc libuuid1 quota attr libattr1-dev make
-                libacl1-dev libaio-dev xfsprogs libgdbm-dev gawk fio dbench"
+                libacl1-dev libaio-dev xfsprogs libgdbm-dev gawk fio dbench
+                uuid-runtime"
        - run make
        - run make install
        - create fsgqa test user ("sudo useradd fsgqa")
index c25b1ece5420e41067a668dcc0b726511d367d3b..713f7c7ea113bc6381ffff4204e8f65c7b6b8a69 100644 (file)
@@ -196,6 +196,7 @@ export RESTORE_PROG="`set_prog_path restore`"
 export LVM_PROG="`set_prog_path lvm`"
 export CHATTR_PROG="`set_prog_path chattr`"
 export DEBUGFS_PROG="`set_prog_path debugfs`"
+export UUIDGEN_PROG="`set_prog_path uuidgen`"
 
 # use 'udevadm settle' or 'udevsettle' to wait for lv to be settled.
 # newer systems have udevadm command but older systems like RHEL5 don't.
index eb51e410b6e2ecc23e7a93bafb276e918adc9ec7..b373079401f670f760d4f2597f05f0b9f550eadf 100755 (executable)
@@ -51,6 +51,7 @@ _supported_os Linux
 
 _require_scratch_nocheck       # check complains about single AG fs
 _require_xfs_io_command "fpunch"
+_require_command $UUIDGEN_PROG uuidgen
 
 rm -f $seqres.full
 
@@ -63,7 +64,7 @@ _scratch_mount
 # sufficiently populates a 64k directory block.
 mkdir $SCRATCH_MNT/src
 for i in $(seq 0 1023); do
-       touch $SCRATCH_MNT/src/`uuidgen`
+       touch $SCRATCH_MNT/src/`$UUIDGEN_PROG`
 done
 
 # precreate target dirs while we still have free space for inodes