Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: "Mickaël Salaün" <mic@digikod.net>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Guillaume Tucker" <guillaume.tucker@collabora.com>
Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Masahiro Yamada <masahiroy@kernel.org>,
	linux-security-module <linux-security-module@vger.kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [GIT PULL] Kselftest update for Linux 5.20-rc1
Date: Tue, 2 Aug 2022 08:29:35 -0600	[thread overview]
Message-ID: <84560b65-12ed-da24-3698-45484f80802a@linuxfoundation.org> (raw)
In-Reply-To: <2838c247-0648-3828-efb3-e11d7a0616b2@digikod.net>

On 8/2/22 3:51 AM, Mickaël Salaün wrote:
> Hi,
> 
> This change breaks the Landlock test build when performed on the tools/testing/selftests/landlock directory because the (non-system/up-to-date) kernel headers aren't found. Looking at the use of top_srcdir and HDR_PATH, it seems that multiple subsystems are using this feature. I consider this change a regression.
> 

I did a build test from the top level before sending the pull request
and didn't catch this breakage as a result. This breaks when build is
run from the test directory.

We have had several problems related to khdr_dir and target and decided
to move away from it with this change.

> It also removes the check on up-to-date kernel headers (thanks to the Makefile's target timestamp).
> 
> I wasn't CCed for this change impacting Landlock [1]. Please keep in mind to add at least maintainers and related mailing-lists for changes on related subsystems.
> 

That is the usual practice and if I notice missing maintainers, I add
them. We missed this one.

> The following patch almost revert commit a917dd94b832 ("selftests/landlock: drop deprecated headers dependency") and partially fixes commit 49de12ba06ef ("selftests: drop KSFT_KHDR_INSTALL make target"):
> 

Guillaume,

Will you be able to look at this and send a patch on top? I will
send another pull request before merge window closes?

> --- a/tools/testing/selftests/landlock/Makefile
> +++ b/tools/testing/selftests/landlock/Makefile
> @@ -9,10 +9,13 @@ TEST_GEN_PROGS := $(src_test:.c=)
>   TEST_GEN_PROGS_EXTENDED := true
> 
>   OVERRIDE_TARGETS := 1
> +top_srcdir = ../../../..
>   include ../lib.mk
> 
> +khdr_dir = $(top_srcdir)/usr/include
> +
>   $(OUTPUT)/true: true.c
>       $(LINK.c) $< $(LDLIBS) -o $@ -static
> 
> -$(OUTPUT)/%_test: %_test.c ../kselftest_harness.h common.h
> -    $(LINK.c) $< $(LDLIBS) -o $@ -lcap
> +$(OUTPUT)/%_test: %_test.c $(khdr_dir)/linux/landlock.h ../kselftest_harness.h common.h
> +    $(LINK.c) $< $(LDLIBS) -o $@ -lcap -I$(khdr_dir)
> 
> 
> This doesn't fix the header timestamp check though.
> 

thanks,
-- Shuah

  reply	other threads:[~2022-08-02 14:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01 22:03 [GIT PULL] Kselftest update for Linux 5.20-rc1 Shuah Khan
2022-08-02  9:51 ` Mickaël Salaün
2022-08-02 14:29   ` Shuah Khan [this message]
2022-08-03  4:44     ` Guillaume Tucker
2022-08-03 14:32       ` Shuah Khan
2022-08-03 20:22         ` Guillaume Tucker
2022-08-03 23:12           ` Shuah Khan
2022-08-03  3:23 ` pr-tracker-bot

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=84560b65-12ed-da24-3698-45484f80802a@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=guillaume.tucker@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mic@digikod.net \
    --cc=torvalds@linux-foundation.org \
    /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