Re: [PATCH bpf-next v4 3/6] selftests/bpf: Use post_socket_cb in connect_to_fd_opts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/23/24 8:21 PM, Geliang Tang wrote:
+static int cc_cb(int fd, void *opts)
+{
+	struct cb_opts *cb_opts = (struct cb_opts *)opts;
+
+	return setsockopt(fd, SOL_TCP, TCP_CONGESTION, cb_opts->cc,
+			  strlen(cb_opts->cc) + 1);

Since this cc_cb is in the test itself, it should use ASSERT_* such that the error output will be more useful. The same (use ASSERT_* whenever makes sense) goes for all cb functions in this set. In particular for the cb that does more than setsockopt in patch 5.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux