Re: [PATCH net 2/2] selftests: net: simple selftest for ipvtap

From: Dmitry Skorodumov

Date: Tue Dec 30 2025 - 05:07:04 EST



>> +test_ip_set_thread() {
>> + ip link set ipvlan0 up
>> + for ((i=0; i<IP_ITERATIONS; i++)); do
>> + v=$(rnd)
>> + ip a a "172.25.0.$v/24" dev ipvlan0 2>/dev/null
>> + ip a a "fc00::$v/64" dev ipvlan0 2>/dev/null
>> + v=$(rnd)
>> + ip a d "172.25.0.$v/24" dev ipvlan0 2>/dev/null
>> + ip a d "fc00::$v/64" dev ipvlan0 2>/dev/null
> It's unclear to me why the above tries to remove random addresses
> different from the ones just added (possibly not existing)

The idea is that we are trying to create conflicts between namespaces. If we add random address, and then delete the same address - nothing interesting happens. But if we delete some another random address - we will eventually occupy some share of IP-addresses - and conflicts start to appear. I'll mention this in comment in next version.


PS: I agree with other comments from your side. Will fix them.


Dmitry