Add sessiond/SESSIOND_ prefix to sessiond testpoints
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 13 Nov 2013 21:40:53 +0000 (16:40 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 28 Jan 2014 20:39:45 +0000 (15:39 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-sessiond/main.c
src/bin/lttng-sessiond/testpoint.h
tests/regression/tools/health/health_exit.c
tests/regression/tools/health/health_fail.c
tests/regression/tools/health/health_stall.c
tests/regression/tools/health/test_thread_exit
tests/regression/tools/health/test_thread_stall
tests/regression/tools/health/test_tp_fail

index 891abe9b8f88803e925c711ef8593bcb1f021283..d6bca47d59db9bdc8b116a1f2df3dd6493e4979f 100644 (file)
@@ -801,13 +801,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;
        }
 
@@ -987,7 +987,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;
        }
 
@@ -1260,7 +1260,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;
        }
 
@@ -1276,7 +1276,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;
        }
 
@@ -1762,7 +1762,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;
        }
 
@@ -3693,7 +3693,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;
        }
 
@@ -3732,7 +3732,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;
        }
 
index 458b0acb535a93ec3d3cc3ed2d876ff3656bf623..623b061f8eb4be2c44fea0308078735e7ed2f945 100644 (file)
 #include <common/testpoint/testpoint.h>
 
 /* 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 */
index 8d1d05c5311dfa069bc66557a0448bb31ef10d72..55cff4611726124c990a264a2cbc3d2cd5ff2742 100644 (file)
@@ -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);
index 6227825480108d92625e25c0a7ba6b4082ec6e09..ca1602af3d35862059a0bc3ff0f228ffa7f08472 100644 (file)
@@ -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;
index 127f5fcf931a48e8ba22206be8b16a49b15ed9bf..455e5191393862a51c4d515da4926af5ae998b62 100644 (file)
@@ -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;
index ea0b4d4ea1d99cb1d01ee124d051241757e27659..7622e356dd5d1fb190b3eec89cdd2a3cef62223b 100755 (executable)
@@ -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"
index 0c8244d5c98d738bf719f8fc608094d44c16eb4e..a3d58252532e8a808b40ad764d79d8c09a88efe1 100755 (executable)
@@ -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}
index 591d60835f5a677b5f0b262d25eadd067ddb1baf..0af69b84367e813fbcbbad20737f945d28f7eac2 100755 (executable)
@@ -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"
This page took 0.035021 seconds and 4 git commands to generate.