From: Eric Biggers <ebiggers3@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Eric Biggers <ebiggers@google.com>, fstests@vger.kernel.org
Subject: Re: [xfstests-bld PATCH] gen-image: fix running in a foreign build chroot
Date: Mon, 16 Apr 2018 15:08:03 -0700 [thread overview]
Message-ID: <20180416220803.GC10051@gmail.com> (raw)
In-Reply-To: <20180404001421.81698-1-ebiggers@google.com>
On Tue, Apr 03, 2018 at 05:14:21PM -0700, Eric Biggers wrote:
> Building an android-xfstests test appliance on x86_64 with the
> documented command (e.g. './do-all --chroot=stretch-arm64 --out-tar') no
> longer works. The problem is that when the gen-image script is run in a
> foreign build chroot, it incorrectly considers the root_fs's chroot to
> be a "native" chroot and doesn't copy the needed /usr/bin/qemu-*-static
> binary into it. This is because both 'uname -m' and 'dpkg
> --print-architecture' will return the same architecture (the foreign
> one), so is_native_chroot() returns true.
>
> This did used to work, but I think it stopped working with 5c76a88c0e57
> ("test-appliance: improve image generation for chroot tar files")
> because previously it was using 'fakechroot' which doesn't actually
> change the real root directory, so the /usr/bin directory stayed the
> same from the kernel's perspective. But now it uses real chroot.
>
> Fix this by detecting a foreign build chroot by instead mounting
> binfmt_misc and checking whether there is an entry for qemu-$(uname -m).
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> kvm-xfstests/test-appliance/gen-image | 58 +++++++++++++++------------
> 1 file changed, 32 insertions(+), 26 deletions(-)
>
Ping.
next prev parent reply other threads:[~2018-04-16 22:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-04 0:14 [xfstests-bld PATCH] gen-image: fix running in a foreign build chroot Eric Biggers
2018-04-16 22:08 ` Eric Biggers [this message]
2018-04-17 16:09 ` 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=20180416220803.GC10051@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.