]>
git.proxmox.com Git - mirror_zfs-debian.git/blob - tests/zfs-tests/tests/functional/mmap/mmap_libaio_001_pos.ksh
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
24 # Copyright 2018 Canonical. All rights reserved.
27 .
$STF_SUITE/include
/libtest.shlib
28 .
$STF_SUITE/tests
/functional
/mmap
/mmap.cfg
32 # Verify libaio functions correctly with mmap()'d files.
35 # 1. Call mmap_libaio binary
36 # 2. Verify the file exists and is the expected size
37 # 3. Verify the filesystem is intact and not hung in any way
40 verify_runnable
"global"
42 log_assert
"verify mmap'd pages work with libaio"
44 # mmap_libaio is built when the libaio-devel package is installed.
45 if ! which mmap_libaio
; then
46 log_unsupported
"This test requires mmap_libaio."
49 log_must
chmod 777 $TESTDIR
51 for size
in 512 4096 8192; do
52 log_mustnot stat
$TESTDIR/test-libaio-file
53 log_must mmap_libaio
$TESTDIR/test-libaio-file
$size
54 log_must verify_eq $
(stat
--format=%s
$TESTDIR/test-libaio-file
) $size
55 log_must
rm $TESTDIR/test-libaio-file
58 typeset dir
=$
(get_device_dir
$DISKS)
59 verify_filesys
"$TESTPOOL" "$TESTPOOL/$TESTFS" "$dir"
61 log_pass
"mmap'd pages work with libaio"