mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Paul Osmialowski <p.osmialowsk@samsung.com>,
	Jonathan Corbet <corbet@lwn.net>, Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Petr Mladek <pmladek@suse.cz>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Daniel Mack <daniel@zonque.org>,
	Kay Sievers <kay.sievers@vrfy.org>, Joe Perches <joe@perches.com>,
	Tejun Heo <tj@kernel.org>,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-api@vger.kernel.org
Cc: Marcin Niesluchowski <m.niesluchow@samsung.com>,
	Karol Lewandowski <k.lewandowsk@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Shuah Khan <shuahkh@osg.samsung.com>
Subject: Re: [RFC v3 9/9] kmsg: selftests
Date: Thu, 22 Oct 2015 11:32:12 +1100	[thread overview]
Message-ID: <1445473932.30295.4.camel@ellerman.id.au> (raw)
In-Reply-To: <1445259503-18158-10-git-send-email-p.osmialowsk@samsung.com>

On Mon, 2015-10-19 at 14:58 +0200, Paul Osmialowski wrote:

> This patch adds selftests framework and four test scenarios for kmsg.
> 
> The framework shape and code was inspired by similar selftests framework
> for kdbus.

> diff --git a/tools/testing/selftests/kmsg/Makefile b/tools/testing/selftests/kmsg/Makefile
> new file mode 100644
> index 0000000..b4ba892
> --- /dev/null
> +++ b/tools/testing/selftests/kmsg/Makefile
> @@ -0,0 +1,30 @@
> +CFLAGS += -I../../../../usr/include/
> +CFLAGS += -I../../../../samples/kmsg/
> +CFLAGS += -I../../../../include/uapi/

Please don't directly include the unexported kernel headers.

> +CFLAGS += -std=gnu99 -Wall
> +CFLAGS += -DKBUILD_MODNAME=\"kmsg\" -D_GNU_SOURCE

Are you building userspace code here? I'm not sure why you need KBUILD_MODNAME.

> +CFLAGS += -pthread
> +LDLIBS += -pthread
> +
> +OBJS= \
> +	kmsg-test.o				\
> +	test-buffer-add-del.o			\
> +	test-buffer-add-write-read-del.o	\
> +	test-buffer-buf-torture.o		\
> +	test-buffer-buf-multithreaded-torture.o
> +
> +all: kmsg-test
> +
> +include ../lib.mk
> +
> +%.o: %.c kmsg-test.h
> +	$(CC) $(CFLAGS) -c $< -o $@
> +
> +kmsg-test: $(OBJS)
> +	$(CC) $(CFLAGS) $^ $(LDLIBS) -o $@

Those look the same as the implicit rules to me, so I don't think you need to
spell them out.

> +
> +run_tests:
> +	./kmsg-test --tap

This should be giving you a warning about redefining run_tests.

It sounds like you don't actually need to pass --tap, so you don't need to
override run_tests.

So you should just define:

TEST_PROGS := kmsg-test

Before you include lib.mk and then both the run and emit rules will work
without any more work on your part.

cheers


  reply	other threads:[~2015-10-22  0:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19 12:58 [RFC v3 0/9] Additional kmsg devices Paul Osmialowski
2015-10-19 12:58 ` [RFC v3 1/9] printk: extract kmsg-related routines from printk.c to kmsg.c Paul Osmialowski
2015-10-19 13:53   ` kbuild test robot
2015-10-19 13:59   ` kbuild test robot
2015-10-19 12:58 ` [RFC v3 2/9] printk: add one function for storing log in proper format Paul Osmialowski
2015-10-19 12:58 ` [RFC v3 3/9] kmsg: introduce additional kmsg devices support Paul Osmialowski
2015-10-19 14:10   ` kbuild test robot
2015-10-19 12:58 ` [RFC v3 4/9] kmsg: add additional buffers support to memory class Paul Osmialowski
2015-10-19 13:54   ` kbuild test robot
2015-10-19 12:58 ` [RFC v3 5/9] kmsg: add function for adding and deleting additional buffers Paul Osmialowski
2015-10-19 18:20   ` kbuild test robot
2015-10-19 12:58 ` [RFC v3 6/9] kmsg: add ioctl for adding and deleting kmsg* devices Paul Osmialowski
2015-10-19 13:19   ` Arnd Bergmann
2015-10-19 12:58 ` [RFC v3 7/9] kmsg: add ioctl for kmsg* devices operating on buffers Paul Osmialowski
2015-10-19 12:58 ` [RFC v3 8/9] kmsg: add predefined _PID, _TID, _COMM keywords to kmsg* log dict Paul Osmialowski
2015-10-19 13:53   ` kbuild test robot
2015-10-19 14:11   ` kbuild test robot
2015-10-19 17:45   ` Andy Lutomirski
2015-10-20 11:16     ` Paul Osmialowski
2015-10-20 18:19       ` Andy Lutomirski
2015-10-19 12:58 ` [RFC v3 9/9] kmsg: selftests Paul Osmialowski
2015-10-22  0:32   ` Michael Ellerman [this message]
2015-10-19 13:26 ` [RFC v3 0/9] Additional kmsg devices Richard Weinberger

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=1445473932.30295.4.camel@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=b.zolnierkie@samsung.com \
    --cc=corbet@lwn.net \
    --cc=daniel@zonque.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=k.lewandowsk@samsung.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.niesluchow@samsung.com \
    --cc=p.osmialowsk@samsung.com \
    --cc=pmladek@suse.cz \
    --cc=shuahkh@osg.samsung.com \
    --cc=tj@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®