<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/test/py, branch v2023.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>test: avoid function name 'setup'</title>
<updated>2023-07-20T07:12:50+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2023-07-15T08:48:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4f399f277cd0116944642ea7246795678fcb495f'/>
<id>4f399f277cd0116944642ea7246795678fcb495f</id>
<content type='text'>
pytest 7.3.2 treats the function name 'setup' as a fixture [1].

This leads to errors like:

    TypeError: setup() missing 2 required positional arguments:
    'disk_img' and 'osindications'

Rename setup() to capsule_setup().

[1] How to run tests written for nose
    https://docs.pytest.org/en/7.3.x/how-to/nose.html

Fixes: 482ef90aeb4c ("test: efi_capsule: refactor efi_capsule test")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pytest 7.3.2 treats the function name 'setup' as a fixture [1].

This leads to errors like:

    TypeError: setup() missing 2 required positional arguments:
    'disk_img' and 'osindications'

Rename setup() to capsule_setup().

[1] How to run tests written for nose
    https://docs.pytest.org/en/7.3.x/how-to/nose.html

Fixes: 482ef90aeb4c ("test: efi_capsule: refactor efi_capsule test")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Fix exception when cleaning up skipped test</title>
<updated>2023-07-17T19:39:55+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2023-07-03T13:35:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8900ba1ad7cbe5ad143c39635e93f7c3b1d41460'/>
<id>8900ba1ad7cbe5ad143c39635e93f7c3b1d41460</id>
<content type='text'>
If test_cat and test_xxd cannot create the required file, the test will
be skipped, but this would result in an exception being raised in the
finally block because the file didn't exist to be cleaned up. This
caused the test to be marked as failed instead of skipped.

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If test_cat and test_xxd cannot create the required file, the test will
be skipped, but this would result in an exception being raised in the
finally block because the file didn't exist to be cleaned up. This
caused the test to be marked as failed instead of skipped.

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>expo: Add tests for the configuration editor</title>
<updated>2023-07-14T16:54:51+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-06-01T16:23:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=87c1a4130c30e9b1af5d76026f3cc93192eb5cb3'/>
<id>87c1a4130c30e9b1af5d76026f3cc93192eb5cb3</id>
<content type='text'>
Add some simple tests and a helpful script to make the configuration
editor easier to set up.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add some simple tests and a helpful script to make the configuration
editor easier to set up.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: Find leftovers after clean/mrproper</title>
<updated>2023-07-07T20:25:56+00:00</updated>
<author>
<name>Tobias Deiminger</name>
<email>tdmg@linutronix.de</email>
</author>
<published>2023-06-19T22:41:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=42c0e5bb054da1437fe847bfd4063768c08d39ca'/>
<id>42c0e5bb054da1437fe847bfd4063768c08d39ca</id>
<content type='text'>
Docs describe 'make clean' to delete most generated files, 'make
mrproper' to delete current configuration and all generated files. This
test tries to assert it.

Idea is to search remaining files by patterns in copies of the initial
out-of-source build, which has two advantages:
- looking in an out-of-source build dir allows to tell generated source
  code from committed source code
- copying is fast (compared to rebuilding each time) which allows to do
  a "world clean"

Signed-off-by: Tobias Deiminger &lt;tdmg@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Docs describe 'make clean' to delete most generated files, 'make
mrproper' to delete current configuration and all generated files. This
test tries to assert it.

Idea is to search remaining files by patterns in copies of the initial
out-of-source build, which has two advantages:
- looking in an out-of-source build dir allows to tell generated source
  code from committed source code
- copying is fast (compared to rebuilding each time) which allows to do
  a "world clean"

Signed-off-by: Tobias Deiminger &lt;tdmg@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'v2023.07-rc6' into next</title>
<updated>2023-07-05T15:28:55+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2023-07-05T15:28:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e80f4079b3a3db0961b73fa7a96e6c90242d8d25'/>
<id>e80f4079b3a3db0961b73fa7a96e6c90242d8d25</id>
<content type='text'>
Prepare v2023.07-rc6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare v2023.07-rc6
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Update requirements.txt for security issues</title>
<updated>2023-06-20T20:08:13+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2023-05-30T19:50:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b1574ddebd34fee83e4c11f9da54b52ba7198fa8'/>
<id>b1574ddebd34fee83e4c11f9da54b52ba7198fa8</id>
<content type='text'>
Per GitHub Dependabot:
- Use setuptools 65.5.1 to avoid some DoS issue
- Use requests 2.31.0 to avoid leaking some proxy information

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Tested-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Per GitHub Dependabot:
- Use setuptools 65.5.1 to avoid some DoS issue
- Use requests 2.31.0 to avoid leaking some proxy information

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
Tested-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: correct architecture in EFI FIT test</title>
<updated>2023-06-16T04:45:20+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2023-06-15T11:40:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0773e4d9d90ad7c955088b122e7319a1071813fd'/>
<id>0773e4d9d90ad7c955088b122e7319a1071813fd</id>
<content type='text'>
On arm64 the its we use to generate the test FIT image has

	arch = "arm";

We should use "arm64" here which is mapped to IH_ARCH_ARM64 via
uimage_arch[].

Fixes: 8391f955494e ("test/py: Create a test for launching UEFI binaries from FIT images")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On arm64 the its we use to generate the test FIT image has

	arch = "arm";

We should use "arm64" here which is mapped to IH_ARCH_ARM64 via
uimage_arch[].

Fixes: 8391f955494e ("test/py: Create a test for launching UEFI binaries from FIT images")
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'tpm-for_tom-13062023' of https://source.denx.de/u-boot/custodians/u-boot-tpm into next</title>
<updated>2023-06-13T17:14:49+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2023-06-13T17:14:49+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cb4fe56eca1109780e97c68329e6b71ef33bf0e6'/>
<id>cb4fe56eca1109780e97c68329e6b71ef33bf0e6</id>
<content type='text'>
tpm autostart
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tpm autostart
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: Account PCR updates properly during testing</title>
<updated>2023-06-13T05:51:07+00:00</updated>
<author>
<name>Ilias Apalodimas</name>
<email>ilias.apalodimas@linaro.org</email>
</author>
<published>2023-06-07T09:18:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=011f015540d788227a1a2d16dd6245120827bdec'/>
<id>011f015540d788227a1a2d16dd6245120827bdec</id>
<content type='text'>
Currently we only read the pcr updates once on test_tpm2_pcr_read().
It turns out that the tpm init sequence of force_init() which consists
of:
- tpm2 init
- tpm2 startup TPM2_SU_CLEAR
- tpm2 self_test full
- tpm2 clear TPM2_RH_LOCKOUT

also counts as an update.  Running this in the console verifies the
update bump
=&gt; tpm2 init
=&gt; tpm2 startup TPM2_SU_CLEAR
=&gt; tpm2 self_test full
=&gt; tpm pcr_read 10 $loadaddr
PCR #10 content (28 known updates):
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=&gt; tpm2 clear TPM2_RH_LOCKOUT
=&gt; tpm pcr_read 10 $loadaddr
PCR #10 content (29 known updates):
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=&gt;

With the recent changes of replacing 'tpm2 init' with 'tpm2 autostart'
we end up always running the full init.  The reason is 'tpm init'
returns -EBUSY if the tpm is already open, while 'tpm autostart' handles
ths gracefully and continues with the initialization.  It's worth noting
that this won't affect the device functionality at all since
retriggering the startup sequence and selftests has no side effects.

Instead of relying on the initial value, reread the 'known updates'
just before updating the PCR to ensure we read the correct values
before testing

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently we only read the pcr updates once on test_tpm2_pcr_read().
It turns out that the tpm init sequence of force_init() which consists
of:
- tpm2 init
- tpm2 startup TPM2_SU_CLEAR
- tpm2 self_test full
- tpm2 clear TPM2_RH_LOCKOUT

also counts as an update.  Running this in the console verifies the
update bump
=&gt; tpm2 init
=&gt; tpm2 startup TPM2_SU_CLEAR
=&gt; tpm2 self_test full
=&gt; tpm pcr_read 10 $loadaddr
PCR #10 content (28 known updates):
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=&gt; tpm2 clear TPM2_RH_LOCKOUT
=&gt; tpm pcr_read 10 $loadaddr
PCR #10 content (29 known updates):
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=&gt;

With the recent changes of replacing 'tpm2 init' with 'tpm2 autostart'
we end up always running the full init.  The reason is 'tpm init'
returns -EBUSY if the tpm is already open, while 'tpm autostart' handles
ths gracefully and continues with the initialization.  It's worth noting
that this won't affect the device functionality at all since
retriggering the startup sequence and selftests has no side effects.

Instead of relying on the initial value, reread the 'known updates'
just before updating the PCR to ensure we read the correct values
before testing

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/py: replace 'tpm2 init, startup, selftest' sequences</title>
<updated>2023-06-13T05:51:07+00:00</updated>
<author>
<name>Ilias Apalodimas</name>
<email>ilias.apalodimas@linaro.org</email>
</author>
<published>2023-06-07T09:18:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=789ed27842563a7a067ed0c5d2511d0e470b00c8'/>
<id>789ed27842563a7a067ed0c5d2511d0e470b00c8</id>
<content type='text'>
Instead of copy pasting the commands needed to start a TPM consisting
of:
- tpm init
- tpm startup TPM2_SU_CLEAR
- tpm2 self_test full
use the newly added 'autostart' which does the same thing and simplify
our python scripts

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of copy pasting the commands needed to start a TPM consisting
of:
- tpm init
- tpm startup TPM2_SU_CLEAR
- tpm2 self_test full
use the newly added 'autostart' which does the same thing and simplify
our python scripts

Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
