Merge 0507d2526f ("Merge tag 'erofs-for-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs") into android-mainline

Steps on the way to 6.8-rc1

Change-Id: Ic5d03b4d7e56e77f9210b7ff3483a1743a9562b9
Signed-off-by: Lee Jones <joneslee@google.com>
This commit is contained in:
Lee Jones
2024-03-14 16:37:23 +00:00
1319 changed files with 56130 additions and 28402 deletions
+3 -1
View File
@@ -450,7 +450,7 @@ def parse_diagnostic(lines: LineStream) -> List[str]:
Log of diagnostic lines
"""
log = [] # type: List[str]
non_diagnostic_lines = [TEST_RESULT, TEST_HEADER, KTAP_START, TAP_START]
non_diagnostic_lines = [TEST_RESULT, TEST_HEADER, KTAP_START, TAP_START, TEST_PLAN]
while lines and not any(re.match(lines.peek())
for re in non_diagnostic_lines):
log.append(lines.pop())
@@ -726,6 +726,7 @@ def parse_test(lines: LineStream, expected_num: int, log: List[str], is_subtest:
# test plan
test.name = "main"
ktap_line = parse_ktap_header(lines, test)
test.log.extend(parse_diagnostic(lines))
parse_test_plan(lines, test)
parent_test = True
else:
@@ -737,6 +738,7 @@ def parse_test(lines: LineStream, expected_num: int, log: List[str], is_subtest:
if parent_test:
# If KTAP version line and/or subtest header is found, attempt
# to parse test plan and print test header
test.log.extend(parse_diagnostic(lines))
parse_test_plan(lines, test)
print_test_header(test)
expected_count = test.expected_count
+16
View File
@@ -331,6 +331,22 @@ class KUnitParserTest(unittest.TestCase):
kunit_parser.parse_run_tests(file.readlines())
self.print_mock.assert_any_call(StrContains('suite (1 subtest)'))
def test_parse_attributes(self):
ktap_log = test_data_path('test_parse_attributes.log')
with open(ktap_log) as file:
result = kunit_parser.parse_run_tests(file.readlines())
# Test should pass with no errors
self.assertEqual(result.counts, kunit_parser.TestCounts(passed=1, errors=0))
self.assertEqual(kunit_parser.TestStatus.SUCCESS, result.status)
# Ensure suite header is parsed correctly
self.print_mock.assert_any_call(StrContains('suite (1 subtest)'))
# Ensure attributes in correct test log
self.assertContains('# module: example', result.subtests[0].log)
self.assertContains('# test.speed: slow', result.subtests[0].subtests[0].log)
def test_show_test_output_on_failure(self):
output = """
KTAP version 1
@@ -0,0 +1,9 @@
KTAP version 1
1..1
KTAP version 1
# Subtest: suite
# module: example
1..1
# test.speed: slow
ok 1 test
ok 1 suite