Re: [xfstests-bld PATCH] gen-image: fix running in a foreign build chroot

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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@xxxxxxxxxx>
> ---
>  kvm-xfstests/test-appliance/gen-image | 58 +++++++++++++++------------
>  1 file changed, 32 insertions(+), 26 deletions(-)
> 

Ping.
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux