[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YoW10/wHCqDelBZj@Laptop-X1>
Date: Thu, 19 May 2022 11:13:23 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Paolo Abeni <pabeni@...hat.com>, Shuah Khan <shuah@...nel.org>,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net 0/2] selftests: net: add missing tests to Makefile
On Wed, May 18, 2022 at 08:25:48AM -0700, Jakub Kicinski wrote:
> On Wed, 18 May 2022 14:01:43 +0800 Hangbin Liu wrote:
> > > > +files=$(git show --name-status --oneline | grep -P '^A\ttools/testing/selftests/net/' | grep '\.sh$' | sed 's@A\ttools/testing/selftests/net/@@')
>
> FWIW this will list just the names of bash scripts with no decoration:
>
> git show --pretty="" --name-only -- tools/testing/selftests/*.sh
>
> And we can get the names of the files with basename:
>
> for f in $(git show --pretty="" --name-only); do basename $f; done
This way is easier :)
> > python for testing. So I think there is no need to check all
> > tools/testing/selftests/.*/Makefile. WDYT?
>
> Not sure I understand, let me explain what I meant in more detail.
> I think we should make it generic. For example check the Makefile
> in the same location as the script:
>
> grep $(basename $f) $(dirname $f)/Makefile
>
> And maybe just to be safe one directory level down?
>
> grep $(basename $f) $(dirname $(dirname $f))/Makefile
>
> Instead of hardcoding the expected paths.
Ah, got what you mean. Thanks. I will check how to update the script
and open PR after that.
Cheers
Hangbin
Powered by blists - more mailing lists