public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] [RFC] macros: Remove TEST_VOID()
@ 2025-01-09 13:23 Petr Vorel
  2025-01-09 13:23 ` [LTP] [PATCH 2/2] macros: Add basic docs Petr Vorel
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Petr Vorel @ 2025-01-09 13:23 UTC (permalink / raw)
  To: ltp

TEST_VOID() macro was meant for syscalls whose return type is void, e.g.
sync(). It was used only sync03.c, which was later merged to sync01.c
and later removed. Now it's unused, therefore remove it.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 include/old/usctest.h     | 14 --------------
 include/tst_test_macros.h |  7 -------
 2 files changed, 21 deletions(-)

diff --git a/include/old/usctest.h b/include/old/usctest.h
index 2d46c40451..b984c343fd 100644
--- a/include/old/usctest.h
+++ b/include/old/usctest.h
@@ -60,20 +60,6 @@ extern int TEST_ERRNO;
 		TEST_ERRNO = errno; \
 	} while (0)
 
-/***********************************************************************
- * TEST_VOID: calls a system call
- *
- * parameters:
- *	SCALL = system call and parameters to execute
- *
- * Note: This is IDENTICAL to the TEST() macro except that it is intended
- * for use with syscalls returning no values (void syscall()).  The
- * Typecasting nothing (void) into an unsigned integer causes compilation
- * errors.
- *
- ***********************************************************************/
-#define TEST_VOID(SCALL) do { errno = 0; SCALL; TEST_ERRNO = errno; } while (0)
-
 /***********************************************************************
  * TEST_PAUSE: Pause for SIGUSR1 if the pause flag is set.
  *	       Just continue when signal comes in.
diff --git a/include/tst_test_macros.h b/include/tst_test_macros.h
index b2ca32f771..b2b446b70c 100644
--- a/include/tst_test_macros.h
+++ b/include/tst_test_macros.h
@@ -16,13 +16,6 @@
 		TST_ERR = errno; \
 	} while (0)
 
-#define TEST_VOID(SCALL) \
-	do { \
-		errno = 0; \
-		SCALL; \
-		TST_ERR = errno; \
-	} while (0)
-
 extern long TST_RET;
 extern int TST_ERR;
 extern int TST_PASS;
-- 
2.47.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-06-09  7:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-09 13:23 [LTP] [PATCH 1/2] [RFC] macros: Remove TEST_VOID() Petr Vorel
2025-01-09 13:23 ` [LTP] [PATCH 2/2] macros: Add basic docs Petr Vorel
2025-01-09 13:35   ` Andrea Cervesato via ltp
2025-01-10 14:57     ` Petr Vorel
2025-01-14 14:44       ` Andrea Cervesato via ltp
2025-05-09  7:00       ` Li Wang via ltp
2025-05-12  9:17   ` Avinesh Kumar
2025-06-09  7:17     ` Petr Vorel
2025-01-14 14:46 ` [LTP] [PATCH 1/2] [RFC] macros: Remove TEST_VOID() Andrea Cervesato via ltp
2025-01-14 16:20   ` Petr Vorel
2025-05-09  6:46 ` Li Wang via ltp
2025-06-09  7:14   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox