Merge ~canonical-kernel-team/+git/overlay-shiftfs-tests:phlin/skip-zfs-tests into ~canonical-kernel-team/+git/overlay-shiftfs-tests:main

Proposed by Po-Hsu Lin
Status: Merged
Merged at revision: 721ddbbd05c4e7d09b8cd0bdb83c947bd6f87ed9
Proposed branch: ~canonical-kernel-team/+git/overlay-shiftfs-tests:phlin/skip-zfs-tests
Merge into: ~canonical-kernel-team/+git/overlay-shiftfs-tests:main
Diff against target: 33 lines (+14/-0)
2 files modified
lib/check-zfs-compatible.sh (+11/-0)
tests/shiftfs-lxd.sh (+3/-0)
Reviewer Review Type Date Requested Status
Francis Ginther Approve
Review via email: mp+457815@code.launchpad.net

Commit message

ZFS is required by the shiftfs-lxd.sh test, but it is not supported
on realtime kernel (LP: #2017637)

To post a comment you must log in.
Revision history for this message
Francis Ginther (fginther) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/check-zfs-compatible.sh b/lib/check-zfs-compatible.sh
2new file mode 100755
3index 0000000..d2acf9c
4--- /dev/null
5+++ b/lib/check-zfs-compatible.sh
6@@ -0,0 +1,11 @@
7+#!/bin/bash
8+
9+# ZFS is not support on realtime kernel (LP: #2017637)
10+
11+check_zfs_compatible() {
12+ FLAVOUR=$(uname -r | awk -F'-' '{print $NF}')
13+ if [[ "$FLAVOUR" == "realtime" ]]; then
14+ echo "SKIPPING $(basename ${0}): Kernel is not ZFS compatible"
15+ exit 0
16+ fi
17+}
18diff --git a/tests/shiftfs-lxd.sh b/tests/shiftfs-lxd.sh
19index a2a2a37..53e1d10 100755
20--- a/tests/shiftfs-lxd.sh
21+++ b/tests/shiftfs-lxd.sh
22@@ -4,9 +4,12 @@
23 ret=0
24
25 . $(dirname ${0})/../lib/check-shiftfs-compatible.sh
26+. $(dirname ${0})/../lib/check-zfs-compatible.sh
27
28 # Check that this kernel supports shiftfs before running test
29 check_shiftfs_compatible
30+# Check that this kernel supports zfs before running test
31+check_zfs_compatible
32
33 . $(dirname ${0})/../lib/check-riscv64.sh
34

Subscribers

People subscribed via source and target branches

to all changes: