Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for OpenZFS-Test-Suite #55

Merged
merged 1 commit into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/zts_windows/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Steps to run ZTS for windows

Step 2 :
git clone openzfs from https://github.com/DataCoreSoftware/openzfs
Checkout to zfs-test-suite-win branch
Checkout to zfs-test-suite-win-raidz branch
Build openzfs by follow this URL https://openzfs.github.io/openzfs-docs/Developer%20Resources/Building%20ZFS.html

Step 3 :
Expand All @@ -29,4 +29,4 @@ Step to run python script

Step 1 : Open cmd with Admin privileges
Seps 2 : Run following to start test
python.exe ../openzfs/scripts/zts_windows/zts_windows_test.py "<ZFSin Binaries Release.zip file path>"
python.exe ../openzfs/scripts/zts_windows/zts_windows_test.py "<OpenZFS Binaries Release.zip file path>"
2 changes: 1 addition & 1 deletion scripts/zts_windows/ZFS_Test_Config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ start = false

[pool_disk]
disk_id = 1,2,3
raid_disk_id = 4,5,6,7,8

[error]
error = false
error_msg = NA

[last run]
run_percentage = 0

13 changes: 9 additions & 4 deletions scripts/zts_windows/zts_util_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def clean_disk():
print("======================= Cleaning Disk ======================\n")
process = createSubprocess('diskpart.exe')
disk = config_read("pool_disk","disk_id")
disk = disk + config_read("pool_disk","raid_disk_id")
print(disk)
disk_arr = disk.split(',')
for disk_no in disk_arr :
Expand Down Expand Up @@ -124,6 +125,7 @@ def uninstall_zfsin():
process.stdin.write('cd /d c:\\' + "\n")
process.stdin.write("cd \"c:/zfs-test-suite/ZFS_Binaries/Release\"" + "\n")
process.stdin.write(".\zfsinstaller uninstall .\ZFSin\ZFSin.inf" + "\n")
process.stdin.write("del C:\Windows\System32\drivers\ZFSin.sys"+"\n")
process.stdin.close()
output = process.stdout.read()
print (output)
Expand Down Expand Up @@ -243,8 +245,8 @@ def make_dir():
print(output)
return

def export_disk():
disk = config_read("pool_disk","disk_id")
def export_disk(disks):
disk = config_read("pool_disk",disks)
print(disk)
disk_no = disk.split(',')
disk_path =''
Expand Down Expand Up @@ -272,15 +274,18 @@ def cp_runfile_wsl():
filePath = "C:\\zfs-test-suite\\testing.txt"
openzfs_folder = openzfs_path_linux()
line1 = "#/bin/bash"
line2 = 'export DISKS='+export_disk()
line3 = openzfs_folder + "scripts/zfs-tests.sh"+" -r "+ openzfs_folder +"tests/runfiles/windows.run"
line2 = 'export DISKS='+export_disk("disk_id")
line3 = 'export RAID_TEST_DISKS='+export_disk("raid_disk_id")
line4 = openzfs_folder + "scripts/zfs-tests.sh"+" -r "+ openzfs_folder +"tests/runfiles/windows-All.run"
print(line1)
print(line2)
print(line3)
print(line4)
with open(filePath,"w+") as f:
f.write(line1+'\n'+'\n')
f.write(line2+'\n')
f.write(line3+'\n')
f.write(line4+'\n')

cp_to_linux()
return
Expand Down
2 changes: 1 addition & 1 deletion scripts/zts_windows/zts_windows_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def main(argv):
clean_disk()

if normal_run() :
return
return

cleanup()

Expand Down