All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
To: Jiri Benc <jbenc@redhat.com>
Cc: bpf@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH RFC] selftests: do not use .ONESHELL
Date: Fri, 15 May 2020 12:18:14 +0300	[thread overview]
Message-ID: <xuny4kshpne1.fsf@redhat.com> (raw)
In-Reply-To: <20200515102841.3fa15ff7@redhat.com> (Jiri Benc's message of "Fri, 15 May 2020 10:28:41 +0200")

Hi, Jiri!

>>>>> On Fri, 15 May 2020 10:28:41 +0200, Jiri Benc  wrote:

 > On Fri, 15 May 2020 06:00:51 +0300, Yauheni Kaliuta wrote:
 >> 1) I'm wondering how commit c363eb48ada5 ("selftests: fix too long
 >> argument") worked without the patch.

 > I think it was because it reduced the list of files from three
 > replications to two. I did not notice the .ONESHELL; it also
 > explains the oddity that I saw with @ behavior.

 > With the .ONESHELL removed, we can further simplify
 > INSTALL_SINGLE_RULE by removing the @echo rsync and the
 > at-sign before rsync.

Yeah.

 >> 2) The code does not look working as expected for me:
 >> 2.1) "X$(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)" != "X" is
 >> always true sine the left part will be at least "X  " (spaces);
 >> 2.2) according to manual in .ONESHELL case gmake checks only first
 >> line for @, so @rsync is passed to the shell;

Actully, when I checked it in the `if` branch, @ worked as
expected, sounds strange for me. But well, without .ONESHELL it
will go away.

 >> 2.3) $(OUTPUT)/(TEST_PROGS) adds $(OUTPUT) only to the first prog;
 >> 
 >> Did I miss something?

 > I think you didn't miss anything and that you're right. Could
 > you submit a patch to remove the spaces? I can then submit a
 > patch to further simplify INSTALL_SINGLE_RULE if you don't
 > want to do that, too.

Just allow rsync command echoing, right? I can do it, no problem.

And RUN_TESTS' `@` does not work in the `if` branch, so the patch
should be fixed.

Also I noticed possible issue related to my previous patch:

lib.mk does TEST_GEN_FILES := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_FILES))
(Notice := ). But it's included (at least in the bpf/Makefile)
before TEST_GEN_FILES is constructed during rules generation so
basically it's skipped. BUT in the generated rules $(OUTPUT) is
taken into account. Sort of inconsistency. Did I miss something?

If any of the lists grows too much again the next modification in
my mind is to do $(foreach ...) on the lists and handle them
file-by-file.

Thanks for the review!

-- 
WBR,
Yauheni Kaliuta


      reply	other threads:[~2020-05-15  9:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15  3:00 [PATCH RFC] selftests: do not use .ONESHELL Yauheni Kaliuta
2020-05-15  8:28 ` Jiri Benc
2020-05-15  9:18   ` Yauheni Kaliuta [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:
  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=xuny4kshpne1.fsf@redhat.com \
    --to=yauheni.kaliuta@redhat.com \
    --cc=bpf@vger.kernel.org \
    --cc=jbenc@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=shuah@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.