From: Mathieu Desnoyers Date: Wed, 13 Nov 2013 21:40:53 +0000 (-0500) Subject: Add sessiond/SESSIOND_ prefix to sessiond testpoints X-Git-Tag: v2.5.0-rc1~258 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e547b070c5a28571d67efb3349814036f73ab38a;p=lttng-tools.git Add sessiond/SESSIOND_ prefix to sessiond testpoints Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 4d9b22de2..821431d96 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -866,13 +866,13 @@ static void *thread_manage_kernel(void *data) */ lttng_poll_init(&events); - if (testpoint(thread_manage_kernel)) { + if (testpoint(sessiond_thread_manage_kernel)) { goto error_testpoint; } health_code_update(); - if (testpoint(thread_manage_kernel_before_loop)) { + if (testpoint(sessiond_thread_manage_kernel_before_loop)) { goto error_testpoint; } @@ -1052,7 +1052,7 @@ static void *thread_manage_consumer(void *data) restart: health_poll_entry(); - if (testpoint(thread_manage_consumer)) { + if (testpoint(sessiond_thread_manage_consumer)) { goto error; } @@ -1325,7 +1325,7 @@ static void *thread_manage_apps(void *data) health_register(health_sessiond, HEALTH_SESSIOND_TYPE_APP_MANAGE); - if (testpoint(thread_manage_apps)) { + if (testpoint(sessiond_thread_manage_apps)) { goto error_testpoint; } @@ -1341,7 +1341,7 @@ static void *thread_manage_apps(void *data) goto error; } - if (testpoint(thread_manage_apps_before_loop)) { + if (testpoint(sessiond_thread_manage_apps_before_loop)) { goto error; } @@ -1827,7 +1827,7 @@ static void *thread_registration_apps(void *data) health_register(health_sessiond, HEALTH_SESSIOND_TYPE_APP_REG); - if (testpoint(thread_registration_apps)) { + if (testpoint(sessiond_thread_registration_apps)) { goto error_testpoint; } @@ -3758,7 +3758,7 @@ static void *thread_manage_clients(void *data) health_register(health_sessiond, HEALTH_SESSIOND_TYPE_CMD); - if (testpoint(thread_manage_clients)) { + if (testpoint(sessiond_thread_manage_clients)) { goto error_testpoint; } @@ -3797,7 +3797,7 @@ static void *thread_manage_clients(void *data) kill(child_ppid, SIGUSR1); } - if (testpoint(thread_manage_clients_before_loop)) { + if (testpoint(sessiond_thread_manage_clients_before_loop)) { goto error; } diff --git a/src/bin/lttng-sessiond/testpoint.h b/src/bin/lttng-sessiond/testpoint.h index 458b0acb5..623b061f8 100644 --- a/src/bin/lttng-sessiond/testpoint.h +++ b/src/bin/lttng-sessiond/testpoint.h @@ -21,13 +21,13 @@ #include /* Testpoints, internal use only */ -TESTPOINT_DECL(thread_manage_clients); -TESTPOINT_DECL(thread_manage_clients_before_loop); -TESTPOINT_DECL(thread_registration_apps); -TESTPOINT_DECL(thread_manage_apps); -TESTPOINT_DECL(thread_manage_apps_before_loop); -TESTPOINT_DECL(thread_manage_kernel); -TESTPOINT_DECL(thread_manage_kernel_before_loop); -TESTPOINT_DECL(thread_manage_consumer); +TESTPOINT_DECL(sessiond_thread_manage_clients); +TESTPOINT_DECL(sessiond_thread_manage_clients_before_loop); +TESTPOINT_DECL(sessiond_thread_registration_apps); +TESTPOINT_DECL(sessiond_thread_manage_apps); +TESTPOINT_DECL(sessiond_thread_manage_apps_before_loop); +TESTPOINT_DECL(sessiond_thread_manage_kernel); +TESTPOINT_DECL(sessiond_thread_manage_kernel_before_loop); +TESTPOINT_DECL(sessiond_thread_manage_consumer); #endif /* SESSIOND_TESTPOINT_H */ diff --git a/tests/regression/tools/health/health_exit.c b/tests/regression/tools/health/health_exit.c index 8d1d05c53..55cff4611 100644 --- a/tests/regression/tools/health/health_exit.c +++ b/tests/regression/tools/health/health_exit.c @@ -36,9 +36,9 @@ int check_env_var(const char *env) return 0; } -int __testpoint_thread_manage_clients(void) +int __testpoint_sessiond_thread_manage_clients(void) { - const char *var = "LTTNG_THREAD_MANAGE_CLIENTS_EXIT"; + const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_CLIENTS_EXIT"; if (check_env_var(var)) { rcu_unregister_thread(); @@ -48,9 +48,9 @@ int __testpoint_thread_manage_clients(void) return 0; } -int __testpoint_thread_registration_apps(void) +int __testpoint_sessiond_thread_registration_apps(void) { - const char *var = "LTTNG_THREAD_REG_APPS_EXIT"; + const char *var = "LTTNG_SESSIOND_THREAD_REG_APPS_EXIT"; if (check_env_var(var)) { pthread_exit(NULL); @@ -59,9 +59,9 @@ int __testpoint_thread_registration_apps(void) return 0; } -int __testpoint_thread_manage_apps(void) +int __testpoint_sessiond_thread_manage_apps(void) { - const char *var = "LTTNG_THREAD_MANAGE_APPS_EXIT"; + const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_APPS_EXIT"; if (check_env_var(var)) { rcu_unregister_thread(); @@ -71,9 +71,9 @@ int __testpoint_thread_manage_apps(void) return 0; } -int __testpoint_thread_manage_kernel(void) +int __testpoint_sessiond_thread_manage_kernel(void) { - const char *var = "LTTNG_THREAD_MANAGE_KERNEL_EXIT"; + const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_KERNEL_EXIT"; if (check_env_var(var)) { pthread_exit(NULL); @@ -82,9 +82,9 @@ int __testpoint_thread_manage_kernel(void) return 0; } -int __testpoint_thread_manage_consumer(void) +int __testpoint_sessiond_thread_manage_consumer(void) { - const char *var = "LTTNG_THREAD_MANAGE_CONSUMER_EXIT"; + const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_CONSUMER_EXIT"; if (check_env_var(var)) { pthread_exit(NULL); diff --git a/tests/regression/tools/health/health_fail.c b/tests/regression/tools/health/health_fail.c index 622782548..ca1602af3 100644 --- a/tests/regression/tools/health/health_fail.c +++ b/tests/regression/tools/health/health_fail.c @@ -35,9 +35,9 @@ int check_env_var(const char *env) return 0; } -int __testpoint_thread_manage_clients(void) +int __testpoint_sessiond_thread_manage_clients(void) { - const char *var = "LTTNG_THREAD_MANAGE_CLIENTS_TP_FAIL"; + const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_CLIENTS_TP_FAIL"; if (check_env_var(var)) { return 1; @@ -46,9 +46,9 @@ int __testpoint_thread_manage_clients(void) return 0; } -int __testpoint_thread_manage_apps(void) +int __testpoint_sessiond_thread_manage_apps(void) { - const char *var = "LTTNG_THREAD_MANAGE_APPS_TP_FAIL"; + const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_APPS_TP_FAIL"; if (check_env_var(var)) { return 1; @@ -57,9 +57,9 @@ int __testpoint_thread_manage_apps(void) return 0; } -int __testpoint_thread_manage_kernel(void) +int __testpoint_sessiond_thread_manage_kernel(void) { - const char *var = "LTTNG_THREAD_MANAGE_KERNEL_TP_FAIL"; + const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_KERNEL_TP_FAIL"; if (check_env_var(var)) { return 1; diff --git a/tests/regression/tools/health/health_stall.c b/tests/regression/tools/health/health_stall.c index 127f5fcf9..455e51913 100644 --- a/tests/regression/tools/health/health_stall.c +++ b/tests/regression/tools/health/health_stall.c @@ -38,9 +38,9 @@ int check_env_var(const char *env) return 0; } -int __testpoint_thread_manage_clients_before_loop(void) +int __testpoint_sessiond_thread_manage_clients_before_loop(void) { - const char *var = "LTTNG_THREAD_MANAGE_CLIENTS_STALL"; + const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_CLIENTS_STALL"; if (check_env_var(var)) { unsigned int sleep_time = STALL_TIME; @@ -52,9 +52,9 @@ int __testpoint_thread_manage_clients_before_loop(void) return 0; } -int __testpoint_thread_manage_kernel_before_loop(void) +int __testpoint_sessiond_thread_manage_kernel_before_loop(void) { - const char *var = "LTTNG_THREAD_MANAGE_KERNEL_STALL"; + const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_KERNEL_STALL"; if (check_env_var(var)) { unsigned int sleep_time = STALL_TIME; @@ -66,9 +66,9 @@ int __testpoint_thread_manage_kernel_before_loop(void) return 0; } -int __testpoint_thread_manage_apps_before_loop(void) +int __testpoint_sessiond_thread_manage_apps_before_loop(void) { - const char *var = "LTTNG_THREAD_MANAGE_APPS_STALL"; + const char *var = "LTTNG_SESSIOND_THREAD_MANAGE_APPS_STALL"; if (check_env_var(var)) { unsigned int sleep_time = STALL_TIME; diff --git a/tests/regression/tools/health/test_thread_exit b/tests/regression/tools/health/test_thread_exit index ea0b4d4ea..7622e356d 100755 --- a/tests/regression/tools/health/test_thread_exit +++ b/tests/regression/tools/health/test_thread_exit @@ -92,9 +92,9 @@ plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" -THREAD=("LTTNG_THREAD_MANAGE_CLIENTS" - "LTTNG_THREAD_MANAGE_APPS" - "LTTNG_THREAD_REG_APPS") +THREAD=("LTTNG_SESSIOND_THREAD_MANAGE_CLIENTS" + "LTTNG_SESSIOND_THREAD_MANAGE_APPS" + "LTTNG_SESSIOND_THREAD_REG_APPS") ERROR_STRING=( "Thread \"Session daemon command\" is not responding in component \"sessiond\"." @@ -124,13 +124,13 @@ else isroot=0 fi -skip $isroot "Root access is needed. Skipping LTTNG_THREAD_MANAGE_KERNEL tests." "3" || +skip $isroot "Root access is needed. Skipping LTTNG_SESSIOND_THREAD_MANAGE_KERNEL tests." "3" || { - test_thread_exit "LTTNG_THREAD_MANAGE_KERNEL" "Thread \"Session daemon kernel\" is not responding in component \"sessiond\"." + test_thread_exit "LTTNG_SESSIOND_THREAD_MANAGE_KERNEL" "Thread \"Session daemon kernel\" is not responding in component \"sessiond\"." } rm -f ${STDOUT_PATH} rm -f ${STDERR_PATH} # TODO: Special case manage consumer, need to spawn consumer via commands. -#"LTTNG_THREAD_MANAGE_CONSUMER" +#"LTTNG_SESSIOND_THREAD_MANAGE_CONSUMER" diff --git a/tests/regression/tools/health/test_thread_stall b/tests/regression/tools/health/test_thread_stall index 0c8244d5c..a3d582525 100755 --- a/tests/regression/tools/health/test_thread_stall +++ b/tests/regression/tools/health/test_thread_stall @@ -120,11 +120,11 @@ plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" -THREAD=("LTTNG_THREAD_MANAGE_CLIENTS" - "LTTNG_THREAD_MANAGE_APPS" +THREAD=("LTTNG_SESSIOND_THREAD_MANAGE_CLIENTS" + "LTTNG_SESSIOND_THREAD_MANAGE_APPS" # This thread is a little bit tricky to stall, # need to send some commands and setup an app. -# "LTTNG_THREAD_REG_APPS" +# "LTTNG_SESSIOND_THREAD_REG_APPS" ) ERROR_STRING=( @@ -155,9 +155,9 @@ else isroot=0 fi -skip $isroot "Root access is needed. Skipping LTTNG_THREAD_MANAGE_KERNEL tests." "4" || +skip $isroot "Root access is needed. Skipping LTTNG_SESSIOND_THREAD_MANAGE_KERNEL tests." "4" || { - test_thread_stall "LTTNG_THREAD_MANAGE_KERNEL" "Thread \"Session daemon kernel\" is not responding in component \"sessiond\"." + test_thread_stall "LTTNG_SESSIOND_THREAD_MANAGE_KERNEL" "Thread \"Session daemon kernel\" is not responding in component \"sessiond\"." } rm -f ${STDOUT_PATH} diff --git a/tests/regression/tools/health/test_tp_fail b/tests/regression/tools/health/test_tp_fail index 591d60835..0af69b843 100755 --- a/tests/regression/tools/health/test_tp_fail +++ b/tests/regression/tools/health/test_tp_fail @@ -85,8 +85,8 @@ plan_tests $NUM_TESTS print_test_banner "$TEST_DESC" -THREAD=("LTTNG_THREAD_MANAGE_CLIENTS" - "LTTNG_THREAD_MANAGE_APPS") +THREAD=("LTTNG_SESSIOND_THREAD_MANAGE_CLIENTS" + "LTTNG_SESSIOND_THREAD_MANAGE_APPS") ERROR_STRING=( "Thread \"Session daemon command\" is not responding in component \"sessiond\"." @@ -115,13 +115,13 @@ else isroot=0 fi -skip $isroot "Root access is needed. Skipping LTTNG_THREAD_MANAGE_KERNEL tests." "3" || +skip $isroot "Root access is needed. Skipping LTTNG_SESSIOND_THREAD_MANAGE_KERNEL tests." "3" || { - test_tp_fail "LTTNG_THREAD_MANAGE_KERNEL" "Thread \"Session daemon kernel\" is not responding in component \"sessiond\"." + test_tp_fail "LTTNG_SESSIOND_THREAD_MANAGE_KERNEL" "Thread \"Session daemon kernel\" is not responding in component \"sessiond\"." } rm -f ${STDOUT_PATH} rm -f ${STDERR_PATH} # TODO: Special case manage consumer, need to spawn consumer via commands. -#"LTTNG_THREAD_MANAGE_CONSUMER" +#"LTTNG_SESSIOND_THREAD_MANAGE_CONSUMER"