From: Eric Biggers <ebiggers3@gmail.com>
To: fstests@vger.kernel.org
Cc: Eric Biggers <ebiggers@google.com>
Subject: [PATCH] generic/421: stop test from hanging on buggy kernels
Date: Wed, 19 Jul 2017 13:35:51 -0700 [thread overview]
Message-ID: <20170719203551.126851-1-ebiggers3@gmail.com> (raw)
From: Eric Biggers <ebiggers@google.com>
On some buggy kernels, the 'find' command in generic/421 encounters a
"Permission denied" error when trying to search $dir, so it doesn't find
the file it's supposed to. This causes 'cat' to read from stdin,
hanging the test. Quote the argument to cat to make the test fail right
away rather than hanging.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
tests/generic/421 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/generic/421 b/tests/generic/421
index 1b2f66f9..9ab48d47 100755
--- a/tests/generic/421
+++ b/tests/generic/421
@@ -98,7 +98,7 @@ keyid=$(_revoke_encryption_key $keydesc)
# ciphertext on key revocation. Therefore, the name of the file we're opening
# here may be in either plaintext or ciphertext depending on the kernel version,
# and ciphertext names are unpredictable anyway, so just use 'find' to find it.
-cat $(find $dir -type f) > /dev/null
+cat "$(find $dir -type f)" > /dev/null
# Wait for readers to exit
touch $tmp.done
--
2.14.0.rc0.284.gd933b75aa4-goog
next reply other threads:[~2017-07-19 20:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 20:35 Eric Biggers [this message]
2017-07-24 8:30 ` [PATCH] generic/421: stop test from hanging on buggy kernels Carlos Maiolino
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=20170719203551.126851-1-ebiggers3@gmail.com \
--to=ebiggers3@gmail.com \
--cc=ebiggers@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox