From f2242fcb64147d9c6287660ff3e1634bbd5fad5d Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Mon, 16 Jul 2018 12:57:42 +0100 Subject: [PATCH] Ensure that mmqa tests require either a pass or a specified failure. Copied from Perforce Change: 194668 --- mps/test/function/135.c | 1 + mps/test/function/8.c | 1 + mps/test/function/98.c | 1 + mps/test/test/script/headread | 13 +++++++++++++ 4 files changed, 16 insertions(+) diff --git a/mps/test/function/135.c b/mps/test/function/135.c index c07b3531f2b..ac46463c50d 100644 --- a/mps/test/function/135.c +++ b/mps/test/function/135.c @@ -6,6 +6,7 @@ TEST_HEADER link = testlib.o OUTPUT_SPEC count < 10 + errtext = alloc: COMMIT_LIMIT END_HEADER */ diff --git a/mps/test/function/8.c b/mps/test/function/8.c index f2fa9a9af42..f4ba9c9056b 100644 --- a/mps/test/function/8.c +++ b/mps/test/function/8.c @@ -47,5 +47,6 @@ int main(void) /* Can't exhaust 64-bit address space by allocating, so fake a pass. */ report("arena", "%d", ARENAS); } + pass(); return 0; } diff --git a/mps/test/function/98.c b/mps/test/function/98.c index 051b7d3e9b0..68704bc3ad5 100644 --- a/mps/test/function/98.c +++ b/mps/test/function/98.c @@ -39,5 +39,6 @@ int main(void) /* Can't exhaust 64-bit address space by allocating, so fake a pass. */ report("arena", "%d", ARENAS); } + pass(); return 0; } diff --git a/mps/test/test/script/headread b/mps/test/test/script/headread index 42c7f9cfdf9..2841144aa2f 100644 --- a/mps/test/test/script/headread +++ b/mps/test/test/script/headread @@ -111,6 +111,19 @@ sub readheader { delete $spec_output{"result"}; delete $spec_rel{"result"}; } + # If the test case specifies neither completion nor failure, assume + # completion is intended. + my @expected_keys = qw(completed assert abort assert_or_abort errtext); + my $have_expected = 0; + foreach $key (@expected_keys) { + if (exists $spec_output{$key}) { + $have_expected = 1; + } + } + if (!$have_expected) { + $spec_output{"completed"} = "yes"; + $spec_rel{"completed"} = "="; + } } sub readvals {