From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4F661DF752 for ; Thu, 17 Oct 2024 16:33:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729182822; cv=none; b=lc7NawlarcaninDhvJqMv9UBFWev7Vrv22XSxH84CNoiD0WUebVLq2EjzRMWRCXuIoCjOhBuV93SKvN6suC8q78L1PmZCiblDPzhbmqUXR1Uz1pv+hSXo8ZGEXIKqOhfMfB2hDmB0uQZ5bGsaPf5SMc8xgnYIl8OMnhy16VoH38= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729182822; c=relaxed/simple; bh=yoEuYNpDLTcqlOrcwsDe+hvhIkPXA709M40hhaLRE1Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MJts30uvn4cUwFgaPMn6pdyA60jaseMpQ3PL4Z0UiFv41A4DQpTjnOotQ+lOCk+RS+9fJhE1ZxSyG1iyHiIvarH+JBjE6yQhe7yy0Wa5VM885t197QMa3Wsqnai6gtCGyN/R7/ADvKO3MuoO3dYCBYtCd4vI4kIzsxwDOtl2oMo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=H/KTB3Yb; arc=none smtp.client-ip=209.85.166.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="H/KTB3Yb" Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-83a9b3d8145so44629439f.2 for ; Thu, 17 Oct 2024 09:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1729182820; x=1729787620; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=W0ti0XsvTZ/XzR+pwVr3tLSQQ+95HGH92FNh0wKLCeg=; b=H/KTB3YbKW93VN+yF/1sDZTk4UnJDsJx6MWqBLRqWGqGpAAL/QqtYzO8YSXaFBnPwA XLYg3E5+PWBX89hCnFBYY89XPngsHg+Y2JOQkKtdR1iP0DNTqQq9KVETD4sQDYhPVgA6 vd3fmtLU5+m+53D8wRzXvx3nKPtzBVQD8lHlw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729182820; x=1729787620; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=W0ti0XsvTZ/XzR+pwVr3tLSQQ+95HGH92FNh0wKLCeg=; b=txKTUpCN940HE0mBgh4TNJ3vdyzAAt8TcTnWyyvhT21TN6YISyzMG9dQrFy5u9/5pd fJLTvAKr/WAJOba5J5r1zgwlngTNzf39WhPcvF4tbiRgEb+TeYacVIFSh6TwvfTcOx6P W9+z1VZ+a977SJLJKXMDu0Ti9Gotcjf9tEjRHW5/BYR67IbbA995TPhkNdOPlx8ifWU0 1PHyGqJaZpeobQ85DwWnsELdr61b97dncpoq8MOtc790RhS8Ce+95dW3ZIxcCxYTpbo4 IDx8x6Z1aMGV5zhklDlp6FULhdzEzr0yg5eVgBZMtvV+kC9JYOhngnlKybRsyFv1RZ/4 jXKQ== X-Forwarded-Encrypted: i=1; AJvYcCVST2n0dsdoGE2MXQ4+jjwsUGOSxrpALz4XxJevauaBeowuCZKHpAs8xrR3ZXLW3mltRp3CWdVMSQ0=@vger.kernel.org X-Gm-Message-State: AOJu0Yw8GVe2Mm6e1uy7MpRJq6E6hykJrDfEdM2Xam0XeUwbzh1C0HZ0 BrLnK61NEhi2OKYzQSoK59rU2L7khk7bP6KitOb6dC/YUYTi2i/WgxrZnUIll+U= X-Google-Smtp-Source: AGHT+IGZj5VTEGoyvHrGcQoBTDUL1ECuKHmy2uuHvPmgVMAluVOKOTXVY2rCJ8eR0erFZ+BzRAd48w== X-Received: by 2002:a92:b701:0:b0:3a3:dadc:12d9 with SMTP id e9e14a558f8ab-3a3dadc1780mr74371115ab.25.1729182819840; Thu, 17 Oct 2024 09:33:39 -0700 (PDT) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4dbec9b252bsm1417359173.57.2024.10.17.09.33.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Oct 2024 09:33:39 -0700 (PDT) Message-ID: Date: Thu, 17 Oct 2024 10:33:38 -0600 Precedence: bulk X-Mailing-List: linux-api@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: The "make headers" requirement, revisited: [PATCH v3 3/3] selftests: pidfd: add tests for PIDFD_SELF_* To: John Hubbard , Lorenzo Stoakes , Christian Brauner , Peter Zijlstra Cc: Shuah Khan , "Liam R . Howlett" , Suren Baghdasaryan , Vlastimil Babka , pedro.falcato@gmail.com, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Oliver Sang , Shuah Khan References: <6dd57f0e-34b4-4456-854b-a8abdba9163b@nvidia.com> Content-Language: en-US From: Shuah Khan In-Reply-To: <6dd57f0e-34b4-4456-854b-a8abdba9163b@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/16/24 20:01, John Hubbard wrote: > On 10/16/24 1:00 PM, Shuah Khan wrote: >> On 10/16/24 04:20, Lorenzo Stoakes wrote: > ... >>> diff --git a/tools/testing/selftests/pidfd/pidfd.h b/tools/testing/selftests/pidfd/pidfd.h >>> index 88d6830ee004..1640b711889b 100644 >>> --- a/tools/testing/selftests/pidfd/pidfd.h >>> +++ b/tools/testing/selftests/pidfd/pidfd.h >>> @@ -50,6 +50,14 @@ >>>   #define PIDFD_NONBLOCK O_NONBLOCK >>>   #endif >>> +/* System header file may not have this available. */ >>> +#ifndef PIDFD_SELF_THREAD >>> +#define PIDFD_SELF_THREAD -100 >>> +#endif >>> +#ifndef PIDFD_SELF_THREAD_GROUP >>> +#define PIDFD_SELF_THREAD_GROUP -200 >>> +#endif >>> + >> >> As mentioned in my response to v1 patch: >> >> kselftest has dependency on "make headers" and tests include >> headers from linux/ directory > > Wait, what?! Noooo! > > Hi, Shuah! :) > > We have had this conversation before. And there were fireworks coming from > various core kernel developers who found that requirement to be unacceptable. > > And in response, I made at selftests/mm tests buildable *without* requiring > a "make headers" first, in [1]. > > I haven't followed up with other subsystems, but...maybe I should. Because > otherwise we're just going to keep having this discussion. > > The requirement to do "make headers" is not a keeper. Really. The reason we added the requirement to avoid duplicate defines such as this one added to kselftest source files. These are error prone and hard to resolve. In some cases, these don't become uapi and don't make it into system headers. selftests are in a category of depending on kernel headers to be able to test some features. Getting rid of this dependency mean, tests will be full of local defines such as this one which will become unmanageable overtime. The discussion should be: "How do we get rid of the dependency without introducing local defines?" not just "Let's get rid of the dependency" thanks, -- Shuah