<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/net, branch v5.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-07-29T19:16:21Z</updated>
<entry>
<title>selftests: ethtool: Fix test when only two speeds are supported</title>
<updated>2020-07-29T19:16:21Z</updated>
<author>
<name>Amit Cohen</name>
<email>amitc@mellanox.com</email>
</author>
<published>2020-07-29T09:26:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=10fef9ca6a879e7bee090b8e51c9812d438d3fb1'/>
<id>urn:sha1:10fef9ca6a879e7bee090b8e51c9812d438d3fb1</id>
<content type='text'>
The test case check_highest_speed_is_chosen() configures $h1 to
advertise a subset of its supported speeds and checks that $h2 chooses
the highest speed from the subset.

To find the common advertised speeds between $h1 and $h2,
common_speeds_get() is called.

Currently, the first speed returned from common_speeds_get() is removed
claiming "h1 does not advertise this speed". The claim is wrong because
the function is called after $h1 already advertised a subset of speeds.

In case $h1 supports only two speeds, it will advertise a single speed
which will be later removed because of previously mentioned bug. This
results in the test needlessly failing. When more than two speeds are
supported this is not an issue because the first advertised speed
is the lowest one.

Fix this by not removing any speed from the list of commonly advertised
speeds.

Fixes: 64916b57c0b1 ("selftests: forwarding: Add speed and auto-negotiation test")
Reported-by: Danielle Ratson &lt;danieller@mellanox.com&gt;
Signed-off-by: Amit Cohen &lt;amitc@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/net: tcp_mmap: fix clang warning for target arch PowerPC</title>
<updated>2020-07-27T19:56:59Z</updated>
<author>
<name>Tanner Love</name>
<email>tannerlove@google.com</email>
</author>
<published>2020-07-27T16:25:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=94b6c13be57cdedb7cf4d33dbcd066fad133f22b'/>
<id>urn:sha1:94b6c13be57cdedb7cf4d33dbcd066fad133f22b</id>
<content type='text'>
When size_t maps to unsigned int (e.g. on 32-bit powerpc), then the
comparison with 1&lt;&lt;35 is always true. Clang 9 threw:
warning: result of comparison of constant 34359738368 with \
expression of type 'size_t' (aka 'unsigned int') is always true \
[-Wtautological-constant-out-of-range-compare]
        while (total &lt; FILE_SZ) {

Tested: make -C tools/testing/selftests TARGETS="net" run_tests

Fixes: 192dc405f308 ("selftests: net: add tcp_mmap program")
Signed-off-by: Tanner Love &lt;tannerlove@google.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/net: so_txtime: fix clang issues for target arch PowerPC</title>
<updated>2020-07-27T19:56:58Z</updated>
<author>
<name>Tanner Love</name>
<email>tannerlove@google.com</email>
</author>
<published>2020-07-27T16:25:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b4da96ffd30bd4a305045ba5c9b0de5d4aa20dc7'/>
<id>urn:sha1:b4da96ffd30bd4a305045ba5c9b0de5d4aa20dc7</id>
<content type='text'>
On powerpcle, int64_t maps to long long. Clang 9 threw:
warning: absolute value function 'labs' given an argument of type \
'long long' but has parameter of type 'long' which may cause \
truncation of value [-Wabsolute-value]
        if (labs(tstop - texpect) &gt; cfg_variance_us)

Tested: make -C tools/testing/selftests TARGETS="net" run_tests

Fixes: af5136f95045 ("selftests/net: SO_TXTIME with ETF and FQ")
Signed-off-by: Tanner Love &lt;tannerlove@google.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/net: psock_fanout: fix clang issues for target arch PowerPC</title>
<updated>2020-07-27T19:56:58Z</updated>
<author>
<name>Tanner Love</name>
<email>tannerlove@google.com</email>
</author>
<published>2020-07-27T16:25:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=64f9ede2274980076423583683d44480909b7a40'/>
<id>urn:sha1:64f9ede2274980076423583683d44480909b7a40</id>
<content type='text'>
Clang 9 threw:
warning: format specifies type 'unsigned short' but the argument has \
type 'int' [-Wformat]
                typeflags, PORT_BASE, PORT_BASE + port_off);

Tested: make -C tools/testing/selftests TARGETS="net" run_tests

Fixes: 77f65ebdca50 ("packet: packet fanout rollover during socket overload")
Signed-off-by: Tanner Love &lt;tannerlove@google.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/net: rxtimestamp: fix clang issues for target arch PowerPC</title>
<updated>2020-07-27T19:56:58Z</updated>
<author>
<name>Tanner Love</name>
<email>tannerlove@google.com</email>
</author>
<published>2020-07-27T16:25:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=955cbe91bcf782c09afe369c95a20f0a4b6dcc3c'/>
<id>urn:sha1:955cbe91bcf782c09afe369c95a20f0a4b6dcc3c</id>
<content type='text'>
The signedness of char is implementation-dependent. Some systems
(including PowerPC and ARM) use unsigned char. Clang 9 threw:
warning: result of comparison of constant -1 with expression of type \
'char' is always true [-Wtautological-constant-out-of-range-compare]
                                  &amp;arg_index)) != -1) {

Tested: make -C tools/testing/selftests TARGETS="net" run_tests

Fixes: 16e781224198 ("selftests/net: Add a test to validate behavior of rx timestamps")
Signed-off-by: Tanner Love &lt;tannerlove@google.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftest: txtimestamp: fix net ns entry logic</title>
<updated>2020-07-21T23:11:07Z</updated>
<author>
<name>Paolo Pisati</name>
<email>paolo.pisati@canonical.com</email>
</author>
<published>2020-07-21T16:17:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b346c0c85892cb8c53e8715734f71ba5bbec3387'/>
<id>urn:sha1:b346c0c85892cb8c53e8715734f71ba5bbec3387</id>
<content type='text'>
According to 'man 8 ip-netns', if `ip netns identify` returns an empty string,
there's no net namespace associated with current PID: fix the net ns entrance
logic.

Signed-off-by: Paolo Pisati &lt;paolo.pisati@canonical.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: net: ip_defrag: modprobe missing nf_defrag_ipv6 support</title>
<updated>2020-07-17T19:49:18Z</updated>
<author>
<name>Paolo Pisati</name>
<email>paolo.pisati@canonical.com</email>
</author>
<published>2020-07-16T15:51:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aba69d49fb49c9166596dd78926514173b7f9ab5'/>
<id>urn:sha1:aba69d49fb49c9166596dd78926514173b7f9ab5</id>
<content type='text'>
Fix ip_defrag.sh when CONFIG_NF_DEFRAG_IPV6=m:

$ sudo ./ip_defrag.sh
+ set -e
+ mktemp -u XXXXXX
+ readonly NETNS=ns-rGlXcw
+ trap cleanup EXIT
+ setup
+ ip netns add ns-rGlXcw
+ ip -netns ns-rGlXcw link set lo up
+ ip netns exec ns-rGlXcw sysctl -w net.ipv4.ipfrag_high_thresh=9000000
+ ip netns exec ns-rGlXcw sysctl -w net.ipv4.ipfrag_low_thresh=7000000
+ ip netns exec ns-rGlXcw sysctl -w net.ipv4.ipfrag_time=1
+ ip netns exec ns-rGlXcw sysctl -w net.ipv6.ip6frag_high_thresh=9000000
+ ip netns exec ns-rGlXcw sysctl -w net.ipv6.ip6frag_low_thresh=7000000
+ ip netns exec ns-rGlXcw sysctl -w net.ipv6.ip6frag_time=1
+ ip netns exec ns-rGlXcw sysctl -w net.netfilter.nf_conntrack_frag6_high_thresh=9000000
+ cleanup
+ ip netns del ns-rGlXcw

$ ls -la /proc/sys/net/netfilter/nf_conntrack_frag6_high_thresh
ls: cannot access '/proc/sys/net/netfilter/nf_conntrack_frag6_high_thresh': No such file or directory

$ sudo modprobe nf_defrag_ipv6
$ ls -la /proc/sys/net/netfilter/nf_conntrack_frag6_high_thresh
-rw-r--r-- 1 root root 0 Jul 14 12:34 /proc/sys/net/netfilter/nf_conntrack_frag6_high_thresh

Signed-off-by: Paolo Pisati &lt;paolo.pisati@canonical.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion</title>
<updated>2020-07-14T22:06:12Z</updated>
<author>
<name>Paolo Pisati</name>
<email>paolo.pisati@canonical.com</email>
</author>
<published>2020-07-14T15:40:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=651149f60376758a4759f761767965040f9e4464'/>
<id>urn:sha1:651149f60376758a4759f761767965040f9e4464</id>
<content type='text'>
During setup():
...
        for ns in h0 r1 h1 h2 h3
        do
                create_ns ${ns}
        done
...

while in cleanup():
...
        for n in h1 r1 h2 h3 h4
        do
                ip netns del ${n} 2&gt;/dev/null
        done
...

and after removing the stderr redirection in cleanup():

$ sudo ./fib_nexthop_multiprefix.sh
...
TEST: IPv4: host 0 to host 3, mtu 1400                              [ OK ]
TEST: IPv6: host 0 to host 3, mtu 1400                              [ OK ]
Cannot remove namespace file "/run/netns/h4": No such file or directory
$ echo $?
1

and a non-zero return code, make kselftests fail (even if the test
itself is fine):

...
not ok 34 selftests: net: fib_nexthop_multiprefix.sh # exit=1
...

Signed-off-by: Paolo Pisati &lt;paolo.pisati@canonical.com&gt;
Reviewed-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: fib6_select_path can not use out path for nexthop objects</title>
<updated>2020-07-06T20:24:16Z</updated>
<author>
<name>David Ahern</name>
<email>dsahern@kernel.org</email>
</author>
<published>2020-07-06T17:45:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34fe5a1cf95c3f114068fc16d919c9cf4b00e428'/>
<id>urn:sha1:34fe5a1cf95c3f114068fc16d919c9cf4b00e428</id>
<content type='text'>
Brian reported a crash in IPv6 code when using rpfilter with a setup
running FRR and external nexthop objects. The root cause of the crash
is fib6_select_path setting fib6_nh in the result to NULL because of
an improper check for nexthop objects.

More specifically, rpfilter invokes ip6_route_lookup with flowi6_oif
set causing fib6_select_path to be called with have_oif_match set.
fib6_select_path has early check on have_oif_match and jumps to the
out label which presumes a builtin fib6_nh. This path is invalid for
nexthop objects; for external nexthops fib6_select_path needs to just
return if the fib6_nh has already been set in the result otherwise it
returns after the call to nexthop_path_fib6_result. Update the check
on have_oif_match to not bail on external nexthops.

Update selftests for this problem.

Fixes: f88d8ea67fbd ("ipv6: Plumb support for nexthop object in a fib6_info")
Reported-by: Brian Rak &lt;brak@choopa.com&gt;
Signed-off-by: David Ahern &lt;dsahern@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/net: report etf errors correctly</title>
<updated>2020-06-20T03:23:02Z</updated>
<author>
<name>Willem de Bruijn</name>
<email>willemb@google.com</email>
</author>
<published>2020-06-18T16:40:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca8826095e4d4afc0ccaead27bba6e4b623a12ae'/>
<id>urn:sha1:ca8826095e4d4afc0ccaead27bba6e4b623a12ae</id>
<content type='text'>
The ETF qdisc can queue skbs that it could not pace on the errqueue.

Address a few issues in the selftest

- recv buffer size was too small, and incorrectly calculated
- compared errno to ee_code instead of ee_errno
- missed invalid request error type

v2:
  - fix a few checkpatch --strict indentation warnings

Fixes: ea6a547669b3 ("selftests/net: make so_txtime more robust to timer variance")
Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
