Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755071AbcC1Mvs (ORCPT ); Mon, 28 Mar 2016 08:51:48 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42215 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754079AbcC1Mvq (ORCPT ); Mon, 28 Mar 2016 08:51:46 -0400 Subject: Re: [RFC PATCH v1 1/9] selftest: sync: basic tests for sw_sync framework To: Emil Velikov References: <1457537342-678-1-git-send-email-emilio.lopez@collabora.co.uk> <1457537342-678-2-git-send-email-emilio.lopez@collabora.co.uk> Cc: Shuah Khan , devel@driverdev.osuosl.org, Daniel Stone , Daniel Vetter , =?UTF-8?Q?Arve_Hj=c3=b8nnev=c3=a5g?= , "Linux-Kernel@Vger. Kernel. Org" , ML dri-devel , Riley Andrews , linux-kselftest@vger.kernel.org, Gustavo Padovan , John Harrison From: =?UTF-8?Q?Emilio_L=c3=b3pez?= Message-ID: <56F92196.6040604@collabora.co.uk> Date: Mon, 28 Mar 2016 09:20:38 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1621 Lines: 40 Hi, El 28/03/16 a las 08:56, Emil Velikov escribió: > Hi Emilio, > > On 9 March 2016 at 15:28, Emilio López 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 >> Signed-off-by: Emilio López >> --- >> > >> 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