collect all diagnostics about binfmt_misc before throwing error

This commit is contained in:
Johannes 'josch' Schauer 2019-09-27 10:18:15 +02:00
parent 36d36d85ab
commit d2a1029ee5
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -2004,14 +2004,14 @@ sub main() {
{
open my $fh, '<', '/proc/filesystems' or error "failed to open /proc/filesystems: $!";
unless (grep /^nodev\tbinfmt_misc$/, (<$fh>)) {
error "binfmt_misc not found in /proc/filesystems -- is the module loaded?";
warning "binfmt_misc not found in /proc/filesystems -- is the module loaded?";
}
close $fh;
}
{
open my $fh, '<', '/proc/mounts' or error "failed to open /proc/mounts: $!";
unless (grep /^binfmt_misc \/proc\/sys\/fs\/binfmt_misc binfmt_misc/, (<$fh>)) {
error "binfmt_misc not found in /proc/mounts -- not mounted?";
warning "binfmt_misc not found in /proc/mounts -- not mounted?";
}
close $fh;
}
@ -2020,10 +2020,10 @@ sub main() {
chomp (my $binfmts = do { local $/; <$fh> });
close $fh;
if ($binfmts eq '') {
error "qemu-$options->{qemu} is not a supported binfmt name";
warning "qemu-$options->{qemu} is not a supported binfmt name";
}
}
error "qemu emulation of $nativearch failed for an unknown reason";
error "qemu user emulation of $nativearch using binfmt_misc failed";
} elsif ($withemu == 0 and $noemu == 1) {
error "arch-test succeeded without emu but not with emu";
} elsif ($withemu == 1 and $noemu == 0) {