mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Emilio López" <emilio.lopez@collabora.co.uk>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: shuah@kernel.org, devel@driverdev.osuosl.org,
	gustavo.padovan@collabora.co.uk, riandrews@android.com,
	daniel.vetter@ffwll.ch, John.C.Harrison@Intel.com,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	ghackmann@google.com, robdclark@gmail.com,
	linux-kselftest@vger.kernel.org,
	maarten.lankhorst@linux.intel.com, daniels@collabora.com,
	arve@android.com, emil.l.velikov@gmail.com
Subject: Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework
Date: Thu, 22 Sep 2016 11:23:51 -0300	[thread overview]
Message-ID: <56f420ed-e985-2433-31fd-50515d8bcd1c@collabora.co.uk> (raw)
In-Reply-To: <87fuos8e25.fsf@concordia.ellerman.id.au>

Hi Michael,

El 22/09/16 a las 06:43, Michael Ellerman escribió:
> Emilio López <emilio.lopez@collabora.co.uk> writes:
>> +CFLAGS += -I../../../../include/uapi/
>
> Please don't include the unprocessed uapi headers, they are not meant to
> be directly included in userspace programs.
>
> They even say so:
>
> include/uapi/linux/types.h:#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
>
>> +CFLAGS += -I../../../../include/
>
> Please don't include the *kernel* headers, they're really not meant to
> be used in userspace programs :)
>
>> +CFLAGS += -I../../../../usr/include/
>
> That is the correct place to get them from. They'll have been put there
> by 'make headers_install'.
>
>> +CFLAGS += -I../../../../drivers/dma-buf/
>
> That's also a bit fishy.

My inspiration here has been tools/testing/selftests/memfd/Makefile, 
which does it this way. If I only include the ones on usr then it 
doesn't build, as there's no sync_file.h available, even after running 
make headers_install. How am I supposed to use the ioctls from there?

The dma-buf include path is a leftover from the previous version, 
there's no longer any headers there. I've fixed the other things you 
pointed out, the new Makefile is below if you want to take another look.

Thanks for the review! :)
Emilio

---

CFLAGS += -O2 -g -std=gnu89 -pthread -Wall -Wextra
CFLAGS += -I../../../../usr/include/
LDFLAGS += -pthread

TEST_PROGS = sync_test

all: $(TEST_PROGS)

include ../lib.mk

OBJS = sync_test.o sync.o

TESTS += sync_alloc.o
TESTS += sync_fence.o
TESTS += sync_merge.o
TESTS += sync_wait.o
TESTS += sync_stress_parallelism.o
TESTS += sync_stress_consumer.o
TESTS += sync_stress_merge.o

sync_test: $(OBJS) $(TESTS)

clean:
	$(RM) sync_test $(OBJS) $(TESTS)

  reply	other threads:[~2016-09-22 14:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 21:11 [PATCH 0/7] Tests for sync infrastructure Emilio López
2016-09-21 21:11 ` [PATCH 1/7] selftest: sync: basic tests for sw_sync framework Emilio López
2016-09-22  9:43   ` Michael Ellerman
2016-09-22 14:23     ` Emilio López [this message]
2016-09-27  4:23       ` Michael Ellerman
2016-09-27 14:51         ` Emilio López
2016-10-05  1:00           ` Michael Ellerman
2016-09-21 21:12 ` [PATCH 2/7] selftest: sync: fence " Emilio López
2016-09-21 21:12 ` [PATCH 3/7] selftest: sync: merge " Emilio López
2016-09-21 21:12 ` [PATCH 4/7] selftest: sync: wait " Emilio López
2016-09-21 21:12 ` [PATCH 5/7] selftest: sync: stress test for parallelism Emilio López
2016-09-21 21:12 ` [PATCH 6/7] selftest: sync: stress consumer/producer test Emilio López
2016-09-21 21:12 ` [PATCH 7/7] selftest: sync: stress test for merges Emilio López
2016-10-19 12:49 ` [PATCH v2 0/7] Tests for sync infrastructure Emilio López
2016-10-19 12:49   ` [PATCH v2 1/7] selftest: sync: basic tests for sw_sync framework Emilio López
2016-11-01 16:18     ` Gustavo Padovan
2016-12-13 16:46       ` Shuah Khan
2016-10-19 12:49   ` [PATCH v2 2/7] selftest: sync: fence " Emilio López
2016-10-19 12:49   ` [PATCH v2 3/7] selftest: sync: merge " Emilio López
2016-10-19 12:49   ` [PATCH v2 4/7] selftest: sync: wait " Emilio López
2016-10-19 12:49   ` [PATCH v2 5/7] selftest: sync: stress test for parallelism Emilio López
2016-10-19 12:49   ` [PATCH v2 6/7] selftest: sync: stress consumer/producer test Emilio López
2016-10-19 12:49   ` [PATCH v2 7/7] selftest: sync: stress test for merges Emilio López
2016-12-02  1:17   ` [PATCH v2 0/7] Tests for sync infrastructure Shuah Khan
2016-12-02 14:08     ` Shuah Khan

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=56f420ed-e985-2433-31fd-50515d8bcd1c@collabora.co.uk \
    --to=emilio.lopez@collabora.co.uk \
    --cc=John.C.Harrison@Intel.com \
    --cc=arve@android.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniels@collabora.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=ghackmann@google.com \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mpe@ellerman.id.au \
    --cc=riandrews@android.com \
    --cc=robdclark@gmail.com \
    --cc=shuah@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®