GNU bug report logs - #71421
system info in test-suite.log

Previous Next

Package: automake;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Fri, 7 Jun 2024 22:49:01 UTC

Severity: normal

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71421 in the body.
You can then email your comments to 71421 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#71421; Package automake. (Fri, 07 Jun 2024 22:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bruno Haible <bruno <at> clisp.org>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Fri, 07 Jun 2024 22:49:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Haible <bruno <at> clisp.org>
To: bug-automake <at> gnu.org
Subject: system info in test-suite.log
Date: Fri, 07 Jun 2024 17:24:13 +0200
Hi,

The 1.16.90 NEWS file states:

  - test-suite.log now contains basic system information, and the
    console message about bug reporting on failure has a bit more detail.
    (bug#68746)

1) This system information is the naked output of some OS commands:

          (uname -a | awk '{$$2=""; print}') 2>&1; \
          if test -r /etc/os-release; then         \
            sed 8q /etc/os-release;                \
          elif test -r /etc/issue; then            \
            cat /etc/issue;                        \
          fi;                                      \

In my case:

Linux  5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 GNU/Linux
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"

The problem with this is that
  - It's not immediately clear to everyone what this information is.
  - It can get in the way, for example when I want to search for "Linux"
    among the test logs:
      grep '^Linux' test-suite.log

I would therefore suggest to mark them in some way:

System information: Linux  5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 GNU/Linux
Distribution:
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"

2) The double-space is confusing. It rings a bell immediately.
Can you find a way to omit not only the machine name, but also the space
before it?

3) Btw, one does not need a subshell in order to run a pipe.
Replace
  (uname -a | awk '{$$2=""; print}') 2>&1
with
  { uname -a | awk '{$$2=""; print}'; } 2>&1

Bruno







Information forwarded to bug-automake <at> gnu.org:
bug#71421; Package automake. (Mon, 17 Jun 2024 07:49:02 GMT) Full text and rfc822 format available.

Message #8 received at 71421 <at> debbugs.gnu.org (full text, mbox):

From: Collin Funk <collin.funk1 <at> gmail.com>
To: 71421 <at> debbugs.gnu.org
Subject: Re: system info in test-suite.log
Date: Mon, 17 Jun 2024 00:46:59 -0700
[Message part 1 (text/plain, inline)]
Hi Bruno,

You said:
> The problem with this is that
>   - It's not immediately clear to everyone what this information is.
>   - It can get in the way, for example when I want to search for "Linux"
>     among the test logs:
>       grep '^Linux' test-suite.log
>
> I would therefore suggest to mark them in some way:

I agree. Someone might not know the 'uname -a' output of their
machine. Solaris/SunOS comes to mind.

I've attached a patch that I think handles that and the extra space
you mentioned.

Here is what I see:

System information: Linux 6.8.11-300.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 27 14:53:33 UTC 2024 x86_64
Distribution:
NAME="Fedora Linux"
VERSION="40 (Workstation Edition)"
ID=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora Linux 40 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"

Collin
[0001-test-Improve-output-of-system-information-in-test-su.patch (text/x-patch, attachment)]

Information forwarded to bug-automake <at> gnu.org:
bug#71421; Package automake. (Mon, 17 Jun 2024 21:47:01 GMT) Full text and rfc822 format available.

Message #11 received at 71421 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: bruno <at> clisp.org, 71421 <at> debbugs.gnu.org, collin.funk1 <at> gmail.com
Subject: Re: bug#71421: system info in test-suite.log
Date: Mon, 17 Jun 2024 15:46:29 -0600
    I've attached a patch that I think handles that 

Thanks Collin. I installed it (with minor wording tweaks).

    and the extra space you mentioned.

I had thought the extra space was useful rather than confusing,
indicating that a word had been omitted from the output. But I'm fine
with leaving it out. -k

-----------------------------------------------------------------------------
test: Improve output of system information in test-suite.log.

Fixes https://bugs.gnu.org/71421.

* lib/am/check.am ($(TEST_SUITE_LOG): Use $(AWK) instead of 'awk'.
Remove an extra space in uname output.  Start the line with
"System information", and other sections with "Distribution
information".
* NEWS: add reference to #71421.
diff --git a/NEWS b/NEWS
index e4699a569..b0268d268 100644
--- a/NEWS
+++ b/NEWS
@@ -46,7 +46,7 @@ New in 1.17:

   - test-suite.log now contains basic system information, and the
     console message about bug reporting on failure has a bit more detail.
-    (bug#68746)
+    (bug#68746, bug#71421)

   - When using the (default) "parallel" test driver, you can now omit the
     output of skipped tests from test-suite.log by defining the
diff --git a/lib/am/check.am b/lib/am/check.am
index 526b445d5..ab1411ac5 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -370,14 +370,26 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 ## Function to write some basic system info in the log.
 	output_system_information () \
 	{ \
-## Omit the hostname for privacy.  In practice it's a single word?
-          echo;                                    \
-	  (uname -a | awk '{$$2=""; print}') 2>&1; \
-	  if test -r /etc/os-release; then         \
-	    sed 8q /etc/os-release;                \
-	  elif test -r /etc/issue; then            \
-	    cat /etc/issue;                        \
-	  fi;                                      \
+## Omit the hostname for privacy.  Always a single word.
+## Start the line with a label for clarity, and so commands like
+## grep ^Linux don't get a false hit.
+          echo;                                     \
+	  { uname -a | $(AWK) '{                    \
+  printf "System information (uname -a):";          \
+  for (i = 1; i < NF; ++i)                          \
+    {                                               \
+      if (i != 2)                                   \
+        printf " %s", $$i;                          \
+    }                                               \
+  printf "\n";                                      \
+}'; } 2>&1;                                         \
+	  if test -r /etc/os-release; then          \
+	    echo "Distribution information (/etc/os-release):"; \
+	    sed 8q /etc/os-release;                 \
+	  elif test -r /etc/issue; then             \
+	    echo "Distribution information (/etc/issue):";      \
+	    cat /etc/issue;                         \
+	  fi;                                       \
 	}; \
 ##
 ## Function to output the "please report bugs" message.

compile finished at Mon Jun 17 14:44:28 2024




Reply sent to Karl Berry <karl <at> freefriends.org>:
You have taken responsibility. (Mon, 17 Jun 2024 21:47:02 GMT) Full text and rfc822 format available.

Notification sent to Bruno Haible <bruno <at> clisp.org>:
bug acknowledged by developer. (Mon, 17 Jun 2024 21:47:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#71421; Package automake. (Mon, 17 Jun 2024 22:17:02 GMT) Full text and rfc822 format available.

Message #19 received at 71421 <at> debbugs.gnu.org (full text, mbox):

From: Collin Funk <collin.funk1 <at> gmail.com>
To: Karl Berry <karl <at> freefriends.org>, bruno <at> clisp.org, 71421 <at> debbugs.gnu.org
Subject: Re: bug#71421: system info in test-suite.log
Date: Mon, 17 Jun 2024 15:14:53 -0700
Karl Berry wrote:
> Thanks Collin. I installed it (with minor wording tweaks).

Looks good, thanks.

> I had thought the extra space was useful rather than confusing,
> indicating that a word had been omitted from the output. But I'm fine
> with leaving it out. -k

I didn't mind it much but I do think it looks better without.

Collin




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 16 Jul 2024 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.