]>
git.proxmox.com Git - mirror_zfs.git/blob - tests/zfs-tests/tests/functional/io/libaio.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 (c) 2018 by Lawrence Livermore National Security, LLC.
27 .
$STF_SUITE/include
/libtest.shlib
28 .
$STF_SUITE/tests
/functional
/io
/io.cfg
32 # Verify Linux native asynchronous IO.
35 # 1. Use fio(1) in verify mode to perform write, read,
36 # random read, and random write workloads.
37 # 2. Repeat the test with additional fio(1) options.
40 verify_runnable
"global"
44 log_must
rm -f "$mntpnt/rw*"
47 log_assert
"Verify Linux native asynchronous IO"
51 ioengine
="--ioengine=libaio"
52 mntpnt
=$
(get_prop mountpoint
$TESTPOOL/$TESTFS)
53 dir
="--directory=$mntpnt"
55 set -A fio_arg
-- "--sync=0" "--sync=1" "--direct=0" "--direct=1"
57 for arg
in "${fio_arg[@]}"; do
58 log_must fio
$dir $ioengine $arg $FIO_WRITE_ARGS
59 log_must fio
$dir $ioengine $arg $FIO_READ_ARGS
60 log_must fio
$dir $ioengine $arg $FIO_RANDWRITE_ARGS
61 log_must fio
$dir $ioengine $arg $FIO_RANDREAD_ARGS
62 log_must
rm -f "$mntpnt/rw*"
65 log_pass
"Verified Linux native asynchronous IO"