Tests: remove unused libhealthexit code
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 2 Mar 2020 19:48:41 +0000 (14:48 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 2 Mar 2020 19:49:12 +0000 (14:49 -0500)
libhealthexit is no longer used since 89c453960. Remove the now-unused
code of that test library. A comment referencing that library is also
adjusted.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I1d088e9032a3b2e1a9f7956e81c7cb662473a7fd

tests/regression/tools/health/Makefile.am
tests/regression/tools/health/health_exit.c [deleted file]
tests/regression/tools/health/test_health.sh

index e023f3a54887e8b959f100b946e63ebe368d9a11..d3821ec062c48d20a0ed1e4511e3b5c0bf53f16c 100644 (file)
@@ -10,7 +10,7 @@ if NO_SHARED
 # Do not build this test if shared libraries support was
 # explicitly disabled.
 
-EXTRA_DIST = health_exit.c health_stall.c health_fail.c \
+EXTRA_DIST = health_stall.c health_fail.c \
        health_check.c $(COPYSCRIPTS)
 
 else
@@ -19,11 +19,6 @@ else
 FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \
                           -rpath $(abs_builddir)
 
-# Health thread exit ld_preloaded test lib
-libhealthexit_la_SOURCES=health_exit.c
-libhealthexit_la_LDFLAGS= $(FORCE_SHARED_LIB_OPTIONS)
-libhealthexit_la_LIBADD = $(DL_LIBS)
-
 # Health thread stall ld_preloaded test lib
 libhealthstall_la_SOURCES=health_stall.c
 libhealthstall_la_LDFLAGS= $(FORCE_SHARED_LIB_OPTIONS)
@@ -35,7 +30,7 @@ libhealthtpfail_la_LDFLAGS= $(FORCE_SHARED_LIB_OPTIONS)
 libhealthtpfail_la_LIBADD = $(DL_LIBS)
 
 noinst_PROGRAMS = health_check
-noinst_LTLIBRARIES = libhealthexit.la libhealthstall.la libhealthtpfail.la
+noinst_LTLIBRARIES = libhealthstall.la libhealthtpfail.la
 
 health_check_SOURCES = health_check.c $(UTILS)
 health_check_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
diff --git a/tests/regression/tools/health/health_exit.c b/tests/regression/tools/health/health_exit.c
deleted file mode 100644 (file)
index e9324fa..0000000
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright (C) 2012 Christian Babeux <christian.babeux@efficios.com>
- * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * SPDX-License-Identifier: GPL-2.0-only
- *
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <pthread.h>
-#include <urcu.h>
-
-/*
- * Check if the specified environment variable is set.
- * Return 1 if set, otherwise 0.
- */
-static
-int check_env_var(const char *env)
-{
-       if (env) {
-               char *env_val = getenv(env);
-               if (env_val && (strncmp(env_val, "1", 1) == 0)) {
-                       return 1;
-               }
-       }
-
-       return 0;
-}
-
-/* Session daemon */
-
-int __testpoint_sessiond_thread_manage_clients(void)
-{
-       const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_CLIENTS_EXIT";
-
-       if (check_env_var(var)) {
-               rcu_unregister_thread();
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_sessiond_thread_registration_apps(void)
-{
-       const char *var = "LTTNG_SESSIOND_THREAD_REG_APPS_EXIT";
-
-       if (check_env_var(var)) {
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_sessiond_thread_manage_apps(void)
-{
-       const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_APPS_EXIT";
-
-       if (check_env_var(var)) {
-               rcu_unregister_thread();
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_sessiond_thread_manage_kernel(void)
-{
-       const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_KERNEL_EXIT";
-
-       if (check_env_var(var)) {
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_sessiond_thread_manage_consumer(void)
-{
-       const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_CONSUMER_EXIT";
-
-       if (check_env_var(var)) {
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_sessiond_thread_ht_cleanup(void)
-{
-       const char *var = "LTTNG_SESSIOND_THREAD_HT_CLEANUP_EXIT";
-
-       if (check_env_var(var)) {
-               rcu_unregister_thread();
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_sessiond_thread_app_manage_notify(void)
-{
-       const char *var = "LTTNG_SESSIOND_THREAD_APP_MANAGE_NOTIFY_EXIT";
-
-       if (check_env_var(var)) {
-               rcu_unregister_thread();
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_sessiond_thread_app_reg_dispatch(void)
-{
-       const char *var = "LTTNG_SESSIOND_THREAD_APP_REG_DISPATCH_EXIT";
-
-       if (check_env_var(var)) {
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-/* Consumer daemon */
-
-int __testpoint_consumerd_thread_channel(void)
-{
-       const char *var = "LTTNG_CONSUMERD_THREAD_CHANNEL_EXIT";
-
-       if (check_env_var(var)) {
-               rcu_unregister_thread();
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_consumerd_thread_metadata(void)
-{
-       const char *var = "LTTNG_CONSUMERD_THREAD_METADATA_EXIT";
-
-       if (check_env_var(var)) {
-               rcu_unregister_thread();
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_consumerd_thread_data(void)
-{
-       const char *var = "LTTNG_CONSUMERD_THREAD_DATA_EXIT";
-
-       if (check_env_var(var)) {
-               rcu_unregister_thread();
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_consumerd_thread_sessiond(void)
-{
-       const char *var = "LTTNG_CONSUMERD_THREAD_SESSIOND_EXIT";
-
-       if (check_env_var(var)) {
-               rcu_unregister_thread();
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_consumerd_thread_metadata_timer(void)
-{
-       const char *var = "LTTNG_CONSUMERD_THREAD_METADATA_TIMER_EXIT";
-
-       if (check_env_var(var)) {
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-/* Relay daemon */
-
-int __testpoint_relayd_thread_dispatcher(void)
-{
-       const char *var = "LTTNG_RELAYD_THREAD_DISPATCHER_EXIT";
-
-       if (check_env_var(var)) {
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_relayd_thread_worker(void)
-{
-       const char *var = "LTTNG_RELAYD_THREAD_WORKER_EXIT";
-
-       if (check_env_var(var)) {
-               rcu_unregister_thread();
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_relayd_thread_listener(void)
-{
-       const char *var = "LTTNG_RELAYD_THREAD_LISTENER_EXIT";
-
-       if (check_env_var(var)) {
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_relayd_thread_live_dispatcher(void)
-{
-       const char *var = "LTTNG_RELAYD_THREAD_LIVE_DISPATCHER_EXIT";
-
-       if (check_env_var(var)) {
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_relayd_thread_live_worker(void)
-{
-       const char *var = "LTTNG_RELAYD_THREAD_LIVE_WORKER_EXIT";
-
-       if (check_env_var(var)) {
-               rcu_unregister_thread();
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
-
-int __testpoint_relayd_thread_live_listener(void)
-{
-       const char *var = "LTTNG_RELAYD_THREAD_LIVE_LISTENER_EXIT";
-
-       if (check_env_var(var)) {
-               pthread_exit(NULL);
-       }
-
-       return 0;
-}
index 8d8830b755b139481854535e540a162272378eea..4a99c2ea41c65ade878c7b0abb5ae0a1ff96e002 100644 (file)
@@ -70,7 +70,7 @@ function test_health
        # Activate specific thread test
        export ${test_thread_name}_${test_suffix}=1
 
-       # Spawn sessiond with preload healthexit lib
+       # Spawn sessiond with preloaded testpoint override lib
        export LD_PRELOAD="$CURDIR/$SESSIOND_PRELOAD"
 
        diag "Start session daemon"
This page took 0.03052 seconds and 4 git commands to generate.