bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tests: Avoid skipping stty-* tests.


From: Jim Meyering
Subject: Re: [PATCH] tests: Avoid skipping stty-* tests.
Date: Tue, 10 Feb 2009 14:45:56 +0100

Nix <address@hidden> wrote:
> tests/test-lib.sh (require_controlling_input_terminal_): Check stdout,
> not stdin.
> ---
> This testsuite bug causes the stty tests to be skipped, always, because
> it's testing stdout, not stdin, and the testsuite engine redirects stdout
> to a logfile. They still pass, despite not being run for lo these many
> years.
>
> Patch against HEAD. (I'm pretty certain it doesn't require a copyright
> assignment. ;) )

Thank you!
Applied that almost verbatim.
I added a "*" before the file name in the log, so it'll be properly
formatted in the generated ChangeLog file.

Also, I removed the trailing "." on the summary line and downcased the
first word, for consistency with other multi-line log messages.

FWIW, when I run "make check" on a F10 system, the 3 stty* tests
are still skipped.  However, when I run them individually, with
your correction, they now _do_ PASS.

While at it, I noticed a little room for improvement in test-lib.sh
so did this:

>From 1f4fcd083d3c24349a4cc7b4a4d0ef4aad9d26e6 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 10 Feb 2009 14:30:06 +0100
Subject: [PATCH] * tests/test-lib.sh: Use skip_test_... in place of 
echo...;exit 77.

---
 tests/test-lib.sh |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index 0c04af8..845c452 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -70,10 +70,9 @@ require_controlling_input_terminal_()
   tty -s || have_input_tty=no
   test -t 0 || have_input_tty=no
   if test "$have_input_tty" = no; then
-    echo "$0: This test must have a controlling input \`terminal'," 1>&2
-    echo "  so it may not be run via \`batch', \`at', or \`rsh'." 1>&2
-    echo "  On some systems, it may not even be run in the background." 1>&2
-    (exit 77); exit 77
+    skip_test_ "This test must have a controlling input \`terminal'," \
+      "so it may not be run via \`batch', \`at', or \`rsh'." \
+      "On some systems, it may not even be run in the background."
   fi
 }

--
1.6.2.rc0.186.g417c




reply via email to

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