test data

This commit is contained in:
Edwin Eefting 2022-02-20 13:04:49 +01:00
parent 4d27b3b6ea
commit 626c84fe47
7 changed files with 35 additions and 0 deletions

0
tests/data/empty Normal file
View File

1
tests/data/partial Normal file
View File

@ -0,0 +1 @@
xCżłĘźŠZG™ëĐśł—„?úĎZGä#ťÜ,ŰĆ»°Q=˛>ÝŮ<C39D>1¸NUüĎuů{Zj;°` š·ĄDvëëQ®jĐvoQFNÍćÄÉ;3Sa<53>Rş^2Z÷í

BIN
tests/data/whole Normal file

Binary file not shown.

BIN
tests/data/whole2 Normal file

Binary file not shown.

BIN
tests/data/whole_whole2 Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,34 @@
import hashlib
from .util import block_hash
from .CliBase import CliBase
class ZfsCheck(CliBase):
def __init__(self, argv, print_arguments=True):
# NOTE: common options and parameters are in ZfsAuto
super(ZfsCheck, self).__init__(argv, print_arguments)
def run(self):
# print(sha1sum("/home/psy/Downloads/carimage.zip"))
for (block, h ) in block_hash("/home/psy/Downloads/carimage.zip" , count=10000):
print(block)
print (h)
pass
def cli():
import sys
sys.exit(ZfsCheck(sys.argv[1:], False).run())
if __name__ == "__main__":
cli()