629 Commits

Author SHA1 Message Date
Sergio Cazzolato
cc322acd3b tests: new set of nested tests for uc22 (#11718)
* New set of nested tests for uc22

This change includes:
 . Updates for the tests to support uc22
 . New models for uc22
 . New snap needed to run uc22 tests

* New support for system user asserts

Still missing to sign the assert for uc22

* fix shellcheck

* Fixing style shellchecks

* Fix shell check on tests

* New fix for shell check

* Created the auto-import.assert for developer1

* Generate the auto-import.assert for the developer1

* Fixed error on tests

* Fix interfaces-custom-devices test

* Update variable names
2022-05-07 12:04:57 -03:00
Sergio Cazzolato
70fb9127db tests: run failed tests on nested suite (#11737)
* Allow run failed tests on google-nested backend

This change is to allow running just the failed tests for google-nested
backend when the "Run failed" tag is set

* Make sure no new lines in results

* fix core22-basic to deal with recovery-keys change

* filter by backend to make sure external subtests are not included

* Fix core22-basic disabling recovery keys checks

* Fix recovery keys for core20-basic test now

* Update the key for nested cache
2022-05-06 14:53:11 -03:00
Maciej Borzecki
74e242386d tests/nested/core/core20-basic: fix the test to execute the right command
It's --show-keys, so the test was not really exercising the API operation as a
non-root user.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-04-28 16:02:03 +02:00
Maciej Borzecki
09f072dc6f tests: more tweaks for the tests
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-04-28 16:01:13 +02:00
Maciej Borzecki
2216674a5f tests: drop reocvery and reinstall keys from spread tests
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-04-28 13:07:37 +02:00
Sergio Cazzolato
c84fc80f68 Wait until device is initialized and then ask for the serial 2022-04-22 13:48:49 -03:00
Sergio Cazzolato
b7a5647c8e Fix failing tests 2022-04-22 08:56:58 -03:00
Sergio Cazzolato
89b71afbbf Adding initial set of tests to uc22 nested execution
This is the initial set of tests to include on nested executions
2022-04-21 18:26:33 -03:00
Sergio Cazzolato
f6f7badcde tests: Initial changes to run nested tests on uc22
* Initial changes to run nested tests on uc22

New nested tests configuration for uc22 and libraries updated.
New basic nested test for uc22 on

* Updated the build_initramfs_kernel_snap

also other minor changes included

* Minor fixes for build_initramfs_kernel_snap

* Using OVMF_CODE and OVMF_VARS from focal ovmf package

As in Jammy there is just the _4M got the snakeoil vars, the idea is to
reuse the once available in focal.

* Adding uc22 to nested tests execution

* Fix preseed nested test to make it work for jammy

* Update how kernel is re-packed

* Fix the prepare.sh script

* send the parameters to the new modify-the-tool function

* Fix how modify_the_tool is called

* Use uc20_build_initramfs_kernel_snap from master
2022-04-21 14:35:16 +02:00
Maciej Borzecki
7984c1669b Merge pull request #11688 from bboozzoo/bboozzoo/uc20-early-config-disable-netplan
tests/nested/manual/core20-early-config: disable netplan checks
2022-04-20 08:25:58 +02:00
Michael Vogt
f045e881eb Merge pull request #11606 from bboozzoo/bboozzoo/factory-reset-spread-no-encrypt
bootloader/assets, tests: add factory-reset mode, test non-encrypted factory-reset
2022-04-19 15:20:48 +02:00
Maciej Borzecki
f7988df554 tests/nested/manual/core20-early-config: disable netplan checks
The checks cannot execute successfully due to
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1967084

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-04-19 13:50:16 +02:00
Maciej Borzecki
686670920e tests/nested/core/core20-factory-reset: check factory reset log
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-04-15 11:49:23 +02:00
Maciej Borzecki
43ea069460 tests/nested/core/core20-factory-reset: NESTED_IMAGE_ID shouldn't be needed
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-04-15 11:48:43 +02:00
Paweł Stołowski
bb52a67991 Renaming related to inclusive language. 2022-04-14 14:30:47 +02:00
Maciej Borzecki
b9b85c74c6 tests/nested/core/core20-factory-reset: set image ID
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-04-12 10:22:25 +02:00
Michael Vogt
8675d08cdb tests: tiny cosmetic tweaks (thanks to Alberto) 2022-04-11 15:32:23 +02:00
Sergio Cazzolato
f3f67ed63b Fix the change done for netplan-cfg test 2022-04-08 17:40:15 -03:00
Sergio Cazzolato
f20b285547 Adding comment with lp link 2022-04-08 16:59:18 -03:00
Sergio Cazzolato
45abca0c3d Disable netplan-cfg test
This test is failingin uc20

It fails when doing:
snap set system system.network.netplan.network.bridges.br54.dhcp4=true
with error:
Could not set hostname: Permission denied
2022-04-08 15:52:29 -03:00
Maciej Borzecki
1be78c7ce0 tests/nested/core/core20-factory-reset: verify factory reset
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-03-30 13:53:06 +02:00
Sergio Cazzolato
6541efe9d6 Adapt nested tests to use tests.nested tool (#11564)
Update some tests to use the new tool and also the new variables to skip
kernel/gadget/base repack
2022-03-23 15:06:34 -03:00
Sergio Cazzolato
2707776c73 tests: fix the nested remodel tests (#11539)
* Fix the nested remodel tests

Currently the test is failing in core 18 because the core18 snap is
being autore-freshed breaking the connection with the host machine.

The idea of the change is to use the tests.nested tool which is widely
used on nested tests and repacks the core18 snap avoiding
auto-refreshes.

This change also includes a new wait-for event used to wait until the
device is initialized and has a serial. By doing that it is not needed
anymore to source the nested.sh lib.

* Change call to nested_get_boot_id by tests.nested boot-id

* Same change on boot id for test remodel-cross-store

* Update to use the use the gadget snap from the store

* Minor fixes to use the env vars to download the gadget and kernel snaps

* Allow skip repack for kernel, base and gadget

This is needed to make remodel tests work. This is also neede for other
tests to be able to use kernel and gadget from the store

* Improve cleanup of tests

* Removing snaps installed in other tests
2022-03-23 07:10:14 -03:00
Michael Vogt
d86ef5f21e Merge pull request #11407 from anonymouse64/bugfix/vuln-spread-tests-tweaks
tests: small adjustments to fix vuln spread tests
2022-03-04 09:26:10 +01:00
Maciej Borzecki
c63da6262a tests/nested/core/core20-reinstall-partitions: update test summary
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2022-03-03 10:25:17 +01:00