From fe828634ac84728162daeaab208233bad07cd772 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 4 Feb 2018 20:14:02 +0100 Subject: [PATCH] socket unit test: check receiving FIN together with data works --- test/unit/api/test_sockets.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit/api/test_sockets.c b/test/unit/api/test_sockets.c index 9c0011c6..451fa2fb 100644 --- a/test/unit/api/test_sockets.c +++ b/test/unit/api/test_sockets.c @@ -185,7 +185,8 @@ static void test_sockets_allfunctions_basic_domain(int domain) while(tcpip_thread_poll_one()); - ret = lwip_read(s3, buf, 3); + /* read one byte more than available to check handling FIN */ + ret = lwip_read(s3, buf, 4); fail_unless(ret == 3); ret = lwip_read(s3, buf, 1);