Patch "selftests: mlxsw: Remove a redundant if statement in tc_flower_scale test" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests: mlxsw: Remove a redundant if statement in tc_flower_scale test

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-mlxsw-remove-a-redundant-if-statement-in-t.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 32563644574e2a2632affe118bd00730ceac53fa
Author: Danielle Ratson <danieller@xxxxxxxxxx>
Date:   Fri Apr 23 14:19:45 2021 +0200

    selftests: mlxsw: Remove a redundant if statement in tc_flower_scale test
    
    [ Upstream commit 1f1c92139e36223b89d8140f2b72f75e79baf8bd ]
    
    Currently, the error return code of the failure condition is lost after
    using an if statement, so the test doesn't fail when it should.
    
    Remove the if statement that separates the condition and the error code
    check, so the test won't always pass.
    
    Fixes: abfce9e062021 ("selftests: mlxsw: Reduce running time using offload indication")
    Reported-by: Ido Schimmel <idosch@xxxxxxxxxx>
    Signed-off-by: Danielle Ratson <danieller@xxxxxxxxxx>
    Reviewed-by: Petr Machata <petrm@xxxxxxxxxx>
    Signed-off-by: Petr Machata <petrm@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh
index cc0f07e72cf2..aa74be9f47c8 100644
--- a/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh
@@ -98,11 +98,7 @@ __tc_flower_test()
 			jq -r '[ .[] | select(.kind == "flower") |
 			.options | .in_hw ]' | jq .[] | wc -l)
 	[[ $((offload_count - 1)) -eq $count ]]
-	if [[ $should_fail -eq 0 ]]; then
-		check_err $? "Offload mismatch"
-	else
-		check_err_fail $should_fail $? "Offload more than expacted"
-	fi
+	check_err_fail $should_fail $? "Attempt to offload $count rules (actual result $((offload_count - 1)))"
 }
 
 tc_flower_test()



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux