From: "Emilio López" <emilio.lopez@collabora.co.uk>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: "Shuah Khan" <shuahkh@osg.samsung.com>,
devel@driverdev.osuosl.org,
"Daniel Stone" <daniels@collabora.com>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Arve Hjønnevåg" <arve@android.com>,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
"ML dri-devel" <dri-devel@lists.freedesktop.org>,
"Riley Andrews" <riandrews@android.com>,
linux-kselftest@vger.kernel.org,
"Gustavo Padovan" <gustavo.padovan@collabora.co.uk>,
"John Harrison" <John.C.Harrison@intel.com>
Subject: Re: [RFC PATCH v1 1/9] selftest: sync: basic tests for sw_sync framework
Date: Mon, 4 Apr 2016 01:12:15 -0300 [thread overview]
Message-ID: <5701E99F.5030102@collabora.co.uk> (raw)
In-Reply-To: <CACvgo53=VQ4TmWmLOjWnOodCVgjZVOBzS7Y=8N2hrWgRGDs6JQ@mail.gmail.com>
Hi,
El 28/03/16 a las 10:48, Emil Velikov escribió:
>>>> These tests are based on the libsync test suite from Android.
>>>> This commit lays the ground for future tests, as well as includes
>>>> tests for a variety of basic allocation commands.
>>>>
>>>> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>>>> Signed-off-by: Emilio López <emilio.lopez@collabora.co.uk>
>>>> ---
>>>>
>>>
>>>> tools/testing/selftests/sync/sync.h | 119 ++++++++++++++++++
>>>
>>> Admittedly I know nothing about the kernel selftests although copying
>>> the UAPI header, seems to defeat the purpose of this exercise.
>>> Shouldn't one reuse the existing header ? It would even cause issues
>>> as the interface gets updated (iirc Gustavo changed the ioctl numbers
>>> and/or header name with latter series).
>>
>>
>> The problem is that one cannot use the system header without having built
>> and installed the kernel first, which is rather problematic for eg.
>> crosscompiling or virtualization. I discussed this with Gustavo and we
>> agreed that the best way forward would be to copy the interfaces, as
>> suggested by kernelnewbies' wiki[0]:
>>
> In the case of using a system header one can just `make
> headers_install' without building the kernel, as mentioned in the very
> same page ;-) Although I wasn't thinking that one should be using the
> header already available in tree. After all this series is not
> supposed to land before Gustavo's work, is it ?
>
> From a quick skim though the selftests, I cannot see cases where UAPI
> headers are copied/duplicated.
>
>> """
>> The correct way to address this problem is to isolate the specific
>> interfaces that you need, e.g. a single header file that is patched in a new
>> kernel providing the ioctl numbers for a character device used by your
>> program. In your own program, add a copy of that source file, with a notice
>> that it should be kept in sync with new kernel versions.
>> """
> My understanding of the article is that it refers to building user
> space programs that do _not_ live in the same tree as the kernel. Am I
> missing something ?
When I tried using the header directly from the kernel tree, the
compiler told me not to do that and pointed me to that kernelnewbies
page; I could try overriding the check like I see memfd does[0] but I
don't know if that's the way to go. Shuah, what's your thoughts on this?
Thanks,
Emilio
[0]
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/memfd/memfd_test.c#n2
next prev parent reply other threads:[~2016-04-04 4:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 15:28 [RFC PATCH v1 0/9] Tests for sync infrastructure Emilio López
2016-03-09 15:28 ` [RFC PATCH v1 1/9] selftest: sync: basic tests for sw_sync framework Emilio López
2016-03-28 11:56 ` Emil Velikov
2016-03-28 12:20 ` Emilio López
2016-03-28 13:48 ` Emil Velikov
2016-04-04 4:12 ` Emilio López [this message]
2016-04-07 14:47 ` Emil Velikov
2016-03-09 15:28 ` [RFC PATCH v1 2/9] selftest: sync: fence " Emilio López
2016-03-09 15:28 ` [RFC PATCH v1 3/9] selftest: sync: merge " Emilio López
2016-03-09 15:28 ` [RFC PATCH v1 4/9] selftest: sync: wait " Emilio López
2016-03-09 15:28 ` [RFC PATCH v1 5/9] selftest: sync: destruction " Emilio López
2016-03-09 15:28 ` [RFC PATCH v1 6/9] selftest: sync: stress test for parallelism Emilio López
2016-03-09 15:29 ` [RFC PATCH v1 7/9] selftest: sync: stress consumer/producer test Emilio López
2016-03-09 15:29 ` [RFC PATCH v1 8/9] selftest: sync: stress test for merges Emilio López
2016-03-09 15:29 ` [RFC PATCH v1 9/9] selftest: sync: disable tests that rely on not yet defined behaviour Emilio López
2016-03-09 16:14 ` Shuah Khan
2016-03-28 12:33 ` Emilio López
2016-03-09 16:13 ` [RFC PATCH v1 0/9] Tests for sync infrastructure Shuah Khan
2016-03-28 12:32 ` Emilio López
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=5701E99F.5030102@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=gustavo.padovan@collabora.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=riandrews@android.com \
--cc=shuahkh@osg.samsung.com \
/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