Commit 1b6dfac6 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

tests: now we can drop cache corruption checks from obshashrange tests

parent c61e1577c62f
Pipeline #20297 passed with stage
in 4 minutes and 34 seconds
......@@ -205,150 +205,3 @@
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0050: 00 00 00 00 00 00 00 00 00 00 00 00 |............|
next let's see how caches deal with being written incorrectly
$ cat >> repack.py << EOF
> import struct
> import sys
> data = []
> with open(sys.argv[1], 'rb') as f:
> header = f.read(24)
> while True:
> buf = f.read(8)
> if not buf: break
> data.append(struct.unpack('<q', buf)[0])
> with open(sys.argv[1], 'wb') as f:
> f.write(header)
> for item in data:
> f.write(struct.pack('<l', item))
> EOF
$ cat >> truncate.py << EOF
> import os
> import sys
> with open(sys.argv[1], 'ab') as fp:
> fp.seek(int(sys.argv[2]), os.SEEK_END)
> fp.truncate()
> EOF
$ hg -R main debugdepth --rev 'all()' --method compare --debug
1ea73414a91b 1
66f7d451a68b 2
01241442b3c2 3
2dc09a01254d 4
bebd167eb94d 5
c8d03c1b5e94 6
f69452c5b1af 7
4de32a90b66c 8
$ "$PYTHON" repack.py main/.hg/cache/evoext-depthcache-00
$ f -H main/.hg/cache/evoext-depthcache-00
main/.hg/cache/evoext-depthcache-00:
0000: 00 00 00 07 4d e3 2a 90 b6 6c d0 83 eb f3 c0 0b |....M.*..l......|
0010: 41 27 7a a7 ab ca 51 dd 01 00 00 00 02 00 00 00 |A'z...Q.........|
0020: 03 00 00 00 04 00 00 00 05 00 00 00 06 00 00 00 |................|
0030: 07 00 00 00 08 00 00 00 |........|
$ hg -R main debugdepth --rev 'all()' --method compare --debug
depthcache file seems to be corrupted, it will be rebuilt from scratch
1ea73414a91b 1
66f7d451a68b 2
01241442b3c2 3
2dc09a01254d 4
bebd167eb94d 5
c8d03c1b5e94 6
f69452c5b1af 7
4de32a90b66c 8
$ "$PYTHON" truncate.py main/.hg/cache/evoext-depthcache-00 -4
$ f -H main/.hg/cache/evoext-depthcache-00
main/.hg/cache/evoext-depthcache-00:
0000: 00 00 00 07 4d e3 2a 90 b6 6c d0 83 eb f3 c0 0b |....M.*..l......|
0010: 41 27 7a a7 ab ca 51 dd 01 00 00 00 00 00 00 00 |A'z...Q.........|
0020: 02 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................|
0030: 04 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 |................|
0040: 06 00 00 00 00 00 00 00 07 00 00 00 00 00 00 00 |................|
0050: 08 00 00 00 |....|
$ hg -R main debugdepth --rev 'all()' --method compare --debug
depthcache file seems to be corrupted, it will be rebuilt from scratch
1ea73414a91b 1
66f7d451a68b 2
01241442b3c2 3
2dc09a01254d 4
bebd167eb94d 5
c8d03c1b5e94 6
f69452c5b1af 7
4de32a90b66c 8
$ hg -R main debugfirstmergecache --debug
1ea73414a91b -1
66f7d451a68b -1
01241442b3c2 -1
2dc09a01254d -1
bebd167eb94d -1
c8d03c1b5e94 -1
f69452c5b1af -1
4de32a90b66c -1
$ "$PYTHON" repack.py main/.hg/cache/evoext-firstmerge-00
$ f -H main/.hg/cache/evoext-firstmerge-00
main/.hg/cache/evoext-firstmerge-00:
0000: 00 00 00 07 4d e3 2a 90 b6 6c d0 83 eb f3 c0 0b |....M.*..l......|
0010: 41 27 7a a7 ab ca 51 dd ff ff ff ff ff ff ff ff |A'z...Q.........|
0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0030: ff ff ff ff ff ff ff ff |........|
$ hg -R main debugfirstmergecache --debug
firstmergecache file seems to be corrupted, it will be rebuilt from scratch
1ea73414a91b -1
66f7d451a68b -1
01241442b3c2 -1
2dc09a01254d -1
bebd167eb94d -1
c8d03c1b5e94 -1
f69452c5b1af -1
4de32a90b66c -1
$ "$PYTHON" truncate.py main/.hg/cache/evoext-firstmerge-00 -4
$ f -H main/.hg/cache/evoext-firstmerge-00
main/.hg/cache/evoext-firstmerge-00:
0000: 00 00 00 07 4d e3 2a 90 b6 6c d0 83 eb f3 c0 0b |....M.*..l......|
0010: 41 27 7a a7 ab ca 51 dd ff ff ff ff ff ff ff ff |A'z...Q.........|
0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0040: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
0050: ff ff ff ff |....|
$ hg -R main debugfirstmergecache --debug
firstmergecache file seems to be corrupted, it will be rebuilt from scratch
1ea73414a91b -1
66f7d451a68b -1
01241442b3c2 -1
2dc09a01254d -1
bebd167eb94d -1
c8d03c1b5e94 -1
f69452c5b1af -1
4de32a90b66c -1
$ hg -R main debugstablesortcache --debug
number of revisions: 8
number of merge: 0
number of jumps: 0
$ "$PYTHON" truncate.py main/.hg/cache/evoext-stablesortcache-00 -4
$ f -H main/.hg/cache/evoext-stablesortcache-00
main/.hg/cache/evoext-stablesortcache-00:
0000: 00 00 00 07 4d e3 2a 90 b6 6c d0 83 eb f3 c0 0b |....M.*..l......|
0010: 41 27 7a a7 ab ca 51 dd 00 00 00 40 00 00 00 00 |A'z...Q....@....|
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
0050: 00 00 00 00 00 00 00 00 |........|
$ hg -R main debugstablesortcache --debug
number of revisions: 8
stablesortcache file seems to be corrupted, it will be rebuilt from scratch
number of merge: 0
number of jumps: 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment