Test to verify data persistency on vpmem device across reboot#947
Test to verify data persistency on vpmem device across reboot#947Pavithra1602 wants to merge 1 commit into
Conversation
| cls.cv_HOST = conf.host() | ||
| cls.util = conf.util | ||
|
|
||
| cls.vpmem_device = "/dev/pmem0" |
There was a problem hiding this comment.
hardcoded, the device changes.. how do we pass ?
| ) | ||
| cls.namespace_name = "namespace0.0" | ||
| cls.region = "region0" | ||
| cls.filesystem_type = "xfs" |
There was a problem hiding this comment.
also these parametsrs. if there is tets conf please mentioned in Readme
| 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' |
There was a problem hiding this comment.
there should be distro util now in utils .. please use
There was a problem hiding this comment.
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"
| log.info("ndctl utility found in output despite command failure") | ||
| else: | ||
| self.skipTest("ndctl utility not found even after installation attempt") | ||
|
|
There was a problem hiding this comment.
remove unnecssary blank lines
|
|
||
| try: | ||
| if self.filesystem_type == "xfs": | ||
| cmd = "mkfs.xfs -f -b size=64k -s size=4k {}".format(self.vpmem_device) |
There was a problem hiding this comment.
-b for block size and -s for sector size
| ) | ||
| except CommandFailed: | ||
| pass | ||
|
|
There was a problem hiding this comment.
same here remove empty lines
| log.info("Initiating system reboot...") | ||
| self.cv_SYSTEM.goto_state(OpSystemState.OFF) | ||
| time.sleep(10) | ||
| self.cv_SYSTEM.goto_state(OpSystemState.OS) |
There was a problem hiding this comment.
this will deactivate and activate the lpar.. are you just want the reboot ?
|
|
||
| except Exception as e: | ||
| log.warning("Cleanup failed: {}".format(str(e))) | ||
|
|
There was a problem hiding this comment.
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>
9fd7605 to
dca55ac
Compare
|
Addressed the review comments |
This test verifies that data written to a vpmem.
device persists across system reboots.
Test steps: