linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libtracefs utest: Add PATH_MAX if it is not already defined
@ 2024-02-22 16:05 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2024-02-22 16:05 UTC (permalink / raw)
  To: Linux Trace Devel; +Cc: Miko Larsson

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

In some setups PATH_MAX may not be defined (it is usually defined in
linux/limits.h), but we just use PATH_MAX as something to hold the paths
to the tracing files. In that case, just define it to 1024 if it's not
already defined.

Link: https://lore.kernel.org/linux-trace-devel/20240222-utest-fixes-v2-1-7b8ee8dca0b7@gmail.com/

Reported-by: Miko Larsson <mikoxyzzz@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 utest/tracefs-utest.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c
index 963fac70846d..07ecd3205716 100644
--- a/utest/tracefs-utest.c
+++ b/utest/tracefs-utest.c
@@ -26,6 +26,10 @@
 
 #define gettid() syscall(__NR_gettid)
 
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
 #define TRACEFS_SUITE		"tracefs library"
 #define TEST_INSTANCE_NAME	"cunit_test_iter"
 #define TEST_TRACE_DIR		"/tmp/trace_utest.XXXXXX"
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-22 16:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 16:05 [PATCH] libtracefs utest: Add PATH_MAX if it is not already defined Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).