From 130af146398ca5788be92d258eabe1cee662037f Mon Sep 17 00:00:00 2001 From: William Cohen Date: Tue, 21 Nov 2023 18:56:42 -0500 Subject: [PATCH] Tweak testsuite/semok/target_addr.stp to work with linux 5.14 and newer. --- testsuite/semok/target_addr.stp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testsuite/semok/target_addr.stp b/testsuite/semok/target_addr.stp index dfbc26061..38fb9e409 100755 --- a/testsuite/semok/target_addr.stp +++ b/testsuite/semok/target_addr.stp @@ -3,7 +3,11 @@ // read the address of various task_struct members. // all should roughly be $p + offsetof(foo) probe kernel.function("release_task") { - println(& $p->state) // long + // Linux 5.14 and new changes state to __state + if (@defined($p->state)) + println(& $p->state) // long + else + println(& $p->__state) // long println(& $p->usage) // atomic_t println(& $p->comm) // comm[TASK_COMM_LEN] println(& $p->comm[1]) -- 2.43.5