]>
Commit | Line | Data |
---|---|---|
e7cbe5cb | 1 | #!/usr/bin/env bash |
7b3cec95 | 2 | # SPDX-License-Identifier: LGPL-2.1-or-later |
e7cbe5cb LB |
3 | # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- |
4 | # ex: ts=8 sw=4 sts=4 et filetype=sh | |
5 | set -e | |
3f161ba9 | 6 | |
e7cbe5cb LB |
7 | TEST_DESCRIPTION="test systemd-dissect" |
8 | IMAGE_NAME="dissect" | |
9 | TEST_NO_NSPAWN=1 | |
9785c44d | 10 | TEST_INSTALL_VERITY_MINIMAL=1 |
e7cbe5cb | 11 | |
3f161ba9 FS |
12 | # shellcheck source=test/test-functions |
13 | . "${TEST_BASE_DIR:?}/test-functions" | |
e7cbe5cb | 14 | |
62564681 LP |
15 | # On Ubuntu the BPF LSM is not enabled by default, so we need to do it via the |
16 | # kernel command line on boot | |
17 | if [ "$LOOKS_LIKE_UBUNTU" = "yes" ]; then | |
18 | KERNEL_OPTIONS=( | |
19 | "lsm=lockdown,capability,landlock,yama,apparmor,bpf" | |
20 | ) | |
21 | KERNEL_APPEND+=" ${KERNEL_OPTIONS[*]}" | |
22 | fi | |
23 | ||
70bdf6e6 | 24 | test_require_bin mksquashfs veritysetup sfdisk |
e7cbe5cb | 25 | |
d9e606e8 | 26 | test_append_files() { |
807626d1 FS |
27 | instmods squashfs =squashfs |
28 | instmods dm_verity =md | |
29 | install_dmevent | |
30 | generate_module_dependencies | |
31 | inst_binary wc | |
32 | inst_binary sha256sum | |
b68f4cad | 33 | inst_binary tar |
807626d1 FS |
34 | if command -v openssl >/dev/null 2>&1; then |
35 | inst_binary openssl | |
36 | fi | |
f92256ac | 37 | inst_binary mksquashfs |
cdad1f14 | 38 | inst_binary unsquashfs |
f9419fe6 | 39 | inst_binary pkcheck |
807626d1 | 40 | install_verity_minimal |
e7cbe5cb LB |
41 | } |
42 | ||
c4cd6205 | 43 | do_test "$@" |