From 0b02503384301e4c2db13f1045a1ddbaca2ba0ce Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Thu, 5 Oct 2017 16:46:54 -0400 Subject: 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 Signed-off-by: David S. Miller --- tools/testing/vsock/timeout.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tools/testing/vsock/timeout.h (limited to 'tools/testing/vsock/timeout.h') 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 */ -- cgit v1.2.3-59-g8ed1b