[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/19] device-crash-test: Check if path is actually an executable
From: |
Thomas Huth |
Subject: |
[PULL 03/19] device-crash-test: Check if path is actually an executable file |
Date: |
Tue, 10 Nov 2020 12:11:16 +0100 |
From: Eduardo Habkost <ehabkost@redhat.com>
After the transition to Meson, the build directory now have
subdirectories named "qemu-system-*.p", and device-crash-test
will try to execute them as if they were binaries. This results
in errors like:
PermissionError: [Errno 13] Permission denied: './qemu-system-or1k.p'
When generating the default list of binaries to test, check if
the path is actually a file and if it's executable.
Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20201026125238.2752882-1-ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
scripts/device-crash-test | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/device-crash-test b/scripts/device-crash-test
index 866baf7058..04118669ba 100755
--- a/scripts/device-crash-test
+++ b/scripts/device-crash-test
@@ -383,7 +383,9 @@ def binariesToTest(args, testcase):
if args.qemu:
r = args.qemu
else:
- r = glob.glob('./qemu-system-*')
+ r = [f.path for f in os.scandir('.')
+ if f.name.startswith('qemu-system-') and
+ f.is_file() and os.access(f, os.X_OK)]
return r
--
2.18.4
- [PULL 00/19] qtests, gitlab, s390x and misc patches, Thomas Huth, 2020/11/10
- [PULL 01/19] meson: always include contrib/libvhost-user, Thomas Huth, 2020/11/10
- [PULL 03/19] device-crash-test: Check if path is actually an executable file,
Thomas Huth <=
- [PULL 04/19] qtest: Fix bad printf format specifiers, Thomas Huth, 2020/11/10
- [PULL 05/19] tests/qtest/tpm: Remove redundant check in the tpm_test_swtpm_test(), Thomas Huth, 2020/11/10
- [PULL 02/19] tests/vm: update openbsd to release 6.8, Thomas Huth, 2020/11/10
- [PULL 06/19] gitlab-ci: Drop generic cache rule, Thomas Huth, 2020/11/10
- [PULL 07/19] MAINTAINERS: Add gitlab-pipeline-status script to GitLab CI section, Thomas Huth, 2020/11/10
- [PULL 11/19] fuzz: Make fork_fuzz.ld compatible with LLVM's LLD, Thomas Huth, 2020/11/10
- [PULL 10/19] scripts/oss-fuzz: give all fuzzers -target names, Thomas Huth, 2020/11/10
- [PULL 09/19] docs/fuzz: update fuzzing documentation post-meson, Thomas Huth, 2020/11/10
- [PULL 12/19] configure: surface deprecated targets in the help output, Thomas Huth, 2020/11/10
- [PULL 13/19] gitlab: publish the docs built during CI, Thomas Huth, 2020/11/10