[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20240609132832.51890-1-jain.abhinav177@gmail.com>
Date: Sun, 9 Jun 2024 13:28:32 +0000
From: Abhinav Jain <jain.abhinav177@...il.com>
To: horms@...nel.org
Cc: davem@...emloft.net,
edumazet@...gle.com,
jain.abhinav177@...il.com,
javier.carrasco.cruz@...il.com,
kuba@...nel.org,
linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org,
netdev@...r.kernel.org,
pabeni@...hat.com,
shuah@...nel.org,
skhan@...uxfoundation.org
Subject: Re: [PATCH] selftests: net: Add on/off checks for network interface non fixed features
On Fri, 7 Jun 2024 19:01:27 +0100, Simon Horman wrote:
> Hi Abhinav,
>
> I suspect this will now only report a failure if tail fails,
> but ignore ethtool failures.
Hi Simon,
I agree, I missed this part earlier. After taking other suggestion
into account, we don't need this tail and I have removed it.
> Shellcheck warns that the above reads words rather than lines,
> and recommends using read instead.
>
> I think that is ok, because the construction reduces lines to single words.
> But it does seem a bit awkward to call grep, awk and sed for this.
>
> I wonder if the following construction nicer:
>
> while read -r FEATURE VALUE FIXED; do
> [ "$FEAT" != "Features" ] || continue # Skip "Features" line
> [ "$FIXED" != "[fixed]" ] || continue # Skip fixed features
> feature="${FEATURE%:*}"
> ...
> done < "$TMP_ETHTOOL_FEATURES"
I have re-submitted a v2 of patch here keeping the above change:
https://lore.kernel.org/all/20240609132124.51683-1-jain.abhinav177@gmail.com/
Please review. Thank you.
Powered by blists - more mailing lists