Merge ~fginther/+git/overlay-shiftfs-tests:fginther/riscv-skips into ~canonical-kernel-team/+git/overlay-shiftfs-tests:main

Proposed by Francis Ginther
Status: Merged
Merge reported by: Po-Hsu Lin
Merged at revision: 4255ec6ac6f2c4bce5f40723068850803cf33cb5
Proposed branch: ~fginther/+git/overlay-shiftfs-tests:fginther/riscv-skips
Merge into: ~canonical-kernel-team/+git/overlay-shiftfs-tests:main
Diff against target: 50 lines (+22/-0)
3 files modified
lib/check-riscv64.sh (+10/-0)
tests/ovl-map-files.sh (+6/-0)
tests/shiftfs-lxd.sh (+6/-0)
Reviewer Review Type Date Requested Status
Po-Hsu Lin Approve
Review via email: mp+448087@code.launchpad.net

Commit message

check-riscv64: Skip specific tests on riscv64 platforms

A couple of tests are not supported on riscv64 as they have dependencies
(zfs and a pyhton docker image) that are not yet available for riscv64.

Signed-off-by: Francis Ginther <email address hidden>

Description of the change

Found a few testcase issues specific to riscv64. One is caused by docker not publishing a python image for riscv64, the other by zfs support issues.

To post a comment you must log in.
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Looking good, +1.

review: Approve
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Applied and pushed. Thanks!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/check-riscv64.sh b/lib/check-riscv64.sh
0new file mode 1007550new file mode 100755
index 0000000..acf674f
--- /dev/null
+++ b/lib/check-riscv64.sh
@@ -0,0 +1,10 @@
1#!/bin/bash
2
3# Shiftfs support was added in kernel 5.0. Exit True if kernel is not compatible.
4check_riscv64() {
5 HARDWARE_PLATFORM=$(uname -i)
6 if [ "${HARDWARE_PLATFORM}" == "riscv64" ]; then
7 echo "SKIPPING $(basename ${0}): Test is not riscv64 compatible"
8 exit 0
9 fi
10}
diff --git a/tests/ovl-map-files.sh b/tests/ovl-map-files.sh
index 97bd2b2..83a930b 100755
--- a/tests/ovl-map-files.sh
+++ b/tests/ovl-map-files.sh
@@ -2,6 +2,12 @@
2#2#
3# See LP: #19836403# See LP: #1983640
44
5. $(dirname ${0})/../lib/check-riscv64.sh
6
7# Check if this is executing on risc64 before running test
8# This test uses a python docker image for riscv64 which does not (yet) exist
9check_riscv64
10
5if [ ! -x "$(which docker)" ]; then11if [ ! -x "$(which docker)" ]; then
6 echo "please install docker.io"12 echo "please install docker.io"
7 exit 113 exit 1
diff --git a/tests/shiftfs-lxd.sh b/tests/shiftfs-lxd.sh
index ea565c9..696072d 100755
--- a/tests/shiftfs-lxd.sh
+++ b/tests/shiftfs-lxd.sh
@@ -7,6 +7,12 @@
7# Check that this kernel supports shiftfs before running test7# Check that this kernel supports shiftfs before running test
8check_shiftfs_compatible8check_shiftfs_compatible
99
10. $(dirname ${0})/../lib/check-riscv64.sh
11
12# Check if this is executing on risc64 before running test
13# Test will not work on riscv64 as zfs is not supported (yet)
14check_riscv64
15
10if [ ! -x $(which lxc) ]; then16if [ ! -x $(which lxc) ]; then
11 echo "please install lxd snap"17 echo "please install lxd snap"
12 exit 118 exit 1

Subscribers

People subscribed via source and target branches