Skip to content

Commit

Permalink
mount: run test within subdirectory
Browse files Browse the repository at this point in the history
Clean up test artifacts once the test has been run.

Signed-off-by: Sachin Prabhu <sp@spui.uk>
  • Loading branch information
spuiuk authored and anoopcs9 committed Aug 21, 2023
1 parent ae251e1 commit 47631d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion testcases/mount/test_mount.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import sys
import pytest
import typing
import shutil

from .mount_io import check_io_consistency

Expand All @@ -24,9 +25,12 @@ def mount_check(ipaddr: str, share_name: str) -> None:
try:
testhelper.cifs_mount(mount_params, mount_point)
flag_mounted = True
check_io_consistency(mount_point)
test_dir = mount_point + "/mount_test"
os.mkdir(test_dir)
check_io_consistency(test_dir)
finally:
if flag_mounted:
shutil.rmtree(test_dir, ignore_errors=True)
testhelper.cifs_umount(mount_point)
os.rmdir(mount_point)
os.rmdir(tmp_root)
Expand Down

0 comments on commit 47631d9

Please sign in to comment.