diff --git a/functional-tests/era-functional-tests.scm b/functional-tests/era-functional-tests.scm index 9e5b082..d381cea 100644 --- a/functional-tests/era-functional-tests.scm +++ b/functional-tests/era-functional-tests.scm @@ -170,7 +170,7 @@ (with-empty-metadata (md) (receive (stdout stderr) (run-fail "era_restore" "--quiet" "-i" bad-xml "-o" md) (assert-eof stdout) - (assert-eof stderr))))) + (assert-starts-with "Couldn't stat file" stderr))))) (define-scenario (era-restore q-fail) "No output with --q(failing)" @@ -178,7 +178,7 @@ (with-empty-metadata (md) (receive (stdout stderr) (run-fail "era_restore" "-q" "-i" bad-xml "-o" md) (assert-eof stdout) - (assert-eof stderr))))) + (assert-starts-with "Couldn't stat file" stderr))))) (define-scenario (era-dump restore-is-noop) "era_dump followed by era_restore is a noop." diff --git a/functional-tests/process.scm b/functional-tests/process.scm index 884b703..4229399 100644 --- a/functional-tests/process.scm +++ b/functional-tests/process.scm @@ -49,16 +49,18 @@ (if (pred exit-code) (values stdout stderr) (begin - (info (fmt #f (dsp "stdout: ") stdout)) - (info (fmt #f (dsp "stderr: ") stderr)) - (fail (fmt #f (dsp "unexpected exit code (") - (num exit-code) - (dsp ")"))))))) + (let ((msg (fmt #f "unexpected exit code (" exit-code ")"))) + (info msg) + (fail msg)))))) (define (run-ok . cmd-and-args) (run-with-exit-code zero? cmd-and-args)) + ;; Exit code 139 is a segfault, which is not acceptable (define (run-fail . cmd-and-args) - (define (not-zero? x) (not (zero? x))) + (define (fails? x) (not + (or (= 139 x) + (zero? x)))) + + (run-with-exit-code fails? cmd-and-args))) - (run-with-exit-code not-zero? cmd-and-args))) diff --git a/functional-tests/scenario-string-constants.scm b/functional-tests/scenario-string-constants.scm index eb8e352..d1fa32e 100644 --- a/functional-tests/scenario-string-constants.scm +++ b/functional-tests/scenario-string-constants.scm @@ -109,13 +109,14 @@ Options: {--repair}") (define cache-metadata-size-help - "Usage: cache_metadata_size [options] + "Usage: cache_metadata_size [options] Options: {-h|--help} {-V|--version} {--block-size } {--device-size } {--nr-blocks } + {--max-hint-width } These all relate to the size of the fast device (eg, SSD), rather than the whole cached device.")