diff options
author | Eduardo Habkost | 2020-10-26 13:52:38 +0100 |
---|---|---|
committer | Thomas Huth | 2020-11-09 18:34:21 +0100 |
commit | 8a47836548851ac00863a4f520ad761253ea4a86 (patch) | |
tree | ed8f89b496aae57c84aea746902e49e34043d8ef /scripts/device-crash-test | |
parent | tests/vm: update openbsd to release 6.8 (diff) | |
download | qemu-8a47836548851ac00863a4f520ad761253ea4a86.tar.gz qemu-8a47836548851ac00863a4f520ad761253ea4a86.tar.xz qemu-8a47836548851ac00863a4f520ad761253ea4a86.zip |
device-crash-test: Check if path is actually an executable file
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>
Diffstat (limited to 'scripts/device-crash-test')
-rwxr-xr-x | scripts/device-crash-test | 4 |
1 files changed, 3 insertions, 1 deletions
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 |