diff options
author | David Gow <davidgow@google.com> | 2021-05-27 00:24:04 +0300 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2021-06-12 01:04:57 +0300 |
commit | b6d5799b0b5866dc63be7f032473dc536f865b4d (patch) | |
tree | 11bdd407b115e0cf4d970236020b739241d339ce /tools/testing/kunit/kunit_kernel.py | |
parent | 384426bd101cb3cd580b18de19d4891ec5ca5bf9 (diff) | |
download | linux-b6d5799b0b5866dc63be7f032473dc536f865b4d.tar.xz |
kunit: Add 'kunit_shutdown' option
Add a new kernel command-line option, 'kunit_shutdown', which allows the
user to specify that the kernel poweroff, halt, or reboot after
completing all KUnit tests; this is very handy for running KUnit tests
on UML or a VM so that the UML/VM process exits cleanly immediately
after running all tests without needing a special initramfs.
Signed-off-by: David Gow <davidgow@google.com>
Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Tested-By: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Daniel Latypov <dlatypov@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/kunit/kunit_kernel.py')
-rw-r--r-- | tools/testing/kunit/kunit_kernel.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py index 89a7d4024e87..dbbceaee1230 100644 --- a/tools/testing/kunit/kunit_kernel.py +++ b/tools/testing/kunit/kunit_kernel.py @@ -208,7 +208,7 @@ class LinuxSourceTree(object): def run_kernel(self, args=None, build_dir='', filter_glob='', timeout=None) -> Iterator[str]: if not args: args = [] - args.extend(['mem=1G', 'console=tty']) + args.extend(['mem=1G', 'console=tty', 'kunit_shutdown=halt']) if filter_glob: args.append('kunit.filter_glob='+filter_glob) self._ops.linux_bin(args, timeout, build_dir) |