File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -198,9 +198,14 @@ def main():
198198
199199 out = exec_cmd ("dd status=none if=%s of=/dev/stdout bs=1M skip=4 | sha1sum | awk '{ print $1 }'" % (outfile ))
200200 org_object_sha1 = get_cmd_output (out )
201- log .debug ("SHA1 of original file is: %s" , org_object_sha1 )
202-
203- assert (cached_object_sha1 == org_object_sha1 ) # Datacache test failed if sha1 of cached object does not match original object sha1"
201+ log .debug ("SHA1 of cached part in original file is: %s" , org_object_sha1 )
202+ out = exec_cmd ("dd status=none if=%s of=/dev/stdout bs=1M skip=4 | sha1sum | awk '{ print $1 }'" % (get_file_path ))
203+ download_object_sha1 = get_cmd_output (out )
204+ log .debug ("SHA1 of cached part in downloaded file is: %s" , download_object_sha1 )
205+
206+ assert ((cached_object_sha1 == org_object_sha1 ) or (org_object_sha1 == download_object_sha1 and chk_cache_dir > 0 ))
207+ # (cached_object_sha1 == org_object_sha1) test fails if "stripe_size" is not exactly 4MiB(4194304),
208+ # in that case fall back to checking the sha1 of the downloaded file
204209 log .debug ("RGW Datacache test SUCCESS" )
205210
206211 # remove datacache dir
You can’t perform that action at this time.
0 commit comments