mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 19:51:35 +01:00
readme: document --no-quit-on-fail
This commit is contained in:
25
README.adoc
25
README.adoc
@@ -11964,9 +11964,9 @@ The link:test[] script runs several different types of tests, which can also be
|
|||||||
|
|
||||||
link:test[] does not all possible tests, because there are too many possible variations and that would take forever. The rationale is the same as for `./build all` and is explained in `./build --help`.
|
link:test[] does not all possible tests, because there are too many possible variations and that would take forever. The rationale is the same as for `./build all` and is explained in `./build --help`.
|
||||||
|
|
||||||
See the sources of those test scripts to learn how to run more specialized tests.
|
===== Test arch and emulator selection
|
||||||
|
|
||||||
One important tip is that you can select multiple archs and emulators of interest with any command as in:
|
You can select multiple archs and emulators of interest, as for an other command, with:
|
||||||
|
|
||||||
....
|
....
|
||||||
./test-user-mode \
|
./test-user-mode \
|
||||||
@@ -11977,10 +11977,31 @@ One important tip is that you can select multiple archs and emulators of interes
|
|||||||
;
|
;
|
||||||
....
|
....
|
||||||
|
|
||||||
|
You can also test all supported archs and emulators with:
|
||||||
|
|
||||||
|
....
|
||||||
|
./test-user-mode \
|
||||||
|
--all-archs \
|
||||||
|
--all-emulators \
|
||||||
|
;
|
||||||
|
....
|
||||||
|
|
||||||
This command would run the test four times, using `x86_64` and `aarch64` with both gem5 and QEMU.
|
This command would run the test four times, using `x86_64` and `aarch64` with both gem5 and QEMU.
|
||||||
|
|
||||||
Without those flags, it defaults to just running the default arch and emulator once: `x86_64` and `qemu`.
|
Without those flags, it defaults to just running the default arch and emulator once: `x86_64` and `qemu`.
|
||||||
|
|
||||||
|
===== Quit on fail
|
||||||
|
|
||||||
|
By default, tests stop running as soon as the first failure happens.
|
||||||
|
|
||||||
|
You can prevent this with the `--no-quit-on-fail option, e.g.:
|
||||||
|
|
||||||
|
....
|
||||||
|
./test-user-mode --no-quit-on-fail
|
||||||
|
....
|
||||||
|
|
||||||
|
You can then see which tests failed on the test summary report at the end.
|
||||||
|
|
||||||
===== Test userland in full system
|
===== Test userland in full system
|
||||||
|
|
||||||
Run all userland tests from inside full system simulation (i.e. not <<user-mode-simulation>>):
|
Run all userland tests from inside full system simulation (i.e. not <<user-mode-simulation>>):
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ TODO: implement fully, some stuff is escaping it currently.
|
|||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
self.add_argument(
|
self.add_argument(
|
||||||
'--quit-on-failure',
|
'--quit-on-fail',
|
||||||
default=True,
|
default=True,
|
||||||
help='''\
|
help='''\
|
||||||
Stop running at the first failed test.
|
Stop running at the first failed test.
|
||||||
@@ -878,7 +878,7 @@ Valid emulators: {}
|
|||||||
self.print_time(self.ellapsed_seconds)
|
self.print_time(self.ellapsed_seconds)
|
||||||
if ret is not None and ret != 0:
|
if ret is not None and ret != 0:
|
||||||
return_value = ret
|
return_value = ret
|
||||||
if self.env['quit_on_failure']:
|
if self.env['quit_on_fail']:
|
||||||
raise GetOutOfLoop()
|
raise GetOutOfLoop()
|
||||||
elif not real_all_archs:
|
elif not real_all_archs:
|
||||||
raise Exception('Unsupported arch for this action: ' + arch)
|
raise Exception('Unsupported arch for this action: ' + arch)
|
||||||
@@ -1141,7 +1141,7 @@ class TestCliFunction(LkmcCliFunction):
|
|||||||
test_result = TestResult.PASS
|
test_result = TestResult.PASS
|
||||||
else:
|
else:
|
||||||
test_result = TestResult.FAIL
|
test_result = TestResult.FAIL
|
||||||
if self.env['quit_on_failure']:
|
if self.env['quit_on_fail']:
|
||||||
self.log_error('Test failed')
|
self.log_error('Test failed')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
self.log_info('test_result {}'.format(test_result.name))
|
self.log_info('test_result {}'.format(test_result.name))
|
||||||
|
|||||||
Reference in New Issue
Block a user