• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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#  "needs_root": true,
9#  "mount_device": true,
10#  "all_filesystems": true,
11#  "mntpoint": "ltp_mntpoint"
12# }
13# ---
14
15. tst_loader.sh
16
17tst_res TINFO "In shell"
18
19mntpath=$(realpath ltp_mntpoint)
20mounted=$(grep $mntpath /proc/mounts)
21
22if [ -n "$mounted" ]; then
23	device=$(echo $mounted |cut -d' ' -f 1)
24	path=$(echo $mounted |cut -d' ' -f 2)
25
26	tst_res TPASS "$device mounted at $path"
27else
28	tst_res TFAIL "Device not mounted!"
29fi
30