From c6c6f6f231c8142ea8ee562e92c0bd4b6984f113 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Sun, 10 Aug 2025 21:46:39 +0000 Subject: [PATCH] zdtm/socket-tcp-closing: fill socket buffers effectivly Send large chunks to fill socket buffers. Signed-off-by: Andrei Vagin --- test/zdtm/static/socket-tcp-closing.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/zdtm/static/socket-tcp-closing.c b/test/zdtm/static/socket-tcp-closing.c index 87e1d7533..df291d446 100644 --- a/test/zdtm/static/socket-tcp-closing.c +++ b/test/zdtm/static/socket-tcp-closing.c @@ -31,10 +31,13 @@ static int port = 8880; int fill_sock_buf(int fd) { + char zdtm[512]; int flags; int size; int ret; + memset(zdtm, 5, sizeof(zdtm)); + flags = fcntl(fd, F_GETFL, 0); if (flags == -1) { pr_perror("Can't get flags"); @@ -47,7 +50,6 @@ int fill_sock_buf(int fd) size = 0; while (1) { - char zdtm[] = "zdtm test packet"; ret = write(fd, zdtm, sizeof(zdtm)); if (ret == -1) { if (errno == EAGAIN)