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

Petr Vorel pvorel@suse.cz
Sat Nov 2 00:32:21 CET 2024


Hi Martin,

[ Cc Li and Cyril due tst_set_timeout vs. tst_loader.sh and tst_run_shell.c. ]

> Add NFS test which checks data integrity of random writes into a file,
> with both buffered and direct I/O.

LGTM.
Reviewed-by: Petr Vorel <pvorel@suse.cz>

I'll try to have look on the core work (fsplough.c) on Monday.
Hopefully Li or Cyril would have look into this as well.

> The lower loop count is necessary because NFS has very large block size,
> up to 256KB on x86_64. The new tests take ~50 minutes to complete in total
> on my laptop. With the default loop count, the TCP tests would all time out.

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:
...
nfs10 1 TINFO: === Testing on ext4 ===
nfs10 1 TINFO: Formatting ext4 with opts='/dev/loop0'
nfs10 1 TINFO: Mounting device: mount -t ext4 /dev/loop0 /var/tmp/LTP_nfs10.zWBiahjI48/mntpoint
nfs10 1 TINFO: timeout per run is 0h 5m 0s

=> nfs10.sh runs only for 5 min.

nfs10 1 TINFO: mount.nfs: (linux nfs-utils 2.6.3)
nfs10 1 TINFO: setup NFSv4, socket type tcp
nfs10 1 TINFO: Mounting /var/tmp/LTP_nfs10.zWBiahjI48/4/0
nfs10 1 TINFO: Mounting NFS: mount -v -t nfs -o proto=tcp,vers=4 10.0.0.2:/var/tmp/LTP_nfs10.zWBiahjI48/mntpoint/4/tcp /var/tmp/LTP_nfs10.zWBiahjI48/4/0
nfs10 1 TINFO: Testing buffered write, buffered read
tst_tmpdir.c:316: TINFO: Using /var/tmp//LTP_fspL4p41F as tmpdir (btrfs filesystem)
tst_test.c:1890: TINFO: LTP version: 20240930-49-g3facdd035
tst_test.c:1894: TINFO: Tested kernel: 6.12.0-rc4-1.gf83465d-default #1 SMP PREEMPT_DYNAMIC Sun Oct 20 22:44:57 UTC 2024 (f83465d) x86_64
tst_test.c:1725: TINFO: Timeout per run is 0h 00m 30s
fsplough.c:186: TINFO: Block size: 262144
tst_test.c:1733: TINFO: Updating max runtime to 0h 08m 32s
tst_test.c:1725: TINFO: Timeout per run is 0h 09m 02s

=> fsplough.c is updated to 9 min, but that does not help due nfs10.sh not
having updated.

Test timed out, sending SIGTERM!
If you are running on slow machine, try exporting LTP_TIMEOUT_MUL > 1
Sending SIGKILL to test process...
Test is still running... 10
Test is still running... 9
Test is still running... 8
Test is still running... 7
Test is still running... 6
Test is still running... 5
Test is still running... 4
Test is still running... 3
Test is still running... 2
Test is still running... 1
Test is still running, sending SIGKILL
Killed

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.

Or, I wonder if using tst_loader.sh and tst_run_shell.c would help to integrate
these. But I'm not sure how easily could be nfs_lib.sh integrated, e.g.
* isn't it too late, when it uses tst_net.sh (maybe this file would need to be
  integrated)
* should use keep using TST_ALL_FILESYSTEMS=1 from tst_test.sh or configure
  via all_filesystems=1 via json?

OT: Other tests which are considerable are these which use netstress.c (via
tst_netload_compare).

Kind regards,
Petr


More information about the ltp mailing list