Skip to content

Add LTP fsstress test for NFS mounted filesystem#3097

Open
vaishnavibhat wants to merge 1 commit intoavocado-framework-tests:masterfrom
vaishnavibhat:fsstress_nfs
Open

Add LTP fsstress test for NFS mounted filesystem#3097
vaishnavibhat wants to merge 1 commit intoavocado-framework-tests:masterfrom
vaishnavibhat:fsstress_nfs

Conversation

@vaishnavibhat
Copy link
Copy Markdown
Contributor

Add new test to validate filesystem operations over NFS using LTP fsstress. This test extends the existing io/disk/ltp_fsstress.py to support network filesystem testing.

Test workflow:

  • Configures host and peer network interfaces with private IPs
  • Establishes SSH connection to peer via public/management IP
  • Sets up NFS server on peer (exportfs, rpcbind, firewalld)
  • Mounts NFS share on host from peer's private IP
  • Downloads and builds LTP from source
  • Runs fsstress with configurable parameters on NFS mount
  • Monitors dmesg and console logs for errors
  • Performs complete cleanup including session termination

@abdhaleegit
Copy link
Copy Markdown
Collaborator

@vaishnavibhat you forgot to add Asisted by AI tools

@Naresh-ibm
Copy link
Copy Markdown
Collaborator

@vaishnavibhat please add the runs logs and re-send with all checks passed

# p_val: "25"

# Made with AI Support

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vaishnavibhat I think all commenting lines should go in Readme.txt.
other wise it will be clumsy here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vaishnavibhat why new test, why can't we use the existing one and just add extra n/w mount point there.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Naresh-ibm

  1. Different Test Purposes and Infrastructure Requirements
    Apart from having a different yaml file with network IP related parameters, the setUp() will be different for fsstress for network and for disk.
  2. Validate NFS deployments - This is a new implementation that is taken care before running fsstress.
  3. Command for executions :
    For fsstress over network , there is a slight change in the command as
    timeout {fsstress_timeout} ./fsstress -d {nfs_mount_point} -p {p_val} -n {n_val} -l {fsstress_count}
  4. Dependencies and services that needs to be managed for fsstress over network v/s disk are different. example: nfs-utils, firewalld, exportfs etc..
  5. teardown() will be different for network and disk considering the above.

Though the test (fsstress) is same for disk and network (nfs), the approach to setup test, configuring the environment and teardown is very different. Hence having separate .py files would be a better approach.

@vaishnavibhat vaishnavibhat force-pushed the fsstress_nfs branch 3 times, most recently from 28df2fc to e0d795f Compare February 27, 2026 10:33
@vaishnavibhat
Copy link
Copy Markdown
Contributor Author

vaishnavibhat commented Feb 27, 2026

avocado run ltp_fsstress_nfs.py -m ltp_fsstress_nfs.yaml
Fetching asset from ltp_fsstress_nfs.py:LtpFsNfs.test_fsstress_run
JOB ID : 22f7d86480e441c2b849555611d2f3c33b71505c
JOB LOG : /root/avocado-fvt-wrapper/results/job-2026-02-27T04.47-22f7d86/job.log
(1/1) ltp_fsstress_nfs.py:LtpFsNfs.test_fsstress_run;run-0b30: STARTED
(1/1) ltp_fsstress_nfs.py:LtpFsNfs.test_fsstress_run;run-0b30: PASS (170.16 s)
RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /root/avocado-fvt-wrapper/results/job-2026-02-27T04.47-22f7d86/results.html
JOB TIME : 180.15 s

ltp_fsstress_nfs.log

if self.err_mesg:
self.log.warning(f"Test completed with errors: {self.err_mesg}")

# Made with AI Support
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abdhaleegit I have added here, though not explicitly in the commit message.

# p_val: "25"

# Made with AI Support

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Naresh-ibm

  1. Different Test Purposes and Infrastructure Requirements
    Apart from having a different yaml file with network IP related parameters, the setUp() will be different for fsstress for network and for disk.
  2. Validate NFS deployments - This is a new implementation that is taken care before running fsstress.
  3. Command for executions :
    For fsstress over network , there is a slight change in the command as
    timeout {fsstress_timeout} ./fsstress -d {nfs_mount_point} -p {p_val} -n {n_val} -l {fsstress_count}
  4. Dependencies and services that needs to be managed for fsstress over network v/s disk are different. example: nfs-utils, firewalld, exportfs etc..
  5. teardown() will be different for network and disk considering the above.

Though the test (fsstress) is same for disk and network (nfs), the approach to setup test, configuring the environment and teardown is very different. Hence having separate .py files would be a better approach.

Add new test to validate filesystem operations over NFS using LTP fsstress.
This test extends the existing io/disk/ltp_fsstress.py to support network
filesystem testing.

Test workflow:
- Configures host and peer network interfaces with private IPs
- Establishes SSH connection to peer via public/management IP
- Sets up NFS server on peer (exportfs, rpcbind, firewalld)
- Mounts NFS share on host from peer's private IP
- Downloads and builds LTP from source
- Runs fsstress with configurable parameters on NFS mount
- Monitors dmesg and console logs for errors
- Performs complete cleanup including session termination
Made with AI Support

Signed-off-by: Vaishnavi Bhat <vaishnavi@linux.vnet.ibm.com>
@@ -0,0 +1,18 @@
host_interface: "eth0"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vaishnavibhat Please remove this hard coded value

This test uses the following Avocado tags:
- `net`: Network-related test
- `fs`: Filesystem-related test
- `privileged`: Requires root/sudo access
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vaishnavibhat please squeeze this to shorter and keep only required info and this big file not required.
it should be little more crispy.

"systemctl start nfs-server",
"systemctl enable nfs-server",
"systemctl start rpcbind",
"systemctl enable rpcbind"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vaishnavibhat I think first enable and then start, please re-check on it
and do these all 4 services needed for all the setups

firewall_cmds = [
"systemctl stop firewalld",
"systemctl disable firewalld"
]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be available in the util, please check

result = process.system_output(verify_cmd, shell=True,
ignore_status=True)
self.log.info(f"NFS mount verification:\n"
f"{result.decode('utf-8')}")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel we have missed to validate the mount point here, please re-check, code just grep it and leaves

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants