generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / generic / 599
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2020 Chengguang Xu <cgxu519@mykernel.net>.
4 # All Rights Reserved.
5 #
6 # FS QA Test 599
7 #
8 # Test data integrity for ro remount.
9 #
10 . ./common/preamble
11 _begin_fstest auto quick remount shutdown
12
13 status=0
14
15 # Import common functions.
16 . ./common/filter
17
18 # real QA test starts here
19 _supported_fs generic
20 _require_fssum
21 _require_scratch
22 _require_scratch_shutdown
23
24 _scratch_mkfs &>/dev/null
25 _scratch_mount
26
27 localdir=$SCRATCH_MNT/dir
28 mkdir $localdir
29 sync
30
31 # fssum used for comparing checksum of test file(data & metedata),
32 # exclude checking about atime, block structure, open error.
33 $FSSUM_PROG -ugomAcdES -f -w $tmp.fssum $localdir
34 _scratch_remount ro
35 _scratch_shutdown
36 _scratch_cycle_mount
37 $FSSUM_PROG -r $tmp.fssum $localdir
38
39 exit