Commit Graph

9 Commits

Author SHA1 Message Date
Simon Glass
3f133727bf test: Move disk images to persistent-data directory
It is annoying to have disk images in the source directory since it
clutters up the working space.

Remove cur_dir=True from DiskHelper calls so disk images are written to
the persistent-data directory instead.

Move scsi.img too (used by the bootstd tests) and mmc6.img (used by the
MBR tests.

Add a few comments as to where the images are used.

This keeps the source tree clean and puts disk images in the same place
as other test data.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-29 16:18:51 +00:00
Simon Glass
daa53f61a9 test: fs_helper: Support LUKS keyfile and master key
Add encrypt_keyfile and master_keyfile parameters to FsHelper and the
image setup functions. This allows creating encrypted test images using:

- A key file instead of a passphrase (encrypt_keyfile)
- A specific master key for pre-derived unlock testing (master_keyfile)

The keyfile takes precedence over passphrase when both are provided.
Also reduce Argon2 memory parameters to values suitable for U-Boot
testing.

These new features will allow use of a real TKey for trying out this
feature locally, as well as the emulated TKey for automated testing.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-08 05:22:18 -07:00
Simon Glass
b2e53c814d test: Switch mmc12 over to use argon2id
Use the more common argon2id algorithm for this disk so that we can test
the implementation.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-11-11 04:16:42 -07:00
Simon Glass
1dcfa2ecbb test: Shorten the encrypt_passphrase parameter for FsHelper
This is very long and the 'encrypt' part is implied by the passphrase.
Shorten it to just 'passphrase'.

Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-11-11 04:15:03 -07:00
Simon Glass
eb2ae89f55 luks: Create a disk image with LUKS2 encryption
Add a new mmc12 image which has a LUKS2-encrypted ext4 partition.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-24 21:02:11 +01:00
Simon Glass
838f9ce777 luks: Encrypt the mmc11 test image
Encrypt the ext4 partition in this image so that we can use it for
tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-24 20:12:40 +01:00
Simon Glass
31fd3d283e test/py: Support FDE with the extlinux image
Add a parameter to indicate the size of the root partition so that it
can have space for the LUTS metadata.

Move the import of gzip to the top of the file while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-10-24 08:47:38 +01:00
Simon Glass
ad59fee0e8 test: Add newlines at the end of the img functions
The functions which create images lack a newline at the end of the file.
Add one, for consistency.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-09-14 17:32:24 -06:00
Simon Glass
ceb47ebdd4 test: Create a common file for image utilities
Move mkdir_cond(), copy_partition(), and setup_extlinux_image() to a
common module which can be used by the rest of the image-creation code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-17 15:32:25 -06:00