* [PATCH] selftests/exec: Add non-regular to TEST_GEN_PROGS
@ 2022-02-10 17:13 Usama
2022-02-10 17:34 ` Shuah Khan
2022-02-10 17:45 ` Kees Cook
0 siblings, 2 replies; 4+ messages in thread
From: Usama @ 2022-02-10 17:13 UTC (permalink / raw)
To: Eric Biederman, Kees Cook, Shuah Khan, Andrew Morton
Cc: Muhammad Usama Anjum, kernel, kernelci, kernelci.org bot,
linux-kselftest, linux-kernel
non-regular file needs to be compiled and then copied to the output
directory. Remove it from TEST_PROGS and add it to TEST_GEN_PROGS. This
removes error thrown by rsync when non-regular object isn't found:
rsync: [sender] link_stat "/linux/tools/testing/selftests/exec/non-regular" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
Fixes: 0f71241a8e32 ("selftests/exec: add file type errno tests")
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
tools/testing/selftests/exec/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
index 551affb437fe1..a89ba6de79870 100644
--- a/tools/testing/selftests/exec/Makefile
+++ b/tools/testing/selftests/exec/Makefile
@@ -3,8 +3,8 @@ CFLAGS = -Wall
CFLAGS += -Wno-nonnull
CFLAGS += -D_GNU_SOURCE
-TEST_PROGS := binfmt_script non-regular
-TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216
+TEST_PROGS := binfmt_script
+TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216 non-regular
TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
# Makefile is a run-time dependency, since it's accessed by the execveat test
TEST_FILES := Makefile
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/exec: Add non-regular to TEST_GEN_PROGS
2022-02-10 17:13 [PATCH] selftests/exec: Add non-regular to TEST_GEN_PROGS Usama
@ 2022-02-10 17:34 ` Shuah Khan
2022-02-10 17:46 ` Kees Cook
2022-02-10 17:45 ` Kees Cook
1 sibling, 1 reply; 4+ messages in thread
From: Shuah Khan @ 2022-02-10 17:34 UTC (permalink / raw)
To: Muhammad Usama Anjum, Eric Biederman, Kees Cook, Shuah Khan,
Andrew Morton
Cc: kernel, kernelci, kernelci.org bot, linux-kselftest,
linux-kernel, Shuah Khan
On 2/10/22 10:13 AM, Muhammad Usama Anjum wrote:
> non-regular file needs to be compiled and then copied to the output
> directory. Remove it from TEST_PROGS and add it to TEST_GEN_PROGS. This
> removes error thrown by rsync when non-regular object isn't found:
>
> rsync: [sender] link_stat "/linux/tools/testing/selftests/exec/non-regular" failed: No such file or directory (2)
> rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
>
> Fixes: 0f71241a8e32 ("selftests/exec: add file type errno tests")
> Reported-by: "kernelci.org bot" <bot@kernelci.org>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
> tools/testing/selftests/exec/Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
> index 551affb437fe1..a89ba6de79870 100644
> --- a/tools/testing/selftests/exec/Makefile
> +++ b/tools/testing/selftests/exec/Makefile
> @@ -3,8 +3,8 @@ CFLAGS = -Wall
> CFLAGS += -Wno-nonnull
> CFLAGS += -D_GNU_SOURCE
>
> -TEST_PROGS := binfmt_script non-regular
> -TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216
> +TEST_PROGS := binfmt_script
> +TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216 non-regular
> TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
> # Makefile is a run-time dependency, since it's accessed by the execveat test
> TEST_FILES := Makefile
>
This change looks good to me. regular is a binary and TEST_GEN_PROGS is
where it belongs.
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Also binfmt_script could be renamed to clearly identify that it is python
script. This can be done in a separate patch.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/exec: Add non-regular to TEST_GEN_PROGS
2022-02-10 17:13 [PATCH] selftests/exec: Add non-regular to TEST_GEN_PROGS Usama
2022-02-10 17:34 ` Shuah Khan
@ 2022-02-10 17:45 ` Kees Cook
1 sibling, 0 replies; 4+ messages in thread
From: Kees Cook @ 2022-02-10 17:45 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: Eric Biederman, Shuah Khan, Andrew Morton, kernel, kernelci,
kernelci.org bot, linux-kselftest, linux-kernel
On Thu, Feb 10, 2022 at 10:13:23PM +0500, Muhammad Usama Anjum wrote:
> non-regular file needs to be compiled and then copied to the output
> directory. Remove it from TEST_PROGS and add it to TEST_GEN_PROGS. This
> removes error thrown by rsync when non-regular object isn't found:
>
> rsync: [sender] link_stat "/linux/tools/testing/selftests/exec/non-regular" failed: No such file or directory (2)
> rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
>
> Fixes: 0f71241a8e32 ("selftests/exec: add file type errno tests")
> Reported-by: "kernelci.org bot" <bot@kernelci.org>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Eek, thanks for fixing this!
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/exec: Add non-regular to TEST_GEN_PROGS
2022-02-10 17:34 ` Shuah Khan
@ 2022-02-10 17:46 ` Kees Cook
0 siblings, 0 replies; 4+ messages in thread
From: Kees Cook @ 2022-02-10 17:46 UTC (permalink / raw)
To: Shuah Khan
Cc: Muhammad Usama Anjum, Eric Biederman, Shuah Khan, Andrew Morton,
kernel, kernelci, kernelci.org bot, linux-kselftest,
linux-kernel
On Thu, Feb 10, 2022 at 10:34:20AM -0700, Shuah Khan wrote:
> On 2/10/22 10:13 AM, Muhammad Usama Anjum wrote:
> > non-regular file needs to be compiled and then copied to the output
> > directory. Remove it from TEST_PROGS and add it to TEST_GEN_PROGS. This
> > removes error thrown by rsync when non-regular object isn't found:
> >
> > rsync: [sender] link_stat "/linux/tools/testing/selftests/exec/non-regular" failed: No such file or directory (2)
> > rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
> >
> > Fixes: 0f71241a8e32 ("selftests/exec: add file type errno tests")
> > Reported-by: "kernelci.org bot" <bot@kernelci.org>
> > Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> > ---
> > tools/testing/selftests/exec/Makefile | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile
> > index 551affb437fe1..a89ba6de79870 100644
> > --- a/tools/testing/selftests/exec/Makefile
> > +++ b/tools/testing/selftests/exec/Makefile
> > @@ -3,8 +3,8 @@ CFLAGS = -Wall
> > CFLAGS += -Wno-nonnull
> > CFLAGS += -D_GNU_SOURCE
> > -TEST_PROGS := binfmt_script non-regular
> > -TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216
> > +TEST_PROGS := binfmt_script
> > +TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216 non-regular
> > TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir
> > # Makefile is a run-time dependency, since it's accessed by the execveat test
> > TEST_FILES := Makefile
> >
>
> This change looks good to me. regular is a binary and TEST_GEN_PROGS is
> where it belongs.
>
> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
>
> Also binfmt_script could be renamed to clearly identify that it is python
> script. This can be done in a separate patch.
Yeah, I agree: that would help with skimming the Makefile for
correctness.
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-10 17:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 17:13 [PATCH] selftests/exec: Add non-regular to TEST_GEN_PROGS Usama
2022-02-10 17:34 ` Shuah Khan
2022-02-10 17:46 ` Kees Cook
2022-02-10 17:45 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).