Subject: Re: [PATCH v2 bpf-next 5/5] selftests/bpf: Add tests for bucket resume logic in UDP socket iterators

From: Jordan Rife <[email-masked]>
Date: Mon, 14 Apr 2025 17:04:16 -0700

> > +static int read_n(int iter_fd, int n, struct sock_count counts[],
> > +		  int counts_len)
> > +{
> > +	struct iter_out out;
> > +	int nread = 1;
> > +	int i = 0;
> > +
> > +	for (; nread > 0 && (n < 0 || i < n); i++) {
> > +		nread = read(iter_fd, &out, sizeof(out));
> > +		if (!nread || !ASSERT_GE(nread, 1, "nread"))
> 
> why checks nread >= 1 instead of nread == sizeof(out)?

Will adjust this check to be more precise and apply the other changes
you mentioned.

Thanks!

-Jordan