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 Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux