Skip to contentSkip to conversation

ptsematest, sigwaittest, pmqtest, svsematest reprot error "Could not access /sys/kernel/debug/tracing/tracing_enabled"

PATCH In review Qiao Zhao 2 participants 2 messages Jul 25, 2019 – Jul 31, 2019

lore
Share & tools
lore

Qiao Zhao

author
#0 lore raw

PATCH 1/1 ptsematest, sigwaittest, pmqtest, svsematest reprot error "Could not access /sys/kernel/debug/tracing/tracing_enabled"

For current RHEL7 and RHEL8 kernel (3.10.0 and 4.18.0), we use "tracing_on" to control tracing disable/enable. The "tracing_enabled" is not the current value.

For RHEL bug: https://bugzilla.redhat.com/show_bug.cgi?id=1731336
E.g: # # svsematest -a -b 20us -f -i 100 -l 100 -S
...
Could not access /sys/kernel/debug/tracing/tracing_enabled

Sanity test passed. No this error msg when patched.

---
 src/pmqtest/pmqtest.c         | 2 +-
 src/ptsematest/ptsematest.c   | 2 +-
 src/sigwaittest/sigwaittest.c | 2 +-
 src/svsematest/svsematest.c   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
src/pmqtest/pmqtest.c +1 -1
index 2191710..a04fc49 100644
@@ -204,7 +204,7 @@ void *pmqthread(void *param)
 				char tracing_enabled_file[MAX_PATH];
 
 				strcpy(tracing_enabled_file, get_debugfileprefix());
-				strcat(tracing_enabled_file, "tracing_enabled");
+				strcat(tracing_enabled_file, "tracing_on");
 				int tracing_enabled =
 				    open(tracing_enabled_file, O_WRONLY);
 				if (tracing_enabled >= 0) {
src/ptsematest/ptsematest.c +1 -1
index e8a3177..5537592 100644
@@ -131,7 +131,7 @@ void *semathread(void *param)
 				char tracing_enabled_file[MAX_PATH];
 
 				strcpy(tracing_enabled_file, get_debugfileprefix());
-				strcat(tracing_enabled_file, "tracing_enabled");
+				strcat(tracing_enabled_file, "tracing_on");
 				int tracing_enabled =
 				    open(tracing_enabled_file, O_WRONLY);
 				if (tracing_enabled >= 0) {
src/sigwaittest/sigwaittest.c +1 -1
index 4579f90..59f28a5 100644
@@ -179,7 +179,7 @@ void *semathread(void *param)
 				char tracing_enabled_file[MAX_PATH];
 
 				strcpy(tracing_enabled_file, get_debugfileprefix());
-				strcat(tracing_enabled_file, "tracing_enabled");
+				strcat(tracing_enabled_file, "tracing_on");
 				int tracing_enabled =
 				    open(tracing_enabled_file, O_WRONLY);
 				if (tracing_enabled >= 0) {
src/svsematest/svsematest.c +1 -1
index 01083d1..8f88078 100644
@@ -185,7 +185,7 @@ void *semathread(void *param)
 				char tracing_enabled_file[MAX_PATH];
 
 				strcpy(tracing_enabled_file, get_debugfileprefix());
-				strcat(tracing_enabled_file, "tracing_enabled");
+				strcat(tracing_enabled_file, "tracing_on");
 				int tracing_enabled =
 				    open(tracing_enabled_file, O_WRONLY);
 				if (tracing_enabled >= 0) {
Signature · 1 line
2.20.1
#1 lore raw
Quoted 64 lines · Qiao Zhao

For current RHEL7 and RHEL8 kernel (3.10.0 and 4.18.0), we use "tracing_on" to control tracing disable/enable. The "tracing_enabled" is not the current value.

For RHEL bug: https://bugzilla.redhat.com/show_bug.cgi?id=1731336
E.g: # # svsematest -a -b 20us -f -i 100 -l 100 -S
...
Could not access /sys/kernel/debug/tracing/tracing_enabled

Sanity test passed. No this error msg when patched.

---
 src/pmqtest/pmqtest.c         | 2 +-
 src/ptsematest/ptsematest.c   | 2 +-
 src/sigwaittest/sigwaittest.c | 2 +-
 src/svsematest/svsematest.c   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
src/pmqtest/pmqtest.c +1 -1
index 2191710..a04fc49 100644
@@ -204,7 +204,7 @@ void *pmqthread(void *param)
 				char tracing_enabled_file[MAX_PATH];
 
 				strcpy(tracing_enabled_file, get_debugfileprefix());
-				strcat(tracing_enabled_file, "tracing_enabled");
+				strcat(tracing_enabled_file, "tracing_on");
 				int tracing_enabled =
 				    open(tracing_enabled_file, O_WRONLY);
 				if (tracing_enabled >= 0) {
src/ptsematest/ptsematest.c +1 -1
index e8a3177..5537592 100644
@@ -131,7 +131,7 @@ void *semathread(void *param)
 				char tracing_enabled_file[MAX_PATH];
 
 				strcpy(tracing_enabled_file, get_debugfileprefix());
-				strcat(tracing_enabled_file, "tracing_enabled");
+				strcat(tracing_enabled_file, "tracing_on");
 				int tracing_enabled =
 				    open(tracing_enabled_file, O_WRONLY);
 				if (tracing_enabled >= 0) {
src/sigwaittest/sigwaittest.c +1 -1
index 4579f90..59f28a5 100644
@@ -179,7 +179,7 @@ void *semathread(void *param)
 				char tracing_enabled_file[MAX_PATH];
 
 				strcpy(tracing_enabled_file, get_debugfileprefix());
-				strcat(tracing_enabled_file, "tracing_enabled");
+				strcat(tracing_enabled_file, "tracing_on");
 				int tracing_enabled =
 				    open(tracing_enabled_file, O_WRONLY);
 				if (tracing_enabled >= 0) {
src/svsematest/svsematest.c +0 -0
index 01083d1..8f88078 100644

src/svsematest/svsematest.c void *semathread(void *param) · line 191

Quoted 8 lines
src/svsematest/svsematest.c +1 -1
@@ -185,7 +185,7 @@ void *semathread(void *param)
 				char tracing_enabled_file[MAX_PATH];
 
 				strcpy(tracing_enabled_file, get_debugfileprefix());
-				strcat(tracing_enabled_file, "tracing_enabled");
+				strcat(tracing_enabled_file, "tracing_on");
 				int tracing_enabled =
 				    open(tracing_enabled_file, O_WRONLY);
 				if (tracing_enabled >= 0) {

Thanks for the patch

I did edit the comments to remove references to rhel