[*_dump] Fix segfault when given a tiny metadata file

This commit is contained in:
Joe Thornber
2017-09-21 10:22:38 +01:00
parent 7079b1ec9e
commit 48e7ab89a5
6 changed files with 37 additions and 3 deletions

View File

@ -245,6 +245,11 @@
(receive (stdout stderr) (run-fail "cache_dump")
(assert-starts-with "No input file provided." stderr)))
(define-scenario (cache-dump small-input-file)
"Fails with small input file"
(with-temp-file-sized ((md "cache.bin" 512))
(run-fail "cache_dump" md)))
(define-scenario (cache-dump restore-is-noop)
"cache_dump followed by cache_restore is a noop."
(with-valid-metadata (md)