*
*/
-#include <stdio.h>
+#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
{
{ .run = run_working_cases, .produces_validation_info = true, .timeout = -1 },
{ .run = run_working_cases, .produces_validation_info = true, .timeout = 1 },
- { .run = pselect_invalid_fd, .produces_validation_info = false },
- { .run = test_ppoll_big, .produces_validation_info = false },
- { .run = ppoll_fds_buffer_overflow, .produces_validation_info = false },
- { .run = pselect_invalid_pointer, .produces_validation_info = false },
- { .run = ppoll_fds_ulong_max, .produces_validation_info = false },
- { .run = epoll_pwait_invalid_pointer, .produces_validation_info = true },
- { .run = epoll_pwait_int_max, .produces_validation_info = true },
- { .run = ppoll_concurrent_write, .produces_validation_info = false },
- { .run = epoll_pwait_concurrent_munmap, .produces_validation_info = true },
+ { .run = pselect_invalid_fd, .produces_validation_info = false, .timeout = 0 },
+ { .run = test_ppoll_big, .produces_validation_info = false, .timeout = 0 },
+ { .run = ppoll_fds_buffer_overflow, .produces_validation_info = false, .timeout = 0 },
+ { .run = pselect_invalid_pointer, .produces_validation_info = false, .timeout = 0 },
+ { .run = ppoll_fds_ulong_max, .produces_validation_info = false, .timeout = 0 },
+ { .run = epoll_pwait_invalid_pointer, .produces_validation_info = true, .timeout = 0 },
+ { .run = epoll_pwait_int_max, .produces_validation_info = true, .timeout = 0 },
+ { .run = ppoll_concurrent_write, .produces_validation_info = false, .timeout = 0 },
+ { .run = epoll_pwait_concurrent_munmap, .produces_validation_info = true, .timeout = 0 },
};
struct ppoll_thread_data {
}
static
-void test_ppoll_big(FILE *validation_output_file)
+void test_ppoll_big(FILE *validation_output_file __attribute__((unused)))
{
struct pollfd ufds[MAX_FDS];
char buf[BUF_SIZE];
* The event should contain an array of 100 FDs filled with garbage.
*/
static
-void ppoll_fds_buffer_overflow(FILE *validation_output_file)
+void ppoll_fds_buffer_overflow(
+ FILE *validation_output_file __attribute__((unused)))
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
* The event should contain an empty array of FDs and overflow = 1.
*/
static
-void ppoll_fds_ulong_max(FILE *validation_output_file)
+void ppoll_fds_ulong_max(FILE *validation_output_file __attribute__((unused)))
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
* -EBADF. The recorded event should contain a "ret = -EBADF (-9)".
*/
static
-void pselect_invalid_fd(FILE *validation_output_file)
+void pselect_invalid_fd(FILE *validation_output_file __attribute__((unused)))
{
fd_set rfds;
int ret;
* with 0 FDs.
*/
static
-void pselect_invalid_pointer(FILE *validation_output_file)
+void pselect_invalid_pointer(
+ FILE *validation_output_file __attribute__((unused)))
{
fd_set rfds;
int ret;
* ppoll should work as expected and the trace should be readable at the end.
*/
static
-void ppoll_concurrent_write(FILE *validation_output_file)
+void ppoll_concurrent_write(
+ FILE *validation_output_file __attribute__((unused)))
{
int i, ret, fds[MAX_FDS];
{ "validation-file", 'o', POPT_ARG_STRING, &test_validation_output_file_path, 0,
"Test case output", NULL },
POPT_AUTOHELP
- { NULL, 0, 0, NULL, 0 }
+ { NULL, 0, 0, NULL, 0, NULL, NULL }
};
const struct test_case *test_case;