projects
/
deliverable
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SoW-2019-0002: Dynamic Snapshot
[deliverable/lttng-tools.git]
/
tests
/
regression
/
kernel
/
select_poll_epoll.c
diff --git
a/tests/regression/kernel/select_poll_epoll.c
b/tests/regression/kernel/select_poll_epoll.c
index 33b8cb5d5d100d29ac18777ba68ae996e1ced057..42d554cb28468d9023e5368f0a6cb5a1bd2e093b 100644
(file)
--- a/
tests/regression/kernel/select_poll_epoll.c
+++ b/
tests/regression/kernel/select_poll_epoll.c
@@
-46,7
+46,7
@@
struct ppoll_thread_data {
int value;
};
int value;
};
-void test_select_big(void)
+
static
void test_select_big(void)
{
fd_set rfds, wfds, exfds;
struct timeval tv;
{
fd_set rfds, wfds, exfds;
struct timeval tv;
@@
-95,7
+95,7
@@
end:
return;
}
return;
}
-void test_pselect(void)
+
static
void test_pselect(void)
{
fd_set rfds;
struct timespec tv;
{
fd_set rfds;
struct timespec tv;
@@
-128,7
+128,7
@@
void test_pselect(void)
}
}
-void test_select(void)
+
static
void test_select(void)
{
fd_set rfds;
struct timeval tv;
{
fd_set rfds;
struct timeval tv;
@@
-161,7
+161,7
@@
void test_select(void)
}
}
-void test_poll(void)
+
static
void test_poll(void)
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
@@
-185,7
+185,7
@@
void test_poll(void)
}
}
}
}
-void test_ppoll(void)
+
static
void test_ppoll(void)
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
@@
-217,7
+217,7
@@
void test_ppoll(void)
}
}
}
}
-void test_ppoll_big(void)
+
static
void test_ppoll_big(void)
{
struct pollfd ufds[MAX_FDS];
char buf[BUF_SIZE];
{
struct pollfd ufds[MAX_FDS];
char buf[BUF_SIZE];
@@
-256,7
+256,7
@@
void test_ppoll_big(void)
return;
}
return;
}
-void test_epoll(void)
+
static
void test_epoll(void)
{
int ret, epollfd;
char buf[BUF_SIZE];
{
int ret, epollfd;
char buf[BUF_SIZE];
@@
-298,7
+298,7
@@
end:
return;
}
return;
}
-void test_pepoll(void)
+
static
void test_pepoll(void)
{
int ret, epollfd;
char buf[BUF_SIZE];
{
int ret, epollfd;
char buf[BUF_SIZE];
@@
-340,7
+340,7
@@
end:
return;
}
return;
}
-void run_working_cases(void)
+
static
void run_working_cases(void)
{
int ret;
int pipe_fds[2];
{
int ret;
int pipe_fds[2];
@@
-386,7
+386,7
@@
end:
* segfault (eventually with a "*** stack smashing detected ***" message).
* The event should contain an array of 100 FDs filled with garbage.
*/
* segfault (eventually with a "*** stack smashing detected ***" message).
* The event should contain an array of 100 FDs filled with garbage.
*/
-void ppoll_fds_buffer_overflow(void)
+
static
void ppoll_fds_buffer_overflow(void)
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
@@
-417,7
+417,7
@@
void ppoll_fds_buffer_overflow(void)
* cleanly fail with a "Invalid argument".
* The event should contain an empty array of FDs and overflow = 1.
*/
* cleanly fail with a "Invalid argument".
* The event should contain an empty array of FDs and overflow = 1.
*/
-void ppoll_fds_ulong_max(void)
+
static
void ppoll_fds_ulong_max(void)
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
{
struct pollfd ufds[NB_FD];
char buf[BUF_SIZE];
@@
-447,7
+447,7
@@
void ppoll_fds_ulong_max(void)
* Pass an invalid file descriptor to pselect6(). The syscall should return
* -EBADF. The recorded event should contain a "ret = -EBADF (-9)".
*/
* Pass an invalid file descriptor to pselect6(). The syscall should return
* -EBADF. The recorded event should contain a "ret = -EBADF (-9)".
*/
-void pselect_invalid_fd(void)
+
static
void pselect_invalid_fd(void)
{
fd_set rfds;
int ret;
{
fd_set rfds;
int ret;
@@
-493,7
+493,7
@@
error:
* Invalid pointer as writefds, should output a ppoll event
* with 0 FDs.
*/
* Invalid pointer as writefds, should output a ppoll event
* with 0 FDs.
*/
-void pselect_invalid_pointer(void)
+
static
void pselect_invalid_pointer(void)
{
fd_set rfds;
int ret;
{
fd_set rfds;
int ret;
@@
-524,7
+524,7
@@
void pselect_invalid_pointer(void)
* Pass an invalid pointer to epoll_pwait, should fail with
* "Bad address", the event returns 0 FDs.
*/
* Pass an invalid pointer to epoll_pwait, should fail with
* "Bad address", the event returns 0 FDs.
*/
-void epoll_pwait_invalid_pointer(void)
+
static
void epoll_pwait_invalid_pointer(void)
{
int ret, epollfd;
char buf[BUF_SIZE];
{
int ret, epollfd;
char buf[BUF_SIZE];
@@
-568,7
+568,7
@@
end:
* Set maxevents to INT_MAX, should output "Invalid argument"
* The event should return an empty array.
*/
* Set maxevents to INT_MAX, should output "Invalid argument"
* The event should return an empty array.
*/
-void epoll_pwait_int_max(void)
+
static
void epoll_pwait_int_max(void)
{
int ret, epollfd;
char buf[BUF_SIZE];
{
int ret, epollfd;
char buf[BUF_SIZE];
@@
-607,7
+607,7
@@
end:
return;
}
return;
}
-void *ppoll_writer(void *arg)
+
static
void *ppoll_writer(void *arg)
{
struct ppoll_thread_data *data = (struct ppoll_thread_data *) arg;
{
struct ppoll_thread_data *data = (struct ppoll_thread_data *) arg;
@@
-620,7
+620,7
@@
void *ppoll_writer(void *arg)
return NULL;
}
return NULL;
}
-void do_ppoll(int *fds, struct pollfd *ufds)
+
static
void do_ppoll(int *fds, struct pollfd *ufds)
{
int i, ret;
struct timespec ts;
{
int i, ret;
struct timespec ts;
@@
-649,7
+649,7
@@
void do_ppoll(int *fds, struct pollfd *ufds)
}
}
}
}
-void stress_ppoll(int *fds, int value)
+
static
void stress_ppoll(int *fds, int value)
{
pthread_t writer;
int iter, ret;
{
pthread_t writer;
int iter, ret;
@@
-690,7
+690,7
@@
end:
*
* ppoll should work as expected and the trace should be readable at the end.
*/
*
* ppoll should work as expected and the trace should be readable at the end.
*/
-void ppoll_concurrent_write(void)
+
static
void ppoll_concurrent_write(void)
{
int i, ret, fds[MAX_FDS];
{
int i, ret, fds[MAX_FDS];
@@
-715,7
+715,7
@@
void ppoll_concurrent_write(void)
return;
}
return;
}
-void *epoll_pwait_writer(void *addr)
+
static
void *epoll_pwait_writer(void *addr)
{
srand(time(NULL));
{
srand(time(NULL));
@@
-732,7
+732,7
@@
void *epoll_pwait_writer(void *addr)
* buffer allocated for the returned data. This should randomly segfault.
* The trace should be readable and no kernel OOPS should occur.
*/
* buffer allocated for the returned data. This should randomly segfault.
* The trace should be readable and no kernel OOPS should occur.
*/
-void epoll_pwait_concurrent_munmap(void)
+
static
void epoll_pwait_concurrent_munmap(void)
{
int ret, epollfd, i, fds[MAX_FDS];
char buf[BUF_SIZE];
{
int ret, epollfd, i, fds[MAX_FDS];
char buf[BUF_SIZE];
@@
-814,16
+814,7
@@
end:
return;
}
return;
}
-void usage(poptContext optCon, int exitcode, char *error, char *addl)
-{
- poptPrintUsage(optCon, stderr, 0);
- if (error) {
- fprintf(stderr, "%s: %s\n", error, addl);
- }
- exit(exitcode);
-}
-
-void print_list(void)
+static void print_list(void)
{
fprintf(stderr, "Test list (-t X):\n");
fprintf(stderr, "\t1: Working cases for select, pselect6, poll, ppoll "
{
fprintf(stderr, "Test list (-t X):\n");
fprintf(stderr, "\t1: Working cases for select, pselect6, poll, ppoll "
This page took
0.041071 seconds
and
5
git commands to generate.