Commit Graph

17 Commits

Author SHA1 Message Date
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
Sergio Cazzolato
59659cc621 Moving functions to tests.nested tool
The change includes:
 . Many functions added to tests.nested tool
	. is-nested
        . get
    	. boot-id
        . secboot-sign
 . Restructured the tests.nested tool command to simplify the cli
        . exec
        . vm (before was start-vm, stop-vm, and remove-vm)

The tests were update to use the tests.nested tool instead of the
nested.sh helper.
Next step is to reorganize the helper in 2 parts.
2021-09-06 15:45:49 -03:00
Michael Vogt
0e02442d85 Merge remote-tracking branch 'upstream/master' into snap-debug-timings-2 2021-08-05 10:01:44 +02:00
Michael Vogt
72f080a6a7 tests: fix incorrect match (thanks to Samuele) 2021-08-05 10:01:12 +02:00
Michael Vogt
a30fbe7745 devicestate: add snap debug timings --ensure=installed
Similar to how we have `--ensure=seed` this commit adds support
to have `snap debug timings --ensure=install-system`.
2021-07-14 19:21:16 +02:00
Sergio Cazzolato
2c4521a8e3 Merge remote-tracking branch 'upstream/master' into tests-add-nested-retry 2021-07-13 23:46:21 -03:00
Michael Vogt
3df1298203 devicestate: add support to save timings from install mode
* devicestate: add support to save timings from install mode

Using a quick and not super nice way to store debug timings of
the install to the ubuntu-data partition.

* devicestate: rework timing log writing (thanks to Samuele)

* devicestate: rework because we can not call into snapd when snapd tries to reboot

* devicestate: improve unit test

* devicestate: snap debug timings --ensure=seed needs to run on its own

* devicestate: write the logs *after* the timings so that any failure from the timing writing is captured

* devicestate: fix comment

* tests: remove silly debug output

* tests: test install-timings.txt.gz more

* devicestate: add extra \n after each debug change output

* devicestate: move state unlock into writeTimings() and skip the "seed" change, we get the info via "snap debug timings --ensure=seed"

* devicestate: add clear information what is happening in writeTimings (thanks to Maciej)

* devicestate: update test to latest code changes

* tests: remove stray newline
2021-07-13 22:41:32 +02:00
Sergio Cazzolato
e4049750fc Fix how retry command is executed on tested tests 2021-07-12 13:36:31 -03:00
Sergio Cazzolato
bb69bde2e7 Merge remote-tracking branch 'upstream/master' into tests-add-nested-retry 2021-07-12 13:07:02 -03:00
Sergio Cazzolato
f31a96b2d1 Moving nested_exec to nested.tests exec
This change adds a new command to nested.tests tool
2021-07-08 09:52:16 -03:00
Sergio Cazzolato
4d7efd18b1 Add new preparation for tools and new nested retry mode 2021-07-05 13:59:04 -03:00
Sergio Cazzolato
c781f541e3 Update using new retry with --env 2021-06-30 18:40:17 -03:00
Sergio Cazzolato
f0e349025c Using retry tool on nested systems
This change includes:
 . a new nested_retry command for nested tests
 . tests updates to start using the new command intead of a loop
 . replaced the existent retry functions using the new retry command
2021-06-15 16:05:33 -03:00
Sergio Cazzolato
46a2788c75 Update layout for tests - part 2
The change updates the layout of the tests following a proposed order
which should make the test easier to read and understand

The proposed order is:
summary
details

backends
systems

manual
priority
warn-timeout
kill-timeout

environment
prepare
restore
debug
execute
2021-04-08 18:05:54 -03:00
Sergio Cazzolato
c2e38d4544 Unifying the core20 nested suite with the core nested suite
This change includes:
. core20 and core nested suites are unified into core suite. This
avoids tests duplication
. Now the tpm, secboot and kvm variables have defaults which are used
through functions defined in nested.sh
 . By default the uc20 is build with secboot and tpm enabled.
 . By detauld uc16 and uc18 are not using neither secboot nor tpm
 . By default kvm is always used
. To define a different behaviour, the test needs to define the
variable in its environment.
2021-03-26 10:51:14 -03:00