All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/421: stop test from hanging on buggy kernels
@ 2017-07-19 20:35 Eric Biggers
  2017-07-24  8:30 ` Carlos Maiolino
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2017-07-19 20:35 UTC (permalink / raw)
  To: fstests; +Cc: Eric Biggers

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] generic/421: stop test from hanging on buggy kernels
  2017-07-19 20:35 [PATCH] generic/421: stop test from hanging on buggy kernels Eric Biggers
@ 2017-07-24  8:30 ` Carlos Maiolino
  0 siblings, 0 replies; 2+ messages in thread
From: Carlos Maiolino @ 2017-07-24  8:30 UTC (permalink / raw)
  To: Eric Biggers; +Cc: fstests, Eric Biggers

On Wed, Jul 19, 2017 at 01:35:51PM -0700, Eric Biggers wrote:
> 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>

Look fine

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Carlos

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-24  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-19 20:35 [PATCH] generic/421: stop test from hanging on buggy kernels Eric Biggers
2017-07-24  8:30 ` Carlos Maiolino

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.