compatibility: 4
device:
  actions:
    boot:
      connections: {serial: null, ssh: null}
      methods:
        qemu:
          parameters:
            boot_options: {console: ttyAMA0 115200, ip: dhcp, mem: 1024M, root: /dev/vda2
                rw rootwait}
            command: qemu-system-aarch64
            extra: [-smp, 1]
            options: [-cpu cortex-a57, -machine virt, -nographic, '-net nic,model=virtio,macaddr=DE:AD:BE:EF:32:02
                -net tap', -m 1024, -monitor none]
        qemu-nfs:
          parameters:
            append: {console: ttyAMA0, ipargs: ip=dhcp, nfsrootargs: 'nfsroot={NFS_SERVER_IP}:{NFSROOTFS},tcp,hard,intr',
              root: /dev/nfs}
            boot_options: {console: ttyAMA0 115200, ip: dhcp, mem: 1024M, root: /dev/vda2
                rw rootwait}
            command: qemu-system-aarch64
            extra: [-smp, 1]
            options: [-cpu cortex-a57, -machine virt, -nographic, '-net nic,model=virtio,macaddr=DE:AD:BE:EF:32:02
                -net tap', -m 1024, -monitor none]
    deploy:
      methods:
        image:
          parameters:
            guest: {interface: ide, size: 512}
        nfs: null
  available_architectures: [arm64, arm, aarch64, amd64, x86_64, i386]
  constants:
    default-shell-prompt: 'lava-test: # '
    grub:
      error-messages: ['error: missing (.*) symbol.']
      interrupt-character: c
      interrupt-newline: false
      interrupt-prompt: for a command-line
    grub-efi:
      error-messages: [Undefined OpCode Exception PC at, Synchronous Exception at,
        'error: missing (.*) symbol.']
      interrupt-character: c
      interrupt-prompt: for a command-line
    ipxe:
      error-messages: [No configuration methods succeeded, Connection timed out]
      interrupt-prompt: Press Ctrl-B for the iPXE command line
      interrupt_ctrl_list: [b]
    kernel-start-message: Linux version [0-9]
    posix: {lava_test_results_dir: /lava-%s, lava_test_sh_cmd: /bin/sh, lava_test_shell_file: ~/.bashrc}
    shutdown-message: The system is going down for reboot NOW
    spawn_maxread: '4092'
    u-boot:
      error-messages: [Resetting CPU, Must RESET board to recover, TIMEOUT, Retry
          count exceeded, 'ERROR: The remote end did not respond in time.']
      final-message: Starting kernel
      interrupt-character: ' '
      interrupt-prompt: Hit any key to stop autoboot
      interrupt_ctrl_list: []
  power_state: 'off'
  timeouts:
    actions:
      apply-overlay-image: {minutes: 2}
      auto-login-action: {minutes: 2}
      boot-image-retry: {minutes: 2}
      boot-qemu-image: {minutes: 2}
      bootloader-action: {minutes: 3}
      bootloader-commands: {minutes: 3}
      bootloader-interrupt: {seconds: 30}
      bootloader-retry: {minutes: 3}
      dd-image: {minutes: 10}
      download-retry: {minutes: 5}
      flash-uboot-ums: {minutes: 20}
      http-download: {minutes: 5}
      lava-test-shell: {minutes: 3}
      nfs-deploy: {minutes: 10}
      power-off: {seconds: 10}
      u-boot-interrupt: {seconds: 30}
      uboot-action: {minutes: 3}
      uboot-retry: {minutes: 3}
      umount-retry: {seconds: 45}
    connections:
      auto-login-action: {minutes: 2}
      bootloader-commands: {seconds: 30}
      bootloader-interrupt: {seconds: 30}
      dd-image: {minutes: 10}
      lava-test-shell: {seconds: 10}
      u-boot-interrupt: {seconds: 30}
      uboot-retry: {seconds: 30}
job:
  actions:
  - deploy:
      images:
        initrd: {image_arg: '-initrd {initrd}', sha256sum: cbc85bccb90c230d9024c9e716a4c50a802588599fbceb2d37321e95b1975f42,
          url: 'http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/buster/arm64/2/initrd.img-4.16.0-2-arm64'}
        kernel: {image_arg: '-kernel {kernel} --append ''root=/dev/ram0 rw rootwait
            rootdelay=5 console=ttyAMA0,38400n8 init=/sbin/init''', sha256sum: a4e12a9b70f92248c220e1b092044c3f89274f43e13bf406578693f3eb610a1c,
          url: 'http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/buster/arm64/2/vmlinuz-4.16.0-2-arm64'}
      namespace: common
      timeout: {minutes: 5}
      to: tmpfs
  - boot:
      media: tmpfs
      method: qemu
      namespace: common
      prompts: [\(initramfs\)]
      timeout: {minutes: 2}
  compatibility: 0
  context:
    arch: arm64
    cpu: cortex-a57
    extra_options: [-smp, 1]
    machine: virt
    netdevice: user
  device_type: qemu
  dispatcher: {}
  env_dut: null
  job_name: qemu arm64 ramdisk
  metadata: {build-console: 'https://ci.linaro.org/view/lava-ci/job/lava-debian-buster-arm64/2/console',
    build-readme: 'http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/buster/arm64/2/debian-buster-arm64-readme.html',
    build-script: 'http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/buster/arm64/2/build-foreign-nfs.sh',
    job.original: 'http://example.com/scheduler/job/542', path: doc/v2/examples/test-jobs/qemu-kernel-standard-buster.yaml,
    source: 'https://git.linaro.org/lava-team/refactoring.git'}
  priority: medium
  timeouts:
    action: {minutes: 5}
    connection: {minutes: 3}
    job: {minutes: 15}
  visibility: public
pipeline:
- command_exception: &id001 !!str 'lava_common.exceptions.JobError'
  description: deploy images using guestfs
  level: '1'
  max_retries: 1
  name: deployimages
  pipeline:
  - command_exception: *id001
    description: download with retry
    key: initrd
    level: '1.1'
    max_retries: 3
    name: download-retry
    path: /var/lib/lava/dispatcher/tmp/543/deployimages-704bq_17
    pipeline:
    - command_exception: *id001
      decompress_command_map: {bz2: bunzip2, gz: gunzip, xz: unxz}
      description: use http to download the file
      key: initrd
      level: 1.1.1
      max_retries: 1
      name: http-download
      path: /var/lib/lava/dispatcher/tmp/543/deployimages-704bq_17/initrd
      section: deploy
      size: -1
      summary: http download
      timeout: {duration: 300, name: http-download}
      timeout_exception: &id002 !!str 'lava_common.exceptions.InfrastructureError'
      url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/buster/arm64/2/initrd.img-4.16.0-2-arm64
      valid: true
    section: deploy
    sleep: 1
    summary: download-retry
    timeout: {duration: 300, name: download-retry}
    timeout_exception: *id001
    uniquify: true
    valid: true
  - command_exception: *id001
    description: download with retry
    key: kernel
    level: '1.2'
    max_retries: 3
    name: download-retry
    path: /var/lib/lava/dispatcher/tmp/543/deployimages-704bq_17
    pipeline:
    - command_exception: *id001
      decompress_command_map: {bz2: bunzip2, gz: gunzip, xz: unxz}
      description: use http to download the file
      key: kernel
      level: 1.2.1
      max_retries: 1
      name: http-download
      path: /var/lib/lava/dispatcher/tmp/543/deployimages-704bq_17/kernel
      section: deploy
      size: -1
      summary: http download
      timeout: {duration: 300, name: http-download}
      timeout_exception: *id002
      url: http://images.validation.linaro.org/snapshots.linaro.org/components/lava/standard/debian/buster/arm64/2/vmlinuz-4.16.0-2-arm64
      valid: true
    section: deploy
    sleep: 1
    summary: download-retry
    timeout: {duration: 300, name: download-retry}
    timeout_exception: *id001
    uniquify: true
    valid: true
  section: deploy
  summary: deploy images
  timeout: {duration: 300, name: deployimages}
  timeout_exception: *id001
  valid: true
- command_exception: *id001
  description: boot image with retry
  level: '2'
  max_retries: 1
  name: boot-image-retry
  pipeline:
  - command_exception: *id001
    description: boot image using QEMU command line
    level: '2.1'
    max_retries: 1
    name: boot-qemu-image
    pipeline:
    - command_exception: *id001
      description: call qemu to boot the image
      level: 2.1.1
      max_retries: 1
      name: execute-qemu
      section: boot
      session_class: !!str 'lava_dispatcher.connections.serial.QemuSession'
      shell_class: !!str 'lava_dispatcher.shell.ShellCommand'
      summary: execute qemu to boot the image
      timeout: {duration: 120, name: execute-qemu}
      timeout_exception: *id001
      valid: true
    section: boot
    sleep: 1
    summary: boot QEMU image
    timeout: {duration: 120, name: boot-qemu-image}
    timeout_exception: *id001
    valid: true
  - booting: true
    check_prompt_characters_warning: The string '%s' does not look like a typical
      prompt and could match status messages instead. Please check the job log files
      and use a prompt string which matches the actual prompt string more closely.
    command_exception: *id001
    description: automatically login after boot using job parameters and checking
      for messages.
    level: '2.2'
    max_retries: 1
    name: auto-login-action
    section: boot
    summary: Auto-login after boot with support for kernel messages.
    timeout: {duration: 120, name: auto-login-action}
    timeout_exception: *id001
    valid: true
  section: boot
  sleep: 1
  summary: boot with retry
  timeout: {duration: 120, name: boot-image-retry}
  timeout_exception: *id001
  valid: true
- command_exception: *id001
  description: finish the process and cleanup
  level: '3'
  max_retries: 1
  name: finalize
  pipeline:
  - command_exception: *id001
    description: discontinue power to device
    level: '3.1'
    max_retries: 1
    name: power-off
    section: finalize
    summary: send power_off command
    timeout: {duration: 10, name: power-off}
    timeout_exception: *id002
    valid: true
  - command_exception: *id001
    description: Check for messages on all other namespaces
    duration: 1
    finalize: true
    level: '3.2'
    max_retries: 1
    name: read-feedback
    repeat: true
    section: finalize
    summary: Read from other namespaces
    timeout: {duration: 300, name: read-feedback}
    timeout_exception: *id001
    valid: true
  section: finalize
  summary: finalize the job
  timeout: {duration: 300, name: finalize}
  timeout_exception: *id001
  valid: true
