Commit 70efb58b authored by Heidi Fahim's avatar Heidi Fahim Committed by Shuah Khan
Browse files

kunit: testing kunit: Bug fix in test_run_timeout function

Assert in test_run_timeout was not updated with the build_dir argument
and caused the following error:
AssertionError: Expected call: run_kernel(timeout=3453)
Actual call: run_kernel(build_dir=None, timeout=3453)

Needed to update kunit_tool_test to reflect this fix
https://lkml.org/lkml/2019/9/6/351



Signed-off-by: default avatarHeidi Fahim <heidifahim@google.com>
Reviewed-by: default avatarSeongJae Park <sjpark@amazon.de>
Reviewed-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Tested-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 39101b22
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -199,7 +199,7 @@ class KUnitMainTest(unittest.TestCase):
		timeout = 3453
		timeout = 3453
		kunit.main(['run', '--timeout', str(timeout)], self.linux_source_mock)
		kunit.main(['run', '--timeout', str(timeout)], self.linux_source_mock)
		assert self.linux_source_mock.build_reconfig.call_count == 1
		assert self.linux_source_mock.build_reconfig.call_count == 1
		self.linux_source_mock.run_kernel.assert_called_once_with(timeout=timeout)
		self.linux_source_mock.run_kernel.assert_called_once_with(build_dir=None, timeout=timeout)
		self.print_mock.assert_any_call(StrContains('Testing complete.'))
		self.print_mock.assert_any_call(StrContains('Testing complete.'))


if __name__ == '__main__':
if __name__ == '__main__':