Linux-kselftest Archive on lore.kernel.org
 help / color / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Patricia Alfonso <trishalfonso@google.com>
Cc: David Gow <davidgow@google.com>,
	Brendan Higgins <brendanhiggins@google.com>,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	LKML <linux-kernel@vger.kernel.org>,
	kasan-dev <kasan-dev@googlegroups.com>,
	kunit-dev@googlegroups.com,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>
Subject: Re: [RFC PATCH v2 3/3] KASAN: Port KASAN Tests to KUnit
Date: Fri, 27 Mar 2020 06:31:18 +0100
Message-ID: <CACT4Y+ZhraraMNC+uvD9O7h3wMQntiEu5zSmVd_UYEaqvdxTaA@mail.gmail.com> (raw)
In-Reply-To: <CAKFsvUK-9QU7SfKLoL0w75VgSOneO8DWciHTDYMfU8aD98Unbw@mail.gmail.com>

On Thu, Mar 26, 2020 at 4:15 PM Patricia Alfonso
<trishalfonso@google.com> wrote:
> > > > <kasan-dev@googlegroups.com> wrote:
> > > > >
> > > > > Transfer all previous tests for KASAN to KUnit so they can be run
> > > > > more easily. Using kunit_tool, developers can run these tests with their
> > > > > other KUnit tests and see "pass" or "fail" with the appropriate KASAN
> > > > > report instead of needing to parse each KASAN report to test KASAN
> > > > > functionalities. All KASAN reports are still printed to dmesg.
> > > > >
> > > > > Stack tests do not work in UML so those tests are protected inside an
> > > > > "#if IS_ENABLED(CONFIG_KASAN_STACK)" so this only runs if stack
> > > > > instrumentation is enabled.
> > > > >
> > > > > copy_user_test cannot be run in KUnit so there is a separate test file
> > > > > for those tests, which can be run as before as a module.
> > > >
> > > > Hi Patricia,
> > > >
> > > > FWIW I've got some conflicts applying this patch on latest linux-next
> > > > next-20200324. There are some changes to the tests in mm tree I think.
> > > >
> > > > Which tree will this go through? I would be nice to resolve these
> > > > conflicts somehow, but I am not sure how. Maybe the kasan tests
> > > > changes are merged upstream next windows, and then rebase this?
> > > >
> > > > Also, how can I apply this for testing? I assume this is based on some
> > > > kunit branch? which one?
> > > >
> > > Hmm... okay, that sounds like a problem. I will have to look into the
> > > conflicts. I'm not sure which tree this will go through upstream; I
> > > expect someone will tell me which is best when the time comes. This is
> > > based on the kunit branch in the kunit documentation here:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/log/?h=kunit
> >
> > I've checked out:
> >
> > commit 0476e69f39377192d638c459d11400c6e9a6ffb0 (HEAD, kselftest/kunit)
> > Date:   Mon Mar 23 12:04:59 2020 -0700
> >
> > But the build still fails for me:
> >
> > mm/kasan/report.c: In function ‘kasan_update_kunit_status’:
> > mm/kasan/report.c:466:6: error: implicit declaration of function
> > ‘kunit_find_named_resource’ [-Werror=implicit-function-declar]
> >   466 |  if (kunit_find_named_resource(cur_test, "kasan_data")) {
> >       |      ^~~~~~~~~~~~~~~~~~~~~~~~~
> > mm/kasan/report.c:467:12: warning: assignment to ‘struct
> > kunit_resource *’ from ‘int’ makes pointer from integer without a cas]
> >   467 |   resource = kunit_find_named_resource(cur_test, "kasan_data");
> >       |            ^
> > mm/kasan/report.c:468:24: error: ‘struct kunit_resource’ has no member
> > named ‘data’
> >   468 |   kasan_data = resource->data;
> >       |                        ^~
> >
> > What am I doing wrong?
>
> This patchset relies on another RFC patchset from Alan:
> https://lore.kernel.org/linux-kselftest/1583251361-12748-1-git-send-email-alan.maguire@oracle.com/T/#t
>
> I thought I linked it in the commit message but it may only be in the
> commit message for part 2/3. It should work with Alan's patchset, but
> let me know if you have any trouble.

Please push your state of code to some git repository, so that I can
pull it. Github or gerrit or whatever.

  reply index

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19 16:42 [RFC PATCH v2 0/3] KASAN/KUnit Integration Patricia Alfonso
2020-03-19 16:42 ` [RFC PATCH v2 1/3] Add KUnit Struct to Current Task Patricia Alfonso
2020-03-24 11:32   ` Dmitry Vyukov
2020-03-24 16:39   ` Alan Maguire
2020-03-24 17:42     ` Patricia Alfonso
2020-03-25 12:42       ` Alan Maguire
2020-03-25 19:00         ` Patricia Alfonso
2020-03-30 19:30           ` Patricia Alfonso
2020-03-31  7:48             ` Dmitry Vyukov
2020-03-24 18:12   ` Brendan Higgins
2020-03-19 16:42 ` [RFC PATCH v2 2/3] KUnit: KASAN Integration Patricia Alfonso
2020-03-24 16:45   ` Alan Maguire
2020-03-24 17:48     ` Patricia Alfonso
2020-03-19 16:42 ` [RFC PATCH v2 3/3] KASAN: Port KASAN Tests to KUnit Patricia Alfonso
2020-03-24 11:24   ` Dmitry Vyukov
2020-03-24 15:05     ` Patricia Alfonso
2020-03-26  9:12       ` Dmitry Vyukov
2020-03-26 15:15         ` Patricia Alfonso
2020-03-27  5:31           ` Dmitry Vyukov [this message]
2020-03-30 18:57             ` Patricia Alfonso
2020-03-31 10:12               ` Dmitry Vyukov
2020-03-24 16:48   ` Alan Maguire
2020-03-24 17:52     ` Patricia Alfonso
2020-03-24 18:20   ` Brendan Higgins
2020-03-26  9:10   ` Dmitry Vyukov

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=CACT4Y+ZhraraMNC+uvD9O7h3wMQntiEu5zSmVd_UYEaqvdxTaA@mail.gmail.com \
    --to=dvyukov@google.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=trishalfonso@google.com \
    --cc=vincent.guittot@linaro.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