[DTrace-devel] [PATCH 3/7] dtrace: handle .init.scratch section in /proc/kallmodsyms
eugene.loh at oracle.com
eugene.loh at oracle.com
Fri Aug 14 10:43:20 PDT 2020
From: Eugene Loh <eugene.loh at oracle.com>
The earlier patch overlooked intermittent failures in
test/unittest/aggs/tst.aggmod_full.sh
Apply similar fixes to this test as was made in the earlier patch.
Orabug: 30149066
Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>
---
test/unittest/aggs/tst.aggmod_full.sh | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/test/unittest/aggs/tst.aggmod_full.sh b/test/unittest/aggs/tst.aggmod_full.sh
index d08a5ac3..22b6f670 100755
--- a/test/unittest/aggs/tst.aggmod_full.sh
+++ b/test/unittest/aggs/tst.aggmod_full.sh
@@ -78,12 +78,16 @@ cd $DIRNAME
# . type (3rd field) is "a"
# . type (3rd field) is "A"
# - can add special cases based on symbol name (4th field)
-awk '{
-if (NF == 4) {$5 = "[vmlinux]"};
-if ($3 == "a") {$2 = 0};
-if ($3 == "A") {$2 = 0};
-if ($2 != 0) { print $1 >> $5 }
-}' /proc/kallmodsyms
+awk '
+NF == 4 && $4 == "__init_scratch_begin" {
+ while ($4 != "__init_scratch_end") getline;
+ next;
+}
+NF == 4 {$5 = "[vmlinux]"};
+$3 == "a" {$2 = 0};
+$3 == "A" {$2 = 0};
+$2 != 0 { print $1 >> $5 }
+' /proc/kallmodsyms
# process the files whose names start with a '['
--
2.18.4
More information about the DTrace-devel
mailing list