Hi Xiumei,
On Thu, Jul 24, 2025 at 12:55:02PM +0800, Xiumei Mu wrote:
> The esp4_offload module, loaded during IPsec offload tests, should
> be reset to its default settings after testing.
> Otherwise, leaving it enabled could unintentionally affect subsequence
> test cases by keeping offload active.

Would you please show which subsequence test will be affected?

> 
> Fixes: 2766a11161cc ("selftests: rtnetlink: add ipsec offload API test")

It would be good to Cc the fix commit author. You can use
`./scripts/get_maintainer.pl your_patch_file` to get the contacts you
need to Cc.

> Signed-off-by: Xiumei Mu <[email protected]>
> ---
>  tools/testing/selftests/net/rtnetlink.sh | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/rtnetlink.sh 
> b/tools/testing/selftests/net/rtnetlink.sh
> index 2e8243a65b50..5cc1b5340a1a 100755
> --- a/tools/testing/selftests/net/rtnetlink.sh
> +++ b/tools/testing/selftests/net/rtnetlink.sh
> @@ -673,6 +673,11 @@ kci_test_ipsec_offload()
>       sysfsf=$sysfsd/ipsec
>       sysfsnet=/sys/bus/netdevsim/devices/netdevsim0/net/
>       probed=false
> +     esp4_offload_probed_default=false
> +
> +     if lsmod | grep -q esp4_offload; then
> +             esp4_offload_probed_default=true
> +     fi

If the mode is loaded by default, how to avoid the subsequence test to be
failed?

>  
>       if ! mount | grep -q debugfs; then
>               mount -t debugfs none /sys/kernel/debug/ &> /dev/null
> @@ -766,6 +771,7 @@ EOF
>       fi
>  
>       # clean up any leftovers
> +     [ $esp4_offload_probed_default == false ] && rmmod esp4_offload

The new patch need to pass shellcheck. We need to double quote the variable.

Thanks
Hangbin
>       echo 0 > /sys/bus/netdevsim/del_device
>       $probed && rmmod netdevsim
>  
> -- 
> 2.50.1
> 

Reply via email to