Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1365472

Re: [RFC PATCH v1 1/9] selftest: sync: basic tests for sw_sync framework

From Emilio López <emilio.lopez@collabora.co.uk>
Newsgroups linux.kernel
Subject Re: [RFC PATCH v1 1/9] selftest: sync: basic tests for sw_sync framework
Date 2016-03-28 15:00 +0200
Message-ID <rhEVY-7c7-3@gated-at.bofh.it> (permalink)
References <raOno-1of-5@gated-at.bofh.it> <raOnp-1of-39@gated-at.bofh.it> <rhDZT-6xZ-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

El 28/03/16 a las 08:56, Emil Velikov escribió:
> Hi Emilio,
>
> On 9 March 2016 at 15:28, Emilio López <emilio.lopez@collabora.co.uk> wrote:
>> 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]:

"""
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.
"""

Cheers,
Emilio

[0] http://kernelnewbies.org/KernelHeaders

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH v1 1/9] selftest: sync: basic tests for sw_sync framework Emil Velikov <emil.l.velikov@gmail.com> - 2016-03-28 14:00 +0200
  Re: [RFC PATCH v1 1/9] selftest: sync: basic tests for sw_sync  framework Emilio López <emilio.lopez@collabora.co.uk> - 2016-03-28 15:00 +0200
    Re: [RFC PATCH v1 1/9] selftest: sync: basic tests for sw_sync framework Emil Velikov <emil.l.velikov@gmail.com> - 2016-03-28 15:50 +0200

csiph-web