Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2017697pxu; Fri, 9 Oct 2020 06:03:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHtmf7iaA4+hCa0gtkc+tLl9nwUtzLDy2q7crGhMPWRgsHxTb9kIUdCxO2ZhWwNb5dWMHR X-Received: by 2002:a17:906:6158:: with SMTP id p24mr13875385ejl.35.1602248597799; Fri, 09 Oct 2020 06:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602248597; cv=none; d=google.com; s=arc-20160816; b=RJamu+lowW384jkZrdmgH3cOPsQoW04i6Txsj2AHWff1QJff8K3Ye+CG+Cvx8s2p/9 HbOZYBTzSMVtB9vPJisQ2nn6wdKgFgt+aQtBR0Fk1rJhdqH8i6NkZHlKw51sSE00ESPS VSymfyvIZQUcjISr+7ZykDR9Er4p+NJfXUwGUPdLbn5fHZU1B0g6UL4w63rYZyuref8i ououQgpteG1hyaZizeRsM6ROolZT8JSU8Vuy6YNMQH80zPcFsu1LtgfDNJ7ohBYFMwbr +joocoz/7AjDmlDVaLi+Pp+4AMNEg0mTefOELj5jjtsucJqyPPvBbVSE/6mv69Cx2xqg m4CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NTtNqIORHMbR/en9a0TAgfHmhHDKWJlw/4EMuRIRGQo=; b=W/HRn+tYbq3yzV0tTvzE/Ipj3adys/OsFrJyWbgME7loeqE6ZQzpNgROQKB6u2okHx pc98yBSdd41dxOhzDt/vmqO62m1LC5NV+bfS4ip+ehTAk2PKvznZOaA75RELuj8WKTFA TYY8NQIoXScMoEw23foXwrfNVnoKTf8XZKrQkZqLBZohvIim/s4HDSSqP3GjeFRmJUiH VkhGJh2dkOb+Kq4w90AIkeszKxFOH0lzKgxlz05NunT0FIXN52wXnjc9jdeup2QjMi1Y jub1+tPYxRyXWKW3iBHkhOGT1pG7N4UE0DJfEmrBMlqoRUT256TZNbW6Csf+O/3GmIT4 JM/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id li15si6021107ejb.166.2020.10.09.06.02.47; Fri, 09 Oct 2020 06:03:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388359AbgJIMG2 (ORCPT + 99 others); Fri, 9 Oct 2020 08:06:28 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:57138 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730726AbgJIMG1 (ORCPT ); Fri, 9 Oct 2020 08:06:27 -0400 Received: from ip5f5af0a0.dynamic.kabel-deutschland.de ([95.90.240.160] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kQrAI-0008IL-4z; Fri, 09 Oct 2020 12:06:26 +0000 Date: Fri, 9 Oct 2020 14:06:25 +0200 From: Christian Brauner To: Tommi Rantala Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan , Kees Cook Subject: Re: [PATCH 01/13] selftests: filter kselftest headers from command in lib.mk Message-ID: <20201009120625.yh7peipfjpj2c6sv@wittgenstein> References: <20201008122633.687877-1-tommi.t.rantala@nokia.com> <20201008122633.687877-2-tommi.t.rantala@nokia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20201008122633.687877-2-tommi.t.rantala@nokia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 08, 2020 at 03:26:21PM +0300, Tommi Rantala wrote: > Commit 1056d3d2c97e ("selftests: enforce local header dependency in > lib.mk") added header dependency to the rule, but as the rule uses $^, > the headers are added to the compiler command line. > > This can cause unexpected precompiled header files being generated when > compilation fails: > > $ echo { >> openat2_test.c > > $ make > gcc -Wall -O2 -g -fsanitize=address -fsanitize=undefined openat2_test.c > tools/testing/selftests/kselftest_harness.h tools/testing/selftests/kselftest.h helpers.c > -o tools/testing/selftests/openat2/openat2_test > openat2_test.c:313:1: error: expected identifier or ‘(’ before ‘{’ token > 313 | { > | ^ > make: *** [../lib.mk:140: tools/testing/selftests/openat2/openat2_test] Error 1 > > $ file openat2_test* > openat2_test: GCC precompiled header (version 014) for C > openat2_test.c: C source, ASCII text > > Fix it by filtering out the headers, so that we'll only pass the actual > *.c files in the compiler command line. > > Fixes: 1056d3d2c97e ("selftests: enforce local header dependency in lib.mk") > Signed-off-by: Tommi Rantala > --- Thanks! Reviewed-by: Christian Brauner