1f08c3bdfSopenharmony_ci#!/bin/sh
2f08c3bdfSopenharmony_ci# SPDX-License-Identifier: GPL-2.0-or-later
3f08c3bdfSopenharmony_ci# Copyright (c) 2016-2018 Oracle and/or its affiliates. All Rights Reserved.
4f08c3bdfSopenharmony_ci# Copyright (c) International Business Machines  Corp., 2001
5f08c3bdfSopenharmony_ci#
6f08c3bdfSopenharmony_ci#  PURPOSE: Runs the fsx-linux tool with a 50000 iterations setting to
7f08c3bdfSopenharmony_ci#	    attempt to uncover the "doread:read input/output" error
8f08c3bdfSopenharmony_ci#	    received if the latest NFS patches for 2.4.17 from Trond
9f08c3bdfSopenharmony_ci#	    are not applied. http://nfs.sf.net
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_ciTST_TESTFUNC="do_test"
12f08c3bdfSopenharmony_ci
13f08c3bdfSopenharmony_cido_test()
14f08c3bdfSopenharmony_ci{
15f08c3bdfSopenharmony_ci	ITERATIONS=${ITERATIONS:=50000}
16f08c3bdfSopenharmony_ci	tst_res TINFO "starting fsx-linux -N $ITERATIONS..."
17f08c3bdfSopenharmony_ci	fsx-linux -N $ITERATIONS testfile > fsx-out.log 2>&1
18f08c3bdfSopenharmony_ci	if [ "$?" -ne 0 ]; then
19f08c3bdfSopenharmony_ci		tst_res TFAIL "Errors have resulted from this test"
20f08c3bdfSopenharmony_ci		cat fsx-out.log
21f08c3bdfSopenharmony_ci	else
22f08c3bdfSopenharmony_ci		tst_res TPASS "fsx-linux test passed"
23f08c3bdfSopenharmony_ci	fi
24f08c3bdfSopenharmony_ci}
25f08c3bdfSopenharmony_ci
26f08c3bdfSopenharmony_ci. nfs_lib.sh
27f08c3bdfSopenharmony_citst_run
28