Skip to content

Commit

Permalink
scripts/device-crash-test: Add a parameter to run with TCG only
Browse files Browse the repository at this point in the history
We're currently facing the problem that the device-crash-test script
runs twice as long in the CI when a runner supports KVM - which sometimes
results in a timeout of the CI job. To get a more deterministic runtime
here, add an option to the script that allows to run it with TCG only.

Reported-by: Eldon Stegall <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
Message-Id: <[email protected]>
(cherry picked from commit 8b869aa59109d238fd684e1ade204b6942202120)
Signed-off-by: Michael Tokarev <[email protected]>
  • Loading branch information
huth authored and Michael Tokarev committed May 31, 2023
1 parent 509c444 commit 369e2c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.d/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ crash-test-debian:
script:
- cd build
- make NINJA=":" check-venv
- tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i386
- tests/venv/bin/python3 scripts/device-crash-test -q --tcg-only ./qemu-system-i386

build-system-fedora:
extends: .native_build_job_template
Expand Down
4 changes: 3 additions & 1 deletion scripts/device-crash-test
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def binariesToTest(args, testcase):


def accelsToTest(args, testcase):
if getBinaryInfo(args, testcase['binary']).kvm_available:
if getBinaryInfo(args, testcase['binary']).kvm_available and not args.tcg_only:
yield 'kvm'
yield 'tcg'

Expand Down Expand Up @@ -510,6 +510,8 @@ def main():
help="Full mode: test cases that are expected to fail")
parser.add_argument('--strict', action='store_true', dest='strict',
help="Treat all warnings as fatal")
parser.add_argument('--tcg-only', action='store_true', dest='tcg_only',
help="Only test with TCG accelerator")
parser.add_argument('qemu', nargs='*', metavar='QEMU',
help='QEMU binary to run')
args = parser.parse_args()
Expand Down

0 comments on commit 369e2c4

Please sign in to comment.