Skip to contentSkip to conversation

test: Check for symbol ext4_dir_operations in module ext4

PATCH In review [email protected] 2 participants 2 messages Mar 2 – Mar 3

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test: Check for symbol ext4_dir_operations in module ext4

From: Eugene Loh <[email protected]>

The tst.misc.d test assumes certain kernel symbols can be found. The test specifies ext4`ext4_dir_operations, but there are apparently kallmodsyms bugs that misassign the symbol to the wrong module. Thus, the test fails to find the symbol. Meanwhile, we are less concerned about such older kernel bugs, since we are moving from kallmodsyms to modules.builtin.ranges.

Modify the .x file to check for ext4_dir_operations in the ext4 module for those cases that rely on kallmodsyms.

Orabug: 37783183

---
 test/unittest/scalars/tst.misc.x | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
test/unittest/scalars/tst.misc.x +13 -4
index 1a1d9d271..ffef2fd33 100755
@@ -1,11 +1,20 @@
 #!/bin/sh
 
-if ! grep -qw isofs_dir_operations /proc/kallsyms; then
-    exit 1
+if [ -e /proc/kallmodsyms ]; then
+	if ! grep -q 'isofs_dir_operations.*isofs' /proc/kallmodsyms; then
+		exit 1
+	fi
+
+	if ! grep -q 'ext4_dir_operations.*ext4' /proc/kallmodsyms; then
+		exit 1
+	fi
+	exit 0
 fi
 
+if ! grep -qw isofs_dir_operations /proc/kallsyms; then
+	exit 1
+fi
 if ! grep -qw ext4_dir_operations /proc/kallsyms; then
-    exit 1
+	exit 1
 fi
-
 exit 0
Signature · 1 line
2.47.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · eugene.loh--- via DTrace-devel

From: Eugene Loh <[email protected]>

The tst.misc.d test assumes certain kernel symbols can be found. The test specifies ext4`ext4_dir_operations, but there are apparently kallmodsyms bugs that misassign the symbol to the wrong module. Thus, the test fails to find the symbol. Meanwhile, we are less concerned about such older kernel bugs, since we are moving from kallmodsyms to modules.builtin.ranges.

Quoted 5 lines

Modify the .x file to check for ext4_dir_operations in the ext4 module for those cases that rely on kallmodsyms.

Orabug: 37783183

Quoted 41 lines
---
 test/unittest/scalars/tst.misc.x | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
test/unittest/scalars/tst.misc.x +13 -4
index 1a1d9d271..ffef2fd33 100755
@@ -1,11 +1,20 @@
 #!/bin/sh
 
-if ! grep -qw isofs_dir_operations /proc/kallsyms; then
-    exit 1
+if [ -e /proc/kallmodsyms ]; then
+	if ! grep -q 'isofs_dir_operations.*isofs' /proc/kallmodsyms; then
+		exit 1
+	fi
+
+	if ! grep -q 'ext4_dir_operations.*ext4' /proc/kallmodsyms; then
+		exit 1
+	fi
+	exit 0
 fi
 
+if ! grep -qw isofs_dir_operations /proc/kallsyms; then
+	exit 1
+fi
 if ! grep -qw ext4_dir_operations /proc/kallsyms; then
-    exit 1
+	exit 1
 fi
-
 exit 0
Signature · 7 lines
2.47.3


_______________________________________________
DTrace-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/dtrace-devel