1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0-or-later 3# Copyright (c) 2024-2025 Cyril Hrubis <chrubis@suse.cz> 4# 5# --- 6# env 7# { 8# "mount_device": true, 9# "mntpoint": "ltp_mntpoint", 10# "filesystems": [ 11# { 12# "type": "btrfs" 13# }, 14# { 15# "type": "xfs", 16# "mkfs_opts": ["-m", "reflink=1"] 17# } 18# ] 19# } 20# --- 21 22. tst_loader.sh 23 24tst_res TINFO "In shell" 25 26mntpoint=$(realpath ltp_mntpoint) 27mounted=$(grep $mntpoint /proc/mounts) 28 29if [ -n "$mounted" ]; then 30 fs=$(echo $mounted |cut -d' ' -f 3) 31 32 tst_res TPASS "Mounted device formatted with $fs" 33else 34 tst_res TFAIL "Device not mounted!" 35fi 36