kunit: Add 'kunit_shutdown' option
authorDavid Gow <davidgow@google.com>
Wed, 26 May 2021 21:24:04 +0000 (14:24 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 11 Jun 2021 22:04:57 +0000 (16:04 -0600)
commitb6d5799b0b5866dc63be7f032473dc536f865b4d
tree11bdd407b115e0cf4d970236020b739241d339ce
parent384426bd101cb3cd580b18de19d4891ec5ca5bf9
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>
lib/kunit/executor.c
tools/testing/kunit/kunit_kernel.py
tools/testing/kunit/kunit_parser.py