<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/bpf/vmtest.sh, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-10-21T23:27:25Z</updated>
<entry>
<title>selftests/bpf: Update vmtests.sh to support aarch64</title>
<updated>2022-10-21T23:27:25Z</updated>
<author>
<name>Manu Bretelle</name>
<email>chantr4@gmail.com</email>
</author>
<published>2022-10-21T21:07:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=20776b72ae2a43311f82f48f7b78f484cc89e463'/>
<id>urn:sha1:20776b72ae2a43311f82f48f7b78f484cc89e463</id>
<content type='text'>
Add handling of aarch64 when setting QEMU options and provide the right
path to aarch64 kernel image.

Signed-off-by: Manu Bretelle &lt;chantr4@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20221021210701.728135-4-chantr4@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Fix vmtest.sh getopts optstring</title>
<updated>2022-08-09T20:30:02Z</updated>
<author>
<name>Daniel Xu</name>
<email>dxu@dxuuu.xyz</email>
</author>
<published>2022-08-09T17:11:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a7be0ab1eb1949f3564739784b4360e1233305f6'/>
<id>urn:sha1:a7be0ab1eb1949f3564739784b4360e1233305f6</id>
<content type='text'>
Before, you could see the following errors:

  $ ./vmtest.sh -j
  ./vmtest.sh: option requires an argument -- j
  ./vmtest.sh: line 357: OPTARG: unbound variable

  $ ./vmtest.sh -z
  ./vmtest.sh: illegal option -- z
  ./vmtest.sh: line 357: OPTARG: unbound variable

Fix by adding ':' as first character of optstring. Reason is that getopts
requires ':' as the first character for OPTARG to be set in the `?` and `:`
error cases.

Note that the ':' as the first character of the optstring switches getopts
to silent mode. The desire to run in this mode seems to have been there all
along, as the script takes care of reporting errors.

Signed-off-by: Daniel Xu &lt;dxu@dxuuu.xyz&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Daniel Müller &lt;deso@posteo.net&gt;
Link: https://lore.kernel.org/bpf/0f93b56198328b6b4da7b4cf4662d05c3edb5fd2.1660064925.git.dxu@dxuuu.xyz
</content>
</entry>
<entry>
<title>selftests/bpf: Fix vmtest.sh -h to not require root</title>
<updated>2022-08-09T20:28:48Z</updated>
<author>
<name>Daniel Xu</name>
<email>dxu@dxuuu.xyz</email>
</author>
<published>2022-08-09T17:11:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d020b2360b350b9f91b1769f9c84fe2d22f643db'/>
<id>urn:sha1:d020b2360b350b9f91b1769f9c84fe2d22f643db</id>
<content type='text'>
Set the exit trap only after argument parsing is done. This way argument
parse failure or `-h` will not require sudo.

Reasoning is that it's confusing that a help message would require root
access.

Signed-off-by: Daniel Xu &lt;dxu@dxuuu.xyz&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Daniel Müller &lt;deso@posteo.net&gt;
Link: https://lore.kernel.org/bpf/6a802aa37758e5a7e6aa5de294634f5518005e2b.1660064925.git.dxu@dxuuu.xyz
</content>
</entry>
<entry>
<title>selftests/bpf: Adjust vmtest.sh to use local kernel configuration</title>
<updated>2022-07-27T15:03:14Z</updated>
<author>
<name>Daniel Müller</name>
<email>deso@posteo.net</email>
</author>
<published>2022-07-27T00:11:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=40b09653b1977c9630f24c9ca17322d5b38f1ca5'/>
<id>urn:sha1:40b09653b1977c9630f24c9ca17322d5b38f1ca5</id>
<content type='text'>
So far the vmtest.sh script, which can be used as a convenient way to
run bpf selftests, has obtained the kernel config safe to use for
testing from the libbpf/libbpf GitHub repository [0].

Given that we now have included this configuration into this very
repository, we can just consume it from here as well, eliminating the
necessity of remote accesses.

With this change we adjust the logic in the script to use the
configuration from below tools/testing/selftests/bpf/configs/ instead
of pulling it over the network.

  [0] https://github.com/libbpf/libbpf

Signed-off-by: Daniel Müller &lt;deso@posteo.net&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Acked-by: Mykola Lysenko &lt;mykolal@fb.com&gt;
Link: https://lore.kernel.org/bpf/20220727001156.3553701-4-deso@posteo.net
</content>
</entry>
<entry>
<title>selftests/bpf: Fix vmtest.sh to launch smp vm.</title>
<updated>2022-02-17T18:56:18Z</updated>
<author>
<name>Yucong Sun</name>
<email>fallentree@fb.com</email>
</author>
<published>2022-02-17T15:52:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b38101c57acf9543ed7c4b0f43fd65ea27240772'/>
<id>urn:sha1:b38101c57acf9543ed7c4b0f43fd65ea27240772</id>
<content type='text'>
Fix typo in vmtest.sh to make sure it launch proper vm with 8 cpus.

Signed-off-by: Yucong Sun &lt;fallentree@fb.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20220217155212.2309672-1-fallentree@fb.com
</content>
</entry>
<entry>
<title>selftests/bpf: Correct the INDEX address in vmtest.sh</title>
<updated>2021-12-20T19:01:31Z</updated>
<author>
<name>Pu Lehui</name>
<email>pulehui@huawei.com</email>
</author>
<published>2021-12-20T05:08:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=426b87b111b0523f957354bc97ec7eb16e8be1e2'/>
<id>urn:sha1:426b87b111b0523f957354bc97ec7eb16e8be1e2</id>
<content type='text'>
Migration of vmtest to libbpf/ci will change the address
of INDEX in vmtest.sh, which will cause vmtest.sh to not
work due to the failure of rootfs fetching.

Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Tested-by: Lorenzo Fontana &lt;lorenzo.fontana@elastic.co&gt;
Link: https://lore.kernel.org/bpf/20211220050803.2670677-1-pulehui@huawei.com
</content>
</entry>
<entry>
<title>selfetests/bpf: Adapt vmtest.sh to s390 libbpf CI changes</title>
<updated>2021-11-18T17:57:04Z</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2021-11-18T11:52:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=29ad850a5cae84757bcd4c60e0d74232ef8c5157'/>
<id>urn:sha1:29ad850a5cae84757bcd4c60e0d74232ef8c5157</id>
<content type='text'>
[1] added s390 support to libbpf CI and added an ${ARCH} prefix to a
number of paths and identifiers in libbpf GitHub repo, which vmtest.sh
relies upon. Update these and make use of the new s390 support.

[1] https://github.com/libbpf/libbpf/pull/204

Co-developed-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Ilya Leoshkevich &lt;iii@linux.ibm.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20211118115225.1349726-1-iii@linux.ibm.com
</content>
</entry>
<entry>
<title>selfetests/bpf: Update vmtest.sh defaults</title>
<updated>2021-10-27T18:58:44Z</updated>
<author>
<name>Yucong Sun</name>
<email>sunyucong@gmail.com</email>
</author>
<published>2021-10-25T22:33:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=547208a386fa2066fa2d6d48bda145f78c38604f'/>
<id>urn:sha1:547208a386fa2066fa2d6d48bda145f78c38604f</id>
<content type='text'>
Increase memory to 4G, 8 SMP core with host cpu passthrough. This
make it run faster in parallel mode and more likely to succeed.

Signed-off-by: Yucong Sun &lt;sunyucong@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20211025223345.2136168-2-fallentree@fb.com
</content>
</entry>
<entry>
<title>selftests/bpf: Add an option for a debug shell in vmtest.sh</title>
<updated>2021-03-31T05:05:23Z</updated>
<author>
<name>KP Singh</name>
<email>kpsingh@kernel.org</email>
</author>
<published>2021-03-23T01:47:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=63f8af0fc34197a276674fa0d4d865aeff1f0172'/>
<id>urn:sha1:63f8af0fc34197a276674fa0d4d865aeff1f0172</id>
<content type='text'>
The newly introduced -s command line option starts an interactive shell.
If a command is specified, the shell is started after the command
finishes executing. It's useful to have a shell especially when
debugging failing tests or developing new tests.

Since the user may terminate the VM forcefully, an extra "sync" is added
after the execution of the command to persist any logs from the command
into the log file.

Signed-off-by: KP Singh &lt;kpsingh@kernel.org&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210323014752.3198283-1-kpsingh@kernel.org
</content>
</entry>
<entry>
<title>selftests/bpf: Propagate error code of the command to vmtest.sh</title>
<updated>2021-02-26T21:12:52Z</updated>
<author>
<name>KP Singh</name>
<email>kpsingh@google.com</email>
</author>
<published>2021-02-25T16:19:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2854436612c4d2606c9246ce2976ab6634276337'/>
<id>urn:sha1:2854436612c4d2606c9246ce2976ab6634276337</id>
<content type='text'>
When vmtest.sh ran a command in a VM, it did not record or propagate the
error code of the command. This made the script less "script-able". The
script now saves the error code of the said command in a file in the VM,
copies the file back to the host and (when available) uses this error
code instead of its own.

Signed-off-by: KP Singh &lt;kpsingh@google.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210225161947.1778590-1-kpsingh@kernel.org
</content>
</entry>
</feed>
