Whamcloud - gitweb
LU-15994 tests: add testing for io_uring via fio 67/48167/3
authorQian Yingjin <qian@ddn.com>
Tue, 9 Aug 2022 07:56:23 +0000 (03:56 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 1 Sep 2022 05:55:01 +0000 (05:55 +0000)
This patch adds test case for io_uring I/O engine via fio.

Test-Parameters: trivial testlist=sanity
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I0f2e371f91c02dc76644f42e5d1055ec200597c6
Reviewed-on: https://review.whamcloud.com/48167
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh

index 214611e..58577c2 100755 (executable)
@@ -28679,6 +28679,33 @@ test_905() {
 }
 run_test 905 "bad or new opcode should not stuck client"
 
 }
 run_test 905 "bad or new opcode should not stuck client"
 
+test_906() {
+       grep -q io_uring_setup /proc/kallsyms ||
+               skip "Client OS does not support io_uring I/O engine"
+       io_uring_probe || skip "kernel does not support io_uring fully"
+       which fio || skip_env "no fio installed"
+       fio --enghelp | grep -q io_uring ||
+               skip_env "fio does not support io_uring I/O engine"
+
+       local file=$DIR/$tfile
+       local ioengine="io_uring"
+       local numjobs=2
+       local size=50M
+
+       fio --name=seqwrite --ioengine=$ioengine        \
+               --bs=$PAGE_SIZE --direct=1 --numjobs=$numjobs   \
+               --iodepth=64 --size=$size --filename=$file --rw=write ||
+               error "fio seqwrite $file failed"
+
+       fio --name=seqread --ioengine=$ioengine \
+               --bs=$PAGE_SIZE --direct=1 --numjobs=$numjobs   \
+               --iodepth=64 --size=$size --filename=$file --rw=read ||
+               error "fio seqread $file failed"
+
+       rm -f $file || error "rm -f $file failed"
+}
+run_test 906 "Simple test for io_uring I/O engine via fio"
+
 complete $SECONDS
 [ -f $EXT2_DEV ] && rm $EXT2_DEV || true
 check_and_cleanup_lustre
 complete $SECONDS
 [ -f $EXT2_DEV ] && rm $EXT2_DEV || true
 check_and_cleanup_lustre