summaryrefslogtreecommitdiff
path: root/tests/generic/452
blob: 6e14a1c4e7b06a84886e2f6d5ea444ffb4f50a9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2017 Intel Corporation.  All Rights Reserved.
#
# FS QA Test 452
#
# This is a regression test for kernel patch:
#   commit fd96b8da68d3 ("ext4: fix fault handling when mounted with -o dax,ro")
# created by Ross Zwisler <ross.zwisler@linux.intel.com>
#
. ./common/preamble
_begin_fstest auto quick dax

# Import common functions.
. ./common/filter

# Modify as appropriate.
_supported_fs generic
_require_scratch

# we need to be able to execute binaries on scratch
_exclude_scratch_mount_option "noexec"

# real QA test starts here
# format and mount
_scratch_mkfs > $seqres.full 2>&1
_scratch_mount >> $seqres.full 2>&1

LS="$(type -P ls)"
SCRATCH_LS=$SCRATCH_MNT/ls_on_scratch
cp $LS $SCRATCH_LS

$SCRATCH_LS $SCRATCH_LS | _filter_scratch

_scratch_remount ro

$SCRATCH_LS $SCRATCH_LS | _filter_scratch

# success, all done
status=0
exit