dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Excluding FAILs from UNSUPPORTED test cases


From: Arsen Arsenović
Subject: Excluding FAILs from UNSUPPORTED test cases
Date: Thu, 22 Sep 2022 15:36:25 +0200

Hi,

While working on freestanding libstdc++, we came up with the idea to use 
a special error message to detect tests that use headers that don't work 
in freestanding, and mark them as unsupported by emitting 
::unsupported:: from libstdc++-dg-test.
However, in combination with dg-warn and dg-error, this does not behave 
as intended: the errors those expect will not be emitted, and extra 
errors will be emitted, hence files that should be UNSUPPORTED are 
counted as FAILs (test for excess errors/test for errors, line NN) as 
well as UNSUPPORTED.

I have a workaround for this issue:
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/
testsuite/lib/libstdc++.exp
index f9a165c3d61..526f0fbab73 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -428,6 +428,10 @@ proc libstdc++-dg-test { prog do_what 
extra_tool_flags } {
 
     set unsupported_message [libstdc++_check_unsupported_p 
$comp_output]
     if { $unsupported_message != "" } {
+       upvar dg-messages messages
+       upvar dg-excess-errors-flag excess-errors-flag
+       set messages [list]
+       set excess-errors-flag 1
        set comp_output "::unsupported::$unsupported_message"
     }
 

... however, it feels prone to breakage (since it depends on how dg-test 
is implemented).

Is there a better way to solve this?

Thanks in advance, and have a most wonderful day,
-- 
Arsen Arsenović

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]