[03/46] Use unsupported in 'require'

Message ID 20221217000818.3729389-4-tom@tromey.com
State Committed
Headers
Series Rewrite "require" test procedure and use it more often |

Commit Message

Tom Tromey Dec. 17, 2022, 12:07 a.m. UTC
  This changes 'require' to use 'untested' rather than 'unsupported'.
The latter doesn't really seem to be correct according to the DejaGNU
documentation:

    Declares a test was not run.  `untested' writes in the log file a
    message beginning with _UNTESTED_, appending the `message' argument.
    For example, you might use this in a dummy test whose only role is to
    record that a test does not yet exist for some feature.

The example there, and some text elsewhere, is what makes me think
this isn't a great fit.  On the other hand, 'unsupported' says:

    Declares that a test case depends on some facility that does not exist
    in the testing environment.
---
 gdb/testsuite/lib/gdb.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Terekhov, Mikhail via Gdb-patches Dec. 23, 2022, 12:39 p.m. UTC | #1
On Saturday, December 17, 2022 1:08 AM, Tom Tromey wrote:
> This changes 'require' to use 'untested' rather than 'unsupported'.

I think you meant "use 'unsupported' rather than 'untested'".

Thanks
-Baris

> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index 62e519a3cb7..3509ff0a51d 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -9042,7 +9042,7 @@ proc require { args } {
>  	    set fn $arg
>  	}
>  	if {$ok != !![uplevel 1 $fn]} {
> -	    untested "require failed: $arg"
> +	    unsupported "require failed: $arg"
>  	    return -code return 0
>  	}
>      }
> --
> 2.38.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
  
Tom Tromey Jan. 6, 2023, 1:14 a.m. UTC | #2
> On Saturday, December 17, 2022 1:08 AM, Tom Tromey wrote:
>> This changes 'require' to use 'untested' rather than 'unsupported'.

> I think you meant "use 'unsupported' rather than 'untested'".

Thank you.  I made this change.

Tom
  

Patch

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 62e519a3cb7..3509ff0a51d 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -9042,7 +9042,7 @@  proc require { args } {
 	    set fn $arg
 	}
 	if {$ok != !![uplevel 1 $fn]} {
-	    untested "require failed: $arg"
+	    unsupported "require failed: $arg"
 	    return -code return 0
 	}
     }