blob: bdb85508aa403c77bfde7238e3af4e6706560dec (
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
42
43
44
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2023 Red Hat, Inc. All Rights Reserved.
#
# FS QA Test No. 729
#
# Trigger page faults in the same file during read and write
#
# This is generic/647 with an additional test that writes a memory-mapped page
# onto itself using direct I/O.
#
# The kernel will invalidate the page cache before carrying out the write, so
# filesystems that fault in the page and then carry out the direct I/O write
# with page faults disabled will never make any progress.
#
. ./common/preamble
_begin_fstest auto quick
# Override the default cleanup function.
_cleanup()
{
cd /
rm -f $tmp.*
rm -f $TEST_DIR/mmap-rw-fault.tmp
}
# Import common functions.
. ./common/filter
# real QA test starts here
_supported_fs generic
_require_test
_require_odirect
_require_test_program mmap-rw-fault
[ $FSTYP = "bcachefs" ] && _notrun "not supported on bcachefs - bcachefs doesn't allow O_DIRECT with buffer mapped from same file"
echo "Silence is golden"
$here/src/mmap-rw-fault -2 $TEST_DIR/mmap-rw-fault.tmp
status=$?
exit
|