[LTP] [PATCH 1/2] [RFC] macros: Remove TEST_VOID()
Petr Vorel
pvorel@suse.cz
Thu Jan 9 14:23:33 CET 2025
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
More information about the ltp
mailing list