Skip to contentSkip to conversation

kunit: testing kunit: Bug fix in test_run_timeout function

PATCH Superseded Heidi Fahim 3 participants 4 messages Nov 27, 2019 – Dec 2, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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/3

Change-Id I6f161c72c6a5f071a4dc31582ba08b91974502ce
---
 tools/testing/kunit/kunit_tool_test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/kunit/kunit_tool_test.py +1 -1
index 4a12baa0cd4e..a2a8ea6beae3 100755
@@ -199,7 +199,7 @@ class KUnitMainTest(unittest.TestCase):
 		timeout = 3453
 		kunit.main(['run', '--timeout', str(timeout)], self.linux_source_mock)
 		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.'))
 
 if __name__ == '__main__':
Signature · 1 line
2.24.0.432.g9d3f5f5b63-goog
#1 lore raw
Quoted 8 lines · Heidi Fahim

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/3

Wrong url, here is the correct link to the fix that caused this bug:
https://lkml.org/lkml/2019/9/6/351

Reviewed-by
#2 lore raw
Quoted 8 lines · Heidi Fahim
Quoted 6 lines · Heidi Fahim

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)

Quoted 5 lines
Quoted 2 lines

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

Wrong url, here is the correct link to the fix that caused this bug:
https://lkml.org/lkml/2019/9/6/351

Thanks,
SeongJae Park

#3 lore raw
In reply to Heidi Fahim
Quoted 11 lines · Heidi Fahim

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/3

Change-Id I6f161c72c6a5f071a4dc31582ba08b91974502ce

Change-Id should not be used on LKML patches. Did you run checkpatch?