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
1diff --git a/lib/check-riscv64.sh b/lib/check-riscv64.sh
2new file mode 100755
3index 0000000..acf674f
4--- /dev/null
5+++ b/lib/check-riscv64.sh
6@@ -0,0 +1,10 @@
7+#!/bin/bash
8+
9+# Shiftfs support was added in kernel 5.0. Exit True if kernel is not compatible.
10+check_riscv64() {
11+ HARDWARE_PLATFORM=$(uname -i)
12+ if [ "${HARDWARE_PLATFORM}" == "riscv64" ]; then
13+ echo "SKIPPING $(basename ${0}): Test is not riscv64 compatible"
14+ exit 0
15+ fi
16+}
17diff --git a/tests/ovl-map-files.sh b/tests/ovl-map-files.sh
18index 97bd2b2..83a930b 100755
19--- a/tests/ovl-map-files.sh
20+++ b/tests/ovl-map-files.sh
21@@ -2,6 +2,12 @@
22 #
23 # See LP: #1983640
24
25+. $(dirname ${0})/../lib/check-riscv64.sh
26+
27+# Check if this is executing on risc64 before running test
28+# This test uses a python docker image for riscv64 which does not (yet) exist
29+check_riscv64
30+
31 if [ ! -x "$(which docker)" ]; then
32 echo "please install docker.io"
33 exit 1
34diff --git a/tests/shiftfs-lxd.sh b/tests/shiftfs-lxd.sh
35index ea565c9..696072d 100755
36--- a/tests/shiftfs-lxd.sh
37+++ b/tests/shiftfs-lxd.sh
38@@ -7,6 +7,12 @@
39 # Check that this kernel supports shiftfs before running test
40 check_shiftfs_compatible
41
42+. $(dirname ${0})/../lib/check-riscv64.sh
43+
44+# Check if this is executing on risc64 before running test
45+# Test will not work on riscv64 as zfs is not supported (yet)
46+check_riscv64
47+
48 if [ ! -x $(which lxc) ]; then
49 echo "please install lxd snap"
50 exit 1

Subscribers

People subscribed via source and target branches