libtracefs: Add unit test to test mounting of tracefs_{tracing,debug}_dir()
PATCH 1/1 libtracefs: Add unit test to test mounting of tracefs_{tracing,debug}_dir()
From: "Steven Rostedt (Google)" <[email protected]>
As there was a regression with the mounting of the tracefs and debugfs file systems when tracefs_tracing_dir() and tracefs_debug_dir() were called, add a unit test to make sure they continue to work.
Signed-off-by Steven Rostedt (Google) <[email protected]>
--- src/tracefs-utils.c | 3 +- utest/tracefs-utest.c | 84 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-)
src/tracefs-utils.c +2 -1
@@ -85,7 +85,8 @@ static int mount_debugfs(void)return ret; } -static char *find_tracing_dir (bool debugfs,bool mount) +/* Exported for testing purpose only */ +__hidden char *find_tracing_dir(bool debugfs, bool mount) {char *debug_str =NULL ;char fspath[PATH_MAX +1 ];
utest/tracefs-utest.c +84 -0
108 lines not on this page · raw message
Signature · 1 line
2.35.1