[LTP] [PATCH v4 3/6] tst_res_: Add support for TWARN
Petr Vorel
pvorel@suse.cz
Tue Jul 22 14:59:13 CEST 2025
TWARN is standard flag in LTP API, it should be supported, otherwise we
get:
Usage: tst_{res,brk} filename lineno [TPASS|TBROK|TFAIL|TCONF|TINFO|TDEBUG] 'A short description'
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
* New in v4
testcases/lib/tst_res_.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testcases/lib/tst_res_.c b/testcases/lib/tst_res_.c
index fd9b8e8414..c09d689ee5 100644
--- a/testcases/lib/tst_res_.c
+++ b/testcases/lib/tst_res_.c
@@ -8,7 +8,7 @@
static void print_help(void)
{
- printf("Usage: tst_{res,brk} filename lineno [TPASS|TBROK|TFAIL|TCONF|TINFO|TDEBUG] 'A short description'\n");
+ printf("Usage: tst_{res,brk} filename lineno [TPASS|TBROK|TFAIL|TWARN|TCONF|TINFO|TDEBUG] 'A short description'\n");
}
int main(int argc, char *argv[])
@@ -28,6 +28,8 @@ int main(int argc, char *argv[])
type = TCONF;
} else if (!strcmp(argv[3], "TINFO")) {
type = TINFO;
+ } else if (!strcmp(argv[3], "TWARN")) {
+ type = TWARN;
} else if (!strcmp(argv[3], "TDEBUG")) {
type = TDEBUG;
} else if (!strcmp(argv[3], "TBROK")) {
--
2.50.1
More information about the ltp
mailing list