archive mirror
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <>
To: shuah <>
	Heiko Carstens <>,
	Vasily Gorbik <>
Subject: Re: [PATCH RESEND v3 0/2] selftests: fix prepending $(OUTPUT) to $(TEST_PROGS)
Date: Fri, 8 Nov 2019 13:31:54 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

> Am 07.11.2019 um 23:52 schrieb shuah <>:
> On 10/24/19 6:13 AM, Ilya Leoshkevich wrote:
>> Hello,
>> Is there anything blocking this from getting merged?
> Please see below:
>> This patch series fixes the following problem:
>> linux# make kselftest TARGETS=bpf O=/mnt/linux-build
>> # selftests: bpf:
>> # ./ line 23: ./test_libbpf_open: No such file or directory
>> # test_libbpf: failed at file test_l4lb.o
>> # selftests: test_libbpf [FAILED]
>> Patch 1 appends / to $(OUTPUT) in order to make it more uniform with the
>> rest of the tree.
> It isn't clear what this fixes. In addition, this patch appends an extra
> "/"
> Excerpts from make kselftest-all with this patch applied:
> linux_5.4/tools/testing/selftests/bpf//test_tcpnotify_user
> I am not seeing any reason to take this patch.

The goal of patch 1 was not to fix a practical problem, but rather make
kselftest code follow the same convention as the rest of the build code
in tools/, namely: that $(OUTPUT) is assumed to always end with /.
However, if this commonality is not valuable, I don't think I should
pursue this. So I'd like to withdraw patch 1.

>> Patch 2 fixes the problem by prepending $(OUTPUT) to all members of
>> v1->v2:
>> - Append / to $(OUTPUT).
>> - Use $(addprefix) instead of $(foreach).
> I can't reproduce this problem - I ran
> make kselftest O=/tmp/linux-build

May I ask you, how did you check the test results? I'm asking because
some test failures, including this one, may not affect make exit code.
So you need to grep for e.g. in make output to see the
problem. For example, in my setup a lot of eBPF tests fail without this
patch, and yet:

[root@bpf linux]# make kselftest TARGETS=bpf O=/mnt/linux-build
ok 28 selftests: bpf:
# selftests: bpf:
# ./ line 23: ./test_libbpf_open: No such file or directory
# test_libbpf: failed at file test_l4lb.o
# selftests: test_libbpf [FAILED]
not ok 29 selftests: bpf: # exit=127
make[1]: Leaving directory '/mnt/linux-build'

[root@bpf linux]# echo $?

> This might be fixing the problem in bpf case. However, I don't think
> this is the right fix.

It is weird in general that the existing code prepends $(OUTPUT) only to
the first test prog. The first test prog is by no means special. The
commit message of patch 2 explains in more detail how this discrepancy
causes a practical problem:

> The current logic prepends $(OUTPUT) only to the first member of
> $(TEST_PROGS). After that, run_one() does
>   cd `dirname $TEST`
> For all tests except the first one, `dirname $TEST` is ., which means
> they cannot access the files generated in $(OUTPUT).

Is there a problem with this reasoning?

> I would like to see this problem reproduced on another test first.

Best regards,

      reply	other threads:[~2019-11-08 12:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 12:13 Ilya Leoshkevich
2019-10-24 12:13 ` [PATCH RESEND v3 1/2] selftests: append / to $(OUTPUT) Ilya Leoshkevich
2019-10-24 12:13 ` [PATCH RESEND v3 2/2] selftests: fix prepending $(OUTPUT) to $(TEST_PROGS) Ilya Leoshkevich
2019-11-07 22:52 ` [PATCH RESEND v3 0/2] " shuah
2019-11-08 12:31   ` Ilya Leoshkevich [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH RESEND v3 0/2] selftests: fix prepending $(OUTPUT) to $(TEST_PROGS)' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).