summaryrefslogtreecommitdiffstats
path: root/src/vcl/sock_test.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-05 00:50:30 -0700
committerDave Barach <openvpp@barachs.net>2018-10-07 18:17:04 +0000
commit1502fc303b7d98caafa67f182502771d76fba7f2 (patch)
tree1409e1eb1f62ed41d2a4ca69035999e9abf2b94f /src/vcl/sock_test.h
parent58c101adf057fc118ccca6e5cb9d02b43499e56a (diff)
vcl: cleanup and fixes for vcl test code
- better approximate time when test finishes - move common vcl and sock test code to vcl_test.h - overall refactor of variable names Change-Id: I8e6b43fc017cd05a0ddaa3891767a44fb300c09e Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/sock_test.h')
-rw-r--r--src/vcl/sock_test.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vcl/sock_test.h b/src/vcl/sock_test.h
index 6e0b22ae81f..83f17fa6650 100644
--- a/src/vcl/sock_test.h
+++ b/src/vcl/sock_test.h
@@ -20,16 +20,18 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <vcl/sock_test_common.h>
+#include <vcl/vcl_test.h>
#define SOCK_TEST_AF_UNIX_FILENAME "/tmp/ldp_server_af_unix_socket"
#define SOCK_TEST_MIXED_EPOLL_DATA "Hello, world! (over an AF_UNIX socket)"
#define SOCK_TEST_AF_UNIX_ACCEPT_DATA 0xaf0000af
#define SOCK_TEST_AF_UNIX_FD_MASK 0x00af0000
+#define SOCK_TEST_BANNER_STRING \
+ "============================================\n"
static inline int
sock_test_read (int fd, uint8_t *buf, uint32_t nbytes,
- sock_test_stats_t *stats)
+ vcl_test_stats_t *stats)
{
int rx_bytes, errno_val;
@@ -66,7 +68,7 @@ sock_test_read (int fd, uint8_t *buf, uint32_t nbytes,
static inline int
sock_test_write (int fd, uint8_t *buf, uint32_t nbytes,
- sock_test_stats_t *stats, uint32_t verbose)
+ vcl_test_stats_t *stats, uint32_t verbose)
{
int tx_bytes = 0;
int nbytes_left = nbytes;