Linux-kselftest Archive on lore.kernel.org
 help / color / Atom feed
From: shuah <shuah@kernel.org>
To: David Gow <davidgow@google.com>,
	Brendan Higgins <brendanhiggins@google.com>
Cc: Heidi Fahim <heidifahim@google.com>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	KUnit Development <kunit-dev@googlegroups.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	shuah <shuah@kernel.org>
Subject: Re: [PATCH v2] kunit: tool: add missing test data file content
Date: Thu, 26 Mar 2020 14:17:00 -0600
Message-ID: <75c33274-68e6-6ad4-c4a8-0dc9b14a9af6@kernel.org> (raw)
In-Reply-To: <CABVgOSkf58zMRhpqoZY3cZuAfujnTwVe14xOMcS6VBC4S2+vEw@mail.gmail.com>

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

      reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 19:22 Brendan Higgins
2020-03-24  2:56 ` David Gow
2020-03-26 20:17   ` shuah [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=75c33274-68e6-6ad4-c4a8-0dc9b14a9af6@kernel.org \
    --to=shuah@kernel.org \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=heidifahim@google.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-kselftest Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-kselftest/0 linux-kselftest/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-kselftest linux-kselftest/ https://lore.kernel.org/linux-kselftest \
		linux-kselftest@vger.kernel.org
	public-inbox-index linux-kselftest

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kselftest


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git