[LTP] [PATCH 5/5] Add test for data integrity over NFS

Petr Vorel pvorel@suse.cz
Wed Nov 13 15:50:39 CET 2024


> On 12. 11. 24 22:40, Petr Vorel wrote:
> > > On 02. 11. 24 0:32, Petr Vorel wrote:
> > > > Hi Martin,

> > > > BTW I got timeout when testing nfs10.sh -v 4 -t tcp on Tumbleweed VM (2 CPU,
> > > > 1.4 GB RAM, 2 GB SWAP) on my laptop:
> > > > ...

> > > > The quickest way would be to use the same calculation (* $TST_CNT + 5% for spare
> > > > time) in nfs10.sh and increase tst_set_timeout with.

> > > Yes, that is expected for now, we need to add separate timeouts for each
> > > subtest, including per-filesystem.

> > Right, I suppose you post v2.

> > I wonder why you did not get timeouts on your laptop. I suppose calculation for
> > fsplough was below 5 min, right?

> I've tested nfs7.sh with LTP_TIMEOUT_MUL=2 which was enough to make it
> pass. The per-testcase timeout implementation needs to be a separate patch
> anyway so sending a v2 doesn't make sense at the moment. I can write the
> timeout patch but I'll need to figure out how the shell timeout works.

IMHO using TST_TIMEOUT in nfs10.sh should be enough (hence asking for v2).
Because TST_TIMEOUT is for each test run. It's visible from the test output I
posted, also _tst_setup_timer, which sets the timeout is called only in
_tst_run_iterations. And _tst_run_iterations is called for each filesystem in
_tst_run_tcases_per_fs (or directly otherwise).

_tst_run_iterations()
{
	local _tst_i=$TST_ITERATIONS
	local _tst_j

	[ "$TST_NEEDS_TMPDIR" = 1 ] && cd "$TST_TMPDIR"

	_prepare_device

	_tst_setup_timer

_tst_run_tcases_per_fs()
{
	local fs
	local filesystems

	filesystems="$(tst_supported_fs -s "$TST_SKIP_FILESYSTEMS")"
	if [ $? -ne 0 ]; then
		tst_brk TCONF "There are no supported filesystems or all skipped"
	fi

	for fs in $filesystems; do
		tst_res TINFO "=== Testing on $fs ==="
		TST_FS_TYPE="$fs"
		_tst_run_iterations
	done
}

tst_run()
{
	...

	if [ "$TST_ALL_FILESYSTEMS" = 1 ]; then
		_tst_run_tcases_per_fs
	else
		_tst_run_iterations
	fi

	_tst_do_exit
}

Using the same calculation you use in fsplough:
tst_set_max_runtime(bufsize * loop_count / (8 * 1024 * 1024))
In TST_TIMEOUT the number of the above would be 4* (4 tests), loop_count == 512.

Kind regards,
Petr


More information about the ltp mailing list