All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: fstests@vger.kernel.org
Subject: [PATCH] xfstests: support check for uuidgen utility
Date: Thu, 16 Jun 2016 08:28:48 -0400	[thread overview]
Message-ID: <1466080128-14544-1-git-send-email-bfoster@redhat.com> (raw)

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 UUID_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>
---

I assume the test is ultimately going to be renumbered so this could
also just be folded into the initial commit, if that is more
convenient...

Brian

 README        | 3 ++-
 common/config | 1 +
 tests/xfs/399 | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/README b/README
index 3800df7..2647e12 100644
--- 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")
diff --git a/common/config b/common/config
index cacd815..7ba8758 100644
--- a/common/config
+++ b/common/config
@@ -195,6 +195,7 @@ export DUMP_PROG="`set_prog_path dump`"
 export RESTORE_PROG="`set_prog_path restore`"
 export LVM_PROG="`set_prog_path lvm`"
 export CHATTR_PROG="`set_prog_path chattr`"
+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.
diff --git a/tests/xfs/399 b/tests/xfs/399
index 8cea305..82656d8 100755
--- a/tests/xfs/399
+++ b/tests/xfs/399
@@ -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
-- 
2.5.5


                 reply	other threads:[~2016-06-16 12:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466080128-14544-1-git-send-email-bfoster@redhat.com \
    --to=bfoster@redhat.com \
    --cc=fstests@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.