summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2021-10-05 13:07:56 +0300
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2021-10-14 09:45:17 +0300
commitc42a056ba67b121c40b67d332ce9489077bece36 (patch)
treeeba53868e90660b42cdab6381d75d07b7918eff3
parent200203f64783b84aef8f9925619ba2faa2483780 (diff)
downloadlava-sessions-master.tar.gz
Enable SR-IR in QEMU and x86HEADmaster
some old script cleanups as well Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r--execs/sr-ir.yaml19
-rw-r--r--execs/ubuntu-build-essential.yaml2
-rw-r--r--lng-generator-02/ixgbe-ubuntu-17.10.yaml84
-rwxr-xr-xscripts/build-u-boot.sh15
-rwxr-xr-xscripts/sr-ir.sh90
-rw-r--r--sr-ir/sr-ir-qemu.yaml39
-rw-r--r--sr-ir/sr-ir-ubuntu-21.04.yaml73
7 files changed, 238 insertions, 84 deletions
diff --git a/execs/sr-ir.yaml b/execs/sr-ir.yaml
new file mode 100644
index 0000000..64d4200
--- /dev/null
+++ b/execs/sr-ir.yaml
@@ -0,0 +1,19 @@
+metadata:
+ name: SR-IR
+ format: "Lava-Test-Shell Test Definition 1.0"
+ description: "Run SystemReady-IR"
+ version: 1.0
+
+
+install:
+ deps:
+ - util-linux
+ - tmux
+ - python3
+ - python3-yaml
+ - python3-packaging
+
+run:
+ steps:
+ - echo "QEMU SystemReady-IR"
+ - ./scripts/sr-ir.sh
diff --git a/execs/ubuntu-build-essential.yaml b/execs/ubuntu-build-essential.yaml
index ce1ff60..fb14ebb 100644
--- a/execs/ubuntu-build-essential.yaml
+++ b/execs/ubuntu-build-essential.yaml
@@ -42,3 +42,5 @@ install:
- lsb-release
- net-tools
- tcpdump
+ - wget
+ - qemu-system-arm
diff --git a/lng-generator-02/ixgbe-ubuntu-17.10.yaml b/lng-generator-02/ixgbe-ubuntu-17.10.yaml
deleted file mode 100644
index cf32328..0000000
--- a/lng-generator-02/ixgbe-ubuntu-17.10.yaml
+++ /dev/null
@@ -1,84 +0,0 @@
-job_name: ubuntu-17.10-hacking-session-ixgbe
-
-timeouts:
- job:
- minutes: 900
- action:
- minutes: 20
- connection:
- minutes: 20
-
-visibility: public
-priority: medium
-device_type: x86
-
-protocols:
- lava-multinode:
- roles:
- mdev_host:
- device_type: x86
- count: 1
- context:
- extra_kernel_args: default_hugepagesz=2M hugepagesz=1G hugepages=1 hugepagesz=2M hugepages=1024 intel_iommu=on iommu=on
- lava-vland:
- mdev_host:
- vlan_one:
- tags:
- - 10G
-actions:
-- deploy:
- role:
- - mdev_host
- timeout:
- minutes: 10
- to: tftp
-
- kernel:
- url: http://people.linaro.org/~ilias.apalodimas/images/ubuntu-17.10/vmlinuz-4.18-rc6-net-next
- nfsrootfs:
- url: http://people.linaro.org/~ilias.apalodimas/images/ubuntu-17.10/binary-4.13.0-46.tar.xz
- compression: xz
- prefix: binary/
- modules:
- url: http://people.linaro.org/~ilias.apalodimas/images/ubuntu-17.10/modules.4.18-rc6-net-next.tar.xz
- compression: xz
- ramdisk:
- url: http://people.linaro.org/~ilias.apalodimas/images/ubuntu-17.10/initrd.img-4.13.0-46-generic
- compression: gz
- os: debian
- #protocols:
- #lava-vland:
- #- action: lava-vland-overlay
- #request: deploy_vlans
-
-- boot:
- role:
- - mdev_host
- timeout:
- minutes: 15
- method: ipxe
- commands: nfs
- parameters:
- shutdown-message: "reboot: Restarting system"
- prompts:
- - 'root@lng(.*)'
-
-- test:
- role:
- - mdev_host
- timeout:
- minutes: 900
-
- definitions:
- - repository: https://git.linaro.org/people/ilias.apalodimas/lava-sessions.git/
- from: git
- path: execs/ubuntu-build-essential.yaml
- name: ubuntu-build-essential
-
- - repository: https://git.linaro.org/lava-team/hacking-session.git
- from: git
- path: hacking-session-debian.yaml
- name: hacking-server
- parameters:
- "IRC_USER": "apalos"
- "PUB_KEY": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC6q2BgQb4F3WXT89p5XoPe2J32DHKaeQAL/IHWKYFKoHnvMSVLIODBciG9CWQ+FrYO67tOlc7IaxZqhSOK2zXNID4oqIiM5O/iAlW4LXdNtSNQUR2B+528/FKt+10ZyKH0C7zV31lEWjVfv7CsNVRumOv2bwmYoQH3kCxpwyYhGkdTLdnpXGEaSLp2YDUrgDzi/+j5CH2tkJWaWXl48qXHPUuJf89nbcT52kMwHUSV/c5XHb5kVjpIpUaapgemy9HfBVi8f4T1paFU6BPymJaF43a3vIXm3byVkBi4nZDUgPFX3HL1v7jNypVbQyK1r5LO+BCPu6cyfcjXO9W0EzNV2tdmEEAHYqgBvMiHBQ5+zcvFBHztzs5xIIBA5fsYFPe2xRmUz9Ah15NcFbXlPl/QlRCoVGMC/RztMDDdbv+/mAh5Kaqas8FDRJyyebDIu/TKAajekTq6wdifjcTZbFFO/fx3UJnwt9QKArYJfcfqeRyNDQ2cdAWPBU4cwAa4dr2Txxl43N7DnT1qe3Dd9Yg0P3W03Lr7jR2JBFlGlIFhpaQSO/kAt07PTNj98P+3L/UfeVZrYR9py+WolYkgTZOvb7BJ2JfD7RwIhHpfez8m2ddoBhBbfufm1mepYBmHxD8jqzdiANu+j9a5hsQM+2MAS6GrrDVMn5e3FYa/PtKsbQ== ilias.apalodimas@linaro.org"
diff --git a/scripts/build-u-boot.sh b/scripts/build-u-boot.sh
new file mode 100755
index 0000000..58f6bf0
--- /dev/null
+++ b/scripts/build-u-boot.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+. scripts/lava-common.sh
+
+U_BOOT_REPO='https://github.com/u-boot/u-boot.git'
+CROSS_REPO='https://snapshots.linaro.org/gnu-toolchain/11.0-2021.03-1/aarch64-linux-gnu/gcc-linaro-11.0.1-2021.03-x86_64_aarch64-linux-gnu.tar.xz'
+
+wget "$CROSS_REPO"
+tar xf gcc-linaro-11.0.1-2021.03-x86_64_aarch64-linux-gnu.tar.xz
+export PATH="gcc-linaro-11.0.1-2021.03-x86_64_aarch64-linux-gnu:$PATH"
+
+git clone "$U_BOOT_REPO" --depth 1 && pushd u-boot &&
+ git checkout master && make qemu_arm64_defconfig && \
+ CROSS_COMPILE=../gcc-linaro-11.0.1-2021.03-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- make -j $(nproc)
+
+
diff --git a/scripts/sr-ir.sh b/scripts/sr-ir.sh
new file mode 100755
index 0000000..5cc6e73
--- /dev/null
+++ b/scripts/sr-ir.sh
@@ -0,0 +1,90 @@
+#!/bin/bash
+. scripts/lava-common.sh
+
+# urls
+acs_img='ir_acs_live_image.img'
+acs_url='https://people.linaro.org/~ilias.apalodimas/qemu/debian/'"$acs_img"
+post_url='https://archive.validation.linaro.org/artifacts/team/systemready/'
+
+# final log files
+log_file_part='/media/acs_results/sct_results/Overall/Summary'
+ekl="$log_file_part"'.ekl'
+log="$log_file_part"'.log'
+
+wget "$acs_url"
+wget https://people.linaro.org/~ilias.apalodimas/images/ubuntu-21.04/variables.img
+# FIXME compile this from source
+wget https://people.linaro.org/~ilias.apalodimas/qemu/debian/u-boot.bin
+
+# Ordering matters here keep variables.img first
+tmux new-session -d -s qemu \
+ "qemu-system-aarch64 \
+ -bios u-boot.bin \
+ -machine virt \
+ -cpu cortex-a57 -m 4G \
+ -nographic -no-acpi \
+ -drive id=disk0,file=variables.img,if=none,format=raw \
+ -device virtio-blk-device,drive=disk0 \
+ -drive id=disk1,file=$acs_img,if=none,format=raw \
+ -device virtio-blk-device,drive=disk1"
+
+echo '########################################'
+echo '# Checking QEMU ACS for completion ... #'
+echo '########################################'
+
+part=$(losetup -f -P -r --show $acs_img)'p2'
+[ -z "$part" ] && lava_result 'MOUNT_LOOPBACK' 'FAILED' 'yes'
+
+el=0
+while true; do
+ sudo mount "$part" /media > /dev/null 2>&1
+ # Since there's no indication in SCT, grep for a very late entry in FWTS
+ # logs (FWTS executes after SCT)
+ stop_compl=$(grep 'Other failures' /media/acs_results/fwts/FWTSResults.log 2>/dev/null)
+ [ -n "$stop_compl" ] && echo "Found SCT logs. Parsing..." && break
+ stop_qemu=$(pidof qemu-system-aarch64)
+ [ -z "$stop_qemu" ] && lava_result 'QEMU_PROCESS' 'FAILED' 'yes' && break
+
+ sudo umount /media > /dev/null 2>&1
+ echo "Test running for $((el/60)) minutes ..."
+ sleep 120
+ el=$((el+120))
+done
+
+#git clone --depth=1 https://gitlab.arm.com/systemready/edk2-test-parser
+git clone --branch vincent/master https://gitlab.arm.com/systemready/edk2-test-parser
+cd edk2-test-parser
+./parser.py "$ekl" \
+ /media/acs_results/sct_results/Sequence/EBBR.seq \
+ --filter "x['result'] in ['DROPPED', 'FAILURE', 'WARNING']" --uniq \
+ --fields 'count,result,name' --print
+
+# Get the key
+lava_test_dir="$(find /lava-* -maxdepth 0 -type d | grep -E '^/lava-[0-9]+' 2>/dev/null | sort | tail -1)"
+[ -n "$lava_test_dir" ] && . $lava_test_dir/secrets
+
+# store files
+ekl=$(curl -F "path=@$ekl" -F "token=$API_KEY" "$post_url")
+log=$(curl -F "path=@$log" -F "token=$API_KEY" "$post_url")
+final_dir=$(echo $ekl | awk 'BEGIN{FS=OFS="/"}NF--')
+final_dir="$final_dir"'/'
+
+# used for prints
+title='Download Logs'
+url_num_char=${#final_dir}
+title_num_char=${#title}
+
+# pretty print logs location
+printc=$(printf '%*s' "$url_num_char" | tr ' ' '#')
+start=$(((url_num_char-title_num_char)/2))
+echo "$printc" | awk -v start="$start" \
+ -v rep="$title_num_char" \
+ -v title="$title" \
+ '{target=substr($0,0,rep); gsub(/#############/,title,target); \
+ trail=substr($0,0,start)
+ print trail target trail}'
+echo "$final_dir"
+echo "$printc"
+
+sudo umount /media > /dev/null 2>&1
+sudo losetup -D > /dev/null 2>&1
diff --git a/sr-ir/sr-ir-qemu.yaml b/sr-ir/sr-ir-qemu.yaml
new file mode 100644
index 0000000..0209130
--- /dev/null
+++ b/sr-ir/sr-ir-qemu.yaml
@@ -0,0 +1,39 @@
+device_type: qemu
+job_name: QEMU SR-IR aarch64
+timeouts:
+ job:
+ minutes: 1200
+ action:
+ minutes: 1200
+ connection:
+ minutes: 2
+visibility: public
+context:
+ arch: arm64
+ machine: virt,gic-version=3
+ cpu: cortex-a72
+ guestfs_interface: virtio
+ netdevice: user
+actions:
+- deploy:
+ namespace: target
+ timeout:
+ minutes: 15
+ to: tmpfs
+ images:
+ acs:
+ image_arg: -drive id=disk0,file={acs},if=none,format=raw -device virtio-blk-device,drive=disk0
+ -nographic -nographic -no-acpi -m 4G -smp 2
+ url: https://people.linaro.org/~ilias.apalodimas/qemu/debian/ir_acs_live_image.img
+ firmware:
+ image_arg: -bios {firmware}
+ url: https://people.linaro.org/~ilias.apalodimas/qemu/debian/u-boot.bin
+ os: oe
+- boot:
+ namespace: target
+ timeout:
+ minutes: 1200
+ method: qemu
+ media: tmpfs
+ prompts:
+ - '# ~'
diff --git a/sr-ir/sr-ir-ubuntu-21.04.yaml b/sr-ir/sr-ir-ubuntu-21.04.yaml
new file mode 100644
index 0000000..127c330
--- /dev/null
+++ b/sr-ir/sr-ir-ubuntu-21.04.yaml
@@ -0,0 +1,73 @@
+job_name: SR-IR x86_64
+
+timeouts:
+ job:
+ minutes: 1200
+ action:
+ minutes: 1200
+ connection:
+ minutes: 20
+
+visibility: public
+priority: medium
+device_type: x86
+
+actions:
+- deploy:
+ role:
+ - target
+ timeout:
+ minutes: 10
+ to: tftp
+ kernel:
+ url: http://people.linaro.org/~ilias.apalodimas/images/ubuntu-21.04/vmlinuz-5.11.0-37-generic
+ nfsrootfs:
+ #url: https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-amd64-root.tar.xz
+ url: http://people.linaro.org/~ilias.apalodimas/images/ubuntu-21.04/binary.tar.bz2
+ prefix: binary/
+ compression: bz2
+ ramdisk:
+ url: http://people.linaro.org/~ilias.apalodimas/images/ubuntu-21.04/initrd.img.gz
+ compression: gz
+ os: debian
+
+- boot:
+ role:
+ - target
+ timeout:
+ minutes: 45
+ method: ipxe
+ commands: nfs
+ parameters:
+ shutdown-message: "reboot: Restarting system"
+ auto_login:
+ login_prompt: 'login:'
+ username: linaro
+ password_prompt: 'Password:'
+ password: linaro
+ login_commands:
+ - sudo su -
+ prompts:
+ - root@(.*)
+ - linaro@(.*)
+
+- test:
+ role:
+ - target
+ timeout:
+ minutes: 1200
+
+ definitions:
+ - repository: https://git.linaro.org/people/ilias.apalodimas/lava-sessions.git/
+ from: git
+ path: execs/ubuntu-build-essential.yaml
+ name: deps
+
+ - repository: https://git.linaro.org/people/ilias.apalodimas/lava-sessions.git/
+ from: git
+ path: execs/sr-ir.yaml
+ name: sr-ir
+
+secrets:
+ API_USER: ilias.apalodimas
+ API_KEY: 99560485eb934a96d4e18b4a20be2d84