Skip to contentSkip to conversation

kunit: tool: add missing test data file content

PATCH In review Brendan Higgins 3 participants 3 messages Mar 23, 2020 – Mar 26, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 kunit: tool: add missing test data file content

Add a missing raw dmesg test log to test the kunit_tool's dmesg parser. test_prefix_poundsign and test_output_with_prefix_isolated_correctly fail without this test log.

---
 .../testing/kunit/test_data/test_pound_sign.log  | Bin 0 -> 1656 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
tools/testing/kunit/test_data/test_pound_sign.log binary +0 -0
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..28ffa5ba03bfa81ea02ea9d38e7de7acf3dd9e5d 100644
GIT binary patch

base-commit: 021ed9f551da33449a5238e45e849913422671d7

Signature · 1 line
2.25.1.696.g5e7596f4ac-goog
Tested-by on v2 1/1
#1 lore raw
Quoted 6 lines · Brendan Higgins

Add a missing raw dmesg test log to test the kunit_tool's dmesg parser. test_prefix_poundsign and test_output_with_prefix_isolated_correctly fail without this test log.

This patch does indeed fix the kunit_tool's unit tests (run with ./tools/testing/kunit/kunit_tool_test.py).

Beforehand, it failed with the errors below:
======================================================================
ERROR: test_prefix_poundsign (__main__.KUnitParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tools/testing/kunit/kunit_tool_test.py", line 208, in
test_prefix_poundsign
self.assertEqual('kunit-resource-test', result.suites[0].name)
IndexError: list index out of range

======================================================================
FAIL: test_output_with_prefix_isolated_correctly (__main__.KUnitParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tools/testing/kunit/kunit_tool_test.py", line 116, in
test_output_with_prefix_isolated_correctly
self.assertContains('TAP version 14\n', result)
File "./tools/testing/kunit/kunit_tool_test.py", line 96, in
assertContains
str(needle) + '" not found in "' + str(haystack) + '"!')
AssertionError: "TAP version 14
" not found in "<generator object isolate_kunit_output at 0x7f4e88d85ed0>"!

----------------------------------------------------------------------
Ran 20 tests in 0.022s

FAILED (failures=1, errors=1)

maintainer
#2 lore raw
Quoted 34 lines · David Gow
Quoted 6 lines · Brendan Higgins

Add a missing raw dmesg test log to test the kunit_tool's dmesg parser. test_prefix_poundsign and test_output_with_prefix_isolated_correctly fail without this test log.

This patch does indeed fix the kunit_tool's unit tests (run with ./tools/testing/kunit/kunit_tool_test.py).

Beforehand, it failed with the errors below:
======================================================================
ERROR: test_prefix_poundsign (__main__.KUnitParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tools/testing/kunit/kunit_tool_test.py", line 208, in
test_prefix_poundsign
self.assertEqual('kunit-resource-test', result.suites[0].name)
IndexError: list index out of range

======================================================================
FAIL: test_output_with_prefix_isolated_correctly (__main__.KUnitParserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./tools/testing/kunit/kunit_tool_test.py", line 116, in
test_output_with_prefix_isolated_correctly
self.assertContains('TAP version 14\n', result)
File "./tools/testing/kunit/kunit_tool_test.py", line 96, in
assertContains

Quoted 9 lines
    str(needle) + '" not found in "' + str(haystack) + '"!')

AssertionError: "TAP version 14
" not found in "<generator object isolate_kunit_output at 0x7f4e88d85ed0>"!

----------------------------------------------------------------------
Ran 20 tests in 0.022s

FAILED (failures=1, errors=1)

Applied to linux-kselftest kunit for Linux 5.7-rc1.

thanks,
-- Shuah