diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-10-05 23:46:54 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-06 04:44:17 +0300 |
commit | 0b02503384301e4c2db13f1045a1ddbaca2ba0ce (patch) | |
tree | 88a8efdc3dcba52ab1d0e379a709d4043acbc6c7 /tools/testing/vsock/timeout.h | |
parent | 413a4317aca7d6367d57a5971b0c461f03851207 (diff) | |
download | linux-0b02503384301e4c2db13f1045a1ddbaca2ba0ce.tar.xz |
VSOCK: add tools/testing/vsock/vsock_diag_test
This patch adds tests for the vsock_diag.ko module.
These tests are not self-tests because they require manual set up of a
KVM or VMware guest. Please see tools/testing/vsock/README for
instructions.
The control.h and timeout.h infrastructure can be used for additional
AF_VSOCK tests in the future.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/vsock/timeout.h')
-rw-r--r-- | tools/testing/vsock/timeout.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/testing/vsock/timeout.h b/tools/testing/vsock/timeout.h new file mode 100644 index 000000000000..77db9ce9860a --- /dev/null +++ b/tools/testing/vsock/timeout.h @@ -0,0 +1,14 @@ +#ifndef TIMEOUT_H +#define TIMEOUT_H + +enum { + /* Default timeout */ + TIMEOUT = 10 /* seconds */ +}; + +void sigalrm(int signo); +void timeout_begin(unsigned int seconds); +void timeout_check(const char *operation); +void timeout_end(void); + +#endif /* TIMEOUT_H */ |