summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2025-12-29 11:13:57 -0800
committerBoqun Feng <boqun.feng@gmail.com>2026-01-01 16:44:36 +0800
commitdcd6067322ba6750995fbc5486d7c9ada88489ff (patch)
tree8cd992198fb98091130613c668bc39ebed80afa8
parent3d69b6beb8ba932911096138394b5cd3e21b3b92 (diff)
torture: Make config2csv.sh properly handle comments in .boot files
As in strip the "#" and everything after it and *then* tokenize. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/config2csv.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/config2csv.sh b/tools/testing/selftests/rcutorture/bin/config2csv.sh
index 0cf55f1bf654..aeab4d6f11ad 100755
--- a/tools/testing/selftests/rcutorture/bin/config2csv.sh
+++ b/tools/testing/selftests/rcutorture/bin/config2csv.sh
@@ -42,7 +42,7 @@ do
grep -v '^#' < $i | grep -v '^ *$' > $T/p
if test -r $i.boot
then
- tr -s ' ' '\012' < $i.boot | grep -v '^#' >> $T/p
+ sed -e 's/#.*$//' < $i.boot | tr -s ' ' '\012' >> $T/p
fi
sed -e 's/^[^=]*$/&=?/' < $T/p |
sed -e 's/^\([^=]*\)=\(.*\)$/\tp["\1:'"$i"'"] = "\2";\n\tc["\1"] = 1;/' >> $T/p.awk