linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] kunit: tool: add missing test data file content
@ 2020-03-23 19:22 Brendan Higgins
  2020-03-24  2:56 ` David Gow
  0 siblings, 1 reply; 3+ messages in thread
From: Brendan Higgins @ 2020-03-23 19:22 UTC (permalink / raw)
  To: shuah, davidgow, heidifahim
  Cc: linux-kselftest, kunit-dev, linux-kernel, 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.

Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
---
 .../testing/kunit/test_data/test_pound_sign.log  | Bin 0 -> 1656 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/tools/testing/kunit/test_data/test_pound_sign.log b/tools/testing/kunit/test_data/test_pound_sign.log
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..28ffa5ba03bfa81ea02ea9d38e7de7acf3dd9e5d 100644
GIT binary patch
literal 1656
zcmah}U2EGg6n$=g#f7|Vtj^>lPBOzDM#o@mlt9+Kgd${FPEBlGBgsqs?{^h<Y3h$o
zFBaGLocpP>13GNVmW<8=R3_K%5Q9W*u~4upWe`4q(jqBTdcAw?ZG=v-jA5@FZ|^*5
zoU$NALGF+lEFssq<A{~zdHR7p&7+U(X~E!_yGM{l@40vQ%(~pazHH!+GB!sI;iCKZ
zY69Cjp-?V{LrnyMQ5I_>Rp5<1_i#FmdPY1z2tkYI|M1-7PdS}Ub_h8eK~m)?&(I;{
zd<2<NV1vyl7BWOggn_Hc5ba`wRu)R=x;oPiRuheYD}$9XJTpphG^wKX*mr|pw(;#T
zTvPxWb#R&-VC|~9KeFD0ooNCooO~P|@vNKL)n#t&WQm2JSh%gFRMuv7!M#yqYailx
z8TM&AUN~yqVM$ThVIE55OcVU4mW$eHC#dHEeUvCiE1wT#?U%cS^A_HAK$VqiIBG75
z($V`G!unJPuo@k2@gj4y7$WV7g73Ls@d32giPqc=`3mz^u|IR`05hOx29+=__XXIv
z%Xf#6<%P11b*dyatBVv$thED!=x%_Ts?sj1OY%b*t$Y}rODc$J2is^#<A~w+w`~mf
zCs_oC7u=9pAjzurLE}*e38}&1-KX^pd*7wM-Q35(VDtTJOgeOnB`K*rii#c_+)*qi
zNQ+5Dqv>MG0wcp<uf!}(SCXw)kqXk>xCSP@rQbRs58c`TmTbn>%WO@TFp;w*gB6RU
km;Ljlo8cvfMVVCc>`K4bOfE$-fO&T9$C>+RbV7Fh7t6}$ApigX

literal 0
HcmV?d00001


base-commit: 021ed9f551da33449a5238e45e849913422671d7
-- 
2.25.1.696.g5e7596f4ac-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] kunit: tool: add missing test data file content
  2020-03-23 19:22 [PATCH v2] kunit: tool: add missing test data file content Brendan Higgins
@ 2020-03-24  2:56 ` David Gow
  2020-03-26 20:17   ` shuah
  0 siblings, 1 reply; 3+ messages in thread
From: David Gow @ 2020-03-24  2:56 UTC (permalink / raw)
  To: Brendan Higgins
  Cc: Shuah Khan, Heidi Fahim, open list:KERNEL SELFTEST FRAMEWORK,
	KUnit Development, Linux Kernel Mailing List

On Mon, Mar 23, 2020 at 12:22 PM Brendan Higgins
<brendanhiggins@google.com> wrote:
>
> 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.
>
> Signed-off-by: Brendan Higgins <brendanhiggins@google.com>

Tested-by: David Gow <davidgow@google.com>

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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] kunit: tool: add missing test data file content
  2020-03-24  2:56 ` David Gow
@ 2020-03-26 20:17   ` shuah
  0 siblings, 0 replies; 3+ messages in thread
From: shuah @ 2020-03-26 20:17 UTC (permalink / raw)
  To: David Gow, Brendan Higgins
  Cc: Heidi Fahim, open list:KERNEL SELFTEST FRAMEWORK,
	KUnit Development, Linux Kernel Mailing List, shuah

On 3/23/20 8:56 PM, David Gow wrote:
> On Mon, Mar 23, 2020 at 12:22 PM Brendan Higgins
> <brendanhiggins@google.com> wrote:
>>
>> 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.
>>
>> Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
> 
> Tested-by: David Gow <davidgow@google.com>
> 
> 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)
> 

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

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-26 20:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 19:22 [PATCH v2] kunit: tool: add missing test data file content Brendan Higgins
2020-03-24  2:56 ` David Gow
2020-03-26 20:17   ` shuah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).