forked from third-party-mirrors/zfs_autobackup
test data
This commit is contained in:
parent
4d27b3b6ea
commit
626c84fe47
0
tests/data/empty
Normal file
0
tests/data/empty
Normal file
1
tests/data/partial
Normal file
1
tests/data/partial
Normal 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
BIN
tests/data/whole
Normal file
Binary file not shown.
BIN
tests/data/whole2
Normal file
BIN
tests/data/whole2
Normal file
Binary file not shown.
BIN
tests/data/whole_whole2
Normal file
BIN
tests/data/whole_whole2
Normal file
Binary file not shown.
BIN
tests/data/whole_whole2_partial
Normal file
BIN
tests/data/whole_whole2_partial
Normal file
Binary file not shown.
34
zfs_autobackup/ZfsCheck.py
Normal file
34
zfs_autobackup/ZfsCheck.py
Normal 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()
|
Loading…
x
Reference in New Issue
Block a user