1f08c3bdfSopenharmony_ci#!/bin/sh
2f08c3bdfSopenharmony_ci# SPDX-License-Identifier: GPL-2.0-or-later
3f08c3bdfSopenharmony_ci# Copyright (c) 2022 Petr Vorel <pvorel@suse.cz>
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_ciTST_MOUNT_DEVICE=1
6f08c3bdfSopenharmony_ciTST_NEEDS_ROOT=1
7f08c3bdfSopenharmony_ciTST_FS_TYPE=ext4
8f08c3bdfSopenharmony_ciTST_TESTFUNC=test
9f08c3bdfSopenharmony_ciTST_SKIP_FILESYSTEMS="btrfs,exfat,ext2,ext3,fuse,ntfs,vfat,tmpfs,xfs"
10f08c3bdfSopenharmony_ciTST_CNT=3
11f08c3bdfSopenharmony_ci
12f08c3bdfSopenharmony_citest1()
13f08c3bdfSopenharmony_ci{
14f08c3bdfSopenharmony_ci	EXPECT_PASS "cd $TST_MNTPOINT"
15f08c3bdfSopenharmony_ci}
16f08c3bdfSopenharmony_ci
17f08c3bdfSopenharmony_citest2()
18f08c3bdfSopenharmony_ci{
19f08c3bdfSopenharmony_ci	EXPECT_PASS "grep '$TST_MNTPOINT $TST_FS_TYPE' /proc/mounts"
20f08c3bdfSopenharmony_ci}
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_citest3()
23f08c3bdfSopenharmony_ci{
24f08c3bdfSopenharmony_ci	local fs fs_skip
25f08c3bdfSopenharmony_ci
26f08c3bdfSopenharmony_ci	fs=$(grep "$TST_MNTPOINT $TST_FS_TYPE" /proc/mounts | cut -d ' ' -f3)
27f08c3bdfSopenharmony_ci	EXPECT_PASS "[ '$fs' = '$TST_FS_TYPE' ]"
28f08c3bdfSopenharmony_ci
29f08c3bdfSopenharmony_ci	for fs_skip in $TST_SKIP_FILESYSTEMS; do
30f08c3bdfSopenharmony_ci		EXPECT_FAIL "[ $fs = $fs_skip ]"
31f08c3bdfSopenharmony_ci	done
32f08c3bdfSopenharmony_ci}
33f08c3bdfSopenharmony_ci
34f08c3bdfSopenharmony_ci. tst_test.sh
35f08c3bdfSopenharmony_citst_run
36