Breno Leitao wrote: > Exercise the raw getsockopt path now backed by sockopt_t. ICMP_FILTER > returns a fixed-size struct and, unlike the int/u64 options already > covered, clamps the length down to the user buffer on a short read > instead of failing, so check that semantic explicitly along with the > exact and oversized cases, the -EOPNOTSUPP path on a non-ICMP raw > socket, and an unknown optname. > > Signed-off-by: Breno Leitao <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]> > +TEST_F(raw, icmpfilter_oversize_clamped) > +{ > + char buf[16] = {}; Not a reason to respin, but instead of a raw constant, something like sizeof(struct icmp_filter) + 1 is more robust and descriptive.

