Mercurial > hg
changeset 52118:1bebe07bfd40
tests: conditionalize undesired output on Windows for rbc the mmap cases
I don't want to lose sight of this issue, and it's useful to be able to turn on
mmap support to hack on the underlying problem. As noted in the previous commit,
I think the current usage of `mmap` and `memoryview` needs to be reworked for
correctness on posix anyway.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 18 Oct 2024 14:14:24 -0400 |
parents | db1980a361cb |
children | d12dc9139135 |
files | tests/test-branches.t |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-branches.t Fri Oct 18 13:21:23 2024 -0400 +++ b/tests/test-branches.t Fri Oct 18 14:14:24 2024 -0400 @@ -869,6 +869,7 @@ resetting content of cache/rbc-revs-v2 $ f --size .hg/cache/rbc-revs* .hg/cache/rbc-revs-v2: size=160 + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) recovery from invalid cache file with missing record - no truncation $ mv .hg/cache/rbc-revs-v2 . @@ -877,15 +878,18 @@ 5 $ f --size .hg/cache/rbc-revs* .hg/cache/rbc-revs-v2: size=160 + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) recovery from invalid cache file with some bad records $ mv .hg/cache/rbc-revs-v2 . $ f -qDB 8 rbc-revs-v2 > .hg/cache/rbc-revs-v2 $ f --size .hg/cache/rbc-revs* .hg/cache/rbc-revs-v2: size=8 + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) $ f -qDB 112 rbc-revs-v2 >> .hg/cache/rbc-revs-v2 $ f --size .hg/cache/rbc-revs* .hg/cache/rbc-revs-v2: size=120 + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) $ hg log -r 'branch(.)' -T '{rev} ' --debug history modification detected - truncating revision branch cache to revision * (glob) history modification detected - truncating revision branch cache to revision 1 @@ -896,6 +900,8 @@ $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs* .hg/cache/rbc-revs-v2: size=160 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) + 0000: 19 70 9c 5a 00 00 00 00 dd 6b 44 0d 00 00 00 01 |.p.Z.....kD.....| (known-bad-output mmap windows !) Smoothly reuse "v1" format if no v2 exists ------------------------------------------ @@ -918,6 +924,7 @@ .hg/cache/rbc-names-v2: size=92 .hg/cache/rbc-revs-v1: size=160 .hg/cache/rbc-revs-v2: size=160 + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) Write operation write a full v2 files @@ -927,6 +934,7 @@ $ f --size .hg/cache/rbc-* .hg/cache/rbc-names-v1: size=92 .hg/cache/rbc-revs-v1: size=160 + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) $ hg branch not-here-for-long marked working directory as branch not-here-for-long $ hg ci -m not-long --debug @@ -939,6 +947,7 @@ .hg/cache/rbc-names-v2: size=110 .hg/cache/rbc-revs-v1: size=160 .hg/cache/rbc-revs-v2: size=168 + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) So does explicit cache upgrade $ mv .hg/cache/rbc-names-v2 .hg/cache/rbc-names-v1 @@ -946,12 +955,14 @@ $ f --size .hg/cache/rbc-* .hg/cache/rbc-names-v1: size=110 .hg/cache/rbc-revs-v1: size=168 + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) $ hg debugupdatecache $ f --size .hg/cache/rbc-* .hg/cache/rbc-names-v1: size=110 .hg/cache/rbc-names-v2: size=110 .hg/cache/rbc-revs-v1: size=168 .hg/cache/rbc-revs-v2: size=168 + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) With invalid v1 data, we rewrite it too (as v2) @@ -968,6 +979,7 @@ .hg/cache/rbc-names-v2: size=110 .hg/cache/rbc-revs-v1: size=110 .hg/cache/rbc-revs-v2: size=168 + .hg/cache/rbc-revs-v2-*: size=119 (glob) (known-bad-output mmap windows !) cleanup