GNU bug report logs - #8571
misc/tty-eof SKIP reason

Previous Next

Package: coreutils;

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

Date: Wed, 27 Apr 2011 23:15:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Meyering <jim <at> meyering.net>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#8571: closed (misc/tty-eof SKIP reason)
Date: Thu, 28 Apr 2011 09:17:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 28 Apr 2011 11:16:42 +0200
with message-id <87mxja20sl.fsf <at> rho.meyering.net>
and subject line Re: bug#8571: misc/tty-eof SKIP reason
has caused the GNU bug report #8571,
regarding misc/tty-eof SKIP reason
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
8571: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8571
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Bruno Haible <bruno <at> clisp.org>
To: bug-coreutils <at> gnu.org
Subject: misc/tty-eof SKIP reason
Date: Thu, 28 Apr 2011 01:14:03 +0200
Hi,

building coreutils 8.12 on a Linux 2.6.25.20, glibc 2.8 machine, "make check"
shows this line:

  SKIP: misc/tty-eof

But unlike for the other tests that are skipped, there is no explanation why
it was skipped. I have to look into the misc/tty-eof.log file, there I find:
  tty-eof: this script requires Perl's Expect package >=1.11

Could the explanation be repeated in stdout or stderr, like for the other
tests when they are skipped?

Bruno
-- 
In memoriam Marian Batko <http://pl.wikipedia.org/wiki/Marian_Batko>
<http://en.auschwitz.org.pl/m/index.php?Itemid=8&id=478&option=com_content&task=view>


[Message part 3 (message/rfc822, inline)]
From: Jim Meyering <jim <at> meyering.net>
To: Bruno Haible <bruno <at> clisp.org>
Cc: 8571-done <at> debbugs.gnu.org
Subject: Re: bug#8571: misc/tty-eof SKIP reason
Date: Thu, 28 Apr 2011 11:16:42 +0200
Bruno Haible wrote:
> building coreutils 8.12 on a Linux 2.6.25.20, glibc 2.8 machine, "make check"
> shows this line:
>
>   SKIP: misc/tty-eof
>
> But unlike for the other tests that are skipped, there is no explanation why
> it was skipped. I have to look into the misc/tty-eof.log file, there I find:
>   tty-eof: this script requires Perl's Expect package >=1.11
>
> Could the explanation be repeated in stdout or stderr, like for the other
> tests when they are skipped?

Sure.

From 11a5a943f6c557f5cc057f073bed67829b0a05d0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering <at> redhat.com>
Date: Thu, 28 Apr 2011 11:12:01 +0200
Subject: [PATCH] tests: tty-eof: when skipping, announce the reason to outer
 stderr,

where a person will be more likely to see it, not just to the log file.
* tests/misc/tty-eof (emit_skip_msg): New function.
Use it instead of "warn".
Suggested by Bruno Haible.
---
 tests/misc/tty-eof |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof
index 14910dc..f5a6159 100755
--- a/tests/misc/tty-eof
+++ b/tests/misc/tty-eof
@@ -22,11 +22,26 @@
 use strict;
 (my $ME = $0) =~ s|.*/||;

+# Emit a diagnostic both to stderr and to $stderr_fileno_.
+# FIXME: don't hard-code that value (9), since it's already defined in init.cfg.
+sub emit_skip_msg ($)
+{
+  my ($msg) = @_;
+  my $stderr_fileno_ = 9;
+  warn $msg;
+  open FH, ">&$stderr_fileno_"
+    or warn "$ME: failed to dup stderr\n";
+  print FH $msg;
+  close FH
+    or warn "$ME: failed to close FD $stderr_fileno_\n";
+}
+
 # Some older versions of Expect.pm (e.g. 1.07) lack the log_user method,
 # so check for that, too.
 eval { require Expect; Expect->require_version('1.11') };
-$@ and (warn "$ME: this script requires Perl's Expect package >=1.11\n"),
-  exit 77;
+$@
+  and emit_skip_msg "$ME: this script requires Perl's Expect package >=1.11\n",
+    exit 77;

 {
   my $fail = 0;
--
1.7.5.421.g9d34e


This bug report was last modified 14 years and 28 days ago.

Previous Next


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