File: task.yaml

package info (click to toggle)
snapd 2.72-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 80,412 kB
  • sloc: sh: 16,506; ansic: 16,211; python: 11,213; makefile: 1,919; exp: 190; awk: 58; xml: 22
file content (34 lines) | stat: -rw-r--r-- 1,130 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
summary: Update command line from gadget in secure boot

details: |
  Check that Ubuntu Core image boots properly with updated command line
  through gadget in secure boot

systems: [ubuntu-2*]

environment:
  NESTED_ENABLE_SECURE_BOOT: true

prepare: |
  CHANNEL="$(tests.nested show version)/stable"
  snap download --basename=pc --channel="${CHANNEL}" pc
  unsquashfs -d pc pc.snap
  KEY_NAME=$(tests.nested download snakeoil-key)
  SNAKEOIL_KEY="$PWD/$KEY_NAME.key"
  SNAKEOIL_CERT="$PWD/$KEY_NAME.pem"
  tests.nested secboot-sign file pc/shim.efi.signed "$SNAKEOIL_KEY" "$SNAKEOIL_CERT"
  tests.nested secboot-sign file pc/grubx64.efi "$SNAKEOIL_KEY" "$SNAKEOIL_CERT"
  snap pack pc "$(tests.nested get extra-snaps-path)"

  echo "some_useless_parameter" >>pc/cmdline.extra
  snap pack pc --filename=pc_2.snap

  tests.nested build-image core
  tests.nested create-vm core

execute: |
  remote.push pc_2.snap
  boot_id="$(tests.nested boot-id)"
  remote.exec "sudo snap install --dangerous pc_2.snap" || [ "$?" -eq 255 ]
  remote.wait-for reboot "${boot_id}"
  remote.exec "MATCH '.*some_useless_parameter.*' </proc/cmdline"