public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] android-xfstests: create loopback device nodes in standard location
@ 2017-03-11  0:56 Eric Biggers
  2017-04-27 18:17 ` Eric Biggers
  2017-04-29 16:41 ` Theodore Ts'o
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Biggers @ 2017-03-11  0:56 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, Eric Biggers

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


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

* Re: [PATCH] android-xfstests: create loopback device nodes in standard location
  2017-03-11  0:56 [PATCH] android-xfstests: create loopback device nodes in standard location Eric Biggers
@ 2017-04-27 18:17 ` Eric Biggers
  2017-04-29 16:41 ` Theodore Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Biggers @ 2017-04-27 18:17 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, Eric Biggers

On Fri, Mar 10, 2017 at 04:56:32PM -0800, Eric Biggers wrote:
> 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>
> ---

Ted, this patch seems to have gotten lost; can you apply it?  Thanks!

- Eric

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

* Re: [PATCH] android-xfstests: create loopback device nodes in standard location
  2017-03-11  0:56 [PATCH] android-xfstests: create loopback device nodes in standard location Eric Biggers
  2017-04-27 18:17 ` Eric Biggers
@ 2017-04-29 16:41 ` Theodore Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2017-04-29 16:41 UTC (permalink / raw)
  To: Eric Biggers; +Cc: fstests, Eric Biggers

On Fri, Mar 10, 2017 at 04:56:32PM -0800, Eric Biggers wrote:
> 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>

Applied, thanks.

					- Ted

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

end of thread, other threads:[~2017-04-29 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-11  0:56 [PATCH] android-xfstests: create loopback device nodes in standard location Eric Biggers
2017-04-27 18:17 ` Eric Biggers
2017-04-29 16:41 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox