VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   34 Branches   58 Tags
author: Jakub Kicinski <kuba@kernel.org> 2024-01-22 11:58:15 -0800 committer: Jakub Kicinski <kuba@kernel.org> 2024-01-24 13:55:19 -0800 commit: 0719b5338a0cbe80d1637a5fb03d8141b5bfc7a1 parent: 9f538b415db862e74b8c5d3abbccfc1b2b6caa38
Commit Summary:
selftests: net: fix rps_default_mask with >32 CPUs
Diffstat:
1 file changed, 4 insertions, 1 deletion
diff --git a/tools/testing/selftests/net/rps_default_mask.sh b/tools/testing/selftests/net/rps_default_mask.sh
index a26c5624429f..4287a8529890 100755
--- a/tools/testing/selftests/net/rps_default_mask.sh
+++ b/tools/testing/selftests/net/rps_default_mask.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
 readonly ksft_skip=4
@@ -33,6 +33,10 @@ chk_rps() {
 
 	rps_mask=$($cmd /sys/class/net/$dev_name/queues/rx-0/rps_cpus)
 	printf "%-60s" "$msg"
+
+	# In case there is more than 32 CPUs we need to remove commas from masks
+	rps_mask=${rps_mask//,}
+	expected_rps_mask=${expected_rps_mask//,}
 	if [ $rps_mask -eq $expected_rps_mask ]; then
 		echo "[ ok ]"
 	else