All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-fscrypt@vger.kernel.org, Satya Tangirala <satyat@google.com>
Subject: [xfstests-bld PATCH] android-xfstests: create /dev/fd on the Android device
Date: Tue,  8 Dec 2020 20:33:05 -0800	[thread overview]
Message-ID: <20201209043305.77917-1-ebiggers@kernel.org> (raw)

From: Eric Biggers <ebiggers@google.com>

In order for bash process substitution (the syntax like "<(list)" or
">(list)") to work, /dev/fd has to be a symlink to /proc/self/fd.
/dev/fd doesn't exist on Android, so create it if it's missing.

This fixes xfstest generic/576.

Signed-off-by: Eric Biggers <ebiggers@google.com>
---
 kvm-xfstests/android-xfstests | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kvm-xfstests/android-xfstests b/kvm-xfstests/android-xfstests
index a8f9be9..7741162 100755
--- a/kvm-xfstests/android-xfstests
+++ b/kvm-xfstests/android-xfstests
@@ -244,6 +244,11 @@ if ! cut -d' ' -f2 /proc/mounts 2>/dev/null | grep -q '^$CHROOT_DIR/results$'; t
     mount --bind $RESULTS_DIR $CHROOT_DIR/results
 fi
 
+# /dev/fd needs to exist in order for bash process substitution to work.
+if [ ! -e /dev/fd ]; then
+	ln -s /proc/self/fd /dev/fd
+fi
+
 # Android puts loopback device nodes in /dev/block/ instead of /dev/.
 # But losetup can only find them in /dev/, so create them there too.
 for i in \`seq 0 7\`; do
-- 
2.29.2


             reply	other threads:[~2020-12-09  4:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  4:33 Eric Biggers [this message]
2020-12-10 19:19 ` [xfstests-bld PATCH] android-xfstests: create /dev/fd on the Android device 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=20201209043305.77917-1-ebiggers@kernel.org \
    --to=ebiggers@kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=satyat@google.com \
    --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 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.