X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Funit%2Ftest_unix_socket.cpp;h=2ff65a679749838586fb47846306a740cc0b3f0f;hb=HEAD;hp=2c23b669c2d800bf35e7b528b0e346f3bc0ef1a5;hpb=28ab034a2c3582d07d3423d2d746731f87d3969f;p=lttng-tools.git diff --git a/tests/unit/test_unix_socket.cpp b/tests/unit/test_unix_socket.cpp index 2c23b669c..95a6173b8 100644 --- a/tests/unit/test_unix_socket.cpp +++ b/tests/unit/test_unix_socket.cpp @@ -5,7 +5,6 @@ * */ -#include #include #include #include @@ -17,6 +16,7 @@ #include #include +#include #include #include #include @@ -27,7 +27,7 @@ #define HIGH_FD_COUNT LTTCOMM_MAX_SEND_FDS #define MESSAGE_COUNT 4 -#define LARGE_PAYLOAD_SIZE 4 * 1024 +#define LARGE_PAYLOAD_SIZE (4 * 1024) #define LARGE_PAYLOAD_RECV_SIZE 100 static const int TEST_COUNT = 37; @@ -70,7 +70,7 @@ static void test_high_fd_count(unsigned int fd_count) for (i = 0; i < fd_count; i++) { struct fd_handle *handle; - int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); + const int fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); if (fd < 0) { PERROR("Failed to create fd while creating test payload"); @@ -486,7 +486,7 @@ error: lttng_payload_reset(&received_payload); } -static void test_creds_passing(void) +static void test_creds_passing() { pid_t fork_ret = -1; int ret, parent_socket = -1, child_connection_socket = -1; @@ -651,7 +651,7 @@ error: } } -int main(void) +int main() { plan_tests(TEST_COUNT);