817 Commits

Author SHA1 Message Date
Valentin David
cc5dbce977 tests: add test installing uc20 in initrd 2023-06-14 21:42:45 +02:00
Alfonso Sánchez-Beato
675c816538 tests: add test to remodel from UC20 to UC22
Additionally, the new gadget uses the min-size feature.
2023-05-11 20:35:34 +02:00
Alfonso Sánchez-Beato
bd5ae8b0b7 tests/{lib,remodel-min-size}: add test to remodel to a gadget using min-size
Add test and artifacts to remodel to a new model assertion revision
that includes a different gadget which uses min-size.
2023-05-11 20:35:34 +02:00
Alfonso Sánchez-Beato
99b00638f0 tests/install-min-size: test gadget updates when using min-size
The test makes sure that when we have partitions in the gadget with
min-size we can still update partitions content.
2023-05-09 09:37:07 +02:00
Sergio Cazzolato
0078bb08f5 tests: support for ubuntu core 22 in arm architecture (#12791)
* Tests support for ubuntu core 22 in arm architecture

This change includes the bits needed to run ubuntu-core in arm devices
and also the nested tests.

A new backend is added google-nested-arm.
Changes in tests to support the new system are also included.

* skip removing test-snapd-arm-tools

this is not needed anymore as focal is not being supported

* Use host machine for arch

* tests fixes

* skip nested arm xecution in github workflow
2023-05-09 09:21:16 +02:00
Alfonso Sánchez-Beato
d44bac0805 tests/muinstaller-real: test with UBUNTU-SEED fs label 2023-04-28 23:16:40 +02:00
Michael Vogt
ec484217a2 many: remove all device-setup fde-setup code (#12618)
* many: remove all `device-setup` fde-setup code

When we initially worked on the inline-cryto-engine (ICE) code we
had a design based on the fde-setup hook that would return a
`device-setup` feature as a hint that ICE should be used. It
turned out this design was impractical and we moved to a much
better approach that got merged in
https://github.com/snapcore/snapd/pull/12589
and relies on support for ICE in the kernel and cryptsetup.

With that new approach all the code that was supporting the
`device-setup` approach can be removed now.

* daemon: consider again the fde-setup hook case

* client: consider the ICE encryption type

* osu/disks,kernel: remove device-unlock support as well

---------

Co-authored-by: Samuele Pedroni <pedronis@lucediurna.net>
2023-04-05 18:03:03 +02:00
Sergio Cazzolato
cfccc9a891 tests: replace the systemd.sh helper by the tests.systemd tool in tests/lib (#12663)
* Repleace the systemd.sh helper by the tests.systemd tool in tests/lib

This is the first part of the migration to start using the tests.systemd
tool instead of the systemd.sh helper

* Fix shellcheck issues

* move function to get active snapd units to state.sh

It is the only place where the function is used

* Update missing functions in nested.sh

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 1c8efb77e1..14aa43a405

14aa43a405 new feature to re-run failed spread tests (#39)
604cb782db Fix shellcheck in systemd tool
bfc71082c8 Update the tests.systemd to allow parameters waiting for service status
8a2d0a99df Adding quiet tool and removing set +-x from tests.pkgs
d90935d2a4 A comment explaining about the default values for wait-for
3232c5dba7 Add support for ubuntu 23.04
a7164fba07 remove fedora 35 support, add fedora 37 support
89b9eb5301 Update systems supported
92bb6a0664 Include snap-sufix in the snaps.name tool

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: 14aa43a405f344b056db4fec7aee78709c41959a

* use -n for tests.systemd wait-for-service

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 14aa43a405..162e93bd35

162e93bd35 update tests.systemd CLI options to be the same than retry command

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: 162e93bd356f202b68408d0391b34e93a4f98755

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 162e93bd35..01a2a83b4b

01a2a83b4b Update tests.systemd to have stop units as systemd.sh

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: 01a2a83b4b58262e13ca2578ac286a41b780fa7d

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 01a2a83b4b..9089ff5c02

9089ff5c02 Update tests to use the new tests.systemd stop-unit
44ecd5e56a Move tests.systemd stop-units to stop-unit

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: 9089ff5c02a1cf074a05fb7c58af93274f63a446

* Use the new tests.systemd stop-unit command

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 9089ff5c02..75e8a426a5

75e8a426a5 make sure the unit is removed in tests.systemd test

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: 75e8a426a59fb02ee74d5bb7c60c19403c9146a0

* Fix error in test muinstaller-real

the vm needs to be removed before creating a new one

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 75e8a426a5..63540b845a

63540b845a Fix error messages in remote pull and push

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: 63540b845a542ee0a71257e0a726a618201ebb5d

* update how stop is used in muinstaller-real nested test

* Squashed 'tests/lib/external/snapd-testing-tools/' changes from 63540b845a..e5ae22a5d4

e5ae22a5d4 systemd units can be overwritten

git-subtree-dir: tests/lib/external/snapd-testing-tools
git-subtree-split: e5ae22a5d42b55d6b33c3f692968e72c62a619dc
2023-04-04 23:02:29 -03:00
Ernest Lotter
7834290eeb tests/nested/manual/minimal-smoke: remove todo for documenting uc20 ubuntu core minimum requirements 2023-03-30 09:58:30 +02:00
Michael Vogt
7850ab3193 tests: add test to check that "foo-bar" kernel cmdlines work 2023-03-21 12:08:47 +01:00
Sergio Cazzolato
7ce005366d tests: update the tests to start using the new store-state tool (#12649)
* New store-state tool to replace the store.sh helper

This is the new store tool inclusing a new test.
Also it is included a network took

* Fix store-state test and tool

Based on errors found in test results

* Fix refresh test

That part of the restore was missing

* Testing missing functions for store-state

Commands included:
 make-snap-installable command with snap-id
 make-snap-installable command without snap-id
 init-fake-refreshes command

* Skip test in ubuntu 14.04
2023-03-15 10:27:07 -03:00
Sergio Cazzolato
a7984f0ed0 tests: reduce the time we wait for a service to became active (#12630)
* Reduce the time we wait for a service to became active

This is needed to make the nested tests fail faster when the nested-vm
service fails to start

* Increase the time we wait for service inactive in core20-install-mode-shutdown-via-hook
2023-03-13 07:32:57 -03:00
Sergio Cazzolato
67e693bf50 Merge pull request #12481 from sergiocazzolato/tests-update-nested-tests-again-p1
tests: improvements for nested tests
2023-03-09 21:54:03 -03:00
Sergio Cazzolato
b56d54ae45 Merge branch 'master' into tests-update-nested-tests-again-p1 2023-03-09 13:56:54 -03:00
Sergio Cazzolato
444ff31fcd Merge branch 'master' into tests-new-lxd-prepare-command 2023-03-09 13:56:33 -03:00
Alfonso Sánchez-Beato
0572c42991 tests/nested/manual/fde-on-classic: test appending kernel command
line arguments by using system options.
2023-03-08 17:24:06 +01:00
Sergio Cazzolato
5001aa1294 Merge branch 'master' into tests-update-nested-tests-again-p1 2023-03-08 08:53:16 -03:00
Sergio Cazzolato
01936913d7 Merge remote-tracking branch 'upstream/master' into tests-new-lxd-prepare-command 2023-03-08 08:52:39 -03:00
Valentin David
ebb3121141 tests/nested/manual/fde-on-classic: fix wrong gadget.yaml 2023-03-08 12:51:16 +01:00
Sergio Cazzolato
2a53d2deb2 Fix how params are exported in tests.nested 2023-03-07 13:51:08 -03:00
alfonsosanchezbeato
d5f47ca71f many: read system options when handling kernel command line (#12561)
* o/devicestate: read system options when handling kernel command line

Use the kernel command line options when building the kernel command
line.

* tests: add cmdline-option test

cmdline-option checks that we can change the kernel command line using
the kernel system options.

* overlord: make task keys for the update cmdline task constants

* o/devicestate: export CurrentGadgetInfo so it can be used from configcore

* o/configcore: validate kernel command line against allow list

* o/devicestate: use the full string when looking for the kernel command

line options.

* tests/nested/manual/cmdline-option: run remotely all commands

* overlord: copy strings instead of using constants for task keys

Until some better way is found.

* gadget,overlord: change checking allowed parameters to a filter function

* o/devicestate: filter out unallowed arguments when building the kernel cmdline

Filter arguments not allowed by the gadget.

* gadget: name return params in FilterKernelCmdline and add test cases

* overlord: address review comments

* gadget,overlord: address review comments
2023-03-07 17:48:17 +01:00
Michael Vogt
33274758ee tests: fix typo, fix missing newline 2023-03-06 10:58:38 +01:00
Michael Vogt
10d2e6b606 tests: also check log file for ICE usage 2023-03-06 10:58:38 +01:00
Michael Vogt
4ae9ef7fda tests: add nested test for fde-setup with ice support 2023-03-06 10:58:38 +01:00
Sergio Cazzolato
1c66ce3fc6 Merge remote-tracking branch 'upstream/master' into tests-update-nested-tests-again-p1 2023-03-02 10:44:16 -03:00