From 294b37e6b2344523afbc764f3196e0945e476062 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 21 Aug 2023 11:49:58 -0400 Subject: [PATCH] tests/unit: Remove urcu-signal unit tests In preparation for deprecation of the urcu-signal flavor, remove the urcu-signal unit tests. Signed-off-by: Mathieu Desnoyers Change-Id: Ic74dd38d111e320cfd2860c2fc0fdb7ffde114dd --- tests/unit/Makefile.am | 21 ++++++---------- tests/unit/test_build.c | 1 - tests/unit/test_urcu_multiflavor-bp.c | 1 - tests/unit/test_urcu_multiflavor-signal.c | 25 ------------------- .../unit/test_urcu_multiflavor-signal_cxx.cpp | 5 ---- tests/unit/test_urcu_multiflavor.c | 3 +-- tests/unit/test_urcu_multiflavor.h | 1 - .../unit/test_urcu_multiflavor_single_unit.c | 14 +---------- 8 files changed, 10 insertions(+), 61 deletions(-) delete mode 100644 tests/unit/test_urcu_multiflavor-signal.c delete mode 100644 tests/unit/test_urcu_multiflavor-signal_cxx.cpp diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index cf88280..5884ccb 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -74,7 +74,6 @@ URCU_COMMON_LIB=$(top_builddir)/src/liburcu-common.la URCU_LIB=$(top_builddir)/src/liburcu.la URCU_QSBR_LIB=$(top_builddir)/src/liburcu-qsbr.la URCU_MB_LIB=$(top_builddir)/src/liburcu-mb.la -URCU_SIGNAL_LIB=$(top_builddir)/src/liburcu-signal.la URCU_BP_LIB=$(top_builddir)/src/liburcu-bp.la URCU_CDS_LIB=$(top_builddir)/src/liburcu-cds.la TAP_LIB=$(top_builddir)/tests/utils/libtap.a @@ -111,58 +110,54 @@ test_uatomic_cxx_LDADD = $(URCU_COMMON_LIB) $(TAP_LIB) test_urcu_multiflavor_SOURCES = test_urcu_multiflavor.c \ test_urcu_multiflavor-memb.c \ test_urcu_multiflavor-mb.c \ - test_urcu_multiflavor-signal.c \ test_urcu_multiflavor-qsbr.c \ test_urcu_multiflavor-bp.c test_urcu_multiflavor_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \ - $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) + $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) test_urcu_multiflavor_cxx_SOURCES = test_urcu_multiflavor_cxx.cpp \ test_urcu_multiflavor-memb_cxx.cpp \ test_urcu_multiflavor-mb_cxx.cpp \ - test_urcu_multiflavor-signal_cxx.cpp \ test_urcu_multiflavor-qsbr_cxx.cpp \ test_urcu_multiflavor-bp_cxx.cpp test_urcu_multiflavor_cxx_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \ - $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) + $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) test_urcu_multiflavor_dynlink_SOURCES = test_urcu_multiflavor.c \ test_urcu_multiflavor-memb.c \ test_urcu_multiflavor-mb.c \ - test_urcu_multiflavor-signal.c \ test_urcu_multiflavor-qsbr.c \ test_urcu_multiflavor-bp.c test_urcu_multiflavor_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) test_urcu_multiflavor_dynlink_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \ - $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) + $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) test_urcu_multiflavor_dynlink_cxx_SOURCES = test_urcu_multiflavor_cxx.cpp \ test_urcu_multiflavor-memb_cxx.cpp \ test_urcu_multiflavor-mb_cxx.cpp \ - test_urcu_multiflavor-signal_cxx.cpp \ test_urcu_multiflavor-qsbr_cxx.cpp \ test_urcu_multiflavor-bp_cxx.cpp test_urcu_multiflavor_dynlink_cxx_CXXFLAGS = -DDYNAMIC_LINK_TEST $(AM_CXXFLAGS) test_urcu_multiflavor_dynlink_cxx_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \ - $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) + $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) test_urcu_multiflavor_single_unit_SOURCES = test_urcu_multiflavor_single_unit.c test_urcu_multiflavor_single_unit_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \ - $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) + $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) test_urcu_multiflavor_single_unit_cxx_SOURCES = test_urcu_multiflavor_single_unit_cxx.cpp test_urcu_multiflavor_single_unit_cxx_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \ - $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) + $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) test_urcu_multiflavor_single_unit_dynlink_SOURCES = test_urcu_multiflavor_single_unit.c test_urcu_multiflavor_single_unit_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS) test_urcu_multiflavor_single_unit_dynlink_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \ - $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) + $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) test_urcu_multiflavor_single_unit_dynlink_cxx_SOURCES = test_urcu_multiflavor_single_unit_cxx.cpp test_urcu_multiflavor_single_unit_dynlink_cxx_CXXFLAGS = -DDYNAMIC_LINK_TEST $(AM_CXXFLAGS) test_urcu_multiflavor_single_unit_dynlink_cxx_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \ - $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) + $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB) test_build_SOURCES = \ test_build.c diff --git a/tests/unit/test_build.c b/tests/unit/test_build.c index d3c2035..99ddbcd 100644 --- a/tests/unit/test_build.c +++ b/tests/unit/test_build.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/unit/test_urcu_multiflavor-bp.c b/tests/unit/test_urcu_multiflavor-bp.c index 1d174e4..460cfa6 100644 --- a/tests/unit/test_urcu_multiflavor-bp.c +++ b/tests/unit/test_urcu_multiflavor-bp.c @@ -10,7 +10,6 @@ #define _LGPL_SOURCE #endif -#define RCU_SIGNAL #include #include "test_urcu_multiflavor.h" diff --git a/tests/unit/test_urcu_multiflavor-signal.c b/tests/unit/test_urcu_multiflavor-signal.c deleted file mode 100644 index 4cfb72e..0000000 --- a/tests/unit/test_urcu_multiflavor-signal.c +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-FileCopyrightText: 2012 Mathieu Desnoyers -// -// SPDX-License-Identifier: GPL-2.0-or-later - -/* - * Userspace RCU library - test multiple RCU flavors into one program - */ - -#ifndef DYNAMIC_LINK_TEST -#define _LGPL_SOURCE -#endif - -#define RCU_SIGNAL -#include -#include "test_urcu_multiflavor.h" - -int test_mf_signal(void) -{ - rcu_register_thread(); - rcu_read_lock(); - rcu_read_unlock(); - synchronize_rcu(); - rcu_unregister_thread(); - return 0; -} diff --git a/tests/unit/test_urcu_multiflavor-signal_cxx.cpp b/tests/unit/test_urcu_multiflavor-signal_cxx.cpp deleted file mode 100644 index db5c79f..0000000 --- a/tests/unit/test_urcu_multiflavor-signal_cxx.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// SPDX-FileCopyrightText: 2023 EfficiOS Inc. -// -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "test_urcu_multiflavor-signal.c" diff --git a/tests/unit/test_urcu_multiflavor.c b/tests/unit/test_urcu_multiflavor.c index b012fbc..ef7605a 100644 --- a/tests/unit/test_urcu_multiflavor.c +++ b/tests/unit/test_urcu_multiflavor.c @@ -13,12 +13,11 @@ int main(void) { - plan_tests(5); + plan_tests(4); ok1(!test_mf_memb()); ok1(!test_mf_mb()); - ok1(!test_mf_signal()); ok1(!test_mf_qsbr()); ok1(!test_mf_bp()); diff --git a/tests/unit/test_urcu_multiflavor.h b/tests/unit/test_urcu_multiflavor.h index d1ce0e6..27e59f0 100644 --- a/tests/unit/test_urcu_multiflavor.h +++ b/tests/unit/test_urcu_multiflavor.h @@ -9,7 +9,6 @@ extern int test_mf_memb(void); extern int test_mf_mb(void); -extern int test_mf_signal(void); extern int test_mf_qsbr(void); extern int test_mf_bp(void); diff --git a/tests/unit/test_urcu_multiflavor_single_unit.c b/tests/unit/test_urcu_multiflavor_single_unit.c index 98f0fd6..5548744 100644 --- a/tests/unit/test_urcu_multiflavor_single_unit.c +++ b/tests/unit/test_urcu_multiflavor_single_unit.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include @@ -49,16 +48,6 @@ static int test_mf_memb(void) return 0; } -static int test_mf_signal(void) -{ - urcu_signal_register_thread(); - urcu_signal_read_lock(); - urcu_signal_read_unlock(); - urcu_signal_synchronize_rcu(); - urcu_signal_unregister_thread(); - return 0; -} - static int test_mf_qsbr(void) { urcu_qsbr_register_thread(); @@ -71,12 +60,11 @@ static int test_mf_qsbr(void) int main(void) { - plan_tests(5); + plan_tests(4); ok1(!test_mf_mb()); ok1(!test_mf_bp()); ok1(!test_mf_memb()); - ok1(!test_mf_signal()); ok1(!test_mf_qsbr()); return exit_status(); -- 2.34.1