self.mount_a.run_shell_payload(f"rm -rf {tempdir}")
self.run_cephfs_shell_cmd('get ' + tempdirname)
- pwd = self.get_cephfs_shell_cmd_output('!pwd')
+ # NOTE: cwd=None because we want to run it at CWD, not at cephfs mntpt.
+ pwd = self.mount_a.run_shell('pwd', cwd=None).stdout.getvalue().\
+ strip()
for file_ in files:
if file_ == tempdirname:
self.mount_a.run_shell_payload(f"stat {path.join(pwd, file_)}")
o = self.get_cephfs_shell_cmd_output("get dump4 .")
log.info("cephfs-shell output:\n{}".format(o))
- o = self.get_cephfs_shell_cmd_output("!cat dump4")
+ # NOTE: cwd=None because we want to run it at CWD, not at cephfs mntpt.
+ o = self.mount_a.run_shell('cat dump4', cwd=None).stdout.getvalue().\
+ strip()
o_hash = crypt.crypt(o, '.A')
# s_hash must be equal to o_hash
# get dump5 should fail
o = self.get_cephfs_shell_cmd_output("get dump5")
- o = self.get_cephfs_shell_cmd_output("!stat dump5 || echo $?")
+ # NOTE: cwd=None because we want to run it at CWD, not at cephfs mntpt.
+ o = self.mount_a.run_shell('stat dump5 || echo $?', cwd=None).stdout.\
+ getvalue().strip()
log.info("cephfs-shell output:\n{}".format(o))
l = o.split('\n')
try: