mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 23:03:57 -04:00
kunit: tool: Enable virtio/PCI by default on UML
There are several tests which depend on PCI, and hence need a bunch of extra options to run under UML. This makes it awkward to give configuration instructions (whether in documentation, or as part of a .kunitconfig file), as two separate, incompatible sets of config options are required for UML and "most other architectures". For non-UML architectures, it's possible to add default kconfig options via the qemu_config python files, but there's no equivalent for UML. Add a new tools/testing/kunit/configs/arch_uml.config file containing extra kconfig options to use on UML. Tested-by: José Expósito <jose.exposito89@gmail.com> Reviewed-by: Daniel Latypov <dlatypov@google.com> Signed-off-by: David Gow <davidgow@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Daniel Latypov <dlatypov@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
@@ -430,6 +430,10 @@ class LinuxSourceTreeTest(unittest.TestCase):
|
||||
f.write('CONFIG_KUNIT=y')
|
||||
|
||||
tree = kunit_kernel.LinuxSourceTree(build_dir)
|
||||
# Stub out the source tree operations, so we don't have
|
||||
# the defaults for any given architecture get in the
|
||||
# way.
|
||||
tree._ops = kunit_kernel.LinuxSourceTreeOperations('none', None)
|
||||
mock_build_config = mock.patch.object(tree, 'build_config').start()
|
||||
|
||||
# Should generate the .config
|
||||
@@ -447,6 +451,10 @@ class LinuxSourceTreeTest(unittest.TestCase):
|
||||
f.write('CONFIG_KUNIT=y\nCONFIG_KUNIT_TEST=y')
|
||||
|
||||
tree = kunit_kernel.LinuxSourceTree(build_dir)
|
||||
# Stub out the source tree operations, so we don't have
|
||||
# the defaults for any given architecture get in the
|
||||
# way.
|
||||
tree._ops = kunit_kernel.LinuxSourceTreeOperations('none', None)
|
||||
mock_build_config = mock.patch.object(tree, 'build_config').start()
|
||||
|
||||
self.assertTrue(tree.build_reconfig(build_dir, make_options=[]))
|
||||
@@ -463,6 +471,10 @@ class LinuxSourceTreeTest(unittest.TestCase):
|
||||
f.write('CONFIG_KUNIT=y\nCONFIG_KUNIT_TEST=y')
|
||||
|
||||
tree = kunit_kernel.LinuxSourceTree(build_dir)
|
||||
# Stub out the source tree operations, so we don't have
|
||||
# the defaults for any given architecture get in the
|
||||
# way.
|
||||
tree._ops = kunit_kernel.LinuxSourceTreeOperations('none', None)
|
||||
mock_build_config = mock.patch.object(tree, 'build_config').start()
|
||||
|
||||
# ... so we should trigger a call to build_config()
|
||||
|
||||
Reference in New Issue
Block a user