On 1/25/23 15:17, Martin KaFai Lau wrote:
On 1/25/23 12:16 PM, Kui-Feng Lee wrote:
+ close(fd);
+ /* At this point, the cfd socket is at the CLOSE_WAIT state
+ * and still run TLS protocol. The test for
+ * BPF_TCP_CLOSE_WAIT should be run at this point.
+ */
+ char buf[1];
This checkpatch warning is reasonable:
https://patchwork.kernel.org/project/netdevbpf/patch/20230125201608.908230-3-kuifeng@xxxxxxxx/
WARNING: Missing a blank line after declarations
#88: FILE: tools/testing/selftests/bpf/prog_tests/setget_sockopt.c:138:
+ char buf[1];
+ ret = read(cfd, buf, 1);
I fixed it up and take this chance to move it to the beginning of the
function. Applied. Thanks.
Thank you for fixing that and reviewing!
+ ret = read(cfd, buf, 1);
+ ASSERT_EQ(ret, 0, "read");
+ close(cfd);