From: Eric Biggers <ebiggers3@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: fstests@vger.kernel.org, Eric Biggers <ebiggers@google.com>
Subject: [PATCH] android-xfstests: create loopback device nodes in standard location
Date: Fri, 10 Mar 2017 16:56:32 -0800 [thread overview]
Message-ID: <20170311005632.130135-1-ebiggers3@gmail.com> (raw)
From: Eric Biggers <ebiggers@google.com>
Android creates loopback device nodes in /dev/block/, where they can't
be found by losetup. Create them in /dev/ too so that losetup can find
them. This stops tests using loopback devices, e.g. generic/361 and
shared/298, from failing.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
kvm-xfstests/android-xfstests | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/kvm-xfstests/android-xfstests b/kvm-xfstests/android-xfstests
index e798c7e..3489bc2 100755
--- a/kvm-xfstests/android-xfstests
+++ b/kvm-xfstests/android-xfstests
@@ -94,6 +94,14 @@ if ! cut -d' ' -f2 /proc/mounts 2>/dev/null | grep -q '^$CHROOT_DIR/results$'; t
mkdir -p $RESULTS_DIR
mount --bind $RESULTS_DIR $CHROOT_DIR/results
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
+ if [ ! -e /dev/loop\$i ]; then
+ mknod /dev/loop\$i b 7 \$i
+ fi
+done
EOF
}
--
2.12.0.246.ga2ecc84866-goog
next reply other threads:[~2017-03-11 0:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 0:56 Eric Biggers [this message]
2017-04-27 18:17 ` [PATCH] android-xfstests: create loopback device nodes in standard location Eric Biggers
2017-04-29 16:41 ` Theodore 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=20170311005632.130135-1-ebiggers3@gmail.com \
--to=ebiggers3@gmail.com \
--cc=ebiggers@google.com \
--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 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.