Skip to contentSkip to conversation

test: stack_fbt

PATCH Superseded [email protected] 1 participant 1 message Oct 31, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test: stack_fbt

From: Eugene Loh <[email protected]>

The test was being skipped on UEKR7 systems because __vfs_write was no longer traceable. The expected stack on UEKR6 x86_64 was out of date.

Switch to fbt::vfs_write:entry. Convert to a .sh test, so that different stacks can be expected depending both on machine type and release number.

---
 test/unittest/stack/tst.stack_fbt.aarch64.r |  14 ---
 test/unittest/stack/tst.stack_fbt.d         |  25 ----
 test/unittest/stack/tst.stack_fbt.sh        | 123 ++++++++++++++++++++
 test/unittest/stack/tst.stack_fbt.x         |  10 --
 test/unittest/stack/tst.stack_fbt.x86_64.r  |  13 ---
 5 files changed, 123 insertions(+), 62 deletions(-)
 delete mode 100644 test/unittest/stack/tst.stack_fbt.aarch64.r
 delete mode 100644 test/unittest/stack/tst.stack_fbt.d
 create mode 100755 test/unittest/stack/tst.stack_fbt.sh
 delete mode 100755 test/unittest/stack/tst.stack_fbt.x
 delete mode 100644 test/unittest/stack/tst.stack_fbt.x86_64.r
test/unittest/stack/tst.stack_fbt.aarch64.r deleted +0 -14
deleted file mode 100644
index 3a2896c48..000000000
@@ -1,14 +0,0 @@
-                   FUNCTION:NAME
-                          :BEGIN 
-               __vfs_write:entry 
-              vmlinux`__vfs_write
-              vmlinux`ksys_write+{ptr}
-              vmlinux`__arm64_sys_write+{ptr}
-              vmlinux`el0_svc_common+{ptr}
-              vmlinux`el0_svc_handler+{ptr}
-              vmlinux`el0_svc+{ptr}
-
-
--- @@stderr --
-dtrace: script 'test/unittest/stack/tst.stack_fbt.d' matched 2 probes
-dtrace: allowing destructive actions
test/unittest/stack/tst.stack_fbt.d deleted +0 -25
deleted file mode 100644
index 27db21164..000000000
@@ -1,25 +0,0 @@
-/*
- * Oracle Linux DTrace.
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
- * Licensed under the Universal Permissive License v 1.0 as shown at
- * http://oss.oracle.com/licenses/upl.
- */
-
-/*
- * ASSERTION: Test the stack action with the default stack depth.
- *
- * SECTION: Output Formatting/printf()
- */
-
-#pragma D option destructive
-
-BEGIN
-{
-	system("echo write something > /dev/null");
-}
-
-fbt::__vfs_write:entry
-{
-	stack();
-	exit(0);
-}
test/unittest/stack/tst.stack_fbt.sh new file +123 -0

123 lines not on this page · raw message

test/unittest/stack/tst.stack_fbt.x deleted +0 -10
deleted file mode 100755
index 4561df8bb..000000000
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-read MAJOR MINOR <<< `uname -r | grep -Eo '^[0-9]+\.[0-9]+' | tr '.' ' '`
-
-if [ $MAJOR -eq 5 -a $MINOR -lt 8 ]; then
-	exit 0
-else
-	echo "Function __vfs_write no longer exists starting in 5.8"
-	exit 2
-fi
test/unittest/stack/tst.stack_fbt.x86_64.r deleted +0 -13
deleted file mode 100644
index 792ce80ad..000000000
@@ -1,13 +0,0 @@
-                   FUNCTION:NAME
-                          :BEGIN 
-               __vfs_write:entry 
-              vmlinux`__vfs_write+{ptr}
-              vmlinux`ksys_write+{ptr}
-              vmlinux`__x64_sys_write+{ptr}
-              vmlinux`do_syscall_64+{ptr}
-              vmlinux`entry_SYSCALL_64+{ptr}
-
-
--- @@stderr --
-dtrace: script 'test/unittest/stack/tst.stack_fbt.d' matched 2 probes
-dtrace: allowing destructive actions
Signature · 1 line
2.43.5