File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,7 @@ static void test_stream_msg_peek_server(const struct test_opts *opts)
282
282
}
283
283
284
284
#define MESSAGES_CNT 7
285
+ #define MSG_EOR_IDX (MESSAGES_CNT / 2)
285
286
static void test_seqpacket_msg_bounds_client (const struct test_opts * opts )
286
287
{
287
288
int fd ;
@@ -294,7 +295,7 @@ static void test_seqpacket_msg_bounds_client(const struct test_opts *opts)
294
295
295
296
/* Send several messages, one with MSG_EOR flag */
296
297
for (int i = 0 ; i < MESSAGES_CNT ; i ++ )
297
- send_byte (fd , 1 , 0 );
298
+ send_byte (fd , 1 , ( i == MSG_EOR_IDX ) ? MSG_EOR : 0 );
298
299
299
300
control_writeln ("SENDDONE" );
300
301
close (fd );
@@ -324,6 +325,11 @@ static void test_seqpacket_msg_bounds_server(const struct test_opts *opts)
324
325
perror ("message bound violated" );
325
326
exit (EXIT_FAILURE );
326
327
}
328
+
329
+ if ((i == MSG_EOR_IDX ) ^ !!(msg .msg_flags & MSG_EOR )) {
330
+ perror ("MSG_EOR" );
331
+ exit (EXIT_FAILURE );
332
+ }
327
333
}
328
334
329
335
close (fd );
You can’t perform that action at this time.
0 commit comments