Browse Source

Always use genfile --file, this enables extra error checking.

Sergey Poznyakoff 19 years ago
parent
commit
c576ac1354

+ 3 - 3
tests/comprec.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,7 +24,7 @@ AT_KEYWORDS([comprec])
 
 AT_TAR_CHECK([
 AT_GZIP_PREREQ
-genfile --length 10240  > file1
+genfile --length 10240 --file file1
 echo "separator"
 tar cfz archive file1
 echo "separator"
@@ -38,4 +38,4 @@ separator
 file1
 ])
 
-AT_CLEANUP
+AT_CLEANUP

+ 3 - 3
tests/delete01.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,8 +24,8 @@ AT_SETUP([deleting a member after a big one])
 AT_KEYWORDS([delete delete01])
 
 AT_TAR_CHECK([
-genfile -l 50000 > file1
-genfile -l 1024 > file2
+genfile -l 50000 --file file1
+genfile -l 1024 --file file2
 tar cf archive file1 file2
 tar f archive --delete file2
 tar tf archive],

+ 2 - 2
tests/delete02.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, 2005 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,7 +24,7 @@ AT_SETUP([deleting a member from stdin archive])
 AT_KEYWORDS([delete delete02])
 
 AT_TAR_CHECK([
-genfile -l 3073 -p zeros > 1
+genfile -l 3073 -p zeros --file 1
 cp 1 2
 cp 2 3
 tar cf archive 1 2 3

+ 11 - 11
tests/delete04.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,16 +24,16 @@ AT_SETUP([deleting a large last member])
 AT_KEYWORDS([delete delete04])
 
 AT_TAR_CHECK([
-genfile -l      3 >file1
-genfile -l      5 >file2
-genfile -l      3 >file3
-genfile -l      6 >file4
-genfile -l     24 >file5
-genfile -l     13 >file6
-genfile -l   1385 >file7
-genfile -l     30 >file8
-genfile -l     10 >file9
-genfile -l 256000 >file10
+genfile -l      3 -f file1
+genfile -l      5 -f file2
+genfile -l      3 -f file3
+genfile -l      6 -f file4
+genfile -l     24 -f file5
+genfile -l     13 -f file6
+genfile -l   1385 -f file7
+genfile -l     30 -f file8
+genfile -l     10 -f file9
+genfile -l 256000 -f file10
 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
 tar f archive --delete file10
 tar tf archive

+ 3 - 3
tests/delete05.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
@@ -28,8 +28,8 @@ AT_SETUP([deleting non-existing member])
 AT_KEYWORDS([delete delete05])
 
 AT_TAR_CHECK([
-genfile -l 1024 > en
-genfile -l 1024 > to
+genfile -l 1024 -f en
+genfile -l 1024 -f to
 
 tar cf archive en to
 # Make sure we don't use bogus blocking factor.

+ 5 - 5
tests/extrac05.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
@@ -36,11 +36,11 @@ cztery
 ])
 
 AT_TAR_CHECK([
-genfile --length 118 > jeden
-genfile --length 223 > dwa
-genfile --length 517 > trzy
+genfile --length 118 --file jeden
+genfile --length 223 --file dwa
+genfile --length 517 --file trzy
 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
-genfile --length 110 > cztery
+genfile --length 110 --file cztery
 
 tar cf archive jeden dwa trzy cztery || exit 1
 

+ 3 - 3
tests/listed01.at

@@ -1,7 +1,7 @@
 # Process this file with autom4te to create testsuite. -*- Autotest -*-
 
 # Test suite for GNU tar.
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004, 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,7 +28,7 @@ AT_KEYWORDS([listed incremental listed01])
 
 AT_TAR_CHECK([
 mkdir directory
-genfile --length 10240 --pattern zeros > directory/file1
+genfile --length 10240 --pattern zeros --file directory/file1
 # Let the things settle
 sleep 1
 
@@ -41,7 +41,7 @@ tar tf archive.1 || exit 1
 
 sleep 1
 
-genfile --length 10240 --pattern zeros > directory/file2
+genfile --length 10240 --pattern zeros --file directory/file2
 
 echo "separator"
 

+ 2 - 2
tests/multiv01.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
@@ -29,7 +29,7 @@ AT_KEYWORDS([multivolume multiv multiv01])
 
 AT_TAR_CHECK([
 exec <&-
-genfile --length 7168 > file1
+genfile --length 7168 --file file1
 
 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \

+ 5 - 5
tests/multiv02.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
@@ -29,10 +29,10 @@ AT_SETUP([skipping a straddling member])
 AT_KEYWORDS([multivolume multiv multiv02])
 
 AT_TAR_CHECK([
-genfile --length 10240 > en
-genfile --length 20000 > to
-genfile --length 20000 > tre
-genfile --length 10240 > fire
+genfile --length 10240 --file en
+genfile --length 20000 --file to
+genfile --length 20000 --file tre
+genfile --length 10240 --file fire
 
 exec <&-
 

+ 3 - 3
tests/pipe.at

@@ -1,7 +1,7 @@
 # Process this file with autom4te to create testsuite. -*- Autotest -*-
 
 # Test suite for GNU tar.
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004, 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
@@ -32,8 +32,8 @@ AT_KEYWORDS([pipe])
 
 AT_TAR_CHECK([
 mkdir directory
-genfile --length 10240 --pattern zeros > directory/file1
-genfile --length 13 > directory/file2
+genfile --length 10240 --pattern zeros --file directory/file1
+genfile --length 13 --file directory/file2
 tar cf archive directory|sort 2>/dev/null
 mv directory orig
 cat archive | tar xfv - | sort 2>/dev/null

+ 3 - 3
tests/same-order01.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
@@ -27,8 +27,8 @@ AT_SETUP([same-order01])
 AT_KEYWORDS([same-order same-order01])
 
 AT_TAR_CHECK([
-genfile -l 1024 > file1
-genfile -l 1024 > file2
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
 tar cf archive file1 file2
 
 mkdir directory

+ 3 - 3
tests/same-order02.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
@@ -26,8 +26,8 @@ AT_SETUP([same-order02])
 AT_KEYWORDS([same-order same-order02])
 
 AT_TAR_CHECK([
-genfile -l 1024 > file1
-genfile -l 1024 > file2
+genfile -l 1024 -f file1
+genfile -l 1024 -f file2
 tar cf archive file1 file2
 
 mkdir en

+ 2 - 2
tests/sparse01.at

@@ -22,8 +22,8 @@ AT_SETUP([sparse files])
 AT_KEYWORDS([sparse sparse01])
 
 AT_TAR_CHECK([
-genfile --length 1000 > begin
-genfile --length 1000 > end
+genfile --length 1000 -f begin
+genfile --length 1000 -f end
 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || AT_SKIP_TEST
 tar -c -f archive --sparse begin sparsefile end || exit 1
 echo separator

+ 2 - 2
tests/sparse03.at

@@ -27,8 +27,8 @@ AT_KEYWORDS([sparse sparse03])
 # http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
 
 AT_TAR_CHECK([
-genfile --length 1000 > begin
-genfile --length 1000 > end
+genfile --length 1000 --file begin
+genfile --length 1000 --file end
 genfile --sparse --file sparsefile --block-size 512 8G A || AT_SKIP_TEST
 tar -c -f archive --sparse begin sparsefile end || exit 1
 echo separator