<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/bpf/test_sockmap.c, branch v5.6</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.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-01-24T21:12:13Z</updated>
<entry>
<title>selftests: bpf: Use a temporary file in test_sockmap</title>
<updated>2020-01-24T21:12:13Z</updated>
<author>
<name>Lorenz Bauer</name>
<email>lmb@cloudflare.com</email>
</author>
<published>2020-01-24T11:27:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c31dbb1e41d1857b403f9bf58c87f5898519a0bc'/>
<id>urn:sha1:c31dbb1e41d1857b403f9bf58c87f5898519a0bc</id>
<content type='text'>
Use a proper temporary file for sendpage tests. This means that running
the tests doesn't clutter the working directory, and allows running the
test on read-only filesystems.

Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
Signed-off-by: Lorenz Bauer &lt;lmb@cloudflare.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Reviewed-by: Jakub Sitnicki &lt;jakub@cloudflare.com&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Acked-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Link: https://lore.kernel.org/bpf/20200124112754.19664-2-lmb@cloudflare.com
</content>
</entry>
<entry>
<title>selftests: bpf: correct perror strings</title>
<updated>2019-11-29T06:40:30Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>jakub.kicinski@netronome.com</email>
</author>
<published>2019-11-27T20:16:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e5dc9dd3258098bf8b5ceb75fc3433b41eff618a'/>
<id>urn:sha1:e5dc9dd3258098bf8b5ceb75fc3433b41eff618a</id>
<content type='text'>
perror(str) is basically equivalent to
print("%s: %s\n", str, strerror(errno)).
New line or colon at the end of str is
a mistake/breaks formatting.

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: bpf: test_sockmap: handle file creation failures gracefully</title>
<updated>2019-11-29T06:40:29Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>jakub.kicinski@netronome.com</email>
</author>
<published>2019-11-27T20:16:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4b67c515036313f3c3ecba3cb2babb9cbddb3f85'/>
<id>urn:sha1:4b67c515036313f3c3ecba3cb2babb9cbddb3f85</id>
<content type='text'>
test_sockmap creates a temporary file to use for sendpage.
this may fail for various reasons. Handle the error rather
than segfault.

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
Reviewed-by: Simon Horman &lt;simon.horman@netronome.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: bpf: remove duplicated include</title>
<updated>2019-01-28T23:09:26Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-01-25T02:46:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdd7b40642582f5130ea5ec20432175a70c8933e'/>
<id>urn:sha1:cdd7b40642582f5130ea5ec20432175a70c8933e</id>
<content type='text'>
Remove duplicated include.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Acked-by: Song Liu &lt;songliubraving@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: test_sockmap, add options for msg_pop_data() helper</title>
<updated>2018-11-28T21:07:57Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-11-26T22:16:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1ade9abadfca0250c8256bb222a1cd5cc5fa8bbc'/>
<id>urn:sha1:1ade9abadfca0250c8256bb222a1cd5cc5fa8bbc</id>
<content type='text'>
Similar to msg_pull_data and msg_push_data add a set of options to
have msg_pop_data() exercised.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: test_sockmap add options to use msg_push_data</title>
<updated>2018-10-20T19:37:12Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-10-20T02:56:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=84fbfe026acaa6d91e2f71f1635992bf472e2496'/>
<id>urn:sha1:84fbfe026acaa6d91e2f71f1635992bf472e2496</id>
<content type='text'>
Add options to run msg_push_data, this patch creates two more flags
in test_sockmap that can be used to specify the offset and length
of bytes to be added. The new options are --txmsg_start_push to
specify where bytes should be inserted and --txmsg_end_push to
specify how many bytes. This is analagous to the options that are
used to pull data, --txmsg_start and --txmsg_end.

In addition to adding the options tests are added to the test
suit to run the tests similar to what was done for msg_pull_data.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: sockmap, add msg_peek tests to test_sockmap</title>
<updated>2018-10-17T00:30:32Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-10-16T18:08:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=753fb2ee09345e0730e610b2ee3a01964fe22a63'/>
<id>urn:sha1:753fb2ee09345e0730e610b2ee3a01964fe22a63</id>
<content type='text'>
Add tests that do a MSG_PEEK recv followed by a regular receive to
test flag support.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf, tls: add tls header to tools infrastructure</title>
<updated>2018-10-16T15:10:01Z</updated>
<author>
<name>Daniel Borkmann</name>
<email>daniel@iogearbox.net</email>
</author>
<published>2018-10-16T13:59:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=421f4292f46e871cdcf8bdc3e6fdfcefe2e81a9d'/>
<id>urn:sha1:421f4292f46e871cdcf8bdc3e6fdfcefe2e81a9d</id>
<content type='text'>
Andrey reported a build error for the BPF kselftest suite when compiled on
a machine which does not have tls related header bits installed natively:

  test_sockmap.c:120:23: fatal error: linux/tls.h: No such file or directory
   #include &lt;linux/tls.h&gt;
                         ^
  compilation terminated.

Fix it by adding the header to the tools include infrastructure and add
definitions such as SOL_TLS that could potentially be missing.

Fixes: e9dd904708c4 ("bpf: add tls support for testing in test_sockmap")
Reported-by: Andrey Ignatov &lt;rdna@fb.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: add tls support for testing in test_sockmap</title>
<updated>2018-10-15T19:23:19Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-10-13T00:46:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e9dd904708c463ff57d019f4482c48d057fa4d7e'/>
<id>urn:sha1:e9dd904708c463ff57d019f4482c48d057fa4d7e</id>
<content type='text'>
This adds a --ktls option to test_sockmap in order to enable the
combination of ktls and sockmap to run, which makes for another
batch of 648 test cases for both in combination.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: use --cgroup in test_suite if supplied</title>
<updated>2018-08-29T15:29:55Z</updated>
<author>
<name>John Fastabend</name>
<email>john.fastabend@gmail.com</email>
</author>
<published>2018-08-28T16:10:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7d2c6cfc5411207f1094e7ca5e63e711dc76d1ff'/>
<id>urn:sha1:7d2c6cfc5411207f1094e7ca5e63e711dc76d1ff</id>
<content type='text'>
If the user supplies a --cgroup value in the arguments when running
the test_suite go ahaead and run the self tests there. I use this
to test with multiple cgroup users.

Signed-off-by: John Fastabend &lt;john.fastabend@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
</feed>
