diff mbox series

[1/3] lib: Use LTP_ prefix for LTP_ENABLE_DEBUG variable

Message ID 20240104122308.1158487-2-pvorel@suse.cz
State Accepted
Headers show
Series Cleanup environment variables prefixes | expand

Commit Message

Petr Vorel Jan. 4, 2024, 12:23 p.m. UTC
Variables which are supposed to be user defined should use LTP_ prefix
instead of TST_ prefix.

Fixes: 018f555a4 ("lib: Add support for TDEBUG tst_res() flag")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 doc/C-Test-API.asciidoc          | 2 +-
 doc/User-Guidelines.asciidoc     | 2 +-
 lib/newlib_tests/tst_res_flags.c | 2 +-
 lib/tst_test.c                   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/doc/C-Test-API.asciidoc b/doc/C-Test-API.asciidoc
index 979ec5ccf..db16be36e 100644
--- a/doc/C-Test-API.asciidoc
+++ b/doc/C-Test-API.asciidoc
@@ -227,7 +227,7 @@  Printf-like function to report test result, it's mostly used with ttype:
 | 'TPASS'  | Test has passed.
 | 'TFAIL'  | Test has failed.
 | 'TINFO'  | General message.
-| 'TDEBUG' | Debug message (new C API only, printed with '-D' or via 'TST_ENABLE_DEBUG=1' or 'y'
+| 'TDEBUG' | Debug message (new C API only, printed with '-D' or via 'LTP_ENABLE_DEBUG=1' or 'y'
              environment variable), only for messages which would be too verbose for normal run.
 | 'TWARN'  | Something went wrong but we decided to continue. Mostly used in cleanup functions.
 |==============================
diff --git a/doc/User-Guidelines.asciidoc b/doc/User-Guidelines.asciidoc
index 9c6cb2fe7..cff2e83c8 100644
--- a/doc/User-Guidelines.asciidoc
+++ b/doc/User-Guidelines.asciidoc
@@ -41,7 +41,7 @@  For running LTP network tests see `testcases/network/README.md`.
                           and others, which imply it, shell: 'TST_NEEDS_TMPDIR=1').
                           Must be an absolute path (default: '/tmp').
 | 'TST_NO_CLEANUP'      | Disable running test cleanup (defined in 'TST_CLEANUP').
-| 'TST_ENABLE_DEBUG'    | Enable debug info (value '1' or 'y').
+| 'LTP_ENABLE_DEBUG'    | Enable debug info (value '1' or 'y').
 |==============================================================================
 
 
diff --git a/lib/newlib_tests/tst_res_flags.c b/lib/newlib_tests/tst_res_flags.c
index b104808d7..a14f0df2c 100644
--- a/lib/newlib_tests/tst_res_flags.c
+++ b/lib/newlib_tests/tst_res_flags.c
@@ -21,7 +21,7 @@  static struct tcase {
 	{FLAG(TCONF)},
 	{FLAG(TWARN)},
 	{FLAG(TINFO)},
-	{FLAG(TDEBUG), " (printed only with -D or TST_ENABLE_DEBUG=1)"},
+	{FLAG(TDEBUG), " (printed only with -D or LTP_ENABLE_DEBUG=1)"},
 };
 
 static void do_cleanup(void)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 629610781..bcf2c4555 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -1149,7 +1149,7 @@  static void do_cgroup_requires(void)
 
 static void do_setup(int argc, char *argv[])
 {
-	char *tdebug_env = getenv("TST_ENABLE_DEBUG");
+	char *tdebug_env = getenv("LTP_ENABLE_DEBUG");
 
 	if (!tst_test)
 		tst_brk(TBROK, "No tests to run");