From 1524831224a350d6c0d96f2e32414ea072d5b0ff Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Mon, 8 May 2006 12:46:41 +0000 Subject: [PATCH] Call AT_SORT_PREREQ. Remove fd 2 redirection after sort invocations --- tests/extrac04.at | 5 +++-- tests/incr03.at | 9 +++++---- tests/listed02.at | 5 +++-- tests/pipe.at | 6 ++++-- tests/rename01.at | 2 ++ tests/rename02.at | 1 + tests/rename03.at | 2 ++ tests/same-order01.at | 4 +++- tests/update.at | 5 +++-- 9 files changed, 26 insertions(+), 13 deletions(-) diff --git a/tests/extrac04.at b/tests/extrac04.at index 22c7582..1cbc520 100644 --- a/tests/extrac04.at +++ b/tests/extrac04.at @@ -1,7 +1,7 @@ # Process this file with autom4te to create testsuite. -*- Autotest -*- # Test suite for GNU tar. -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2006 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 @@ AT_SETUP([extract + fnmatch]) AT_KEYWORDS([extract extract04]) AT_TAR_CHECK([ +AT_SORT_PREREQ touch file1 mkdir directory mkdir directory/subdirectory @@ -35,7 +36,7 @@ tar -cf archive ./file1 directory tar -tf archive \ --exclude='./*1' \ --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort 2>/dev/null + --exclude='d*/s*/*2' | sort ], [0], [directory/ diff --git a/tests/incr03.at b/tests/incr03.at index 0d5b835..474ae7f 100644 --- a/tests/incr03.at +++ b/tests/incr03.at @@ -29,6 +29,7 @@ AT_SETUP([renamed files in incrementals]) AT_KEYWORDS([incremental incr03 rename]) AT_TAR_CHECK([ +AT_SORT_PREREQ mkdir directory genfile --file=directory/x genfile --file=directory/y @@ -41,17 +42,17 @@ tar -cf archive.2 -g db directory mv directory orig echo Listing of archive.1 -tar -tf archive.1 | sort 2>/dev/null +tar -tf archive.1 | sort echo Listing of archive.2 -tar -tf archive.2 | sort 2>/dev/null +tar -tf archive.2 | sort echo Directory after first restore tar -xf archive.1 -g db -find directory | sort 2>/dev/null +find directory | sort echo Directory after second restore tar -xf archive.2 -g db -find directory | sort 2>/dev/null +find directory | sort ], [0], [Listing of archive.1 diff --git a/tests/listed02.at b/tests/listed02.at index d1c773f..5040c08 100644 --- a/tests/listed02.at +++ b/tests/listed02.at @@ -29,8 +29,9 @@ AT_SETUP([working --listed]) AT_KEYWORDS([listed incremental listed02]) AT_TAR_CHECK([ - +AT_SORT_PREREQ echo Create directories + mkdir tart sleep 1 mkdir tart/c0 @@ -50,7 +51,7 @@ tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 # The above prints two lines to stderr announcing the new directories c0 and c1. # Ensure that they appear in this script's stderr in sorted order. -sort err 1>&2 2>/dev/null; rm -f err +sort err 1>&2; rm -f err sleep 1 echo Modifying filesystem diff --git a/tests/pipe.at b/tests/pipe.at index 07e4d8d..c557b29 100644 --- a/tests/pipe.at +++ b/tests/pipe.at @@ -31,12 +31,14 @@ AT_SETUP([decompressing from stdin]) AT_KEYWORDS([pipe]) AT_TAR_CHECK([ +AT_SORT_PREREQ + mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort 2>/dev/null +tar cf archive directory|sort mv directory orig -cat archive | tar xfv - | sort 2>/dev/null +cat archive | tar xfv - | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" diff --git a/tests/rename01.at b/tests/rename01.at index c992da8..52e139b 100644 --- a/tests/rename01.at +++ b/tests/rename01.at @@ -25,6 +25,8 @@ AT_SETUP([renamed dirs in incrementals]) AT_KEYWORDS([incremental rename rename01]) AT_TAR_CHECK([ +AT_SORT_PREREQ + mkdir foo genfile --file foo/file1 genfile --file foo/file2 diff --git a/tests/rename02.at b/tests/rename02.at index 8fffe73..c623851 100644 --- a/tests/rename02.at +++ b/tests/rename02.at @@ -25,6 +25,7 @@ AT_SETUP([move between hierarchies]) AT_KEYWORDS([incremental rename rename02]) AT_TAR_CHECK([ +AT_SORT_PREREQ mkdir foo genfile --file foo/file1 genfile --file foo/file2 diff --git a/tests/rename03.at b/tests/rename03.at index 83b0c18..138ef00 100644 --- a/tests/rename03.at +++ b/tests/rename03.at @@ -24,6 +24,8 @@ AT_SETUP([cyclic renames]) AT_KEYWORDS([incremental rename rename03 cyclic-rename]) AT_TAR_CHECK([ +AT_SORT_PREREQ + mkdir foo genfile --file foo/file1 genfile --file foo/file2 diff --git a/tests/same-order01.at b/tests/same-order01.at index e065953..e04c812 100644 --- a/tests/same-order01.at +++ b/tests/same-order01.at @@ -27,6 +27,8 @@ AT_SETUP([same-order01]) AT_KEYWORDS([same-order same-order01]) AT_TAR_CHECK([ +AT_SORT_PREREQ + genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 @@ -34,7 +36,7 @@ tar cf archive file1 file2 mkdir directory tar -xf archive --same-order -C directory || exit 1 -ls directory|sort 2>/dev/null +ls directory|sort ], [0], [file1 diff --git a/tests/update.at b/tests/update.at index 067c634..30fc2dc 100644 --- a/tests/update.at +++ b/tests/update.at @@ -1,7 +1,7 @@ # Process this file with autom4te to create testsuite. -*- Autotest -*- # Test suite for GNU tar. -# Copyright (C) 2005 Free Software Foundation, Inc. +# Copyright (C) 2005, 2006 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 @@ -28,6 +28,7 @@ AT_SETUP([update unchanged directories]) AT_KEYWORDS([update]) AT_TAR_CHECK([ +AT_SORT_PREREQ mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 10240 --pattern default --file directory/file2 @@ -36,7 +37,7 @@ tar cf archive directory || exit 1 echo separator tar uf archive directory || exit 1 echo separator -tar tf archive | sort 2>/dev/null || exit 1 +tar tf archive | sort || exit 1 ], [0], [separator -- 2.45.2