Fix: tests: CFLAGS to CXXFLAGS when converting to C++
[lttng-tools.git] / tests / regression / kernel / select_poll_epoll.cpp
index d3a21e2fcc392fe5bedb4f5b06dc56b9b393bf1d..32cecddbb13409c2e1551385c47eb7043142538b 100644 (file)
@@ -5,27 +5,36 @@
  *
  */
 
-#include <stdio.h>
+/*
+ * This test voluntarily does buffer overflows and stack overruns, disable
+ * source fortification.
+ */
+#ifdef _FORTIFY_SOURCE
+#undef _FORTIFY_SOURCE
+#endif
+
+#include <fcntl.h>
+#include <limits.h>
 #include <poll.h>
+#include <popt.h>
+#include <pthread.h>
 #include <signal.h>
-#include <unistd.h>
-#include <sys/syscall.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
+#include <stddef.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <stddef.h>
-#include <sys/select.h>
 #include <sys/epoll.h>
-#include <popt.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <limits.h>
-#include <pthread.h>
 #include <sys/mman.h>
-#include <common/compat/time.h>
-#include <common/error.h>
+#include <sys/resource.h>
+#include <sys/select.h>
+#include <sys/stat.h>
+#include <sys/syscall.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <common/compat/time.hpp>
+#include <common/error.hpp>
 
 #define BUF_SIZE 256
 #define NB_FD 1
@@ -58,7 +67,8 @@ static void epoll_pwait_concurrent_munmap(FILE *validation_output_file);
 
 typedef void (*test_case_cb)(FILE *output_file);
 
-static const struct test_case {
+namespace {
+const struct test_case {
        test_case_cb run;
        bool produces_validation_info;
        int timeout;
@@ -81,6 +91,7 @@ struct ppoll_thread_data {
        struct pollfd *ufds;
        int value;
 };
+} /* namespace */
 
 static
 void test_select_big(void)
This page took 0.023657 seconds and 4 git commands to generate.