[testsuite] debuginfod.exp canonicalization

Message ID 20240920202318.GE9443@redhat.com
State New
Headers
Series [testsuite] debuginfod.exp canonicalization |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

Frank Ch. Eigler Sept. 20, 2024, 8:23 p.m. UTC
  Hi -

The following little patch makes a few binutils test results more
comparable across builds/versions.  There's another one coming for
libctf.


commit a139fd518a73915c1e87737e645df0591af97486 (HEAD -> master)
Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Fri Sep 20 16:19:41 2024 -0400

    binutils testsuite: canonicalize subtest names in debuginfod.exp
    
    Previous code included the full $srcdir pathnames in the individual
    subtest PASS/FAIL names, which makes it difficult to compute
    comparisons or regressions between test runs on different machines.
    This version switches to the basename only, which are common.
    
    Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
  

Comments

Alan Modra Sept. 24, 2024, 10:29 p.m. UTC | #1
On Fri, Sep 20, 2024 at 04:23:18PM -0400, Frank Ch. Eigler wrote:
> Hi -
> 
> The following little patch makes a few binutils test results more
> comparable across builds/versions.  There's another one coming for
> libctf.

Thanks, please apply.

> commit a139fd518a73915c1e87737e645df0591af97486 (HEAD -> master)
> Author: Frank Ch. Eigler <fche@redhat.com>
> Date:   Fri Sep 20 16:19:41 2024 -0400
> 
>     binutils testsuite: canonicalize subtest names in debuginfod.exp
>     
>     Previous code included the full $srcdir pathnames in the individual
>     subtest PASS/FAIL names, which makes it difficult to compute
>     comparisons or regressions between test runs on different machines.
>     This version switches to the basename only, which are common.
>     
>     Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
> 
> diff --git a/binutils/testsuite/binutils-all/debuginfod.exp b/binutils/testsuite/binutils-all/debuginfod.exp
> index 2f7464458000..af0dc092fe96 100644
> --- a/binutils/testsuite/binutils-all/debuginfod.exp
> +++ b/binutils/testsuite/binutils-all/debuginfod.exp
> @@ -34,12 +34,12 @@ if { ![is_elf_format] || ![isnative] } {
>  }
>  
>  if { [which $OBJDUMP] == 0} {
> -    perror "$test $OBJDUMP (does not exist)"
> +    perror "$test [file tail $OBJDUMP] (does not exist)"
>      return
>  }
>  
>   if { [which $READELF] == 0} {
> -    perror "$test $READELF (does not exist)"
> +     perror "$test [file tail $READELF] (does not exist)"
>      return
>  }
>  
> @@ -162,9 +162,9 @@ proc test_fetch_debuglink { prog progargs } {
>      set got [binutils_run $prog "$progargs tmpdir/testprog"]
>  
>      if { [regexp ".*Found separate debug info file.*Contents\[^\n\]*loaded from\[^\n\]*" $got] } {
> -       pass "$test ($prog debuglink)"
> +        pass "$test ([file tail $prog] debuglink)"
>      } else {
> -       fail "$test ($prog did not find debuglink to cache $cache)"
> +        fail "$test ([file tail $prog] did not find debuglink to cache)"
>      }
>  }
>  
> @@ -178,9 +178,9 @@ proc test_fetch_debugaltlink { prog progargs } {
>      set buildid "00112233445566778899aabbccddeeff0123456789abcdef"
>  
>      if { [regexp ".*Found separate debug info file\[^\n\]*$cache/$buildid" $got] } {
> -        pass "$test ($prog debugaltlink)"
> +        pass "$test ([file tail $prog] debugaltlink)"
>      } else {
> -        fail "$test ($prog could not load debugaltlink)"
> +        fail "$test ([file tail $prog] could not load debugaltlink)"
>      }
>  }
>
  

Patch

diff --git a/binutils/testsuite/binutils-all/debuginfod.exp b/binutils/testsuite/binutils-all/debuginfod.exp
index 2f7464458000..af0dc092fe96 100644
--- a/binutils/testsuite/binutils-all/debuginfod.exp
+++ b/binutils/testsuite/binutils-all/debuginfod.exp
@@ -34,12 +34,12 @@  if { ![is_elf_format] || ![isnative] } {
 }
 
 if { [which $OBJDUMP] == 0} {
-    perror "$test $OBJDUMP (does not exist)"
+    perror "$test [file tail $OBJDUMP] (does not exist)"
     return
 }
 
  if { [which $READELF] == 0} {
-    perror "$test $READELF (does not exist)"
+     perror "$test [file tail $READELF] (does not exist)"
     return
 }
 
@@ -162,9 +162,9 @@  proc test_fetch_debuglink { prog progargs } {
     set got [binutils_run $prog "$progargs tmpdir/testprog"]
 
     if { [regexp ".*Found separate debug info file.*Contents\[^\n\]*loaded from\[^\n\]*" $got] } {
-       pass "$test ($prog debuglink)"
+        pass "$test ([file tail $prog] debuglink)"
     } else {
-       fail "$test ($prog did not find debuglink to cache $cache)"
+        fail "$test ([file tail $prog] did not find debuglink to cache)"
     }
 }
 
@@ -178,9 +178,9 @@  proc test_fetch_debugaltlink { prog progargs } {
     set buildid "00112233445566778899aabbccddeeff0123456789abcdef"
 
     if { [regexp ".*Found separate debug info file\[^\n\]*$cache/$buildid" $got] } {
-        pass "$test ($prog debugaltlink)"
+        pass "$test ([file tail $prog] debugaltlink)"
     } else {
-        fail "$test ($prog could not load debugaltlink)"
+        fail "$test ([file tail $prog] could not load debugaltlink)"
     }
 }