Skip to content

Test to verify data persistency on vpmem device across reboot#947

Open
Pavithra1602 wants to merge 1 commit into
open-power:masterfrom
Pavithra1602:vpem_persistent_check
Open

Test to verify data persistency on vpmem device across reboot#947
Pavithra1602 wants to merge 1 commit into
open-power:masterfrom
Pavithra1602:vpem_persistent_check

Conversation

@Pavithra1602
Copy link
Copy Markdown
Contributor

This test verifies that data written to a vpmem.
device persists across system reboots.
Test steps:

  1. Check for vpmem device availability
  2. Create namespace using ndctl
  3. Create file system with DAX support
  4. Mount the vpmem device with DAX option
  5. Create a test file with unique content
  6. Reboot the system
  7. Remount the vpmem device
  8. Verify the test file still exists with correct content

@Pavithra1602 Pavithra1602 changed the title Test ti verify data persistency on vpmem device across reboot Test to verify data persistency on vpmem device across reboot Apr 25, 2026
@Pavithra1602
Copy link
Copy Markdown
Contributor Author

@abdhaleegit abdhaleegit self-requested a review April 27, 2026 05:16
Comment thread testcases/OpTestVpmemPersistency.py Outdated
cls.cv_HOST = conf.host()
cls.util = conf.util

cls.vpmem_device = "/dev/pmem0"
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.

hardcoded, the device changes.. how do we pass ?

)
cls.namespace_name = "namespace0.0"
cls.region = "region0"
cls.filesystem_type = "xfs"
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.

also these parametsrs. if there is tets conf please mentioned in Readme

Comment thread testcases/OpTestVpmemPersistency.py Outdated
log.info("Detected OS distribution from error output: {}".format(distro_name))
else:
log.warning("Could not detect OS distribution: {}".format(error_msg))
distro_name = 'unknown'
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.

there should be distro util now in utils .. please use

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.

Tried using get_distro_details, but get_distro_details() uses SSH connection and test uses console connection facing login issues

Red Hat Enterprise Linux 10.2 Beta (Coughlan)
Kernel 6.12.0-210.el10.ppc64le on ppc64le

Web console: https://1.2.3.4:xx/

ltcden10-lp12 login: 2026-04-28 13:13:51,817:op-test.common.OpTestUtil:try_sendcontrol:WARNING:OpTestSystem detected something, working on recovery
2026-04-28 13:13:52,823:op-test.common.OpTestUtil:try_sendcontrol:WARNING:OpTestSystem recovered from a temporary issue, continuing
2026-04-28 13:13:54,829:op-test.common.OpTestUtil:run_command:INFO:

OpTestSystem detected a command issue, we will retry the command, this will be retry "01" of a total of "05"

Comment thread testcases/OpTestVpmemPersistency.py Outdated
log.info("ndctl utility found in output despite command failure")
else:
self.skipTest("ndctl utility not found even after installation attempt")

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.

remove unnecssary blank lines

Comment thread testcases/OpTestVpmemPersistency.py Outdated

try:
if self.filesystem_type == "xfs":
cmd = "mkfs.xfs -f -b size=64k -s size=4k {}".format(self.vpmem_device)
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.

2 different size ?

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.

-b for block size and -s for sector size

Comment thread testcases/OpTestVpmemPersistency.py Outdated
)
except CommandFailed:
pass

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.

same here remove empty lines

Comment thread testcases/OpTestVpmemPersistency.py Outdated
log.info("Initiating system reboot...")
self.cv_SYSTEM.goto_state(OpSystemState.OFF)
time.sleep(10)
self.cv_SYSTEM.goto_state(OpSystemState.OS)
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.

this will deactivate and activate the lpar.. are you just want the reboot ?


except Exception as e:
log.warning("Cleanup failed: {}".format(str(e)))

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.

so many try statement.. please optmize

This test verifies that data written to a vpmem.
device persists across system reboots.
Test steps:
1. Check for vpmem device availability
2. Create namespace using ndctl
3. Create file system with DAX support
4. Mount the vpmem device with DAX option
5. Create a test file with unique content
6. Reboot the system
7. Remount the vpmem device
8. Verify the test file still exists with correct content

Signed-off-by: Pavithra <pavrampu@linux.ibm.com>
@Pavithra1602 Pavithra1602 force-pushed the vpem_persistent_check branch from 9fd7605 to dca55ac Compare April 28, 2026 14:02
@Pavithra1602
Copy link
Copy Markdown
Contributor Author

Addressed the review comments

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.

2 participants