X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Funit%2Ftest_utils_compat_pthread.cpp;h=db39d49b7ce5544d8d995df582c4dc87ed54c678;hb=cd9adb8b829564212158943a0d279bb35322ab30;hp=2ce437372968ed63063956a417f2d8f294d468ec;hpb=f46376a14da2eb796690cb4e718e8b213839d6ea;p=lttng-tools.git diff --git a/tests/unit/test_utils_compat_pthread.cpp b/tests/unit/test_utils_compat_pthread.cpp index 2ce437372..db39d49b7 100644 --- a/tests/unit/test_utils_compat_pthread.cpp +++ b/tests/unit/test_utils_compat_pthread.cpp @@ -5,15 +5,15 @@ * */ +#include "common/compat/pthread.hpp" + #include #include -#include "common/compat/pthread.h" - #include #define TEST_NAME_PROPER_LEN 16 -int main(void) +int main() { int ret; char name1[TEST_NAME_PROPER_LEN]; @@ -44,8 +44,10 @@ int main(void) /* Get the thread name again, should be the one we set */ ret = lttng_pthread_getname_np(name1, TEST_NAME_PROPER_LEN); ok(ret == 0, "Get a short thread name: '%s'", name1); - ok(strcmp(short_name, name1) == 0, "Compare the short thread name: '%s' == '%s'", short_name, name1); - + ok(strcmp(short_name, name1) == 0, + "Compare the short thread name: '%s' == '%s'", + short_name, + name1); /* Set a thread name of 16 bytes */ ret = lttng_pthread_setname_np(long_name); @@ -54,7 +56,10 @@ int main(void) /* Get the thread name again, should be the one we set */ ret = lttng_pthread_getname_np(name1, TEST_NAME_PROPER_LEN); ok(ret == 0, "Get a long thread name: '%s'", name1); - ok(strncmp(long_name, name1, TEST_NAME_PROPER_LEN - 1) == 0, "Compare the long thread name: '%s' == '%s'", long_name, name1); + ok(strncmp(long_name, name1, TEST_NAME_PROPER_LEN - 1) == 0, + "Compare the long thread name: '%s' == '%s'", + long_name, + name1); return exit_status(); }