From: Mathieu Desnoyers Date: Tue, 7 Feb 2012 02:59:42 +0000 (-0500) Subject: Cleanup tests coding style X-Git-Tag: v2.0-pre20~18 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f973f94b67543ecb538591ee791c9183c739ef40;p=lttng-tools.git Cleanup tests coding style 4 spaces -> tab Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/lttng/kernel_all_events_basic.c b/tests/lttng/kernel_all_events_basic.c index 3e12f00f1..f556db4fc 100644 --- a/tests/lttng/kernel_all_events_basic.c +++ b/tests/lttng/kernel_all_events_basic.c @@ -58,10 +58,10 @@ int main(int argc, char **argv) } printf("Creating tracing session (%s): ", argv[1]); - if ((ret = lttng_create_session(session_name, argv[1])) < 0) { - printf("error creating the session : %s\n", lttng_strerror(ret)); + if ((ret = lttng_create_session(session_name, argv[1])) < 0) { + printf("error creating the session : %s\n", lttng_strerror(ret)); goto create_fail; - } + } PRINT_OK(); printf("Creating session handle: "); @@ -72,20 +72,20 @@ int main(int argc, char **argv) PRINT_OK(); printf("Enabling all kernel events: "); - if ((ret = lttng_enable_event(handle, &event, channel_name)) < 0) { - printf("error enabling event: %s\n", lttng_strerror(ret)); + if ((ret = lttng_enable_event(handle, &event, channel_name)) < 0) { + printf("error enabling event: %s\n", lttng_strerror(ret)); goto enable_fail; - } + } PRINT_OK(); printf("Start tracing: "); - if ((ret = lttng_start_tracing(session_name)) < 0) { - printf("error starting tracing: %s\n", lttng_strerror(ret)); + if ((ret = lttng_start_tracing(session_name)) < 0) { + printf("error starting tracing: %s\n", lttng_strerror(ret)); goto start_fail; - } + } PRINT_OK(); - sleep(2); + sleep(2); printf("Stop tracing: "); if ((ret = lttng_stop_tracing(session_name)) < 0) { @@ -113,5 +113,5 @@ enable_fail: lttng_destroy_session(session_name); lttng_destroy_handle(handle); - return 1; + return 1; } diff --git a/tests/lttng/kernel_event_basic.c b/tests/lttng/kernel_event_basic.c index 6a11331ba..36eb03921 100644 --- a/tests/lttng/kernel_event_basic.c +++ b/tests/lttng/kernel_event_basic.c @@ -82,10 +82,10 @@ int main(int argc, char **argv) } printf("Creating tracing session (%s): ", argv[1]); - if ((ret = lttng_create_session(session_name, argv[1])) < 0) { - printf("error creating the session : %s\n", lttng_strerror(ret)); + if ((ret = lttng_create_session(session_name, argv[1])) < 0) { + printf("error creating the session : %s\n", lttng_strerror(ret)); goto create_fail; - } + } PRINT_OK(); printf("Creating session handle: "); @@ -102,10 +102,10 @@ int main(int argc, char **argv) } printf("Enabling %s kernel event: ", sched_switch.name); - if ((ret = lttng_enable_event(handle, &sched_switch, channel.name)) < 0) { - printf("error enabling event: %s\n", lttng_strerror(ret)); + if ((ret = lttng_enable_event(handle, &sched_switch, channel.name)) < 0) { + printf("error enabling event: %s\n", lttng_strerror(ret)); goto enable_fail; - } + } PRINT_OK(); printf("Enabling %s kernel event: ", sched_process_exit.name); @@ -185,5 +185,5 @@ enable_fail: lttng_destroy_session(session_name); lttng_destroy_handle(handle); - return 1; + return 1; } diff --git a/tests/lttng/ust_global_all_events_basic.c b/tests/lttng/ust_global_all_events_basic.c index 968dd9a6c..9feaa3057 100644 --- a/tests/lttng/ust_global_all_events_basic.c +++ b/tests/lttng/ust_global_all_events_basic.c @@ -53,10 +53,10 @@ int main(int argc, char **argv) } printf("Creating tracing session (%s): ", argv[1]); - if ((ret = lttng_create_session(session_name, argv[1])) < 0) { - printf("error creating the session : %s\n", lttng_strerror(ret)); + if ((ret = lttng_create_session(session_name, argv[1])) < 0) { + printf("error creating the session : %s\n", lttng_strerror(ret)); goto create_fail; - } + } PRINT_OK(); printf("Creating session handle: "); @@ -67,20 +67,20 @@ int main(int argc, char **argv) PRINT_OK(); printf("Enabling all UST events: "); - if ((ret = lttng_enable_event(handle, &event, channel_name)) < 0) { - printf("error enabling event: %s\n", lttng_strerror(ret)); + if ((ret = lttng_enable_event(handle, &event, channel_name)) < 0) { + printf("error enabling event: %s\n", lttng_strerror(ret)); goto enable_fail; - } + } PRINT_OK(); printf("Start tracing: "); - if ((ret = lttng_start_tracing(session_name)) < 0) { - printf("error starting tracing: %s\n", lttng_strerror(ret)); + if ((ret = lttng_start_tracing(session_name)) < 0) { + printf("error starting tracing: %s\n", lttng_strerror(ret)); goto start_fail; - } + } PRINT_OK(); - sleep(2); + sleep(2); printf("Stop tracing: "); if ((ret = lttng_stop_tracing(session_name)) < 0) { @@ -108,5 +108,5 @@ enable_fail: lttng_destroy_session(session_name); lttng_destroy_handle(handle); - return 1; + return 1; } diff --git a/tests/lttng/ust_global_event_basic.c b/tests/lttng/ust_global_event_basic.c index 2e05fffe5..c56c39bd2 100644 --- a/tests/lttng/ust_global_event_basic.c +++ b/tests/lttng/ust_global_event_basic.c @@ -74,10 +74,10 @@ int main(int argc, char **argv) } printf("Creating tracing session (%s): ", argv[1]); - if ((ret = lttng_create_session(session_name, argv[1])) < 0) { - printf("error creating the session : %s\n", lttng_strerror(ret)); + if ((ret = lttng_create_session(session_name, argv[1])) < 0) { + printf("error creating the session : %s\n", lttng_strerror(ret)); goto create_fail; - } + } PRINT_OK(); printf("Creating session handle: "); @@ -95,10 +95,10 @@ int main(int argc, char **argv) PRINT_OK(); printf("Enabling %s UST event: ", ev1.name); - if ((ret = lttng_enable_event(handle, &ev1, channel.name)) < 0) { - printf("error enabling event: %s\n", lttng_strerror(ret)); + if ((ret = lttng_enable_event(handle, &ev1, channel.name)) < 0) { + printf("error enabling event: %s\n", lttng_strerror(ret)); goto enable_fail; - } + } PRINT_OK(); printf("Enabling %s UST event: ", ev2.name); @@ -178,5 +178,5 @@ enable_fail: lttng_destroy_session(session_name); lttng_destroy_handle(handle); - return 1; + return 1; }