fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Theodore Ts'o <tytso@mit.edu>
Cc: fstests@vger.kernel.org
Subject: [xfstests-bld PATCH v2] gen-tarball: add 'set -e'
Date: Wed, 11 Nov 2020 13:35:15 -0800	[thread overview]
Message-ID: <20201111213515.320012-1-ebiggers@kernel.org> (raw)
In-Reply-To: <X6xWtkUQeUGcE786@sol.localdomain>

From: Eric Biggers <ebiggers@google.com>

'make install' in xfstests was temporarily broken (it was broken by
commit 10f3f9707cca and fixed by commit 1de2b58b8e29).  gen-tarball
didn't notice this, resulting in test appliances being "successfully"
built but not actually containing all the xfstests files.

Fix gen-tarball to check for errors by adding 'set -e'.  To make this
work, adjust a few commands that are expected to fail.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---

v2: handle case where kvm-xfstests/test-appliance/debs doesn't exist

 gen-tarball | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/gen-tarball b/gen-tarball
index 7d38b95..b8e3307 100755
--- a/gen-tarball
+++ b/gen-tarball
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+set -e
+
 if test -f config.custom ; then
 	. config.custom
 else
@@ -59,7 +61,11 @@ else
     cp xfstests-dev/README* xfstests
 fi
 echo "xfstests-bld	$(git describe --always --dirty) ($(git log -1 --pretty=%cD))" > xfstests-bld.ver
-debs_vers=$(find kvm-xfstests/test-appliance/debs -name "*.ver" -print 2>/dev/null)
+if test -e kvm-xfstests/test-appliance/debs ; then
+    debs_vers=$(find kvm-xfstests/test-appliance/debs -name "*.ver" -print)
+else
+    debs_vers=
+fi
 cat *.ver $debs_vers | sort > xfstests/git-versions
 if test -f build-distro ; then
     cp build-distro xfstests/build-distro
@@ -72,15 +78,19 @@ if test -d bld/usr/bin ; then
     cp bld/usr/bin/* xfstests/bin
 fi
 cp bld/lib/client.txt xfstests/lib
-cp bld/lib/libimaevm.so.0.0.0 xfstests/lib
-ln -s libimaevm.so.0.0.0 xfstests/lib/libimaevm.so.0
+# ima-evm-utils is optional.
+if test -e bld/lib/libimaevm.so.0.0.0; then
+    cp bld/lib/libimaevm.so.0.0.0 xfstests/lib
+    ln -s libimaevm.so.0.0.0 xfstests/lib/libimaevm.so.0
+fi
 rm -f xfstests/bin/compile_et xfstests/bin/mk_cmds
 for i in ltp/fsstress ltp/fsx ltp/aio-stress src/godown
 do
     ln -s ../$i xfstests/bin
 done
 echo "STRIP xfstests/*"
-find xfstests -mindepth 2 -type f -perm /0111 | xargs $STRIP 2> /dev/null
+find xfstests -mindepth 2 -type f -perm /0111 | xargs $STRIP 2> /dev/null \
+    || true
 echo "TAR xfstests"
 find xfstests blktests -path blktests/.git -prune -o -print0 | \
     LC_ALL=C sort -z | \
-- 
2.29.2


  reply	other threads:[~2020-11-11 21:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-01 17:24 [xfstests-bld PATCH] gen-tarball: add 'set -e' Eric Biggers
2020-11-11 19:21 ` Eric Biggers
2020-11-11 21:25   ` Eric Biggers
2020-11-11 21:35     ` Eric Biggers [this message]
2020-11-12  3:51       ` [xfstests-bld PATCH v2] " Theodore Y. Ts'o

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=20201111213515.320012-1-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).