1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-09-21 09:44:19 +03:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Marian Csontos
c30881fd95 test: Print running test to console and syslog 2022-06-09 14:37:48 +02:00
Marian Csontos
64ba9e4eca test: Add __FILE__ and __LINE__ to T_ASSERT macro 2022-06-08 18:02:08 +02:00
2 changed files with 8 additions and 2 deletions

View File

@@ -188,6 +188,12 @@ if test -n "$LVM_TEST_LVMLOCKD_TEST" ; then
aux prepare_lvmlockd
fi
echo "<======== Processing test: \"$TESTNAME\" ========>"
(
MSG="<======== Processing test: \"$TESTNAME\" ========>"
echo "$MSG"
echo "$MSG" > /dev/console 2>/dev/null
logger -p user.notice "$MSG" 2>/dev/null
true
)
set -vx

View File

@@ -37,7 +37,7 @@ bool register_test(struct test_suite *ts,
void test_fail(const char *fmt, ...)
__attribute__((noreturn, format (printf, 1, 2)));
#define T_ASSERT(e) do {if (!(e)) {test_fail("assertion failed: '%s'", # e);} } while(0)
#define T_ASSERT(e) do {if (!(e)) {test_fail("assertion failed: '%s' at %s:%d", # e, __FILE__, __LINE__);} } while(0)
#define T_ASSERT_EQUAL(x, y) T_ASSERT((x) == (y))
#define T_ASSERT_NOT_EQUAL(x, y) T_ASSERT((x) != (y))