bug-coreutils
[Top][All Lists]
Advanced

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

3 more test-changes


From: Jim Meyering
Subject: 3 more test-changes
Date: Sat, 21 Feb 2009 19:53:07 +0100

FYI, there were a few minor problems.
Running "make check" in the background would hang
and the new install-C test would fail in a directory with
the setgid bit set.

I've fixed the first, but since I'm not sure "trap '' TTOU" is
portable the second change-set just makes it so all three of the
affected tests are skipped unconditionally.  I'll revert c-set #2
right after release.

The third just skips the install-C test when necessary.

>From cd78f85b0b0eabf09466f5aa689561f23e242f5e Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 21 Feb 2009 11:30:41 +0100
Subject: [PATCH 1/3] tests: don't let SIGTTOU/TTIN hang a backgrounded "make 
check"

Running "make check &" would hang due to SIGTTOU and SIGTTIN signals.
* tests/misc/stty: Ignore SIGTTOU.
* tests/misc/stty-invalid: Likewise.
* tests/mv/i-3: Ignore SIGTTIN.
---
 tests/misc/stty         |    3 ++-
 tests/misc/stty-invalid |    3 ++-
 tests/mv/i-3            |    3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/misc/stty b/tests/misc/stty
index c53f6c4..b607ec0 100755
--- a/tests/misc/stty
+++ b/tests/misc/stty
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Make sure stty can parse most of its options.

-# Copyright (C) 1998-2004, 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 1998-2004, 2006-2009 Free Software Foundation, Inc.

 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@ fi
 # Make sure there's a tty on stdin.
 . $srcdir/test-lib.sh
 require_controlling_input_terminal_
+trap '' TTOU # Ignore SIGTTOU

 # The following list of reversible options was generated with
 # grep -w REV stty.c|sed -n '/^  {"/{s//REV_/;s/".*/=1/;p;}'|fmt
diff --git a/tests/misc/stty-invalid b/tests/misc/stty-invalid
index 47531c5..d9f0777 100755
--- a/tests/misc/stty-invalid
+++ b/tests/misc/stty-invalid
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Ensure that stty diagnoses invalid inputs, rather than silently misbehaving.

-# Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# Copyright (C) 2007-2009 Free Software Foundation, Inc.

 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@ fi

 . $srcdir/test-lib.sh
 require_controlling_input_terminal_
+trap '' TTOU # Ignore SIGTTOU

 fail=0

diff --git a/tests/mv/i-3 b/tests/mv/i-3
index b9cd7d9..d1f119c 100755
--- a/tests/mv/i-3
+++ b/tests/mv/i-3
@@ -2,7 +2,7 @@
 # Make sure that `mv file unwritable-file' prompts the user
 # and that `mv -f file unwritable-file' doesn't.

-# Copyright (C) 2001, 2004, 2006-2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2006-2009 Free Software Foundation, Inc.

 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@ fi
 . $srcdir/test-lib.sh
 require_controlling_input_terminal_
 skip_if_root_
+trap '' TTIN # Ignore SIGTTIN

 touch f g h i || framework_failure
 chmod 0 g i || framework_failure
--
1.6.2.rc1.256.g58a87


>From 773a88d33f68e50a2919c8a8310c646a7e5fabc2 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 21 Feb 2009 15:56:26 +0100
Subject: [PATCH 2/3] tests: skip newly-modified tests unconditionally, just to 
be safe

* tests/misc/stty-invalid: Skip.
* tests/misc/stty: Likewise.
* tests/mv/i-3: Likewise.
---
 tests/misc/stty         |    3 +++
 tests/misc/stty-invalid |    3 +++
 tests/mv/i-3            |    3 +++
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/tests/misc/stty b/tests/misc/stty
index b607ec0..58c9eee 100755
--- a/tests/misc/stty
+++ b/tests/misc/stty
@@ -24,6 +24,9 @@ fi
 # Make sure there's a tty on stdin.
 . $srcdir/test-lib.sh
 require_controlling_input_terminal_
+
+skip_test_ FIXME: skip, until portability of trap ... TTOU is assured
+
 trap '' TTOU # Ignore SIGTTOU

 # The following list of reversible options was generated with
diff --git a/tests/misc/stty-invalid b/tests/misc/stty-invalid
index d9f0777..0d10128 100755
--- a/tests/misc/stty-invalid
+++ b/tests/misc/stty-invalid
@@ -23,6 +23,9 @@ fi

 . $srcdir/test-lib.sh
 require_controlling_input_terminal_
+
+skip_test_ FIXME: skip, until portability of trap ... TTOU is assured
+
 trap '' TTOU # Ignore SIGTTOU

 fail=0
diff --git a/tests/mv/i-3 b/tests/mv/i-3
index d1f119c..579077b 100755
--- a/tests/mv/i-3
+++ b/tests/mv/i-3
@@ -25,6 +25,9 @@ fi
 . $srcdir/test-lib.sh
 require_controlling_input_terminal_
 skip_if_root_
+
+skip_test_ FIXME: skip, until portability of trap ... TTIN is assured
+
 trap '' TTIN # Ignore SIGTTIN

 touch f g h i || framework_failure
--
1.6.2.rc1.256.g58a87


>From 31896c21c6ab32f8c897b36ec1507696657121cf Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 21 Feb 2009 19:48:30 +0100
Subject: [PATCH 3/3] tests: skip new install-C test if working directory is 
set-gid

* tests/install/install-C: Use setgid-check.
---
 tests/install/install-C |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tests/install/install-C b/tests/install/install-C
index 2cddaff..3bf0c7b 100755
--- a/tests/install/install-C
+++ b/tests/install/install-C
@@ -22,6 +22,7 @@ if test "$VERBOSE" = yes; then
 fi

 . $srcdir/test-lib.sh
+. "$abs_srcdir/setgid-check"

 mode1=0644
 mode2=0755
--
1.6.2.rc1.256.g58a87




reply via email to

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