tests: skip SIGPIPE-dependent tests in environments ignoring SIGPIPE
Problem reported by Sven Joachim in <http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00043.html>. * tests/remfiles01.at: Use AT_SIGPIPE_PREREQ. * tests/sigpipe.at: Likewise. * tests/testsuite.at (AT_SIGPIPE_PREREQ): New macro.
This commit is contained in:
@@ -32,6 +32,7 @@ unset TAR_OPTIONS
|
|||||||
AT_CHECK([
|
AT_CHECK([
|
||||||
AT_UNPRIVILEGED_PREREQ
|
AT_UNPRIVILEGED_PREREQ
|
||||||
AT_GZIP_PREREQ
|
AT_GZIP_PREREQ
|
||||||
|
AT_SIGPIPE_PREREQ
|
||||||
AT_SORT_PREREQ
|
AT_SORT_PREREQ
|
||||||
|
|
||||||
mkdir dir
|
mkdir dir
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ AT_KEYWORDS([sigpipe])
|
|||||||
# <20100319184141.GC30047@wo.int.altlinux.org>
|
# <20100319184141.GC30047@wo.int.altlinux.org>
|
||||||
|
|
||||||
AT_CHECK([
|
AT_CHECK([
|
||||||
|
AT_SIGPIPE_PREREQ
|
||||||
|
|
||||||
genfile --length 2048 --file first
|
genfile --length 2048 --file first
|
||||||
genfile --length 2048 --file second
|
genfile --length 2048 --file second
|
||||||
genfile --length 2049 --file third
|
genfile --length 2049 --file third
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
# Process this file with autom4te to create testsuite. -*- Autotest -*-
|
# Process this file with autom4te to create testsuite. -*- Autotest -*-
|
||||||
|
|
||||||
# Test suite for GNU tar.
|
# Test suite for GNU tar.
|
||||||
# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Free Software
|
||||||
|
# Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -80,6 +81,13 @@ m4_define([AT_GZIP_PREREQ],[
|
|||||||
cat /dev/null | m4_if([$1],[],gzip,[$1]) - > /dev/null 2>&1 || AT_SKIP_TEST
|
cat /dev/null | m4_if([$1],[],gzip,[$1]) - > /dev/null 2>&1 || AT_SKIP_TEST
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl AT_SIGPIPE_PREREQ - Skip test unless SIGPIPE handling is the default
|
||||||
|
m4_define([AT_SIGPIPE_PREREQ],[
|
||||||
|
case `(cat "$at_myself" 2>&3 | :) 3>&1 >/dev/null` in #(
|
||||||
|
?*) AT_SKIP_TEST;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
dnl AT_SORT_PREREQ - Skip test if sort utility outputs unwanted data on stderr
|
dnl AT_SORT_PREREQ - Skip test if sort utility outputs unwanted data on stderr
|
||||||
m4_define([AT_SORT_PREREQ],[
|
m4_define([AT_SORT_PREREQ],[
|
||||||
test -z "`sort < /dev/null 2>&1`" || AT_SKIP_TEST
|
test -z "`sort < /dev/null 2>&1`" || AT_SKIP_TEST
|
||||||
|
|||||||
Reference in New Issue
Block a user