1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-16 23:33:16 +03:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Marian Csontos
09fc3a985d spec: Use libedit for newer distributions 2022-07-27 18:03:34 +02:00
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
4 changed files with 23 additions and 2 deletions

View File

@@ -28,6 +28,8 @@
%enableif %{enable_dbusd} dbus-service
%enableif %{enable_dbusd} notify-dbus
%enableif %{enable_dmfilemapd} dmfilemapd
%enableif %{enable_readline} readline
%enableif %{enable_editline} editline
%build

View File

@@ -47,6 +47,14 @@
%global req_udev udev >= 181-1
%if %{fedora} >= 35 || %{rhel} >= 9
%global enable_readline 0
%global enable_editline 1
%else
%global enable_readline 1
%global enable_editline 0
%endif
%if %{fedora} >= 24 || %{rhel} >= 7
%service lvmlockd 1
%global sanlock_version 3.3.0-1
@@ -154,7 +162,12 @@ Source94: macros.inc
BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
BuildRequires: ncurses-devel
%if %{enable_readline}
BuildRequires: readline-devel
%endif
%if %{enable_editline}
BuildRequires: libedit-devel
%endif
BuildRequires: module-init-tools
BuildRequires: pkgconfig

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))