]> git.cworth.org Git - tar/blob - tests/testsuite
Imported Upstream version 1.22
[tar] / tests / testsuite
1 #! /bin/sh
2 #
3 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
4 # Foundation, Inc.
5 # This test suite is free software; the Free Software Foundation gives
6 # unlimited permission to copy, distribute and modify it.
7 ## --------------------- ##
8 ## M4sh Initialization.  ##
9 ## --------------------- ##
10
11 # Be more Bourne compatible
12 DUALCASE=1; export DUALCASE # for MKS sh
13 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14   emulate sh
15   NULLCMD=:
16   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
17   # is contrary to our usage.  Disable this feature.
18   alias -g '${1+"$@"}'='"$@"'
19   setopt NO_GLOB_SUBST
20 else
21   case `(set -o) 2>/dev/null` in
22   *posix*) set -o posix ;;
23 esac
24
25 fi
26
27
28
29
30 # PATH needs CR
31 # Avoid depending upon Character Ranges.
32 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
34 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
35 as_cr_digits='0123456789'
36 as_cr_alnum=$as_cr_Letters$as_cr_digits
37
38 # The user is always right.
39 if test "${PATH_SEPARATOR+set}" != set; then
40   echo "#! /bin/sh" >conf$$.sh
41   echo  "exit 0"   >>conf$$.sh
42   chmod +x conf$$.sh
43   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
44     PATH_SEPARATOR=';'
45   else
46     PATH_SEPARATOR=:
47   fi
48   rm -f conf$$.sh
49 fi
50
51 # Support unset when possible.
52 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
53   as_unset=unset
54 else
55   as_unset=false
56 fi
57
58
59 # IFS
60 # We need space, tab and new line, in precisely that order.  Quoting is
61 # there to prevent editors from complaining about space-tab.
62 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
63 # splitting by setting IFS to empty value.)
64 as_nl='
65 '
66 IFS=" ""        $as_nl"
67
68 # Find who we are.  Look in the path if we contain no directory separator.
69 case $0 in
70   *[\\/]* ) as_myself=$0 ;;
71   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
72 for as_dir in $PATH
73 do
74   IFS=$as_save_IFS
75   test -z "$as_dir" && as_dir=.
76   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
77 done
78 IFS=$as_save_IFS
79
80      ;;
81 esac
82 # We did not find ourselves, most probably we were run as `sh COMMAND'
83 # in which case we are not to be found in the path.
84 if test "x$as_myself" = x; then
85   as_myself=$0
86 fi
87 if test ! -f "$as_myself"; then
88   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
89   { (exit 1); exit 1; }
90 fi
91
92 # Work around bugs in pre-3.0 UWIN ksh.
93 for as_var in ENV MAIL MAILPATH
94 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
95 done
96 PS1='$ '
97 PS2='> '
98 PS4='+ '
99
100 # NLS nuisances.
101 for as_var in \
102   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
103   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
104   LC_TELEPHONE LC_TIME
105 do
106   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
107     eval $as_var=C; export $as_var
108   else
109     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
110   fi
111 done
112
113 # Required to use basename.
114 if expr a : '\(a\)' >/dev/null 2>&1 &&
115    test "X`expr 00001 : '.*\(...\)'`" = X001; then
116   as_expr=expr
117 else
118   as_expr=false
119 fi
120
121 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
122   as_basename=basename
123 else
124   as_basename=false
125 fi
126
127
128 # Name of the executable.
129 as_me=`$as_basename -- "$0" ||
130 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
131          X"$0" : 'X\(//\)$' \| \
132          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
133 echo X/"$0" |
134     sed '/^.*\/\([^/][^/]*\)\/*$/{
135             s//\1/
136             q
137           }
138           /^X\/\(\/\/\)$/{
139             s//\1/
140             q
141           }
142           /^X\/\(\/\).*/{
143             s//\1/
144             q
145           }
146           s/.*/./; q'`
147
148 # CDPATH.
149 $as_unset CDPATH
150
151
152 if test "x$CONFIG_SHELL" = x; then
153   if (eval ":") 2>/dev/null; then
154   as_have_required=yes
155 else
156   as_have_required=no
157 fi
158
159   if test $as_have_required = yes &&     (eval ":
160 (as_func_return () {
161   (exit \$1)
162 }
163 as_func_success () {
164   as_func_return 0
165 }
166 as_func_failure () {
167   as_func_return 1
168 }
169 as_func_ret_success () {
170   return 0
171 }
172 as_func_ret_failure () {
173   return 1
174 }
175
176 exitcode=0
177 if as_func_success; then
178   :
179 else
180   exitcode=1
181   echo as_func_success failed.
182 fi
183
184 if as_func_failure; then
185   exitcode=1
186   echo as_func_failure succeeded.
187 fi
188
189 if as_func_ret_success; then
190   :
191 else
192   exitcode=1
193   echo as_func_ret_success failed.
194 fi
195
196 if as_func_ret_failure; then
197   exitcode=1
198   echo as_func_ret_failure succeeded.
199 fi
200
201 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
202   :
203 else
204   exitcode=1
205   echo positional parameters were not saved.
206 fi
207
208 test \$exitcode = 0) || { (exit 1); exit 1; }
209
210 (
211   as_lineno_1=\$LINENO
212   as_lineno_2=\$LINENO
213   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
214   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
215 ") 2> /dev/null; then
216   :
217 else
218   as_candidate_shells=
219     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
220 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221 do
222   IFS=$as_save_IFS
223   test -z "$as_dir" && as_dir=.
224   case $as_dir in
225          /*)
226            for as_base in sh bash ksh sh5; do
227              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
228            done;;
229        esac
230 done
231 IFS=$as_save_IFS
232
233
234       for as_shell in $as_candidate_shells $SHELL; do
235          # Try only shells that exist, to save several forks.
236          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
237                 { ("$as_shell") 2> /dev/null <<\_ASEOF
238 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
239   emulate sh
240   NULLCMD=:
241   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
242   # is contrary to our usage.  Disable this feature.
243   alias -g '${1+"$@"}'='"$@"'
244   setopt NO_GLOB_SUBST
245 else
246   case `(set -o) 2>/dev/null` in
247   *posix*) set -o posix ;;
248 esac
249
250 fi
251
252
253 :
254 _ASEOF
255 }; then
256   CONFIG_SHELL=$as_shell
257                as_have_required=yes
258                if { "$as_shell" 2> /dev/null <<\_ASEOF
259 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
260   emulate sh
261   NULLCMD=:
262   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
263   # is contrary to our usage.  Disable this feature.
264   alias -g '${1+"$@"}'='"$@"'
265   setopt NO_GLOB_SUBST
266 else
267   case `(set -o) 2>/dev/null` in
268   *posix*) set -o posix ;;
269 esac
270
271 fi
272
273
274 :
275 (as_func_return () {
276   (exit $1)
277 }
278 as_func_success () {
279   as_func_return 0
280 }
281 as_func_failure () {
282   as_func_return 1
283 }
284 as_func_ret_success () {
285   return 0
286 }
287 as_func_ret_failure () {
288   return 1
289 }
290
291 exitcode=0
292 if as_func_success; then
293   :
294 else
295   exitcode=1
296   echo as_func_success failed.
297 fi
298
299 if as_func_failure; then
300   exitcode=1
301   echo as_func_failure succeeded.
302 fi
303
304 if as_func_ret_success; then
305   :
306 else
307   exitcode=1
308   echo as_func_ret_success failed.
309 fi
310
311 if as_func_ret_failure; then
312   exitcode=1
313   echo as_func_ret_failure succeeded.
314 fi
315
316 if ( set x; as_func_ret_success y && test x = "$1" ); then
317   :
318 else
319   exitcode=1
320   echo positional parameters were not saved.
321 fi
322
323 test $exitcode = 0) || { (exit 1); exit 1; }
324
325 (
326   as_lineno_1=$LINENO
327   as_lineno_2=$LINENO
328   test "x$as_lineno_1" != "x$as_lineno_2" &&
329   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
330
331 _ASEOF
332 }; then
333   break
334 fi
335
336 fi
337
338       done
339
340       if test "x$CONFIG_SHELL" != x; then
341   for as_var in BASH_ENV ENV
342         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
343         done
344         export CONFIG_SHELL
345         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
346 fi
347
348
349     if test $as_have_required = no; then
350   echo This script requires a shell more modern than all the
351       echo shells that I found on your system.  Please install a
352       echo modern shell, or manually run the script under such a
353       echo shell if you do have one.
354       { (exit 1); exit 1; }
355 fi
356
357
358 fi
359
360 fi
361
362
363
364 (eval "as_func_return () {
365   (exit \$1)
366 }
367 as_func_success () {
368   as_func_return 0
369 }
370 as_func_failure () {
371   as_func_return 1
372 }
373 as_func_ret_success () {
374   return 0
375 }
376 as_func_ret_failure () {
377   return 1
378 }
379
380 exitcode=0
381 if as_func_success; then
382   :
383 else
384   exitcode=1
385   echo as_func_success failed.
386 fi
387
388 if as_func_failure; then
389   exitcode=1
390   echo as_func_failure succeeded.
391 fi
392
393 if as_func_ret_success; then
394   :
395 else
396   exitcode=1
397   echo as_func_ret_success failed.
398 fi
399
400 if as_func_ret_failure; then
401   exitcode=1
402   echo as_func_ret_failure succeeded.
403 fi
404
405 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
406   :
407 else
408   exitcode=1
409   echo positional parameters were not saved.
410 fi
411
412 test \$exitcode = 0") || {
413   echo No shell found that supports shell functions.
414   echo Please tell autoconf@gnu.org about your system,
415   echo including any error possibly output before this
416   echo message
417 }
418
419
420
421   as_lineno_1=$LINENO
422   as_lineno_2=$LINENO
423   test "x$as_lineno_1" != "x$as_lineno_2" &&
424   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
425
426   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
427   # uniformly replaced by the line number.  The first 'sed' inserts a
428   # line-number line after each line using $LINENO; the second 'sed'
429   # does the real work.  The second script uses 'N' to pair each
430   # line-number line with the line containing $LINENO, and appends
431   # trailing '-' during substitution so that $LINENO is not a special
432   # case at line end.
433   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
434   # scripts with optimization help from Paolo Bonzini.  Blame Lee
435   # E. McMahon (1931-1989) for sed's syntax.  :-)
436   sed -n '
437     p
438     /[$]LINENO/=
439   ' <$as_myself |
440     sed '
441       s/[$]LINENO.*/&-/
442       t lineno
443       b
444       :lineno
445       N
446       :loop
447       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
448       t loop
449       s/-\n.*//
450     ' >$as_me.lineno &&
451   chmod +x "$as_me.lineno" ||
452     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
453    { (exit 1); exit 1; }; }
454
455   # Don't try to exec as it changes $[0], causing all sort of problems
456   # (the dirname of $[0] is not the place where we might find the
457   # original and so on.  Autoconf is especially sensitive to this).
458   . "./$as_me.lineno"
459   # Exit status is that of the last command.
460   exit
461 }
462
463
464 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
465   as_dirname=dirname
466 else
467   as_dirname=false
468 fi
469
470 ECHO_C= ECHO_N= ECHO_T=
471 case `echo -n x` in
472 -n*)
473   case `echo 'x\c'` in
474   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
475   *)   ECHO_C='\c';;
476   esac;;
477 *)
478   ECHO_N='-n';;
479 esac
480
481 if expr a : '\(a\)' >/dev/null 2>&1 &&
482    test "X`expr 00001 : '.*\(...\)'`" = X001; then
483   as_expr=expr
484 else
485   as_expr=false
486 fi
487
488 rm -f conf$$ conf$$.exe conf$$.file
489 if test -d conf$$.dir; then
490   rm -f conf$$.dir/conf$$.file
491 else
492   rm -f conf$$.dir
493   mkdir conf$$.dir
494 fi
495 echo >conf$$.file
496 if ln -s conf$$.file conf$$ 2>/dev/null; then
497   as_ln_s='ln -s'
498   # ... but there are two gotchas:
499   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
500   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
501   # In both cases, we have to default to `cp -p'.
502   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503     as_ln_s='cp -p'
504 elif ln conf$$.file conf$$ 2>/dev/null; then
505   as_ln_s=ln
506 else
507   as_ln_s='cp -p'
508 fi
509 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
510 rmdir conf$$.dir 2>/dev/null
511
512 if mkdir -p . 2>/dev/null; then
513   as_mkdir_p=:
514 else
515   test -d ./-p && rmdir ./-p
516   as_mkdir_p=false
517 fi
518
519 if test -x / >/dev/null 2>&1; then
520   as_test_x='test -x'
521 else
522   if ls -dL / >/dev/null 2>&1; then
523     as_ls_L_option=L
524   else
525     as_ls_L_option=
526   fi
527   as_test_x='
528     eval sh -c '\''
529       if test -d "$1"; then
530         test -d "$1/.";
531       else
532         case $1 in
533         -*)set "./$1";;
534         esac;
535         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
536         ???[sx]*):;;*)false;;esac;fi
537     '\'' sh
538   '
539 fi
540 as_executable_p=$as_test_x
541
542 # Sed expression to map a string onto a valid CPP name.
543 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
544
545 # Sed expression to map a string onto a valid variable name.
546 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
547
548
549
550 SHELL=${CONFIG_SHELL-/bin/sh}
551
552 # How were we run?
553 at_cli_args="$@"
554
555 # Load the config file.
556 for at_file in atconfig atlocal
557 do
558   test -r $at_file || continue
559   . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2
560    { (exit 1); exit 1; }; }
561 done
562
563 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
564 : ${at_top_build_prefix=$at_top_builddir}
565
566 # atconfig delivers names relative to the directory the test suite is
567 # in, but the groups themselves are run in testsuite-dir/group-dir.
568 if test -n "$at_top_srcdir"; then
569   builddir=../..
570   for at_dir in srcdir top_srcdir top_build_prefix
571   do
572     at_val=`eval echo '${'at_$at_dir'}'`
573     eval "$at_dir=\$at_val/../.."
574   done
575 fi
576
577 # Not all shells have the 'times' builtin; the subshell is needed to make
578 # sure we discard the 'times: not found' message from the shell.
579 at_times_p=false
580 (times) >/dev/null 2>&1 && at_times_p=:
581
582 # CLI Arguments to pass to the debugging scripts.
583 at_debug_args=
584 # -e sets to true
585 at_errexit_p=false
586 # Shall we be verbose?
587 at_verbose=:
588 at_quiet=echo
589
590 # Shall we keep the debug scripts?  Must be `:' when the suite is
591 # run by a debug script, so that the script doesn't remove itself.
592 at_debug_p=false
593 # Display help message?
594 at_help_p=false
595 # Display the version message?
596 at_version_p=false
597 # List test groups?
598 at_list_p=false
599 # Test groups to run
600 at_groups=
601
602 # The directory we are in.
603 at_dir=`pwd`
604 # The directory the whole suite works in.
605 # Should be absolutely to let the user `cd' at will.
606 at_suite_dir=$at_dir/$as_me.dir
607 # The file containing the suite.
608 at_suite_log=$at_dir/$as_me.log
609 # The file containing the location of the last AT_CHECK.
610 at_check_line_file=$at_suite_dir/at-check-line
611 # The file containing the exit status of the last command.
612 at_status_file=$at_suite_dir/at-status
613 # The files containing the output of the tested commands.
614 at_stdout=$at_suite_dir/at-stdout
615 at_stder1=$at_suite_dir/at-stder1
616 at_stderr=$at_suite_dir/at-stderr
617 # The file containing dates.
618 at_times_file=$at_suite_dir/at-times
619
620 # List of the tested programs.
621 at_tested='tar'
622 # List of the all the test groups.
623 at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77'
624 # As many question marks as there are digits in the last test group number.
625 # Used to normalize the test group numbers so that `ls' lists them in
626 # numerical order.
627 at_format='??'
628 # Description of all the test groups.
629 at_help_all="1;version.at:19;tar version;;
630 2;pipe.at:29;decompressing from stdin;pipe;
631 3;options.at:24;mixing options;options options00;
632 4;options02.at:26;interspersed options;options options02;
633 5;T-empty.at:26;files-from: empty entries;files-from empty;
634 6;T-null.at:21;files-from: 0-separated file without -0;files-from null T-null;
635 7;indexfile.at:26;tar --index-file=this_is_a_very_long_file_name_which_raises_issues.c --file=-;stdout indexfile;
636 8;verbose.at:26;tar cvf -;stdout verbose;
637 9;append.at:21;append;append append00;
638 10;append01.at:29;appending files with long names;append append01;
639 11;append02.at:40;append vs. create;append append02 append-gnu;
640 12;exclude.at:23;exclude;exclude;
641 13;delete01.at:23;deleting a member after a big one;delete delete01;
642 14;delete02.at:23;deleting a member from stdin archive;delete delete02;
643 15;delete03.at:21;deleting members with long names;delete delete03;
644 16;delete04.at:23;deleting a large last member;delete delete04;
645 17;delete05.at:27;deleting non-existing member;delete delete05;
646 18;extrac01.at:23;extract over an existing directory;extract extract01;
647 19;extrac02.at:23;extracting symlinks over an existing file;extract extract02 symlink;
648 20;extrac03.at:23;extraction loops;extract extract03;
649 21;extrac04.at:23;extract + fnmatch;extract extract04 fnmatch;
650 22;extrac05.at:30;extracting selected members from pax;extract extract05;
651 23;extrac06.at:33;mode of extracted directories;extract extract06 directory mode;
652 24;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink;
653 25;gzip.at:23;gzip;gzip;
654 26;incremental.at:23;incremental;incremental incr00;
655 27;incr01.at:27;restore broken symlinks from incremental;incremental incr01;
656 28;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02;
657 29;listed01.at:26;--listed for individual files;listed incremental listed01;
658 30;listed02.at:28;working --listed;listed incremental listed02;
659 31;incr03.at:28;renamed files in incrementals;incremental incr03 rename;
660 32;incr04.at:29;proper icontents initialization;incremental incr04 icontents;
661 33;rename01.at:24;renamed dirs in incrementals;incremental rename rename01;
662 34;rename02.at:24;move between hierarchies;incremental rename rename02;
663 35;rename03.at:23;cyclic renames;incremental rename rename03 cyclic-rename;
664 36;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename;
665 37;rename05.at:24;renamed subdirectories;incremental rename05 rename;
666 38;chtype.at:27;changed file types in incrementals;incremental chtype;
667 39;ignfail.at:23;ignfail;ignfail;
668 40;link01.at:33;link count gt 2;link01;
669 41;longv7.at:24;long names in V7 archives;longname longv7;
670 42;long01.at:28;long file names divisible by block size;longname long512;
671 43;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01;
672 44;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02;
673 45;lustar03.at:21;ustar: splitting long names;longname ustar lustar03;
674 46;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01;
675 47;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02;
676 48;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03;
677 49;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental multiv04;
678 50;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync;
679 51;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06;
680 52;old.at:23;old archives;old;
681 53;recurse.at:21;recurse;recurse;
682 54;same-order01.at:26;working -C with --same-order;same-order same-order01;
683 55;same-order02.at:25;multiple -C options;same-order same-order02;
684 56;shortrec.at:25;short records;shortrec;
685 57;sparse01.at:21;sparse files;sparse sparse01;
686 58;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02;
687 59;sparse03.at:21;storing sparse files > 8G;sparse sparse03;
688 60;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv;
689 61;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multiv sparsemvp sparsemvp00;
690 62;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01;
691 63;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multiv sparsemvp sparsemvp10;
692 64;update.at:27;update unchanged directories;update;
693 65;volume.at:23;volume;volume volcheck;
694 66;volsize.at:29;volume header size;volume volsize;
695 67;comprec.at:21;compressed format recognition;comprec;
696 68;shortfile.at:26;short input files;shortfile shortfile0;
697 69;shortupd.at:29;updating short archives;shortfile shortfile1 shortupd;
698 70;truncate.at:29;truncate;truncate filechange;
699 71;grow.at:24;grow;grow filechange;
700 72;gtarfail.at:21;gtarfail;star gtarfail;
701 73;gtarfail2.at:21;gtarfail2;star gtarfail2;
702 74;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail;
703 75;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g;
704 76;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g;
705 77;pax-big-10g.at:21;pax-big-10g;star pax-big-10g;
706 "
707
708 at_prev=
709 for at_option
710 do
711   # If the previous option needs an argument, assign it.
712   if test -n "$at_prev"; then
713     at_option=$at_prev=$at_option
714     at_prev=
715   fi
716
717   case $at_option in
718   *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;;
719   *)   at_optarg= ;;
720   esac
721
722   # Accept the important Cygnus configure options, so we can diagnose typos.
723
724   case $at_option in
725     --help | -h )
726         at_help_p=:
727         ;;
728
729     --list | -l )
730         at_list_p=:
731         ;;
732
733     --version | -V )
734         at_version_p=:
735         ;;
736
737     --clean | -c )
738         test -d "$at_suite_dir" &&
739           find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
740         rm -f -r "$at_suite_dir" "$at_suite_log"
741         exit 0
742         ;;
743
744     --debug | -d )
745         at_debug_p=:
746         ;;
747
748     --errexit | -e )
749         at_debug_p=:
750         at_errexit_p=:
751         ;;
752
753     --verbose | -v )
754         at_verbose=echo; at_quiet=:
755         ;;
756
757     --trace | -x )
758         at_traceon='set -x'; at_traceoff='set +x'
759         ;;
760
761     [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
762         at_groups="$at_groups$at_option "
763         ;;
764
765     # Ranges
766     [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
767         at_range_start=`echo $at_option |tr -d X-`
768         at_range=`echo " $at_groups_all " | \
769           sed -e 's/^.* \('$at_range_start' \)/\1/'`
770         at_groups="$at_groups$at_range "
771         ;;
772
773     -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
774         at_range_end=`echo $at_option |tr -d X-`
775         at_range=`echo " $at_groups_all " | \
776           sed -e 's/\( '$at_range_end'\) .*$/\1/'`
777         at_groups="$at_groups$at_range "
778         ;;
779
780     [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
781     [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
782     [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
783     [0-9][0-9][0-9]-[0-9][0-9][0-9] | \
784     [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] | \
785     [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
786         at_range_start=`expr $at_option : '\(.*\)-'`
787         at_range_end=`expr $at_option : '.*-\(.*\)'`
788         if test $at_range_start -gt $at_range_end; then
789           at_tmp=$at_range_end
790           at_range_end=$at_range_start
791           at_range_start=$at_tmp
792         fi
793         at_range=`echo " $at_groups_all " | \
794           sed -e 's/^.*\( '$at_range_start' \)/\1/' \
795               -e 's/\( '$at_range_end'\) .*$/\1/'`
796         at_groups="$at_groups$at_range "
797         ;;
798
799     # Keywords.
800     --keywords | -k )
801         at_prev=--keywords
802         ;;
803     --keywords=* )
804         at_groups_selected=$at_help_all
805         at_save_IFS=$IFS
806         IFS=,
807         set X $at_optarg
808         shift
809         IFS=$at_save_IFS
810         for at_keyword
811         do
812           at_invert=
813           case $at_keyword in
814           '!'*)
815             at_invert="-v"
816             at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
817             ;;
818           esac
819           # It is on purpose that we match the test group titles too.
820           at_groups_selected=`echo "$at_groups_selected" |
821               grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
822         done
823         at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
824         # Smash the newlines.
825         at_groups="$at_groups`echo $at_groups_selected` "
826         ;;
827
828     *=*)
829         at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
830         # Reject names that are not valid shell variable names.
831         expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
832           { echo "$as_me: error: invalid variable name: $at_envvar" >&2
833    { (exit 1); exit 1; }; }
834         at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
835         eval "$at_envvar='$at_value'"
836         export $at_envvar
837         # Propagate to debug scripts.
838         at_debug_args="$at_debug_args $at_envvar='$at_value'"
839         ;;
840
841      *) echo "$as_me: invalid option: $at_option" >&2
842         echo "Try \`$0 --help' for more information." >&2
843         exit 1
844         ;;
845   esac
846 done
847
848 # Selected test groups.
849 if test -z "$at_groups"; then
850   at_groups=$at_groups_all
851 else
852   # Sort the tests, removing duplicates:
853   at_groups=`echo $at_groups | tr ' ' "$as_nl" | sort -nu`
854   # and add banners.  (Passing at_groups_all is tricky--see the comment
855   # starting with "Passing at_groups is tricky.")
856   at_groups=`echo "$at_groups$as_nl $at_groups_all" |
857     awk 'BEGIN { FS = "@" } # Effectively switch off field splitting.
858         /^$/ { next }  # Ignore the empty line.
859         !/ / { groups++; selected[$ 0] = 1; next }
860         # The last line, containing at_groups_all.
861         {
862                 n = split($ 0, a, " ")
863                 # If there are several tests, select their banners:
864                 if (groups > 1) {
865                         for (i = 1; i <= n; i++) {
866                                 if (a[i] ~ /^banner-/)
867                                         banner = a[i]
868                                 else if (banner != "" && selected[a[i]] == 1)
869                                         selected[banner] = 1
870                         }
871                 }
872                 for (i = 1; i <= n; i++)
873                         if (selected[a[i]] == 1)
874                                 list = list " " a[i]
875                 print list
876         }'`
877 fi
878
879 # Help message.
880 if $at_help_p; then
881   cat <<_ATEOF
882 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
883
884 Run all the tests, or the selected TESTS, given by numeric ranges, and
885 save a detailed log file.  Upon failure, create debugging scripts.
886
887 You should not change environment variables unless explicitly passed
888 as command line arguments.  Set \`AUTOTEST_PATH' to select the executables
889 to exercise.  Each relative directory is expanded as build and source
890 directories relatively to the top level of this distribution.  E.g.,
891
892   $ $0 AUTOTEST_PATH=bin
893
894 possibly amounts into
895
896   PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
897 _ATEOF
898 cat <<_ATEOF
899
900 Operation modes:
901   -h, --help     print the help message, then exit
902   -V, --version  print version number, then exit
903   -c, --clean    remove all the files this test suite might create and exit
904   -l, --list     describes all the tests, or the selected TESTS
905 _ATEOF
906 cat <<_ATEOF
907
908 Execution tuning:
909   -k, --keywords=KEYWORDS
910                  select the tests matching all the comma-separated KEYWORDS
911                  multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
912   -e, --errexit  abort as soon as a test fails; implies --debug
913   -v, --verbose  force more detailed output
914                  default for debugging scripts
915   -d, --debug    inhibit clean up and top-level logging
916                  default for debugging scripts
917   -x, --trace    enable tests shell tracing
918 _ATEOF
919 cat <<_ATEOF
920
921 Report bugs to <bug-tar@gnu.org>.
922 _ATEOF
923   exit 0
924 fi
925
926 # List of tests.
927 if $at_list_p; then
928   cat <<_ATEOF
929 GNU tar 1.22 test suite test groups:
930
931  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
932       KEYWORDS
933
934 _ATEOF
935   # Passing at_groups is tricky.  We cannot use it to form a literal string
936   # or regexp because of the limitation of AIX awk.  And Solaris' awk
937   # doesn't grok more than 99 fields in a record, so we have to use `split'.
938   echo "$at_groups$as_nl$at_help_all" |
939     awk 'BEGIN { FS = ";" }
940          NR == 1 {
941            for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1
942            next
943          }
944          {
945            if (selected[$ 1]) {
946              printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
947              if ($ 4) printf "      %s\n", $ 4
948            }
949          }'
950   exit 0
951 fi
952 if $at_version_p; then
953   echo "$as_me (GNU tar 1.22)"
954   cat <<\_ACEOF
955
956 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
957 Foundation, Inc.
958 This test suite is free software; the Free Software Foundation gives
959 unlimited permission to copy, distribute and modify it.
960 _ACEOF
961   exit 0
962 fi
963
964 # Don't take risks: use only absolute directories in PATH.
965 #
966 # For stand-alone test suites, AUTOTEST_PATH is relative to `.'.
967 #
968 # For embedded test suites, AUTOTEST_PATH is relative to the top level
969 # of the package.  Then expand it into build/src parts, since users
970 # may create executables in both places.
971 AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s&:&$PATH_SEPARATOR&g"`
972 at_path=
973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
974 for as_dir in $AUTOTEST_PATH $PATH
975 do
976   IFS=$as_save_IFS
977   test -z "$as_dir" && as_dir=.
978   test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR
979 case $as_dir in
980   [\\/]* | ?:[\\/]* )
981     at_path=$at_path$as_dir
982     ;;
983   * )
984     if test -z "$at_top_build_prefix"; then
985       # Stand-alone test suite.
986       at_path=$at_path$as_dir
987     else
988       # Embedded test suite.
989       at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR
990       at_path=$at_path$at_top_srcdir/$as_dir
991     fi
992     ;;
993 esac
994 done
995 IFS=$as_save_IFS
996
997
998 # Now build and simplify PATH.
999 #
1000 # There might be directories that don't exist, but don't redirect
1001 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
1002 PATH=
1003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1004 for as_dir in $at_path
1005 do
1006   IFS=$as_save_IFS
1007   test -z "$as_dir" && as_dir=.
1008   as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
1009 test -d "$as_dir" || continue
1010 case $PATH in
1011                   $as_dir                 | \
1012                   $as_dir$PATH_SEPARATOR* | \
1013   *$PATH_SEPARATOR$as_dir                 | \
1014   *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;
1015
1016   '') PATH=$as_dir ;;
1017    *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
1018 esac
1019 done
1020 IFS=$as_save_IFS
1021
1022 export PATH
1023
1024 # Setting up the FDs.
1025 # 5 is the log file.  Not to be overwritten if `-d'.
1026
1027 if $at_debug_p; then
1028   at_suite_log=/dev/null
1029 else
1030   : >"$at_suite_log"
1031 fi
1032 exec 5>>"$at_suite_log"
1033
1034 # Banners and logs.
1035 cat <<\_ASBOX
1036 ## ------------------------ ##
1037 ## GNU tar 1.22 test suite. ##
1038 ## ------------------------ ##
1039 _ASBOX
1040 {
1041   cat <<\_ASBOX
1042 ## ------------------------ ##
1043 ## GNU tar 1.22 test suite. ##
1044 ## ------------------------ ##
1045 _ASBOX
1046   echo
1047
1048   echo "$as_me: command line was:"
1049   echo "  $ $0 $at_cli_args"
1050   echo
1051
1052   # Try to find a few ChangeLogs in case it might help determining the
1053   # exact version.  Use the relative dir: if the top dir is a symlink,
1054   # find will not follow it (and options to follow the links are not
1055   # portable), which would result in no output here.
1056   if test -n "$at_top_srcdir"; then
1057     cat <<\_ASBOX
1058 ## ----------- ##
1059 ## ChangeLogs. ##
1060 ## ----------- ##
1061 _ASBOX
1062     echo
1063     for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
1064     do
1065       echo "$as_me: $at_file:"
1066       sed 's/^/| /;10q' $at_file
1067       echo
1068     done
1069
1070     {
1071 cat <<_ASUNAME
1072 ## --------- ##
1073 ## Platform. ##
1074 ## --------- ##
1075
1076 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1077 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1078 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1079 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1080 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1081
1082 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1083 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1084
1085 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1086 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1087 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1088 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1089 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1090 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1091 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1092
1093 _ASUNAME
1094
1095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1096 for as_dir in $PATH
1097 do
1098   IFS=$as_save_IFS
1099   test -z "$as_dir" && as_dir=.
1100   echo "PATH: $as_dir"
1101 done
1102 IFS=$as_save_IFS
1103
1104 }
1105     echo
1106   fi
1107
1108   # Contents of the config files.
1109   for at_file in atconfig atlocal
1110   do
1111     test -r $at_file || continue
1112     echo "$as_me: $at_file:"
1113     sed 's/^/| /' $at_file
1114     echo
1115   done
1116
1117   cat <<\_ASBOX
1118 ## ---------------- ##
1119 ## Tested programs. ##
1120 ## ---------------- ##
1121 _ASBOX
1122   echo
1123 } >&5
1124
1125 # Report what programs are being tested.
1126 for at_program in : $at_tested
1127 do
1128   test "$at_program" = : && continue
1129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1130 for as_dir in $PATH
1131 do
1132   IFS=$as_save_IFS
1133   test -z "$as_dir" && as_dir=.
1134   test -f "$as_dir/$at_program" && break
1135 done
1136 IFS=$as_save_IFS
1137
1138   if test -f "$as_dir/$at_program"; then
1139     {
1140       echo "$at_srcdir/testsuite.at:104: $as_dir/$at_program --version"
1141       "$as_dir/$at_program" --version
1142       echo
1143     } >&5 2>&1
1144   else
1145     { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5
1146 echo "$as_me: error: cannot find $at_program" >&2;}
1147    { (exit 1); exit 1; }; }
1148   fi
1149 done
1150
1151 {
1152   cat <<\_ASBOX
1153 ## ------------------ ##
1154 ## Running the tests. ##
1155 ## ------------------ ##
1156 _ASBOX
1157 } >&5
1158
1159 at_start_date=`date`
1160 at_start_time=`date +%s 2>/dev/null`
1161 echo "$as_me: starting at: $at_start_date" >&5
1162 at_xpass_list=
1163 at_xfail_list=
1164 at_pass_list=
1165 at_fail_list=
1166 at_skip_list=
1167 at_group_count=0
1168
1169 # Create the master directory if it doesn't already exist.
1170 test -d "$at_suite_dir" ||
1171   mkdir "$at_suite_dir" ||
1172   { { echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5
1173 echo "$as_me: error: cannot create '$at_suite_dir'" >&2;}
1174    { (exit 1); exit 1; }; }
1175
1176 # Can we diff with `/dev/null'?  DU 5.0 refuses.
1177 if diff /dev/null /dev/null >/dev/null 2>&1; then
1178   at_devnull=/dev/null
1179 else
1180   at_devnull=$at_suite_dir/devnull
1181   >"$at_devnull"
1182 fi
1183
1184 # Use `diff -u' when possible.
1185 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1186 then
1187   at_diff='diff -u'
1188 else
1189   at_diff=diff
1190 fi
1191
1192
1193 for at_group in $at_groups
1194 do
1195   # Be sure to come back to the top test directory.
1196   cd "$at_suite_dir"
1197
1198   case $at_group in
1199     banner-*)
1200       at_group_log=$at_suite_log
1201       ;;
1202
1203     *)
1204       at_group_normalized=$at_group
1205
1206   while :; do
1207     case $at_group_normalized in #(
1208     $at_format*) break;;
1209     esac
1210     at_group_normalized=0$at_group_normalized
1211   done
1212
1213
1214       # Create a fresh directory for the next test group, and enter.
1215       at_group_dir=$at_suite_dir/$at_group_normalized
1216       at_group_log=$at_group_dir/$as_me.log
1217       if test -d "$at_group_dir"; then
1218         find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1219         rm -fr "$at_group_dir"
1220       fi
1221       # Be tolerant if the above `rm' was not able to remove the directory.
1222       { as_dir=$at_group_dir
1223   case $as_dir in #(
1224   -*) as_dir=./$as_dir;;
1225   esac
1226   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
1227     as_dirs=
1228     while :; do
1229       case $as_dir in #(
1230       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
1231       *) as_qdir=$as_dir;;
1232       esac
1233       as_dirs="'$as_qdir' $as_dirs"
1234       as_dir=`$as_dirname -- "$as_dir" ||
1235 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1236          X"$as_dir" : 'X\(//\)[^/]' \| \
1237          X"$as_dir" : 'X\(//\)$' \| \
1238          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
1239 echo X"$as_dir" |
1240     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1241             s//\1/
1242             q
1243           }
1244           /^X\(\/\/\)[^/].*/{
1245             s//\1/
1246             q
1247           }
1248           /^X\(\/\/\)$/{
1249             s//\1/
1250             q
1251           }
1252           /^X\(\/\).*/{
1253             s//\1/
1254             q
1255           }
1256           s/.*/./; q'`
1257       test -d "$as_dir" && break
1258     done
1259     test -z "$as_dirs" || eval "mkdir $as_dirs"
1260   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
1261 echo "$as_me: error: cannot create directory $as_dir" >&2;}
1262    { (exit 1); exit 1; }; }; }
1263       cd $at_group_dir
1264       ;;
1265   esac
1266
1267   echo 0 > "$at_status_file"
1268
1269   # Clearly separate the test groups when verbose.
1270   test $at_group_count != 0 && $at_verbose
1271
1272   # In verbose mode, append to the log file *and* show on
1273   # the standard output; in quiet mode only write to the log
1274   if test $at_verbose = echo; then
1275     at_tee_pipe='tee -a "$at_group_log"'
1276   else
1277     at_tee_pipe='cat >> "$at_group_log"'
1278   fi
1279
1280   case $at_group in
1281   1 ) # 1. version.at:19: tar version
1282     at_setup_line='version.at:19'
1283     at_desc="tar version"
1284     $at_quiet $ECHO_N "  1: tar version                                    $ECHO_C"
1285     at_xfail=no
1286     echo "#                             -*- compilation -*-" >> "$at_group_log"
1287     (
1288       echo "1. version.at:19: testing ..."
1289       $at_traceon
1290
1291
1292 $at_traceoff
1293 echo "$at_srcdir/version.at:21: tar --version | sed 1q"
1294 echo version.at:21 >"$at_check_line_file"
1295
1296 at_trace_this=
1297 if test -n "$at_traceon"; then
1298     at_trace_this=yes
1299 fi
1300
1301 if test -n "$at_trace_this"; then
1302     ( $at_traceon; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stder1"
1303     at_status=$?
1304     grep '^ *+' "$at_stder1" >&2
1305     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1306 else
1307     ( :; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stderr"
1308     at_status=$?
1309 fi
1310
1311 at_failed=false
1312 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1313 echo >>"$at_stdout"; echo "tar (GNU tar) 1.22
1314 " | $at_diff - "$at_stdout" || at_failed=:
1315 case $at_status in
1316    77) echo 77 > "$at_status_file"; exit 77;;
1317    0) ;;
1318    *) echo "$at_srcdir/version.at:21: exit code was $at_status, expected 0"
1319       at_failed=:;;
1320 esac
1321 if $at_failed; then
1322   cat >$XFAILFILE <<'_EOT'
1323
1324 ==============================================================
1325 WARNING: Not using the proper version, *all* checks dubious...
1326 ==============================================================
1327 _EOT
1328
1329
1330   echo 1 > "$at_status_file"
1331   exit 1
1332 else
1333   rm -f $XFAILFILE
1334 fi
1335
1336 $at_traceon
1337
1338
1339       $at_traceoff
1340       $at_times_p && times >"$at_times_file"
1341     ) 5>&1 2>&1 | eval $at_tee_pipe
1342     at_status=`cat "$at_status_file"`
1343     ;;
1344
1345   2 ) # 2. pipe.at:29: decompressing from stdin
1346     at_setup_line='pipe.at:29'
1347     at_desc="decompressing from stdin"
1348     $at_quiet $ECHO_N "  2: decompressing from stdin                       $ECHO_C"
1349     at_xfail=no
1350       test -f $XFAILFILE && at_xfail=yes
1351     echo "#                             -*- compilation -*-" >> "$at_group_log"
1352     (
1353       echo "2. pipe.at:29: testing ..."
1354       $at_traceon
1355
1356
1357
1358
1359
1360
1361
1362
1363   $at_traceoff
1364 echo "$at_srcdir/pipe.at:33:
1365 mkdir v7
1366 (cd v7
1367 TEST_TAR_FORMAT=v7
1368 export TEST_TAR_FORMAT
1369 TAR_OPTIONS=\"-H v7\"
1370 export TAR_OPTIONS
1371 rm -rf *
1372
1373
1374 test -z "`sort < /dev/null 2>&1`" || exit 77
1375
1376
1377 mkdir directory
1378 genfile --length 10240 --pattern zeros --file directory/file1
1379 genfile --length 13 --file directory/file2
1380 tar cf archive directory|sort
1381 mv directory orig
1382 cat archive | tar xfv - | sort
1383 echo \"separator\"
1384 cmp orig/file1 directory/file1
1385 echo \"separator\"
1386 cmp orig/file2 directory/file2)"
1387 echo pipe.at:33 >"$at_check_line_file"
1388
1389 at_trace_this=
1390 if test -n "$at_traceon"; then
1391     echo 'Not enabling shell tracing (command contains an embedded newline)'
1392 fi
1393
1394 if test -n "$at_trace_this"; then
1395     ( $at_traceon;
1396 mkdir v7
1397 (cd v7
1398 TEST_TAR_FORMAT=v7
1399 export TEST_TAR_FORMAT
1400 TAR_OPTIONS="-H v7"
1401 export TAR_OPTIONS
1402 rm -rf *
1403
1404
1405 test -z "`sort < /dev/null 2>&1`" || exit 77
1406
1407
1408 mkdir directory
1409 genfile --length 10240 --pattern zeros --file directory/file1
1410 genfile --length 13 --file directory/file2
1411 tar cf archive directory|sort
1412 mv directory orig
1413 cat archive | tar xfv - | sort
1414 echo "separator"
1415 cmp orig/file1 directory/file1
1416 echo "separator"
1417 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
1418     at_status=$?
1419     grep '^ *+' "$at_stder1" >&2
1420     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1421 else
1422     ( :;
1423 mkdir v7
1424 (cd v7
1425 TEST_TAR_FORMAT=v7
1426 export TEST_TAR_FORMAT
1427 TAR_OPTIONS="-H v7"
1428 export TAR_OPTIONS
1429 rm -rf *
1430
1431
1432 test -z "`sort < /dev/null 2>&1`" || exit 77
1433
1434
1435 mkdir directory
1436 genfile --length 10240 --pattern zeros --file directory/file1
1437 genfile --length 13 --file directory/file2
1438 tar cf archive directory|sort
1439 mv directory orig
1440 cat archive | tar xfv - | sort
1441 echo "separator"
1442 cmp orig/file1 directory/file1
1443 echo "separator"
1444 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
1445     at_status=$?
1446 fi
1447
1448 at_failed=false
1449 echo stderr:; tee stderr <"$at_stderr"
1450 echo >>"$at_stdout"; echo "directory/
1451 directory/file1
1452 directory/file2
1453 separator
1454 separator
1455 " | $at_diff - "$at_stdout" || at_failed=:
1456 case $at_status in
1457    77) echo 77 > "$at_status_file"; exit 77;;
1458    0) ;;
1459    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1460       at_failed=:;;
1461 esac
1462 if $at_failed; then
1463
1464
1465   echo 1 > "$at_status_file"
1466   exit 1
1467 fi
1468
1469 $at_traceon
1470
1471
1472   $at_traceoff
1473 echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0"
1474 echo pipe.at:33 >"$at_check_line_file"
1475
1476 at_trace_this=
1477 if test -n "$at_traceon"; then
1478     at_trace_this=yes
1479 fi
1480
1481 if test -n "$at_trace_this"; then
1482     ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1"
1483     at_status=$?
1484     grep '^ *+' "$at_stder1" >&2
1485     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1486 else
1487     ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr"
1488     at_status=$?
1489 fi
1490
1491 at_failed=false
1492 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1493 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
1494 case $at_status in
1495    77) echo 77 > "$at_status_file"; exit 77;;
1496    0) ;;
1497    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1498       at_failed=:;;
1499 esac
1500 if $at_failed; then
1501
1502
1503   echo 1 > "$at_status_file"
1504   exit 1
1505 fi
1506
1507 $at_traceon
1508
1509 $at_traceoff
1510 echo "$at_srcdir/pipe.at:33:
1511 mkdir oldgnu
1512 (cd oldgnu
1513 TEST_TAR_FORMAT=oldgnu
1514 export TEST_TAR_FORMAT
1515 TAR_OPTIONS=\"-H oldgnu\"
1516 export TAR_OPTIONS
1517 rm -rf *
1518
1519
1520 test -z "`sort < /dev/null 2>&1`" || exit 77
1521
1522
1523 mkdir directory
1524 genfile --length 10240 --pattern zeros --file directory/file1
1525 genfile --length 13 --file directory/file2
1526 tar cf archive directory|sort
1527 mv directory orig
1528 cat archive | tar xfv - | sort
1529 echo \"separator\"
1530 cmp orig/file1 directory/file1
1531 echo \"separator\"
1532 cmp orig/file2 directory/file2)"
1533 echo pipe.at:33 >"$at_check_line_file"
1534
1535 at_trace_this=
1536 if test -n "$at_traceon"; then
1537     echo 'Not enabling shell tracing (command contains an embedded newline)'
1538 fi
1539
1540 if test -n "$at_trace_this"; then
1541     ( $at_traceon;
1542 mkdir oldgnu
1543 (cd oldgnu
1544 TEST_TAR_FORMAT=oldgnu
1545 export TEST_TAR_FORMAT
1546 TAR_OPTIONS="-H oldgnu"
1547 export TAR_OPTIONS
1548 rm -rf *
1549
1550
1551 test -z "`sort < /dev/null 2>&1`" || exit 77
1552
1553
1554 mkdir directory
1555 genfile --length 10240 --pattern zeros --file directory/file1
1556 genfile --length 13 --file directory/file2
1557 tar cf archive directory|sort
1558 mv directory orig
1559 cat archive | tar xfv - | sort
1560 echo "separator"
1561 cmp orig/file1 directory/file1
1562 echo "separator"
1563 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
1564     at_status=$?
1565     grep '^ *+' "$at_stder1" >&2
1566     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1567 else
1568     ( :;
1569 mkdir oldgnu
1570 (cd oldgnu
1571 TEST_TAR_FORMAT=oldgnu
1572 export TEST_TAR_FORMAT
1573 TAR_OPTIONS="-H oldgnu"
1574 export TAR_OPTIONS
1575 rm -rf *
1576
1577
1578 test -z "`sort < /dev/null 2>&1`" || exit 77
1579
1580
1581 mkdir directory
1582 genfile --length 10240 --pattern zeros --file directory/file1
1583 genfile --length 13 --file directory/file2
1584 tar cf archive directory|sort
1585 mv directory orig
1586 cat archive | tar xfv - | sort
1587 echo "separator"
1588 cmp orig/file1 directory/file1
1589 echo "separator"
1590 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
1591     at_status=$?
1592 fi
1593
1594 at_failed=false
1595 echo stderr:; tee stderr <"$at_stderr"
1596 echo >>"$at_stdout"; echo "directory/
1597 directory/file1
1598 directory/file2
1599 separator
1600 separator
1601 " | $at_diff - "$at_stdout" || at_failed=:
1602 case $at_status in
1603    77) echo 77 > "$at_status_file"; exit 77;;
1604    0) ;;
1605    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1606       at_failed=:;;
1607 esac
1608 if $at_failed; then
1609
1610
1611   echo 1 > "$at_status_file"
1612   exit 1
1613 fi
1614
1615 $at_traceon
1616
1617
1618   $at_traceoff
1619 echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0"
1620 echo pipe.at:33 >"$at_check_line_file"
1621
1622 at_trace_this=
1623 if test -n "$at_traceon"; then
1624     at_trace_this=yes
1625 fi
1626
1627 if test -n "$at_trace_this"; then
1628     ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1"
1629     at_status=$?
1630     grep '^ *+' "$at_stder1" >&2
1631     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1632 else
1633     ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr"
1634     at_status=$?
1635 fi
1636
1637 at_failed=false
1638 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1639 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
1640 case $at_status in
1641    77) echo 77 > "$at_status_file"; exit 77;;
1642    0) ;;
1643    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1644       at_failed=:;;
1645 esac
1646 if $at_failed; then
1647
1648
1649   echo 1 > "$at_status_file"
1650   exit 1
1651 fi
1652
1653 $at_traceon
1654
1655 $at_traceoff
1656 echo "$at_srcdir/pipe.at:33:
1657 mkdir ustar
1658 (cd ustar
1659 TEST_TAR_FORMAT=ustar
1660 export TEST_TAR_FORMAT
1661 TAR_OPTIONS=\"-H ustar\"
1662 export TAR_OPTIONS
1663 rm -rf *
1664
1665
1666 test -z "`sort < /dev/null 2>&1`" || exit 77
1667
1668
1669 mkdir directory
1670 genfile --length 10240 --pattern zeros --file directory/file1
1671 genfile --length 13 --file directory/file2
1672 tar cf archive directory|sort
1673 mv directory orig
1674 cat archive | tar xfv - | sort
1675 echo \"separator\"
1676 cmp orig/file1 directory/file1
1677 echo \"separator\"
1678 cmp orig/file2 directory/file2)"
1679 echo pipe.at:33 >"$at_check_line_file"
1680
1681 at_trace_this=
1682 if test -n "$at_traceon"; then
1683     echo 'Not enabling shell tracing (command contains an embedded newline)'
1684 fi
1685
1686 if test -n "$at_trace_this"; then
1687     ( $at_traceon;
1688 mkdir ustar
1689 (cd ustar
1690 TEST_TAR_FORMAT=ustar
1691 export TEST_TAR_FORMAT
1692 TAR_OPTIONS="-H ustar"
1693 export TAR_OPTIONS
1694 rm -rf *
1695
1696
1697 test -z "`sort < /dev/null 2>&1`" || exit 77
1698
1699
1700 mkdir directory
1701 genfile --length 10240 --pattern zeros --file directory/file1
1702 genfile --length 13 --file directory/file2
1703 tar cf archive directory|sort
1704 mv directory orig
1705 cat archive | tar xfv - | sort
1706 echo "separator"
1707 cmp orig/file1 directory/file1
1708 echo "separator"
1709 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
1710     at_status=$?
1711     grep '^ *+' "$at_stder1" >&2
1712     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1713 else
1714     ( :;
1715 mkdir ustar
1716 (cd ustar
1717 TEST_TAR_FORMAT=ustar
1718 export TEST_TAR_FORMAT
1719 TAR_OPTIONS="-H ustar"
1720 export TAR_OPTIONS
1721 rm -rf *
1722
1723
1724 test -z "`sort < /dev/null 2>&1`" || exit 77
1725
1726
1727 mkdir directory
1728 genfile --length 10240 --pattern zeros --file directory/file1
1729 genfile --length 13 --file directory/file2
1730 tar cf archive directory|sort
1731 mv directory orig
1732 cat archive | tar xfv - | sort
1733 echo "separator"
1734 cmp orig/file1 directory/file1
1735 echo "separator"
1736 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
1737     at_status=$?
1738 fi
1739
1740 at_failed=false
1741 echo stderr:; tee stderr <"$at_stderr"
1742 echo >>"$at_stdout"; echo "directory/
1743 directory/file1
1744 directory/file2
1745 separator
1746 separator
1747 " | $at_diff - "$at_stdout" || at_failed=:
1748 case $at_status in
1749    77) echo 77 > "$at_status_file"; exit 77;;
1750    0) ;;
1751    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1752       at_failed=:;;
1753 esac
1754 if $at_failed; then
1755
1756
1757   echo 1 > "$at_status_file"
1758   exit 1
1759 fi
1760
1761 $at_traceon
1762
1763
1764   $at_traceoff
1765 echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0"
1766 echo pipe.at:33 >"$at_check_line_file"
1767
1768 at_trace_this=
1769 if test -n "$at_traceon"; then
1770     at_trace_this=yes
1771 fi
1772
1773 if test -n "$at_trace_this"; then
1774     ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1"
1775     at_status=$?
1776     grep '^ *+' "$at_stder1" >&2
1777     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1778 else
1779     ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr"
1780     at_status=$?
1781 fi
1782
1783 at_failed=false
1784 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1785 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
1786 case $at_status in
1787    77) echo 77 > "$at_status_file"; exit 77;;
1788    0) ;;
1789    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1790       at_failed=:;;
1791 esac
1792 if $at_failed; then
1793
1794
1795   echo 1 > "$at_status_file"
1796   exit 1
1797 fi
1798
1799 $at_traceon
1800
1801 $at_traceoff
1802 echo "$at_srcdir/pipe.at:33:
1803 mkdir posix
1804 (cd posix
1805 TEST_TAR_FORMAT=posix
1806 export TEST_TAR_FORMAT
1807 TAR_OPTIONS=\"-H posix\"
1808 export TAR_OPTIONS
1809 rm -rf *
1810
1811
1812 test -z "`sort < /dev/null 2>&1`" || exit 77
1813
1814
1815 mkdir directory
1816 genfile --length 10240 --pattern zeros --file directory/file1
1817 genfile --length 13 --file directory/file2
1818 tar cf archive directory|sort
1819 mv directory orig
1820 cat archive | tar xfv - | sort
1821 echo \"separator\"
1822 cmp orig/file1 directory/file1
1823 echo \"separator\"
1824 cmp orig/file2 directory/file2)"
1825 echo pipe.at:33 >"$at_check_line_file"
1826
1827 at_trace_this=
1828 if test -n "$at_traceon"; then
1829     echo 'Not enabling shell tracing (command contains an embedded newline)'
1830 fi
1831
1832 if test -n "$at_trace_this"; then
1833     ( $at_traceon;
1834 mkdir posix
1835 (cd posix
1836 TEST_TAR_FORMAT=posix
1837 export TEST_TAR_FORMAT
1838 TAR_OPTIONS="-H posix"
1839 export TAR_OPTIONS
1840 rm -rf *
1841
1842
1843 test -z "`sort < /dev/null 2>&1`" || exit 77
1844
1845
1846 mkdir directory
1847 genfile --length 10240 --pattern zeros --file directory/file1
1848 genfile --length 13 --file directory/file2
1849 tar cf archive directory|sort
1850 mv directory orig
1851 cat archive | tar xfv - | sort
1852 echo "separator"
1853 cmp orig/file1 directory/file1
1854 echo "separator"
1855 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
1856     at_status=$?
1857     grep '^ *+' "$at_stder1" >&2
1858     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1859 else
1860     ( :;
1861 mkdir posix
1862 (cd posix
1863 TEST_TAR_FORMAT=posix
1864 export TEST_TAR_FORMAT
1865 TAR_OPTIONS="-H posix"
1866 export TAR_OPTIONS
1867 rm -rf *
1868
1869
1870 test -z "`sort < /dev/null 2>&1`" || exit 77
1871
1872
1873 mkdir directory
1874 genfile --length 10240 --pattern zeros --file directory/file1
1875 genfile --length 13 --file directory/file2
1876 tar cf archive directory|sort
1877 mv directory orig
1878 cat archive | tar xfv - | sort
1879 echo "separator"
1880 cmp orig/file1 directory/file1
1881 echo "separator"
1882 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
1883     at_status=$?
1884 fi
1885
1886 at_failed=false
1887 echo stderr:; tee stderr <"$at_stderr"
1888 echo >>"$at_stdout"; echo "directory/
1889 directory/file1
1890 directory/file2
1891 separator
1892 separator
1893 " | $at_diff - "$at_stdout" || at_failed=:
1894 case $at_status in
1895    77) echo 77 > "$at_status_file"; exit 77;;
1896    0) ;;
1897    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1898       at_failed=:;;
1899 esac
1900 if $at_failed; then
1901
1902
1903   echo 1 > "$at_status_file"
1904   exit 1
1905 fi
1906
1907 $at_traceon
1908
1909
1910   $at_traceoff
1911 echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0"
1912 echo pipe.at:33 >"$at_check_line_file"
1913
1914 at_trace_this=
1915 if test -n "$at_traceon"; then
1916     at_trace_this=yes
1917 fi
1918
1919 if test -n "$at_trace_this"; then
1920     ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1"
1921     at_status=$?
1922     grep '^ *+' "$at_stder1" >&2
1923     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1924 else
1925     ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr"
1926     at_status=$?
1927 fi
1928
1929 at_failed=false
1930 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1931 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
1932 case $at_status in
1933    77) echo 77 > "$at_status_file"; exit 77;;
1934    0) ;;
1935    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1936       at_failed=:;;
1937 esac
1938 if $at_failed; then
1939
1940
1941   echo 1 > "$at_status_file"
1942   exit 1
1943 fi
1944
1945 $at_traceon
1946
1947 $at_traceoff
1948 echo "$at_srcdir/pipe.at:33:
1949 mkdir gnu
1950 (cd gnu
1951 TEST_TAR_FORMAT=gnu
1952 export TEST_TAR_FORMAT
1953 TAR_OPTIONS=\"-H gnu\"
1954 export TAR_OPTIONS
1955 rm -rf *
1956
1957
1958 test -z "`sort < /dev/null 2>&1`" || exit 77
1959
1960
1961 mkdir directory
1962 genfile --length 10240 --pattern zeros --file directory/file1
1963 genfile --length 13 --file directory/file2
1964 tar cf archive directory|sort
1965 mv directory orig
1966 cat archive | tar xfv - | sort
1967 echo \"separator\"
1968 cmp orig/file1 directory/file1
1969 echo \"separator\"
1970 cmp orig/file2 directory/file2)"
1971 echo pipe.at:33 >"$at_check_line_file"
1972
1973 at_trace_this=
1974 if test -n "$at_traceon"; then
1975     echo 'Not enabling shell tracing (command contains an embedded newline)'
1976 fi
1977
1978 if test -n "$at_trace_this"; then
1979     ( $at_traceon;
1980 mkdir gnu
1981 (cd gnu
1982 TEST_TAR_FORMAT=gnu
1983 export TEST_TAR_FORMAT
1984 TAR_OPTIONS="-H gnu"
1985 export TAR_OPTIONS
1986 rm -rf *
1987
1988
1989 test -z "`sort < /dev/null 2>&1`" || exit 77
1990
1991
1992 mkdir directory
1993 genfile --length 10240 --pattern zeros --file directory/file1
1994 genfile --length 13 --file directory/file2
1995 tar cf archive directory|sort
1996 mv directory orig
1997 cat archive | tar xfv - | sort
1998 echo "separator"
1999 cmp orig/file1 directory/file1
2000 echo "separator"
2001 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
2002     at_status=$?
2003     grep '^ *+' "$at_stder1" >&2
2004     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2005 else
2006     ( :;
2007 mkdir gnu
2008 (cd gnu
2009 TEST_TAR_FORMAT=gnu
2010 export TEST_TAR_FORMAT
2011 TAR_OPTIONS="-H gnu"
2012 export TAR_OPTIONS
2013 rm -rf *
2014
2015
2016 test -z "`sort < /dev/null 2>&1`" || exit 77
2017
2018
2019 mkdir directory
2020 genfile --length 10240 --pattern zeros --file directory/file1
2021 genfile --length 13 --file directory/file2
2022 tar cf archive directory|sort
2023 mv directory orig
2024 cat archive | tar xfv - | sort
2025 echo "separator"
2026 cmp orig/file1 directory/file1
2027 echo "separator"
2028 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
2029     at_status=$?
2030 fi
2031
2032 at_failed=false
2033 echo stderr:; tee stderr <"$at_stderr"
2034 echo >>"$at_stdout"; echo "directory/
2035 directory/file1
2036 directory/file2
2037 separator
2038 separator
2039 " | $at_diff - "$at_stdout" || at_failed=:
2040 case $at_status in
2041    77) echo 77 > "$at_status_file"; exit 77;;
2042    0) ;;
2043    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
2044       at_failed=:;;
2045 esac
2046 if $at_failed; then
2047
2048
2049   echo 1 > "$at_status_file"
2050   exit 1
2051 fi
2052
2053 $at_traceon
2054
2055
2056   $at_traceoff
2057 echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0"
2058 echo pipe.at:33 >"$at_check_line_file"
2059
2060 at_trace_this=
2061 if test -n "$at_traceon"; then
2062     at_trace_this=yes
2063 fi
2064
2065 if test -n "$at_trace_this"; then
2066     ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1"
2067     at_status=$?
2068     grep '^ *+' "$at_stder1" >&2
2069     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2070 else
2071     ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr"
2072     at_status=$?
2073 fi
2074
2075 at_failed=false
2076 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2077 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
2078 case $at_status in
2079    77) echo 77 > "$at_status_file"; exit 77;;
2080    0) ;;
2081    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
2082       at_failed=:;;
2083 esac
2084 if $at_failed; then
2085
2086
2087   echo 1 > "$at_status_file"
2088   exit 1
2089 fi
2090
2091 $at_traceon
2092
2093
2094
2095
2096
2097
2098       $at_traceoff
2099       $at_times_p && times >"$at_times_file"
2100     ) 5>&1 2>&1 | eval $at_tee_pipe
2101     at_status=`cat "$at_status_file"`
2102     ;;
2103
2104   3 ) # 3. options.at:24: mixing options
2105     at_setup_line='options.at:24'
2106     at_desc="mixing options"
2107     $at_quiet $ECHO_N "  3: mixing options                                 $ECHO_C"
2108     at_xfail=no
2109     echo "#                             -*- compilation -*-" >> "$at_group_log"
2110     (
2111       echo "3. options.at:24: testing ..."
2112       $at_traceon
2113
2114
2115
2116 $at_traceoff
2117 echo "$at_srcdir/options.at:27:
2118 echo > file1
2119 TAR_OPTIONS=--numeric-owner tar chof archive file1
2120 tar tf archive
2121 "
2122 echo options.at:27 >"$at_check_line_file"
2123
2124 at_trace_this=
2125 if test -n "$at_traceon"; then
2126     echo 'Not enabling shell tracing (command contains an embedded newline)'
2127 fi
2128
2129 if test -n "$at_trace_this"; then
2130     ( $at_traceon;
2131 echo > file1
2132 TAR_OPTIONS=--numeric-owner tar chof archive file1
2133 tar tf archive
2134  ) >"$at_stdout" 2>"$at_stder1"
2135     at_status=$?
2136     grep '^ *+' "$at_stder1" >&2
2137     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2138 else
2139     ( :;
2140 echo > file1
2141 TAR_OPTIONS=--numeric-owner tar chof archive file1
2142 tar tf archive
2143  ) >"$at_stdout" 2>"$at_stderr"
2144     at_status=$?
2145 fi
2146
2147 at_failed=false
2148 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2149 echo >>"$at_stdout"; echo "file1
2150 " | $at_diff - "$at_stdout" || at_failed=:
2151 case $at_status in
2152    77) echo 77 > "$at_status_file"; exit 77;;
2153    0) ;;
2154    *) echo "$at_srcdir/options.at:27: exit code was $at_status, expected 0"
2155       at_failed=:;;
2156 esac
2157 if $at_failed; then
2158
2159
2160   echo 1 > "$at_status_file"
2161   exit 1
2162 fi
2163
2164 $at_traceon
2165
2166
2167       $at_traceoff
2168       $at_times_p && times >"$at_times_file"
2169     ) 5>&1 2>&1 | eval $at_tee_pipe
2170     at_status=`cat "$at_status_file"`
2171     ;;
2172
2173   4 ) # 4. options02.at:26: interspersed options
2174     at_setup_line='options02.at:26'
2175     at_desc="interspersed options"
2176     $at_quiet $ECHO_N "  4: interspersed options                           $ECHO_C"
2177     at_xfail=no
2178     echo "#                             -*- compilation -*-" >> "$at_group_log"
2179     (
2180       echo "4. options02.at:26: testing ..."
2181       $at_traceon
2182
2183
2184
2185 $at_traceoff
2186 echo "$at_srcdir/options02.at:29:
2187 echo > file1
2188 tar c file1 -f archive
2189 tar tf archive
2190 "
2191 echo options02.at:29 >"$at_check_line_file"
2192
2193 at_trace_this=
2194 if test -n "$at_traceon"; then
2195     echo 'Not enabling shell tracing (command contains an embedded newline)'
2196 fi
2197
2198 if test -n "$at_trace_this"; then
2199     ( $at_traceon;
2200 echo > file1
2201 tar c file1 -f archive
2202 tar tf archive
2203  ) >"$at_stdout" 2>"$at_stder1"
2204     at_status=$?
2205     grep '^ *+' "$at_stder1" >&2
2206     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2207 else
2208     ( :;
2209 echo > file1
2210 tar c file1 -f archive
2211 tar tf archive
2212  ) >"$at_stdout" 2>"$at_stderr"
2213     at_status=$?
2214 fi
2215
2216 at_failed=false
2217 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2218 echo >>"$at_stdout"; echo "file1
2219 " | $at_diff - "$at_stdout" || at_failed=:
2220 case $at_status in
2221    77) echo 77 > "$at_status_file"; exit 77;;
2222    0) ;;
2223    *) echo "$at_srcdir/options02.at:29: exit code was $at_status, expected 0"
2224       at_failed=:;;
2225 esac
2226 if $at_failed; then
2227
2228
2229   echo 1 > "$at_status_file"
2230   exit 1
2231 fi
2232
2233 $at_traceon
2234
2235
2236       $at_traceoff
2237       $at_times_p && times >"$at_times_file"
2238     ) 5>&1 2>&1 | eval $at_tee_pipe
2239     at_status=`cat "$at_status_file"`
2240     ;;
2241
2242   5 ) # 5. T-empty.at:26: files-from: empty entries
2243     at_setup_line='T-empty.at:26'
2244     at_desc="files-from: empty entries"
2245     $at_quiet $ECHO_N "  5: files-from: empty entries                      $ECHO_C"
2246     at_xfail=no
2247       test -f $XFAILFILE && at_xfail=yes
2248     echo "#                             -*- compilation -*-" >> "$at_group_log"
2249     (
2250       echo "5. T-empty.at:26: testing ..."
2251       $at_traceon
2252
2253
2254
2255 cat >file-list <<'_ATEOF'
2256 jeden
2257 dwa
2258
2259 trzy
2260 _ATEOF
2261
2262
2263
2264
2265   $at_traceoff
2266 echo "$at_srcdir/T-empty.at:36:
2267 mkdir ustar
2268 (cd ustar
2269 TEST_TAR_FORMAT=ustar
2270 export TEST_TAR_FORMAT
2271 TAR_OPTIONS=\"-H ustar\"
2272 export TAR_OPTIONS
2273 rm -rf *
2274
2275
2276 test -z "`sort < /dev/null 2>&1`" || exit 77
2277
2278
2279 genfile --file jeden
2280 genfile --file dwa
2281 genfile --file trzy
2282
2283 tar cfvT archive ../file-list | sort
2284 )"
2285 echo T-empty.at:36 >"$at_check_line_file"
2286
2287 at_trace_this=
2288 if test -n "$at_traceon"; then
2289     echo 'Not enabling shell tracing (command contains an embedded newline)'
2290 fi
2291
2292 if test -n "$at_trace_this"; then
2293     ( $at_traceon;
2294 mkdir ustar
2295 (cd ustar
2296 TEST_TAR_FORMAT=ustar
2297 export TEST_TAR_FORMAT
2298 TAR_OPTIONS="-H ustar"
2299 export TAR_OPTIONS
2300 rm -rf *
2301
2302
2303 test -z "`sort < /dev/null 2>&1`" || exit 77
2304
2305
2306 genfile --file jeden
2307 genfile --file dwa
2308 genfile --file trzy
2309
2310 tar cfvT archive ../file-list | sort
2311 ) ) >"$at_stdout" 2>"$at_stder1"
2312     at_status=$?
2313     grep '^ *+' "$at_stder1" >&2
2314     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2315 else
2316     ( :;
2317 mkdir ustar
2318 (cd ustar
2319 TEST_TAR_FORMAT=ustar
2320 export TEST_TAR_FORMAT
2321 TAR_OPTIONS="-H ustar"
2322 export TAR_OPTIONS
2323 rm -rf *
2324
2325
2326 test -z "`sort < /dev/null 2>&1`" || exit 77
2327
2328
2329 genfile --file jeden
2330 genfile --file dwa
2331 genfile --file trzy
2332
2333 tar cfvT archive ../file-list | sort
2334 ) ) >"$at_stdout" 2>"$at_stderr"
2335     at_status=$?
2336 fi
2337
2338 at_failed=false
2339 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2340 echo >>"$at_stdout"; echo "dwa
2341 jeden
2342 trzy
2343 " | $at_diff - "$at_stdout" || at_failed=:
2344 case $at_status in
2345    77) echo 77 > "$at_status_file"; exit 77;;
2346    0) ;;
2347    *) echo "$at_srcdir/T-empty.at:36: exit code was $at_status, expected 0"
2348       at_failed=:;;
2349 esac
2350 if $at_failed; then
2351
2352
2353   echo 1 > "$at_status_file"
2354   exit 1
2355 fi
2356
2357 $at_traceon
2358
2359
2360  # Testing one format is enough
2361
2362       $at_traceoff
2363       $at_times_p && times >"$at_times_file"
2364     ) 5>&1 2>&1 | eval $at_tee_pipe
2365     at_status=`cat "$at_status_file"`
2366     ;;
2367
2368   6 ) # 6. T-null.at:21: files-from: 0-separated file without -0
2369     at_setup_line='T-null.at:21'
2370     at_desc="files-from: 0-separated file without -0"
2371     $at_quiet $ECHO_N "  6: files-from: 0-separated file without -0        $ECHO_C"
2372     at_xfail=no
2373       test -f $XFAILFILE && at_xfail=yes
2374     echo "#                             -*- compilation -*-" >> "$at_group_log"
2375     (
2376       echo "6. T-null.at:21: testing ..."
2377       $at_traceon
2378
2379
2380
2381 cat >expout <<'_ATEOF'
2382 jeden\ndwa
2383 trzy
2384 _ATEOF
2385
2386
2387
2388
2389   $at_traceoff
2390 echo "$at_srcdir/T-null.at:28:
2391 mkdir ustar
2392 (cd ustar
2393 TEST_TAR_FORMAT=ustar
2394 export TEST_TAR_FORMAT
2395 TAR_OPTIONS=\"-H ustar\"
2396 export TAR_OPTIONS
2397 rm -rf *
2398
2399
2400 test -z "`sort < /dev/null 2>&1`" || exit 77
2401
2402
2403 echo dwa > temp
2404 echo trzy >> temp
2405 cat temp | tr '\\n' '\\0' > temp1
2406 echo jeden > file-list
2407 cat temp1 >> file-list
2408
2409 genfile -f \"jeden
2410 dwa\" || exit 77
2411 genfile -f trzy
2412
2413 tar cfTv archive file-list | sort
2414 )"
2415 echo T-null.at:28 >"$at_check_line_file"
2416
2417 at_trace_this=
2418 if test -n "$at_traceon"; then
2419     echo 'Not enabling shell tracing (command contains an embedded newline)'
2420 fi
2421
2422 if test -n "$at_trace_this"; then
2423     ( $at_traceon;
2424 mkdir ustar
2425 (cd ustar
2426 TEST_TAR_FORMAT=ustar
2427 export TEST_TAR_FORMAT
2428 TAR_OPTIONS="-H ustar"
2429 export TAR_OPTIONS
2430 rm -rf *
2431
2432
2433 test -z "`sort < /dev/null 2>&1`" || exit 77
2434
2435
2436 echo dwa > temp
2437 echo trzy >> temp
2438 cat temp | tr '\n' '\0' > temp1
2439 echo jeden > file-list
2440 cat temp1 >> file-list
2441
2442 genfile -f "jeden
2443 dwa" || exit 77
2444 genfile -f trzy
2445
2446 tar cfTv archive file-list | sort
2447 ) ) >"$at_stdout" 2>"$at_stder1"
2448     at_status=$?
2449     grep '^ *+' "$at_stder1" >&2
2450     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2451 else
2452     ( :;
2453 mkdir ustar
2454 (cd ustar
2455 TEST_TAR_FORMAT=ustar
2456 export TEST_TAR_FORMAT
2457 TAR_OPTIONS="-H ustar"
2458 export TAR_OPTIONS
2459 rm -rf *
2460
2461
2462 test -z "`sort < /dev/null 2>&1`" || exit 77
2463
2464
2465 echo dwa > temp
2466 echo trzy >> temp
2467 cat temp | tr '\n' '\0' > temp1
2468 echo jeden > file-list
2469 cat temp1 >> file-list
2470
2471 genfile -f "jeden
2472 dwa" || exit 77
2473 genfile -f trzy
2474
2475 tar cfTv archive file-list | sort
2476 ) ) >"$at_stdout" 2>"$at_stderr"
2477     at_status=$?
2478 fi
2479
2480 at_failed=false
2481 echo >>"$at_stderr"; echo "tar: file-list: file name read contains nul character
2482 " | $at_diff - "$at_stderr" || at_failed=:
2483 $at_diff expout "$at_stdout" || at_failed=:
2484 case $at_status in
2485    77) echo 77 > "$at_status_file"; exit 77;;
2486    0) ;;
2487    *) echo "$at_srcdir/T-null.at:28: exit code was $at_status, expected 0"
2488       at_failed=:;;
2489 esac
2490 if $at_failed; then
2491
2492
2493   echo 1 > "$at_status_file"
2494   exit 1
2495 fi
2496
2497 $at_traceon
2498
2499
2500  # Testing one format is enough
2501
2502       $at_traceoff
2503       $at_times_p && times >"$at_times_file"
2504     ) 5>&1 2>&1 | eval $at_tee_pipe
2505     at_status=`cat "$at_status_file"`
2506     ;;
2507
2508   7 ) # 7. indexfile.at:26: tar --index-file=FILE --file=-
2509     at_setup_line='indexfile.at:26'
2510     at_desc="tar --index-file=FILE --file=-"
2511     $at_quiet $ECHO_N "  7: tar --index-file=FILE --file=-                 $ECHO_C"
2512     at_xfail=no
2513       test -f $XFAILFILE && at_xfail=yes
2514     echo "#                             -*- compilation -*-" >> "$at_group_log"
2515     (
2516       echo "7. indexfile.at:26: testing ..."
2517       $at_traceon
2518
2519
2520
2521
2522
2523   $at_traceoff
2524 echo "$at_srcdir/indexfile.at:29:
2525 mkdir v7
2526 (cd v7
2527 TEST_TAR_FORMAT=v7
2528 export TEST_TAR_FORMAT
2529 TAR_OPTIONS=\"-H v7\"
2530 export TAR_OPTIONS
2531 rm -rf *
2532
2533
2534 mkdir directory
2535 genfile --file=directory/a --length=1035
2536
2537 echo \"Creating the archive\"
2538 tar -c -v -f - --index-file=idx directory > archive
2539
2540 echo \"Testing the archive\"
2541 tar -tf archive
2542 )"
2543 echo indexfile.at:29 >"$at_check_line_file"
2544
2545 at_trace_this=
2546 if test -n "$at_traceon"; then
2547     echo 'Not enabling shell tracing (command contains an embedded newline)'
2548 fi
2549
2550 if test -n "$at_trace_this"; then
2551     ( $at_traceon;
2552 mkdir v7
2553 (cd v7
2554 TEST_TAR_FORMAT=v7
2555 export TEST_TAR_FORMAT
2556 TAR_OPTIONS="-H v7"
2557 export TAR_OPTIONS
2558 rm -rf *
2559
2560
2561 mkdir directory
2562 genfile --file=directory/a --length=1035
2563
2564 echo "Creating the archive"
2565 tar -c -v -f - --index-file=idx directory > archive
2566
2567 echo "Testing the archive"
2568 tar -tf archive
2569 ) ) >"$at_stdout" 2>"$at_stder1"
2570     at_status=$?
2571     grep '^ *+' "$at_stder1" >&2
2572     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2573 else
2574     ( :;
2575 mkdir v7
2576 (cd v7
2577 TEST_TAR_FORMAT=v7
2578 export TEST_TAR_FORMAT
2579 TAR_OPTIONS="-H v7"
2580 export TAR_OPTIONS
2581 rm -rf *
2582
2583
2584 mkdir directory
2585 genfile --file=directory/a --length=1035
2586
2587 echo "Creating the archive"
2588 tar -c -v -f - --index-file=idx directory > archive
2589
2590 echo "Testing the archive"
2591 tar -tf archive
2592 ) ) >"$at_stdout" 2>"$at_stderr"
2593     at_status=$?
2594 fi
2595
2596 at_failed=false
2597 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2598 echo >>"$at_stdout"; echo "Creating the archive
2599 Testing the archive
2600 directory/
2601 directory/a
2602 " | $at_diff - "$at_stdout" || at_failed=:
2603 case $at_status in
2604    77) echo 77 > "$at_status_file"; exit 77;;
2605    0) ;;
2606    *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
2607       at_failed=:;;
2608 esac
2609 if $at_failed; then
2610
2611
2612   echo 1 > "$at_status_file"
2613   exit 1
2614 fi
2615
2616 $at_traceon
2617
2618               $at_traceoff
2619 echo "$at_srcdir/indexfile.at:29:
2620 mkdir oldgnu
2621 (cd oldgnu
2622 TEST_TAR_FORMAT=oldgnu
2623 export TEST_TAR_FORMAT
2624 TAR_OPTIONS=\"-H oldgnu\"
2625 export TAR_OPTIONS
2626 rm -rf *
2627
2628
2629 mkdir directory
2630 genfile --file=directory/a --length=1035
2631
2632 echo \"Creating the archive\"
2633 tar -c -v -f - --index-file=idx directory > archive
2634
2635 echo \"Testing the archive\"
2636 tar -tf archive
2637 )"
2638 echo indexfile.at:29 >"$at_check_line_file"
2639
2640 at_trace_this=
2641 if test -n "$at_traceon"; then
2642     echo 'Not enabling shell tracing (command contains an embedded newline)'
2643 fi
2644
2645 if test -n "$at_trace_this"; then
2646     ( $at_traceon;
2647 mkdir oldgnu
2648 (cd oldgnu
2649 TEST_TAR_FORMAT=oldgnu
2650 export TEST_TAR_FORMAT
2651 TAR_OPTIONS="-H oldgnu"
2652 export TAR_OPTIONS
2653 rm -rf *
2654
2655
2656 mkdir directory
2657 genfile --file=directory/a --length=1035
2658
2659 echo "Creating the archive"
2660 tar -c -v -f - --index-file=idx directory > archive
2661
2662 echo "Testing the archive"
2663 tar -tf archive
2664 ) ) >"$at_stdout" 2>"$at_stder1"
2665     at_status=$?
2666     grep '^ *+' "$at_stder1" >&2
2667     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2668 else
2669     ( :;
2670 mkdir oldgnu
2671 (cd oldgnu
2672 TEST_TAR_FORMAT=oldgnu
2673 export TEST_TAR_FORMAT
2674 TAR_OPTIONS="-H oldgnu"
2675 export TAR_OPTIONS
2676 rm -rf *
2677
2678
2679 mkdir directory
2680 genfile --file=directory/a --length=1035
2681
2682 echo "Creating the archive"
2683 tar -c -v -f - --index-file=idx directory > archive
2684
2685 echo "Testing the archive"
2686 tar -tf archive
2687 ) ) >"$at_stdout" 2>"$at_stderr"
2688     at_status=$?
2689 fi
2690
2691 at_failed=false
2692 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2693 echo >>"$at_stdout"; echo "Creating the archive
2694 Testing the archive
2695 directory/
2696 directory/a
2697 " | $at_diff - "$at_stdout" || at_failed=:
2698 case $at_status in
2699    77) echo 77 > "$at_status_file"; exit 77;;
2700    0) ;;
2701    *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
2702       at_failed=:;;
2703 esac
2704 if $at_failed; then
2705
2706
2707   echo 1 > "$at_status_file"
2708   exit 1
2709 fi
2710
2711 $at_traceon
2712
2713               $at_traceoff
2714 echo "$at_srcdir/indexfile.at:29:
2715 mkdir ustar
2716 (cd ustar
2717 TEST_TAR_FORMAT=ustar
2718 export TEST_TAR_FORMAT
2719 TAR_OPTIONS=\"-H ustar\"
2720 export TAR_OPTIONS
2721 rm -rf *
2722
2723
2724 mkdir directory
2725 genfile --file=directory/a --length=1035
2726
2727 echo \"Creating the archive\"
2728 tar -c -v -f - --index-file=idx directory > archive
2729
2730 echo \"Testing the archive\"
2731 tar -tf archive
2732 )"
2733 echo indexfile.at:29 >"$at_check_line_file"
2734
2735 at_trace_this=
2736 if test -n "$at_traceon"; then
2737     echo 'Not enabling shell tracing (command contains an embedded newline)'
2738 fi
2739
2740 if test -n "$at_trace_this"; then
2741     ( $at_traceon;
2742 mkdir ustar
2743 (cd ustar
2744 TEST_TAR_FORMAT=ustar
2745 export TEST_TAR_FORMAT
2746 TAR_OPTIONS="-H ustar"
2747 export TAR_OPTIONS
2748 rm -rf *
2749
2750
2751 mkdir directory
2752 genfile --file=directory/a --length=1035
2753
2754 echo "Creating the archive"
2755 tar -c -v -f - --index-file=idx directory > archive
2756
2757 echo "Testing the archive"
2758 tar -tf archive
2759 ) ) >"$at_stdout" 2>"$at_stder1"
2760     at_status=$?
2761     grep '^ *+' "$at_stder1" >&2
2762     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2763 else
2764     ( :;
2765 mkdir ustar
2766 (cd ustar
2767 TEST_TAR_FORMAT=ustar
2768 export TEST_TAR_FORMAT
2769 TAR_OPTIONS="-H ustar"
2770 export TAR_OPTIONS
2771 rm -rf *
2772
2773
2774 mkdir directory
2775 genfile --file=directory/a --length=1035
2776
2777 echo "Creating the archive"
2778 tar -c -v -f - --index-file=idx directory > archive
2779
2780 echo "Testing the archive"
2781 tar -tf archive
2782 ) ) >"$at_stdout" 2>"$at_stderr"
2783     at_status=$?
2784 fi
2785
2786 at_failed=false
2787 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2788 echo >>"$at_stdout"; echo "Creating the archive
2789 Testing the archive
2790 directory/
2791 directory/a
2792 " | $at_diff - "$at_stdout" || at_failed=:
2793 case $at_status in
2794    77) echo 77 > "$at_status_file"; exit 77;;
2795    0) ;;
2796    *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
2797       at_failed=:;;
2798 esac
2799 if $at_failed; then
2800
2801
2802   echo 1 > "$at_status_file"
2803   exit 1
2804 fi
2805
2806 $at_traceon
2807
2808               $at_traceoff
2809 echo "$at_srcdir/indexfile.at:29:
2810 mkdir posix
2811 (cd posix
2812 TEST_TAR_FORMAT=posix
2813 export TEST_TAR_FORMAT
2814 TAR_OPTIONS=\"-H posix\"
2815 export TAR_OPTIONS
2816 rm -rf *
2817
2818
2819 mkdir directory
2820 genfile --file=directory/a --length=1035
2821
2822 echo \"Creating the archive\"
2823 tar -c -v -f - --index-file=idx directory > archive
2824
2825 echo \"Testing the archive\"
2826 tar -tf archive
2827 )"
2828 echo indexfile.at:29 >"$at_check_line_file"
2829
2830 at_trace_this=
2831 if test -n "$at_traceon"; then
2832     echo 'Not enabling shell tracing (command contains an embedded newline)'
2833 fi
2834
2835 if test -n "$at_trace_this"; then
2836     ( $at_traceon;
2837 mkdir posix
2838 (cd posix
2839 TEST_TAR_FORMAT=posix
2840 export TEST_TAR_FORMAT
2841 TAR_OPTIONS="-H posix"
2842 export TAR_OPTIONS
2843 rm -rf *
2844
2845
2846 mkdir directory
2847 genfile --file=directory/a --length=1035
2848
2849 echo "Creating the archive"
2850 tar -c -v -f - --index-file=idx directory > archive
2851
2852 echo "Testing the archive"
2853 tar -tf archive
2854 ) ) >"$at_stdout" 2>"$at_stder1"
2855     at_status=$?
2856     grep '^ *+' "$at_stder1" >&2
2857     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2858 else
2859     ( :;
2860 mkdir posix
2861 (cd posix
2862 TEST_TAR_FORMAT=posix
2863 export TEST_TAR_FORMAT
2864 TAR_OPTIONS="-H posix"
2865 export TAR_OPTIONS
2866 rm -rf *
2867
2868
2869 mkdir directory
2870 genfile --file=directory/a --length=1035
2871
2872 echo "Creating the archive"
2873 tar -c -v -f - --index-file=idx directory > archive
2874
2875 echo "Testing the archive"
2876 tar -tf archive
2877 ) ) >"$at_stdout" 2>"$at_stderr"
2878     at_status=$?
2879 fi
2880
2881 at_failed=false
2882 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2883 echo >>"$at_stdout"; echo "Creating the archive
2884 Testing the archive
2885 directory/
2886 directory/a
2887 " | $at_diff - "$at_stdout" || at_failed=:
2888 case $at_status in
2889    77) echo 77 > "$at_status_file"; exit 77;;
2890    0) ;;
2891    *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
2892       at_failed=:;;
2893 esac
2894 if $at_failed; then
2895
2896
2897   echo 1 > "$at_status_file"
2898   exit 1
2899 fi
2900
2901 $at_traceon
2902
2903               $at_traceoff
2904 echo "$at_srcdir/indexfile.at:29:
2905 mkdir gnu
2906 (cd gnu
2907 TEST_TAR_FORMAT=gnu
2908 export TEST_TAR_FORMAT
2909 TAR_OPTIONS=\"-H gnu\"
2910 export TAR_OPTIONS
2911 rm -rf *
2912
2913
2914 mkdir directory
2915 genfile --file=directory/a --length=1035
2916
2917 echo \"Creating the archive\"
2918 tar -c -v -f - --index-file=idx directory > archive
2919
2920 echo \"Testing the archive\"
2921 tar -tf archive
2922 )"
2923 echo indexfile.at:29 >"$at_check_line_file"
2924
2925 at_trace_this=
2926 if test -n "$at_traceon"; then
2927     echo 'Not enabling shell tracing (command contains an embedded newline)'
2928 fi
2929
2930 if test -n "$at_trace_this"; then
2931     ( $at_traceon;
2932 mkdir gnu
2933 (cd gnu
2934 TEST_TAR_FORMAT=gnu
2935 export TEST_TAR_FORMAT
2936 TAR_OPTIONS="-H gnu"
2937 export TAR_OPTIONS
2938 rm -rf *
2939
2940
2941 mkdir directory
2942 genfile --file=directory/a --length=1035
2943
2944 echo "Creating the archive"
2945 tar -c -v -f - --index-file=idx directory > archive
2946
2947 echo "Testing the archive"
2948 tar -tf archive
2949 ) ) >"$at_stdout" 2>"$at_stder1"
2950     at_status=$?
2951     grep '^ *+' "$at_stder1" >&2
2952     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2953 else
2954     ( :;
2955 mkdir gnu
2956 (cd gnu
2957 TEST_TAR_FORMAT=gnu
2958 export TEST_TAR_FORMAT
2959 TAR_OPTIONS="-H gnu"
2960 export TAR_OPTIONS
2961 rm -rf *
2962
2963
2964 mkdir directory
2965 genfile --file=directory/a --length=1035
2966
2967 echo "Creating the archive"
2968 tar -c -v -f - --index-file=idx directory > archive
2969
2970 echo "Testing the archive"
2971 tar -tf archive
2972 ) ) >"$at_stdout" 2>"$at_stderr"
2973     at_status=$?
2974 fi
2975
2976 at_failed=false
2977 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2978 echo >>"$at_stdout"; echo "Creating the archive
2979 Testing the archive
2980 directory/
2981 directory/a
2982 " | $at_diff - "$at_stdout" || at_failed=:
2983 case $at_status in
2984    77) echo 77 > "$at_status_file"; exit 77;;
2985    0) ;;
2986    *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
2987       at_failed=:;;
2988 esac
2989 if $at_failed; then
2990
2991
2992   echo 1 > "$at_status_file"
2993   exit 1
2994 fi
2995
2996 $at_traceon
2997
2998
2999
3000
3001       $at_traceoff
3002       $at_times_p && times >"$at_times_file"
3003     ) 5>&1 2>&1 | eval $at_tee_pipe
3004     at_status=`cat "$at_status_file"`
3005     ;;
3006
3007   8 ) # 8. verbose.at:26: tar cvf -
3008     at_setup_line='verbose.at:26'
3009     at_desc="tar cvf -"
3010     $at_quiet $ECHO_N "  8: tar cvf -                                      $ECHO_C"
3011     at_xfail=no
3012       test -f $XFAILFILE && at_xfail=yes
3013     echo "#                             -*- compilation -*-" >> "$at_group_log"
3014     (
3015       echo "8. verbose.at:26: testing ..."
3016       $at_traceon
3017
3018
3019
3020
3021
3022   $at_traceoff
3023 echo "$at_srcdir/verbose.at:29:
3024 mkdir v7
3025 (cd v7
3026 TEST_TAR_FORMAT=v7
3027 export TEST_TAR_FORMAT
3028 TAR_OPTIONS=\"-H v7\"
3029 export TAR_OPTIONS
3030 rm -rf *
3031
3032 genfile --file file --length 10240
3033 echo Creating the archive
3034 tar cvf - file > archive
3035 echo Testing the archive
3036 tar tf archive
3037 )"
3038 echo verbose.at:29 >"$at_check_line_file"
3039
3040 at_trace_this=
3041 if test -n "$at_traceon"; then
3042     echo 'Not enabling shell tracing (command contains an embedded newline)'
3043 fi
3044
3045 if test -n "$at_trace_this"; then
3046     ( $at_traceon;
3047 mkdir v7
3048 (cd v7
3049 TEST_TAR_FORMAT=v7
3050 export TEST_TAR_FORMAT
3051 TAR_OPTIONS="-H v7"
3052 export TAR_OPTIONS
3053 rm -rf *
3054
3055 genfile --file file --length 10240
3056 echo Creating the archive
3057 tar cvf - file > archive
3058 echo Testing the archive
3059 tar tf archive
3060 ) ) >"$at_stdout" 2>"$at_stder1"
3061     at_status=$?
3062     grep '^ *+' "$at_stder1" >&2
3063     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3064 else
3065     ( :;
3066 mkdir v7
3067 (cd v7
3068 TEST_TAR_FORMAT=v7
3069 export TEST_TAR_FORMAT
3070 TAR_OPTIONS="-H v7"
3071 export TAR_OPTIONS
3072 rm -rf *
3073
3074 genfile --file file --length 10240
3075 echo Creating the archive
3076 tar cvf - file > archive
3077 echo Testing the archive
3078 tar tf archive
3079 ) ) >"$at_stdout" 2>"$at_stderr"
3080     at_status=$?
3081 fi
3082
3083 at_failed=false
3084 echo >>"$at_stderr"; echo "file
3085 " | $at_diff - "$at_stderr" || at_failed=:
3086 echo >>"$at_stdout"; echo "Creating the archive
3087 Testing the archive
3088 file
3089 " | $at_diff - "$at_stdout" || at_failed=:
3090 case $at_status in
3091    77) echo 77 > "$at_status_file"; exit 77;;
3092    0) ;;
3093    *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
3094       at_failed=:;;
3095 esac
3096 if $at_failed; then
3097
3098
3099   echo 1 > "$at_status_file"
3100   exit 1
3101 fi
3102
3103 $at_traceon
3104
3105               $at_traceoff
3106 echo "$at_srcdir/verbose.at:29:
3107 mkdir oldgnu
3108 (cd oldgnu
3109 TEST_TAR_FORMAT=oldgnu
3110 export TEST_TAR_FORMAT
3111 TAR_OPTIONS=\"-H oldgnu\"
3112 export TAR_OPTIONS
3113 rm -rf *
3114
3115 genfile --file file --length 10240
3116 echo Creating the archive
3117 tar cvf - file > archive
3118 echo Testing the archive
3119 tar tf archive
3120 )"
3121 echo verbose.at:29 >"$at_check_line_file"
3122
3123 at_trace_this=
3124 if test -n "$at_traceon"; then
3125     echo 'Not enabling shell tracing (command contains an embedded newline)'
3126 fi
3127
3128 if test -n "$at_trace_this"; then
3129     ( $at_traceon;
3130 mkdir oldgnu
3131 (cd oldgnu
3132 TEST_TAR_FORMAT=oldgnu
3133 export TEST_TAR_FORMAT
3134 TAR_OPTIONS="-H oldgnu"
3135 export TAR_OPTIONS
3136 rm -rf *
3137
3138 genfile --file file --length 10240
3139 echo Creating the archive
3140 tar cvf - file > archive
3141 echo Testing the archive
3142 tar tf archive
3143 ) ) >"$at_stdout" 2>"$at_stder1"
3144     at_status=$?
3145     grep '^ *+' "$at_stder1" >&2
3146     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3147 else
3148     ( :;
3149 mkdir oldgnu
3150 (cd oldgnu
3151 TEST_TAR_FORMAT=oldgnu
3152 export TEST_TAR_FORMAT
3153 TAR_OPTIONS="-H oldgnu"
3154 export TAR_OPTIONS
3155 rm -rf *
3156
3157 genfile --file file --length 10240
3158 echo Creating the archive
3159 tar cvf - file > archive
3160 echo Testing the archive
3161 tar tf archive
3162 ) ) >"$at_stdout" 2>"$at_stderr"
3163     at_status=$?
3164 fi
3165
3166 at_failed=false
3167 echo >>"$at_stderr"; echo "file
3168 " | $at_diff - "$at_stderr" || at_failed=:
3169 echo >>"$at_stdout"; echo "Creating the archive
3170 Testing the archive
3171 file
3172 " | $at_diff - "$at_stdout" || at_failed=:
3173 case $at_status in
3174    77) echo 77 > "$at_status_file"; exit 77;;
3175    0) ;;
3176    *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
3177       at_failed=:;;
3178 esac
3179 if $at_failed; then
3180
3181
3182   echo 1 > "$at_status_file"
3183   exit 1
3184 fi
3185
3186 $at_traceon
3187
3188               $at_traceoff
3189 echo "$at_srcdir/verbose.at:29:
3190 mkdir ustar
3191 (cd ustar
3192 TEST_TAR_FORMAT=ustar
3193 export TEST_TAR_FORMAT
3194 TAR_OPTIONS=\"-H ustar\"
3195 export TAR_OPTIONS
3196 rm -rf *
3197
3198 genfile --file file --length 10240
3199 echo Creating the archive
3200 tar cvf - file > archive
3201 echo Testing the archive
3202 tar tf archive
3203 )"
3204 echo verbose.at:29 >"$at_check_line_file"
3205
3206 at_trace_this=
3207 if test -n "$at_traceon"; then
3208     echo 'Not enabling shell tracing (command contains an embedded newline)'
3209 fi
3210
3211 if test -n "$at_trace_this"; then
3212     ( $at_traceon;
3213 mkdir ustar
3214 (cd ustar
3215 TEST_TAR_FORMAT=ustar
3216 export TEST_TAR_FORMAT
3217 TAR_OPTIONS="-H ustar"
3218 export TAR_OPTIONS
3219 rm -rf *
3220
3221 genfile --file file --length 10240
3222 echo Creating the archive
3223 tar cvf - file > archive
3224 echo Testing the archive
3225 tar tf archive
3226 ) ) >"$at_stdout" 2>"$at_stder1"
3227     at_status=$?
3228     grep '^ *+' "$at_stder1" >&2
3229     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3230 else
3231     ( :;
3232 mkdir ustar
3233 (cd ustar
3234 TEST_TAR_FORMAT=ustar
3235 export TEST_TAR_FORMAT
3236 TAR_OPTIONS="-H ustar"
3237 export TAR_OPTIONS
3238 rm -rf *
3239
3240 genfile --file file --length 10240
3241 echo Creating the archive
3242 tar cvf - file > archive
3243 echo Testing the archive
3244 tar tf archive
3245 ) ) >"$at_stdout" 2>"$at_stderr"
3246     at_status=$?
3247 fi
3248
3249 at_failed=false
3250 echo >>"$at_stderr"; echo "file
3251 " | $at_diff - "$at_stderr" || at_failed=:
3252 echo >>"$at_stdout"; echo "Creating the archive
3253 Testing the archive
3254 file
3255 " | $at_diff - "$at_stdout" || at_failed=:
3256 case $at_status in
3257    77) echo 77 > "$at_status_file"; exit 77;;
3258    0) ;;
3259    *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
3260       at_failed=:;;
3261 esac
3262 if $at_failed; then
3263
3264
3265   echo 1 > "$at_status_file"
3266   exit 1
3267 fi
3268
3269 $at_traceon
3270
3271               $at_traceoff
3272 echo "$at_srcdir/verbose.at:29:
3273 mkdir posix
3274 (cd posix
3275 TEST_TAR_FORMAT=posix
3276 export TEST_TAR_FORMAT
3277 TAR_OPTIONS=\"-H posix\"
3278 export TAR_OPTIONS
3279 rm -rf *
3280
3281 genfile --file file --length 10240
3282 echo Creating the archive
3283 tar cvf - file > archive
3284 echo Testing the archive
3285 tar tf archive
3286 )"
3287 echo verbose.at:29 >"$at_check_line_file"
3288
3289 at_trace_this=
3290 if test -n "$at_traceon"; then
3291     echo 'Not enabling shell tracing (command contains an embedded newline)'
3292 fi
3293
3294 if test -n "$at_trace_this"; then
3295     ( $at_traceon;
3296 mkdir posix
3297 (cd posix
3298 TEST_TAR_FORMAT=posix
3299 export TEST_TAR_FORMAT
3300 TAR_OPTIONS="-H posix"
3301 export TAR_OPTIONS
3302 rm -rf *
3303
3304 genfile --file file --length 10240
3305 echo Creating the archive
3306 tar cvf - file > archive
3307 echo Testing the archive
3308 tar tf archive
3309 ) ) >"$at_stdout" 2>"$at_stder1"
3310     at_status=$?
3311     grep '^ *+' "$at_stder1" >&2
3312     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3313 else
3314     ( :;
3315 mkdir posix
3316 (cd posix
3317 TEST_TAR_FORMAT=posix
3318 export TEST_TAR_FORMAT
3319 TAR_OPTIONS="-H posix"
3320 export TAR_OPTIONS
3321 rm -rf *
3322
3323 genfile --file file --length 10240
3324 echo Creating the archive
3325 tar cvf - file > archive
3326 echo Testing the archive
3327 tar tf archive
3328 ) ) >"$at_stdout" 2>"$at_stderr"
3329     at_status=$?
3330 fi
3331
3332 at_failed=false
3333 echo >>"$at_stderr"; echo "file
3334 " | $at_diff - "$at_stderr" || at_failed=:
3335 echo >>"$at_stdout"; echo "Creating the archive
3336 Testing the archive
3337 file
3338 " | $at_diff - "$at_stdout" || at_failed=:
3339 case $at_status in
3340    77) echo 77 > "$at_status_file"; exit 77;;
3341    0) ;;
3342    *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
3343       at_failed=:;;
3344 esac
3345 if $at_failed; then
3346
3347
3348   echo 1 > "$at_status_file"
3349   exit 1
3350 fi
3351
3352 $at_traceon
3353
3354               $at_traceoff
3355 echo "$at_srcdir/verbose.at:29:
3356 mkdir gnu
3357 (cd gnu
3358 TEST_TAR_FORMAT=gnu
3359 export TEST_TAR_FORMAT
3360 TAR_OPTIONS=\"-H gnu\"
3361 export TAR_OPTIONS
3362 rm -rf *
3363
3364 genfile --file file --length 10240
3365 echo Creating the archive
3366 tar cvf - file > archive
3367 echo Testing the archive
3368 tar tf archive
3369 )"
3370 echo verbose.at:29 >"$at_check_line_file"
3371
3372 at_trace_this=
3373 if test -n "$at_traceon"; then
3374     echo 'Not enabling shell tracing (command contains an embedded newline)'
3375 fi
3376
3377 if test -n "$at_trace_this"; then
3378     ( $at_traceon;
3379 mkdir gnu
3380 (cd gnu
3381 TEST_TAR_FORMAT=gnu
3382 export TEST_TAR_FORMAT
3383 TAR_OPTIONS="-H gnu"
3384 export TAR_OPTIONS
3385 rm -rf *
3386
3387 genfile --file file --length 10240
3388 echo Creating the archive
3389 tar cvf - file > archive
3390 echo Testing the archive
3391 tar tf archive
3392 ) ) >"$at_stdout" 2>"$at_stder1"
3393     at_status=$?
3394     grep '^ *+' "$at_stder1" >&2
3395     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3396 else
3397     ( :;
3398 mkdir gnu
3399 (cd gnu
3400 TEST_TAR_FORMAT=gnu
3401 export TEST_TAR_FORMAT
3402 TAR_OPTIONS="-H gnu"
3403 export TAR_OPTIONS
3404 rm -rf *
3405
3406 genfile --file file --length 10240
3407 echo Creating the archive
3408 tar cvf - file > archive
3409 echo Testing the archive
3410 tar tf archive
3411 ) ) >"$at_stdout" 2>"$at_stderr"
3412     at_status=$?
3413 fi
3414
3415 at_failed=false
3416 echo >>"$at_stderr"; echo "file
3417 " | $at_diff - "$at_stderr" || at_failed=:
3418 echo >>"$at_stdout"; echo "Creating the archive
3419 Testing the archive
3420 file
3421 " | $at_diff - "$at_stdout" || at_failed=:
3422 case $at_status in
3423    77) echo 77 > "$at_status_file"; exit 77;;
3424    0) ;;
3425    *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
3426       at_failed=:;;
3427 esac
3428 if $at_failed; then
3429
3430
3431   echo 1 > "$at_status_file"
3432   exit 1
3433 fi
3434
3435 $at_traceon
3436
3437
3438
3439
3440       $at_traceoff
3441       $at_times_p && times >"$at_times_file"
3442     ) 5>&1 2>&1 | eval $at_tee_pipe
3443     at_status=`cat "$at_status_file"`
3444     ;;
3445
3446   9 ) # 9. append.at:21: append
3447     at_setup_line='append.at:21'
3448     at_desc="append"
3449     $at_quiet $ECHO_N "  9: append                                         $ECHO_C"
3450     at_xfail=no
3451       test -f $XFAILFILE && at_xfail=yes
3452     echo "#                             -*- compilation -*-" >> "$at_group_log"
3453     (
3454       echo "9. append.at:21: testing ..."
3455       $at_traceon
3456
3457
3458
3459
3460
3461   $at_traceoff
3462 echo "$at_srcdir/append.at:24:
3463 mkdir v7
3464 (cd v7
3465 TEST_TAR_FORMAT=v7
3466 export TEST_TAR_FORMAT
3467 TAR_OPTIONS=\"-H v7\"
3468 export TAR_OPTIONS
3469 rm -rf *
3470 touch file1
3471           touch file2
3472           tar cf archive file1
3473           tar rf archive file2
3474           tar tf archive)"
3475 echo append.at:24 >"$at_check_line_file"
3476
3477 at_trace_this=
3478 if test -n "$at_traceon"; then
3479     echo 'Not enabling shell tracing (command contains an embedded newline)'
3480 fi
3481
3482 if test -n "$at_trace_this"; then
3483     ( $at_traceon;
3484 mkdir v7
3485 (cd v7
3486 TEST_TAR_FORMAT=v7
3487 export TEST_TAR_FORMAT
3488 TAR_OPTIONS="-H v7"
3489 export TAR_OPTIONS
3490 rm -rf *
3491 touch file1
3492           touch file2
3493           tar cf archive file1
3494           tar rf archive file2
3495           tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
3496     at_status=$?
3497     grep '^ *+' "$at_stder1" >&2
3498     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3499 else
3500     ( :;
3501 mkdir v7
3502 (cd v7
3503 TEST_TAR_FORMAT=v7
3504 export TEST_TAR_FORMAT
3505 TAR_OPTIONS="-H v7"
3506 export TAR_OPTIONS
3507 rm -rf *
3508 touch file1
3509           touch file2
3510           tar cf archive file1
3511           tar rf archive file2
3512           tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
3513     at_status=$?
3514 fi
3515
3516 at_failed=false
3517 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3518 echo >>"$at_stdout"; echo "file1
3519 file2
3520 " | $at_diff - "$at_stdout" || at_failed=:
3521 case $at_status in
3522    77) echo 77 > "$at_status_file"; exit 77;;
3523    0) ;;
3524    *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
3525       at_failed=:;;
3526 esac
3527 if $at_failed; then
3528
3529
3530   echo 1 > "$at_status_file"
3531   exit 1
3532 fi
3533
3534 $at_traceon
3535
3536               $at_traceoff
3537 echo "$at_srcdir/append.at:24:
3538 mkdir oldgnu
3539 (cd oldgnu
3540 TEST_TAR_FORMAT=oldgnu
3541 export TEST_TAR_FORMAT
3542 TAR_OPTIONS=\"-H oldgnu\"
3543 export TAR_OPTIONS
3544 rm -rf *
3545 touch file1
3546           touch file2
3547           tar cf archive file1
3548           tar rf archive file2
3549           tar tf archive)"
3550 echo append.at:24 >"$at_check_line_file"
3551
3552 at_trace_this=
3553 if test -n "$at_traceon"; then
3554     echo 'Not enabling shell tracing (command contains an embedded newline)'
3555 fi
3556
3557 if test -n "$at_trace_this"; then
3558     ( $at_traceon;
3559 mkdir oldgnu
3560 (cd oldgnu
3561 TEST_TAR_FORMAT=oldgnu
3562 export TEST_TAR_FORMAT
3563 TAR_OPTIONS="-H oldgnu"
3564 export TAR_OPTIONS
3565 rm -rf *
3566 touch file1
3567           touch file2
3568           tar cf archive file1
3569           tar rf archive file2
3570           tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
3571     at_status=$?
3572     grep '^ *+' "$at_stder1" >&2
3573     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3574 else
3575     ( :;
3576 mkdir oldgnu
3577 (cd oldgnu
3578 TEST_TAR_FORMAT=oldgnu
3579 export TEST_TAR_FORMAT
3580 TAR_OPTIONS="-H oldgnu"
3581 export TAR_OPTIONS
3582 rm -rf *
3583 touch file1
3584           touch file2
3585           tar cf archive file1
3586           tar rf archive file2
3587           tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
3588     at_status=$?
3589 fi
3590
3591 at_failed=false
3592 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3593 echo >>"$at_stdout"; echo "file1
3594 file2
3595 " | $at_diff - "$at_stdout" || at_failed=:
3596 case $at_status in
3597    77) echo 77 > "$at_status_file"; exit 77;;
3598    0) ;;
3599    *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
3600       at_failed=:;;
3601 esac
3602 if $at_failed; then
3603
3604
3605   echo 1 > "$at_status_file"
3606   exit 1
3607 fi
3608
3609 $at_traceon
3610
3611               $at_traceoff
3612 echo "$at_srcdir/append.at:24:
3613 mkdir ustar
3614 (cd ustar
3615 TEST_TAR_FORMAT=ustar
3616 export TEST_TAR_FORMAT
3617 TAR_OPTIONS=\"-H ustar\"
3618 export TAR_OPTIONS
3619 rm -rf *
3620 touch file1
3621           touch file2
3622           tar cf archive file1
3623           tar rf archive file2
3624           tar tf archive)"
3625 echo append.at:24 >"$at_check_line_file"
3626
3627 at_trace_this=
3628 if test -n "$at_traceon"; then
3629     echo 'Not enabling shell tracing (command contains an embedded newline)'
3630 fi
3631
3632 if test -n "$at_trace_this"; then
3633     ( $at_traceon;
3634 mkdir ustar
3635 (cd ustar
3636 TEST_TAR_FORMAT=ustar
3637 export TEST_TAR_FORMAT
3638 TAR_OPTIONS="-H ustar"
3639 export TAR_OPTIONS
3640 rm -rf *
3641 touch file1
3642           touch file2
3643           tar cf archive file1
3644           tar rf archive file2
3645           tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
3646     at_status=$?
3647     grep '^ *+' "$at_stder1" >&2
3648     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3649 else
3650     ( :;
3651 mkdir ustar
3652 (cd ustar
3653 TEST_TAR_FORMAT=ustar
3654 export TEST_TAR_FORMAT
3655 TAR_OPTIONS="-H ustar"
3656 export TAR_OPTIONS
3657 rm -rf *
3658 touch file1
3659           touch file2
3660           tar cf archive file1
3661           tar rf archive file2
3662           tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
3663     at_status=$?
3664 fi
3665
3666 at_failed=false
3667 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3668 echo >>"$at_stdout"; echo "file1
3669 file2
3670 " | $at_diff - "$at_stdout" || at_failed=:
3671 case $at_status in
3672    77) echo 77 > "$at_status_file"; exit 77;;
3673    0) ;;
3674    *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
3675       at_failed=:;;
3676 esac
3677 if $at_failed; then
3678
3679
3680   echo 1 > "$at_status_file"
3681   exit 1
3682 fi
3683
3684 $at_traceon
3685
3686               $at_traceoff
3687 echo "$at_srcdir/append.at:24:
3688 mkdir posix
3689 (cd posix
3690 TEST_TAR_FORMAT=posix
3691 export TEST_TAR_FORMAT
3692 TAR_OPTIONS=\"-H posix\"
3693 export TAR_OPTIONS
3694 rm -rf *
3695 touch file1
3696           touch file2
3697           tar cf archive file1
3698           tar rf archive file2
3699           tar tf archive)"
3700 echo append.at:24 >"$at_check_line_file"
3701
3702 at_trace_this=
3703 if test -n "$at_traceon"; then
3704     echo 'Not enabling shell tracing (command contains an embedded newline)'
3705 fi
3706
3707 if test -n "$at_trace_this"; then
3708     ( $at_traceon;
3709 mkdir posix
3710 (cd posix
3711 TEST_TAR_FORMAT=posix
3712 export TEST_TAR_FORMAT
3713 TAR_OPTIONS="-H posix"
3714 export TAR_OPTIONS
3715 rm -rf *
3716 touch file1
3717           touch file2
3718           tar cf archive file1
3719           tar rf archive file2
3720           tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
3721     at_status=$?
3722     grep '^ *+' "$at_stder1" >&2
3723     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3724 else
3725     ( :;
3726 mkdir posix
3727 (cd posix
3728 TEST_TAR_FORMAT=posix
3729 export TEST_TAR_FORMAT
3730 TAR_OPTIONS="-H posix"
3731 export TAR_OPTIONS
3732 rm -rf *
3733 touch file1
3734           touch file2
3735           tar cf archive file1
3736           tar rf archive file2
3737           tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
3738     at_status=$?
3739 fi
3740
3741 at_failed=false
3742 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3743 echo >>"$at_stdout"; echo "file1
3744 file2
3745 " | $at_diff - "$at_stdout" || at_failed=:
3746 case $at_status in
3747    77) echo 77 > "$at_status_file"; exit 77;;
3748    0) ;;
3749    *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
3750       at_failed=:;;
3751 esac
3752 if $at_failed; then
3753
3754
3755   echo 1 > "$at_status_file"
3756   exit 1
3757 fi
3758
3759 $at_traceon
3760
3761               $at_traceoff
3762 echo "$at_srcdir/append.at:24:
3763 mkdir gnu
3764 (cd gnu
3765 TEST_TAR_FORMAT=gnu
3766 export TEST_TAR_FORMAT
3767 TAR_OPTIONS=\"-H gnu\"
3768 export TAR_OPTIONS
3769 rm -rf *
3770 touch file1
3771           touch file2
3772           tar cf archive file1
3773           tar rf archive file2
3774           tar tf archive)"
3775 echo append.at:24 >"$at_check_line_file"
3776
3777 at_trace_this=
3778 if test -n "$at_traceon"; then
3779     echo 'Not enabling shell tracing (command contains an embedded newline)'
3780 fi
3781
3782 if test -n "$at_trace_this"; then
3783     ( $at_traceon;
3784 mkdir gnu
3785 (cd gnu
3786 TEST_TAR_FORMAT=gnu
3787 export TEST_TAR_FORMAT
3788 TAR_OPTIONS="-H gnu"
3789 export TAR_OPTIONS
3790 rm -rf *
3791 touch file1
3792           touch file2
3793           tar cf archive file1
3794           tar rf archive file2
3795           tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
3796     at_status=$?
3797     grep '^ *+' "$at_stder1" >&2
3798     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3799 else
3800     ( :;
3801 mkdir gnu
3802 (cd gnu
3803 TEST_TAR_FORMAT=gnu
3804 export TEST_TAR_FORMAT
3805 TAR_OPTIONS="-H gnu"
3806 export TAR_OPTIONS
3807 rm -rf *
3808 touch file1
3809           touch file2
3810           tar cf archive file1
3811           tar rf archive file2
3812           tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
3813     at_status=$?
3814 fi
3815
3816 at_failed=false
3817 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3818 echo >>"$at_stdout"; echo "file1
3819 file2
3820 " | $at_diff - "$at_stdout" || at_failed=:
3821 case $at_status in
3822    77) echo 77 > "$at_status_file"; exit 77;;
3823    0) ;;
3824    *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
3825       at_failed=:;;
3826 esac
3827 if $at_failed; then
3828
3829
3830   echo 1 > "$at_status_file"
3831   exit 1
3832 fi
3833
3834 $at_traceon
3835
3836
3837
3838
3839       $at_traceoff
3840       $at_times_p && times >"$at_times_file"
3841     ) 5>&1 2>&1 | eval $at_tee_pipe
3842     at_status=`cat "$at_status_file"`
3843     ;;
3844
3845   10 ) # 10. append01.at:29: appending files with long names
3846     at_setup_line='append01.at:29'
3847     at_desc="appending files with long names"
3848     $at_quiet $ECHO_N " 10: appending files with long names                $ECHO_C"
3849     at_xfail=no
3850       test -f $XFAILFILE && at_xfail=yes
3851     echo "#                             -*- compilation -*-" >> "$at_group_log"
3852     (
3853       echo "10. append01.at:29: testing ..."
3854       $at_traceon
3855
3856
3857
3858
3859
3860
3861
3862   $at_traceoff
3863 echo "$at_srcdir/append01.at:34:
3864 mkdir oldgnu
3865 (cd oldgnu
3866 TEST_TAR_FORMAT=oldgnu
3867 export TEST_TAR_FORMAT
3868 TAR_OPTIONS=\"-H oldgnu\"
3869 export TAR_OPTIONS
3870 rm -rf *
3871
3872 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
3873 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3874 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
3875 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3876 tar tf archive
3877 )"
3878 echo append01.at:34 >"$at_check_line_file"
3879
3880 at_trace_this=
3881 if test -n "$at_traceon"; then
3882     echo 'Not enabling shell tracing (command contains an embedded newline)'
3883 fi
3884
3885 if test -n "$at_trace_this"; then
3886     ( $at_traceon;
3887 mkdir oldgnu
3888 (cd oldgnu
3889 TEST_TAR_FORMAT=oldgnu
3890 export TEST_TAR_FORMAT
3891 TAR_OPTIONS="-H oldgnu"
3892 export TAR_OPTIONS
3893 rm -rf *
3894
3895 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
3896 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3897 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
3898 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3899 tar tf archive
3900 ) ) >"$at_stdout" 2>"$at_stder1"
3901     at_status=$?
3902     grep '^ *+' "$at_stder1" >&2
3903     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3904 else
3905     ( :;
3906 mkdir oldgnu
3907 (cd oldgnu
3908 TEST_TAR_FORMAT=oldgnu
3909 export TEST_TAR_FORMAT
3910 TAR_OPTIONS="-H oldgnu"
3911 export TAR_OPTIONS
3912 rm -rf *
3913
3914 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
3915 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3916 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
3917 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3918 tar tf archive
3919 ) ) >"$at_stdout" 2>"$at_stderr"
3920     at_status=$?
3921 fi
3922
3923 at_failed=false
3924 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3925 echo >>"$at_stdout"; echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
3926 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3927 " | $at_diff - "$at_stdout" || at_failed=:
3928 case $at_status in
3929    77) echo 77 > "$at_status_file"; exit 77;;
3930    0) ;;
3931    *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
3932       at_failed=:;;
3933 esac
3934 if $at_failed; then
3935
3936
3937   echo 1 > "$at_status_file"
3938   exit 1
3939 fi
3940
3941 $at_traceon
3942
3943               $at_traceoff
3944 echo "$at_srcdir/append01.at:34:
3945 mkdir ustar
3946 (cd ustar
3947 TEST_TAR_FORMAT=ustar
3948 export TEST_TAR_FORMAT
3949 TAR_OPTIONS=\"-H ustar\"
3950 export TAR_OPTIONS
3951 rm -rf *
3952
3953 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
3954 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3955 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
3956 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3957 tar tf archive
3958 )"
3959 echo append01.at:34 >"$at_check_line_file"
3960
3961 at_trace_this=
3962 if test -n "$at_traceon"; then
3963     echo 'Not enabling shell tracing (command contains an embedded newline)'
3964 fi
3965
3966 if test -n "$at_trace_this"; then
3967     ( $at_traceon;
3968 mkdir ustar
3969 (cd ustar
3970 TEST_TAR_FORMAT=ustar
3971 export TEST_TAR_FORMAT
3972 TAR_OPTIONS="-H ustar"
3973 export TAR_OPTIONS
3974 rm -rf *
3975
3976 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
3977 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3978 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
3979 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3980 tar tf archive
3981 ) ) >"$at_stdout" 2>"$at_stder1"
3982     at_status=$?
3983     grep '^ *+' "$at_stder1" >&2
3984     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3985 else
3986     ( :;
3987 mkdir ustar
3988 (cd ustar
3989 TEST_TAR_FORMAT=ustar
3990 export TEST_TAR_FORMAT
3991 TAR_OPTIONS="-H ustar"
3992 export TAR_OPTIONS
3993 rm -rf *
3994
3995 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
3996 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3997 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
3998 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
3999 tar tf archive
4000 ) ) >"$at_stdout" 2>"$at_stderr"
4001     at_status=$?
4002 fi
4003
4004 at_failed=false
4005 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4006 echo >>"$at_stdout"; echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
4007 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4008 " | $at_diff - "$at_stdout" || at_failed=:
4009 case $at_status in
4010    77) echo 77 > "$at_status_file"; exit 77;;
4011    0) ;;
4012    *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
4013       at_failed=:;;
4014 esac
4015 if $at_failed; then
4016
4017
4018   echo 1 > "$at_status_file"
4019   exit 1
4020 fi
4021
4022 $at_traceon
4023
4024               $at_traceoff
4025 echo "$at_srcdir/append01.at:34:
4026 mkdir posix
4027 (cd posix
4028 TEST_TAR_FORMAT=posix
4029 export TEST_TAR_FORMAT
4030 TAR_OPTIONS=\"-H posix\"
4031 export TAR_OPTIONS
4032 rm -rf *
4033
4034 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
4035 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4036 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
4037 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4038 tar tf archive
4039 )"
4040 echo append01.at:34 >"$at_check_line_file"
4041
4042 at_trace_this=
4043 if test -n "$at_traceon"; then
4044     echo 'Not enabling shell tracing (command contains an embedded newline)'
4045 fi
4046
4047 if test -n "$at_trace_this"; then
4048     ( $at_traceon;
4049 mkdir posix
4050 (cd posix
4051 TEST_TAR_FORMAT=posix
4052 export TEST_TAR_FORMAT
4053 TAR_OPTIONS="-H posix"
4054 export TAR_OPTIONS
4055 rm -rf *
4056
4057 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
4058 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4059 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
4060 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4061 tar tf archive
4062 ) ) >"$at_stdout" 2>"$at_stder1"
4063     at_status=$?
4064     grep '^ *+' "$at_stder1" >&2
4065     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4066 else
4067     ( :;
4068 mkdir posix
4069 (cd posix
4070 TEST_TAR_FORMAT=posix
4071 export TEST_TAR_FORMAT
4072 TAR_OPTIONS="-H posix"
4073 export TAR_OPTIONS
4074 rm -rf *
4075
4076 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
4077 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4078 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
4079 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4080 tar tf archive
4081 ) ) >"$at_stdout" 2>"$at_stderr"
4082     at_status=$?
4083 fi
4084
4085 at_failed=false
4086 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4087 echo >>"$at_stdout"; echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
4088 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4089 " | $at_diff - "$at_stdout" || at_failed=:
4090 case $at_status in
4091    77) echo 77 > "$at_status_file"; exit 77;;
4092    0) ;;
4093    *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
4094       at_failed=:;;
4095 esac
4096 if $at_failed; then
4097
4098
4099   echo 1 > "$at_status_file"
4100   exit 1
4101 fi
4102
4103 $at_traceon
4104
4105               $at_traceoff
4106 echo "$at_srcdir/append01.at:34:
4107 mkdir gnu
4108 (cd gnu
4109 TEST_TAR_FORMAT=gnu
4110 export TEST_TAR_FORMAT
4111 TAR_OPTIONS=\"-H gnu\"
4112 export TAR_OPTIONS
4113 rm -rf *
4114
4115 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
4116 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4117 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
4118 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4119 tar tf archive
4120 )"
4121 echo append01.at:34 >"$at_check_line_file"
4122
4123 at_trace_this=
4124 if test -n "$at_traceon"; then
4125     echo 'Not enabling shell tracing (command contains an embedded newline)'
4126 fi
4127
4128 if test -n "$at_trace_this"; then
4129     ( $at_traceon;
4130 mkdir gnu
4131 (cd gnu
4132 TEST_TAR_FORMAT=gnu
4133 export TEST_TAR_FORMAT
4134 TAR_OPTIONS="-H gnu"
4135 export TAR_OPTIONS
4136 rm -rf *
4137
4138 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
4139 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4140 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
4141 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4142 tar tf archive
4143 ) ) >"$at_stdout" 2>"$at_stder1"
4144     at_status=$?
4145     grep '^ *+' "$at_stder1" >&2
4146     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4147 else
4148     ( :;
4149 mkdir gnu
4150 (cd gnu
4151 TEST_TAR_FORMAT=gnu
4152 export TEST_TAR_FORMAT
4153 TAR_OPTIONS="-H gnu"
4154 export TAR_OPTIONS
4155 rm -rf *
4156
4157 mkdir This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX
4158 touch This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4159 tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
4160 tar rf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4161 tar tf archive
4162 ) ) >"$at_stdout" 2>"$at_stderr"
4163     at_status=$?
4164 fi
4165
4166 at_failed=false
4167 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4168 echo >>"$at_stdout"; echo "This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file1
4169 This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX/file2
4170 " | $at_diff - "$at_stdout" || at_failed=:
4171 case $at_status in
4172    77) echo 77 > "$at_status_file"; exit 77;;
4173    0) ;;
4174    *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
4175       at_failed=:;;
4176 esac
4177 if $at_failed; then
4178
4179
4180   echo 1 > "$at_status_file"
4181   exit 1
4182 fi
4183
4184 $at_traceon
4185
4186
4187
4188
4189       $at_traceoff
4190       $at_times_p && times >"$at_times_file"
4191     ) 5>&1 2>&1 | eval $at_tee_pipe
4192     at_status=`cat "$at_status_file"`
4193     ;;
4194
4195   11 ) # 11. append02.at:40: append vs. create
4196     at_setup_line='append02.at:40'
4197     at_desc="append vs. create"
4198     $at_quiet $ECHO_N " 11: append vs. create                              $ECHO_C"
4199     at_xfail=no
4200       test -f $XFAILFILE && at_xfail=yes
4201     echo "#                             -*- compilation -*-" >> "$at_group_log"
4202     (
4203       echo "11. append02.at:40: testing ..."
4204       $at_traceon
4205
4206
4207
4208
4209
4210   $at_traceoff
4211 echo "$at_srcdir/append02.at:43:
4212 mkdir v7
4213 (cd v7
4214 TEST_TAR_FORMAT=v7
4215 export TEST_TAR_FORMAT
4216 TAR_OPTIONS=\"-H v7\"
4217 export TAR_OPTIONS
4218 rm -rf *
4219
4220 genfile --file file1
4221 genfile --file file2
4222
4223 # Make sure file timestamps in the archive will not differ
4224 MTIME=\"--mtime=@0\"
4225
4226 # For PAX archives, we need to make sure extended header names are
4227 # reproducible and that their contents won't change with time
4228 if test \$TEST_TAR_FORMAT = posix; then
4229   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
4230 fi
4231
4232 echo Creating archive.1
4233 tar \$MTIME -cf archive.1 file1 file2
4234
4235 echo Creating archive.2
4236 tar \$MTIME -cf archive.2 -T /dev/null
4237 tar \$MTIME -rf archive.2 file1
4238 tar \$MTIME -rf archive.2 file2
4239
4240 echo Comparing archives
4241 cmp archive.1 archive.2
4242 )"
4243 echo append02.at:43 >"$at_check_line_file"
4244
4245 at_trace_this=
4246 if test -n "$at_traceon"; then
4247     echo 'Not enabling shell tracing (command contains an embedded newline)'
4248 fi
4249
4250 if test -n "$at_trace_this"; then
4251     ( $at_traceon;
4252 mkdir v7
4253 (cd v7
4254 TEST_TAR_FORMAT=v7
4255 export TEST_TAR_FORMAT
4256 TAR_OPTIONS="-H v7"
4257 export TAR_OPTIONS
4258 rm -rf *
4259
4260 genfile --file file1
4261 genfile --file file2
4262
4263 # Make sure file timestamps in the archive will not differ
4264 MTIME="--mtime=@0"
4265
4266 # For PAX archives, we need to make sure extended header names are
4267 # reproducible and that their contents won't change with time
4268 if test $TEST_TAR_FORMAT = posix; then
4269   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4270 fi
4271
4272 echo Creating archive.1
4273 tar $MTIME -cf archive.1 file1 file2
4274
4275 echo Creating archive.2
4276 tar $MTIME -cf archive.2 -T /dev/null
4277 tar $MTIME -rf archive.2 file1
4278 tar $MTIME -rf archive.2 file2
4279
4280 echo Comparing archives
4281 cmp archive.1 archive.2
4282 ) ) >"$at_stdout" 2>"$at_stder1"
4283     at_status=$?
4284     grep '^ *+' "$at_stder1" >&2
4285     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4286 else
4287     ( :;
4288 mkdir v7
4289 (cd v7
4290 TEST_TAR_FORMAT=v7
4291 export TEST_TAR_FORMAT
4292 TAR_OPTIONS="-H v7"
4293 export TAR_OPTIONS
4294 rm -rf *
4295
4296 genfile --file file1
4297 genfile --file file2
4298
4299 # Make sure file timestamps in the archive will not differ
4300 MTIME="--mtime=@0"
4301
4302 # For PAX archives, we need to make sure extended header names are
4303 # reproducible and that their contents won't change with time
4304 if test $TEST_TAR_FORMAT = posix; then
4305   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4306 fi
4307
4308 echo Creating archive.1
4309 tar $MTIME -cf archive.1 file1 file2
4310
4311 echo Creating archive.2
4312 tar $MTIME -cf archive.2 -T /dev/null
4313 tar $MTIME -rf archive.2 file1
4314 tar $MTIME -rf archive.2 file2
4315
4316 echo Comparing archives
4317 cmp archive.1 archive.2
4318 ) ) >"$at_stdout" 2>"$at_stderr"
4319     at_status=$?
4320 fi
4321
4322 at_failed=false
4323 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4324 echo >>"$at_stdout"; echo "Creating archive.1
4325 Creating archive.2
4326 Comparing archives
4327 " | $at_diff - "$at_stdout" || at_failed=:
4328 case $at_status in
4329    77) echo 77 > "$at_status_file"; exit 77;;
4330    0) ;;
4331    *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
4332       at_failed=:;;
4333 esac
4334 if $at_failed; then
4335
4336
4337   echo 1 > "$at_status_file"
4338   exit 1
4339 fi
4340
4341 $at_traceon
4342
4343               $at_traceoff
4344 echo "$at_srcdir/append02.at:43:
4345 mkdir oldgnu
4346 (cd oldgnu
4347 TEST_TAR_FORMAT=oldgnu
4348 export TEST_TAR_FORMAT
4349 TAR_OPTIONS=\"-H oldgnu\"
4350 export TAR_OPTIONS
4351 rm -rf *
4352
4353 genfile --file file1
4354 genfile --file file2
4355
4356 # Make sure file timestamps in the archive will not differ
4357 MTIME=\"--mtime=@0\"
4358
4359 # For PAX archives, we need to make sure extended header names are
4360 # reproducible and that their contents won't change with time
4361 if test \$TEST_TAR_FORMAT = posix; then
4362   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
4363 fi
4364
4365 echo Creating archive.1
4366 tar \$MTIME -cf archive.1 file1 file2
4367
4368 echo Creating archive.2
4369 tar \$MTIME -cf archive.2 -T /dev/null
4370 tar \$MTIME -rf archive.2 file1
4371 tar \$MTIME -rf archive.2 file2
4372
4373 echo Comparing archives
4374 cmp archive.1 archive.2
4375 )"
4376 echo append02.at:43 >"$at_check_line_file"
4377
4378 at_trace_this=
4379 if test -n "$at_traceon"; then
4380     echo 'Not enabling shell tracing (command contains an embedded newline)'
4381 fi
4382
4383 if test -n "$at_trace_this"; then
4384     ( $at_traceon;
4385 mkdir oldgnu
4386 (cd oldgnu
4387 TEST_TAR_FORMAT=oldgnu
4388 export TEST_TAR_FORMAT
4389 TAR_OPTIONS="-H oldgnu"
4390 export TAR_OPTIONS
4391 rm -rf *
4392
4393 genfile --file file1
4394 genfile --file file2
4395
4396 # Make sure file timestamps in the archive will not differ
4397 MTIME="--mtime=@0"
4398
4399 # For PAX archives, we need to make sure extended header names are
4400 # reproducible and that their contents won't change with time
4401 if test $TEST_TAR_FORMAT = posix; then
4402   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4403 fi
4404
4405 echo Creating archive.1
4406 tar $MTIME -cf archive.1 file1 file2
4407
4408 echo Creating archive.2
4409 tar $MTIME -cf archive.2 -T /dev/null
4410 tar $MTIME -rf archive.2 file1
4411 tar $MTIME -rf archive.2 file2
4412
4413 echo Comparing archives
4414 cmp archive.1 archive.2
4415 ) ) >"$at_stdout" 2>"$at_stder1"
4416     at_status=$?
4417     grep '^ *+' "$at_stder1" >&2
4418     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4419 else
4420     ( :;
4421 mkdir oldgnu
4422 (cd oldgnu
4423 TEST_TAR_FORMAT=oldgnu
4424 export TEST_TAR_FORMAT
4425 TAR_OPTIONS="-H oldgnu"
4426 export TAR_OPTIONS
4427 rm -rf *
4428
4429 genfile --file file1
4430 genfile --file file2
4431
4432 # Make sure file timestamps in the archive will not differ
4433 MTIME="--mtime=@0"
4434
4435 # For PAX archives, we need to make sure extended header names are
4436 # reproducible and that their contents won't change with time
4437 if test $TEST_TAR_FORMAT = posix; then
4438   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4439 fi
4440
4441 echo Creating archive.1
4442 tar $MTIME -cf archive.1 file1 file2
4443
4444 echo Creating archive.2
4445 tar $MTIME -cf archive.2 -T /dev/null
4446 tar $MTIME -rf archive.2 file1
4447 tar $MTIME -rf archive.2 file2
4448
4449 echo Comparing archives
4450 cmp archive.1 archive.2
4451 ) ) >"$at_stdout" 2>"$at_stderr"
4452     at_status=$?
4453 fi
4454
4455 at_failed=false
4456 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4457 echo >>"$at_stdout"; echo "Creating archive.1
4458 Creating archive.2
4459 Comparing archives
4460 " | $at_diff - "$at_stdout" || at_failed=:
4461 case $at_status in
4462    77) echo 77 > "$at_status_file"; exit 77;;
4463    0) ;;
4464    *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
4465       at_failed=:;;
4466 esac
4467 if $at_failed; then
4468
4469
4470   echo 1 > "$at_status_file"
4471   exit 1
4472 fi
4473
4474 $at_traceon
4475
4476               $at_traceoff
4477 echo "$at_srcdir/append02.at:43:
4478 mkdir ustar
4479 (cd ustar
4480 TEST_TAR_FORMAT=ustar
4481 export TEST_TAR_FORMAT
4482 TAR_OPTIONS=\"-H ustar\"
4483 export TAR_OPTIONS
4484 rm -rf *
4485
4486 genfile --file file1
4487 genfile --file file2
4488
4489 # Make sure file timestamps in the archive will not differ
4490 MTIME=\"--mtime=@0\"
4491
4492 # For PAX archives, we need to make sure extended header names are
4493 # reproducible and that their contents won't change with time
4494 if test \$TEST_TAR_FORMAT = posix; then
4495   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
4496 fi
4497
4498 echo Creating archive.1
4499 tar \$MTIME -cf archive.1 file1 file2
4500
4501 echo Creating archive.2
4502 tar \$MTIME -cf archive.2 -T /dev/null
4503 tar \$MTIME -rf archive.2 file1
4504 tar \$MTIME -rf archive.2 file2
4505
4506 echo Comparing archives
4507 cmp archive.1 archive.2
4508 )"
4509 echo append02.at:43 >"$at_check_line_file"
4510
4511 at_trace_this=
4512 if test -n "$at_traceon"; then
4513     echo 'Not enabling shell tracing (command contains an embedded newline)'
4514 fi
4515
4516 if test -n "$at_trace_this"; then
4517     ( $at_traceon;
4518 mkdir ustar
4519 (cd ustar
4520 TEST_TAR_FORMAT=ustar
4521 export TEST_TAR_FORMAT
4522 TAR_OPTIONS="-H ustar"
4523 export TAR_OPTIONS
4524 rm -rf *
4525
4526 genfile --file file1
4527 genfile --file file2
4528
4529 # Make sure file timestamps in the archive will not differ
4530 MTIME="--mtime=@0"
4531
4532 # For PAX archives, we need to make sure extended header names are
4533 # reproducible and that their contents won't change with time
4534 if test $TEST_TAR_FORMAT = posix; then
4535   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4536 fi
4537
4538 echo Creating archive.1
4539 tar $MTIME -cf archive.1 file1 file2
4540
4541 echo Creating archive.2
4542 tar $MTIME -cf archive.2 -T /dev/null
4543 tar $MTIME -rf archive.2 file1
4544 tar $MTIME -rf archive.2 file2
4545
4546 echo Comparing archives
4547 cmp archive.1 archive.2
4548 ) ) >"$at_stdout" 2>"$at_stder1"
4549     at_status=$?
4550     grep '^ *+' "$at_stder1" >&2
4551     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4552 else
4553     ( :;
4554 mkdir ustar
4555 (cd ustar
4556 TEST_TAR_FORMAT=ustar
4557 export TEST_TAR_FORMAT
4558 TAR_OPTIONS="-H ustar"
4559 export TAR_OPTIONS
4560 rm -rf *
4561
4562 genfile --file file1
4563 genfile --file file2
4564
4565 # Make sure file timestamps in the archive will not differ
4566 MTIME="--mtime=@0"
4567
4568 # For PAX archives, we need to make sure extended header names are
4569 # reproducible and that their contents won't change with time
4570 if test $TEST_TAR_FORMAT = posix; then
4571   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4572 fi
4573
4574 echo Creating archive.1
4575 tar $MTIME -cf archive.1 file1 file2
4576
4577 echo Creating archive.2
4578 tar $MTIME -cf archive.2 -T /dev/null
4579 tar $MTIME -rf archive.2 file1
4580 tar $MTIME -rf archive.2 file2
4581
4582 echo Comparing archives
4583 cmp archive.1 archive.2
4584 ) ) >"$at_stdout" 2>"$at_stderr"
4585     at_status=$?
4586 fi
4587
4588 at_failed=false
4589 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4590 echo >>"$at_stdout"; echo "Creating archive.1
4591 Creating archive.2
4592 Comparing archives
4593 " | $at_diff - "$at_stdout" || at_failed=:
4594 case $at_status in
4595    77) echo 77 > "$at_status_file"; exit 77;;
4596    0) ;;
4597    *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
4598       at_failed=:;;
4599 esac
4600 if $at_failed; then
4601
4602
4603   echo 1 > "$at_status_file"
4604   exit 1
4605 fi
4606
4607 $at_traceon
4608
4609               $at_traceoff
4610 echo "$at_srcdir/append02.at:43:
4611 mkdir posix
4612 (cd posix
4613 TEST_TAR_FORMAT=posix
4614 export TEST_TAR_FORMAT
4615 TAR_OPTIONS=\"-H posix\"
4616 export TAR_OPTIONS
4617 rm -rf *
4618
4619 genfile --file file1
4620 genfile --file file2
4621
4622 # Make sure file timestamps in the archive will not differ
4623 MTIME=\"--mtime=@0\"
4624
4625 # For PAX archives, we need to make sure extended header names are
4626 # reproducible and that their contents won't change with time
4627 if test \$TEST_TAR_FORMAT = posix; then
4628   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
4629 fi
4630
4631 echo Creating archive.1
4632 tar \$MTIME -cf archive.1 file1 file2
4633
4634 echo Creating archive.2
4635 tar \$MTIME -cf archive.2 -T /dev/null
4636 tar \$MTIME -rf archive.2 file1
4637 tar \$MTIME -rf archive.2 file2
4638
4639 echo Comparing archives
4640 cmp archive.1 archive.2
4641 )"
4642 echo append02.at:43 >"$at_check_line_file"
4643
4644 at_trace_this=
4645 if test -n "$at_traceon"; then
4646     echo 'Not enabling shell tracing (command contains an embedded newline)'
4647 fi
4648
4649 if test -n "$at_trace_this"; then
4650     ( $at_traceon;
4651 mkdir posix
4652 (cd posix
4653 TEST_TAR_FORMAT=posix
4654 export TEST_TAR_FORMAT
4655 TAR_OPTIONS="-H posix"
4656 export TAR_OPTIONS
4657 rm -rf *
4658
4659 genfile --file file1
4660 genfile --file file2
4661
4662 # Make sure file timestamps in the archive will not differ
4663 MTIME="--mtime=@0"
4664
4665 # For PAX archives, we need to make sure extended header names are
4666 # reproducible and that their contents won't change with time
4667 if test $TEST_TAR_FORMAT = posix; then
4668   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4669 fi
4670
4671 echo Creating archive.1
4672 tar $MTIME -cf archive.1 file1 file2
4673
4674 echo Creating archive.2
4675 tar $MTIME -cf archive.2 -T /dev/null
4676 tar $MTIME -rf archive.2 file1
4677 tar $MTIME -rf archive.2 file2
4678
4679 echo Comparing archives
4680 cmp archive.1 archive.2
4681 ) ) >"$at_stdout" 2>"$at_stder1"
4682     at_status=$?
4683     grep '^ *+' "$at_stder1" >&2
4684     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4685 else
4686     ( :;
4687 mkdir posix
4688 (cd posix
4689 TEST_TAR_FORMAT=posix
4690 export TEST_TAR_FORMAT
4691 TAR_OPTIONS="-H posix"
4692 export TAR_OPTIONS
4693 rm -rf *
4694
4695 genfile --file file1
4696 genfile --file file2
4697
4698 # Make sure file timestamps in the archive will not differ
4699 MTIME="--mtime=@0"
4700
4701 # For PAX archives, we need to make sure extended header names are
4702 # reproducible and that their contents won't change with time
4703 if test $TEST_TAR_FORMAT = posix; then
4704   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4705 fi
4706
4707 echo Creating archive.1
4708 tar $MTIME -cf archive.1 file1 file2
4709
4710 echo Creating archive.2
4711 tar $MTIME -cf archive.2 -T /dev/null
4712 tar $MTIME -rf archive.2 file1
4713 tar $MTIME -rf archive.2 file2
4714
4715 echo Comparing archives
4716 cmp archive.1 archive.2
4717 ) ) >"$at_stdout" 2>"$at_stderr"
4718     at_status=$?
4719 fi
4720
4721 at_failed=false
4722 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4723 echo >>"$at_stdout"; echo "Creating archive.1
4724 Creating archive.2
4725 Comparing archives
4726 " | $at_diff - "$at_stdout" || at_failed=:
4727 case $at_status in
4728    77) echo 77 > "$at_status_file"; exit 77;;
4729    0) ;;
4730    *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
4731       at_failed=:;;
4732 esac
4733 if $at_failed; then
4734
4735
4736   echo 1 > "$at_status_file"
4737   exit 1
4738 fi
4739
4740 $at_traceon
4741
4742               $at_traceoff
4743 echo "$at_srcdir/append02.at:43:
4744 mkdir gnu
4745 (cd gnu
4746 TEST_TAR_FORMAT=gnu
4747 export TEST_TAR_FORMAT
4748 TAR_OPTIONS=\"-H gnu\"
4749 export TAR_OPTIONS
4750 rm -rf *
4751
4752 genfile --file file1
4753 genfile --file file2
4754
4755 # Make sure file timestamps in the archive will not differ
4756 MTIME=\"--mtime=@0\"
4757
4758 # For PAX archives, we need to make sure extended header names are
4759 # reproducible and that their contents won't change with time
4760 if test \$TEST_TAR_FORMAT = posix; then
4761   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
4762 fi
4763
4764 echo Creating archive.1
4765 tar \$MTIME -cf archive.1 file1 file2
4766
4767 echo Creating archive.2
4768 tar \$MTIME -cf archive.2 -T /dev/null
4769 tar \$MTIME -rf archive.2 file1
4770 tar \$MTIME -rf archive.2 file2
4771
4772 echo Comparing archives
4773 cmp archive.1 archive.2
4774 )"
4775 echo append02.at:43 >"$at_check_line_file"
4776
4777 at_trace_this=
4778 if test -n "$at_traceon"; then
4779     echo 'Not enabling shell tracing (command contains an embedded newline)'
4780 fi
4781
4782 if test -n "$at_trace_this"; then
4783     ( $at_traceon;
4784 mkdir gnu
4785 (cd gnu
4786 TEST_TAR_FORMAT=gnu
4787 export TEST_TAR_FORMAT
4788 TAR_OPTIONS="-H gnu"
4789 export TAR_OPTIONS
4790 rm -rf *
4791
4792 genfile --file file1
4793 genfile --file file2
4794
4795 # Make sure file timestamps in the archive will not differ
4796 MTIME="--mtime=@0"
4797
4798 # For PAX archives, we need to make sure extended header names are
4799 # reproducible and that their contents won't change with time
4800 if test $TEST_TAR_FORMAT = posix; then
4801   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4802 fi
4803
4804 echo Creating archive.1
4805 tar $MTIME -cf archive.1 file1 file2
4806
4807 echo Creating archive.2
4808 tar $MTIME -cf archive.2 -T /dev/null
4809 tar $MTIME -rf archive.2 file1
4810 tar $MTIME -rf archive.2 file2
4811
4812 echo Comparing archives
4813 cmp archive.1 archive.2
4814 ) ) >"$at_stdout" 2>"$at_stder1"
4815     at_status=$?
4816     grep '^ *+' "$at_stder1" >&2
4817     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4818 else
4819     ( :;
4820 mkdir gnu
4821 (cd gnu
4822 TEST_TAR_FORMAT=gnu
4823 export TEST_TAR_FORMAT
4824 TAR_OPTIONS="-H gnu"
4825 export TAR_OPTIONS
4826 rm -rf *
4827
4828 genfile --file file1
4829 genfile --file file2
4830
4831 # Make sure file timestamps in the archive will not differ
4832 MTIME="--mtime=@0"
4833
4834 # For PAX archives, we need to make sure extended header names are
4835 # reproducible and that their contents won't change with time
4836 if test $TEST_TAR_FORMAT = posix; then
4837   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4838 fi
4839
4840 echo Creating archive.1
4841 tar $MTIME -cf archive.1 file1 file2
4842
4843 echo Creating archive.2
4844 tar $MTIME -cf archive.2 -T /dev/null
4845 tar $MTIME -rf archive.2 file1
4846 tar $MTIME -rf archive.2 file2
4847
4848 echo Comparing archives
4849 cmp archive.1 archive.2
4850 ) ) >"$at_stdout" 2>"$at_stderr"
4851     at_status=$?
4852 fi
4853
4854 at_failed=false
4855 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4856 echo >>"$at_stdout"; echo "Creating archive.1
4857 Creating archive.2
4858 Comparing archives
4859 " | $at_diff - "$at_stdout" || at_failed=:
4860 case $at_status in
4861    77) echo 77 > "$at_status_file"; exit 77;;
4862    0) ;;
4863    *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
4864       at_failed=:;;
4865 esac
4866 if $at_failed; then
4867
4868
4869   echo 1 > "$at_status_file"
4870   exit 1
4871 fi
4872
4873 $at_traceon
4874
4875
4876
4877
4878       $at_traceoff
4879       $at_times_p && times >"$at_times_file"
4880     ) 5>&1 2>&1 | eval $at_tee_pipe
4881     at_status=`cat "$at_status_file"`
4882     ;;
4883
4884   12 ) # 12. exclude.at:23: exclude
4885     at_setup_line='exclude.at:23'
4886     at_desc="exclude"
4887     $at_quiet $ECHO_N " 12: exclude                                        $ECHO_C"
4888     at_xfail=no
4889       test -f $XFAILFILE && at_xfail=yes
4890     echo "#                             -*- compilation -*-" >> "$at_group_log"
4891     (
4892       echo "12. exclude.at:23: testing ..."
4893       $at_traceon
4894
4895
4896
4897
4898
4899   $at_traceoff
4900 echo "$at_srcdir/exclude.at:26:
4901 mkdir ustar
4902 (cd ustar
4903 TEST_TAR_FORMAT=ustar
4904 export TEST_TAR_FORMAT
4905 TAR_OPTIONS=\"-H ustar\"
4906 export TAR_OPTIONS
4907 rm -rf *
4908
4909
4910 test -z "`sort < /dev/null 2>&1`" || exit 77
4911
4912
4913 mkdir dir
4914 echo blues > dir/blues
4915 echo jazz > dir/jazz
4916 mkdir dir/folk
4917 echo tagfile > dir/folk/tagfile
4918 echo sanjuan > dir/folk/sanjuan
4919 mkdir dir/rock
4920 echo \"Signature: 8a477f597d28d172789f06886806bc55\" > dir/rock/CACHEDIR.TAG
4921 echo \"test\" > dir/rock/file
4922
4923 for option in exclude-caches exclude-caches-under exclude-caches-all
4924 do
4925   echo OPTION \$option
4926   tar -cf archive.tar --\$option -v dir 2>err | sort
4927   cat err
4928   echo ARCHIVE
4929   tar tf archive.tar | sort
4930 done
4931
4932 for option in exclude-tag exclude-tag-under exclude-tag-all
4933 do
4934   echo OPTION \$option
4935   tar -cf archive.tar --\${option}=tagfile -v dir 2>err | sort
4936   cat err
4937   echo ARCHIVE
4938   tar tf archive.tar | sort
4939 done
4940 )"
4941 echo exclude.at:26 >"$at_check_line_file"
4942
4943 at_trace_this=
4944 if test -n "$at_traceon"; then
4945     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
4946 fi
4947
4948 if test -n "$at_trace_this"; then
4949     ( $at_traceon;
4950 mkdir ustar
4951 (cd ustar
4952 TEST_TAR_FORMAT=ustar
4953 export TEST_TAR_FORMAT
4954 TAR_OPTIONS="-H ustar"
4955 export TAR_OPTIONS
4956 rm -rf *
4957
4958
4959 test -z "`sort < /dev/null 2>&1`" || exit 77
4960
4961
4962 mkdir dir
4963 echo blues > dir/blues
4964 echo jazz > dir/jazz
4965 mkdir dir/folk
4966 echo tagfile > dir/folk/tagfile
4967 echo sanjuan > dir/folk/sanjuan
4968 mkdir dir/rock
4969 echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
4970 echo "test" > dir/rock/file
4971
4972 for option in exclude-caches exclude-caches-under exclude-caches-all
4973 do
4974   echo OPTION $option
4975   tar -cf archive.tar --$option -v dir 2>err | sort
4976   cat err
4977   echo ARCHIVE
4978   tar tf archive.tar | sort
4979 done
4980
4981 for option in exclude-tag exclude-tag-under exclude-tag-all
4982 do
4983   echo OPTION $option
4984   tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
4985   cat err
4986   echo ARCHIVE
4987   tar tf archive.tar | sort
4988 done
4989 ) ) >"$at_stdout" 2>"$at_stder1"
4990     at_status=$?
4991     grep '^ *+' "$at_stder1" >&2
4992     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4993 else
4994     ( :;
4995 mkdir ustar
4996 (cd ustar
4997 TEST_TAR_FORMAT=ustar
4998 export TEST_TAR_FORMAT
4999 TAR_OPTIONS="-H ustar"
5000 export TAR_OPTIONS
5001 rm -rf *
5002
5003
5004 test -z "`sort < /dev/null 2>&1`" || exit 77
5005
5006
5007 mkdir dir
5008 echo blues > dir/blues
5009 echo jazz > dir/jazz
5010 mkdir dir/folk
5011 echo tagfile > dir/folk/tagfile
5012 echo sanjuan > dir/folk/sanjuan
5013 mkdir dir/rock
5014 echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
5015 echo "test" > dir/rock/file
5016
5017 for option in exclude-caches exclude-caches-under exclude-caches-all
5018 do
5019   echo OPTION $option
5020   tar -cf archive.tar --$option -v dir 2>err | sort
5021   cat err
5022   echo ARCHIVE
5023   tar tf archive.tar | sort
5024 done
5025
5026 for option in exclude-tag exclude-tag-under exclude-tag-all
5027 do
5028   echo OPTION $option
5029   tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
5030   cat err
5031   echo ARCHIVE
5032   tar tf archive.tar | sort
5033 done
5034 ) ) >"$at_stdout" 2>"$at_stderr"
5035     at_status=$?
5036 fi
5037
5038 at_failed=false
5039 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5040 echo >>"$at_stdout"; echo "OPTION exclude-caches
5041 dir/
5042 dir/blues
5043 dir/folk/
5044 dir/folk/sanjuan
5045 dir/folk/tagfile
5046 dir/jazz
5047 dir/rock/
5048 dir/rock/CACHEDIR.TAG
5049 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
5050 ARCHIVE
5051 dir/
5052 dir/blues
5053 dir/folk/
5054 dir/folk/sanjuan
5055 dir/folk/tagfile
5056 dir/jazz
5057 dir/rock/
5058 dir/rock/CACHEDIR.TAG
5059 OPTION exclude-caches-under
5060 dir/
5061 dir/blues
5062 dir/folk/
5063 dir/folk/sanjuan
5064 dir/folk/tagfile
5065 dir/jazz
5066 dir/rock/
5067 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
5068 ARCHIVE
5069 dir/
5070 dir/blues
5071 dir/folk/
5072 dir/folk/sanjuan
5073 dir/folk/tagfile
5074 dir/jazz
5075 dir/rock/
5076 OPTION exclude-caches-all
5077 dir/
5078 dir/blues
5079 dir/folk/
5080 dir/folk/sanjuan
5081 dir/folk/tagfile
5082 dir/jazz
5083 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
5084 ARCHIVE
5085 dir/
5086 dir/blues
5087 dir/folk/
5088 dir/folk/sanjuan
5089 dir/folk/tagfile
5090 dir/jazz
5091 OPTION exclude-tag
5092 dir/
5093 dir/blues
5094 dir/folk/
5095 dir/folk/tagfile
5096 dir/jazz
5097 dir/rock/
5098 dir/rock/CACHEDIR.TAG
5099 dir/rock/file
5100 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
5101 ARCHIVE
5102 dir/
5103 dir/blues
5104 dir/folk/
5105 dir/folk/tagfile
5106 dir/jazz
5107 dir/rock/
5108 dir/rock/CACHEDIR.TAG
5109 dir/rock/file
5110 OPTION exclude-tag-under
5111 dir/
5112 dir/blues
5113 dir/folk/
5114 dir/jazz
5115 dir/rock/
5116 dir/rock/CACHEDIR.TAG
5117 dir/rock/file
5118 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
5119 ARCHIVE
5120 dir/
5121 dir/blues
5122 dir/folk/
5123 dir/jazz
5124 dir/rock/
5125 dir/rock/CACHEDIR.TAG
5126 dir/rock/file
5127 OPTION exclude-tag-all
5128 dir/
5129 dir/blues
5130 dir/jazz
5131 dir/rock/
5132 dir/rock/CACHEDIR.TAG
5133 dir/rock/file
5134 tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped
5135 ARCHIVE
5136 dir/
5137 dir/blues
5138 dir/jazz
5139 dir/rock/
5140 dir/rock/CACHEDIR.TAG
5141 dir/rock/file
5142 " | $at_diff - "$at_stdout" || at_failed=:
5143 case $at_status in
5144    77) echo 77 > "$at_status_file"; exit 77;;
5145    0) ;;
5146    *) echo "$at_srcdir/exclude.at:26: exit code was $at_status, expected 0"
5147       at_failed=:;;
5148 esac
5149 if $at_failed; then
5150
5151
5152   echo 1 > "$at_status_file"
5153   exit 1
5154 fi
5155
5156 $at_traceon
5157
5158
5159
5160
5161       $at_traceoff
5162       $at_times_p && times >"$at_times_file"
5163     ) 5>&1 2>&1 | eval $at_tee_pipe
5164     at_status=`cat "$at_status_file"`
5165     ;;
5166
5167   13 ) # 13. delete01.at:23: deleting a member after a big one
5168     at_setup_line='delete01.at:23'
5169     at_desc="deleting a member after a big one"
5170     $at_quiet $ECHO_N " 13: deleting a member after a big one              $ECHO_C"
5171     at_xfail=no
5172       test -f $XFAILFILE && at_xfail=yes
5173     echo "#                             -*- compilation -*-" >> "$at_group_log"
5174     (
5175       echo "13. delete01.at:23: testing ..."
5176       $at_traceon
5177
5178
5179
5180
5181
5182   $at_traceoff
5183 echo "$at_srcdir/delete01.at:26:
5184 mkdir v7
5185 (cd v7
5186 TEST_TAR_FORMAT=v7
5187 export TEST_TAR_FORMAT
5188 TAR_OPTIONS=\"-H v7\"
5189 export TAR_OPTIONS
5190 rm -rf *
5191
5192 genfile -l 50000 --file file1
5193 genfile -l 1024 --file file2
5194 tar cf archive file1 file2
5195 tar f archive --delete file2
5196 tar tf archive)"
5197 echo delete01.at:26 >"$at_check_line_file"
5198
5199 at_trace_this=
5200 if test -n "$at_traceon"; then
5201     echo 'Not enabling shell tracing (command contains an embedded newline)'
5202 fi
5203
5204 if test -n "$at_trace_this"; then
5205     ( $at_traceon;
5206 mkdir v7
5207 (cd v7
5208 TEST_TAR_FORMAT=v7
5209 export TEST_TAR_FORMAT
5210 TAR_OPTIONS="-H v7"
5211 export TAR_OPTIONS
5212 rm -rf *
5213
5214 genfile -l 50000 --file file1
5215 genfile -l 1024 --file file2
5216 tar cf archive file1 file2
5217 tar f archive --delete file2
5218 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
5219     at_status=$?
5220     grep '^ *+' "$at_stder1" >&2
5221     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5222 else
5223     ( :;
5224 mkdir v7
5225 (cd v7
5226 TEST_TAR_FORMAT=v7
5227 export TEST_TAR_FORMAT
5228 TAR_OPTIONS="-H v7"
5229 export TAR_OPTIONS
5230 rm -rf *
5231
5232 genfile -l 50000 --file file1
5233 genfile -l 1024 --file file2
5234 tar cf archive file1 file2
5235 tar f archive --delete file2
5236 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
5237     at_status=$?
5238 fi
5239
5240 at_failed=false
5241 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5242 echo >>"$at_stdout"; echo "file1
5243 " | $at_diff - "$at_stdout" || at_failed=:
5244 case $at_status in
5245    77) echo 77 > "$at_status_file"; exit 77;;
5246    0) ;;
5247    *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
5248       at_failed=:;;
5249 esac
5250 if $at_failed; then
5251
5252
5253   echo 1 > "$at_status_file"
5254   exit 1
5255 fi
5256
5257 $at_traceon
5258
5259               $at_traceoff
5260 echo "$at_srcdir/delete01.at:26:
5261 mkdir oldgnu
5262 (cd oldgnu
5263 TEST_TAR_FORMAT=oldgnu
5264 export TEST_TAR_FORMAT
5265 TAR_OPTIONS=\"-H oldgnu\"
5266 export TAR_OPTIONS
5267 rm -rf *
5268
5269 genfile -l 50000 --file file1
5270 genfile -l 1024 --file file2
5271 tar cf archive file1 file2
5272 tar f archive --delete file2
5273 tar tf archive)"
5274 echo delete01.at:26 >"$at_check_line_file"
5275
5276 at_trace_this=
5277 if test -n "$at_traceon"; then
5278     echo 'Not enabling shell tracing (command contains an embedded newline)'
5279 fi
5280
5281 if test -n "$at_trace_this"; then
5282     ( $at_traceon;
5283 mkdir oldgnu
5284 (cd oldgnu
5285 TEST_TAR_FORMAT=oldgnu
5286 export TEST_TAR_FORMAT
5287 TAR_OPTIONS="-H oldgnu"
5288 export TAR_OPTIONS
5289 rm -rf *
5290
5291 genfile -l 50000 --file file1
5292 genfile -l 1024 --file file2
5293 tar cf archive file1 file2
5294 tar f archive --delete file2
5295 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
5296     at_status=$?
5297     grep '^ *+' "$at_stder1" >&2
5298     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5299 else
5300     ( :;
5301 mkdir oldgnu
5302 (cd oldgnu
5303 TEST_TAR_FORMAT=oldgnu
5304 export TEST_TAR_FORMAT
5305 TAR_OPTIONS="-H oldgnu"
5306 export TAR_OPTIONS
5307 rm -rf *
5308
5309 genfile -l 50000 --file file1
5310 genfile -l 1024 --file file2
5311 tar cf archive file1 file2
5312 tar f archive --delete file2
5313 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
5314     at_status=$?
5315 fi
5316
5317 at_failed=false
5318 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5319 echo >>"$at_stdout"; echo "file1
5320 " | $at_diff - "$at_stdout" || at_failed=:
5321 case $at_status in
5322    77) echo 77 > "$at_status_file"; exit 77;;
5323    0) ;;
5324    *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
5325       at_failed=:;;
5326 esac
5327 if $at_failed; then
5328
5329
5330   echo 1 > "$at_status_file"
5331   exit 1
5332 fi
5333
5334 $at_traceon
5335
5336               $at_traceoff
5337 echo "$at_srcdir/delete01.at:26:
5338 mkdir ustar
5339 (cd ustar
5340 TEST_TAR_FORMAT=ustar
5341 export TEST_TAR_FORMAT
5342 TAR_OPTIONS=\"-H ustar\"
5343 export TAR_OPTIONS
5344 rm -rf *
5345
5346 genfile -l 50000 --file file1
5347 genfile -l 1024 --file file2
5348 tar cf archive file1 file2
5349 tar f archive --delete file2
5350 tar tf archive)"
5351 echo delete01.at:26 >"$at_check_line_file"
5352
5353 at_trace_this=
5354 if test -n "$at_traceon"; then
5355     echo 'Not enabling shell tracing (command contains an embedded newline)'
5356 fi
5357
5358 if test -n "$at_trace_this"; then
5359     ( $at_traceon;
5360 mkdir ustar
5361 (cd ustar
5362 TEST_TAR_FORMAT=ustar
5363 export TEST_TAR_FORMAT
5364 TAR_OPTIONS="-H ustar"
5365 export TAR_OPTIONS
5366 rm -rf *
5367
5368 genfile -l 50000 --file file1
5369 genfile -l 1024 --file file2
5370 tar cf archive file1 file2
5371 tar f archive --delete file2
5372 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
5373     at_status=$?
5374     grep '^ *+' "$at_stder1" >&2
5375     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5376 else
5377     ( :;
5378 mkdir ustar
5379 (cd ustar
5380 TEST_TAR_FORMAT=ustar
5381 export TEST_TAR_FORMAT
5382 TAR_OPTIONS="-H ustar"
5383 export TAR_OPTIONS
5384 rm -rf *
5385
5386 genfile -l 50000 --file file1
5387 genfile -l 1024 --file file2
5388 tar cf archive file1 file2
5389 tar f archive --delete file2
5390 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
5391     at_status=$?
5392 fi
5393
5394 at_failed=false
5395 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5396 echo >>"$at_stdout"; echo "file1
5397 " | $at_diff - "$at_stdout" || at_failed=:
5398 case $at_status in
5399    77) echo 77 > "$at_status_file"; exit 77;;
5400    0) ;;
5401    *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
5402       at_failed=:;;
5403 esac
5404 if $at_failed; then
5405
5406
5407   echo 1 > "$at_status_file"
5408   exit 1
5409 fi
5410
5411 $at_traceon
5412
5413               $at_traceoff
5414 echo "$at_srcdir/delete01.at:26:
5415 mkdir posix
5416 (cd posix
5417 TEST_TAR_FORMAT=posix
5418 export TEST_TAR_FORMAT
5419 TAR_OPTIONS=\"-H posix\"
5420 export TAR_OPTIONS
5421 rm -rf *
5422
5423 genfile -l 50000 --file file1
5424 genfile -l 1024 --file file2
5425 tar cf archive file1 file2
5426 tar f archive --delete file2
5427 tar tf archive)"
5428 echo delete01.at:26 >"$at_check_line_file"
5429
5430 at_trace_this=
5431 if test -n "$at_traceon"; then
5432     echo 'Not enabling shell tracing (command contains an embedded newline)'
5433 fi
5434
5435 if test -n "$at_trace_this"; then
5436     ( $at_traceon;
5437 mkdir posix
5438 (cd posix
5439 TEST_TAR_FORMAT=posix
5440 export TEST_TAR_FORMAT
5441 TAR_OPTIONS="-H posix"
5442 export TAR_OPTIONS
5443 rm -rf *
5444
5445 genfile -l 50000 --file file1
5446 genfile -l 1024 --file file2
5447 tar cf archive file1 file2
5448 tar f archive --delete file2
5449 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
5450     at_status=$?
5451     grep '^ *+' "$at_stder1" >&2
5452     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5453 else
5454     ( :;
5455 mkdir posix
5456 (cd posix
5457 TEST_TAR_FORMAT=posix
5458 export TEST_TAR_FORMAT
5459 TAR_OPTIONS="-H posix"
5460 export TAR_OPTIONS
5461 rm -rf *
5462
5463 genfile -l 50000 --file file1
5464 genfile -l 1024 --file file2
5465 tar cf archive file1 file2
5466 tar f archive --delete file2
5467 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
5468     at_status=$?
5469 fi
5470
5471 at_failed=false
5472 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5473 echo >>"$at_stdout"; echo "file1
5474 " | $at_diff - "$at_stdout" || at_failed=:
5475 case $at_status in
5476    77) echo 77 > "$at_status_file"; exit 77;;
5477    0) ;;
5478    *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
5479       at_failed=:;;
5480 esac
5481 if $at_failed; then
5482
5483
5484   echo 1 > "$at_status_file"
5485   exit 1
5486 fi
5487
5488 $at_traceon
5489
5490               $at_traceoff
5491 echo "$at_srcdir/delete01.at:26:
5492 mkdir gnu
5493 (cd gnu
5494 TEST_TAR_FORMAT=gnu
5495 export TEST_TAR_FORMAT
5496 TAR_OPTIONS=\"-H gnu\"
5497 export TAR_OPTIONS
5498 rm -rf *
5499
5500 genfile -l 50000 --file file1
5501 genfile -l 1024 --file file2
5502 tar cf archive file1 file2
5503 tar f archive --delete file2
5504 tar tf archive)"
5505 echo delete01.at:26 >"$at_check_line_file"
5506
5507 at_trace_this=
5508 if test -n "$at_traceon"; then
5509     echo 'Not enabling shell tracing (command contains an embedded newline)'
5510 fi
5511
5512 if test -n "$at_trace_this"; then
5513     ( $at_traceon;
5514 mkdir gnu
5515 (cd gnu
5516 TEST_TAR_FORMAT=gnu
5517 export TEST_TAR_FORMAT
5518 TAR_OPTIONS="-H gnu"
5519 export TAR_OPTIONS
5520 rm -rf *
5521
5522 genfile -l 50000 --file file1
5523 genfile -l 1024 --file file2
5524 tar cf archive file1 file2
5525 tar f archive --delete file2
5526 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
5527     at_status=$?
5528     grep '^ *+' "$at_stder1" >&2
5529     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5530 else
5531     ( :;
5532 mkdir gnu
5533 (cd gnu
5534 TEST_TAR_FORMAT=gnu
5535 export TEST_TAR_FORMAT
5536 TAR_OPTIONS="-H gnu"
5537 export TAR_OPTIONS
5538 rm -rf *
5539
5540 genfile -l 50000 --file file1
5541 genfile -l 1024 --file file2
5542 tar cf archive file1 file2
5543 tar f archive --delete file2
5544 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
5545     at_status=$?
5546 fi
5547
5548 at_failed=false
5549 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5550 echo >>"$at_stdout"; echo "file1
5551 " | $at_diff - "$at_stdout" || at_failed=:
5552 case $at_status in
5553    77) echo 77 > "$at_status_file"; exit 77;;
5554    0) ;;
5555    *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
5556       at_failed=:;;
5557 esac
5558 if $at_failed; then
5559
5560
5561   echo 1 > "$at_status_file"
5562   exit 1
5563 fi
5564
5565 $at_traceon
5566
5567
5568
5569
5570       $at_traceoff
5571       $at_times_p && times >"$at_times_file"
5572     ) 5>&1 2>&1 | eval $at_tee_pipe
5573     at_status=`cat "$at_status_file"`
5574     ;;
5575
5576   14 ) # 14. delete02.at:23: deleting a member from stdin archive
5577     at_setup_line='delete02.at:23'
5578     at_desc="deleting a member from stdin archive"
5579     $at_quiet $ECHO_N " 14: deleting a member from stdin archive           $ECHO_C"
5580     at_xfail=no
5581       test -f $XFAILFILE && at_xfail=yes
5582     echo "#                             -*- compilation -*-" >> "$at_group_log"
5583     (
5584       echo "14. delete02.at:23: testing ..."
5585       $at_traceon
5586
5587
5588
5589
5590
5591   $at_traceoff
5592 echo "$at_srcdir/delete02.at:26:
5593 mkdir v7
5594 (cd v7
5595 TEST_TAR_FORMAT=v7
5596 export TEST_TAR_FORMAT
5597 TAR_OPTIONS=\"-H v7\"
5598 export TAR_OPTIONS
5599 rm -rf *
5600
5601 genfile -l 3073 -p zeros --file 1
5602 cp 1 2
5603 cp 2 3
5604 tar cf archive 1 2 3
5605 tar tf archive
5606 cat archive | tar f - --delete 2 > archive2
5607 echo separator
5608 tar tf archive2)"
5609 echo delete02.at:26 >"$at_check_line_file"
5610
5611 at_trace_this=
5612 if test -n "$at_traceon"; then
5613     echo 'Not enabling shell tracing (command contains an embedded newline)'
5614 fi
5615
5616 if test -n "$at_trace_this"; then
5617     ( $at_traceon;
5618 mkdir v7
5619 (cd v7
5620 TEST_TAR_FORMAT=v7
5621 export TEST_TAR_FORMAT
5622 TAR_OPTIONS="-H v7"
5623 export TAR_OPTIONS
5624 rm -rf *
5625
5626 genfile -l 3073 -p zeros --file 1
5627 cp 1 2
5628 cp 2 3
5629 tar cf archive 1 2 3
5630 tar tf archive
5631 cat archive | tar f - --delete 2 > archive2
5632 echo separator
5633 tar tf archive2) ) >"$at_stdout" 2>"$at_stder1"
5634     at_status=$?
5635     grep '^ *+' "$at_stder1" >&2
5636     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5637 else
5638     ( :;
5639 mkdir v7
5640 (cd v7
5641 TEST_TAR_FORMAT=v7
5642 export TEST_TAR_FORMAT
5643 TAR_OPTIONS="-H v7"
5644 export TAR_OPTIONS
5645 rm -rf *
5646
5647 genfile -l 3073 -p zeros --file 1
5648 cp 1 2
5649 cp 2 3
5650 tar cf archive 1 2 3
5651 tar tf archive
5652 cat archive | tar f - --delete 2 > archive2
5653 echo separator
5654 tar tf archive2) ) >"$at_stdout" 2>"$at_stderr"
5655     at_status=$?
5656 fi
5657
5658 at_failed=false
5659 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5660 echo >>"$at_stdout"; echo "1
5661 2
5662 3
5663 separator
5664 1
5665 3
5666 " | $at_diff - "$at_stdout" || at_failed=:
5667 case $at_status in
5668    77) echo 77 > "$at_status_file"; exit 77;;
5669    0) ;;
5670    *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
5671       at_failed=:;;
5672 esac
5673 if $at_failed; then
5674
5675
5676   echo 1 > "$at_status_file"
5677   exit 1
5678 fi
5679
5680 $at_traceon
5681
5682               $at_traceoff
5683 echo "$at_srcdir/delete02.at:26:
5684 mkdir oldgnu
5685 (cd oldgnu
5686 TEST_TAR_FORMAT=oldgnu
5687 export TEST_TAR_FORMAT
5688 TAR_OPTIONS=\"-H oldgnu\"
5689 export TAR_OPTIONS
5690 rm -rf *
5691
5692 genfile -l 3073 -p zeros --file 1
5693 cp 1 2
5694 cp 2 3
5695 tar cf archive 1 2 3
5696 tar tf archive
5697 cat archive | tar f - --delete 2 > archive2
5698 echo separator
5699 tar tf archive2)"
5700 echo delete02.at:26 >"$at_check_line_file"
5701
5702 at_trace_this=
5703 if test -n "$at_traceon"; then
5704     echo 'Not enabling shell tracing (command contains an embedded newline)'
5705 fi
5706
5707 if test -n "$at_trace_this"; then
5708     ( $at_traceon;
5709 mkdir oldgnu
5710 (cd oldgnu
5711 TEST_TAR_FORMAT=oldgnu
5712 export TEST_TAR_FORMAT
5713 TAR_OPTIONS="-H oldgnu"
5714 export TAR_OPTIONS
5715 rm -rf *
5716
5717 genfile -l 3073 -p zeros --file 1
5718 cp 1 2
5719 cp 2 3
5720 tar cf archive 1 2 3
5721 tar tf archive
5722 cat archive | tar f - --delete 2 > archive2
5723 echo separator
5724 tar tf archive2) ) >"$at_stdout" 2>"$at_stder1"
5725     at_status=$?
5726     grep '^ *+' "$at_stder1" >&2
5727     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5728 else
5729     ( :;
5730 mkdir oldgnu
5731 (cd oldgnu
5732 TEST_TAR_FORMAT=oldgnu
5733 export TEST_TAR_FORMAT
5734 TAR_OPTIONS="-H oldgnu"
5735 export TAR_OPTIONS
5736 rm -rf *
5737
5738 genfile -l 3073 -p zeros --file 1
5739 cp 1 2
5740 cp 2 3
5741 tar cf archive 1 2 3
5742 tar tf archive
5743 cat archive | tar f - --delete 2 > archive2
5744 echo separator
5745 tar tf archive2) ) >"$at_stdout" 2>"$at_stderr"
5746     at_status=$?
5747 fi
5748
5749 at_failed=false
5750 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5751 echo >>"$at_stdout"; echo "1
5752 2
5753 3
5754 separator
5755 1
5756 3
5757 " | $at_diff - "$at_stdout" || at_failed=:
5758 case $at_status in
5759    77) echo 77 > "$at_status_file"; exit 77;;
5760    0) ;;
5761    *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
5762       at_failed=:;;
5763 esac
5764 if $at_failed; then
5765
5766
5767   echo 1 > "$at_status_file"
5768   exit 1
5769 fi
5770
5771 $at_traceon
5772
5773               $at_traceoff
5774 echo "$at_srcdir/delete02.at:26:
5775 mkdir ustar
5776 (cd ustar
5777 TEST_TAR_FORMAT=ustar
5778 export TEST_TAR_FORMAT
5779 TAR_OPTIONS=\"-H ustar\"
5780 export TAR_OPTIONS
5781 rm -rf *
5782
5783 genfile -l 3073 -p zeros --file 1
5784 cp 1 2
5785 cp 2 3
5786 tar cf archive 1 2 3
5787 tar tf archive
5788 cat archive | tar f - --delete 2 > archive2
5789 echo separator
5790 tar tf archive2)"
5791 echo delete02.at:26 >"$at_check_line_file"
5792
5793 at_trace_this=
5794 if test -n "$at_traceon"; then
5795     echo 'Not enabling shell tracing (command contains an embedded newline)'
5796 fi
5797
5798 if test -n "$at_trace_this"; then
5799     ( $at_traceon;
5800 mkdir ustar
5801 (cd ustar
5802 TEST_TAR_FORMAT=ustar
5803 export TEST_TAR_FORMAT
5804 TAR_OPTIONS="-H ustar"
5805 export TAR_OPTIONS
5806 rm -rf *
5807
5808 genfile -l 3073 -p zeros --file 1
5809 cp 1 2
5810 cp 2 3
5811 tar cf archive 1 2 3
5812 tar tf archive
5813 cat archive | tar f - --delete 2 > archive2
5814 echo separator
5815 tar tf archive2) ) >"$at_stdout" 2>"$at_stder1"
5816     at_status=$?
5817     grep '^ *+' "$at_stder1" >&2
5818     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5819 else
5820     ( :;
5821 mkdir ustar
5822 (cd ustar
5823 TEST_TAR_FORMAT=ustar
5824 export TEST_TAR_FORMAT
5825 TAR_OPTIONS="-H ustar"
5826 export TAR_OPTIONS
5827 rm -rf *
5828
5829 genfile -l 3073 -p zeros --file 1
5830 cp 1 2
5831 cp 2 3
5832 tar cf archive 1 2 3
5833 tar tf archive
5834 cat archive | tar f - --delete 2 > archive2
5835 echo separator
5836 tar tf archive2) ) >"$at_stdout" 2>"$at_stderr"
5837     at_status=$?
5838 fi
5839
5840 at_failed=false
5841 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5842 echo >>"$at_stdout"; echo "1
5843 2
5844 3
5845 separator
5846 1
5847 3
5848 " | $at_diff - "$at_stdout" || at_failed=:
5849 case $at_status in
5850    77) echo 77 > "$at_status_file"; exit 77;;
5851    0) ;;
5852    *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
5853       at_failed=:;;
5854 esac
5855 if $at_failed; then
5856
5857
5858   echo 1 > "$at_status_file"
5859   exit 1
5860 fi
5861
5862 $at_traceon
5863
5864               $at_traceoff
5865 echo "$at_srcdir/delete02.at:26:
5866 mkdir posix
5867 (cd posix
5868 TEST_TAR_FORMAT=posix
5869 export TEST_TAR_FORMAT
5870 TAR_OPTIONS=\"-H posix\"
5871 export TAR_OPTIONS
5872 rm -rf *
5873
5874 genfile -l 3073 -p zeros --file 1
5875 cp 1 2
5876 cp 2 3
5877 tar cf archive 1 2 3
5878 tar tf archive
5879 cat archive | tar f - --delete 2 > archive2
5880 echo separator
5881 tar tf archive2)"
5882 echo delete02.at:26 >"$at_check_line_file"
5883
5884 at_trace_this=
5885 if test -n "$at_traceon"; then
5886     echo 'Not enabling shell tracing (command contains an embedded newline)'
5887 fi
5888
5889 if test -n "$at_trace_this"; then
5890     ( $at_traceon;
5891 mkdir posix
5892 (cd posix
5893 TEST_TAR_FORMAT=posix
5894 export TEST_TAR_FORMAT
5895 TAR_OPTIONS="-H posix"
5896 export TAR_OPTIONS
5897 rm -rf *
5898
5899 genfile -l 3073 -p zeros --file 1
5900 cp 1 2
5901 cp 2 3
5902 tar cf archive 1 2 3
5903 tar tf archive
5904 cat archive | tar f - --delete 2 > archive2
5905 echo separator
5906 tar tf archive2) ) >"$at_stdout" 2>"$at_stder1"
5907     at_status=$?
5908     grep '^ *+' "$at_stder1" >&2
5909     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5910 else
5911     ( :;
5912 mkdir posix
5913 (cd posix
5914 TEST_TAR_FORMAT=posix
5915 export TEST_TAR_FORMAT
5916 TAR_OPTIONS="-H posix"
5917 export TAR_OPTIONS
5918 rm -rf *
5919
5920 genfile -l 3073 -p zeros --file 1
5921 cp 1 2
5922 cp 2 3
5923 tar cf archive 1 2 3
5924 tar tf archive
5925 cat archive | tar f - --delete 2 > archive2
5926 echo separator
5927 tar tf archive2) ) >"$at_stdout" 2>"$at_stderr"
5928     at_status=$?
5929 fi
5930
5931 at_failed=false
5932 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5933 echo >>"$at_stdout"; echo "1
5934 2
5935 3
5936 separator
5937 1
5938 3
5939 " | $at_diff - "$at_stdout" || at_failed=:
5940 case $at_status in
5941    77) echo 77 > "$at_status_file"; exit 77;;
5942    0) ;;
5943    *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
5944       at_failed=:;;
5945 esac
5946 if $at_failed; then
5947
5948
5949   echo 1 > "$at_status_file"
5950   exit 1
5951 fi
5952
5953 $at_traceon
5954
5955               $at_traceoff
5956 echo "$at_srcdir/delete02.at:26:
5957 mkdir gnu
5958 (cd gnu
5959 TEST_TAR_FORMAT=gnu
5960 export TEST_TAR_FORMAT
5961 TAR_OPTIONS=\"-H gnu\"
5962 export TAR_OPTIONS
5963 rm -rf *
5964
5965 genfile -l 3073 -p zeros --file 1
5966 cp 1 2
5967 cp 2 3
5968 tar cf archive 1 2 3
5969 tar tf archive
5970 cat archive | tar f - --delete 2 > archive2
5971 echo separator
5972 tar tf archive2)"
5973 echo delete02.at:26 >"$at_check_line_file"
5974
5975 at_trace_this=
5976 if test -n "$at_traceon"; then
5977     echo 'Not enabling shell tracing (command contains an embedded newline)'
5978 fi
5979
5980 if test -n "$at_trace_this"; then
5981     ( $at_traceon;
5982 mkdir gnu
5983 (cd gnu
5984 TEST_TAR_FORMAT=gnu
5985 export TEST_TAR_FORMAT
5986 TAR_OPTIONS="-H gnu"
5987 export TAR_OPTIONS
5988 rm -rf *
5989
5990 genfile -l 3073 -p zeros --file 1
5991 cp 1 2
5992 cp 2 3
5993 tar cf archive 1 2 3
5994 tar tf archive
5995 cat archive | tar f - --delete 2 > archive2
5996 echo separator
5997 tar tf archive2) ) >"$at_stdout" 2>"$at_stder1"
5998     at_status=$?
5999     grep '^ *+' "$at_stder1" >&2
6000     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6001 else
6002     ( :;
6003 mkdir gnu
6004 (cd gnu
6005 TEST_TAR_FORMAT=gnu
6006 export TEST_TAR_FORMAT
6007 TAR_OPTIONS="-H gnu"
6008 export TAR_OPTIONS
6009 rm -rf *
6010
6011 genfile -l 3073 -p zeros --file 1
6012 cp 1 2
6013 cp 2 3
6014 tar cf archive 1 2 3
6015 tar tf archive
6016 cat archive | tar f - --delete 2 > archive2
6017 echo separator
6018 tar tf archive2) ) >"$at_stdout" 2>"$at_stderr"
6019     at_status=$?
6020 fi
6021
6022 at_failed=false
6023 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6024 echo >>"$at_stdout"; echo "1
6025 2
6026 3
6027 separator
6028 1
6029 3
6030 " | $at_diff - "$at_stdout" || at_failed=:
6031 case $at_status in
6032    77) echo 77 > "$at_status_file"; exit 77;;
6033    0) ;;
6034    *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
6035       at_failed=:;;
6036 esac
6037 if $at_failed; then
6038
6039
6040   echo 1 > "$at_status_file"
6041   exit 1
6042 fi
6043
6044 $at_traceon
6045
6046
6047
6048
6049       $at_traceoff
6050       $at_times_p && times >"$at_times_file"
6051     ) 5>&1 2>&1 | eval $at_tee_pipe
6052     at_status=`cat "$at_status_file"`
6053     ;;
6054
6055   15 ) # 15. delete03.at:21: deleting members with long names
6056     at_setup_line='delete03.at:21'
6057     at_desc="deleting members with long names"
6058     $at_quiet $ECHO_N " 15: deleting members with long names               $ECHO_C"
6059     at_xfail=no
6060       test -f $XFAILFILE && at_xfail=yes
6061     echo "#                             -*- compilation -*-" >> "$at_group_log"
6062     (
6063       echo "15. delete03.at:21: testing ..."
6064       $at_traceon
6065
6066
6067
6068
6069
6070
6071
6072   $at_traceoff
6073 echo "$at_srcdir/delete03.at:26:
6074 mkdir gnu
6075 (cd gnu
6076 TEST_TAR_FORMAT=gnu
6077 export TEST_TAR_FORMAT
6078 TAR_OPTIONS=\"-H gnu\"
6079 export TAR_OPTIONS
6080 rm -rf *
6081
6082
6083 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
6084 rm -f \$prefix*
6085 for i in 1 2 3 4 5 6 7 8 9
6086 do touch \$prefix\$i
6087 done
6088 tar -cf archive ./\$prefix* &&
6089  tar --delete -f archive ./\${prefix}5 &&
6090  tar -tf archive
6091 )"
6092 echo delete03.at:26 >"$at_check_line_file"
6093
6094 at_trace_this=
6095 if test -n "$at_traceon"; then
6096     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
6097 fi
6098
6099 if test -n "$at_trace_this"; then
6100     ( $at_traceon;
6101 mkdir gnu
6102 (cd gnu
6103 TEST_TAR_FORMAT=gnu
6104 export TEST_TAR_FORMAT
6105 TAR_OPTIONS="-H gnu"
6106 export TAR_OPTIONS
6107 rm -rf *
6108
6109
6110 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
6111 rm -f $prefix*
6112 for i in 1 2 3 4 5 6 7 8 9
6113 do touch $prefix$i
6114 done
6115 tar -cf archive ./$prefix* &&
6116  tar --delete -f archive ./${prefix}5 &&
6117  tar -tf archive
6118 ) ) >"$at_stdout" 2>"$at_stder1"
6119     at_status=$?
6120     grep '^ *+' "$at_stder1" >&2
6121     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6122 else
6123     ( :;
6124 mkdir gnu
6125 (cd gnu
6126 TEST_TAR_FORMAT=gnu
6127 export TEST_TAR_FORMAT
6128 TAR_OPTIONS="-H gnu"
6129 export TAR_OPTIONS
6130 rm -rf *
6131
6132
6133 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
6134 rm -f $prefix*
6135 for i in 1 2 3 4 5 6 7 8 9
6136 do touch $prefix$i
6137 done
6138 tar -cf archive ./$prefix* &&
6139  tar --delete -f archive ./${prefix}5 &&
6140  tar -tf archive
6141 ) ) >"$at_stdout" 2>"$at_stderr"
6142     at_status=$?
6143 fi
6144
6145 at_failed=false
6146 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6147 echo >>"$at_stdout"; echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1
6148 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2
6149 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3
6150 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4
6151 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX6
6152 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX7
6153 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX8
6154 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX9
6155 " | $at_diff - "$at_stdout" || at_failed=:
6156 case $at_status in
6157    77) echo 77 > "$at_status_file"; exit 77;;
6158    0) ;;
6159    *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0"
6160       at_failed=:;;
6161 esac
6162 if $at_failed; then
6163
6164
6165   echo 1 > "$at_status_file"
6166   exit 1
6167 fi
6168
6169 $at_traceon
6170
6171               $at_traceoff
6172 echo "$at_srcdir/delete03.at:26:
6173 mkdir oldgnu
6174 (cd oldgnu
6175 TEST_TAR_FORMAT=oldgnu
6176 export TEST_TAR_FORMAT
6177 TAR_OPTIONS=\"-H oldgnu\"
6178 export TAR_OPTIONS
6179 rm -rf *
6180
6181
6182 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
6183 rm -f \$prefix*
6184 for i in 1 2 3 4 5 6 7 8 9
6185 do touch \$prefix\$i
6186 done
6187 tar -cf archive ./\$prefix* &&
6188  tar --delete -f archive ./\${prefix}5 &&
6189  tar -tf archive
6190 )"
6191 echo delete03.at:26 >"$at_check_line_file"
6192
6193 at_trace_this=
6194 if test -n "$at_traceon"; then
6195     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
6196 fi
6197
6198 if test -n "$at_trace_this"; then
6199     ( $at_traceon;
6200 mkdir oldgnu
6201 (cd oldgnu
6202 TEST_TAR_FORMAT=oldgnu
6203 export TEST_TAR_FORMAT
6204 TAR_OPTIONS="-H oldgnu"
6205 export TAR_OPTIONS
6206 rm -rf *
6207
6208
6209 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
6210 rm -f $prefix*
6211 for i in 1 2 3 4 5 6 7 8 9
6212 do touch $prefix$i
6213 done
6214 tar -cf archive ./$prefix* &&
6215  tar --delete -f archive ./${prefix}5 &&
6216  tar -tf archive
6217 ) ) >"$at_stdout" 2>"$at_stder1"
6218     at_status=$?
6219     grep '^ *+' "$at_stder1" >&2
6220     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6221 else
6222     ( :;
6223 mkdir oldgnu
6224 (cd oldgnu
6225 TEST_TAR_FORMAT=oldgnu
6226 export TEST_TAR_FORMAT
6227 TAR_OPTIONS="-H oldgnu"
6228 export TAR_OPTIONS
6229 rm -rf *
6230
6231
6232 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
6233 rm -f $prefix*
6234 for i in 1 2 3 4 5 6 7 8 9
6235 do touch $prefix$i
6236 done
6237 tar -cf archive ./$prefix* &&
6238  tar --delete -f archive ./${prefix}5 &&
6239  tar -tf archive
6240 ) ) >"$at_stdout" 2>"$at_stderr"
6241     at_status=$?
6242 fi
6243
6244 at_failed=false
6245 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6246 echo >>"$at_stdout"; echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1
6247 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2
6248 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3
6249 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4
6250 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX6
6251 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX7
6252 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX8
6253 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX9
6254 " | $at_diff - "$at_stdout" || at_failed=:
6255 case $at_status in
6256    77) echo 77 > "$at_status_file"; exit 77;;
6257    0) ;;
6258    *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0"
6259       at_failed=:;;
6260 esac
6261 if $at_failed; then
6262
6263
6264   echo 1 > "$at_status_file"
6265   exit 1
6266 fi
6267
6268 $at_traceon
6269
6270               $at_traceoff
6271 echo "$at_srcdir/delete03.at:26:
6272 mkdir posix
6273 (cd posix
6274 TEST_TAR_FORMAT=posix
6275 export TEST_TAR_FORMAT
6276 TAR_OPTIONS=\"-H posix\"
6277 export TAR_OPTIONS
6278 rm -rf *
6279
6280
6281 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
6282 rm -f \$prefix*
6283 for i in 1 2 3 4 5 6 7 8 9
6284 do touch \$prefix\$i
6285 done
6286 tar -cf archive ./\$prefix* &&
6287  tar --delete -f archive ./\${prefix}5 &&
6288  tar -tf archive
6289 )"
6290 echo delete03.at:26 >"$at_check_line_file"
6291
6292 at_trace_this=
6293 if test -n "$at_traceon"; then
6294     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
6295 fi
6296
6297 if test -n "$at_trace_this"; then
6298     ( $at_traceon;
6299 mkdir posix
6300 (cd posix
6301 TEST_TAR_FORMAT=posix
6302 export TEST_TAR_FORMAT
6303 TAR_OPTIONS="-H posix"
6304 export TAR_OPTIONS
6305 rm -rf *
6306
6307
6308 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
6309 rm -f $prefix*
6310 for i in 1 2 3 4 5 6 7 8 9
6311 do touch $prefix$i
6312 done
6313 tar -cf archive ./$prefix* &&
6314  tar --delete -f archive ./${prefix}5 &&
6315  tar -tf archive
6316 ) ) >"$at_stdout" 2>"$at_stder1"
6317     at_status=$?
6318     grep '^ *+' "$at_stder1" >&2
6319     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6320 else
6321     ( :;
6322 mkdir posix
6323 (cd posix
6324 TEST_TAR_FORMAT=posix
6325 export TEST_TAR_FORMAT
6326 TAR_OPTIONS="-H posix"
6327 export TAR_OPTIONS
6328 rm -rf *
6329
6330
6331 prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
6332 rm -f $prefix*
6333 for i in 1 2 3 4 5 6 7 8 9
6334 do touch $prefix$i
6335 done
6336 tar -cf archive ./$prefix* &&
6337  tar --delete -f archive ./${prefix}5 &&
6338  tar -tf archive
6339 ) ) >"$at_stdout" 2>"$at_stderr"
6340     at_status=$?
6341 fi
6342
6343 at_failed=false
6344 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6345 echo >>"$at_stdout"; echo "./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX1
6346 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX2
6347 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX3
6348 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX4
6349 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX6
6350 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX7
6351 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX8
6352 ./This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX9
6353 " | $at_diff - "$at_stdout" || at_failed=:
6354 case $at_status in
6355    77) echo 77 > "$at_status_file"; exit 77;;
6356    0) ;;
6357    *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0"
6358       at_failed=:;;
6359 esac
6360 if $at_failed; then
6361
6362
6363   echo 1 > "$at_status_file"
6364   exit 1
6365 fi
6366
6367 $at_traceon
6368
6369
6370
6371
6372       $at_traceoff
6373       $at_times_p && times >"$at_times_file"
6374     ) 5>&1 2>&1 | eval $at_tee_pipe
6375     at_status=`cat "$at_status_file"`
6376     ;;
6377
6378   16 ) # 16. delete04.at:23: deleting a large last member
6379     at_setup_line='delete04.at:23'
6380     at_desc="deleting a large last member"
6381     $at_quiet $ECHO_N " 16: deleting a large last member                   $ECHO_C"
6382     at_xfail=no
6383       test -f $XFAILFILE && at_xfail=yes
6384     echo "#                             -*- compilation -*-" >> "$at_group_log"
6385     (
6386       echo "16. delete04.at:23: testing ..."
6387       $at_traceon
6388
6389
6390
6391
6392
6393   $at_traceoff
6394 echo "$at_srcdir/delete04.at:26:
6395 mkdir v7
6396 (cd v7
6397 TEST_TAR_FORMAT=v7
6398 export TEST_TAR_FORMAT
6399 TAR_OPTIONS=\"-H v7\"
6400 export TAR_OPTIONS
6401 rm -rf *
6402
6403 genfile -l      3 -f file1
6404 genfile -l      5 -f file2
6405 genfile -l      3 -f file3
6406 genfile -l      6 -f file4
6407 genfile -l     24 -f file5
6408 genfile -l     13 -f file6
6409 genfile -l   1385 -f file7
6410 genfile -l     30 -f file8
6411 genfile -l     10 -f file9
6412 genfile -l 256000 -f file10
6413 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6414 tar f archive --delete file10
6415 tar tf archive
6416 )"
6417 echo delete04.at:26 >"$at_check_line_file"
6418
6419 at_trace_this=
6420 if test -n "$at_traceon"; then
6421     echo 'Not enabling shell tracing (command contains an embedded newline)'
6422 fi
6423
6424 if test -n "$at_trace_this"; then
6425     ( $at_traceon;
6426 mkdir v7
6427 (cd v7
6428 TEST_TAR_FORMAT=v7
6429 export TEST_TAR_FORMAT
6430 TAR_OPTIONS="-H v7"
6431 export TAR_OPTIONS
6432 rm -rf *
6433
6434 genfile -l      3 -f file1
6435 genfile -l      5 -f file2
6436 genfile -l      3 -f file3
6437 genfile -l      6 -f file4
6438 genfile -l     24 -f file5
6439 genfile -l     13 -f file6
6440 genfile -l   1385 -f file7
6441 genfile -l     30 -f file8
6442 genfile -l     10 -f file9
6443 genfile -l 256000 -f file10
6444 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6445 tar f archive --delete file10
6446 tar tf archive
6447 ) ) >"$at_stdout" 2>"$at_stder1"
6448     at_status=$?
6449     grep '^ *+' "$at_stder1" >&2
6450     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6451 else
6452     ( :;
6453 mkdir v7
6454 (cd v7
6455 TEST_TAR_FORMAT=v7
6456 export TEST_TAR_FORMAT
6457 TAR_OPTIONS="-H v7"
6458 export TAR_OPTIONS
6459 rm -rf *
6460
6461 genfile -l      3 -f file1
6462 genfile -l      5 -f file2
6463 genfile -l      3 -f file3
6464 genfile -l      6 -f file4
6465 genfile -l     24 -f file5
6466 genfile -l     13 -f file6
6467 genfile -l   1385 -f file7
6468 genfile -l     30 -f file8
6469 genfile -l     10 -f file9
6470 genfile -l 256000 -f file10
6471 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6472 tar f archive --delete file10
6473 tar tf archive
6474 ) ) >"$at_stdout" 2>"$at_stderr"
6475     at_status=$?
6476 fi
6477
6478 at_failed=false
6479 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6480 echo >>"$at_stdout"; echo "file1
6481 file2
6482 file3
6483 file4
6484 file5
6485 file6
6486 file7
6487 file8
6488 file9
6489 " | $at_diff - "$at_stdout" || at_failed=:
6490 case $at_status in
6491    77) echo 77 > "$at_status_file"; exit 77;;
6492    0) ;;
6493    *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
6494       at_failed=:;;
6495 esac
6496 if $at_failed; then
6497
6498
6499   echo 1 > "$at_status_file"
6500   exit 1
6501 fi
6502
6503 $at_traceon
6504
6505               $at_traceoff
6506 echo "$at_srcdir/delete04.at:26:
6507 mkdir oldgnu
6508 (cd oldgnu
6509 TEST_TAR_FORMAT=oldgnu
6510 export TEST_TAR_FORMAT
6511 TAR_OPTIONS=\"-H oldgnu\"
6512 export TAR_OPTIONS
6513 rm -rf *
6514
6515 genfile -l      3 -f file1
6516 genfile -l      5 -f file2
6517 genfile -l      3 -f file3
6518 genfile -l      6 -f file4
6519 genfile -l     24 -f file5
6520 genfile -l     13 -f file6
6521 genfile -l   1385 -f file7
6522 genfile -l     30 -f file8
6523 genfile -l     10 -f file9
6524 genfile -l 256000 -f file10
6525 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6526 tar f archive --delete file10
6527 tar tf archive
6528 )"
6529 echo delete04.at:26 >"$at_check_line_file"
6530
6531 at_trace_this=
6532 if test -n "$at_traceon"; then
6533     echo 'Not enabling shell tracing (command contains an embedded newline)'
6534 fi
6535
6536 if test -n "$at_trace_this"; then
6537     ( $at_traceon;
6538 mkdir oldgnu
6539 (cd oldgnu
6540 TEST_TAR_FORMAT=oldgnu
6541 export TEST_TAR_FORMAT
6542 TAR_OPTIONS="-H oldgnu"
6543 export TAR_OPTIONS
6544 rm -rf *
6545
6546 genfile -l      3 -f file1
6547 genfile -l      5 -f file2
6548 genfile -l      3 -f file3
6549 genfile -l      6 -f file4
6550 genfile -l     24 -f file5
6551 genfile -l     13 -f file6
6552 genfile -l   1385 -f file7
6553 genfile -l     30 -f file8
6554 genfile -l     10 -f file9
6555 genfile -l 256000 -f file10
6556 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6557 tar f archive --delete file10
6558 tar tf archive
6559 ) ) >"$at_stdout" 2>"$at_stder1"
6560     at_status=$?
6561     grep '^ *+' "$at_stder1" >&2
6562     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6563 else
6564     ( :;
6565 mkdir oldgnu
6566 (cd oldgnu
6567 TEST_TAR_FORMAT=oldgnu
6568 export TEST_TAR_FORMAT
6569 TAR_OPTIONS="-H oldgnu"
6570 export TAR_OPTIONS
6571 rm -rf *
6572
6573 genfile -l      3 -f file1
6574 genfile -l      5 -f file2
6575 genfile -l      3 -f file3
6576 genfile -l      6 -f file4
6577 genfile -l     24 -f file5
6578 genfile -l     13 -f file6
6579 genfile -l   1385 -f file7
6580 genfile -l     30 -f file8
6581 genfile -l     10 -f file9
6582 genfile -l 256000 -f file10
6583 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6584 tar f archive --delete file10
6585 tar tf archive
6586 ) ) >"$at_stdout" 2>"$at_stderr"
6587     at_status=$?
6588 fi
6589
6590 at_failed=false
6591 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6592 echo >>"$at_stdout"; echo "file1
6593 file2
6594 file3
6595 file4
6596 file5
6597 file6
6598 file7
6599 file8
6600 file9
6601 " | $at_diff - "$at_stdout" || at_failed=:
6602 case $at_status in
6603    77) echo 77 > "$at_status_file"; exit 77;;
6604    0) ;;
6605    *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
6606       at_failed=:;;
6607 esac
6608 if $at_failed; then
6609
6610
6611   echo 1 > "$at_status_file"
6612   exit 1
6613 fi
6614
6615 $at_traceon
6616
6617               $at_traceoff
6618 echo "$at_srcdir/delete04.at:26:
6619 mkdir ustar
6620 (cd ustar
6621 TEST_TAR_FORMAT=ustar
6622 export TEST_TAR_FORMAT
6623 TAR_OPTIONS=\"-H ustar\"
6624 export TAR_OPTIONS
6625 rm -rf *
6626
6627 genfile -l      3 -f file1
6628 genfile -l      5 -f file2
6629 genfile -l      3 -f file3
6630 genfile -l      6 -f file4
6631 genfile -l     24 -f file5
6632 genfile -l     13 -f file6
6633 genfile -l   1385 -f file7
6634 genfile -l     30 -f file8
6635 genfile -l     10 -f file9
6636 genfile -l 256000 -f file10
6637 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6638 tar f archive --delete file10
6639 tar tf archive
6640 )"
6641 echo delete04.at:26 >"$at_check_line_file"
6642
6643 at_trace_this=
6644 if test -n "$at_traceon"; then
6645     echo 'Not enabling shell tracing (command contains an embedded newline)'
6646 fi
6647
6648 if test -n "$at_trace_this"; then
6649     ( $at_traceon;
6650 mkdir ustar
6651 (cd ustar
6652 TEST_TAR_FORMAT=ustar
6653 export TEST_TAR_FORMAT
6654 TAR_OPTIONS="-H ustar"
6655 export TAR_OPTIONS
6656 rm -rf *
6657
6658 genfile -l      3 -f file1
6659 genfile -l      5 -f file2
6660 genfile -l      3 -f file3
6661 genfile -l      6 -f file4
6662 genfile -l     24 -f file5
6663 genfile -l     13 -f file6
6664 genfile -l   1385 -f file7
6665 genfile -l     30 -f file8
6666 genfile -l     10 -f file9
6667 genfile -l 256000 -f file10
6668 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6669 tar f archive --delete file10
6670 tar tf archive
6671 ) ) >"$at_stdout" 2>"$at_stder1"
6672     at_status=$?
6673     grep '^ *+' "$at_stder1" >&2
6674     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6675 else
6676     ( :;
6677 mkdir ustar
6678 (cd ustar
6679 TEST_TAR_FORMAT=ustar
6680 export TEST_TAR_FORMAT
6681 TAR_OPTIONS="-H ustar"
6682 export TAR_OPTIONS
6683 rm -rf *
6684
6685 genfile -l      3 -f file1
6686 genfile -l      5 -f file2
6687 genfile -l      3 -f file3
6688 genfile -l      6 -f file4
6689 genfile -l     24 -f file5
6690 genfile -l     13 -f file6
6691 genfile -l   1385 -f file7
6692 genfile -l     30 -f file8
6693 genfile -l     10 -f file9
6694 genfile -l 256000 -f file10
6695 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6696 tar f archive --delete file10
6697 tar tf archive
6698 ) ) >"$at_stdout" 2>"$at_stderr"
6699     at_status=$?
6700 fi
6701
6702 at_failed=false
6703 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6704 echo >>"$at_stdout"; echo "file1
6705 file2
6706 file3
6707 file4
6708 file5
6709 file6
6710 file7
6711 file8
6712 file9
6713 " | $at_diff - "$at_stdout" || at_failed=:
6714 case $at_status in
6715    77) echo 77 > "$at_status_file"; exit 77;;
6716    0) ;;
6717    *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
6718       at_failed=:;;
6719 esac
6720 if $at_failed; then
6721
6722
6723   echo 1 > "$at_status_file"
6724   exit 1
6725 fi
6726
6727 $at_traceon
6728
6729               $at_traceoff
6730 echo "$at_srcdir/delete04.at:26:
6731 mkdir posix
6732 (cd posix
6733 TEST_TAR_FORMAT=posix
6734 export TEST_TAR_FORMAT
6735 TAR_OPTIONS=\"-H posix\"
6736 export TAR_OPTIONS
6737 rm -rf *
6738
6739 genfile -l      3 -f file1
6740 genfile -l      5 -f file2
6741 genfile -l      3 -f file3
6742 genfile -l      6 -f file4
6743 genfile -l     24 -f file5
6744 genfile -l     13 -f file6
6745 genfile -l   1385 -f file7
6746 genfile -l     30 -f file8
6747 genfile -l     10 -f file9
6748 genfile -l 256000 -f file10
6749 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6750 tar f archive --delete file10
6751 tar tf archive
6752 )"
6753 echo delete04.at:26 >"$at_check_line_file"
6754
6755 at_trace_this=
6756 if test -n "$at_traceon"; then
6757     echo 'Not enabling shell tracing (command contains an embedded newline)'
6758 fi
6759
6760 if test -n "$at_trace_this"; then
6761     ( $at_traceon;
6762 mkdir posix
6763 (cd posix
6764 TEST_TAR_FORMAT=posix
6765 export TEST_TAR_FORMAT
6766 TAR_OPTIONS="-H posix"
6767 export TAR_OPTIONS
6768 rm -rf *
6769
6770 genfile -l      3 -f file1
6771 genfile -l      5 -f file2
6772 genfile -l      3 -f file3
6773 genfile -l      6 -f file4
6774 genfile -l     24 -f file5
6775 genfile -l     13 -f file6
6776 genfile -l   1385 -f file7
6777 genfile -l     30 -f file8
6778 genfile -l     10 -f file9
6779 genfile -l 256000 -f file10
6780 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6781 tar f archive --delete file10
6782 tar tf archive
6783 ) ) >"$at_stdout" 2>"$at_stder1"
6784     at_status=$?
6785     grep '^ *+' "$at_stder1" >&2
6786     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6787 else
6788     ( :;
6789 mkdir posix
6790 (cd posix
6791 TEST_TAR_FORMAT=posix
6792 export TEST_TAR_FORMAT
6793 TAR_OPTIONS="-H posix"
6794 export TAR_OPTIONS
6795 rm -rf *
6796
6797 genfile -l      3 -f file1
6798 genfile -l      5 -f file2
6799 genfile -l      3 -f file3
6800 genfile -l      6 -f file4
6801 genfile -l     24 -f file5
6802 genfile -l     13 -f file6
6803 genfile -l   1385 -f file7
6804 genfile -l     30 -f file8
6805 genfile -l     10 -f file9
6806 genfile -l 256000 -f file10
6807 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6808 tar f archive --delete file10
6809 tar tf archive
6810 ) ) >"$at_stdout" 2>"$at_stderr"
6811     at_status=$?
6812 fi
6813
6814 at_failed=false
6815 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6816 echo >>"$at_stdout"; echo "file1
6817 file2
6818 file3
6819 file4
6820 file5
6821 file6
6822 file7
6823 file8
6824 file9
6825 " | $at_diff - "$at_stdout" || at_failed=:
6826 case $at_status in
6827    77) echo 77 > "$at_status_file"; exit 77;;
6828    0) ;;
6829    *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
6830       at_failed=:;;
6831 esac
6832 if $at_failed; then
6833
6834
6835   echo 1 > "$at_status_file"
6836   exit 1
6837 fi
6838
6839 $at_traceon
6840
6841               $at_traceoff
6842 echo "$at_srcdir/delete04.at:26:
6843 mkdir gnu
6844 (cd gnu
6845 TEST_TAR_FORMAT=gnu
6846 export TEST_TAR_FORMAT
6847 TAR_OPTIONS=\"-H gnu\"
6848 export TAR_OPTIONS
6849 rm -rf *
6850
6851 genfile -l      3 -f file1
6852 genfile -l      5 -f file2
6853 genfile -l      3 -f file3
6854 genfile -l      6 -f file4
6855 genfile -l     24 -f file5
6856 genfile -l     13 -f file6
6857 genfile -l   1385 -f file7
6858 genfile -l     30 -f file8
6859 genfile -l     10 -f file9
6860 genfile -l 256000 -f file10
6861 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6862 tar f archive --delete file10
6863 tar tf archive
6864 )"
6865 echo delete04.at:26 >"$at_check_line_file"
6866
6867 at_trace_this=
6868 if test -n "$at_traceon"; then
6869     echo 'Not enabling shell tracing (command contains an embedded newline)'
6870 fi
6871
6872 if test -n "$at_trace_this"; then
6873     ( $at_traceon;
6874 mkdir gnu
6875 (cd gnu
6876 TEST_TAR_FORMAT=gnu
6877 export TEST_TAR_FORMAT
6878 TAR_OPTIONS="-H gnu"
6879 export TAR_OPTIONS
6880 rm -rf *
6881
6882 genfile -l      3 -f file1
6883 genfile -l      5 -f file2
6884 genfile -l      3 -f file3
6885 genfile -l      6 -f file4
6886 genfile -l     24 -f file5
6887 genfile -l     13 -f file6
6888 genfile -l   1385 -f file7
6889 genfile -l     30 -f file8
6890 genfile -l     10 -f file9
6891 genfile -l 256000 -f file10
6892 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6893 tar f archive --delete file10
6894 tar tf archive
6895 ) ) >"$at_stdout" 2>"$at_stder1"
6896     at_status=$?
6897     grep '^ *+' "$at_stder1" >&2
6898     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6899 else
6900     ( :;
6901 mkdir gnu
6902 (cd gnu
6903 TEST_TAR_FORMAT=gnu
6904 export TEST_TAR_FORMAT
6905 TAR_OPTIONS="-H gnu"
6906 export TAR_OPTIONS
6907 rm -rf *
6908
6909 genfile -l      3 -f file1
6910 genfile -l      5 -f file2
6911 genfile -l      3 -f file3
6912 genfile -l      6 -f file4
6913 genfile -l     24 -f file5
6914 genfile -l     13 -f file6
6915 genfile -l   1385 -f file7
6916 genfile -l     30 -f file8
6917 genfile -l     10 -f file9
6918 genfile -l 256000 -f file10
6919 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6920 tar f archive --delete file10
6921 tar tf archive
6922 ) ) >"$at_stdout" 2>"$at_stderr"
6923     at_status=$?
6924 fi
6925
6926 at_failed=false
6927 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6928 echo >>"$at_stdout"; echo "file1
6929 file2
6930 file3
6931 file4
6932 file5
6933 file6
6934 file7
6935 file8
6936 file9
6937 " | $at_diff - "$at_stdout" || at_failed=:
6938 case $at_status in
6939    77) echo 77 > "$at_status_file"; exit 77;;
6940    0) ;;
6941    *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
6942       at_failed=:;;
6943 esac
6944 if $at_failed; then
6945
6946
6947   echo 1 > "$at_status_file"
6948   exit 1
6949 fi
6950
6951 $at_traceon
6952
6953
6954
6955
6956       $at_traceoff
6957       $at_times_p && times >"$at_times_file"
6958     ) 5>&1 2>&1 | eval $at_tee_pipe
6959     at_status=`cat "$at_status_file"`
6960     ;;
6961
6962   17 ) # 17. delete05.at:27: deleting non-existing member
6963     at_setup_line='delete05.at:27'
6964     at_desc="deleting non-existing member"
6965     $at_quiet $ECHO_N " 17: deleting non-existing member                   $ECHO_C"
6966     at_xfail=no
6967       test -f $XFAILFILE && at_xfail=yes
6968     echo "#                             -*- compilation -*-" >> "$at_group_log"
6969     (
6970       echo "17. delete05.at:27: testing ..."
6971       $at_traceon
6972
6973
6974
6975
6976
6977   $at_traceoff
6978 echo "$at_srcdir/delete05.at:30:
6979 mkdir v7
6980 (cd v7
6981 TEST_TAR_FORMAT=v7
6982 export TEST_TAR_FORMAT
6983 TAR_OPTIONS=\"-H v7\"
6984 export TAR_OPTIONS
6985 rm -rf *
6986
6987 genfile -l 1024 -f en
6988 genfile -l 1024 -f to
6989
6990 tar cf archive en to
6991 # Make sure we don't use bogus blocking factor.
6992 # GNU tar up to and including 1.14.91 produced an empty archive this way:
6993 tar --file archive --blocking-factor=20 --delete tre
6994 tar tf archive
6995 )"
6996 echo delete05.at:30 >"$at_check_line_file"
6997
6998 at_trace_this=
6999 if test -n "$at_traceon"; then
7000     echo 'Not enabling shell tracing (command contains an embedded newline)'
7001 fi
7002
7003 if test -n "$at_trace_this"; then
7004     ( $at_traceon;
7005 mkdir v7
7006 (cd v7
7007 TEST_TAR_FORMAT=v7
7008 export TEST_TAR_FORMAT
7009 TAR_OPTIONS="-H v7"
7010 export TAR_OPTIONS
7011 rm -rf *
7012
7013 genfile -l 1024 -f en
7014 genfile -l 1024 -f to
7015
7016 tar cf archive en to
7017 # Make sure we don't use bogus blocking factor.
7018 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7019 tar --file archive --blocking-factor=20 --delete tre
7020 tar tf archive
7021 ) ) >"$at_stdout" 2>"$at_stder1"
7022     at_status=$?
7023     grep '^ *+' "$at_stder1" >&2
7024     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7025 else
7026     ( :;
7027 mkdir v7
7028 (cd v7
7029 TEST_TAR_FORMAT=v7
7030 export TEST_TAR_FORMAT
7031 TAR_OPTIONS="-H v7"
7032 export TAR_OPTIONS
7033 rm -rf *
7034
7035 genfile -l 1024 -f en
7036 genfile -l 1024 -f to
7037
7038 tar cf archive en to
7039 # Make sure we don't use bogus blocking factor.
7040 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7041 tar --file archive --blocking-factor=20 --delete tre
7042 tar tf archive
7043 ) ) >"$at_stdout" 2>"$at_stderr"
7044     at_status=$?
7045 fi
7046
7047 at_failed=false
7048 echo >>"$at_stderr"; echo "tar: tre: Not found in archive
7049 tar: Exiting with failure status due to previous errors
7050 " | $at_diff - "$at_stderr" || at_failed=:
7051 echo >>"$at_stdout"; echo "en
7052 to
7053 " | $at_diff - "$at_stdout" || at_failed=:
7054 case $at_status in
7055    77) echo 77 > "$at_status_file"; exit 77;;
7056    0) ;;
7057    *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
7058       at_failed=:;;
7059 esac
7060 if $at_failed; then
7061
7062
7063   echo 1 > "$at_status_file"
7064   exit 1
7065 fi
7066
7067 $at_traceon
7068
7069               $at_traceoff
7070 echo "$at_srcdir/delete05.at:30:
7071 mkdir oldgnu
7072 (cd oldgnu
7073 TEST_TAR_FORMAT=oldgnu
7074 export TEST_TAR_FORMAT
7075 TAR_OPTIONS=\"-H oldgnu\"
7076 export TAR_OPTIONS
7077 rm -rf *
7078
7079 genfile -l 1024 -f en
7080 genfile -l 1024 -f to
7081
7082 tar cf archive en to
7083 # Make sure we don't use bogus blocking factor.
7084 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7085 tar --file archive --blocking-factor=20 --delete tre
7086 tar tf archive
7087 )"
7088 echo delete05.at:30 >"$at_check_line_file"
7089
7090 at_trace_this=
7091 if test -n "$at_traceon"; then
7092     echo 'Not enabling shell tracing (command contains an embedded newline)'
7093 fi
7094
7095 if test -n "$at_trace_this"; then
7096     ( $at_traceon;
7097 mkdir oldgnu
7098 (cd oldgnu
7099 TEST_TAR_FORMAT=oldgnu
7100 export TEST_TAR_FORMAT
7101 TAR_OPTIONS="-H oldgnu"
7102 export TAR_OPTIONS
7103 rm -rf *
7104
7105 genfile -l 1024 -f en
7106 genfile -l 1024 -f to
7107
7108 tar cf archive en to
7109 # Make sure we don't use bogus blocking factor.
7110 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7111 tar --file archive --blocking-factor=20 --delete tre
7112 tar tf archive
7113 ) ) >"$at_stdout" 2>"$at_stder1"
7114     at_status=$?
7115     grep '^ *+' "$at_stder1" >&2
7116     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7117 else
7118     ( :;
7119 mkdir oldgnu
7120 (cd oldgnu
7121 TEST_TAR_FORMAT=oldgnu
7122 export TEST_TAR_FORMAT
7123 TAR_OPTIONS="-H oldgnu"
7124 export TAR_OPTIONS
7125 rm -rf *
7126
7127 genfile -l 1024 -f en
7128 genfile -l 1024 -f to
7129
7130 tar cf archive en to
7131 # Make sure we don't use bogus blocking factor.
7132 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7133 tar --file archive --blocking-factor=20 --delete tre
7134 tar tf archive
7135 ) ) >"$at_stdout" 2>"$at_stderr"
7136     at_status=$?
7137 fi
7138
7139 at_failed=false
7140 echo >>"$at_stderr"; echo "tar: tre: Not found in archive
7141 tar: Exiting with failure status due to previous errors
7142 " | $at_diff - "$at_stderr" || at_failed=:
7143 echo >>"$at_stdout"; echo "en
7144 to
7145 " | $at_diff - "$at_stdout" || at_failed=:
7146 case $at_status in
7147    77) echo 77 > "$at_status_file"; exit 77;;
7148    0) ;;
7149    *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
7150       at_failed=:;;
7151 esac
7152 if $at_failed; then
7153
7154
7155   echo 1 > "$at_status_file"
7156   exit 1
7157 fi
7158
7159 $at_traceon
7160
7161               $at_traceoff
7162 echo "$at_srcdir/delete05.at:30:
7163 mkdir ustar
7164 (cd ustar
7165 TEST_TAR_FORMAT=ustar
7166 export TEST_TAR_FORMAT
7167 TAR_OPTIONS=\"-H ustar\"
7168 export TAR_OPTIONS
7169 rm -rf *
7170
7171 genfile -l 1024 -f en
7172 genfile -l 1024 -f to
7173
7174 tar cf archive en to
7175 # Make sure we don't use bogus blocking factor.
7176 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7177 tar --file archive --blocking-factor=20 --delete tre
7178 tar tf archive
7179 )"
7180 echo delete05.at:30 >"$at_check_line_file"
7181
7182 at_trace_this=
7183 if test -n "$at_traceon"; then
7184     echo 'Not enabling shell tracing (command contains an embedded newline)'
7185 fi
7186
7187 if test -n "$at_trace_this"; then
7188     ( $at_traceon;
7189 mkdir ustar
7190 (cd ustar
7191 TEST_TAR_FORMAT=ustar
7192 export TEST_TAR_FORMAT
7193 TAR_OPTIONS="-H ustar"
7194 export TAR_OPTIONS
7195 rm -rf *
7196
7197 genfile -l 1024 -f en
7198 genfile -l 1024 -f to
7199
7200 tar cf archive en to
7201 # Make sure we don't use bogus blocking factor.
7202 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7203 tar --file archive --blocking-factor=20 --delete tre
7204 tar tf archive
7205 ) ) >"$at_stdout" 2>"$at_stder1"
7206     at_status=$?
7207     grep '^ *+' "$at_stder1" >&2
7208     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7209 else
7210     ( :;
7211 mkdir ustar
7212 (cd ustar
7213 TEST_TAR_FORMAT=ustar
7214 export TEST_TAR_FORMAT
7215 TAR_OPTIONS="-H ustar"
7216 export TAR_OPTIONS
7217 rm -rf *
7218
7219 genfile -l 1024 -f en
7220 genfile -l 1024 -f to
7221
7222 tar cf archive en to
7223 # Make sure we don't use bogus blocking factor.
7224 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7225 tar --file archive --blocking-factor=20 --delete tre
7226 tar tf archive
7227 ) ) >"$at_stdout" 2>"$at_stderr"
7228     at_status=$?
7229 fi
7230
7231 at_failed=false
7232 echo >>"$at_stderr"; echo "tar: tre: Not found in archive
7233 tar: Exiting with failure status due to previous errors
7234 " | $at_diff - "$at_stderr" || at_failed=:
7235 echo >>"$at_stdout"; echo "en
7236 to
7237 " | $at_diff - "$at_stdout" || at_failed=:
7238 case $at_status in
7239    77) echo 77 > "$at_status_file"; exit 77;;
7240    0) ;;
7241    *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
7242       at_failed=:;;
7243 esac
7244 if $at_failed; then
7245
7246
7247   echo 1 > "$at_status_file"
7248   exit 1
7249 fi
7250
7251 $at_traceon
7252
7253               $at_traceoff
7254 echo "$at_srcdir/delete05.at:30:
7255 mkdir posix
7256 (cd posix
7257 TEST_TAR_FORMAT=posix
7258 export TEST_TAR_FORMAT
7259 TAR_OPTIONS=\"-H posix\"
7260 export TAR_OPTIONS
7261 rm -rf *
7262
7263 genfile -l 1024 -f en
7264 genfile -l 1024 -f to
7265
7266 tar cf archive en to
7267 # Make sure we don't use bogus blocking factor.
7268 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7269 tar --file archive --blocking-factor=20 --delete tre
7270 tar tf archive
7271 )"
7272 echo delete05.at:30 >"$at_check_line_file"
7273
7274 at_trace_this=
7275 if test -n "$at_traceon"; then
7276     echo 'Not enabling shell tracing (command contains an embedded newline)'
7277 fi
7278
7279 if test -n "$at_trace_this"; then
7280     ( $at_traceon;
7281 mkdir posix
7282 (cd posix
7283 TEST_TAR_FORMAT=posix
7284 export TEST_TAR_FORMAT
7285 TAR_OPTIONS="-H posix"
7286 export TAR_OPTIONS
7287 rm -rf *
7288
7289 genfile -l 1024 -f en
7290 genfile -l 1024 -f to
7291
7292 tar cf archive en to
7293 # Make sure we don't use bogus blocking factor.
7294 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7295 tar --file archive --blocking-factor=20 --delete tre
7296 tar tf archive
7297 ) ) >"$at_stdout" 2>"$at_stder1"
7298     at_status=$?
7299     grep '^ *+' "$at_stder1" >&2
7300     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7301 else
7302     ( :;
7303 mkdir posix
7304 (cd posix
7305 TEST_TAR_FORMAT=posix
7306 export TEST_TAR_FORMAT
7307 TAR_OPTIONS="-H posix"
7308 export TAR_OPTIONS
7309 rm -rf *
7310
7311 genfile -l 1024 -f en
7312 genfile -l 1024 -f to
7313
7314 tar cf archive en to
7315 # Make sure we don't use bogus blocking factor.
7316 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7317 tar --file archive --blocking-factor=20 --delete tre
7318 tar tf archive
7319 ) ) >"$at_stdout" 2>"$at_stderr"
7320     at_status=$?
7321 fi
7322
7323 at_failed=false
7324 echo >>"$at_stderr"; echo "tar: tre: Not found in archive
7325 tar: Exiting with failure status due to previous errors
7326 " | $at_diff - "$at_stderr" || at_failed=:
7327 echo >>"$at_stdout"; echo "en
7328 to
7329 " | $at_diff - "$at_stdout" || at_failed=:
7330 case $at_status in
7331    77) echo 77 > "$at_status_file"; exit 77;;
7332    0) ;;
7333    *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
7334       at_failed=:;;
7335 esac
7336 if $at_failed; then
7337
7338
7339   echo 1 > "$at_status_file"
7340   exit 1
7341 fi
7342
7343 $at_traceon
7344
7345               $at_traceoff
7346 echo "$at_srcdir/delete05.at:30:
7347 mkdir gnu
7348 (cd gnu
7349 TEST_TAR_FORMAT=gnu
7350 export TEST_TAR_FORMAT
7351 TAR_OPTIONS=\"-H gnu\"
7352 export TAR_OPTIONS
7353 rm -rf *
7354
7355 genfile -l 1024 -f en
7356 genfile -l 1024 -f to
7357
7358 tar cf archive en to
7359 # Make sure we don't use bogus blocking factor.
7360 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7361 tar --file archive --blocking-factor=20 --delete tre
7362 tar tf archive
7363 )"
7364 echo delete05.at:30 >"$at_check_line_file"
7365
7366 at_trace_this=
7367 if test -n "$at_traceon"; then
7368     echo 'Not enabling shell tracing (command contains an embedded newline)'
7369 fi
7370
7371 if test -n "$at_trace_this"; then
7372     ( $at_traceon;
7373 mkdir gnu
7374 (cd gnu
7375 TEST_TAR_FORMAT=gnu
7376 export TEST_TAR_FORMAT
7377 TAR_OPTIONS="-H gnu"
7378 export TAR_OPTIONS
7379 rm -rf *
7380
7381 genfile -l 1024 -f en
7382 genfile -l 1024 -f to
7383
7384 tar cf archive en to
7385 # Make sure we don't use bogus blocking factor.
7386 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7387 tar --file archive --blocking-factor=20 --delete tre
7388 tar tf archive
7389 ) ) >"$at_stdout" 2>"$at_stder1"
7390     at_status=$?
7391     grep '^ *+' "$at_stder1" >&2
7392     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7393 else
7394     ( :;
7395 mkdir gnu
7396 (cd gnu
7397 TEST_TAR_FORMAT=gnu
7398 export TEST_TAR_FORMAT
7399 TAR_OPTIONS="-H gnu"
7400 export TAR_OPTIONS
7401 rm -rf *
7402
7403 genfile -l 1024 -f en
7404 genfile -l 1024 -f to
7405
7406 tar cf archive en to
7407 # Make sure we don't use bogus blocking factor.
7408 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7409 tar --file archive --blocking-factor=20 --delete tre
7410 tar tf archive
7411 ) ) >"$at_stdout" 2>"$at_stderr"
7412     at_status=$?
7413 fi
7414
7415 at_failed=false
7416 echo >>"$at_stderr"; echo "tar: tre: Not found in archive
7417 tar: Exiting with failure status due to previous errors
7418 " | $at_diff - "$at_stderr" || at_failed=:
7419 echo >>"$at_stdout"; echo "en
7420 to
7421 " | $at_diff - "$at_stdout" || at_failed=:
7422 case $at_status in
7423    77) echo 77 > "$at_status_file"; exit 77;;
7424    0) ;;
7425    *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
7426       at_failed=:;;
7427 esac
7428 if $at_failed; then
7429
7430
7431   echo 1 > "$at_status_file"
7432   exit 1
7433 fi
7434
7435 $at_traceon
7436
7437
7438
7439
7440       $at_traceoff
7441       $at_times_p && times >"$at_times_file"
7442     ) 5>&1 2>&1 | eval $at_tee_pipe
7443     at_status=`cat "$at_status_file"`
7444     ;;
7445
7446   18 ) # 18. extrac01.at:23: extract over an existing directory
7447     at_setup_line='extrac01.at:23'
7448     at_desc="extract over an existing directory"
7449     $at_quiet $ECHO_N " 18: extract over an existing directory             $ECHO_C"
7450     at_xfail=no
7451       test -f $XFAILFILE && at_xfail=yes
7452     echo "#                             -*- compilation -*-" >> "$at_group_log"
7453     (
7454       echo "18. extrac01.at:23: testing ..."
7455       $at_traceon
7456
7457
7458
7459
7460
7461   $at_traceoff
7462 echo "$at_srcdir/extrac01.at:26:
7463 mkdir v7
7464 (cd v7
7465 TEST_TAR_FORMAT=v7
7466 export TEST_TAR_FORMAT
7467 TAR_OPTIONS=\"-H v7\"
7468 export TAR_OPTIONS
7469 rm -rf *
7470
7471 mkdir directory
7472 touch directory/file
7473 tar cf archive directory || exit 1
7474 tar xf archive || exit 1
7475 )"
7476 echo extrac01.at:26 >"$at_check_line_file"
7477
7478 at_trace_this=
7479 if test -n "$at_traceon"; then
7480     echo 'Not enabling shell tracing (command contains an embedded newline)'
7481 fi
7482
7483 if test -n "$at_trace_this"; then
7484     ( $at_traceon;
7485 mkdir v7
7486 (cd v7
7487 TEST_TAR_FORMAT=v7
7488 export TEST_TAR_FORMAT
7489 TAR_OPTIONS="-H v7"
7490 export TAR_OPTIONS
7491 rm -rf *
7492
7493 mkdir directory
7494 touch directory/file
7495 tar cf archive directory || exit 1
7496 tar xf archive || exit 1
7497 ) ) >"$at_stdout" 2>"$at_stder1"
7498     at_status=$?
7499     grep '^ *+' "$at_stder1" >&2
7500     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7501 else
7502     ( :;
7503 mkdir v7
7504 (cd v7
7505 TEST_TAR_FORMAT=v7
7506 export TEST_TAR_FORMAT
7507 TAR_OPTIONS="-H v7"
7508 export TAR_OPTIONS
7509 rm -rf *
7510
7511 mkdir directory
7512 touch directory/file
7513 tar cf archive directory || exit 1
7514 tar xf archive || exit 1
7515 ) ) >"$at_stdout" 2>"$at_stderr"
7516     at_status=$?
7517 fi
7518
7519 at_failed=false
7520 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7521 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7522 case $at_status in
7523    77) echo 77 > "$at_status_file"; exit 77;;
7524    0) ;;
7525    *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
7526       at_failed=:;;
7527 esac
7528 if $at_failed; then
7529
7530
7531   echo 1 > "$at_status_file"
7532   exit 1
7533 fi
7534
7535 $at_traceon
7536
7537               $at_traceoff
7538 echo "$at_srcdir/extrac01.at:26:
7539 mkdir oldgnu
7540 (cd oldgnu
7541 TEST_TAR_FORMAT=oldgnu
7542 export TEST_TAR_FORMAT
7543 TAR_OPTIONS=\"-H oldgnu\"
7544 export TAR_OPTIONS
7545 rm -rf *
7546
7547 mkdir directory
7548 touch directory/file
7549 tar cf archive directory || exit 1
7550 tar xf archive || exit 1
7551 )"
7552 echo extrac01.at:26 >"$at_check_line_file"
7553
7554 at_trace_this=
7555 if test -n "$at_traceon"; then
7556     echo 'Not enabling shell tracing (command contains an embedded newline)'
7557 fi
7558
7559 if test -n "$at_trace_this"; then
7560     ( $at_traceon;
7561 mkdir oldgnu
7562 (cd oldgnu
7563 TEST_TAR_FORMAT=oldgnu
7564 export TEST_TAR_FORMAT
7565 TAR_OPTIONS="-H oldgnu"
7566 export TAR_OPTIONS
7567 rm -rf *
7568
7569 mkdir directory
7570 touch directory/file
7571 tar cf archive directory || exit 1
7572 tar xf archive || exit 1
7573 ) ) >"$at_stdout" 2>"$at_stder1"
7574     at_status=$?
7575     grep '^ *+' "$at_stder1" >&2
7576     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7577 else
7578     ( :;
7579 mkdir oldgnu
7580 (cd oldgnu
7581 TEST_TAR_FORMAT=oldgnu
7582 export TEST_TAR_FORMAT
7583 TAR_OPTIONS="-H oldgnu"
7584 export TAR_OPTIONS
7585 rm -rf *
7586
7587 mkdir directory
7588 touch directory/file
7589 tar cf archive directory || exit 1
7590 tar xf archive || exit 1
7591 ) ) >"$at_stdout" 2>"$at_stderr"
7592     at_status=$?
7593 fi
7594
7595 at_failed=false
7596 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7597 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7598 case $at_status in
7599    77) echo 77 > "$at_status_file"; exit 77;;
7600    0) ;;
7601    *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
7602       at_failed=:;;
7603 esac
7604 if $at_failed; then
7605
7606
7607   echo 1 > "$at_status_file"
7608   exit 1
7609 fi
7610
7611 $at_traceon
7612
7613               $at_traceoff
7614 echo "$at_srcdir/extrac01.at:26:
7615 mkdir ustar
7616 (cd ustar
7617 TEST_TAR_FORMAT=ustar
7618 export TEST_TAR_FORMAT
7619 TAR_OPTIONS=\"-H ustar\"
7620 export TAR_OPTIONS
7621 rm -rf *
7622
7623 mkdir directory
7624 touch directory/file
7625 tar cf archive directory || exit 1
7626 tar xf archive || exit 1
7627 )"
7628 echo extrac01.at:26 >"$at_check_line_file"
7629
7630 at_trace_this=
7631 if test -n "$at_traceon"; then
7632     echo 'Not enabling shell tracing (command contains an embedded newline)'
7633 fi
7634
7635 if test -n "$at_trace_this"; then
7636     ( $at_traceon;
7637 mkdir ustar
7638 (cd ustar
7639 TEST_TAR_FORMAT=ustar
7640 export TEST_TAR_FORMAT
7641 TAR_OPTIONS="-H ustar"
7642 export TAR_OPTIONS
7643 rm -rf *
7644
7645 mkdir directory
7646 touch directory/file
7647 tar cf archive directory || exit 1
7648 tar xf archive || exit 1
7649 ) ) >"$at_stdout" 2>"$at_stder1"
7650     at_status=$?
7651     grep '^ *+' "$at_stder1" >&2
7652     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7653 else
7654     ( :;
7655 mkdir ustar
7656 (cd ustar
7657 TEST_TAR_FORMAT=ustar
7658 export TEST_TAR_FORMAT
7659 TAR_OPTIONS="-H ustar"
7660 export TAR_OPTIONS
7661 rm -rf *
7662
7663 mkdir directory
7664 touch directory/file
7665 tar cf archive directory || exit 1
7666 tar xf archive || exit 1
7667 ) ) >"$at_stdout" 2>"$at_stderr"
7668     at_status=$?
7669 fi
7670
7671 at_failed=false
7672 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7673 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7674 case $at_status in
7675    77) echo 77 > "$at_status_file"; exit 77;;
7676    0) ;;
7677    *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
7678       at_failed=:;;
7679 esac
7680 if $at_failed; then
7681
7682
7683   echo 1 > "$at_status_file"
7684   exit 1
7685 fi
7686
7687 $at_traceon
7688
7689               $at_traceoff
7690 echo "$at_srcdir/extrac01.at:26:
7691 mkdir posix
7692 (cd posix
7693 TEST_TAR_FORMAT=posix
7694 export TEST_TAR_FORMAT
7695 TAR_OPTIONS=\"-H posix\"
7696 export TAR_OPTIONS
7697 rm -rf *
7698
7699 mkdir directory
7700 touch directory/file
7701 tar cf archive directory || exit 1
7702 tar xf archive || exit 1
7703 )"
7704 echo extrac01.at:26 >"$at_check_line_file"
7705
7706 at_trace_this=
7707 if test -n "$at_traceon"; then
7708     echo 'Not enabling shell tracing (command contains an embedded newline)'
7709 fi
7710
7711 if test -n "$at_trace_this"; then
7712     ( $at_traceon;
7713 mkdir posix
7714 (cd posix
7715 TEST_TAR_FORMAT=posix
7716 export TEST_TAR_FORMAT
7717 TAR_OPTIONS="-H posix"
7718 export TAR_OPTIONS
7719 rm -rf *
7720
7721 mkdir directory
7722 touch directory/file
7723 tar cf archive directory || exit 1
7724 tar xf archive || exit 1
7725 ) ) >"$at_stdout" 2>"$at_stder1"
7726     at_status=$?
7727     grep '^ *+' "$at_stder1" >&2
7728     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7729 else
7730     ( :;
7731 mkdir posix
7732 (cd posix
7733 TEST_TAR_FORMAT=posix
7734 export TEST_TAR_FORMAT
7735 TAR_OPTIONS="-H posix"
7736 export TAR_OPTIONS
7737 rm -rf *
7738
7739 mkdir directory
7740 touch directory/file
7741 tar cf archive directory || exit 1
7742 tar xf archive || exit 1
7743 ) ) >"$at_stdout" 2>"$at_stderr"
7744     at_status=$?
7745 fi
7746
7747 at_failed=false
7748 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7749 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7750 case $at_status in
7751    77) echo 77 > "$at_status_file"; exit 77;;
7752    0) ;;
7753    *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
7754       at_failed=:;;
7755 esac
7756 if $at_failed; then
7757
7758
7759   echo 1 > "$at_status_file"
7760   exit 1
7761 fi
7762
7763 $at_traceon
7764
7765               $at_traceoff
7766 echo "$at_srcdir/extrac01.at:26:
7767 mkdir gnu
7768 (cd gnu
7769 TEST_TAR_FORMAT=gnu
7770 export TEST_TAR_FORMAT
7771 TAR_OPTIONS=\"-H gnu\"
7772 export TAR_OPTIONS
7773 rm -rf *
7774
7775 mkdir directory
7776 touch directory/file
7777 tar cf archive directory || exit 1
7778 tar xf archive || exit 1
7779 )"
7780 echo extrac01.at:26 >"$at_check_line_file"
7781
7782 at_trace_this=
7783 if test -n "$at_traceon"; then
7784     echo 'Not enabling shell tracing (command contains an embedded newline)'
7785 fi
7786
7787 if test -n "$at_trace_this"; then
7788     ( $at_traceon;
7789 mkdir gnu
7790 (cd gnu
7791 TEST_TAR_FORMAT=gnu
7792 export TEST_TAR_FORMAT
7793 TAR_OPTIONS="-H gnu"
7794 export TAR_OPTIONS
7795 rm -rf *
7796
7797 mkdir directory
7798 touch directory/file
7799 tar cf archive directory || exit 1
7800 tar xf archive || exit 1
7801 ) ) >"$at_stdout" 2>"$at_stder1"
7802     at_status=$?
7803     grep '^ *+' "$at_stder1" >&2
7804     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7805 else
7806     ( :;
7807 mkdir gnu
7808 (cd gnu
7809 TEST_TAR_FORMAT=gnu
7810 export TEST_TAR_FORMAT
7811 TAR_OPTIONS="-H gnu"
7812 export TAR_OPTIONS
7813 rm -rf *
7814
7815 mkdir directory
7816 touch directory/file
7817 tar cf archive directory || exit 1
7818 tar xf archive || exit 1
7819 ) ) >"$at_stdout" 2>"$at_stderr"
7820     at_status=$?
7821 fi
7822
7823 at_failed=false
7824 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7825 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7826 case $at_status in
7827    77) echo 77 > "$at_status_file"; exit 77;;
7828    0) ;;
7829    *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
7830       at_failed=:;;
7831 esac
7832 if $at_failed; then
7833
7834
7835   echo 1 > "$at_status_file"
7836   exit 1
7837 fi
7838
7839 $at_traceon
7840
7841
7842
7843
7844       $at_traceoff
7845       $at_times_p && times >"$at_times_file"
7846     ) 5>&1 2>&1 | eval $at_tee_pipe
7847     at_status=`cat "$at_status_file"`
7848     ;;
7849
7850   19 ) # 19. extrac02.at:23: extracting symlinks over an existing file
7851     at_setup_line='extrac02.at:23'
7852     at_desc="extracting symlinks over an existing file"
7853     $at_quiet $ECHO_N " 19: extracting symlinks over an existing file      $ECHO_C"
7854     at_xfail=no
7855       test -f $XFAILFILE && at_xfail=yes
7856     echo "#                             -*- compilation -*-" >> "$at_group_log"
7857     (
7858       echo "19. extrac02.at:23: testing ..."
7859       $at_traceon
7860
7861
7862
7863 # FIXME: Skip if symlinks are not supported on the system
7864
7865
7866
7867   $at_traceoff
7868 echo "$at_srcdir/extrac02.at:28:
7869 mkdir v7
7870 (cd v7
7871 TEST_TAR_FORMAT=v7
7872 export TEST_TAR_FORMAT
7873 TAR_OPTIONS=\"-H v7\"
7874 export TAR_OPTIONS
7875 rm -rf *
7876
7877 touch file
7878 ln -s file link 2> /dev/null || ln file link
7879 tar cf archive link
7880 rm link
7881 touch link
7882 tar xf archive
7883 )"
7884 echo extrac02.at:28 >"$at_check_line_file"
7885
7886 at_trace_this=
7887 if test -n "$at_traceon"; then
7888     echo 'Not enabling shell tracing (command contains an embedded newline)'
7889 fi
7890
7891 if test -n "$at_trace_this"; then
7892     ( $at_traceon;
7893 mkdir v7
7894 (cd v7
7895 TEST_TAR_FORMAT=v7
7896 export TEST_TAR_FORMAT
7897 TAR_OPTIONS="-H v7"
7898 export TAR_OPTIONS
7899 rm -rf *
7900
7901 touch file
7902 ln -s file link 2> /dev/null || ln file link
7903 tar cf archive link
7904 rm link
7905 touch link
7906 tar xf archive
7907 ) ) >"$at_stdout" 2>"$at_stder1"
7908     at_status=$?
7909     grep '^ *+' "$at_stder1" >&2
7910     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7911 else
7912     ( :;
7913 mkdir v7
7914 (cd v7
7915 TEST_TAR_FORMAT=v7
7916 export TEST_TAR_FORMAT
7917 TAR_OPTIONS="-H v7"
7918 export TAR_OPTIONS
7919 rm -rf *
7920
7921 touch file
7922 ln -s file link 2> /dev/null || ln file link
7923 tar cf archive link
7924 rm link
7925 touch link
7926 tar xf archive
7927 ) ) >"$at_stdout" 2>"$at_stderr"
7928     at_status=$?
7929 fi
7930
7931 at_failed=false
7932 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7933 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7934 case $at_status in
7935    77) echo 77 > "$at_status_file"; exit 77;;
7936    0) ;;
7937    *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
7938       at_failed=:;;
7939 esac
7940 if $at_failed; then
7941
7942
7943   echo 1 > "$at_status_file"
7944   exit 1
7945 fi
7946
7947 $at_traceon
7948
7949               $at_traceoff
7950 echo "$at_srcdir/extrac02.at:28:
7951 mkdir oldgnu
7952 (cd oldgnu
7953 TEST_TAR_FORMAT=oldgnu
7954 export TEST_TAR_FORMAT
7955 TAR_OPTIONS=\"-H oldgnu\"
7956 export TAR_OPTIONS
7957 rm -rf *
7958
7959 touch file
7960 ln -s file link 2> /dev/null || ln file link
7961 tar cf archive link
7962 rm link
7963 touch link
7964 tar xf archive
7965 )"
7966 echo extrac02.at:28 >"$at_check_line_file"
7967
7968 at_trace_this=
7969 if test -n "$at_traceon"; then
7970     echo 'Not enabling shell tracing (command contains an embedded newline)'
7971 fi
7972
7973 if test -n "$at_trace_this"; then
7974     ( $at_traceon;
7975 mkdir oldgnu
7976 (cd oldgnu
7977 TEST_TAR_FORMAT=oldgnu
7978 export TEST_TAR_FORMAT
7979 TAR_OPTIONS="-H oldgnu"
7980 export TAR_OPTIONS
7981 rm -rf *
7982
7983 touch file
7984 ln -s file link 2> /dev/null || ln file link
7985 tar cf archive link
7986 rm link
7987 touch link
7988 tar xf archive
7989 ) ) >"$at_stdout" 2>"$at_stder1"
7990     at_status=$?
7991     grep '^ *+' "$at_stder1" >&2
7992     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7993 else
7994     ( :;
7995 mkdir oldgnu
7996 (cd oldgnu
7997 TEST_TAR_FORMAT=oldgnu
7998 export TEST_TAR_FORMAT
7999 TAR_OPTIONS="-H oldgnu"
8000 export TAR_OPTIONS
8001 rm -rf *
8002
8003 touch file
8004 ln -s file link 2> /dev/null || ln file link
8005 tar cf archive link
8006 rm link
8007 touch link
8008 tar xf archive
8009 ) ) >"$at_stdout" 2>"$at_stderr"
8010     at_status=$?
8011 fi
8012
8013 at_failed=false
8014 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8015 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
8016 case $at_status in
8017    77) echo 77 > "$at_status_file"; exit 77;;
8018    0) ;;
8019    *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
8020       at_failed=:;;
8021 esac
8022 if $at_failed; then
8023
8024
8025   echo 1 > "$at_status_file"
8026   exit 1
8027 fi
8028
8029 $at_traceon
8030
8031               $at_traceoff
8032 echo "$at_srcdir/extrac02.at:28:
8033 mkdir ustar
8034 (cd ustar
8035 TEST_TAR_FORMAT=ustar
8036 export TEST_TAR_FORMAT
8037 TAR_OPTIONS=\"-H ustar\"
8038 export TAR_OPTIONS
8039 rm -rf *
8040
8041 touch file
8042 ln -s file link 2> /dev/null || ln file link
8043 tar cf archive link
8044 rm link
8045 touch link
8046 tar xf archive
8047 )"
8048 echo extrac02.at:28 >"$at_check_line_file"
8049
8050 at_trace_this=
8051 if test -n "$at_traceon"; then
8052     echo 'Not enabling shell tracing (command contains an embedded newline)'
8053 fi
8054
8055 if test -n "$at_trace_this"; then
8056     ( $at_traceon;
8057 mkdir ustar
8058 (cd ustar
8059 TEST_TAR_FORMAT=ustar
8060 export TEST_TAR_FORMAT
8061 TAR_OPTIONS="-H ustar"
8062 export TAR_OPTIONS
8063 rm -rf *
8064
8065 touch file
8066 ln -s file link 2> /dev/null || ln file link
8067 tar cf archive link
8068 rm link
8069 touch link
8070 tar xf archive
8071 ) ) >"$at_stdout" 2>"$at_stder1"
8072     at_status=$?
8073     grep '^ *+' "$at_stder1" >&2
8074     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8075 else
8076     ( :;
8077 mkdir ustar
8078 (cd ustar
8079 TEST_TAR_FORMAT=ustar
8080 export TEST_TAR_FORMAT
8081 TAR_OPTIONS="-H ustar"
8082 export TAR_OPTIONS
8083 rm -rf *
8084
8085 touch file
8086 ln -s file link 2> /dev/null || ln file link
8087 tar cf archive link
8088 rm link
8089 touch link
8090 tar xf archive
8091 ) ) >"$at_stdout" 2>"$at_stderr"
8092     at_status=$?
8093 fi
8094
8095 at_failed=false
8096 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8097 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
8098 case $at_status in
8099    77) echo 77 > "$at_status_file"; exit 77;;
8100    0) ;;
8101    *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
8102       at_failed=:;;
8103 esac
8104 if $at_failed; then
8105
8106
8107   echo 1 > "$at_status_file"
8108   exit 1
8109 fi
8110
8111 $at_traceon
8112
8113               $at_traceoff
8114 echo "$at_srcdir/extrac02.at:28:
8115 mkdir posix
8116 (cd posix
8117 TEST_TAR_FORMAT=posix
8118 export TEST_TAR_FORMAT
8119 TAR_OPTIONS=\"-H posix\"
8120 export TAR_OPTIONS
8121 rm -rf *
8122
8123 touch file
8124 ln -s file link 2> /dev/null || ln file link
8125 tar cf archive link
8126 rm link
8127 touch link
8128 tar xf archive
8129 )"
8130 echo extrac02.at:28 >"$at_check_line_file"
8131
8132 at_trace_this=
8133 if test -n "$at_traceon"; then
8134     echo 'Not enabling shell tracing (command contains an embedded newline)'
8135 fi
8136
8137 if test -n "$at_trace_this"; then
8138     ( $at_traceon;
8139 mkdir posix
8140 (cd posix
8141 TEST_TAR_FORMAT=posix
8142 export TEST_TAR_FORMAT
8143 TAR_OPTIONS="-H posix"
8144 export TAR_OPTIONS
8145 rm -rf *
8146
8147 touch file
8148 ln -s file link 2> /dev/null || ln file link
8149 tar cf archive link
8150 rm link
8151 touch link
8152 tar xf archive
8153 ) ) >"$at_stdout" 2>"$at_stder1"
8154     at_status=$?
8155     grep '^ *+' "$at_stder1" >&2
8156     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8157 else
8158     ( :;
8159 mkdir posix
8160 (cd posix
8161 TEST_TAR_FORMAT=posix
8162 export TEST_TAR_FORMAT
8163 TAR_OPTIONS="-H posix"
8164 export TAR_OPTIONS
8165 rm -rf *
8166
8167 touch file
8168 ln -s file link 2> /dev/null || ln file link
8169 tar cf archive link
8170 rm link
8171 touch link
8172 tar xf archive
8173 ) ) >"$at_stdout" 2>"$at_stderr"
8174     at_status=$?
8175 fi
8176
8177 at_failed=false
8178 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8179 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
8180 case $at_status in
8181    77) echo 77 > "$at_status_file"; exit 77;;
8182    0) ;;
8183    *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
8184       at_failed=:;;
8185 esac
8186 if $at_failed; then
8187
8188
8189   echo 1 > "$at_status_file"
8190   exit 1
8191 fi
8192
8193 $at_traceon
8194
8195               $at_traceoff
8196 echo "$at_srcdir/extrac02.at:28:
8197 mkdir gnu
8198 (cd gnu
8199 TEST_TAR_FORMAT=gnu
8200 export TEST_TAR_FORMAT
8201 TAR_OPTIONS=\"-H gnu\"
8202 export TAR_OPTIONS
8203 rm -rf *
8204
8205 touch file
8206 ln -s file link 2> /dev/null || ln file link
8207 tar cf archive link
8208 rm link
8209 touch link
8210 tar xf archive
8211 )"
8212 echo extrac02.at:28 >"$at_check_line_file"
8213
8214 at_trace_this=
8215 if test -n "$at_traceon"; then
8216     echo 'Not enabling shell tracing (command contains an embedded newline)'
8217 fi
8218
8219 if test -n "$at_trace_this"; then
8220     ( $at_traceon;
8221 mkdir gnu
8222 (cd gnu
8223 TEST_TAR_FORMAT=gnu
8224 export TEST_TAR_FORMAT
8225 TAR_OPTIONS="-H gnu"
8226 export TAR_OPTIONS
8227 rm -rf *
8228
8229 touch file
8230 ln -s file link 2> /dev/null || ln file link
8231 tar cf archive link
8232 rm link
8233 touch link
8234 tar xf archive
8235 ) ) >"$at_stdout" 2>"$at_stder1"
8236     at_status=$?
8237     grep '^ *+' "$at_stder1" >&2
8238     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8239 else
8240     ( :;
8241 mkdir gnu
8242 (cd gnu
8243 TEST_TAR_FORMAT=gnu
8244 export TEST_TAR_FORMAT
8245 TAR_OPTIONS="-H gnu"
8246 export TAR_OPTIONS
8247 rm -rf *
8248
8249 touch file
8250 ln -s file link 2> /dev/null || ln file link
8251 tar cf archive link
8252 rm link
8253 touch link
8254 tar xf archive
8255 ) ) >"$at_stdout" 2>"$at_stderr"
8256     at_status=$?
8257 fi
8258
8259 at_failed=false
8260 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8261 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
8262 case $at_status in
8263    77) echo 77 > "$at_status_file"; exit 77;;
8264    0) ;;
8265    *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
8266       at_failed=:;;
8267 esac
8268 if $at_failed; then
8269
8270
8271   echo 1 > "$at_status_file"
8272   exit 1
8273 fi
8274
8275 $at_traceon
8276
8277
8278
8279
8280       $at_traceoff
8281       $at_times_p && times >"$at_times_file"
8282     ) 5>&1 2>&1 | eval $at_tee_pipe
8283     at_status=`cat "$at_status_file"`
8284     ;;
8285
8286   20 ) # 20. extrac03.at:23: extraction loops
8287     at_setup_line='extrac03.at:23'
8288     at_desc="extraction loops"
8289     $at_quiet $ECHO_N " 20: extraction loops                               $ECHO_C"
8290     at_xfail=no
8291       test -f $XFAILFILE && at_xfail=yes
8292     echo "#                             -*- compilation -*-" >> "$at_group_log"
8293     (
8294       echo "20. extrac03.at:23: testing ..."
8295       $at_traceon
8296
8297
8298
8299
8300
8301   $at_traceoff
8302 echo "$at_srcdir/extrac03.at:26:
8303 mkdir v7
8304 (cd v7
8305 TEST_TAR_FORMAT=v7
8306 export TEST_TAR_FORMAT
8307 TAR_OPTIONS=\"-H v7\"
8308 export TAR_OPTIONS
8309 rm -rf *
8310
8311 mkdir directory
8312 tar -cPvf archive directory/../directory
8313 echo separator
8314 tar -xPvf archive)"
8315 echo extrac03.at:26 >"$at_check_line_file"
8316
8317 at_trace_this=
8318 if test -n "$at_traceon"; then
8319     echo 'Not enabling shell tracing (command contains an embedded newline)'
8320 fi
8321
8322 if test -n "$at_trace_this"; then
8323     ( $at_traceon;
8324 mkdir v7
8325 (cd v7
8326 TEST_TAR_FORMAT=v7
8327 export TEST_TAR_FORMAT
8328 TAR_OPTIONS="-H v7"
8329 export TAR_OPTIONS
8330 rm -rf *
8331
8332 mkdir directory
8333 tar -cPvf archive directory/../directory
8334 echo separator
8335 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1"
8336     at_status=$?
8337     grep '^ *+' "$at_stder1" >&2
8338     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8339 else
8340     ( :;
8341 mkdir v7
8342 (cd v7
8343 TEST_TAR_FORMAT=v7
8344 export TEST_TAR_FORMAT
8345 TAR_OPTIONS="-H v7"
8346 export TAR_OPTIONS
8347 rm -rf *
8348
8349 mkdir directory
8350 tar -cPvf archive directory/../directory
8351 echo separator
8352 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr"
8353     at_status=$?
8354 fi
8355
8356 at_failed=false
8357 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8358 echo >>"$at_stdout"; echo "directory/../directory/
8359 separator
8360 directory/../directory/
8361 " | $at_diff - "$at_stdout" || at_failed=:
8362 case $at_status in
8363    77) echo 77 > "$at_status_file"; exit 77;;
8364    0) ;;
8365    *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
8366       at_failed=:;;
8367 esac
8368 if $at_failed; then
8369
8370
8371   echo 1 > "$at_status_file"
8372   exit 1
8373 fi
8374
8375 $at_traceon
8376
8377               $at_traceoff
8378 echo "$at_srcdir/extrac03.at:26:
8379 mkdir oldgnu
8380 (cd oldgnu
8381 TEST_TAR_FORMAT=oldgnu
8382 export TEST_TAR_FORMAT
8383 TAR_OPTIONS=\"-H oldgnu\"
8384 export TAR_OPTIONS
8385 rm -rf *
8386
8387 mkdir directory
8388 tar -cPvf archive directory/../directory
8389 echo separator
8390 tar -xPvf archive)"
8391 echo extrac03.at:26 >"$at_check_line_file"
8392
8393 at_trace_this=
8394 if test -n "$at_traceon"; then
8395     echo 'Not enabling shell tracing (command contains an embedded newline)'
8396 fi
8397
8398 if test -n "$at_trace_this"; then
8399     ( $at_traceon;
8400 mkdir oldgnu
8401 (cd oldgnu
8402 TEST_TAR_FORMAT=oldgnu
8403 export TEST_TAR_FORMAT
8404 TAR_OPTIONS="-H oldgnu"
8405 export TAR_OPTIONS
8406 rm -rf *
8407
8408 mkdir directory
8409 tar -cPvf archive directory/../directory
8410 echo separator
8411 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1"
8412     at_status=$?
8413     grep '^ *+' "$at_stder1" >&2
8414     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8415 else
8416     ( :;
8417 mkdir oldgnu
8418 (cd oldgnu
8419 TEST_TAR_FORMAT=oldgnu
8420 export TEST_TAR_FORMAT
8421 TAR_OPTIONS="-H oldgnu"
8422 export TAR_OPTIONS
8423 rm -rf *
8424
8425 mkdir directory
8426 tar -cPvf archive directory/../directory
8427 echo separator
8428 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr"
8429     at_status=$?
8430 fi
8431
8432 at_failed=false
8433 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8434 echo >>"$at_stdout"; echo "directory/../directory/
8435 separator
8436 directory/../directory/
8437 " | $at_diff - "$at_stdout" || at_failed=:
8438 case $at_status in
8439    77) echo 77 > "$at_status_file"; exit 77;;
8440    0) ;;
8441    *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
8442       at_failed=:;;
8443 esac
8444 if $at_failed; then
8445
8446
8447   echo 1 > "$at_status_file"
8448   exit 1
8449 fi
8450
8451 $at_traceon
8452
8453               $at_traceoff
8454 echo "$at_srcdir/extrac03.at:26:
8455 mkdir ustar
8456 (cd ustar
8457 TEST_TAR_FORMAT=ustar
8458 export TEST_TAR_FORMAT
8459 TAR_OPTIONS=\"-H ustar\"
8460 export TAR_OPTIONS
8461 rm -rf *
8462
8463 mkdir directory
8464 tar -cPvf archive directory/../directory
8465 echo separator
8466 tar -xPvf archive)"
8467 echo extrac03.at:26 >"$at_check_line_file"
8468
8469 at_trace_this=
8470 if test -n "$at_traceon"; then
8471     echo 'Not enabling shell tracing (command contains an embedded newline)'
8472 fi
8473
8474 if test -n "$at_trace_this"; then
8475     ( $at_traceon;
8476 mkdir ustar
8477 (cd ustar
8478 TEST_TAR_FORMAT=ustar
8479 export TEST_TAR_FORMAT
8480 TAR_OPTIONS="-H ustar"
8481 export TAR_OPTIONS
8482 rm -rf *
8483
8484 mkdir directory
8485 tar -cPvf archive directory/../directory
8486 echo separator
8487 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1"
8488     at_status=$?
8489     grep '^ *+' "$at_stder1" >&2
8490     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8491 else
8492     ( :;
8493 mkdir ustar
8494 (cd ustar
8495 TEST_TAR_FORMAT=ustar
8496 export TEST_TAR_FORMAT
8497 TAR_OPTIONS="-H ustar"
8498 export TAR_OPTIONS
8499 rm -rf *
8500
8501 mkdir directory
8502 tar -cPvf archive directory/../directory
8503 echo separator
8504 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr"
8505     at_status=$?
8506 fi
8507
8508 at_failed=false
8509 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8510 echo >>"$at_stdout"; echo "directory/../directory/
8511 separator
8512 directory/../directory/
8513 " | $at_diff - "$at_stdout" || at_failed=:
8514 case $at_status in
8515    77) echo 77 > "$at_status_file"; exit 77;;
8516    0) ;;
8517    *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
8518       at_failed=:;;
8519 esac
8520 if $at_failed; then
8521
8522
8523   echo 1 > "$at_status_file"
8524   exit 1
8525 fi
8526
8527 $at_traceon
8528
8529               $at_traceoff
8530 echo "$at_srcdir/extrac03.at:26:
8531 mkdir posix
8532 (cd posix
8533 TEST_TAR_FORMAT=posix
8534 export TEST_TAR_FORMAT
8535 TAR_OPTIONS=\"-H posix\"
8536 export TAR_OPTIONS
8537 rm -rf *
8538
8539 mkdir directory
8540 tar -cPvf archive directory/../directory
8541 echo separator
8542 tar -xPvf archive)"
8543 echo extrac03.at:26 >"$at_check_line_file"
8544
8545 at_trace_this=
8546 if test -n "$at_traceon"; then
8547     echo 'Not enabling shell tracing (command contains an embedded newline)'
8548 fi
8549
8550 if test -n "$at_trace_this"; then
8551     ( $at_traceon;
8552 mkdir posix
8553 (cd posix
8554 TEST_TAR_FORMAT=posix
8555 export TEST_TAR_FORMAT
8556 TAR_OPTIONS="-H posix"
8557 export TAR_OPTIONS
8558 rm -rf *
8559
8560 mkdir directory
8561 tar -cPvf archive directory/../directory
8562 echo separator
8563 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1"
8564     at_status=$?
8565     grep '^ *+' "$at_stder1" >&2
8566     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8567 else
8568     ( :;
8569 mkdir posix
8570 (cd posix
8571 TEST_TAR_FORMAT=posix
8572 export TEST_TAR_FORMAT
8573 TAR_OPTIONS="-H posix"
8574 export TAR_OPTIONS
8575 rm -rf *
8576
8577 mkdir directory
8578 tar -cPvf archive directory/../directory
8579 echo separator
8580 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr"
8581     at_status=$?
8582 fi
8583
8584 at_failed=false
8585 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8586 echo >>"$at_stdout"; echo "directory/../directory/
8587 separator
8588 directory/../directory/
8589 " | $at_diff - "$at_stdout" || at_failed=:
8590 case $at_status in
8591    77) echo 77 > "$at_status_file"; exit 77;;
8592    0) ;;
8593    *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
8594       at_failed=:;;
8595 esac
8596 if $at_failed; then
8597
8598
8599   echo 1 > "$at_status_file"
8600   exit 1
8601 fi
8602
8603 $at_traceon
8604
8605               $at_traceoff
8606 echo "$at_srcdir/extrac03.at:26:
8607 mkdir gnu
8608 (cd gnu
8609 TEST_TAR_FORMAT=gnu
8610 export TEST_TAR_FORMAT
8611 TAR_OPTIONS=\"-H gnu\"
8612 export TAR_OPTIONS
8613 rm -rf *
8614
8615 mkdir directory
8616 tar -cPvf archive directory/../directory
8617 echo separator
8618 tar -xPvf archive)"
8619 echo extrac03.at:26 >"$at_check_line_file"
8620
8621 at_trace_this=
8622 if test -n "$at_traceon"; then
8623     echo 'Not enabling shell tracing (command contains an embedded newline)'
8624 fi
8625
8626 if test -n "$at_trace_this"; then
8627     ( $at_traceon;
8628 mkdir gnu
8629 (cd gnu
8630 TEST_TAR_FORMAT=gnu
8631 export TEST_TAR_FORMAT
8632 TAR_OPTIONS="-H gnu"
8633 export TAR_OPTIONS
8634 rm -rf *
8635
8636 mkdir directory
8637 tar -cPvf archive directory/../directory
8638 echo separator
8639 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1"
8640     at_status=$?
8641     grep '^ *+' "$at_stder1" >&2
8642     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8643 else
8644     ( :;
8645 mkdir gnu
8646 (cd gnu
8647 TEST_TAR_FORMAT=gnu
8648 export TEST_TAR_FORMAT
8649 TAR_OPTIONS="-H gnu"
8650 export TAR_OPTIONS
8651 rm -rf *
8652
8653 mkdir directory
8654 tar -cPvf archive directory/../directory
8655 echo separator
8656 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr"
8657     at_status=$?
8658 fi
8659
8660 at_failed=false
8661 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8662 echo >>"$at_stdout"; echo "directory/../directory/
8663 separator
8664 directory/../directory/
8665 " | $at_diff - "$at_stdout" || at_failed=:
8666 case $at_status in
8667    77) echo 77 > "$at_status_file"; exit 77;;
8668    0) ;;
8669    *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
8670       at_failed=:;;
8671 esac
8672 if $at_failed; then
8673
8674
8675   echo 1 > "$at_status_file"
8676   exit 1
8677 fi
8678
8679 $at_traceon
8680
8681
8682
8683
8684       $at_traceoff
8685       $at_times_p && times >"$at_times_file"
8686     ) 5>&1 2>&1 | eval $at_tee_pipe
8687     at_status=`cat "$at_status_file"`
8688     ;;
8689
8690   21 ) # 21. extrac04.at:23: extract + fnmatch
8691     at_setup_line='extrac04.at:23'
8692     at_desc="extract + fnmatch"
8693     $at_quiet $ECHO_N " 21: extract + fnmatch                              $ECHO_C"
8694     at_xfail=no
8695       test -f $XFAILFILE && at_xfail=yes
8696     echo "#                             -*- compilation -*-" >> "$at_group_log"
8697     (
8698       echo "21. extrac04.at:23: testing ..."
8699       $at_traceon
8700
8701
8702
8703
8704
8705   $at_traceoff
8706 echo "$at_srcdir/extrac04.at:26:
8707 mkdir v7
8708 (cd v7
8709 TEST_TAR_FORMAT=v7
8710 export TEST_TAR_FORMAT
8711 TAR_OPTIONS=\"-H v7\"
8712 export TAR_OPTIONS
8713 rm -rf *
8714
8715
8716 test -z "`sort < /dev/null 2>&1`" || exit 77
8717
8718 touch file1
8719 mkdir directory
8720 mkdir directory/subdirectory
8721 touch directory/file1
8722 touch directory/file2
8723 touch directory/subdirectory/file1
8724 touch directory/subdirectory/file2
8725 tar -cf archive ./file1 directory
8726 tar -tf archive \\
8727   --exclude='./*1' \\
8728   --exclude='d*/*1' \\
8729   --exclude='d*/s*/*2' | sort
8730 )"
8731 echo extrac04.at:26 >"$at_check_line_file"
8732
8733 at_trace_this=
8734 if test -n "$at_traceon"; then
8735     echo 'Not enabling shell tracing (command contains an embedded newline)'
8736 fi
8737
8738 if test -n "$at_trace_this"; then
8739     ( $at_traceon;
8740 mkdir v7
8741 (cd v7
8742 TEST_TAR_FORMAT=v7
8743 export TEST_TAR_FORMAT
8744 TAR_OPTIONS="-H v7"
8745 export TAR_OPTIONS
8746 rm -rf *
8747
8748
8749 test -z "`sort < /dev/null 2>&1`" || exit 77
8750
8751 touch file1
8752 mkdir directory
8753 mkdir directory/subdirectory
8754 touch directory/file1
8755 touch directory/file2
8756 touch directory/subdirectory/file1
8757 touch directory/subdirectory/file2
8758 tar -cf archive ./file1 directory
8759 tar -tf archive \
8760   --exclude='./*1' \
8761   --exclude='d*/*1' \
8762   --exclude='d*/s*/*2' | sort
8763 ) ) >"$at_stdout" 2>"$at_stder1"
8764     at_status=$?
8765     grep '^ *+' "$at_stder1" >&2
8766     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8767 else
8768     ( :;
8769 mkdir v7
8770 (cd v7
8771 TEST_TAR_FORMAT=v7
8772 export TEST_TAR_FORMAT
8773 TAR_OPTIONS="-H v7"
8774 export TAR_OPTIONS
8775 rm -rf *
8776
8777
8778 test -z "`sort < /dev/null 2>&1`" || exit 77
8779
8780 touch file1
8781 mkdir directory
8782 mkdir directory/subdirectory
8783 touch directory/file1
8784 touch directory/file2
8785 touch directory/subdirectory/file1
8786 touch directory/subdirectory/file2
8787 tar -cf archive ./file1 directory
8788 tar -tf archive \
8789   --exclude='./*1' \
8790   --exclude='d*/*1' \
8791   --exclude='d*/s*/*2' | sort
8792 ) ) >"$at_stdout" 2>"$at_stderr"
8793     at_status=$?
8794 fi
8795
8796 at_failed=false
8797 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8798 echo >>"$at_stdout"; echo "directory/
8799 directory/file2
8800 directory/subdirectory/
8801 " | $at_diff - "$at_stdout" || at_failed=:
8802 case $at_status in
8803    77) echo 77 > "$at_status_file"; exit 77;;
8804    0) ;;
8805    *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
8806       at_failed=:;;
8807 esac
8808 if $at_failed; then
8809
8810
8811   echo 1 > "$at_status_file"
8812   exit 1
8813 fi
8814
8815 $at_traceon
8816
8817               $at_traceoff
8818 echo "$at_srcdir/extrac04.at:26:
8819 mkdir oldgnu
8820 (cd oldgnu
8821 TEST_TAR_FORMAT=oldgnu
8822 export TEST_TAR_FORMAT
8823 TAR_OPTIONS=\"-H oldgnu\"
8824 export TAR_OPTIONS
8825 rm -rf *
8826
8827
8828 test -z "`sort < /dev/null 2>&1`" || exit 77
8829
8830 touch file1
8831 mkdir directory
8832 mkdir directory/subdirectory
8833 touch directory/file1
8834 touch directory/file2
8835 touch directory/subdirectory/file1
8836 touch directory/subdirectory/file2
8837 tar -cf archive ./file1 directory
8838 tar -tf archive \\
8839   --exclude='./*1' \\
8840   --exclude='d*/*1' \\
8841   --exclude='d*/s*/*2' | sort
8842 )"
8843 echo extrac04.at:26 >"$at_check_line_file"
8844
8845 at_trace_this=
8846 if test -n "$at_traceon"; then
8847     echo 'Not enabling shell tracing (command contains an embedded newline)'
8848 fi
8849
8850 if test -n "$at_trace_this"; then
8851     ( $at_traceon;
8852 mkdir oldgnu
8853 (cd oldgnu
8854 TEST_TAR_FORMAT=oldgnu
8855 export TEST_TAR_FORMAT
8856 TAR_OPTIONS="-H oldgnu"
8857 export TAR_OPTIONS
8858 rm -rf *
8859
8860
8861 test -z "`sort < /dev/null 2>&1`" || exit 77
8862
8863 touch file1
8864 mkdir directory
8865 mkdir directory/subdirectory
8866 touch directory/file1
8867 touch directory/file2
8868 touch directory/subdirectory/file1
8869 touch directory/subdirectory/file2
8870 tar -cf archive ./file1 directory
8871 tar -tf archive \
8872   --exclude='./*1' \
8873   --exclude='d*/*1' \
8874   --exclude='d*/s*/*2' | sort
8875 ) ) >"$at_stdout" 2>"$at_stder1"
8876     at_status=$?
8877     grep '^ *+' "$at_stder1" >&2
8878     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8879 else
8880     ( :;
8881 mkdir oldgnu
8882 (cd oldgnu
8883 TEST_TAR_FORMAT=oldgnu
8884 export TEST_TAR_FORMAT
8885 TAR_OPTIONS="-H oldgnu"
8886 export TAR_OPTIONS
8887 rm -rf *
8888
8889
8890 test -z "`sort < /dev/null 2>&1`" || exit 77
8891
8892 touch file1
8893 mkdir directory
8894 mkdir directory/subdirectory
8895 touch directory/file1
8896 touch directory/file2
8897 touch directory/subdirectory/file1
8898 touch directory/subdirectory/file2
8899 tar -cf archive ./file1 directory
8900 tar -tf archive \
8901   --exclude='./*1' \
8902   --exclude='d*/*1' \
8903   --exclude='d*/s*/*2' | sort
8904 ) ) >"$at_stdout" 2>"$at_stderr"
8905     at_status=$?
8906 fi
8907
8908 at_failed=false
8909 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8910 echo >>"$at_stdout"; echo "directory/
8911 directory/file2
8912 directory/subdirectory/
8913 " | $at_diff - "$at_stdout" || at_failed=:
8914 case $at_status in
8915    77) echo 77 > "$at_status_file"; exit 77;;
8916    0) ;;
8917    *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
8918       at_failed=:;;
8919 esac
8920 if $at_failed; then
8921
8922
8923   echo 1 > "$at_status_file"
8924   exit 1
8925 fi
8926
8927 $at_traceon
8928
8929               $at_traceoff
8930 echo "$at_srcdir/extrac04.at:26:
8931 mkdir ustar
8932 (cd ustar
8933 TEST_TAR_FORMAT=ustar
8934 export TEST_TAR_FORMAT
8935 TAR_OPTIONS=\"-H ustar\"
8936 export TAR_OPTIONS
8937 rm -rf *
8938
8939
8940 test -z "`sort < /dev/null 2>&1`" || exit 77
8941
8942 touch file1
8943 mkdir directory
8944 mkdir directory/subdirectory
8945 touch directory/file1
8946 touch directory/file2
8947 touch directory/subdirectory/file1
8948 touch directory/subdirectory/file2
8949 tar -cf archive ./file1 directory
8950 tar -tf archive \\
8951   --exclude='./*1' \\
8952   --exclude='d*/*1' \\
8953   --exclude='d*/s*/*2' | sort
8954 )"
8955 echo extrac04.at:26 >"$at_check_line_file"
8956
8957 at_trace_this=
8958 if test -n "$at_traceon"; then
8959     echo 'Not enabling shell tracing (command contains an embedded newline)'
8960 fi
8961
8962 if test -n "$at_trace_this"; then
8963     ( $at_traceon;
8964 mkdir ustar
8965 (cd ustar
8966 TEST_TAR_FORMAT=ustar
8967 export TEST_TAR_FORMAT
8968 TAR_OPTIONS="-H ustar"
8969 export TAR_OPTIONS
8970 rm -rf *
8971
8972
8973 test -z "`sort < /dev/null 2>&1`" || exit 77
8974
8975 touch file1
8976 mkdir directory
8977 mkdir directory/subdirectory
8978 touch directory/file1
8979 touch directory/file2
8980 touch directory/subdirectory/file1
8981 touch directory/subdirectory/file2
8982 tar -cf archive ./file1 directory
8983 tar -tf archive \
8984   --exclude='./*1' \
8985   --exclude='d*/*1' \
8986   --exclude='d*/s*/*2' | sort
8987 ) ) >"$at_stdout" 2>"$at_stder1"
8988     at_status=$?
8989     grep '^ *+' "$at_stder1" >&2
8990     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8991 else
8992     ( :;
8993 mkdir ustar
8994 (cd ustar
8995 TEST_TAR_FORMAT=ustar
8996 export TEST_TAR_FORMAT
8997 TAR_OPTIONS="-H ustar"
8998 export TAR_OPTIONS
8999 rm -rf *
9000
9001
9002 test -z "`sort < /dev/null 2>&1`" || exit 77
9003
9004 touch file1
9005 mkdir directory
9006 mkdir directory/subdirectory
9007 touch directory/file1
9008 touch directory/file2
9009 touch directory/subdirectory/file1
9010 touch directory/subdirectory/file2
9011 tar -cf archive ./file1 directory
9012 tar -tf archive \
9013   --exclude='./*1' \
9014   --exclude='d*/*1' \
9015   --exclude='d*/s*/*2' | sort
9016 ) ) >"$at_stdout" 2>"$at_stderr"
9017     at_status=$?
9018 fi
9019
9020 at_failed=false
9021 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9022 echo >>"$at_stdout"; echo "directory/
9023 directory/file2
9024 directory/subdirectory/
9025 " | $at_diff - "$at_stdout" || at_failed=:
9026 case $at_status in
9027    77) echo 77 > "$at_status_file"; exit 77;;
9028    0) ;;
9029    *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
9030       at_failed=:;;
9031 esac
9032 if $at_failed; then
9033
9034
9035   echo 1 > "$at_status_file"
9036   exit 1
9037 fi
9038
9039 $at_traceon
9040
9041               $at_traceoff
9042 echo "$at_srcdir/extrac04.at:26:
9043 mkdir posix
9044 (cd posix
9045 TEST_TAR_FORMAT=posix
9046 export TEST_TAR_FORMAT
9047 TAR_OPTIONS=\"-H posix\"
9048 export TAR_OPTIONS
9049 rm -rf *
9050
9051
9052 test -z "`sort < /dev/null 2>&1`" || exit 77
9053
9054 touch file1
9055 mkdir directory
9056 mkdir directory/subdirectory
9057 touch directory/file1
9058 touch directory/file2
9059 touch directory/subdirectory/file1
9060 touch directory/subdirectory/file2
9061 tar -cf archive ./file1 directory
9062 tar -tf archive \\
9063   --exclude='./*1' \\
9064   --exclude='d*/*1' \\
9065   --exclude='d*/s*/*2' | sort
9066 )"
9067 echo extrac04.at:26 >"$at_check_line_file"
9068
9069 at_trace_this=
9070 if test -n "$at_traceon"; then
9071     echo 'Not enabling shell tracing (command contains an embedded newline)'
9072 fi
9073
9074 if test -n "$at_trace_this"; then
9075     ( $at_traceon;
9076 mkdir posix
9077 (cd posix
9078 TEST_TAR_FORMAT=posix
9079 export TEST_TAR_FORMAT
9080 TAR_OPTIONS="-H posix"
9081 export TAR_OPTIONS
9082 rm -rf *
9083
9084
9085 test -z "`sort < /dev/null 2>&1`" || exit 77
9086
9087 touch file1
9088 mkdir directory
9089 mkdir directory/subdirectory
9090 touch directory/file1
9091 touch directory/file2
9092 touch directory/subdirectory/file1
9093 touch directory/subdirectory/file2
9094 tar -cf archive ./file1 directory
9095 tar -tf archive \
9096   --exclude='./*1' \
9097   --exclude='d*/*1' \
9098   --exclude='d*/s*/*2' | sort
9099 ) ) >"$at_stdout" 2>"$at_stder1"
9100     at_status=$?
9101     grep '^ *+' "$at_stder1" >&2
9102     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9103 else
9104     ( :;
9105 mkdir posix
9106 (cd posix
9107 TEST_TAR_FORMAT=posix
9108 export TEST_TAR_FORMAT
9109 TAR_OPTIONS="-H posix"
9110 export TAR_OPTIONS
9111 rm -rf *
9112
9113
9114 test -z "`sort < /dev/null 2>&1`" || exit 77
9115
9116 touch file1
9117 mkdir directory
9118 mkdir directory/subdirectory
9119 touch directory/file1
9120 touch directory/file2
9121 touch directory/subdirectory/file1
9122 touch directory/subdirectory/file2
9123 tar -cf archive ./file1 directory
9124 tar -tf archive \
9125   --exclude='./*1' \
9126   --exclude='d*/*1' \
9127   --exclude='d*/s*/*2' | sort
9128 ) ) >"$at_stdout" 2>"$at_stderr"
9129     at_status=$?
9130 fi
9131
9132 at_failed=false
9133 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9134 echo >>"$at_stdout"; echo "directory/
9135 directory/file2
9136 directory/subdirectory/
9137 " | $at_diff - "$at_stdout" || at_failed=:
9138 case $at_status in
9139    77) echo 77 > "$at_status_file"; exit 77;;
9140    0) ;;
9141    *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
9142       at_failed=:;;
9143 esac
9144 if $at_failed; then
9145
9146
9147   echo 1 > "$at_status_file"
9148   exit 1
9149 fi
9150
9151 $at_traceon
9152
9153               $at_traceoff
9154 echo "$at_srcdir/extrac04.at:26:
9155 mkdir gnu
9156 (cd gnu
9157 TEST_TAR_FORMAT=gnu
9158 export TEST_TAR_FORMAT
9159 TAR_OPTIONS=\"-H gnu\"
9160 export TAR_OPTIONS
9161 rm -rf *
9162
9163
9164 test -z "`sort < /dev/null 2>&1`" || exit 77
9165
9166 touch file1
9167 mkdir directory
9168 mkdir directory/subdirectory
9169 touch directory/file1
9170 touch directory/file2
9171 touch directory/subdirectory/file1
9172 touch directory/subdirectory/file2
9173 tar -cf archive ./file1 directory
9174 tar -tf archive \\
9175   --exclude='./*1' \\
9176   --exclude='d*/*1' \\
9177   --exclude='d*/s*/*2' | sort
9178 )"
9179 echo extrac04.at:26 >"$at_check_line_file"
9180
9181 at_trace_this=
9182 if test -n "$at_traceon"; then
9183     echo 'Not enabling shell tracing (command contains an embedded newline)'
9184 fi
9185
9186 if test -n "$at_trace_this"; then
9187     ( $at_traceon;
9188 mkdir gnu
9189 (cd gnu
9190 TEST_TAR_FORMAT=gnu
9191 export TEST_TAR_FORMAT
9192 TAR_OPTIONS="-H gnu"
9193 export TAR_OPTIONS
9194 rm -rf *
9195
9196
9197 test -z "`sort < /dev/null 2>&1`" || exit 77
9198
9199 touch file1
9200 mkdir directory
9201 mkdir directory/subdirectory
9202 touch directory/file1
9203 touch directory/file2
9204 touch directory/subdirectory/file1
9205 touch directory/subdirectory/file2
9206 tar -cf archive ./file1 directory
9207 tar -tf archive \
9208   --exclude='./*1' \
9209   --exclude='d*/*1' \
9210   --exclude='d*/s*/*2' | sort
9211 ) ) >"$at_stdout" 2>"$at_stder1"
9212     at_status=$?
9213     grep '^ *+' "$at_stder1" >&2
9214     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9215 else
9216     ( :;
9217 mkdir gnu
9218 (cd gnu
9219 TEST_TAR_FORMAT=gnu
9220 export TEST_TAR_FORMAT
9221 TAR_OPTIONS="-H gnu"
9222 export TAR_OPTIONS
9223 rm -rf *
9224
9225
9226 test -z "`sort < /dev/null 2>&1`" || exit 77
9227
9228 touch file1
9229 mkdir directory
9230 mkdir directory/subdirectory
9231 touch directory/file1
9232 touch directory/file2
9233 touch directory/subdirectory/file1
9234 touch directory/subdirectory/file2
9235 tar -cf archive ./file1 directory
9236 tar -tf archive \
9237   --exclude='./*1' \
9238   --exclude='d*/*1' \
9239   --exclude='d*/s*/*2' | sort
9240 ) ) >"$at_stdout" 2>"$at_stderr"
9241     at_status=$?
9242 fi
9243
9244 at_failed=false
9245 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9246 echo >>"$at_stdout"; echo "directory/
9247 directory/file2
9248 directory/subdirectory/
9249 " | $at_diff - "$at_stdout" || at_failed=:
9250 case $at_status in
9251    77) echo 77 > "$at_status_file"; exit 77;;
9252    0) ;;
9253    *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
9254       at_failed=:;;
9255 esac
9256 if $at_failed; then
9257
9258
9259   echo 1 > "$at_status_file"
9260   exit 1
9261 fi
9262
9263 $at_traceon
9264
9265
9266
9267
9268       $at_traceoff
9269       $at_times_p && times >"$at_times_file"
9270     ) 5>&1 2>&1 | eval $at_tee_pipe
9271     at_status=`cat "$at_status_file"`
9272     ;;
9273
9274   22 ) # 22. extrac05.at:30: extracting selected members from pax
9275     at_setup_line='extrac05.at:30'
9276     at_desc="extracting selected members from pax"
9277     $at_quiet $ECHO_N " 22: extracting selected members from pax           $ECHO_C"
9278     at_xfail=no
9279       test -f $XFAILFILE && at_xfail=yes
9280     echo "#                             -*- compilation -*-" >> "$at_group_log"
9281     (
9282       echo "22. extrac05.at:30: testing ..."
9283       $at_traceon
9284
9285
9286
9287 cat >list <<'_ATEOF'
9288 jeden
9289 cztery
9290 _ATEOF
9291
9292
9293
9294
9295   $at_traceoff
9296 echo "$at_srcdir/extrac05.at:38:
9297 mkdir posix
9298 (cd posix
9299 TEST_TAR_FORMAT=posix
9300 export TEST_TAR_FORMAT
9301 TAR_OPTIONS=\"-H posix\"
9302 export TAR_OPTIONS
9303 rm -rf *
9304
9305 genfile --length 118 --file jeden
9306 genfile --length 223 --file dwa
9307 genfile --length 517 --file trzy
9308 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
9309 genfile --length 110 --file cztery
9310
9311 tar cf archive jeden dwa trzy cztery || exit 1
9312
9313 mkdir dir
9314 cd dir
9315
9316 tar xvfT ../archive ../../list || exit 1
9317
9318 cd ..
9319 )"
9320 echo extrac05.at:38 >"$at_check_line_file"
9321
9322 at_trace_this=
9323 if test -n "$at_traceon"; then
9324     echo 'Not enabling shell tracing (command contains an embedded newline)'
9325 fi
9326
9327 if test -n "$at_trace_this"; then
9328     ( $at_traceon;
9329 mkdir posix
9330 (cd posix
9331 TEST_TAR_FORMAT=posix
9332 export TEST_TAR_FORMAT
9333 TAR_OPTIONS="-H posix"
9334 export TAR_OPTIONS
9335 rm -rf *
9336
9337 genfile --length 118 --file jeden
9338 genfile --length 223 --file dwa
9339 genfile --length 517 --file trzy
9340 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
9341 genfile --length 110 --file cztery
9342
9343 tar cf archive jeden dwa trzy cztery || exit 1
9344
9345 mkdir dir
9346 cd dir
9347
9348 tar xvfT ../archive ../../list || exit 1
9349
9350 cd ..
9351 ) ) >"$at_stdout" 2>"$at_stder1"
9352     at_status=$?
9353     grep '^ *+' "$at_stder1" >&2
9354     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9355 else
9356     ( :;
9357 mkdir posix
9358 (cd posix
9359 TEST_TAR_FORMAT=posix
9360 export TEST_TAR_FORMAT
9361 TAR_OPTIONS="-H posix"
9362 export TAR_OPTIONS
9363 rm -rf *
9364
9365 genfile --length 118 --file jeden
9366 genfile --length 223 --file dwa
9367 genfile --length 517 --file trzy
9368 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
9369 genfile --length 110 --file cztery
9370
9371 tar cf archive jeden dwa trzy cztery || exit 1
9372
9373 mkdir dir
9374 cd dir
9375
9376 tar xvfT ../archive ../../list || exit 1
9377
9378 cd ..
9379 ) ) >"$at_stdout" 2>"$at_stderr"
9380     at_status=$?
9381 fi
9382
9383 at_failed=false
9384 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9385 echo >>"$at_stdout"; echo "jeden
9386 cztery
9387 " | $at_diff - "$at_stdout" || at_failed=:
9388 case $at_status in
9389    77) echo 77 > "$at_status_file"; exit 77;;
9390    0) ;;
9391    *) echo "$at_srcdir/extrac05.at:38: exit code was $at_status, expected 0"
9392       at_failed=:;;
9393 esac
9394 if $at_failed; then
9395
9396
9397   echo 1 > "$at_status_file"
9398   exit 1
9399 fi
9400
9401 $at_traceon
9402
9403
9404
9405
9406       $at_traceoff
9407       $at_times_p && times >"$at_times_file"
9408     ) 5>&1 2>&1 | eval $at_tee_pipe
9409     at_status=`cat "$at_status_file"`
9410     ;;
9411
9412   23 ) # 23. extrac06.at:33: mode of extracted directories
9413     at_setup_line='extrac06.at:33'
9414     at_desc="mode of extracted directories"
9415     $at_quiet $ECHO_N " 23: mode of extracted directories                  $ECHO_C"
9416     at_xfail=no
9417       test -f $XFAILFILE && at_xfail=yes
9418     echo "#                             -*- compilation -*-" >> "$at_group_log"
9419     (
9420       echo "23. extrac06.at:33: testing ..."
9421       $at_traceon
9422
9423
9424
9425
9426
9427   $at_traceoff
9428 echo "$at_srcdir/extrac06.at:36:
9429 mkdir v7
9430 (cd v7
9431 TEST_TAR_FORMAT=v7
9432 export TEST_TAR_FORMAT
9433 TAR_OPTIONS=\"-H v7\"
9434 export TAR_OPTIONS
9435 rm -rf *
9436
9437
9438 # Force umask
9439 umask 022
9440
9441 # Make sure user's umask is honored, even if we are superuser
9442 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
9443
9444 # Create a directory
9445 mkdir directory
9446 chmod 777 directory
9447 genfile --stat=mode:777 directory
9448
9449 # Archive it
9450 tar cf arc directory
9451
9452 # Change its permissions ...
9453 chmod 755 directory
9454 genfile --stat=mode:777 directory
9455
9456 # ... and attempt to restore it twice
9457 tar xf arc directory
9458 genfile --stat=mode:777 directory
9459
9460 tar xf arc directory
9461 genfile --stat=mode:777 directory
9462
9463 # After both restores, the directory mode should be 755
9464 )"
9465 echo extrac06.at:36 >"$at_check_line_file"
9466
9467 at_trace_this=
9468 if test -n "$at_traceon"; then
9469     echo 'Not enabling shell tracing (command contains an embedded newline)'
9470 fi
9471
9472 if test -n "$at_trace_this"; then
9473     ( $at_traceon;
9474 mkdir v7
9475 (cd v7
9476 TEST_TAR_FORMAT=v7
9477 export TEST_TAR_FORMAT
9478 TAR_OPTIONS="-H v7"
9479 export TAR_OPTIONS
9480 rm -rf *
9481
9482
9483 # Force umask
9484 umask 022
9485
9486 # Make sure user's umask is honored, even if we are superuser
9487 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9488
9489 # Create a directory
9490 mkdir directory
9491 chmod 777 directory
9492 genfile --stat=mode:777 directory
9493
9494 # Archive it
9495 tar cf arc directory
9496
9497 # Change its permissions ...
9498 chmod 755 directory
9499 genfile --stat=mode:777 directory
9500
9501 # ... and attempt to restore it twice
9502 tar xf arc directory
9503 genfile --stat=mode:777 directory
9504
9505 tar xf arc directory
9506 genfile --stat=mode:777 directory
9507
9508 # After both restores, the directory mode should be 755
9509 ) ) >"$at_stdout" 2>"$at_stder1"
9510     at_status=$?
9511     grep '^ *+' "$at_stder1" >&2
9512     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9513 else
9514     ( :;
9515 mkdir v7
9516 (cd v7
9517 TEST_TAR_FORMAT=v7
9518 export TEST_TAR_FORMAT
9519 TAR_OPTIONS="-H v7"
9520 export TAR_OPTIONS
9521 rm -rf *
9522
9523
9524 # Force umask
9525 umask 022
9526
9527 # Make sure user's umask is honored, even if we are superuser
9528 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9529
9530 # Create a directory
9531 mkdir directory
9532 chmod 777 directory
9533 genfile --stat=mode:777 directory
9534
9535 # Archive it
9536 tar cf arc directory
9537
9538 # Change its permissions ...
9539 chmod 755 directory
9540 genfile --stat=mode:777 directory
9541
9542 # ... and attempt to restore it twice
9543 tar xf arc directory
9544 genfile --stat=mode:777 directory
9545
9546 tar xf arc directory
9547 genfile --stat=mode:777 directory
9548
9549 # After both restores, the directory mode should be 755
9550 ) ) >"$at_stdout" 2>"$at_stderr"
9551     at_status=$?
9552 fi
9553
9554 at_failed=false
9555 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9556 echo >>"$at_stdout"; echo "777
9557 755
9558 755
9559 755
9560 " | $at_diff - "$at_stdout" || at_failed=:
9561 case $at_status in
9562    77) echo 77 > "$at_status_file"; exit 77;;
9563    0) ;;
9564    *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
9565       at_failed=:;;
9566 esac
9567 if $at_failed; then
9568
9569
9570   echo 1 > "$at_status_file"
9571   exit 1
9572 fi
9573
9574 $at_traceon
9575
9576               $at_traceoff
9577 echo "$at_srcdir/extrac06.at:36:
9578 mkdir oldgnu
9579 (cd oldgnu
9580 TEST_TAR_FORMAT=oldgnu
9581 export TEST_TAR_FORMAT
9582 TAR_OPTIONS=\"-H oldgnu\"
9583 export TAR_OPTIONS
9584 rm -rf *
9585
9586
9587 # Force umask
9588 umask 022
9589
9590 # Make sure user's umask is honored, even if we are superuser
9591 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
9592
9593 # Create a directory
9594 mkdir directory
9595 chmod 777 directory
9596 genfile --stat=mode:777 directory
9597
9598 # Archive it
9599 tar cf arc directory
9600
9601 # Change its permissions ...
9602 chmod 755 directory
9603 genfile --stat=mode:777 directory
9604
9605 # ... and attempt to restore it twice
9606 tar xf arc directory
9607 genfile --stat=mode:777 directory
9608
9609 tar xf arc directory
9610 genfile --stat=mode:777 directory
9611
9612 # After both restores, the directory mode should be 755
9613 )"
9614 echo extrac06.at:36 >"$at_check_line_file"
9615
9616 at_trace_this=
9617 if test -n "$at_traceon"; then
9618     echo 'Not enabling shell tracing (command contains an embedded newline)'
9619 fi
9620
9621 if test -n "$at_trace_this"; then
9622     ( $at_traceon;
9623 mkdir oldgnu
9624 (cd oldgnu
9625 TEST_TAR_FORMAT=oldgnu
9626 export TEST_TAR_FORMAT
9627 TAR_OPTIONS="-H oldgnu"
9628 export TAR_OPTIONS
9629 rm -rf *
9630
9631
9632 # Force umask
9633 umask 022
9634
9635 # Make sure user's umask is honored, even if we are superuser
9636 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9637
9638 # Create a directory
9639 mkdir directory
9640 chmod 777 directory
9641 genfile --stat=mode:777 directory
9642
9643 # Archive it
9644 tar cf arc directory
9645
9646 # Change its permissions ...
9647 chmod 755 directory
9648 genfile --stat=mode:777 directory
9649
9650 # ... and attempt to restore it twice
9651 tar xf arc directory
9652 genfile --stat=mode:777 directory
9653
9654 tar xf arc directory
9655 genfile --stat=mode:777 directory
9656
9657 # After both restores, the directory mode should be 755
9658 ) ) >"$at_stdout" 2>"$at_stder1"
9659     at_status=$?
9660     grep '^ *+' "$at_stder1" >&2
9661     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9662 else
9663     ( :;
9664 mkdir oldgnu
9665 (cd oldgnu
9666 TEST_TAR_FORMAT=oldgnu
9667 export TEST_TAR_FORMAT
9668 TAR_OPTIONS="-H oldgnu"
9669 export TAR_OPTIONS
9670 rm -rf *
9671
9672
9673 # Force umask
9674 umask 022
9675
9676 # Make sure user's umask is honored, even if we are superuser
9677 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9678
9679 # Create a directory
9680 mkdir directory
9681 chmod 777 directory
9682 genfile --stat=mode:777 directory
9683
9684 # Archive it
9685 tar cf arc directory
9686
9687 # Change its permissions ...
9688 chmod 755 directory
9689 genfile --stat=mode:777 directory
9690
9691 # ... and attempt to restore it twice
9692 tar xf arc directory
9693 genfile --stat=mode:777 directory
9694
9695 tar xf arc directory
9696 genfile --stat=mode:777 directory
9697
9698 # After both restores, the directory mode should be 755
9699 ) ) >"$at_stdout" 2>"$at_stderr"
9700     at_status=$?
9701 fi
9702
9703 at_failed=false
9704 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9705 echo >>"$at_stdout"; echo "777
9706 755
9707 755
9708 755
9709 " | $at_diff - "$at_stdout" || at_failed=:
9710 case $at_status in
9711    77) echo 77 > "$at_status_file"; exit 77;;
9712    0) ;;
9713    *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
9714       at_failed=:;;
9715 esac
9716 if $at_failed; then
9717
9718
9719   echo 1 > "$at_status_file"
9720   exit 1
9721 fi
9722
9723 $at_traceon
9724
9725               $at_traceoff
9726 echo "$at_srcdir/extrac06.at:36:
9727 mkdir ustar
9728 (cd ustar
9729 TEST_TAR_FORMAT=ustar
9730 export TEST_TAR_FORMAT
9731 TAR_OPTIONS=\"-H ustar\"
9732 export TAR_OPTIONS
9733 rm -rf *
9734
9735
9736 # Force umask
9737 umask 022
9738
9739 # Make sure user's umask is honored, even if we are superuser
9740 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
9741
9742 # Create a directory
9743 mkdir directory
9744 chmod 777 directory
9745 genfile --stat=mode:777 directory
9746
9747 # Archive it
9748 tar cf arc directory
9749
9750 # Change its permissions ...
9751 chmod 755 directory
9752 genfile --stat=mode:777 directory
9753
9754 # ... and attempt to restore it twice
9755 tar xf arc directory
9756 genfile --stat=mode:777 directory
9757
9758 tar xf arc directory
9759 genfile --stat=mode:777 directory
9760
9761 # After both restores, the directory mode should be 755
9762 )"
9763 echo extrac06.at:36 >"$at_check_line_file"
9764
9765 at_trace_this=
9766 if test -n "$at_traceon"; then
9767     echo 'Not enabling shell tracing (command contains an embedded newline)'
9768 fi
9769
9770 if test -n "$at_trace_this"; then
9771     ( $at_traceon;
9772 mkdir ustar
9773 (cd ustar
9774 TEST_TAR_FORMAT=ustar
9775 export TEST_TAR_FORMAT
9776 TAR_OPTIONS="-H ustar"
9777 export TAR_OPTIONS
9778 rm -rf *
9779
9780
9781 # Force umask
9782 umask 022
9783
9784 # Make sure user's umask is honored, even if we are superuser
9785 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9786
9787 # Create a directory
9788 mkdir directory
9789 chmod 777 directory
9790 genfile --stat=mode:777 directory
9791
9792 # Archive it
9793 tar cf arc directory
9794
9795 # Change its permissions ...
9796 chmod 755 directory
9797 genfile --stat=mode:777 directory
9798
9799 # ... and attempt to restore it twice
9800 tar xf arc directory
9801 genfile --stat=mode:777 directory
9802
9803 tar xf arc directory
9804 genfile --stat=mode:777 directory
9805
9806 # After both restores, the directory mode should be 755
9807 ) ) >"$at_stdout" 2>"$at_stder1"
9808     at_status=$?
9809     grep '^ *+' "$at_stder1" >&2
9810     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9811 else
9812     ( :;
9813 mkdir ustar
9814 (cd ustar
9815 TEST_TAR_FORMAT=ustar
9816 export TEST_TAR_FORMAT
9817 TAR_OPTIONS="-H ustar"
9818 export TAR_OPTIONS
9819 rm -rf *
9820
9821
9822 # Force umask
9823 umask 022
9824
9825 # Make sure user's umask is honored, even if we are superuser
9826 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9827
9828 # Create a directory
9829 mkdir directory
9830 chmod 777 directory
9831 genfile --stat=mode:777 directory
9832
9833 # Archive it
9834 tar cf arc directory
9835
9836 # Change its permissions ...
9837 chmod 755 directory
9838 genfile --stat=mode:777 directory
9839
9840 # ... and attempt to restore it twice
9841 tar xf arc directory
9842 genfile --stat=mode:777 directory
9843
9844 tar xf arc directory
9845 genfile --stat=mode:777 directory
9846
9847 # After both restores, the directory mode should be 755
9848 ) ) >"$at_stdout" 2>"$at_stderr"
9849     at_status=$?
9850 fi
9851
9852 at_failed=false
9853 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9854 echo >>"$at_stdout"; echo "777
9855 755
9856 755
9857 755
9858 " | $at_diff - "$at_stdout" || at_failed=:
9859 case $at_status in
9860    77) echo 77 > "$at_status_file"; exit 77;;
9861    0) ;;
9862    *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
9863       at_failed=:;;
9864 esac
9865 if $at_failed; then
9866
9867
9868   echo 1 > "$at_status_file"
9869   exit 1
9870 fi
9871
9872 $at_traceon
9873
9874               $at_traceoff
9875 echo "$at_srcdir/extrac06.at:36:
9876 mkdir posix
9877 (cd posix
9878 TEST_TAR_FORMAT=posix
9879 export TEST_TAR_FORMAT
9880 TAR_OPTIONS=\"-H posix\"
9881 export TAR_OPTIONS
9882 rm -rf *
9883
9884
9885 # Force umask
9886 umask 022
9887
9888 # Make sure user's umask is honored, even if we are superuser
9889 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
9890
9891 # Create a directory
9892 mkdir directory
9893 chmod 777 directory
9894 genfile --stat=mode:777 directory
9895
9896 # Archive it
9897 tar cf arc directory
9898
9899 # Change its permissions ...
9900 chmod 755 directory
9901 genfile --stat=mode:777 directory
9902
9903 # ... and attempt to restore it twice
9904 tar xf arc directory
9905 genfile --stat=mode:777 directory
9906
9907 tar xf arc directory
9908 genfile --stat=mode:777 directory
9909
9910 # After both restores, the directory mode should be 755
9911 )"
9912 echo extrac06.at:36 >"$at_check_line_file"
9913
9914 at_trace_this=
9915 if test -n "$at_traceon"; then
9916     echo 'Not enabling shell tracing (command contains an embedded newline)'
9917 fi
9918
9919 if test -n "$at_trace_this"; then
9920     ( $at_traceon;
9921 mkdir posix
9922 (cd posix
9923 TEST_TAR_FORMAT=posix
9924 export TEST_TAR_FORMAT
9925 TAR_OPTIONS="-H posix"
9926 export TAR_OPTIONS
9927 rm -rf *
9928
9929
9930 # Force umask
9931 umask 022
9932
9933 # Make sure user's umask is honored, even if we are superuser
9934 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9935
9936 # Create a directory
9937 mkdir directory
9938 chmod 777 directory
9939 genfile --stat=mode:777 directory
9940
9941 # Archive it
9942 tar cf arc directory
9943
9944 # Change its permissions ...
9945 chmod 755 directory
9946 genfile --stat=mode:777 directory
9947
9948 # ... and attempt to restore it twice
9949 tar xf arc directory
9950 genfile --stat=mode:777 directory
9951
9952 tar xf arc directory
9953 genfile --stat=mode:777 directory
9954
9955 # After both restores, the directory mode should be 755
9956 ) ) >"$at_stdout" 2>"$at_stder1"
9957     at_status=$?
9958     grep '^ *+' "$at_stder1" >&2
9959     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9960 else
9961     ( :;
9962 mkdir posix
9963 (cd posix
9964 TEST_TAR_FORMAT=posix
9965 export TEST_TAR_FORMAT
9966 TAR_OPTIONS="-H posix"
9967 export TAR_OPTIONS
9968 rm -rf *
9969
9970
9971 # Force umask
9972 umask 022
9973
9974 # Make sure user's umask is honored, even if we are superuser
9975 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9976
9977 # Create a directory
9978 mkdir directory
9979 chmod 777 directory
9980 genfile --stat=mode:777 directory
9981
9982 # Archive it
9983 tar cf arc directory
9984
9985 # Change its permissions ...
9986 chmod 755 directory
9987 genfile --stat=mode:777 directory
9988
9989 # ... and attempt to restore it twice
9990 tar xf arc directory
9991 genfile --stat=mode:777 directory
9992
9993 tar xf arc directory
9994 genfile --stat=mode:777 directory
9995
9996 # After both restores, the directory mode should be 755
9997 ) ) >"$at_stdout" 2>"$at_stderr"
9998     at_status=$?
9999 fi
10000
10001 at_failed=false
10002 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10003 echo >>"$at_stdout"; echo "777
10004 755
10005 755
10006 755
10007 " | $at_diff - "$at_stdout" || at_failed=:
10008 case $at_status in
10009    77) echo 77 > "$at_status_file"; exit 77;;
10010    0) ;;
10011    *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
10012       at_failed=:;;
10013 esac
10014 if $at_failed; then
10015
10016
10017   echo 1 > "$at_status_file"
10018   exit 1
10019 fi
10020
10021 $at_traceon
10022
10023               $at_traceoff
10024 echo "$at_srcdir/extrac06.at:36:
10025 mkdir gnu
10026 (cd gnu
10027 TEST_TAR_FORMAT=gnu
10028 export TEST_TAR_FORMAT
10029 TAR_OPTIONS=\"-H gnu\"
10030 export TAR_OPTIONS
10031 rm -rf *
10032
10033
10034 # Force umask
10035 umask 022
10036
10037 # Make sure user's umask is honored, even if we are superuser
10038 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
10039
10040 # Create a directory
10041 mkdir directory
10042 chmod 777 directory
10043 genfile --stat=mode:777 directory
10044
10045 # Archive it
10046 tar cf arc directory
10047
10048 # Change its permissions ...
10049 chmod 755 directory
10050 genfile --stat=mode:777 directory
10051
10052 # ... and attempt to restore it twice
10053 tar xf arc directory
10054 genfile --stat=mode:777 directory
10055
10056 tar xf arc directory
10057 genfile --stat=mode:777 directory
10058
10059 # After both restores, the directory mode should be 755
10060 )"
10061 echo extrac06.at:36 >"$at_check_line_file"
10062
10063 at_trace_this=
10064 if test -n "$at_traceon"; then
10065     echo 'Not enabling shell tracing (command contains an embedded newline)'
10066 fi
10067
10068 if test -n "$at_trace_this"; then
10069     ( $at_traceon;
10070 mkdir gnu
10071 (cd gnu
10072 TEST_TAR_FORMAT=gnu
10073 export TEST_TAR_FORMAT
10074 TAR_OPTIONS="-H gnu"
10075 export TAR_OPTIONS
10076 rm -rf *
10077
10078
10079 # Force umask
10080 umask 022
10081
10082 # Make sure user's umask is honored, even if we are superuser
10083 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
10084
10085 # Create a directory
10086 mkdir directory
10087 chmod 777 directory
10088 genfile --stat=mode:777 directory
10089
10090 # Archive it
10091 tar cf arc directory
10092
10093 # Change its permissions ...
10094 chmod 755 directory
10095 genfile --stat=mode:777 directory
10096
10097 # ... and attempt to restore it twice
10098 tar xf arc directory
10099 genfile --stat=mode:777 directory
10100
10101 tar xf arc directory
10102 genfile --stat=mode:777 directory
10103
10104 # After both restores, the directory mode should be 755
10105 ) ) >"$at_stdout" 2>"$at_stder1"
10106     at_status=$?
10107     grep '^ *+' "$at_stder1" >&2
10108     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10109 else
10110     ( :;
10111 mkdir gnu
10112 (cd gnu
10113 TEST_TAR_FORMAT=gnu
10114 export TEST_TAR_FORMAT
10115 TAR_OPTIONS="-H gnu"
10116 export TAR_OPTIONS
10117 rm -rf *
10118
10119
10120 # Force umask
10121 umask 022
10122
10123 # Make sure user's umask is honored, even if we are superuser
10124 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
10125
10126 # Create a directory
10127 mkdir directory
10128 chmod 777 directory
10129 genfile --stat=mode:777 directory
10130
10131 # Archive it
10132 tar cf arc directory
10133
10134 # Change its permissions ...
10135 chmod 755 directory
10136 genfile --stat=mode:777 directory
10137
10138 # ... and attempt to restore it twice
10139 tar xf arc directory
10140 genfile --stat=mode:777 directory
10141
10142 tar xf arc directory
10143 genfile --stat=mode:777 directory
10144
10145 # After both restores, the directory mode should be 755
10146 ) ) >"$at_stdout" 2>"$at_stderr"
10147     at_status=$?
10148 fi
10149
10150 at_failed=false
10151 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10152 echo >>"$at_stdout"; echo "777
10153 755
10154 755
10155 755
10156 " | $at_diff - "$at_stdout" || at_failed=:
10157 case $at_status in
10158    77) echo 77 > "$at_status_file"; exit 77;;
10159    0) ;;
10160    *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
10161       at_failed=:;;
10162 esac
10163 if $at_failed; then
10164
10165
10166   echo 1 > "$at_status_file"
10167   exit 1
10168 fi
10169
10170 $at_traceon
10171
10172
10173
10174
10175       $at_traceoff
10176       $at_times_p && times >"$at_times_file"
10177     ) 5>&1 2>&1 | eval $at_tee_pipe
10178     at_status=`cat "$at_status_file"`
10179     ;;
10180
10181   24 ) # 24. extrac07.at:27: extracting symlinks to a read-only dir
10182     at_setup_line='extrac07.at:27'
10183     at_desc="extracting symlinks to a read-only dir"
10184     $at_quiet $ECHO_N " 24: extracting symlinks to a read-only dir         $ECHO_C"
10185     at_xfail=no
10186       test -f $XFAILFILE && at_xfail=yes
10187     echo "#                             -*- compilation -*-" >> "$at_group_log"
10188     (
10189       echo "24. extrac07.at:27: testing ..."
10190       $at_traceon
10191
10192
10193
10194
10195
10196   $at_traceoff
10197 echo "$at_srcdir/extrac07.at:30:
10198 mkdir v7
10199 (cd v7
10200 TEST_TAR_FORMAT=v7
10201 export TEST_TAR_FORMAT
10202 TAR_OPTIONS=\"-H v7\"
10203 export TAR_OPTIONS
10204 rm -rf *
10205
10206 echo Prepare the directory
10207 mkdir dir
10208 genfile -f foo
10209 cd dir
10210 ln -s ../foo .
10211 cd ..
10212 chmod -w dir
10213
10214 echo Create the archive
10215 tar cf archive dir || exit 1
10216
10217 chmod +w dir
10218
10219 echo Extract
10220 mkdir out
10221 tar -C out -xvf archive
10222 )"
10223 echo extrac07.at:30 >"$at_check_line_file"
10224
10225 at_trace_this=
10226 if test -n "$at_traceon"; then
10227     echo 'Not enabling shell tracing (command contains an embedded newline)'
10228 fi
10229
10230 if test -n "$at_trace_this"; then
10231     ( $at_traceon;
10232 mkdir v7
10233 (cd v7
10234 TEST_TAR_FORMAT=v7
10235 export TEST_TAR_FORMAT
10236 TAR_OPTIONS="-H v7"
10237 export TAR_OPTIONS
10238 rm -rf *
10239
10240 echo Prepare the directory
10241 mkdir dir
10242 genfile -f foo
10243 cd dir
10244 ln -s ../foo .
10245 cd ..
10246 chmod -w dir
10247
10248 echo Create the archive
10249 tar cf archive dir || exit 1
10250
10251 chmod +w dir
10252
10253 echo Extract
10254 mkdir out
10255 tar -C out -xvf archive
10256 ) ) >"$at_stdout" 2>"$at_stder1"
10257     at_status=$?
10258     grep '^ *+' "$at_stder1" >&2
10259     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10260 else
10261     ( :;
10262 mkdir v7
10263 (cd v7
10264 TEST_TAR_FORMAT=v7
10265 export TEST_TAR_FORMAT
10266 TAR_OPTIONS="-H v7"
10267 export TAR_OPTIONS
10268 rm -rf *
10269
10270 echo Prepare the directory
10271 mkdir dir
10272 genfile -f foo
10273 cd dir
10274 ln -s ../foo .
10275 cd ..
10276 chmod -w dir
10277
10278 echo Create the archive
10279 tar cf archive dir || exit 1
10280
10281 chmod +w dir
10282
10283 echo Extract
10284 mkdir out
10285 tar -C out -xvf archive
10286 ) ) >"$at_stdout" 2>"$at_stderr"
10287     at_status=$?
10288 fi
10289
10290 at_failed=false
10291 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10292 echo >>"$at_stdout"; echo "Prepare the directory
10293 Create the archive
10294 Extract
10295 dir/
10296 dir/foo
10297 " | $at_diff - "$at_stdout" || at_failed=:
10298 case $at_status in
10299    77) echo 77 > "$at_status_file"; exit 77;;
10300    0) ;;
10301    *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
10302       at_failed=:;;
10303 esac
10304 if $at_failed; then
10305
10306
10307   echo 1 > "$at_status_file"
10308   exit 1
10309 else
10310   ustar
10311 fi
10312
10313 $at_traceon
10314
10315               $at_traceoff
10316 echo "$at_srcdir/extrac07.at:30:
10317 mkdir oldgnu
10318 (cd oldgnu
10319 TEST_TAR_FORMAT=oldgnu
10320 export TEST_TAR_FORMAT
10321 TAR_OPTIONS=\"-H oldgnu\"
10322 export TAR_OPTIONS
10323 rm -rf *
10324
10325 echo Prepare the directory
10326 mkdir dir
10327 genfile -f foo
10328 cd dir
10329 ln -s ../foo .
10330 cd ..
10331 chmod -w dir
10332
10333 echo Create the archive
10334 tar cf archive dir || exit 1
10335
10336 chmod +w dir
10337
10338 echo Extract
10339 mkdir out
10340 tar -C out -xvf archive
10341 )"
10342 echo extrac07.at:30 >"$at_check_line_file"
10343
10344 at_trace_this=
10345 if test -n "$at_traceon"; then
10346     echo 'Not enabling shell tracing (command contains an embedded newline)'
10347 fi
10348
10349 if test -n "$at_trace_this"; then
10350     ( $at_traceon;
10351 mkdir oldgnu
10352 (cd oldgnu
10353 TEST_TAR_FORMAT=oldgnu
10354 export TEST_TAR_FORMAT
10355 TAR_OPTIONS="-H oldgnu"
10356 export TAR_OPTIONS
10357 rm -rf *
10358
10359 echo Prepare the directory
10360 mkdir dir
10361 genfile -f foo
10362 cd dir
10363 ln -s ../foo .
10364 cd ..
10365 chmod -w dir
10366
10367 echo Create the archive
10368 tar cf archive dir || exit 1
10369
10370 chmod +w dir
10371
10372 echo Extract
10373 mkdir out
10374 tar -C out -xvf archive
10375 ) ) >"$at_stdout" 2>"$at_stder1"
10376     at_status=$?
10377     grep '^ *+' "$at_stder1" >&2
10378     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10379 else
10380     ( :;
10381 mkdir oldgnu
10382 (cd oldgnu
10383 TEST_TAR_FORMAT=oldgnu
10384 export TEST_TAR_FORMAT
10385 TAR_OPTIONS="-H oldgnu"
10386 export TAR_OPTIONS
10387 rm -rf *
10388
10389 echo Prepare the directory
10390 mkdir dir
10391 genfile -f foo
10392 cd dir
10393 ln -s ../foo .
10394 cd ..
10395 chmod -w dir
10396
10397 echo Create the archive
10398 tar cf archive dir || exit 1
10399
10400 chmod +w dir
10401
10402 echo Extract
10403 mkdir out
10404 tar -C out -xvf archive
10405 ) ) >"$at_stdout" 2>"$at_stderr"
10406     at_status=$?
10407 fi
10408
10409 at_failed=false
10410 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10411 echo >>"$at_stdout"; echo "Prepare the directory
10412 Create the archive
10413 Extract
10414 dir/
10415 dir/foo
10416 " | $at_diff - "$at_stdout" || at_failed=:
10417 case $at_status in
10418    77) echo 77 > "$at_status_file"; exit 77;;
10419    0) ;;
10420    *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
10421       at_failed=:;;
10422 esac
10423 if $at_failed; then
10424
10425
10426   echo 1 > "$at_status_file"
10427   exit 1
10428 else
10429   ustar
10430 fi
10431
10432 $at_traceon
10433
10434               $at_traceoff
10435 echo "$at_srcdir/extrac07.at:30:
10436 mkdir ustar
10437 (cd ustar
10438 TEST_TAR_FORMAT=ustar
10439 export TEST_TAR_FORMAT
10440 TAR_OPTIONS=\"-H ustar\"
10441 export TAR_OPTIONS
10442 rm -rf *
10443
10444 echo Prepare the directory
10445 mkdir dir
10446 genfile -f foo
10447 cd dir
10448 ln -s ../foo .
10449 cd ..
10450 chmod -w dir
10451
10452 echo Create the archive
10453 tar cf archive dir || exit 1
10454
10455 chmod +w dir
10456
10457 echo Extract
10458 mkdir out
10459 tar -C out -xvf archive
10460 )"
10461 echo extrac07.at:30 >"$at_check_line_file"
10462
10463 at_trace_this=
10464 if test -n "$at_traceon"; then
10465     echo 'Not enabling shell tracing (command contains an embedded newline)'
10466 fi
10467
10468 if test -n "$at_trace_this"; then
10469     ( $at_traceon;
10470 mkdir ustar
10471 (cd ustar
10472 TEST_TAR_FORMAT=ustar
10473 export TEST_TAR_FORMAT
10474 TAR_OPTIONS="-H ustar"
10475 export TAR_OPTIONS
10476 rm -rf *
10477
10478 echo Prepare the directory
10479 mkdir dir
10480 genfile -f foo
10481 cd dir
10482 ln -s ../foo .
10483 cd ..
10484 chmod -w dir
10485
10486 echo Create the archive
10487 tar cf archive dir || exit 1
10488
10489 chmod +w dir
10490
10491 echo Extract
10492 mkdir out
10493 tar -C out -xvf archive
10494 ) ) >"$at_stdout" 2>"$at_stder1"
10495     at_status=$?
10496     grep '^ *+' "$at_stder1" >&2
10497     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10498 else
10499     ( :;
10500 mkdir ustar
10501 (cd ustar
10502 TEST_TAR_FORMAT=ustar
10503 export TEST_TAR_FORMAT
10504 TAR_OPTIONS="-H ustar"
10505 export TAR_OPTIONS
10506 rm -rf *
10507
10508 echo Prepare the directory
10509 mkdir dir
10510 genfile -f foo
10511 cd dir
10512 ln -s ../foo .
10513 cd ..
10514 chmod -w dir
10515
10516 echo Create the archive
10517 tar cf archive dir || exit 1
10518
10519 chmod +w dir
10520
10521 echo Extract
10522 mkdir out
10523 tar -C out -xvf archive
10524 ) ) >"$at_stdout" 2>"$at_stderr"
10525     at_status=$?
10526 fi
10527
10528 at_failed=false
10529 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10530 echo >>"$at_stdout"; echo "Prepare the directory
10531 Create the archive
10532 Extract
10533 dir/
10534 dir/foo
10535 " | $at_diff - "$at_stdout" || at_failed=:
10536 case $at_status in
10537    77) echo 77 > "$at_status_file"; exit 77;;
10538    0) ;;
10539    *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
10540       at_failed=:;;
10541 esac
10542 if $at_failed; then
10543
10544
10545   echo 1 > "$at_status_file"
10546   exit 1
10547 else
10548   ustar
10549 fi
10550
10551 $at_traceon
10552
10553               $at_traceoff
10554 echo "$at_srcdir/extrac07.at:30:
10555 mkdir posix
10556 (cd posix
10557 TEST_TAR_FORMAT=posix
10558 export TEST_TAR_FORMAT
10559 TAR_OPTIONS=\"-H posix\"
10560 export TAR_OPTIONS
10561 rm -rf *
10562
10563 echo Prepare the directory
10564 mkdir dir
10565 genfile -f foo
10566 cd dir
10567 ln -s ../foo .
10568 cd ..
10569 chmod -w dir
10570
10571 echo Create the archive
10572 tar cf archive dir || exit 1
10573
10574 chmod +w dir
10575
10576 echo Extract
10577 mkdir out
10578 tar -C out -xvf archive
10579 )"
10580 echo extrac07.at:30 >"$at_check_line_file"
10581
10582 at_trace_this=
10583 if test -n "$at_traceon"; then
10584     echo 'Not enabling shell tracing (command contains an embedded newline)'
10585 fi
10586
10587 if test -n "$at_trace_this"; then
10588     ( $at_traceon;
10589 mkdir posix
10590 (cd posix
10591 TEST_TAR_FORMAT=posix
10592 export TEST_TAR_FORMAT
10593 TAR_OPTIONS="-H posix"
10594 export TAR_OPTIONS
10595 rm -rf *
10596
10597 echo Prepare the directory
10598 mkdir dir
10599 genfile -f foo
10600 cd dir
10601 ln -s ../foo .
10602 cd ..
10603 chmod -w dir
10604
10605 echo Create the archive
10606 tar cf archive dir || exit 1
10607
10608 chmod +w dir
10609
10610 echo Extract
10611 mkdir out
10612 tar -C out -xvf archive
10613 ) ) >"$at_stdout" 2>"$at_stder1"
10614     at_status=$?
10615     grep '^ *+' "$at_stder1" >&2
10616     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10617 else
10618     ( :;
10619 mkdir posix
10620 (cd posix
10621 TEST_TAR_FORMAT=posix
10622 export TEST_TAR_FORMAT
10623 TAR_OPTIONS="-H posix"
10624 export TAR_OPTIONS
10625 rm -rf *
10626
10627 echo Prepare the directory
10628 mkdir dir
10629 genfile -f foo
10630 cd dir
10631 ln -s ../foo .
10632 cd ..
10633 chmod -w dir
10634
10635 echo Create the archive
10636 tar cf archive dir || exit 1
10637
10638 chmod +w dir
10639
10640 echo Extract
10641 mkdir out
10642 tar -C out -xvf archive
10643 ) ) >"$at_stdout" 2>"$at_stderr"
10644     at_status=$?
10645 fi
10646
10647 at_failed=false
10648 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10649 echo >>"$at_stdout"; echo "Prepare the directory
10650 Create the archive
10651 Extract
10652 dir/
10653 dir/foo
10654 " | $at_diff - "$at_stdout" || at_failed=:
10655 case $at_status in
10656    77) echo 77 > "$at_status_file"; exit 77;;
10657    0) ;;
10658    *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
10659       at_failed=:;;
10660 esac
10661 if $at_failed; then
10662
10663
10664   echo 1 > "$at_status_file"
10665   exit 1
10666 else
10667   ustar
10668 fi
10669
10670 $at_traceon
10671
10672               $at_traceoff
10673 echo "$at_srcdir/extrac07.at:30:
10674 mkdir gnu
10675 (cd gnu
10676 TEST_TAR_FORMAT=gnu
10677 export TEST_TAR_FORMAT
10678 TAR_OPTIONS=\"-H gnu\"
10679 export TAR_OPTIONS
10680 rm -rf *
10681
10682 echo Prepare the directory
10683 mkdir dir
10684 genfile -f foo
10685 cd dir
10686 ln -s ../foo .
10687 cd ..
10688 chmod -w dir
10689
10690 echo Create the archive
10691 tar cf archive dir || exit 1
10692
10693 chmod +w dir
10694
10695 echo Extract
10696 mkdir out
10697 tar -C out -xvf archive
10698 )"
10699 echo extrac07.at:30 >"$at_check_line_file"
10700
10701 at_trace_this=
10702 if test -n "$at_traceon"; then
10703     echo 'Not enabling shell tracing (command contains an embedded newline)'
10704 fi
10705
10706 if test -n "$at_trace_this"; then
10707     ( $at_traceon;
10708 mkdir gnu
10709 (cd gnu
10710 TEST_TAR_FORMAT=gnu
10711 export TEST_TAR_FORMAT
10712 TAR_OPTIONS="-H gnu"
10713 export TAR_OPTIONS
10714 rm -rf *
10715
10716 echo Prepare the directory
10717 mkdir dir
10718 genfile -f foo
10719 cd dir
10720 ln -s ../foo .
10721 cd ..
10722 chmod -w dir
10723
10724 echo Create the archive
10725 tar cf archive dir || exit 1
10726
10727 chmod +w dir
10728
10729 echo Extract
10730 mkdir out
10731 tar -C out -xvf archive
10732 ) ) >"$at_stdout" 2>"$at_stder1"
10733     at_status=$?
10734     grep '^ *+' "$at_stder1" >&2
10735     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10736 else
10737     ( :;
10738 mkdir gnu
10739 (cd gnu
10740 TEST_TAR_FORMAT=gnu
10741 export TEST_TAR_FORMAT
10742 TAR_OPTIONS="-H gnu"
10743 export TAR_OPTIONS
10744 rm -rf *
10745
10746 echo Prepare the directory
10747 mkdir dir
10748 genfile -f foo
10749 cd dir
10750 ln -s ../foo .
10751 cd ..
10752 chmod -w dir
10753
10754 echo Create the archive
10755 tar cf archive dir || exit 1
10756
10757 chmod +w dir
10758
10759 echo Extract
10760 mkdir out
10761 tar -C out -xvf archive
10762 ) ) >"$at_stdout" 2>"$at_stderr"
10763     at_status=$?
10764 fi
10765
10766 at_failed=false
10767 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10768 echo >>"$at_stdout"; echo "Prepare the directory
10769 Create the archive
10770 Extract
10771 dir/
10772 dir/foo
10773 " | $at_diff - "$at_stdout" || at_failed=:
10774 case $at_status in
10775    77) echo 77 > "$at_status_file"; exit 77;;
10776    0) ;;
10777    *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
10778       at_failed=:;;
10779 esac
10780 if $at_failed; then
10781
10782
10783   echo 1 > "$at_status_file"
10784   exit 1
10785 else
10786   ustar
10787 fi
10788
10789 $at_traceon
10790
10791
10792  # Testing one format is enough
10793
10794       $at_traceoff
10795       $at_times_p && times >"$at_times_file"
10796     ) 5>&1 2>&1 | eval $at_tee_pipe
10797     at_status=`cat "$at_status_file"`
10798     ;;
10799
10800   25 ) # 25. gzip.at:23: gzip
10801     at_setup_line='gzip.at:23'
10802     at_desc="gzip"
10803     $at_quiet $ECHO_N " 25: gzip                                           $ECHO_C"
10804     at_xfail=no
10805     echo "#                             -*- compilation -*-" >> "$at_group_log"
10806     (
10807       echo "25. gzip.at:23: testing ..."
10808       $at_traceon
10809
10810
10811
10812 unset TAR_OPTIONS
10813
10814 $at_traceoff
10815 echo "$at_srcdir/gzip.at:28:
10816
10817 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
10818
10819 tar xfvz /dev/null
10820 test \$? = 2 || exit 1
10821 "
10822 echo gzip.at:28 >"$at_check_line_file"
10823
10824 at_trace_this=
10825 if test -n "$at_traceon"; then
10826     echo 'Not enabling shell tracing (command contains an embedded newline)'
10827 fi
10828
10829 if test -n "$at_trace_this"; then
10830     ( $at_traceon;
10831
10832 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
10833
10834 tar xfvz /dev/null
10835 test $? = 2 || exit 1
10836  ) >"$at_stdout" 2>"$at_stder1"
10837     at_status=$?
10838     grep '^ *+' "$at_stder1" >&2
10839     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10840 else
10841     ( :;
10842
10843 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
10844
10845 tar xfvz /dev/null
10846 test $? = 2 || exit 1
10847  ) >"$at_stdout" 2>"$at_stderr"
10848     at_status=$?
10849 fi
10850
10851 at_failed=false
10852 echo >>"$at_stderr"; echo "
10853 gzip: stdin: unexpected end of file
10854 tar: Child returned status 1
10855 tar: Exiting with failure status due to previous errors
10856 " | $at_diff - "$at_stderr" || at_failed=:
10857 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
10858 case $at_status in
10859    77) echo 77 > "$at_status_file"; exit 77;;
10860    0) ;;
10861    *) echo "$at_srcdir/gzip.at:28: exit code was $at_status, expected 0"
10862       at_failed=:;;
10863 esac
10864 if $at_failed; then
10865
10866
10867   echo 1 > "$at_status_file"
10868   exit 1
10869 fi
10870
10871 $at_traceon
10872
10873
10874       $at_traceoff
10875       $at_times_p && times >"$at_times_file"
10876     ) 5>&1 2>&1 | eval $at_tee_pipe
10877     at_status=`cat "$at_status_file"`
10878     ;;
10879
10880   26 ) # 26. incremental.at:23: incremental
10881     at_setup_line='incremental.at:23'
10882     at_desc="incremental"
10883     $at_quiet $ECHO_N " 26: incremental                                    $ECHO_C"
10884     at_xfail=no
10885       test -f $XFAILFILE && at_xfail=yes
10886     echo "#                             -*- compilation -*-" >> "$at_group_log"
10887     (
10888       echo "26. incremental.at:23: testing ..."
10889       $at_traceon
10890
10891
10892
10893
10894
10895   $at_traceoff
10896 echo "$at_srcdir/incremental.at:26:
10897 mkdir gnu
10898 (cd gnu
10899 TEST_TAR_FORMAT=gnu
10900 export TEST_TAR_FORMAT
10901 TAR_OPTIONS=\"-H gnu\"
10902 export TAR_OPTIONS
10903 rm -rf *
10904
10905 mkdir structure
10906 echo x >structure/file
10907
10908 # On Nextstep (and perhaps other 4.3BSD systems),
10909 # a newly created file's ctime isn't updated
10910 # until the next sync or stat operation on the file.
10911 ls -l structure/file >/dev/null
10912
10913 # If the time of an initial backup and the creation time of a file contained
10914 # in that backup are the same, the file will be backed up again when an
10915 # incremental backup is done, because the incremental backup backs up
10916 # files created \`on or after' the initial backup time.  Without the sleep
10917 # command, behaviour of tar becomes variable, depending whether the system
10918 # clock ticked over to the next second between creating the file and
10919 # backing it up.
10920 sleep 1
10921
10922 tar cf archive --listed=list structure
10923 tar cfv archive --listed=list structure
10924 echo separator
10925 # ReiserFS often offsets the timestamps of newly created files
10926 # 1 second to the past.  Try to compensate for it, until a better
10927 # solution is found.
10928 sleep 2
10929 echo y >structure/file
10930 tar cfv archive --listed=list structure
10931 )"
10932 echo incremental.at:26 >"$at_check_line_file"
10933
10934 at_trace_this=
10935 if test -n "$at_traceon"; then
10936     echo 'Not enabling shell tracing (command contains an embedded newline)'
10937 fi
10938
10939 if test -n "$at_trace_this"; then
10940     ( $at_traceon;
10941 mkdir gnu
10942 (cd gnu
10943 TEST_TAR_FORMAT=gnu
10944 export TEST_TAR_FORMAT
10945 TAR_OPTIONS="-H gnu"
10946 export TAR_OPTIONS
10947 rm -rf *
10948
10949 mkdir structure
10950 echo x >structure/file
10951
10952 # On Nextstep (and perhaps other 4.3BSD systems),
10953 # a newly created file's ctime isn't updated
10954 # until the next sync or stat operation on the file.
10955 ls -l structure/file >/dev/null
10956
10957 # If the time of an initial backup and the creation time of a file contained
10958 # in that backup are the same, the file will be backed up again when an
10959 # incremental backup is done, because the incremental backup backs up
10960 # files created `on or after' the initial backup time.  Without the sleep
10961 # command, behaviour of tar becomes variable, depending whether the system
10962 # clock ticked over to the next second between creating the file and
10963 # backing it up.
10964 sleep 1
10965
10966 tar cf archive --listed=list structure
10967 tar cfv archive --listed=list structure
10968 echo separator
10969 # ReiserFS often offsets the timestamps of newly created files
10970 # 1 second to the past.  Try to compensate for it, until a better
10971 # solution is found.
10972 sleep 2
10973 echo y >structure/file
10974 tar cfv archive --listed=list structure
10975 ) ) >"$at_stdout" 2>"$at_stder1"
10976     at_status=$?
10977     grep '^ *+' "$at_stder1" >&2
10978     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10979 else
10980     ( :;
10981 mkdir gnu
10982 (cd gnu
10983 TEST_TAR_FORMAT=gnu
10984 export TEST_TAR_FORMAT
10985 TAR_OPTIONS="-H gnu"
10986 export TAR_OPTIONS
10987 rm -rf *
10988
10989 mkdir structure
10990 echo x >structure/file
10991
10992 # On Nextstep (and perhaps other 4.3BSD systems),
10993 # a newly created file's ctime isn't updated
10994 # until the next sync or stat operation on the file.
10995 ls -l structure/file >/dev/null
10996
10997 # If the time of an initial backup and the creation time of a file contained
10998 # in that backup are the same, the file will be backed up again when an
10999 # incremental backup is done, because the incremental backup backs up
11000 # files created `on or after' the initial backup time.  Without the sleep
11001 # command, behaviour of tar becomes variable, depending whether the system
11002 # clock ticked over to the next second between creating the file and
11003 # backing it up.
11004 sleep 1
11005
11006 tar cf archive --listed=list structure
11007 tar cfv archive --listed=list structure
11008 echo separator
11009 # ReiserFS often offsets the timestamps of newly created files
11010 # 1 second to the past.  Try to compensate for it, until a better
11011 # solution is found.
11012 sleep 2
11013 echo y >structure/file
11014 tar cfv archive --listed=list structure
11015 ) ) >"$at_stdout" 2>"$at_stderr"
11016     at_status=$?
11017 fi
11018
11019 at_failed=false
11020 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11021 echo >>"$at_stdout"; echo "structure/
11022 separator
11023 structure/
11024 structure/file
11025 " | $at_diff - "$at_stdout" || at_failed=:
11026 case $at_status in
11027    77) echo 77 > "$at_status_file"; exit 77;;
11028    0) ;;
11029    *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0"
11030       at_failed=:;;
11031 esac
11032 if $at_failed; then
11033
11034
11035   echo 1 > "$at_status_file"
11036   exit 1
11037 fi
11038
11039 $at_traceon
11040
11041               $at_traceoff
11042 echo "$at_srcdir/incremental.at:26:
11043 mkdir oldgnu
11044 (cd oldgnu
11045 TEST_TAR_FORMAT=oldgnu
11046 export TEST_TAR_FORMAT
11047 TAR_OPTIONS=\"-H oldgnu\"
11048 export TAR_OPTIONS
11049 rm -rf *
11050
11051 mkdir structure
11052 echo x >structure/file
11053
11054 # On Nextstep (and perhaps other 4.3BSD systems),
11055 # a newly created file's ctime isn't updated
11056 # until the next sync or stat operation on the file.
11057 ls -l structure/file >/dev/null
11058
11059 # If the time of an initial backup and the creation time of a file contained
11060 # in that backup are the same, the file will be backed up again when an
11061 # incremental backup is done, because the incremental backup backs up
11062 # files created \`on or after' the initial backup time.  Without the sleep
11063 # command, behaviour of tar becomes variable, depending whether the system
11064 # clock ticked over to the next second between creating the file and
11065 # backing it up.
11066 sleep 1
11067
11068 tar cf archive --listed=list structure
11069 tar cfv archive --listed=list structure
11070 echo separator
11071 # ReiserFS often offsets the timestamps of newly created files
11072 # 1 second to the past.  Try to compensate for it, until a better
11073 # solution is found.
11074 sleep 2
11075 echo y >structure/file
11076 tar cfv archive --listed=list structure
11077 )"
11078 echo incremental.at:26 >"$at_check_line_file"
11079
11080 at_trace_this=
11081 if test -n "$at_traceon"; then
11082     echo 'Not enabling shell tracing (command contains an embedded newline)'
11083 fi
11084
11085 if test -n "$at_trace_this"; then
11086     ( $at_traceon;
11087 mkdir oldgnu
11088 (cd oldgnu
11089 TEST_TAR_FORMAT=oldgnu
11090 export TEST_TAR_FORMAT
11091 TAR_OPTIONS="-H oldgnu"
11092 export TAR_OPTIONS
11093 rm -rf *
11094
11095 mkdir structure
11096 echo x >structure/file
11097
11098 # On Nextstep (and perhaps other 4.3BSD systems),
11099 # a newly created file's ctime isn't updated
11100 # until the next sync or stat operation on the file.
11101 ls -l structure/file >/dev/null
11102
11103 # If the time of an initial backup and the creation time of a file contained
11104 # in that backup are the same, the file will be backed up again when an
11105 # incremental backup is done, because the incremental backup backs up
11106 # files created `on or after' the initial backup time.  Without the sleep
11107 # command, behaviour of tar becomes variable, depending whether the system
11108 # clock ticked over to the next second between creating the file and
11109 # backing it up.
11110 sleep 1
11111
11112 tar cf archive --listed=list structure
11113 tar cfv archive --listed=list structure
11114 echo separator
11115 # ReiserFS often offsets the timestamps of newly created files
11116 # 1 second to the past.  Try to compensate for it, until a better
11117 # solution is found.
11118 sleep 2
11119 echo y >structure/file
11120 tar cfv archive --listed=list structure
11121 ) ) >"$at_stdout" 2>"$at_stder1"
11122     at_status=$?
11123     grep '^ *+' "$at_stder1" >&2
11124     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11125 else
11126     ( :;
11127 mkdir oldgnu
11128 (cd oldgnu
11129 TEST_TAR_FORMAT=oldgnu
11130 export TEST_TAR_FORMAT
11131 TAR_OPTIONS="-H oldgnu"
11132 export TAR_OPTIONS
11133 rm -rf *
11134
11135 mkdir structure
11136 echo x >structure/file
11137
11138 # On Nextstep (and perhaps other 4.3BSD systems),
11139 # a newly created file's ctime isn't updated
11140 # until the next sync or stat operation on the file.
11141 ls -l structure/file >/dev/null
11142
11143 # If the time of an initial backup and the creation time of a file contained
11144 # in that backup are the same, the file will be backed up again when an
11145 # incremental backup is done, because the incremental backup backs up
11146 # files created `on or after' the initial backup time.  Without the sleep
11147 # command, behaviour of tar becomes variable, depending whether the system
11148 # clock ticked over to the next second between creating the file and
11149 # backing it up.
11150 sleep 1
11151
11152 tar cf archive --listed=list structure
11153 tar cfv archive --listed=list structure
11154 echo separator
11155 # ReiserFS often offsets the timestamps of newly created files
11156 # 1 second to the past.  Try to compensate for it, until a better
11157 # solution is found.
11158 sleep 2
11159 echo y >structure/file
11160 tar cfv archive --listed=list structure
11161 ) ) >"$at_stdout" 2>"$at_stderr"
11162     at_status=$?
11163 fi
11164
11165 at_failed=false
11166 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11167 echo >>"$at_stdout"; echo "structure/
11168 separator
11169 structure/
11170 structure/file
11171 " | $at_diff - "$at_stdout" || at_failed=:
11172 case $at_status in
11173    77) echo 77 > "$at_status_file"; exit 77;;
11174    0) ;;
11175    *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0"
11176       at_failed=:;;
11177 esac
11178 if $at_failed; then
11179
11180
11181   echo 1 > "$at_status_file"
11182   exit 1
11183 fi
11184
11185 $at_traceon
11186
11187               $at_traceoff
11188 echo "$at_srcdir/incremental.at:26:
11189 mkdir posix
11190 (cd posix
11191 TEST_TAR_FORMAT=posix
11192 export TEST_TAR_FORMAT
11193 TAR_OPTIONS=\"-H posix\"
11194 export TAR_OPTIONS
11195 rm -rf *
11196
11197 mkdir structure
11198 echo x >structure/file
11199
11200 # On Nextstep (and perhaps other 4.3BSD systems),
11201 # a newly created file's ctime isn't updated
11202 # until the next sync or stat operation on the file.
11203 ls -l structure/file >/dev/null
11204
11205 # If the time of an initial backup and the creation time of a file contained
11206 # in that backup are the same, the file will be backed up again when an
11207 # incremental backup is done, because the incremental backup backs up
11208 # files created \`on or after' the initial backup time.  Without the sleep
11209 # command, behaviour of tar becomes variable, depending whether the system
11210 # clock ticked over to the next second between creating the file and
11211 # backing it up.
11212 sleep 1
11213
11214 tar cf archive --listed=list structure
11215 tar cfv archive --listed=list structure
11216 echo separator
11217 # ReiserFS often offsets the timestamps of newly created files
11218 # 1 second to the past.  Try to compensate for it, until a better
11219 # solution is found.
11220 sleep 2
11221 echo y >structure/file
11222 tar cfv archive --listed=list structure
11223 )"
11224 echo incremental.at:26 >"$at_check_line_file"
11225
11226 at_trace_this=
11227 if test -n "$at_traceon"; then
11228     echo 'Not enabling shell tracing (command contains an embedded newline)'
11229 fi
11230
11231 if test -n "$at_trace_this"; then
11232     ( $at_traceon;
11233 mkdir posix
11234 (cd posix
11235 TEST_TAR_FORMAT=posix
11236 export TEST_TAR_FORMAT
11237 TAR_OPTIONS="-H posix"
11238 export TAR_OPTIONS
11239 rm -rf *
11240
11241 mkdir structure
11242 echo x >structure/file
11243
11244 # On Nextstep (and perhaps other 4.3BSD systems),
11245 # a newly created file's ctime isn't updated
11246 # until the next sync or stat operation on the file.
11247 ls -l structure/file >/dev/null
11248
11249 # If the time of an initial backup and the creation time of a file contained
11250 # in that backup are the same, the file will be backed up again when an
11251 # incremental backup is done, because the incremental backup backs up
11252 # files created `on or after' the initial backup time.  Without the sleep
11253 # command, behaviour of tar becomes variable, depending whether the system
11254 # clock ticked over to the next second between creating the file and
11255 # backing it up.
11256 sleep 1
11257
11258 tar cf archive --listed=list structure
11259 tar cfv archive --listed=list structure
11260 echo separator
11261 # ReiserFS often offsets the timestamps of newly created files
11262 # 1 second to the past.  Try to compensate for it, until a better
11263 # solution is found.
11264 sleep 2
11265 echo y >structure/file
11266 tar cfv archive --listed=list structure
11267 ) ) >"$at_stdout" 2>"$at_stder1"
11268     at_status=$?
11269     grep '^ *+' "$at_stder1" >&2
11270     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11271 else
11272     ( :;
11273 mkdir posix
11274 (cd posix
11275 TEST_TAR_FORMAT=posix
11276 export TEST_TAR_FORMAT
11277 TAR_OPTIONS="-H posix"
11278 export TAR_OPTIONS
11279 rm -rf *
11280
11281 mkdir structure
11282 echo x >structure/file
11283
11284 # On Nextstep (and perhaps other 4.3BSD systems),
11285 # a newly created file's ctime isn't updated
11286 # until the next sync or stat operation on the file.
11287 ls -l structure/file >/dev/null
11288
11289 # If the time of an initial backup and the creation time of a file contained
11290 # in that backup are the same, the file will be backed up again when an
11291 # incremental backup is done, because the incremental backup backs up
11292 # files created `on or after' the initial backup time.  Without the sleep
11293 # command, behaviour of tar becomes variable, depending whether the system
11294 # clock ticked over to the next second between creating the file and
11295 # backing it up.
11296 sleep 1
11297
11298 tar cf archive --listed=list structure
11299 tar cfv archive --listed=list structure
11300 echo separator
11301 # ReiserFS often offsets the timestamps of newly created files
11302 # 1 second to the past.  Try to compensate for it, until a better
11303 # solution is found.
11304 sleep 2
11305 echo y >structure/file
11306 tar cfv archive --listed=list structure
11307 ) ) >"$at_stdout" 2>"$at_stderr"
11308     at_status=$?
11309 fi
11310
11311 at_failed=false
11312 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11313 echo >>"$at_stdout"; echo "structure/
11314 separator
11315 structure/
11316 structure/file
11317 " | $at_diff - "$at_stdout" || at_failed=:
11318 case $at_status in
11319    77) echo 77 > "$at_status_file"; exit 77;;
11320    0) ;;
11321    *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0"
11322       at_failed=:;;
11323 esac
11324 if $at_failed; then
11325
11326
11327   echo 1 > "$at_status_file"
11328   exit 1
11329 fi
11330
11331 $at_traceon
11332
11333
11334
11335
11336       $at_traceoff
11337       $at_times_p && times >"$at_times_file"
11338     ) 5>&1 2>&1 | eval $at_tee_pipe
11339     at_status=`cat "$at_status_file"`
11340     ;;
11341
11342   27 ) # 27. incr01.at:27: restore broken symlinks from incremental
11343     at_setup_line='incr01.at:27'
11344     at_desc="restore broken symlinks from incremental"
11345     $at_quiet $ECHO_N " 27: restore broken symlinks from incremental       $ECHO_C"
11346     at_xfail=no
11347       test -f $XFAILFILE && at_xfail=yes
11348     echo "#                             -*- compilation -*-" >> "$at_group_log"
11349     (
11350       echo "27. incr01.at:27: testing ..."
11351       $at_traceon
11352
11353
11354
11355
11356
11357   $at_traceoff
11358 echo "$at_srcdir/incr01.at:30:
11359 mkdir gnu
11360 (cd gnu
11361 TEST_TAR_FORMAT=gnu
11362 export TEST_TAR_FORMAT
11363 TAR_OPTIONS=\"-H gnu\"
11364 export TAR_OPTIONS
11365 rm -rf *
11366
11367 mkdir directory
11368 \$as_ln_s foo directory/bar
11369
11370 tar -cf archive.0 -g db directory
11371 rm directory/bar
11372 tar -cf archive.1 -g db directory
11373
11374 mv directory orig
11375
11376 tar xvfg archive.0 /dev/null
11377 echo separator
11378 tar xvfg archive.1 /dev/null
11379 )"
11380 echo incr01.at:30 >"$at_check_line_file"
11381
11382 at_trace_this=
11383 if test -n "$at_traceon"; then
11384     echo 'Not enabling shell tracing (command contains an embedded newline)'
11385 fi
11386
11387 if test -n "$at_trace_this"; then
11388     ( $at_traceon;
11389 mkdir gnu
11390 (cd gnu
11391 TEST_TAR_FORMAT=gnu
11392 export TEST_TAR_FORMAT
11393 TAR_OPTIONS="-H gnu"
11394 export TAR_OPTIONS
11395 rm -rf *
11396
11397 mkdir directory
11398 $as_ln_s foo directory/bar
11399
11400 tar -cf archive.0 -g db directory
11401 rm directory/bar
11402 tar -cf archive.1 -g db directory
11403
11404 mv directory orig
11405
11406 tar xvfg archive.0 /dev/null
11407 echo separator
11408 tar xvfg archive.1 /dev/null
11409 ) ) >"$at_stdout" 2>"$at_stder1"
11410     at_status=$?
11411     grep '^ *+' "$at_stder1" >&2
11412     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11413 else
11414     ( :;
11415 mkdir gnu
11416 (cd gnu
11417 TEST_TAR_FORMAT=gnu
11418 export TEST_TAR_FORMAT
11419 TAR_OPTIONS="-H gnu"
11420 export TAR_OPTIONS
11421 rm -rf *
11422
11423 mkdir directory
11424 $as_ln_s foo directory/bar
11425
11426 tar -cf archive.0 -g db directory
11427 rm directory/bar
11428 tar -cf archive.1 -g db directory
11429
11430 mv directory orig
11431
11432 tar xvfg archive.0 /dev/null
11433 echo separator
11434 tar xvfg archive.1 /dev/null
11435 ) ) >"$at_stdout" 2>"$at_stderr"
11436     at_status=$?
11437 fi
11438
11439 at_failed=false
11440 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11441 echo >>"$at_stdout"; echo "directory/
11442 directory/bar
11443 separator
11444 directory/
11445 tar: Deleting \`directory/bar'
11446 " | $at_diff - "$at_stdout" || at_failed=:
11447 case $at_status in
11448    77) echo 77 > "$at_status_file"; exit 77;;
11449    0) ;;
11450    *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0"
11451       at_failed=:;;
11452 esac
11453 if $at_failed; then
11454
11455
11456   echo 1 > "$at_status_file"
11457   exit 1
11458 fi
11459
11460 $at_traceon
11461
11462               $at_traceoff
11463 echo "$at_srcdir/incr01.at:30:
11464 mkdir oldgnu
11465 (cd oldgnu
11466 TEST_TAR_FORMAT=oldgnu
11467 export TEST_TAR_FORMAT
11468 TAR_OPTIONS=\"-H oldgnu\"
11469 export TAR_OPTIONS
11470 rm -rf *
11471
11472 mkdir directory
11473 \$as_ln_s foo directory/bar
11474
11475 tar -cf archive.0 -g db directory
11476 rm directory/bar
11477 tar -cf archive.1 -g db directory
11478
11479 mv directory orig
11480
11481 tar xvfg archive.0 /dev/null
11482 echo separator
11483 tar xvfg archive.1 /dev/null
11484 )"
11485 echo incr01.at:30 >"$at_check_line_file"
11486
11487 at_trace_this=
11488 if test -n "$at_traceon"; then
11489     echo 'Not enabling shell tracing (command contains an embedded newline)'
11490 fi
11491
11492 if test -n "$at_trace_this"; then
11493     ( $at_traceon;
11494 mkdir oldgnu
11495 (cd oldgnu
11496 TEST_TAR_FORMAT=oldgnu
11497 export TEST_TAR_FORMAT
11498 TAR_OPTIONS="-H oldgnu"
11499 export TAR_OPTIONS
11500 rm -rf *
11501
11502 mkdir directory
11503 $as_ln_s foo directory/bar
11504
11505 tar -cf archive.0 -g db directory
11506 rm directory/bar
11507 tar -cf archive.1 -g db directory
11508
11509 mv directory orig
11510
11511 tar xvfg archive.0 /dev/null
11512 echo separator
11513 tar xvfg archive.1 /dev/null
11514 ) ) >"$at_stdout" 2>"$at_stder1"
11515     at_status=$?
11516     grep '^ *+' "$at_stder1" >&2
11517     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11518 else
11519     ( :;
11520 mkdir oldgnu
11521 (cd oldgnu
11522 TEST_TAR_FORMAT=oldgnu
11523 export TEST_TAR_FORMAT
11524 TAR_OPTIONS="-H oldgnu"
11525 export TAR_OPTIONS
11526 rm -rf *
11527
11528 mkdir directory
11529 $as_ln_s foo directory/bar
11530
11531 tar -cf archive.0 -g db directory
11532 rm directory/bar
11533 tar -cf archive.1 -g db directory
11534
11535 mv directory orig
11536
11537 tar xvfg archive.0 /dev/null
11538 echo separator
11539 tar xvfg archive.1 /dev/null
11540 ) ) >"$at_stdout" 2>"$at_stderr"
11541     at_status=$?
11542 fi
11543
11544 at_failed=false
11545 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11546 echo >>"$at_stdout"; echo "directory/
11547 directory/bar
11548 separator
11549 directory/
11550 tar: Deleting \`directory/bar'
11551 " | $at_diff - "$at_stdout" || at_failed=:
11552 case $at_status in
11553    77) echo 77 > "$at_status_file"; exit 77;;
11554    0) ;;
11555    *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0"
11556       at_failed=:;;
11557 esac
11558 if $at_failed; then
11559
11560
11561   echo 1 > "$at_status_file"
11562   exit 1
11563 fi
11564
11565 $at_traceon
11566
11567               $at_traceoff
11568 echo "$at_srcdir/incr01.at:30:
11569 mkdir posix
11570 (cd posix
11571 TEST_TAR_FORMAT=posix
11572 export TEST_TAR_FORMAT
11573 TAR_OPTIONS=\"-H posix\"
11574 export TAR_OPTIONS
11575 rm -rf *
11576
11577 mkdir directory
11578 \$as_ln_s foo directory/bar
11579
11580 tar -cf archive.0 -g db directory
11581 rm directory/bar
11582 tar -cf archive.1 -g db directory
11583
11584 mv directory orig
11585
11586 tar xvfg archive.0 /dev/null
11587 echo separator
11588 tar xvfg archive.1 /dev/null
11589 )"
11590 echo incr01.at:30 >"$at_check_line_file"
11591
11592 at_trace_this=
11593 if test -n "$at_traceon"; then
11594     echo 'Not enabling shell tracing (command contains an embedded newline)'
11595 fi
11596
11597 if test -n "$at_trace_this"; then
11598     ( $at_traceon;
11599 mkdir posix
11600 (cd posix
11601 TEST_TAR_FORMAT=posix
11602 export TEST_TAR_FORMAT
11603 TAR_OPTIONS="-H posix"
11604 export TAR_OPTIONS
11605 rm -rf *
11606
11607 mkdir directory
11608 $as_ln_s foo directory/bar
11609
11610 tar -cf archive.0 -g db directory
11611 rm directory/bar
11612 tar -cf archive.1 -g db directory
11613
11614 mv directory orig
11615
11616 tar xvfg archive.0 /dev/null
11617 echo separator
11618 tar xvfg archive.1 /dev/null
11619 ) ) >"$at_stdout" 2>"$at_stder1"
11620     at_status=$?
11621     grep '^ *+' "$at_stder1" >&2
11622     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11623 else
11624     ( :;
11625 mkdir posix
11626 (cd posix
11627 TEST_TAR_FORMAT=posix
11628 export TEST_TAR_FORMAT
11629 TAR_OPTIONS="-H posix"
11630 export TAR_OPTIONS
11631 rm -rf *
11632
11633 mkdir directory
11634 $as_ln_s foo directory/bar
11635
11636 tar -cf archive.0 -g db directory
11637 rm directory/bar
11638 tar -cf archive.1 -g db directory
11639
11640 mv directory orig
11641
11642 tar xvfg archive.0 /dev/null
11643 echo separator
11644 tar xvfg archive.1 /dev/null
11645 ) ) >"$at_stdout" 2>"$at_stderr"
11646     at_status=$?
11647 fi
11648
11649 at_failed=false
11650 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11651 echo >>"$at_stdout"; echo "directory/
11652 directory/bar
11653 separator
11654 directory/
11655 tar: Deleting \`directory/bar'
11656 " | $at_diff - "$at_stdout" || at_failed=:
11657 case $at_status in
11658    77) echo 77 > "$at_status_file"; exit 77;;
11659    0) ;;
11660    *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0"
11661       at_failed=:;;
11662 esac
11663 if $at_failed; then
11664
11665
11666   echo 1 > "$at_status_file"
11667   exit 1
11668 fi
11669
11670 $at_traceon
11671
11672
11673
11674
11675       $at_traceoff
11676       $at_times_p && times >"$at_times_file"
11677     ) 5>&1 2>&1 | eval $at_tee_pipe
11678     at_status=`cat "$at_status_file"`
11679     ;;
11680
11681   28 ) # 28. incr02.at:32: restoring timestamps from incremental
11682     at_setup_line='incr02.at:32'
11683     at_desc="restoring timestamps from incremental"
11684     $at_quiet $ECHO_N " 28: restoring timestamps from incremental          $ECHO_C"
11685     at_xfail=no
11686       test -f $XFAILFILE && at_xfail=yes
11687     echo "#                             -*- compilation -*-" >> "$at_group_log"
11688     (
11689       echo "28. incr02.at:32: testing ..."
11690       $at_traceon
11691
11692
11693
11694
11695
11696   $at_traceoff
11697 echo "$at_srcdir/incr02.at:35:
11698 mkdir gnu
11699 (cd gnu
11700 TEST_TAR_FORMAT=gnu
11701 export TEST_TAR_FORMAT
11702 TAR_OPTIONS=\"-H gnu\"
11703 export TAR_OPTIONS
11704 rm -rf *
11705
11706 # Create directory structure
11707 mkdir dir
11708 mkdir dir/subdir1
11709 mkdir dir/subdir2
11710 genfile --length 10 --file dir/subdir1/file
11711
11712 # Save mtime for later comparison
11713 genfile --stat=mtime dir/subdir1 > ts
11714
11715 # Create an archive. Using incremental mode makes sure the
11716 # archive will have a directory-first member ordering,
11717 # i.e.:
11718 # dir/
11719 # dir/subdir1/
11720 # dir/subdir2/
11721 # dir/subdir1/foofile
11722 #
11723 # When restoring from this directory structure, \`dir/subdir2/' used to
11724 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11725 # \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the
11726 # latter clobbered the directory timestamp.
11727
11728 tar -cf archive -g db dir
11729
11730 # Move away the directory
11731 mv dir orig
11732
11733 # Wait enough time for timestamps to differ in case of failure.
11734 sleep 5
11735
11736 # Restore the directory
11737 tar -xf archive dir
11738
11739 # Check the timestamp
11740 genfile --stat=mtime dir/subdir1 | diff ts -
11741 )"
11742 echo incr02.at:35 >"$at_check_line_file"
11743
11744 at_trace_this=
11745 if test -n "$at_traceon"; then
11746     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
11747 fi
11748
11749 if test -n "$at_trace_this"; then
11750     ( $at_traceon;
11751 mkdir gnu
11752 (cd gnu
11753 TEST_TAR_FORMAT=gnu
11754 export TEST_TAR_FORMAT
11755 TAR_OPTIONS="-H gnu"
11756 export TAR_OPTIONS
11757 rm -rf *
11758
11759 # Create directory structure
11760 mkdir dir
11761 mkdir dir/subdir1
11762 mkdir dir/subdir2
11763 genfile --length 10 --file dir/subdir1/file
11764
11765 # Save mtime for later comparison
11766 genfile --stat=mtime dir/subdir1 > ts
11767
11768 # Create an archive. Using incremental mode makes sure the
11769 # archive will have a directory-first member ordering,
11770 # i.e.:
11771 # dir/
11772 # dir/subdir1/
11773 # dir/subdir2/
11774 # dir/subdir1/foofile
11775 #
11776 # When restoring from this directory structure, `dir/subdir2/' used to
11777 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11778 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
11779 # latter clobbered the directory timestamp.
11780
11781 tar -cf archive -g db dir
11782
11783 # Move away the directory
11784 mv dir orig
11785
11786 # Wait enough time for timestamps to differ in case of failure.
11787 sleep 5
11788
11789 # Restore the directory
11790 tar -xf archive dir
11791
11792 # Check the timestamp
11793 genfile --stat=mtime dir/subdir1 | diff ts -
11794 ) ) >"$at_stdout" 2>"$at_stder1"
11795     at_status=$?
11796     grep '^ *+' "$at_stder1" >&2
11797     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11798 else
11799     ( :;
11800 mkdir gnu
11801 (cd gnu
11802 TEST_TAR_FORMAT=gnu
11803 export TEST_TAR_FORMAT
11804 TAR_OPTIONS="-H gnu"
11805 export TAR_OPTIONS
11806 rm -rf *
11807
11808 # Create directory structure
11809 mkdir dir
11810 mkdir dir/subdir1
11811 mkdir dir/subdir2
11812 genfile --length 10 --file dir/subdir1/file
11813
11814 # Save mtime for later comparison
11815 genfile --stat=mtime dir/subdir1 > ts
11816
11817 # Create an archive. Using incremental mode makes sure the
11818 # archive will have a directory-first member ordering,
11819 # i.e.:
11820 # dir/
11821 # dir/subdir1/
11822 # dir/subdir2/
11823 # dir/subdir1/foofile
11824 #
11825 # When restoring from this directory structure, `dir/subdir2/' used to
11826 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11827 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
11828 # latter clobbered the directory timestamp.
11829
11830 tar -cf archive -g db dir
11831
11832 # Move away the directory
11833 mv dir orig
11834
11835 # Wait enough time for timestamps to differ in case of failure.
11836 sleep 5
11837
11838 # Restore the directory
11839 tar -xf archive dir
11840
11841 # Check the timestamp
11842 genfile --stat=mtime dir/subdir1 | diff ts -
11843 ) ) >"$at_stdout" 2>"$at_stderr"
11844     at_status=$?
11845 fi
11846
11847 at_failed=false
11848 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11849 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
11850 case $at_status in
11851    77) echo 77 > "$at_status_file"; exit 77;;
11852    0) ;;
11853    *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0"
11854       at_failed=:;;
11855 esac
11856 if $at_failed; then
11857
11858
11859   echo 1 > "$at_status_file"
11860   exit 1
11861 fi
11862
11863 $at_traceon
11864
11865               $at_traceoff
11866 echo "$at_srcdir/incr02.at:35:
11867 mkdir oldgnu
11868 (cd oldgnu
11869 TEST_TAR_FORMAT=oldgnu
11870 export TEST_TAR_FORMAT
11871 TAR_OPTIONS=\"-H oldgnu\"
11872 export TAR_OPTIONS
11873 rm -rf *
11874
11875 # Create directory structure
11876 mkdir dir
11877 mkdir dir/subdir1
11878 mkdir dir/subdir2
11879 genfile --length 10 --file dir/subdir1/file
11880
11881 # Save mtime for later comparison
11882 genfile --stat=mtime dir/subdir1 > ts
11883
11884 # Create an archive. Using incremental mode makes sure the
11885 # archive will have a directory-first member ordering,
11886 # i.e.:
11887 # dir/
11888 # dir/subdir1/
11889 # dir/subdir2/
11890 # dir/subdir1/foofile
11891 #
11892 # When restoring from this directory structure, \`dir/subdir2/' used to
11893 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11894 # \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the
11895 # latter clobbered the directory timestamp.
11896
11897 tar -cf archive -g db dir
11898
11899 # Move away the directory
11900 mv dir orig
11901
11902 # Wait enough time for timestamps to differ in case of failure.
11903 sleep 5
11904
11905 # Restore the directory
11906 tar -xf archive dir
11907
11908 # Check the timestamp
11909 genfile --stat=mtime dir/subdir1 | diff ts -
11910 )"
11911 echo incr02.at:35 >"$at_check_line_file"
11912
11913 at_trace_this=
11914 if test -n "$at_traceon"; then
11915     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
11916 fi
11917
11918 if test -n "$at_trace_this"; then
11919     ( $at_traceon;
11920 mkdir oldgnu
11921 (cd oldgnu
11922 TEST_TAR_FORMAT=oldgnu
11923 export TEST_TAR_FORMAT
11924 TAR_OPTIONS="-H oldgnu"
11925 export TAR_OPTIONS
11926 rm -rf *
11927
11928 # Create directory structure
11929 mkdir dir
11930 mkdir dir/subdir1
11931 mkdir dir/subdir2
11932 genfile --length 10 --file dir/subdir1/file
11933
11934 # Save mtime for later comparison
11935 genfile --stat=mtime dir/subdir1 > ts
11936
11937 # Create an archive. Using incremental mode makes sure the
11938 # archive will have a directory-first member ordering,
11939 # i.e.:
11940 # dir/
11941 # dir/subdir1/
11942 # dir/subdir2/
11943 # dir/subdir1/foofile
11944 #
11945 # When restoring from this directory structure, `dir/subdir2/' used to
11946 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11947 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
11948 # latter clobbered the directory timestamp.
11949
11950 tar -cf archive -g db dir
11951
11952 # Move away the directory
11953 mv dir orig
11954
11955 # Wait enough time for timestamps to differ in case of failure.
11956 sleep 5
11957
11958 # Restore the directory
11959 tar -xf archive dir
11960
11961 # Check the timestamp
11962 genfile --stat=mtime dir/subdir1 | diff ts -
11963 ) ) >"$at_stdout" 2>"$at_stder1"
11964     at_status=$?
11965     grep '^ *+' "$at_stder1" >&2
11966     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11967 else
11968     ( :;
11969 mkdir oldgnu
11970 (cd oldgnu
11971 TEST_TAR_FORMAT=oldgnu
11972 export TEST_TAR_FORMAT
11973 TAR_OPTIONS="-H oldgnu"
11974 export TAR_OPTIONS
11975 rm -rf *
11976
11977 # Create directory structure
11978 mkdir dir
11979 mkdir dir/subdir1
11980 mkdir dir/subdir2
11981 genfile --length 10 --file dir/subdir1/file
11982
11983 # Save mtime for later comparison
11984 genfile --stat=mtime dir/subdir1 > ts
11985
11986 # Create an archive. Using incremental mode makes sure the
11987 # archive will have a directory-first member ordering,
11988 # i.e.:
11989 # dir/
11990 # dir/subdir1/
11991 # dir/subdir2/
11992 # dir/subdir1/foofile
11993 #
11994 # When restoring from this directory structure, `dir/subdir2/' used to
11995 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11996 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
11997 # latter clobbered the directory timestamp.
11998
11999 tar -cf archive -g db dir
12000
12001 # Move away the directory
12002 mv dir orig
12003
12004 # Wait enough time for timestamps to differ in case of failure.
12005 sleep 5
12006
12007 # Restore the directory
12008 tar -xf archive dir
12009
12010 # Check the timestamp
12011 genfile --stat=mtime dir/subdir1 | diff ts -
12012 ) ) >"$at_stdout" 2>"$at_stderr"
12013     at_status=$?
12014 fi
12015
12016 at_failed=false
12017 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
12018 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
12019 case $at_status in
12020    77) echo 77 > "$at_status_file"; exit 77;;
12021    0) ;;
12022    *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0"
12023       at_failed=:;;
12024 esac
12025 if $at_failed; then
12026
12027
12028   echo 1 > "$at_status_file"
12029   exit 1
12030 fi
12031
12032 $at_traceon
12033
12034               $at_traceoff
12035 echo "$at_srcdir/incr02.at:35:
12036 mkdir posix
12037 (cd posix
12038 TEST_TAR_FORMAT=posix
12039 export TEST_TAR_FORMAT
12040 TAR_OPTIONS=\"-H posix\"
12041 export TAR_OPTIONS
12042 rm -rf *
12043
12044 # Create directory structure
12045 mkdir dir
12046 mkdir dir/subdir1
12047 mkdir dir/subdir2
12048 genfile --length 10 --file dir/subdir1/file
12049
12050 # Save mtime for later comparison
12051 genfile --stat=mtime dir/subdir1 > ts
12052
12053 # Create an archive. Using incremental mode makes sure the
12054 # archive will have a directory-first member ordering,
12055 # i.e.:
12056 # dir/
12057 # dir/subdir1/
12058 # dir/subdir2/
12059 # dir/subdir1/foofile
12060 #
12061 # When restoring from this directory structure, \`dir/subdir2/' used to
12062 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
12063 # \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the
12064 # latter clobbered the directory timestamp.
12065
12066 tar -cf archive -g db dir
12067
12068 # Move away the directory
12069 mv dir orig
12070
12071 # Wait enough time for timestamps to differ in case of failure.
12072 sleep 5
12073
12074 # Restore the directory
12075 tar -xf archive dir
12076
12077 # Check the timestamp
12078 genfile --stat=mtime dir/subdir1 | diff ts -
12079 )"
12080 echo incr02.at:35 >"$at_check_line_file"
12081
12082 at_trace_this=
12083 if test -n "$at_traceon"; then
12084     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
12085 fi
12086
12087 if test -n "$at_trace_this"; then
12088     ( $at_traceon;
12089 mkdir posix
12090 (cd posix
12091 TEST_TAR_FORMAT=posix
12092 export TEST_TAR_FORMAT
12093 TAR_OPTIONS="-H posix"
12094 export TAR_OPTIONS
12095 rm -rf *
12096
12097 # Create directory structure
12098 mkdir dir
12099 mkdir dir/subdir1
12100 mkdir dir/subdir2
12101 genfile --length 10 --file dir/subdir1/file
12102
12103 # Save mtime for later comparison
12104 genfile --stat=mtime dir/subdir1 > ts
12105
12106 # Create an archive. Using incremental mode makes sure the
12107 # archive will have a directory-first member ordering,
12108 # i.e.:
12109 # dir/
12110 # dir/subdir1/
12111 # dir/subdir2/
12112 # dir/subdir1/foofile
12113 #
12114 # When restoring from this directory structure, `dir/subdir2/' used to
12115 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
12116 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
12117 # latter clobbered the directory timestamp.
12118
12119 tar -cf archive -g db dir
12120
12121 # Move away the directory
12122 mv dir orig
12123
12124 # Wait enough time for timestamps to differ in case of failure.
12125 sleep 5
12126
12127 # Restore the directory
12128 tar -xf archive dir
12129
12130 # Check the timestamp
12131 genfile --stat=mtime dir/subdir1 | diff ts -
12132 ) ) >"$at_stdout" 2>"$at_stder1"
12133     at_status=$?
12134     grep '^ *+' "$at_stder1" >&2
12135     grep -v '^ *+' "$at_stder1" >"$at_stderr"
12136 else
12137     ( :;
12138 mkdir posix
12139 (cd posix
12140 TEST_TAR_FORMAT=posix
12141 export TEST_TAR_FORMAT
12142 TAR_OPTIONS="-H posix"
12143 export TAR_OPTIONS
12144 rm -rf *
12145
12146 # Create directory structure
12147 mkdir dir
12148 mkdir dir/subdir1
12149 mkdir dir/subdir2
12150 genfile --length 10 --file dir/subdir1/file
12151
12152 # Save mtime for later comparison
12153 genfile --stat=mtime dir/subdir1 > ts
12154
12155 # Create an archive. Using incremental mode makes sure the
12156 # archive will have a directory-first member ordering,
12157 # i.e.:
12158 # dir/
12159 # dir/subdir1/
12160 # dir/subdir2/
12161 # dir/subdir1/foofile
12162 #
12163 # When restoring from this directory structure, `dir/subdir2/' used to
12164 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
12165 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
12166 # latter clobbered the directory timestamp.
12167
12168 tar -cf archive -g db dir
12169
12170 # Move away the directory
12171 mv dir orig
12172
12173 # Wait enough time for timestamps to differ in case of failure.
12174 sleep 5
12175
12176 # Restore the directory
12177 tar -xf archive dir
12178
12179 # Check the timestamp
12180 genfile --stat=mtime dir/subdir1 | diff ts -
12181 ) ) >"$at_stdout" 2>"$at_stderr"
12182     at_status=$?
12183 fi
12184
12185 at_failed=false
12186 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
12187 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
12188 case $at_status in
12189    77) echo 77 > "$at_status_file"; exit 77;;
12190    0) ;;
12191    *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0"
12192       at_failed=:;;
12193 esac
12194 if $at_failed; then
12195
12196
12197   echo 1 > "$at_status_file"
12198   exit 1
12199 fi
12200
12201 $at_traceon
12202
12203
12204
12205
12206       $at_traceoff
12207       $at_times_p && times >"$at_times_file"
12208     ) 5>&1 2>&1 | eval $at_tee_pipe
12209     at_status=`cat "$at_status_file"`
12210     ;;
12211
12212   29 ) # 29. listed01.at:26: --listed for individual files
12213     at_setup_line='listed01.at:26'
12214     at_desc="--listed for individual files"
12215     $at_quiet $ECHO_N " 29: --listed for individual files                  $ECHO_C"
12216     at_xfail=no
12217       test -f $XFAILFILE && at_xfail=yes
12218     echo "#                             -*- compilation -*-" >> "$at_group_log"
12219     (
12220       echo "29. listed01.at:26: testing ..."
12221       $at_traceon
12222
12223
12224
12225
12226
12227   $at_traceoff
12228 echo "$at_srcdir/listed01.at:29:
12229 mkdir gnu
12230 (cd gnu
12231 TEST_TAR_FORMAT=gnu
12232 export TEST_TAR_FORMAT
12233 TAR_OPTIONS=\"-H gnu\"
12234 export TAR_OPTIONS
12235 rm -rf *
12236
12237 mkdir directory
12238 genfile --length 10240 --pattern zeros --file directory/file1
12239 # Let the things settle
12240 sleep 1
12241
12242 tar --create \\
12243     --file=archive.1 \\
12244     --listed-incremental=listing \\
12245     directory/file*
12246
12247 tar tf archive.1 || exit 1
12248
12249 sleep 2
12250
12251 genfile --length 10240 --pattern zeros --file directory/file2
12252
12253 echo \"separator\"
12254
12255 tar --create \\
12256     --file=archive.2 \\
12257     --listed-incremental=listing \\
12258     directory/file* || exit 1
12259
12260 tar tf archive.2 || exit 1
12261 )"
12262 echo listed01.at:29 >"$at_check_line_file"
12263
12264 at_trace_this=
12265 if test -n "$at_traceon"; then
12266     echo 'Not enabling shell tracing (command contains an embedded newline)'
12267 fi
12268
12269 if test -n "$at_trace_this"; then
12270     ( $at_traceon;
12271 mkdir gnu
12272 (cd gnu
12273 TEST_TAR_FORMAT=gnu
12274 export TEST_TAR_FORMAT
12275 TAR_OPTIONS="-H gnu"
12276 export TAR_OPTIONS
12277 rm -rf *
12278
12279 mkdir directory
12280 genfile --length 10240 --pattern zeros --file directory/file1
12281 # Let the things settle
12282 sleep 1
12283
12284 tar --create \
12285     --file=archive.1 \
12286     --listed-incremental=listing \
12287     directory/file*
12288
12289 tar tf archive.1 || exit 1
12290
12291 sleep 2
12292
12293 genfile --length 10240 --pattern zeros --file directory/file2
12294
12295 echo "separator"
12296
12297 tar --create \
12298     --file=archive.2 \
12299     --listed-incremental=listing \
12300     directory/file* || exit 1
12301
12302 tar tf archive.2 || exit 1
12303 ) ) >"$at_stdout" 2>"$at_stder1"
12304     at_status=$?
12305     grep '^ *+' "$at_stder1" >&2
12306     grep -v '^ *+' "$at_stder1" >"$at_stderr"
12307 else
12308     ( :;
12309 mkdir gnu
12310 (cd gnu
12311 TEST_TAR_FORMAT=gnu
12312 export TEST_TAR_FORMAT
12313 TAR_OPTIONS="-H gnu"
12314 export TAR_OPTIONS
12315 rm -rf *
12316
12317 mkdir directory
12318 genfile --length 10240 --pattern zeros --file directory/file1
12319 # Let the things settle
12320 sleep 1
12321
12322 tar --create \
12323     --file=archive.1 \
12324     --listed-incremental=listing \
12325     directory/file*
12326
12327 tar tf archive.1 || exit 1
12328
12329 sleep 2
12330
12331 genfile --length 10240 --pattern zeros --file directory/file2
12332
12333 echo "separator"
12334
12335 tar --create \
12336     --file=archive.2 \
12337     --listed-incremental=listing \
12338     directory/file* || exit 1
12339
12340 tar tf archive.2 || exit 1
12341 ) ) >"$at_stdout" 2>"$at_stderr"
12342     at_status=$?
12343 fi
12344
12345 at_failed=false
12346 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
12347 echo >>"$at_stdout"; echo "directory/file1
12348 separator
12349 directory/file2
12350 " | $at_diff - "$at_stdout" || at_failed=:
12351 case $at_status in
12352    77) echo 77 > "$at_status_file"; exit 77;;
12353    0) ;;
12354    *) echo "$at_srcdir/listed01.at:29: exit code was $at_status, expected 0"
12355       at_failed=:;;
12356 esac
12357 if $at_failed; then
12358
12359
12360   echo 1 > "$at_status_file"
12361   exit 1
12362 fi
12363
12364 $at_traceon
12365
12366               $at_traceoff
12367 echo "$at_srcdir/listed01.at:29:
12368 mkdir oldgnu
12369 (cd oldgnu
12370 TEST_TAR_FORMAT=oldgnu
12371 export TEST_TAR_FORMAT
12372 TAR_OPTIONS=\"-H oldgnu\"
12373 export TAR_OPTIONS
12374 rm -rf *
12375
12376 mkdir directory
12377 genfile --length 10240 --pattern zeros --file directory/file1
12378 # Let the things settle
12379 sleep 1
12380
12381 tar --create \\
12382     --file=archive.1 \\
12383     --listed-incremental=listing \\
12384     directory/file*
12385
12386 tar tf archive.1 || exit 1
12387
12388 sleep 2
12389
12390 genfile --length 10240 --pattern zeros --file directory/file2
12391
12392 echo \"separator\"
12393
12394 tar --create \\
12395     --file=archive.2 \\
12396     --listed-incremental=listing \\
12397     directory/file* || exit 1
12398
12399 tar tf archive.2 || exit 1
12400 )"
12401 echo listed01.at:29 >"$at_check_line_file"
12402
12403 at_trace_this=
12404 if test -n "$at_traceon"; then
12405     echo 'Not enabling shell tracing (command contains an embedded newline)'
12406 fi
12407
12408 if test -n "$at_trace_this"; then
12409     ( $at_traceon;
12410 mkdir oldgnu
12411 (cd oldgnu
12412 TEST_TAR_FORMAT=oldgnu
12413 export TEST_TAR_FORMAT
12414 TAR_OPTIONS="-H oldgnu"
12415 export TAR_OPTIONS
12416 rm -rf *
12417
12418 mkdir directory
12419 genfile --length 10240 --pattern zeros --file directory/file1
12420 # Let the things settle
12421 sleep 1
12422
12423 tar --create \
12424     --file=archive.1 \
12425     --listed-incremental=listing \
12426     directory/file*
12427
12428 tar tf archive.1 || exit 1
12429
12430 sleep 2
12431
12432 genfile --length 10240 --pattern zeros --file directory/file2
12433
12434 echo "separator"
12435
12436 tar --create \
12437     --file=archive.2 \
12438     --listed-incremental=listing \
12439     directory/file* || exit 1
12440
12441 tar tf archive.2 || exit 1
12442 ) ) >"$at_stdout" 2>"$at_stder1"
12443     at_status=$?
12444     grep '^ *+' "$at_stder1" >&2
12445     grep -v '^ *+' "$at_stder1" >"$at_stderr"
12446 else
12447     ( :;
12448 mkdir oldgnu
12449 (cd oldgnu
12450 TEST_TAR_FORMAT=oldgnu
12451 export TEST_TAR_FORMAT
12452 TAR_OPTIONS="-H oldgnu"
12453 export TAR_OPTIONS
12454 rm -rf *
12455
12456 mkdir directory
12457 genfile --length 10240 --pattern zeros --file directory/file1
12458 # Let the things settle
12459 sleep 1
12460
12461 tar --create \
12462     --file=archive.1 \
12463     --listed-incremental=listing \
12464     directory/file*
12465
12466 tar tf archive.1 || exit 1
12467
12468 sleep 2
12469
12470 genfile --length 10240 --pattern zeros --file directory/file2
12471
12472 echo "separator"
12473
12474 tar --create \
12475     --file=archive.2 \
12476     --listed-incremental=listing \
12477     directory/file* || exit 1
12478
12479 tar tf archive.2 || exit 1
12480 ) ) >"$at_stdout" 2>"$at_stderr"
12481     at_status=$?
12482 fi
12483
12484 at_failed=false
12485 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
12486 echo >>"$at_stdout"; echo "directory/file1
12487 separator
12488 directory/file2
12489 " | $at_diff - "$at_stdout" || at_failed=:
12490 case $at_status in
12491    77) echo 77 > "$at_status_file"; exit 77;;
12492    0) ;;
12493    *) echo "$at_srcdir/listed01.at:29: exit code was $at_status, expected 0"
12494       at_failed=:;;
12495 esac
12496 if $at_failed; then
12497
12498
12499   echo 1 > "$at_status_file"
12500   exit 1
12501 fi
12502
12503 $at_traceon
12504
12505
12506
12507
12508       $at_traceoff
12509       $at_times_p && times >"$at_times_file"
12510     ) 5>&1 2>&1 | eval $at_tee_pipe
12511     at_status=`cat "$at_status_file"`
12512     ;;
12513
12514   30 ) # 30. listed02.at:28: working --listed
12515     at_setup_line='listed02.at:28'
12516     at_desc="working --listed"
12517     $at_quiet $ECHO_N " 30: working --listed                               $ECHO_C"
12518     at_xfail=no
12519       test -f $XFAILFILE && at_xfail=yes
12520     echo "#                             -*- compilation -*-" >> "$at_group_log"
12521     (
12522       echo "30. listed02.at:28: testing ..."
12523       $at_traceon
12524
12525
12526
12527
12528
12529   $at_traceoff
12530 echo "$at_srcdir/listed02.at:31:
12531 mkdir gnu
12532 (cd gnu
12533 TEST_TAR_FORMAT=gnu
12534 export TEST_TAR_FORMAT
12535 TAR_OPTIONS=\"-H gnu\"
12536 export TAR_OPTIONS
12537 rm -rf *
12538
12539
12540 test -z "`sort < /dev/null 2>&1`" || exit 77
12541
12542 echo Create directories
12543
12544 mkdir tart
12545 sleep 1
12546 mkdir tart/c0
12547 sleep 1
12548 mkdir tart/c1
12549 sleep 1
12550
12551 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12552 do
12553   echo File \$file > \$file
12554   sleep 1
12555 done
12556
12557 sleep 1
12558 echo Creating main archive
12559 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12560
12561 # The above prints two lines to stderr announcing the new directories c0 and c1.
12562 # Ensure that they appear in this script's stderr in sorted order.
12563 sort err 1>&2; rm -f err
12564
12565 sleep 1
12566 echo Modifying filesystem
12567 rm tart/a1
12568
12569 mv tart/b1 tart/b2
12570 mv tart/c1 tart/c2
12571 touch tart/c2/ca3
12572
12573 echo Directory contents
12574 find tart -print | sort 2>/dev/null
12575
12576 sleep 1
12577 echo Creating incremental archive
12578 cp -p tart.incr1 tart.incr2
12579 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12580
12581 sleep 1
12582
12583 rm -rf tart/*
12584 echo Extracting main archive
12585 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12586 echo Extracting incremental archive
12587 # This command should produce three messages about deletion
12588 # of the existing files, that may appear in any order. Piping
12589 # to sort makes sure we don't depend on any particular ordering.
12590 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12591
12592 echo Final files:
12593 find tart -print | sort 2>/dev/null
12594 )"
12595 echo listed02.at:31 >"$at_check_line_file"
12596
12597 at_trace_this=
12598 if test -n "$at_traceon"; then
12599     echo 'Not enabling shell tracing (command contains an embedded newline)'
12600 fi
12601
12602 if test -n "$at_trace_this"; then
12603     ( $at_traceon;
12604 mkdir gnu
12605 (cd gnu
12606 TEST_TAR_FORMAT=gnu
12607 export TEST_TAR_FORMAT
12608 TAR_OPTIONS="-H gnu"
12609 export TAR_OPTIONS
12610 rm -rf *
12611
12612
12613 test -z "`sort < /dev/null 2>&1`" || exit 77
12614
12615 echo Create directories
12616
12617 mkdir tart
12618 sleep 1
12619 mkdir tart/c0
12620 sleep 1
12621 mkdir tart/c1
12622 sleep 1
12623
12624 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12625 do
12626   echo File $file > $file
12627   sleep 1
12628 done
12629
12630 sleep 1
12631 echo Creating main archive
12632 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12633
12634 # The above prints two lines to stderr announcing the new directories c0 and c1.
12635 # Ensure that they appear in this script's stderr in sorted order.
12636 sort err 1>&2; rm -f err
12637
12638 sleep 1
12639 echo Modifying filesystem
12640 rm tart/a1
12641
12642 mv tart/b1 tart/b2
12643 mv tart/c1 tart/c2
12644 touch tart/c2/ca3
12645
12646 echo Directory contents
12647 find tart -print | sort 2>/dev/null
12648
12649 sleep 1
12650 echo Creating incremental archive
12651 cp -p tart.incr1 tart.incr2
12652 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12653
12654 sleep 1
12655
12656 rm -rf tart/*
12657 echo Extracting main archive
12658 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12659 echo Extracting incremental archive
12660 # This command should produce three messages about deletion
12661 # of the existing files, that may appear in any order. Piping
12662 # to sort makes sure we don't depend on any particular ordering.
12663 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12664
12665 echo Final files:
12666 find tart -print | sort 2>/dev/null
12667 ) ) >"$at_stdout" 2>"$at_stder1"
12668     at_status=$?
12669     grep '^ *+' "$at_stder1" >&2
12670     grep -v '^ *+' "$at_stder1" >"$at_stderr"
12671 else
12672     ( :;
12673 mkdir gnu
12674 (cd gnu
12675 TEST_TAR_FORMAT=gnu
12676 export TEST_TAR_FORMAT
12677 TAR_OPTIONS="-H gnu"
12678 export TAR_OPTIONS
12679 rm -rf *
12680
12681
12682 test -z "`sort < /dev/null 2>&1`" || exit 77
12683
12684 echo Create directories
12685
12686 mkdir tart
12687 sleep 1
12688 mkdir tart/c0
12689 sleep 1
12690 mkdir tart/c1
12691 sleep 1
12692
12693 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12694 do
12695   echo File $file > $file
12696   sleep 1
12697 done
12698
12699 sleep 1
12700 echo Creating main archive
12701 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12702
12703 # The above prints two lines to stderr announcing the new directories c0 and c1.
12704 # Ensure that they appear in this script's stderr in sorted order.
12705 sort err 1>&2; rm -f err
12706
12707 sleep 1
12708 echo Modifying filesystem
12709 rm tart/a1
12710
12711 mv tart/b1 tart/b2
12712 mv tart/c1 tart/c2
12713 touch tart/c2/ca3
12714
12715 echo Directory contents
12716 find tart -print | sort 2>/dev/null
12717
12718 sleep 1
12719 echo Creating incremental archive
12720 cp -p tart.incr1 tart.incr2
12721 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12722
12723 sleep 1
12724
12725 rm -rf tart/*
12726 echo Extracting main archive
12727 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12728 echo Extracting incremental archive
12729 # This command should produce three messages about deletion
12730 # of the existing files, that may appear in any order. Piping
12731 # to sort makes sure we don't depend on any particular ordering.
12732 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12733
12734 echo Final files:
12735 find tart -print | sort 2>/dev/null
12736 ) ) >"$at_stdout" 2>"$at_stderr"
12737     at_status=$?
12738 fi
12739
12740 at_failed=false
12741 echo >>"$at_stderr"; echo "tar: tart/c0: Directory is new
12742 tar: tart/c1: Directory is new
12743 tar: tart/c2: Directory has been renamed from \`tart/c1'
12744 " | $at_diff - "$at_stderr" || at_failed=:
12745 echo >>"$at_stdout"; echo "Create directories
12746 Creating main archive
12747 tart/
12748 tart/c0/
12749 tart/c1/
12750 tart/a1
12751 tart/b1
12752 tart/c0/cq1
12753 tart/c0/cq2
12754 tart/c1/ca1
12755 tart/c1/ca2
12756 Modifying filesystem
12757 Directory contents
12758 tart
12759 tart/b2
12760 tart/c0
12761 tart/c0/cq1
12762 tart/c0/cq2
12763 tart/c2
12764 tart/c2/ca1
12765 tart/c2/ca2
12766 tart/c2/ca3
12767 Creating incremental archive
12768 tart/
12769 tart/c0/
12770 tart/c2/
12771 tart/b2
12772 tart/c2/ca3
12773 Extracting main archive
12774 tart/
12775 tart/c0/
12776 tart/c1/
12777 tart/a1
12778 tart/b1
12779 tart/c0/cq1
12780 tart/c0/cq2
12781 tart/c1/ca1
12782 tart/c1/ca2
12783 Extracting incremental archive
12784 tar: Deleting \`tart/a1'
12785 tar: Deleting \`tart/b1'
12786 tart/
12787 tart/b2
12788 tart/c0/
12789 tart/c2/
12790 tart/c2/ca3
12791 Final files:
12792 tart
12793 tart/b2
12794 tart/c0
12795 tart/c0/cq1
12796 tart/c0/cq2
12797 tart/c2
12798 tart/c2/ca1
12799 tart/c2/ca2
12800 tart/c2/ca3
12801 " | $at_diff - "$at_stdout" || at_failed=:
12802 case $at_status in
12803    77) echo 77 > "$at_status_file"; exit 77;;
12804    0) ;;
12805    *) echo "$at_srcdir/listed02.at:31: exit code was $at_status, expected 0"
12806       at_failed=:;;
12807 esac
12808 if $at_failed; then
12809
12810
12811   echo 1 > "$at_status_file"
12812   exit 1
12813 fi
12814
12815 $at_traceon
12816
12817               $at_traceoff
12818 echo "$at_srcdir/listed02.at:31:
12819 mkdir oldgnu
12820 (cd oldgnu
12821 TEST_TAR_FORMAT=oldgnu
12822 export TEST_TAR_FORMAT
12823 TAR_OPTIONS=\"-H oldgnu\"
12824 export TAR_OPTIONS
12825 rm -rf *
12826
12827
12828 test -z "`sort < /dev/null 2>&1`" || exit 77
12829
12830 echo Create directories
12831
12832 mkdir tart
12833 sleep 1
12834 mkdir tart/c0
12835 sleep 1
12836 mkdir tart/c1
12837 sleep 1
12838
12839 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12840 do
12841   echo File \$file > \$file
12842   sleep 1
12843 done
12844
12845 sleep 1
12846 echo Creating main archive
12847 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12848
12849 # The above prints two lines to stderr announcing the new directories c0 and c1.
12850 # Ensure that they appear in this script's stderr in sorted order.
12851 sort err 1>&2; rm -f err
12852
12853 sleep 1
12854 echo Modifying filesystem
12855 rm tart/a1
12856
12857 mv tart/b1 tart/b2
12858 mv tart/c1 tart/c2
12859 touch tart/c2/ca3
12860
12861 echo Directory contents
12862 find tart -print | sort 2>/dev/null
12863
12864 sleep 1
12865 echo Creating incremental archive
12866 cp -p tart.incr1 tart.incr2
12867 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12868
12869 sleep 1
12870
12871 rm -rf tart/*
12872 echo Extracting main archive
12873 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12874 echo Extracting incremental archive
12875 # This command should produce three messages about deletion
12876 # of the existing files, that may appear in any order. Piping
12877 # to sort makes sure we don't depend on any particular ordering.
12878 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12879
12880 echo Final files:
12881 find tart -print | sort 2>/dev/null
12882 )"
12883 echo listed02.at:31 >"$at_check_line_file"
12884
12885 at_trace_this=
12886 if test -n "$at_traceon"; then
12887     echo 'Not enabling shell tracing (command contains an embedded newline)'
12888 fi
12889
12890 if test -n "$at_trace_this"; then
12891     ( $at_traceon;
12892 mkdir oldgnu
12893 (cd oldgnu
12894 TEST_TAR_FORMAT=oldgnu
12895 export TEST_TAR_FORMAT
12896 TAR_OPTIONS="-H oldgnu"
12897 export TAR_OPTIONS
12898 rm -rf *
12899
12900
12901 test -z "`sort < /dev/null 2>&1`" || exit 77
12902
12903 echo Create directories
12904
12905 mkdir tart
12906 sleep 1
12907 mkdir tart/c0
12908 sleep 1
12909 mkdir tart/c1
12910 sleep 1
12911
12912 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12913 do
12914   echo File $file > $file
12915   sleep 1
12916 done
12917
12918 sleep 1
12919 echo Creating main archive
12920 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12921
12922 # The above prints two lines to stderr announcing the new directories c0 and c1.
12923 # Ensure that they appear in this script's stderr in sorted order.
12924 sort err 1>&2; rm -f err
12925
12926 sleep 1
12927 echo Modifying filesystem
12928 rm tart/a1
12929
12930 mv tart/b1 tart/b2
12931 mv tart/c1 tart/c2
12932 touch tart/c2/ca3
12933
12934 echo Directory contents
12935 find tart -print | sort 2>/dev/null
12936
12937 sleep 1
12938 echo Creating incremental archive
12939 cp -p tart.incr1 tart.incr2
12940 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12941
12942 sleep 1
12943
12944 rm -rf tart/*
12945 echo Extracting main archive
12946 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12947 echo Extracting incremental archive
12948 # This command should produce three messages about deletion
12949 # of the existing files, that may appear in any order. Piping
12950 # to sort makes sure we don't depend on any particular ordering.
12951 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12952
12953 echo Final files:
12954 find tart -print | sort 2>/dev/null
12955 ) ) >"$at_stdout" 2>"$at_stder1"
12956     at_status=$?
12957     grep '^ *+' "$at_stder1" >&2
12958     grep -v '^ *+' "$at_stder1" >"$at_stderr"
12959 else
12960     ( :;
12961 mkdir oldgnu
12962 (cd oldgnu
12963 TEST_TAR_FORMAT=oldgnu
12964 export TEST_TAR_FORMAT
12965 TAR_OPTIONS="-H oldgnu"
12966 export TAR_OPTIONS
12967 rm -rf *
12968
12969
12970 test -z "`sort < /dev/null 2>&1`" || exit 77
12971
12972 echo Create directories
12973
12974 mkdir tart
12975 sleep 1
12976 mkdir tart/c0
12977 sleep 1
12978 mkdir tart/c1
12979 sleep 1
12980
12981 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12982 do
12983   echo File $file > $file
12984   sleep 1
12985 done
12986
12987 sleep 1
12988 echo Creating main archive
12989 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12990
12991 # The above prints two lines to stderr announcing the new directories c0 and c1.
12992 # Ensure that they appear in this script's stderr in sorted order.
12993 sort err 1>&2; rm -f err
12994
12995 sleep 1
12996 echo Modifying filesystem
12997 rm tart/a1
12998
12999 mv tart/b1 tart/b2
13000 mv tart/c1 tart/c2
13001 touch tart/c2/ca3
13002
13003 echo Directory contents
13004 find tart -print | sort 2>/dev/null
13005
13006 sleep 1
13007 echo Creating incremental archive
13008 cp -p tart.incr1 tart.incr2
13009 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
13010
13011 sleep 1
13012
13013 rm -rf tart/*
13014 echo Extracting main archive
13015 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
13016 echo Extracting incremental archive
13017 # This command should produce three messages about deletion
13018 # of the existing files, that may appear in any order. Piping
13019 # to sort makes sure we don't depend on any particular ordering.
13020 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
13021
13022 echo Final files:
13023 find tart -print | sort 2>/dev/null
13024 ) ) >"$at_stdout" 2>"$at_stderr"
13025     at_status=$?
13026 fi
13027
13028 at_failed=false
13029 echo >>"$at_stderr"; echo "tar: tart/c0: Directory is new
13030 tar: tart/c1: Directory is new
13031 tar: tart/c2: Directory has been renamed from \`tart/c1'
13032 " | $at_diff - "$at_stderr" || at_failed=:
13033 echo >>"$at_stdout"; echo "Create directories
13034 Creating main archive
13035 tart/
13036 tart/c0/
13037 tart/c1/
13038 tart/a1
13039 tart/b1
13040 tart/c0/cq1
13041 tart/c0/cq2
13042 tart/c1/ca1
13043 tart/c1/ca2
13044 Modifying filesystem
13045 Directory contents
13046 tart
13047 tart/b2
13048 tart/c0
13049 tart/c0/cq1
13050 tart/c0/cq2
13051 tart/c2
13052 tart/c2/ca1
13053 tart/c2/ca2
13054 tart/c2/ca3
13055 Creating incremental archive
13056 tart/
13057 tart/c0/
13058 tart/c2/
13059 tart/b2
13060 tart/c2/ca3
13061 Extracting main archive
13062 tart/
13063 tart/c0/
13064 tart/c1/
13065 tart/a1
13066 tart/b1
13067 tart/c0/cq1
13068 tart/c0/cq2
13069 tart/c1/ca1
13070 tart/c1/ca2
13071 Extracting incremental archive
13072 tar: Deleting \`tart/a1'
13073 tar: Deleting \`tart/b1'
13074 tart/
13075 tart/b2
13076 tart/c0/
13077 tart/c2/
13078 tart/c2/ca3
13079 Final files:
13080 tart
13081 tart/b2
13082 tart/c0
13083 tart/c0/cq1
13084 tart/c0/cq2
13085 tart/c2
13086 tart/c2/ca1
13087 tart/c2/ca2
13088 tart/c2/ca3
13089 " | $at_diff - "$at_stdout" || at_failed=:
13090 case $at_status in
13091    77) echo 77 > "$at_status_file"; exit 77;;
13092    0) ;;
13093    *) echo "$at_srcdir/listed02.at:31: exit code was $at_status, expected 0"
13094       at_failed=:;;
13095 esac
13096 if $at_failed; then
13097
13098
13099   echo 1 > "$at_status_file"
13100   exit 1
13101 fi
13102
13103 $at_traceon
13104
13105
13106
13107
13108       $at_traceoff
13109       $at_times_p && times >"$at_times_file"
13110     ) 5>&1 2>&1 | eval $at_tee_pipe
13111     at_status=`cat "$at_status_file"`
13112     ;;
13113
13114   31 ) # 31. incr03.at:28: renamed files in incrementals
13115     at_setup_line='incr03.at:28'
13116     at_desc="renamed files in incrementals"
13117     $at_quiet $ECHO_N " 31: renamed files in incrementals                  $ECHO_C"
13118     at_xfail=no
13119       test -f $XFAILFILE && at_xfail=yes
13120     echo "#                             -*- compilation -*-" >> "$at_group_log"
13121     (
13122       echo "31. incr03.at:28: testing ..."
13123       $at_traceon
13124
13125
13126
13127
13128
13129   $at_traceoff
13130 echo "$at_srcdir/incr03.at:31:
13131 mkdir gnu
13132 (cd gnu
13133 TEST_TAR_FORMAT=gnu
13134 export TEST_TAR_FORMAT
13135 TAR_OPTIONS=\"-H gnu\"
13136 export TAR_OPTIONS
13137 rm -rf *
13138
13139
13140 test -z "`sort < /dev/null 2>&1`" || exit 77
13141
13142 mkdir directory
13143 genfile --file=directory/x
13144 genfile --file=directory/y
13145
13146 sleep 1
13147
13148 tar -cf archive.1 -g db directory
13149
13150 mv directory/x directory/z
13151 tar -cf archive.2 -g db directory
13152
13153 mv directory orig
13154
13155 echo Listing of archive.1
13156 tar -tf archive.1 | sort
13157 echo Listing of archive.2
13158 tar -tf archive.2 | sort
13159
13160 echo Directory after first restore
13161 tar -xf archive.1 -g db
13162 find directory | sort
13163
13164 echo Directory after second restore
13165 tar -xf archive.2 -g db
13166 find directory | sort
13167 )"
13168 echo incr03.at:31 >"$at_check_line_file"
13169
13170 at_trace_this=
13171 if test -n "$at_traceon"; then
13172     echo 'Not enabling shell tracing (command contains an embedded newline)'
13173 fi
13174
13175 if test -n "$at_trace_this"; then
13176     ( $at_traceon;
13177 mkdir gnu
13178 (cd gnu
13179 TEST_TAR_FORMAT=gnu
13180 export TEST_TAR_FORMAT
13181 TAR_OPTIONS="-H gnu"
13182 export TAR_OPTIONS
13183 rm -rf *
13184
13185
13186 test -z "`sort < /dev/null 2>&1`" || exit 77
13187
13188 mkdir directory
13189 genfile --file=directory/x
13190 genfile --file=directory/y
13191
13192 sleep 1
13193
13194 tar -cf archive.1 -g db directory
13195
13196 mv directory/x directory/z
13197 tar -cf archive.2 -g db directory
13198
13199 mv directory orig
13200
13201 echo Listing of archive.1
13202 tar -tf archive.1 | sort
13203 echo Listing of archive.2
13204 tar -tf archive.2 | sort
13205
13206 echo Directory after first restore
13207 tar -xf archive.1 -g db
13208 find directory | sort
13209
13210 echo Directory after second restore
13211 tar -xf archive.2 -g db
13212 find directory | sort
13213 ) ) >"$at_stdout" 2>"$at_stder1"
13214     at_status=$?
13215     grep '^ *+' "$at_stder1" >&2
13216     grep -v '^ *+' "$at_stder1" >"$at_stderr"
13217 else
13218     ( :;
13219 mkdir gnu
13220 (cd gnu
13221 TEST_TAR_FORMAT=gnu
13222 export TEST_TAR_FORMAT
13223 TAR_OPTIONS="-H gnu"
13224 export TAR_OPTIONS
13225 rm -rf *
13226
13227
13228 test -z "`sort < /dev/null 2>&1`" || exit 77
13229
13230 mkdir directory
13231 genfile --file=directory/x
13232 genfile --file=directory/y
13233
13234 sleep 1
13235
13236 tar -cf archive.1 -g db directory
13237
13238 mv directory/x directory/z
13239 tar -cf archive.2 -g db directory
13240
13241 mv directory orig
13242
13243 echo Listing of archive.1
13244 tar -tf archive.1 | sort
13245 echo Listing of archive.2
13246 tar -tf archive.2 | sort
13247
13248 echo Directory after first restore
13249 tar -xf archive.1 -g db
13250 find directory | sort
13251
13252 echo Directory after second restore
13253 tar -xf archive.2 -g db
13254 find directory | sort
13255 ) ) >"$at_stdout" 2>"$at_stderr"
13256     at_status=$?
13257 fi
13258
13259 at_failed=false
13260 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
13261 echo >>"$at_stdout"; echo "Listing of archive.1
13262 directory/
13263 directory/x
13264 directory/y
13265 Listing of archive.2
13266 directory/
13267 directory/z
13268 Directory after first restore
13269 directory
13270 directory/x
13271 directory/y
13272 Directory after second restore
13273 directory
13274 directory/y
13275 directory/z
13276 " | $at_diff - "$at_stdout" || at_failed=:
13277 case $at_status in
13278    77) echo 77 > "$at_status_file"; exit 77;;
13279    0) ;;
13280    *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0"
13281       at_failed=:;;
13282 esac
13283 if $at_failed; then
13284
13285
13286   echo 1 > "$at_status_file"
13287   exit 1
13288 fi
13289
13290 $at_traceon
13291
13292               $at_traceoff
13293 echo "$at_srcdir/incr03.at:31:
13294 mkdir oldgnu
13295 (cd oldgnu
13296 TEST_TAR_FORMAT=oldgnu
13297 export TEST_TAR_FORMAT
13298 TAR_OPTIONS=\"-H oldgnu\"
13299 export TAR_OPTIONS
13300 rm -rf *
13301
13302
13303 test -z "`sort < /dev/null 2>&1`" || exit 77
13304
13305 mkdir directory
13306 genfile --file=directory/x
13307 genfile --file=directory/y
13308
13309 sleep 1
13310
13311 tar -cf archive.1 -g db directory
13312
13313 mv directory/x directory/z
13314 tar -cf archive.2 -g db directory
13315
13316 mv directory orig
13317
13318 echo Listing of archive.1
13319 tar -tf archive.1 | sort
13320 echo Listing of archive.2
13321 tar -tf archive.2 | sort
13322
13323 echo Directory after first restore
13324 tar -xf archive.1 -g db
13325 find directory | sort
13326
13327 echo Directory after second restore
13328 tar -xf archive.2 -g db
13329 find directory | sort
13330 )"
13331 echo incr03.at:31 >"$at_check_line_file"
13332
13333 at_trace_this=
13334 if test -n "$at_traceon"; then
13335     echo 'Not enabling shell tracing (command contains an embedded newline)'
13336 fi
13337
13338 if test -n "$at_trace_this"; then
13339     ( $at_traceon;
13340 mkdir oldgnu
13341 (cd oldgnu
13342 TEST_TAR_FORMAT=oldgnu
13343 export TEST_TAR_FORMAT
13344 TAR_OPTIONS="-H oldgnu"
13345 export TAR_OPTIONS
13346 rm -rf *
13347
13348
13349 test -z "`sort < /dev/null 2>&1`" || exit 77
13350
13351 mkdir directory
13352 genfile --file=directory/x
13353 genfile --file=directory/y
13354
13355 sleep 1
13356
13357 tar -cf archive.1 -g db directory
13358
13359 mv directory/x directory/z
13360 tar -cf archive.2 -g db directory
13361
13362 mv directory orig
13363
13364 echo Listing of archive.1
13365 tar -tf archive.1 | sort
13366 echo Listing of archive.2
13367 tar -tf archive.2 | sort
13368
13369 echo Directory after first restore
13370 tar -xf archive.1 -g db
13371 find directory | sort
13372
13373 echo Directory after second restore
13374 tar -xf archive.2 -g db
13375 find directory | sort
13376 ) ) >"$at_stdout" 2>"$at_stder1"
13377     at_status=$?
13378     grep '^ *+' "$at_stder1" >&2
13379     grep -v '^ *+' "$at_stder1" >"$at_stderr"
13380 else
13381     ( :;
13382 mkdir oldgnu
13383 (cd oldgnu
13384 TEST_TAR_FORMAT=oldgnu
13385 export TEST_TAR_FORMAT
13386 TAR_OPTIONS="-H oldgnu"
13387 export TAR_OPTIONS
13388 rm -rf *
13389
13390
13391 test -z "`sort < /dev/null 2>&1`" || exit 77
13392
13393 mkdir directory
13394 genfile --file=directory/x
13395 genfile --file=directory/y
13396
13397 sleep 1
13398
13399 tar -cf archive.1 -g db directory
13400
13401 mv directory/x directory/z
13402 tar -cf archive.2 -g db directory
13403
13404 mv directory orig
13405
13406 echo Listing of archive.1
13407 tar -tf archive.1 | sort
13408 echo Listing of archive.2
13409 tar -tf archive.2 | sort
13410
13411 echo Directory after first restore
13412 tar -xf archive.1 -g db
13413 find directory | sort
13414
13415 echo Directory after second restore
13416 tar -xf archive.2 -g db
13417 find directory | sort
13418 ) ) >"$at_stdout" 2>"$at_stderr"
13419     at_status=$?
13420 fi
13421
13422 at_failed=false
13423 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
13424 echo >>"$at_stdout"; echo "Listing of archive.1
13425 directory/
13426 directory/x
13427 directory/y
13428 Listing of archive.2
13429 directory/
13430 directory/z
13431 Directory after first restore
13432 directory
13433 directory/x
13434 directory/y
13435 Directory after second restore
13436 directory
13437 directory/y
13438 directory/z
13439 " | $at_diff - "$at_stdout" || at_failed=:
13440 case $at_status in
13441    77) echo 77 > "$at_status_file"; exit 77;;
13442    0) ;;
13443    *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0"
13444       at_failed=:;;
13445 esac
13446 if $at_failed; then
13447
13448
13449   echo 1 > "$at_status_file"
13450   exit 1
13451 fi
13452
13453 $at_traceon
13454
13455               $at_traceoff
13456 echo "$at_srcdir/incr03.at:31:
13457 mkdir posix
13458 (cd posix
13459 TEST_TAR_FORMAT=posix
13460 export TEST_TAR_FORMAT
13461 TAR_OPTIONS=\"-H posix\"
13462 export TAR_OPTIONS
13463 rm -rf *
13464
13465
13466 test -z "`sort < /dev/null 2>&1`" || exit 77
13467
13468 mkdir directory
13469 genfile --file=directory/x
13470 genfile --file=directory/y
13471
13472 sleep 1
13473
13474 tar -cf archive.1 -g db directory
13475
13476 mv directory/x directory/z
13477 tar -cf archive.2 -g db directory
13478
13479 mv directory orig
13480
13481 echo Listing of archive.1
13482 tar -tf archive.1 | sort
13483 echo Listing of archive.2
13484 tar -tf archive.2 | sort
13485
13486 echo Directory after first restore
13487 tar -xf archive.1 -g db
13488 find directory | sort
13489
13490 echo Directory after second restore
13491 tar -xf archive.2 -g db
13492 find directory | sort
13493 )"
13494 echo incr03.at:31 >"$at_check_line_file"
13495
13496 at_trace_this=
13497 if test -n "$at_traceon"; then
13498     echo 'Not enabling shell tracing (command contains an embedded newline)'
13499 fi
13500
13501 if test -n "$at_trace_this"; then
13502     ( $at_traceon;
13503 mkdir posix
13504 (cd posix
13505 TEST_TAR_FORMAT=posix
13506 export TEST_TAR_FORMAT
13507 TAR_OPTIONS="-H posix"
13508 export TAR_OPTIONS
13509 rm -rf *
13510
13511
13512 test -z "`sort < /dev/null 2>&1`" || exit 77
13513
13514 mkdir directory
13515 genfile --file=directory/x
13516 genfile --file=directory/y
13517
13518 sleep 1
13519
13520 tar -cf archive.1 -g db directory
13521
13522 mv directory/x directory/z
13523 tar -cf archive.2 -g db directory
13524
13525 mv directory orig
13526
13527 echo Listing of archive.1
13528 tar -tf archive.1 | sort
13529 echo Listing of archive.2
13530 tar -tf archive.2 | sort
13531
13532 echo Directory after first restore
13533 tar -xf archive.1 -g db
13534 find directory | sort
13535
13536 echo Directory after second restore
13537 tar -xf archive.2 -g db
13538 find directory | sort
13539 ) ) >"$at_stdout" 2>"$at_stder1"
13540     at_status=$?
13541     grep '^ *+' "$at_stder1" >&2
13542     grep -v '^ *+' "$at_stder1" >"$at_stderr"
13543 else
13544     ( :;
13545 mkdir posix
13546 (cd posix
13547 TEST_TAR_FORMAT=posix
13548 export TEST_TAR_FORMAT
13549 TAR_OPTIONS="-H posix"
13550 export TAR_OPTIONS
13551 rm -rf *
13552
13553
13554 test -z "`sort < /dev/null 2>&1`" || exit 77
13555
13556 mkdir directory
13557 genfile --file=directory/x
13558 genfile --file=directory/y
13559
13560 sleep 1
13561
13562 tar -cf archive.1 -g db directory
13563
13564 mv directory/x directory/z
13565 tar -cf archive.2 -g db directory
13566
13567 mv directory orig
13568
13569 echo Listing of archive.1
13570 tar -tf archive.1 | sort
13571 echo Listing of archive.2
13572 tar -tf archive.2 | sort
13573
13574 echo Directory after first restore
13575 tar -xf archive.1 -g db
13576 find directory | sort
13577
13578 echo Directory after second restore
13579 tar -xf archive.2 -g db
13580 find directory | sort
13581 ) ) >"$at_stdout" 2>"$at_stderr"
13582     at_status=$?
13583 fi
13584
13585 at_failed=false
13586 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
13587 echo >>"$at_stdout"; echo "Listing of archive.1
13588 directory/
13589 directory/x
13590 directory/y
13591 Listing of archive.2
13592 directory/
13593 directory/z
13594 Directory after first restore
13595 directory
13596 directory/x
13597 directory/y
13598 Directory after second restore
13599 directory
13600 directory/y
13601 directory/z
13602 " | $at_diff - "$at_stdout" || at_failed=:
13603 case $at_status in
13604    77) echo 77 > "$at_status_file"; exit 77;;
13605    0) ;;
13606    *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0"
13607       at_failed=:;;
13608 esac
13609 if $at_failed; then
13610
13611
13612   echo 1 > "$at_status_file"
13613   exit 1
13614 fi
13615
13616 $at_traceon
13617
13618
13619
13620
13621       $at_traceoff
13622       $at_times_p && times >"$at_times_file"
13623     ) 5>&1 2>&1 | eval $at_tee_pipe
13624     at_status=`cat "$at_status_file"`
13625     ;;
13626
13627   32 ) # 32. incr04.at:29: proper icontents initialization
13628     at_setup_line='incr04.at:29'
13629     at_desc="proper icontents initialization"
13630     $at_quiet $ECHO_N " 32: proper icontents initialization                $ECHO_C"
13631     at_xfail=no
13632       test -f $XFAILFILE && at_xfail=yes
13633     echo "#                             -*- compilation -*-" >> "$at_group_log"
13634     (
13635       echo "32. incr04.at:29: testing ..."
13636       $at_traceon
13637
13638
13639
13640
13641
13642
13643
13644   $at_traceoff
13645 echo "$at_srcdir/incr04.at:34:
13646 mkdir gnu
13647 (cd gnu
13648 TEST_TAR_FORMAT=gnu
13649 export TEST_TAR_FORMAT
13650 TAR_OPTIONS=\"-H gnu\"
13651 export TAR_OPTIONS
13652 rm -rf *
13653
13654
13655 install-sh -d a/b >/dev/null  || exit 77
13656 awk 'BEGIN {
13657   for (i=1;i<=142;i++)
13658     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
13659   }' < /dev/null | genfile --files-from -
13660
13661 sleep 1
13662
13663 echo \"Initial dump\"
13664 tar cvf a0.tar -g a.sna a
13665 mv a/b a/c
13666 echo \"Incremental dump\"
13667 tar cvf a1.tar -g a.sna a
13668 )"
13669 echo incr04.at:34 >"$at_check_line_file"
13670
13671 at_trace_this=
13672 if test -n "$at_traceon"; then
13673     echo 'Not enabling shell tracing (command contains an embedded newline)'
13674 fi
13675
13676 if test -n "$at_trace_this"; then
13677     ( $at_traceon;
13678 mkdir gnu
13679 (cd gnu
13680 TEST_TAR_FORMAT=gnu
13681 export TEST_TAR_FORMAT
13682 TAR_OPTIONS="-H gnu"
13683 export TAR_OPTIONS
13684 rm -rf *
13685
13686
13687 install-sh -d a/b >/dev/null  || exit 77
13688 awk 'BEGIN {
13689   for (i=1;i<=142;i++)
13690     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
13691   }' < /dev/null | genfile --files-from -
13692
13693 sleep 1
13694
13695 echo "Initial dump"
13696 tar cvf a0.tar -g a.sna a
13697 mv a/b a/c
13698 echo "Incremental dump"
13699 tar cvf a1.tar -g a.sna a
13700 ) ) >"$at_stdout" 2>"$at_stder1"
13701     at_status=$?
13702     grep '^ *+' "$at_stder1" >&2
13703     grep -v '^ *+' "$at_stder1" >"$at_stderr"
13704 else
13705     ( :;
13706 mkdir gnu
13707 (cd gnu
13708 TEST_TAR_FORMAT=gnu
13709 export TEST_TAR_FORMAT
13710 TAR_OPTIONS="-H gnu"
13711 export TAR_OPTIONS
13712 rm -rf *
13713
13714
13715 install-sh -d a/b >/dev/null  || exit 77
13716 awk 'BEGIN {
13717   for (i=1;i<=142;i++)
13718     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
13719   }' < /dev/null | genfile --files-from -
13720
13721 sleep 1
13722
13723 echo "Initial dump"
13724 tar cvf a0.tar -g a.sna a
13725 mv a/b a/c
13726 echo "Incremental dump"
13727 tar cvf a1.tar -g a.sna a
13728 ) ) >"$at_stdout" 2>"$at_stderr"
13729     at_status=$?
13730 fi
13731
13732 at_failed=false
13733 echo >>"$at_stderr"; echo "tar: a/b: Directory is new
13734 tar: a/c: Directory has been renamed from \`a/b'
13735 " | $at_diff - "$at_stderr" || at_failed=:
13736 echo >>"$at_stdout"; echo "Initial dump
13737 a/
13738 a/b/
13739 a/b/one_31_chars_long_file_name_001
13740 a/b/one_31_chars_long_file_name_002
13741 a/b/one_31_chars_long_file_name_003
13742 a/b/one_31_chars_long_file_name_004
13743 a/b/one_31_chars_long_file_name_005
13744 a/b/one_31_chars_long_file_name_006
13745 a/b/one_31_chars_long_file_name_007
13746 a/b/one_31_chars_long_file_name_008
13747 a/b/one_31_chars_long_file_name_009
13748 a/b/one_31_chars_long_file_name_010
13749 a/b/one_31_chars_long_file_name_011
13750 a/b/one_31_chars_long_file_name_012
13751 a/b/one_31_chars_long_file_name_013
13752 a/b/one_31_chars_long_file_name_014
13753 a/b/one_31_chars_long_file_name_015
13754 a/b/one_31_chars_long_file_name_016
13755 a/b/one_31_chars_long_file_name_017
13756 a/b/one_31_chars_long_file_name_018
13757 a/b/one_31_chars_long_file_name_019
13758 a/b/one_31_chars_long_file_name_020
13759 a/b/one_31_chars_long_file_name_021
13760 a/b/one_31_chars_long_file_name_022
13761 a/b/one_31_chars_long_file_name_023
13762 a/b/one_31_chars_long_file_name_024
13763 a/b/one_31_chars_long_file_name_025
13764 a/b/one_31_chars_long_file_name_026
13765 a/b/one_31_chars_long_file_name_027
13766 a/b/one_31_chars_long_file_name_028
13767 a/b/one_31_chars_long_file_name_029
13768 a/b/one_31_chars_long_file_name_030
13769 a/b/one_31_chars_long_file_name_031
13770 a/b/one_31_chars_long_file_name_032
13771 a/b/one_31_chars_long_file_name_033
13772 a/b/one_31_chars_long_file_name_034
13773 a/b/one_31_chars_long_file_name_035
13774 a/b/one_31_chars_long_file_name_036
13775 a/b/one_31_chars_long_file_name_037
13776 a/b/one_31_chars_long_file_name_038
13777 a/b/one_31_chars_long_file_name_039
13778 a/b/one_31_chars_long_file_name_040
13779 a/b/one_31_chars_long_file_name_041
13780 a/b/one_31_chars_long_file_name_042
13781 a/b/one_31_chars_long_file_name_043
13782 a/b/one_31_chars_long_file_name_044
13783 a/b/one_31_chars_long_file_name_045
13784 a/b/one_31_chars_long_file_name_046
13785 a/b/one_31_chars_long_file_name_047
13786 a/b/one_31_chars_long_file_name_048
13787 a/b/one_31_chars_long_file_name_049
13788 a/b/one_31_chars_long_file_name_050
13789 a/b/one_31_chars_long_file_name_051
13790 a/b/one_31_chars_long_file_name_052
13791 a/b/one_31_chars_long_file_name_053
13792 a/b/one_31_chars_long_file_name_054
13793 a/b/one_31_chars_long_file_name_055
13794 a/b/one_31_chars_long_file_name_056
13795 a/b/one_31_chars_long_file_name_057
13796 a/b/one_31_chars_long_file_name_058
13797 a/b/one_31_chars_long_file_name_059
13798 a/b/one_31_chars_long_file_name_060
13799 a/b/one_31_chars_long_file_name_061
13800 a/b/one_31_chars_long_file_name_062
13801 a/b/one_31_chars_long_file_name_063
13802 a/b/one_31_chars_long_file_name_064
13803 a/b/one_31_chars_long_file_name_065
13804 a/b/one_31_chars_long_file_name_066
13805 a/b/one_31_chars_long_file_name_067
13806 a/b/one_31_chars_long_file_name_068
13807 a/b/one_31_chars_long_file_name_069
13808 a/b/one_31_chars_long_file_name_070
13809 a/b/one_31_chars_long_file_name_071
13810 a/b/one_31_chars_long_file_name_072
13811 a/b/one_31_chars_long_file_name_073
13812 a/b/one_31_chars_long_file_name_074
13813 a/b/one_31_chars_long_file_name_075
13814 a/b/one_31_chars_long_file_name_076
13815 a/b/one_31_chars_long_file_name_077
13816 a/b/one_31_chars_long_file_name_078
13817 a/b/one_31_chars_long_file_name_079
13818 a/b/one_31_chars_long_file_name_080
13819 a/b/one_31_chars_long_file_name_081
13820 a/b/one_31_chars_long_file_name_082
13821 a/b/one_31_chars_long_file_name_083
13822 a/b/one_31_chars_long_file_name_084
13823 a/b/one_31_chars_long_file_name_085
13824 a/b/one_31_chars_long_file_name_086
13825 a/b/one_31_chars_long_file_name_087
13826 a/b/one_31_chars_long_file_name_088
13827 a/b/one_31_chars_long_file_name_089
13828 a/b/one_31_chars_long_file_name_090
13829 a/b/one_31_chars_long_file_name_091
13830 a/b/one_31_chars_long_file_name_092
13831 a/b/one_31_chars_long_file_name_093
13832 a/b/one_31_chars_long_file_name_094
13833 a/b/one_31_chars_long_file_name_095
13834 a/b/one_31_chars_long_file_name_096
13835 a/b/one_31_chars_long_file_name_097
13836 a/b/one_31_chars_long_file_name_098
13837 a/b/one_31_chars_long_file_name_099
13838 a/b/one_31_chars_long_file_name_100
13839 a/b/one_31_chars_long_file_name_101
13840 a/b/one_31_chars_long_file_name_102
13841 a/b/one_31_chars_long_file_name_103
13842 a/b/one_31_chars_long_file_name_104
13843 a/b/one_31_chars_long_file_name_105
13844 a/b/one_31_chars_long_file_name_106
13845 a/b/one_31_chars_long_file_name_107
13846 a/b/one_31_chars_long_file_name_108
13847 a/b/one_31_chars_long_file_name_109
13848 a/b/one_31_chars_long_file_name_110
13849 a/b/one_31_chars_long_file_name_111
13850 a/b/one_31_chars_long_file_name_112
13851 a/b/one_31_chars_long_file_name_113
13852 a/b/one_31_chars_long_file_name_114
13853 a/b/one_31_chars_long_file_name_115
13854 a/b/one_31_chars_long_file_name_116
13855 a/b/one_31_chars_long_file_name_117
13856 a/b/one_31_chars_long_file_name_118
13857 a/b/one_31_chars_long_file_name_119
13858 a/b/one_31_chars_long_file_name_120
13859 a/b/one_31_chars_long_file_name_121
13860 a/b/one_31_chars_long_file_name_122
13861 a/b/one_31_chars_long_file_name_123
13862 a/b/one_31_chars_long_file_name_124
13863 a/b/one_31_chars_long_file_name_125
13864 a/b/one_31_chars_long_file_name_126
13865 a/b/one_31_chars_long_file_name_127
13866 a/b/one_31_chars_long_file_name_128
13867 a/b/one_31_chars_long_file_name_129
13868 a/b/one_31_chars_long_file_name_130
13869 a/b/one_31_chars_long_file_name_131
13870 a/b/one_31_chars_long_file_name_132
13871 a/b/one_31_chars_long_file_name_133
13872 a/b/one_31_chars_long_file_name_134
13873 a/b/one_31_chars_long_file_name_135
13874 a/b/one_31_chars_long_file_name_136
13875 a/b/one_31_chars_long_file_name_137
13876 a/b/one_31_chars_long_file_name_138
13877 a/b/one_31_chars_long_file_name_139
13878 a/b/one_31_chars_long_file_name_140
13879 a/b/one_31_chars_long_file_name_141
13880 a/b/one_31_chars_long_file_name_142
13881 Incremental dump
13882 a/
13883 a/c/
13884 " | $at_diff - "$at_stdout" || at_failed=:
13885 case $at_status in
13886    77) echo 77 > "$at_status_file"; exit 77;;
13887    0) ;;
13888    *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0"
13889       at_failed=:;;
13890 esac
13891 if $at_failed; then
13892
13893
13894   echo 1 > "$at_status_file"
13895   exit 1
13896 fi
13897
13898 $at_traceon
13899
13900               $at_traceoff
13901 echo "$at_srcdir/incr04.at:34:
13902 mkdir oldgnu
13903 (cd oldgnu
13904 TEST_TAR_FORMAT=oldgnu
13905 export TEST_TAR_FORMAT
13906 TAR_OPTIONS=\"-H oldgnu\"
13907 export TAR_OPTIONS
13908 rm -rf *
13909
13910
13911 install-sh -d a/b >/dev/null  || exit 77
13912 awk 'BEGIN {
13913   for (i=1;i<=142;i++)
13914     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
13915   }' < /dev/null | genfile --files-from -
13916
13917 sleep 1
13918
13919 echo \"Initial dump\"
13920 tar cvf a0.tar -g a.sna a
13921 mv a/b a/c
13922 echo \"Incremental dump\"
13923 tar cvf a1.tar -g a.sna a
13924 )"
13925 echo incr04.at:34 >"$at_check_line_file"
13926
13927 at_trace_this=
13928 if test -n "$at_traceon"; then
13929     echo 'Not enabling shell tracing (command contains an embedded newline)'
13930 fi
13931
13932 if test -n "$at_trace_this"; then
13933     ( $at_traceon;
13934 mkdir oldgnu
13935 (cd oldgnu
13936 TEST_TAR_FORMAT=oldgnu
13937 export TEST_TAR_FORMAT
13938 TAR_OPTIONS="-H oldgnu"
13939 export TAR_OPTIONS
13940 rm -rf *
13941
13942
13943 install-sh -d a/b >/dev/null  || exit 77
13944 awk 'BEGIN {
13945   for (i=1;i<=142;i++)
13946     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
13947   }' < /dev/null | genfile --files-from -
13948
13949 sleep 1
13950
13951 echo "Initial dump"
13952 tar cvf a0.tar -g a.sna a
13953 mv a/b a/c
13954 echo "Incremental dump"
13955 tar cvf a1.tar -g a.sna a
13956 ) ) >"$at_stdout" 2>"$at_stder1"
13957     at_status=$?
13958     grep '^ *+' "$at_stder1" >&2
13959     grep -v '^ *+' "$at_stder1" >"$at_stderr"
13960 else
13961     ( :;
13962 mkdir oldgnu
13963 (cd oldgnu
13964 TEST_TAR_FORMAT=oldgnu
13965 export TEST_TAR_FORMAT
13966 TAR_OPTIONS="-H oldgnu"
13967 export TAR_OPTIONS
13968 rm -rf *
13969
13970
13971 install-sh -d a/b >/dev/null  || exit 77
13972 awk 'BEGIN {
13973   for (i=1;i<=142;i++)
13974     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
13975   }' < /dev/null | genfile --files-from -
13976
13977 sleep 1
13978
13979 echo "Initial dump"
13980 tar cvf a0.tar -g a.sna a
13981 mv a/b a/c
13982 echo "Incremental dump"
13983 tar cvf a1.tar -g a.sna a
13984 ) ) >"$at_stdout" 2>"$at_stderr"
13985     at_status=$?
13986 fi
13987
13988 at_failed=false
13989 echo >>"$at_stderr"; echo "tar: a/b: Directory is new
13990 tar: a/c: Directory has been renamed from \`a/b'
13991 " | $at_diff - "$at_stderr" || at_failed=:
13992 echo >>"$at_stdout"; echo "Initial dump
13993 a/
13994 a/b/
13995 a/b/one_31_chars_long_file_name_001
13996 a/b/one_31_chars_long_file_name_002
13997 a/b/one_31_chars_long_file_name_003
13998 a/b/one_31_chars_long_file_name_004
13999 a/b/one_31_chars_long_file_name_005
14000 a/b/one_31_chars_long_file_name_006
14001 a/b/one_31_chars_long_file_name_007
14002 a/b/one_31_chars_long_file_name_008
14003 a/b/one_31_chars_long_file_name_009
14004 a/b/one_31_chars_long_file_name_010
14005 a/b/one_31_chars_long_file_name_011
14006 a/b/one_31_chars_long_file_name_012
14007 a/b/one_31_chars_long_file_name_013
14008 a/b/one_31_chars_long_file_name_014
14009 a/b/one_31_chars_long_file_name_015
14010 a/b/one_31_chars_long_file_name_016
14011 a/b/one_31_chars_long_file_name_017
14012 a/b/one_31_chars_long_file_name_018
14013 a/b/one_31_chars_long_file_name_019
14014 a/b/one_31_chars_long_file_name_020
14015 a/b/one_31_chars_long_file_name_021
14016 a/b/one_31_chars_long_file_name_022
14017 a/b/one_31_chars_long_file_name_023
14018 a/b/one_31_chars_long_file_name_024
14019 a/b/one_31_chars_long_file_name_025
14020 a/b/one_31_chars_long_file_name_026
14021 a/b/one_31_chars_long_file_name_027
14022 a/b/one_31_chars_long_file_name_028
14023 a/b/one_31_chars_long_file_name_029
14024 a/b/one_31_chars_long_file_name_030
14025 a/b/one_31_chars_long_file_name_031
14026 a/b/one_31_chars_long_file_name_032
14027 a/b/one_31_chars_long_file_name_033
14028 a/b/one_31_chars_long_file_name_034
14029 a/b/one_31_chars_long_file_name_035
14030 a/b/one_31_chars_long_file_name_036
14031 a/b/one_31_chars_long_file_name_037
14032 a/b/one_31_chars_long_file_name_038
14033 a/b/one_31_chars_long_file_name_039
14034 a/b/one_31_chars_long_file_name_040
14035 a/b/one_31_chars_long_file_name_041
14036 a/b/one_31_chars_long_file_name_042
14037 a/b/one_31_chars_long_file_name_043
14038 a/b/one_31_chars_long_file_name_044
14039 a/b/one_31_chars_long_file_name_045
14040 a/b/one_31_chars_long_file_name_046
14041 a/b/one_31_chars_long_file_name_047
14042 a/b/one_31_chars_long_file_name_048
14043 a/b/one_31_chars_long_file_name_049
14044 a/b/one_31_chars_long_file_name_050
14045 a/b/one_31_chars_long_file_name_051
14046 a/b/one_31_chars_long_file_name_052
14047 a/b/one_31_chars_long_file_name_053
14048 a/b/one_31_chars_long_file_name_054
14049 a/b/one_31_chars_long_file_name_055
14050 a/b/one_31_chars_long_file_name_056
14051 a/b/one_31_chars_long_file_name_057
14052 a/b/one_31_chars_long_file_name_058
14053 a/b/one_31_chars_long_file_name_059
14054 a/b/one_31_chars_long_file_name_060
14055 a/b/one_31_chars_long_file_name_061
14056 a/b/one_31_chars_long_file_name_062
14057 a/b/one_31_chars_long_file_name_063
14058 a/b/one_31_chars_long_file_name_064
14059 a/b/one_31_chars_long_file_name_065
14060 a/b/one_31_chars_long_file_name_066
14061 a/b/one_31_chars_long_file_name_067
14062 a/b/one_31_chars_long_file_name_068
14063 a/b/one_31_chars_long_file_name_069
14064 a/b/one_31_chars_long_file_name_070
14065 a/b/one_31_chars_long_file_name_071
14066 a/b/one_31_chars_long_file_name_072
14067 a/b/one_31_chars_long_file_name_073
14068 a/b/one_31_chars_long_file_name_074
14069 a/b/one_31_chars_long_file_name_075
14070 a/b/one_31_chars_long_file_name_076
14071 a/b/one_31_chars_long_file_name_077
14072 a/b/one_31_chars_long_file_name_078
14073 a/b/one_31_chars_long_file_name_079
14074 a/b/one_31_chars_long_file_name_080
14075 a/b/one_31_chars_long_file_name_081
14076 a/b/one_31_chars_long_file_name_082
14077 a/b/one_31_chars_long_file_name_083
14078 a/b/one_31_chars_long_file_name_084
14079 a/b/one_31_chars_long_file_name_085
14080 a/b/one_31_chars_long_file_name_086
14081 a/b/one_31_chars_long_file_name_087
14082 a/b/one_31_chars_long_file_name_088
14083 a/b/one_31_chars_long_file_name_089
14084 a/b/one_31_chars_long_file_name_090
14085 a/b/one_31_chars_long_file_name_091
14086 a/b/one_31_chars_long_file_name_092
14087 a/b/one_31_chars_long_file_name_093
14088 a/b/one_31_chars_long_file_name_094
14089 a/b/one_31_chars_long_file_name_095
14090 a/b/one_31_chars_long_file_name_096
14091 a/b/one_31_chars_long_file_name_097
14092 a/b/one_31_chars_long_file_name_098
14093 a/b/one_31_chars_long_file_name_099
14094 a/b/one_31_chars_long_file_name_100
14095 a/b/one_31_chars_long_file_name_101
14096 a/b/one_31_chars_long_file_name_102
14097 a/b/one_31_chars_long_file_name_103
14098 a/b/one_31_chars_long_file_name_104
14099 a/b/one_31_chars_long_file_name_105
14100 a/b/one_31_chars_long_file_name_106
14101 a/b/one_31_chars_long_file_name_107
14102 a/b/one_31_chars_long_file_name_108
14103 a/b/one_31_chars_long_file_name_109
14104 a/b/one_31_chars_long_file_name_110
14105 a/b/one_31_chars_long_file_name_111
14106 a/b/one_31_chars_long_file_name_112
14107 a/b/one_31_chars_long_file_name_113
14108 a/b/one_31_chars_long_file_name_114
14109 a/b/one_31_chars_long_file_name_115
14110 a/b/one_31_chars_long_file_name_116
14111 a/b/one_31_chars_long_file_name_117
14112 a/b/one_31_chars_long_file_name_118
14113 a/b/one_31_chars_long_file_name_119
14114 a/b/one_31_chars_long_file_name_120
14115 a/b/one_31_chars_long_file_name_121
14116 a/b/one_31_chars_long_file_name_122
14117 a/b/one_31_chars_long_file_name_123
14118 a/b/one_31_chars_long_file_name_124
14119 a/b/one_31_chars_long_file_name_125
14120 a/b/one_31_chars_long_file_name_126
14121 a/b/one_31_chars_long_file_name_127
14122 a/b/one_31_chars_long_file_name_128
14123 a/b/one_31_chars_long_file_name_129
14124 a/b/one_31_chars_long_file_name_130
14125 a/b/one_31_chars_long_file_name_131
14126 a/b/one_31_chars_long_file_name_132
14127 a/b/one_31_chars_long_file_name_133
14128 a/b/one_31_chars_long_file_name_134
14129 a/b/one_31_chars_long_file_name_135
14130 a/b/one_31_chars_long_file_name_136
14131 a/b/one_31_chars_long_file_name_137
14132 a/b/one_31_chars_long_file_name_138
14133 a/b/one_31_chars_long_file_name_139
14134 a/b/one_31_chars_long_file_name_140
14135 a/b/one_31_chars_long_file_name_141
14136 a/b/one_31_chars_long_file_name_142
14137 Incremental dump
14138 a/
14139 a/c/
14140 " | $at_diff - "$at_stdout" || at_failed=:
14141 case $at_status in
14142    77) echo 77 > "$at_status_file"; exit 77;;
14143    0) ;;
14144    *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0"
14145       at_failed=:;;
14146 esac
14147 if $at_failed; then
14148
14149
14150   echo 1 > "$at_status_file"
14151   exit 1
14152 fi
14153
14154 $at_traceon
14155
14156               $at_traceoff
14157 echo "$at_srcdir/incr04.at:34:
14158 mkdir posix
14159 (cd posix
14160 TEST_TAR_FORMAT=posix
14161 export TEST_TAR_FORMAT
14162 TAR_OPTIONS=\"-H posix\"
14163 export TAR_OPTIONS
14164 rm -rf *
14165
14166
14167 install-sh -d a/b >/dev/null  || exit 77
14168 awk 'BEGIN {
14169   for (i=1;i<=142;i++)
14170     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
14171   }' < /dev/null | genfile --files-from -
14172
14173 sleep 1
14174
14175 echo \"Initial dump\"
14176 tar cvf a0.tar -g a.sna a
14177 mv a/b a/c
14178 echo \"Incremental dump\"
14179 tar cvf a1.tar -g a.sna a
14180 )"
14181 echo incr04.at:34 >"$at_check_line_file"
14182
14183 at_trace_this=
14184 if test -n "$at_traceon"; then
14185     echo 'Not enabling shell tracing (command contains an embedded newline)'
14186 fi
14187
14188 if test -n "$at_trace_this"; then
14189     ( $at_traceon;
14190 mkdir posix
14191 (cd posix
14192 TEST_TAR_FORMAT=posix
14193 export TEST_TAR_FORMAT
14194 TAR_OPTIONS="-H posix"
14195 export TAR_OPTIONS
14196 rm -rf *
14197
14198
14199 install-sh -d a/b >/dev/null  || exit 77
14200 awk 'BEGIN {
14201   for (i=1;i<=142;i++)
14202     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
14203   }' < /dev/null | genfile --files-from -
14204
14205 sleep 1
14206
14207 echo "Initial dump"
14208 tar cvf a0.tar -g a.sna a
14209 mv a/b a/c
14210 echo "Incremental dump"
14211 tar cvf a1.tar -g a.sna a
14212 ) ) >"$at_stdout" 2>"$at_stder1"
14213     at_status=$?
14214     grep '^ *+' "$at_stder1" >&2
14215     grep -v '^ *+' "$at_stder1" >"$at_stderr"
14216 else
14217     ( :;
14218 mkdir posix
14219 (cd posix
14220 TEST_TAR_FORMAT=posix
14221 export TEST_TAR_FORMAT
14222 TAR_OPTIONS="-H posix"
14223 export TAR_OPTIONS
14224 rm -rf *
14225
14226
14227 install-sh -d a/b >/dev/null  || exit 77
14228 awk 'BEGIN {
14229   for (i=1;i<=142;i++)
14230     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
14231   }' < /dev/null | genfile --files-from -
14232
14233 sleep 1
14234
14235 echo "Initial dump"
14236 tar cvf a0.tar -g a.sna a
14237 mv a/b a/c
14238 echo "Incremental dump"
14239 tar cvf a1.tar -g a.sna a
14240 ) ) >"$at_stdout" 2>"$at_stderr"
14241     at_status=$?
14242 fi
14243
14244 at_failed=false
14245 echo >>"$at_stderr"; echo "tar: a/b: Directory is new
14246 tar: a/c: Directory has been renamed from \`a/b'
14247 " | $at_diff - "$at_stderr" || at_failed=:
14248 echo >>"$at_stdout"; echo "Initial dump
14249 a/
14250 a/b/
14251 a/b/one_31_chars_long_file_name_001
14252 a/b/one_31_chars_long_file_name_002
14253 a/b/one_31_chars_long_file_name_003
14254 a/b/one_31_chars_long_file_name_004
14255 a/b/one_31_chars_long_file_name_005
14256 a/b/one_31_chars_long_file_name_006
14257 a/b/one_31_chars_long_file_name_007
14258 a/b/one_31_chars_long_file_name_008
14259 a/b/one_31_chars_long_file_name_009
14260 a/b/one_31_chars_long_file_name_010
14261 a/b/one_31_chars_long_file_name_011
14262 a/b/one_31_chars_long_file_name_012
14263 a/b/one_31_chars_long_file_name_013
14264 a/b/one_31_chars_long_file_name_014
14265 a/b/one_31_chars_long_file_name_015
14266 a/b/one_31_chars_long_file_name_016
14267 a/b/one_31_chars_long_file_name_017
14268 a/b/one_31_chars_long_file_name_018
14269 a/b/one_31_chars_long_file_name_019
14270 a/b/one_31_chars_long_file_name_020
14271 a/b/one_31_chars_long_file_name_021
14272 a/b/one_31_chars_long_file_name_022
14273 a/b/one_31_chars_long_file_name_023
14274 a/b/one_31_chars_long_file_name_024
14275 a/b/one_31_chars_long_file_name_025
14276 a/b/one_31_chars_long_file_name_026
14277 a/b/one_31_chars_long_file_name_027
14278 a/b/one_31_chars_long_file_name_028
14279 a/b/one_31_chars_long_file_name_029
14280 a/b/one_31_chars_long_file_name_030
14281 a/b/one_31_chars_long_file_name_031
14282 a/b/one_31_chars_long_file_name_032
14283 a/b/one_31_chars_long_file_name_033
14284 a/b/one_31_chars_long_file_name_034
14285 a/b/one_31_chars_long_file_name_035
14286 a/b/one_31_chars_long_file_name_036
14287 a/b/one_31_chars_long_file_name_037
14288 a/b/one_31_chars_long_file_name_038
14289 a/b/one_31_chars_long_file_name_039
14290 a/b/one_31_chars_long_file_name_040
14291 a/b/one_31_chars_long_file_name_041
14292 a/b/one_31_chars_long_file_name_042
14293 a/b/one_31_chars_long_file_name_043
14294 a/b/one_31_chars_long_file_name_044
14295 a/b/one_31_chars_long_file_name_045
14296 a/b/one_31_chars_long_file_name_046
14297 a/b/one_31_chars_long_file_name_047
14298 a/b/one_31_chars_long_file_name_048
14299 a/b/one_31_chars_long_file_name_049
14300 a/b/one_31_chars_long_file_name_050
14301 a/b/one_31_chars_long_file_name_051
14302 a/b/one_31_chars_long_file_name_052
14303 a/b/one_31_chars_long_file_name_053
14304 a/b/one_31_chars_long_file_name_054
14305 a/b/one_31_chars_long_file_name_055
14306 a/b/one_31_chars_long_file_name_056
14307 a/b/one_31_chars_long_file_name_057
14308 a/b/one_31_chars_long_file_name_058
14309 a/b/one_31_chars_long_file_name_059
14310 a/b/one_31_chars_long_file_name_060
14311 a/b/one_31_chars_long_file_name_061
14312 a/b/one_31_chars_long_file_name_062
14313 a/b/one_31_chars_long_file_name_063
14314 a/b/one_31_chars_long_file_name_064
14315 a/b/one_31_chars_long_file_name_065
14316 a/b/one_31_chars_long_file_name_066
14317 a/b/one_31_chars_long_file_name_067
14318 a/b/one_31_chars_long_file_name_068
14319 a/b/one_31_chars_long_file_name_069
14320 a/b/one_31_chars_long_file_name_070
14321 a/b/one_31_chars_long_file_name_071
14322 a/b/one_31_chars_long_file_name_072
14323 a/b/one_31_chars_long_file_name_073
14324 a/b/one_31_chars_long_file_name_074
14325 a/b/one_31_chars_long_file_name_075
14326 a/b/one_31_chars_long_file_name_076
14327 a/b/one_31_chars_long_file_name_077
14328 a/b/one_31_chars_long_file_name_078
14329 a/b/one_31_chars_long_file_name_079
14330 a/b/one_31_chars_long_file_name_080
14331 a/b/one_31_chars_long_file_name_081
14332 a/b/one_31_chars_long_file_name_082
14333 a/b/one_31_chars_long_file_name_083
14334 a/b/one_31_chars_long_file_name_084
14335 a/b/one_31_chars_long_file_name_085
14336 a/b/one_31_chars_long_file_name_086
14337 a/b/one_31_chars_long_file_name_087
14338 a/b/one_31_chars_long_file_name_088
14339 a/b/one_31_chars_long_file_name_089
14340 a/b/one_31_chars_long_file_name_090
14341 a/b/one_31_chars_long_file_name_091
14342 a/b/one_31_chars_long_file_name_092
14343 a/b/one_31_chars_long_file_name_093
14344 a/b/one_31_chars_long_file_name_094
14345 a/b/one_31_chars_long_file_name_095
14346 a/b/one_31_chars_long_file_name_096
14347 a/b/one_31_chars_long_file_name_097
14348 a/b/one_31_chars_long_file_name_098
14349 a/b/one_31_chars_long_file_name_099
14350 a/b/one_31_chars_long_file_name_100
14351 a/b/one_31_chars_long_file_name_101
14352 a/b/one_31_chars_long_file_name_102
14353 a/b/one_31_chars_long_file_name_103
14354 a/b/one_31_chars_long_file_name_104
14355 a/b/one_31_chars_long_file_name_105
14356 a/b/one_31_chars_long_file_name_106
14357 a/b/one_31_chars_long_file_name_107
14358 a/b/one_31_chars_long_file_name_108
14359 a/b/one_31_chars_long_file_name_109
14360 a/b/one_31_chars_long_file_name_110
14361 a/b/one_31_chars_long_file_name_111
14362 a/b/one_31_chars_long_file_name_112
14363 a/b/one_31_chars_long_file_name_113
14364 a/b/one_31_chars_long_file_name_114
14365 a/b/one_31_chars_long_file_name_115
14366 a/b/one_31_chars_long_file_name_116
14367 a/b/one_31_chars_long_file_name_117
14368 a/b/one_31_chars_long_file_name_118
14369 a/b/one_31_chars_long_file_name_119
14370 a/b/one_31_chars_long_file_name_120
14371 a/b/one_31_chars_long_file_name_121
14372 a/b/one_31_chars_long_file_name_122
14373 a/b/one_31_chars_long_file_name_123
14374 a/b/one_31_chars_long_file_name_124
14375 a/b/one_31_chars_long_file_name_125
14376 a/b/one_31_chars_long_file_name_126
14377 a/b/one_31_chars_long_file_name_127
14378 a/b/one_31_chars_long_file_name_128
14379 a/b/one_31_chars_long_file_name_129
14380 a/b/one_31_chars_long_file_name_130
14381 a/b/one_31_chars_long_file_name_131
14382 a/b/one_31_chars_long_file_name_132
14383 a/b/one_31_chars_long_file_name_133
14384 a/b/one_31_chars_long_file_name_134
14385 a/b/one_31_chars_long_file_name_135
14386 a/b/one_31_chars_long_file_name_136
14387 a/b/one_31_chars_long_file_name_137
14388 a/b/one_31_chars_long_file_name_138
14389 a/b/one_31_chars_long_file_name_139
14390 a/b/one_31_chars_long_file_name_140
14391 a/b/one_31_chars_long_file_name_141
14392 a/b/one_31_chars_long_file_name_142
14393 Incremental dump
14394 a/
14395 a/c/
14396 " | $at_diff - "$at_stdout" || at_failed=:
14397 case $at_status in
14398    77) echo 77 > "$at_status_file"; exit 77;;
14399    0) ;;
14400    *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0"
14401       at_failed=:;;
14402 esac
14403 if $at_failed; then
14404
14405
14406   echo 1 > "$at_status_file"
14407   exit 1
14408 fi
14409
14410 $at_traceon
14411
14412
14413
14414
14415       $at_traceoff
14416       $at_times_p && times >"$at_times_file"
14417     ) 5>&1 2>&1 | eval $at_tee_pipe
14418     at_status=`cat "$at_status_file"`
14419     ;;
14420
14421   33 ) # 33. rename01.at:24: renamed dirs in incrementals
14422     at_setup_line='rename01.at:24'
14423     at_desc="renamed dirs in incrementals"
14424     $at_quiet $ECHO_N " 33: renamed dirs in incrementals                   $ECHO_C"
14425     at_xfail=no
14426       test -f $XFAILFILE && at_xfail=yes
14427     echo "#                             -*- compilation -*-" >> "$at_group_log"
14428     (
14429       echo "33. rename01.at:24: testing ..."
14430       $at_traceon
14431
14432
14433
14434
14435
14436   $at_traceoff
14437 echo "$at_srcdir/rename01.at:27:
14438 mkdir gnu
14439 (cd gnu
14440 TEST_TAR_FORMAT=gnu
14441 export TEST_TAR_FORMAT
14442 TAR_OPTIONS=\"-H gnu\"
14443 export TAR_OPTIONS
14444 rm -rf *
14445
14446
14447 test -z "`sort < /dev/null 2>&1`" || exit 77
14448
14449
14450 mkdir foo
14451 genfile --file foo/file1
14452 genfile --file foo/file2
14453 mkdir foo/bar
14454 genfile --file foo/bar/file
14455
14456 echo \"Creating base archive\"
14457 tar -g incr -cf arch.1 -v foo
14458
14459 mv foo/bar foo/baz
14460
14461 echo \"Creating incremental archive\"
14462 tar -g incr -cf arch.2 -v foo
14463
14464 mv foo old
14465
14466 tar xfg arch.1 /dev/null
14467
14468 echo \"Begin directory listing 1\"
14469 find foo | sort
14470 echo \"End directory listing 1\"
14471
14472 tar xfg arch.2 /dev/null
14473 echo Begin directory listing 2
14474 find foo | sort
14475 echo End directory listing 2
14476 )"
14477 echo rename01.at:27 >"$at_check_line_file"
14478
14479 at_trace_this=
14480 if test -n "$at_traceon"; then
14481     echo 'Not enabling shell tracing (command contains an embedded newline)'
14482 fi
14483
14484 if test -n "$at_trace_this"; then
14485     ( $at_traceon;
14486 mkdir gnu
14487 (cd gnu
14488 TEST_TAR_FORMAT=gnu
14489 export TEST_TAR_FORMAT
14490 TAR_OPTIONS="-H gnu"
14491 export TAR_OPTIONS
14492 rm -rf *
14493
14494
14495 test -z "`sort < /dev/null 2>&1`" || exit 77
14496
14497
14498 mkdir foo
14499 genfile --file foo/file1
14500 genfile --file foo/file2
14501 mkdir foo/bar
14502 genfile --file foo/bar/file
14503
14504 echo "Creating base archive"
14505 tar -g incr -cf arch.1 -v foo
14506
14507 mv foo/bar foo/baz
14508
14509 echo "Creating incremental archive"
14510 tar -g incr -cf arch.2 -v foo
14511
14512 mv foo old
14513
14514 tar xfg arch.1 /dev/null
14515
14516 echo "Begin directory listing 1"
14517 find foo | sort
14518 echo "End directory listing 1"
14519
14520 tar xfg arch.2 /dev/null
14521 echo Begin directory listing 2
14522 find foo | sort
14523 echo End directory listing 2
14524 ) ) >"$at_stdout" 2>"$at_stder1"
14525     at_status=$?
14526     grep '^ *+' "$at_stder1" >&2
14527     grep -v '^ *+' "$at_stder1" >"$at_stderr"
14528 else
14529     ( :;
14530 mkdir gnu
14531 (cd gnu
14532 TEST_TAR_FORMAT=gnu
14533 export TEST_TAR_FORMAT
14534 TAR_OPTIONS="-H gnu"
14535 export TAR_OPTIONS
14536 rm -rf *
14537
14538
14539 test -z "`sort < /dev/null 2>&1`" || exit 77
14540
14541
14542 mkdir foo
14543 genfile --file foo/file1
14544 genfile --file foo/file2
14545 mkdir foo/bar
14546 genfile --file foo/bar/file
14547
14548 echo "Creating base archive"
14549 tar -g incr -cf arch.1 -v foo
14550
14551 mv foo/bar foo/baz
14552
14553 echo "Creating incremental archive"
14554 tar -g incr -cf arch.2 -v foo
14555
14556 mv foo old
14557
14558 tar xfg arch.1 /dev/null
14559
14560 echo "Begin directory listing 1"
14561 find foo | sort
14562 echo "End directory listing 1"
14563
14564 tar xfg arch.2 /dev/null
14565 echo Begin directory listing 2
14566 find foo | sort
14567 echo End directory listing 2
14568 ) ) >"$at_stdout" 2>"$at_stderr"
14569     at_status=$?
14570 fi
14571
14572 at_failed=false
14573 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
14574 tar: foo/baz: Directory has been renamed from \`foo/bar'
14575 " | $at_diff - "$at_stderr" || at_failed=:
14576 echo >>"$at_stdout"; echo "Creating base archive
14577 foo/
14578 foo/bar/
14579 foo/file1
14580 foo/file2
14581 foo/bar/file
14582 Creating incremental archive
14583 foo/
14584 foo/baz/
14585 Begin directory listing 1
14586 foo
14587 foo/bar
14588 foo/bar/file
14589 foo/file1
14590 foo/file2
14591 End directory listing 1
14592 Begin directory listing 2
14593 foo
14594 foo/baz
14595 foo/baz/file
14596 foo/file1
14597 foo/file2
14598 End directory listing 2
14599 " | $at_diff - "$at_stdout" || at_failed=:
14600 case $at_status in
14601    77) echo 77 > "$at_status_file"; exit 77;;
14602    0) ;;
14603    *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0"
14604       at_failed=:;;
14605 esac
14606 if $at_failed; then
14607
14608
14609   echo 1 > "$at_status_file"
14610   exit 1
14611 fi
14612
14613 $at_traceon
14614
14615               $at_traceoff
14616 echo "$at_srcdir/rename01.at:27:
14617 mkdir oldgnu
14618 (cd oldgnu
14619 TEST_TAR_FORMAT=oldgnu
14620 export TEST_TAR_FORMAT
14621 TAR_OPTIONS=\"-H oldgnu\"
14622 export TAR_OPTIONS
14623 rm -rf *
14624
14625
14626 test -z "`sort < /dev/null 2>&1`" || exit 77
14627
14628
14629 mkdir foo
14630 genfile --file foo/file1
14631 genfile --file foo/file2
14632 mkdir foo/bar
14633 genfile --file foo/bar/file
14634
14635 echo \"Creating base archive\"
14636 tar -g incr -cf arch.1 -v foo
14637
14638 mv foo/bar foo/baz
14639
14640 echo \"Creating incremental archive\"
14641 tar -g incr -cf arch.2 -v foo
14642
14643 mv foo old
14644
14645 tar xfg arch.1 /dev/null
14646
14647 echo \"Begin directory listing 1\"
14648 find foo | sort
14649 echo \"End directory listing 1\"
14650
14651 tar xfg arch.2 /dev/null
14652 echo Begin directory listing 2
14653 find foo | sort
14654 echo End directory listing 2
14655 )"
14656 echo rename01.at:27 >"$at_check_line_file"
14657
14658 at_trace_this=
14659 if test -n "$at_traceon"; then
14660     echo 'Not enabling shell tracing (command contains an embedded newline)'
14661 fi
14662
14663 if test -n "$at_trace_this"; then
14664     ( $at_traceon;
14665 mkdir oldgnu
14666 (cd oldgnu
14667 TEST_TAR_FORMAT=oldgnu
14668 export TEST_TAR_FORMAT
14669 TAR_OPTIONS="-H oldgnu"
14670 export TAR_OPTIONS
14671 rm -rf *
14672
14673
14674 test -z "`sort < /dev/null 2>&1`" || exit 77
14675
14676
14677 mkdir foo
14678 genfile --file foo/file1
14679 genfile --file foo/file2
14680 mkdir foo/bar
14681 genfile --file foo/bar/file
14682
14683 echo "Creating base archive"
14684 tar -g incr -cf arch.1 -v foo
14685
14686 mv foo/bar foo/baz
14687
14688 echo "Creating incremental archive"
14689 tar -g incr -cf arch.2 -v foo
14690
14691 mv foo old
14692
14693 tar xfg arch.1 /dev/null
14694
14695 echo "Begin directory listing 1"
14696 find foo | sort
14697 echo "End directory listing 1"
14698
14699 tar xfg arch.2 /dev/null
14700 echo Begin directory listing 2
14701 find foo | sort
14702 echo End directory listing 2
14703 ) ) >"$at_stdout" 2>"$at_stder1"
14704     at_status=$?
14705     grep '^ *+' "$at_stder1" >&2
14706     grep -v '^ *+' "$at_stder1" >"$at_stderr"
14707 else
14708     ( :;
14709 mkdir oldgnu
14710 (cd oldgnu
14711 TEST_TAR_FORMAT=oldgnu
14712 export TEST_TAR_FORMAT
14713 TAR_OPTIONS="-H oldgnu"
14714 export TAR_OPTIONS
14715 rm -rf *
14716
14717
14718 test -z "`sort < /dev/null 2>&1`" || exit 77
14719
14720
14721 mkdir foo
14722 genfile --file foo/file1
14723 genfile --file foo/file2
14724 mkdir foo/bar
14725 genfile --file foo/bar/file
14726
14727 echo "Creating base archive"
14728 tar -g incr -cf arch.1 -v foo
14729
14730 mv foo/bar foo/baz
14731
14732 echo "Creating incremental archive"
14733 tar -g incr -cf arch.2 -v foo
14734
14735 mv foo old
14736
14737 tar xfg arch.1 /dev/null
14738
14739 echo "Begin directory listing 1"
14740 find foo | sort
14741 echo "End directory listing 1"
14742
14743 tar xfg arch.2 /dev/null
14744 echo Begin directory listing 2
14745 find foo | sort
14746 echo End directory listing 2
14747 ) ) >"$at_stdout" 2>"$at_stderr"
14748     at_status=$?
14749 fi
14750
14751 at_failed=false
14752 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
14753 tar: foo/baz: Directory has been renamed from \`foo/bar'
14754 " | $at_diff - "$at_stderr" || at_failed=:
14755 echo >>"$at_stdout"; echo "Creating base archive
14756 foo/
14757 foo/bar/
14758 foo/file1
14759 foo/file2
14760 foo/bar/file
14761 Creating incremental archive
14762 foo/
14763 foo/baz/
14764 Begin directory listing 1
14765 foo
14766 foo/bar
14767 foo/bar/file
14768 foo/file1
14769 foo/file2
14770 End directory listing 1
14771 Begin directory listing 2
14772 foo
14773 foo/baz
14774 foo/baz/file
14775 foo/file1
14776 foo/file2
14777 End directory listing 2
14778 " | $at_diff - "$at_stdout" || at_failed=:
14779 case $at_status in
14780    77) echo 77 > "$at_status_file"; exit 77;;
14781    0) ;;
14782    *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0"
14783       at_failed=:;;
14784 esac
14785 if $at_failed; then
14786
14787
14788   echo 1 > "$at_status_file"
14789   exit 1
14790 fi
14791
14792 $at_traceon
14793
14794               $at_traceoff
14795 echo "$at_srcdir/rename01.at:27:
14796 mkdir posix
14797 (cd posix
14798 TEST_TAR_FORMAT=posix
14799 export TEST_TAR_FORMAT
14800 TAR_OPTIONS=\"-H posix\"
14801 export TAR_OPTIONS
14802 rm -rf *
14803
14804
14805 test -z "`sort < /dev/null 2>&1`" || exit 77
14806
14807
14808 mkdir foo
14809 genfile --file foo/file1
14810 genfile --file foo/file2
14811 mkdir foo/bar
14812 genfile --file foo/bar/file
14813
14814 echo \"Creating base archive\"
14815 tar -g incr -cf arch.1 -v foo
14816
14817 mv foo/bar foo/baz
14818
14819 echo \"Creating incremental archive\"
14820 tar -g incr -cf arch.2 -v foo
14821
14822 mv foo old
14823
14824 tar xfg arch.1 /dev/null
14825
14826 echo \"Begin directory listing 1\"
14827 find foo | sort
14828 echo \"End directory listing 1\"
14829
14830 tar xfg arch.2 /dev/null
14831 echo Begin directory listing 2
14832 find foo | sort
14833 echo End directory listing 2
14834 )"
14835 echo rename01.at:27 >"$at_check_line_file"
14836
14837 at_trace_this=
14838 if test -n "$at_traceon"; then
14839     echo 'Not enabling shell tracing (command contains an embedded newline)'
14840 fi
14841
14842 if test -n "$at_trace_this"; then
14843     ( $at_traceon;
14844 mkdir posix
14845 (cd posix
14846 TEST_TAR_FORMAT=posix
14847 export TEST_TAR_FORMAT
14848 TAR_OPTIONS="-H posix"
14849 export TAR_OPTIONS
14850 rm -rf *
14851
14852
14853 test -z "`sort < /dev/null 2>&1`" || exit 77
14854
14855
14856 mkdir foo
14857 genfile --file foo/file1
14858 genfile --file foo/file2
14859 mkdir foo/bar
14860 genfile --file foo/bar/file
14861
14862 echo "Creating base archive"
14863 tar -g incr -cf arch.1 -v foo
14864
14865 mv foo/bar foo/baz
14866
14867 echo "Creating incremental archive"
14868 tar -g incr -cf arch.2 -v foo
14869
14870 mv foo old
14871
14872 tar xfg arch.1 /dev/null
14873
14874 echo "Begin directory listing 1"
14875 find foo | sort
14876 echo "End directory listing 1"
14877
14878 tar xfg arch.2 /dev/null
14879 echo Begin directory listing 2
14880 find foo | sort
14881 echo End directory listing 2
14882 ) ) >"$at_stdout" 2>"$at_stder1"
14883     at_status=$?
14884     grep '^ *+' "$at_stder1" >&2
14885     grep -v '^ *+' "$at_stder1" >"$at_stderr"
14886 else
14887     ( :;
14888 mkdir posix
14889 (cd posix
14890 TEST_TAR_FORMAT=posix
14891 export TEST_TAR_FORMAT
14892 TAR_OPTIONS="-H posix"
14893 export TAR_OPTIONS
14894 rm -rf *
14895
14896
14897 test -z "`sort < /dev/null 2>&1`" || exit 77
14898
14899
14900 mkdir foo
14901 genfile --file foo/file1
14902 genfile --file foo/file2
14903 mkdir foo/bar
14904 genfile --file foo/bar/file
14905
14906 echo "Creating base archive"
14907 tar -g incr -cf arch.1 -v foo
14908
14909 mv foo/bar foo/baz
14910
14911 echo "Creating incremental archive"
14912 tar -g incr -cf arch.2 -v foo
14913
14914 mv foo old
14915
14916 tar xfg arch.1 /dev/null
14917
14918 echo "Begin directory listing 1"
14919 find foo | sort
14920 echo "End directory listing 1"
14921
14922 tar xfg arch.2 /dev/null
14923 echo Begin directory listing 2
14924 find foo | sort
14925 echo End directory listing 2
14926 ) ) >"$at_stdout" 2>"$at_stderr"
14927     at_status=$?
14928 fi
14929
14930 at_failed=false
14931 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
14932 tar: foo/baz: Directory has been renamed from \`foo/bar'
14933 " | $at_diff - "$at_stderr" || at_failed=:
14934 echo >>"$at_stdout"; echo "Creating base archive
14935 foo/
14936 foo/bar/
14937 foo/file1
14938 foo/file2
14939 foo/bar/file
14940 Creating incremental archive
14941 foo/
14942 foo/baz/
14943 Begin directory listing 1
14944 foo
14945 foo/bar
14946 foo/bar/file
14947 foo/file1
14948 foo/file2
14949 End directory listing 1
14950 Begin directory listing 2
14951 foo
14952 foo/baz
14953 foo/baz/file
14954 foo/file1
14955 foo/file2
14956 End directory listing 2
14957 " | $at_diff - "$at_stdout" || at_failed=:
14958 case $at_status in
14959    77) echo 77 > "$at_status_file"; exit 77;;
14960    0) ;;
14961    *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0"
14962       at_failed=:;;
14963 esac
14964 if $at_failed; then
14965
14966
14967   echo 1 > "$at_status_file"
14968   exit 1
14969 fi
14970
14971 $at_traceon
14972
14973
14974
14975
14976       $at_traceoff
14977       $at_times_p && times >"$at_times_file"
14978     ) 5>&1 2>&1 | eval $at_tee_pipe
14979     at_status=`cat "$at_status_file"`
14980     ;;
14981
14982   34 ) # 34. rename02.at:24: move between hierarchies
14983     at_setup_line='rename02.at:24'
14984     at_desc="move between hierarchies"
14985     $at_quiet $ECHO_N " 34: move between hierarchies                       $ECHO_C"
14986     at_xfail=no
14987       test -f $XFAILFILE && at_xfail=yes
14988     echo "#                             -*- compilation -*-" >> "$at_group_log"
14989     (
14990       echo "34. rename02.at:24: testing ..."
14991       $at_traceon
14992
14993
14994
14995
14996
14997   $at_traceoff
14998 echo "$at_srcdir/rename02.at:27:
14999 mkdir gnu
15000 (cd gnu
15001 TEST_TAR_FORMAT=gnu
15002 export TEST_TAR_FORMAT
15003 TAR_OPTIONS=\"-H gnu\"
15004 export TAR_OPTIONS
15005 rm -rf *
15006
15007
15008 test -z "`sort < /dev/null 2>&1`" || exit 77
15009
15010 mkdir foo
15011 genfile --file foo/file1
15012 genfile --file foo/file2
15013 mkdir foo/bar
15014 genfile --file foo/bar/file.r
15015 mkdir foo/bar/baz
15016 genfile --file foo/bar/baz/file.z
15017
15018 sleep 1
15019
15020 echo \"Creating base archive\"
15021 tar -g incr -cf arch.1 -v foo
15022
15023 mv foo/bar/baz foo
15024
15025 echo \"Creating incremental archive\"
15026 tar -g incr -cf arch.2 -v foo
15027
15028 mv foo old
15029
15030 tar xfg arch.1 /dev/null 2>tmperr
15031 sort tmperr >&2
15032
15033 echo \"Begin directory listing 1\"
15034 find foo | sort
15035 echo \"End directory listing 1\"
15036
15037 tar xfgv arch.2 /dev/null
15038 echo Begin directory listing 2
15039 find foo | sort
15040 echo End directory listing 2
15041 )"
15042 echo rename02.at:27 >"$at_check_line_file"
15043
15044 at_trace_this=
15045 if test -n "$at_traceon"; then
15046     echo 'Not enabling shell tracing (command contains an embedded newline)'
15047 fi
15048
15049 if test -n "$at_trace_this"; then
15050     ( $at_traceon;
15051 mkdir gnu
15052 (cd gnu
15053 TEST_TAR_FORMAT=gnu
15054 export TEST_TAR_FORMAT
15055 TAR_OPTIONS="-H gnu"
15056 export TAR_OPTIONS
15057 rm -rf *
15058
15059
15060 test -z "`sort < /dev/null 2>&1`" || exit 77
15061
15062 mkdir foo
15063 genfile --file foo/file1
15064 genfile --file foo/file2
15065 mkdir foo/bar
15066 genfile --file foo/bar/file.r
15067 mkdir foo/bar/baz
15068 genfile --file foo/bar/baz/file.z
15069
15070 sleep 1
15071
15072 echo "Creating base archive"
15073 tar -g incr -cf arch.1 -v foo
15074
15075 mv foo/bar/baz foo
15076
15077 echo "Creating incremental archive"
15078 tar -g incr -cf arch.2 -v foo
15079
15080 mv foo old
15081
15082 tar xfg arch.1 /dev/null 2>tmperr
15083 sort tmperr >&2
15084
15085 echo "Begin directory listing 1"
15086 find foo | sort
15087 echo "End directory listing 1"
15088
15089 tar xfgv arch.2 /dev/null
15090 echo Begin directory listing 2
15091 find foo | sort
15092 echo End directory listing 2
15093 ) ) >"$at_stdout" 2>"$at_stder1"
15094     at_status=$?
15095     grep '^ *+' "$at_stder1" >&2
15096     grep -v '^ *+' "$at_stder1" >"$at_stderr"
15097 else
15098     ( :;
15099 mkdir gnu
15100 (cd gnu
15101 TEST_TAR_FORMAT=gnu
15102 export TEST_TAR_FORMAT
15103 TAR_OPTIONS="-H gnu"
15104 export TAR_OPTIONS
15105 rm -rf *
15106
15107
15108 test -z "`sort < /dev/null 2>&1`" || exit 77
15109
15110 mkdir foo
15111 genfile --file foo/file1
15112 genfile --file foo/file2
15113 mkdir foo/bar
15114 genfile --file foo/bar/file.r
15115 mkdir foo/bar/baz
15116 genfile --file foo/bar/baz/file.z
15117
15118 sleep 1
15119
15120 echo "Creating base archive"
15121 tar -g incr -cf arch.1 -v foo
15122
15123 mv foo/bar/baz foo
15124
15125 echo "Creating incremental archive"
15126 tar -g incr -cf arch.2 -v foo
15127
15128 mv foo old
15129
15130 tar xfg arch.1 /dev/null 2>tmperr
15131 sort tmperr >&2
15132
15133 echo "Begin directory listing 1"
15134 find foo | sort
15135 echo "End directory listing 1"
15136
15137 tar xfgv arch.2 /dev/null
15138 echo Begin directory listing 2
15139 find foo | sort
15140 echo End directory listing 2
15141 ) ) >"$at_stdout" 2>"$at_stderr"
15142     at_status=$?
15143 fi
15144
15145 at_failed=false
15146 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
15147 tar: foo/bar/baz: Directory is new
15148 tar: foo/baz: Directory has been renamed from \`foo/bar/baz'
15149 " | $at_diff - "$at_stderr" || at_failed=:
15150 echo >>"$at_stdout"; echo "Creating base archive
15151 foo/
15152 foo/bar/
15153 foo/bar/baz/
15154 foo/file1
15155 foo/file2
15156 foo/bar/file.r
15157 foo/bar/baz/file.z
15158 Creating incremental archive
15159 foo/
15160 foo/bar/
15161 foo/baz/
15162 Begin directory listing 1
15163 foo
15164 foo/bar
15165 foo/bar/baz
15166 foo/bar/baz/file.z
15167 foo/bar/file.r
15168 foo/file1
15169 foo/file2
15170 End directory listing 1
15171 foo/
15172 foo/bar/
15173 foo/baz/
15174 Begin directory listing 2
15175 foo
15176 foo/bar
15177 foo/bar/file.r
15178 foo/baz
15179 foo/baz/file.z
15180 foo/file1
15181 foo/file2
15182 End directory listing 2
15183 " | $at_diff - "$at_stdout" || at_failed=:
15184 case $at_status in
15185    77) echo 77 > "$at_status_file"; exit 77;;
15186    0) ;;
15187    *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0"
15188       at_failed=:;;
15189 esac
15190 if $at_failed; then
15191
15192
15193   echo 1 > "$at_status_file"
15194   exit 1
15195 fi
15196
15197 $at_traceon
15198
15199               $at_traceoff
15200 echo "$at_srcdir/rename02.at:27:
15201 mkdir oldgnu
15202 (cd oldgnu
15203 TEST_TAR_FORMAT=oldgnu
15204 export TEST_TAR_FORMAT
15205 TAR_OPTIONS=\"-H oldgnu\"
15206 export TAR_OPTIONS
15207 rm -rf *
15208
15209
15210 test -z "`sort < /dev/null 2>&1`" || exit 77
15211
15212 mkdir foo
15213 genfile --file foo/file1
15214 genfile --file foo/file2
15215 mkdir foo/bar
15216 genfile --file foo/bar/file.r
15217 mkdir foo/bar/baz
15218 genfile --file foo/bar/baz/file.z
15219
15220 sleep 1
15221
15222 echo \"Creating base archive\"
15223 tar -g incr -cf arch.1 -v foo
15224
15225 mv foo/bar/baz foo
15226
15227 echo \"Creating incremental archive\"
15228 tar -g incr -cf arch.2 -v foo
15229
15230 mv foo old
15231
15232 tar xfg arch.1 /dev/null 2>tmperr
15233 sort tmperr >&2
15234
15235 echo \"Begin directory listing 1\"
15236 find foo | sort
15237 echo \"End directory listing 1\"
15238
15239 tar xfgv arch.2 /dev/null
15240 echo Begin directory listing 2
15241 find foo | sort
15242 echo End directory listing 2
15243 )"
15244 echo rename02.at:27 >"$at_check_line_file"
15245
15246 at_trace_this=
15247 if test -n "$at_traceon"; then
15248     echo 'Not enabling shell tracing (command contains an embedded newline)'
15249 fi
15250
15251 if test -n "$at_trace_this"; then
15252     ( $at_traceon;
15253 mkdir oldgnu
15254 (cd oldgnu
15255 TEST_TAR_FORMAT=oldgnu
15256 export TEST_TAR_FORMAT
15257 TAR_OPTIONS="-H oldgnu"
15258 export TAR_OPTIONS
15259 rm -rf *
15260
15261
15262 test -z "`sort < /dev/null 2>&1`" || exit 77
15263
15264 mkdir foo
15265 genfile --file foo/file1
15266 genfile --file foo/file2
15267 mkdir foo/bar
15268 genfile --file foo/bar/file.r
15269 mkdir foo/bar/baz
15270 genfile --file foo/bar/baz/file.z
15271
15272 sleep 1
15273
15274 echo "Creating base archive"
15275 tar -g incr -cf arch.1 -v foo
15276
15277 mv foo/bar/baz foo
15278
15279 echo "Creating incremental archive"
15280 tar -g incr -cf arch.2 -v foo
15281
15282 mv foo old
15283
15284 tar xfg arch.1 /dev/null 2>tmperr
15285 sort tmperr >&2
15286
15287 echo "Begin directory listing 1"
15288 find foo | sort
15289 echo "End directory listing 1"
15290
15291 tar xfgv arch.2 /dev/null
15292 echo Begin directory listing 2
15293 find foo | sort
15294 echo End directory listing 2
15295 ) ) >"$at_stdout" 2>"$at_stder1"
15296     at_status=$?
15297     grep '^ *+' "$at_stder1" >&2
15298     grep -v '^ *+' "$at_stder1" >"$at_stderr"
15299 else
15300     ( :;
15301 mkdir oldgnu
15302 (cd oldgnu
15303 TEST_TAR_FORMAT=oldgnu
15304 export TEST_TAR_FORMAT
15305 TAR_OPTIONS="-H oldgnu"
15306 export TAR_OPTIONS
15307 rm -rf *
15308
15309
15310 test -z "`sort < /dev/null 2>&1`" || exit 77
15311
15312 mkdir foo
15313 genfile --file foo/file1
15314 genfile --file foo/file2
15315 mkdir foo/bar
15316 genfile --file foo/bar/file.r
15317 mkdir foo/bar/baz
15318 genfile --file foo/bar/baz/file.z
15319
15320 sleep 1
15321
15322 echo "Creating base archive"
15323 tar -g incr -cf arch.1 -v foo
15324
15325 mv foo/bar/baz foo
15326
15327 echo "Creating incremental archive"
15328 tar -g incr -cf arch.2 -v foo
15329
15330 mv foo old
15331
15332 tar xfg arch.1 /dev/null 2>tmperr
15333 sort tmperr >&2
15334
15335 echo "Begin directory listing 1"
15336 find foo | sort
15337 echo "End directory listing 1"
15338
15339 tar xfgv arch.2 /dev/null
15340 echo Begin directory listing 2
15341 find foo | sort
15342 echo End directory listing 2
15343 ) ) >"$at_stdout" 2>"$at_stderr"
15344     at_status=$?
15345 fi
15346
15347 at_failed=false
15348 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
15349 tar: foo/bar/baz: Directory is new
15350 tar: foo/baz: Directory has been renamed from \`foo/bar/baz'
15351 " | $at_diff - "$at_stderr" || at_failed=:
15352 echo >>"$at_stdout"; echo "Creating base archive
15353 foo/
15354 foo/bar/
15355 foo/bar/baz/
15356 foo/file1
15357 foo/file2
15358 foo/bar/file.r
15359 foo/bar/baz/file.z
15360 Creating incremental archive
15361 foo/
15362 foo/bar/
15363 foo/baz/
15364 Begin directory listing 1
15365 foo
15366 foo/bar
15367 foo/bar/baz
15368 foo/bar/baz/file.z
15369 foo/bar/file.r
15370 foo/file1
15371 foo/file2
15372 End directory listing 1
15373 foo/
15374 foo/bar/
15375 foo/baz/
15376 Begin directory listing 2
15377 foo
15378 foo/bar
15379 foo/bar/file.r
15380 foo/baz
15381 foo/baz/file.z
15382 foo/file1
15383 foo/file2
15384 End directory listing 2
15385 " | $at_diff - "$at_stdout" || at_failed=:
15386 case $at_status in
15387    77) echo 77 > "$at_status_file"; exit 77;;
15388    0) ;;
15389    *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0"
15390       at_failed=:;;
15391 esac
15392 if $at_failed; then
15393
15394
15395   echo 1 > "$at_status_file"
15396   exit 1
15397 fi
15398
15399 $at_traceon
15400
15401               $at_traceoff
15402 echo "$at_srcdir/rename02.at:27:
15403 mkdir posix
15404 (cd posix
15405 TEST_TAR_FORMAT=posix
15406 export TEST_TAR_FORMAT
15407 TAR_OPTIONS=\"-H posix\"
15408 export TAR_OPTIONS
15409 rm -rf *
15410
15411
15412 test -z "`sort < /dev/null 2>&1`" || exit 77
15413
15414 mkdir foo
15415 genfile --file foo/file1
15416 genfile --file foo/file2
15417 mkdir foo/bar
15418 genfile --file foo/bar/file.r
15419 mkdir foo/bar/baz
15420 genfile --file foo/bar/baz/file.z
15421
15422 sleep 1
15423
15424 echo \"Creating base archive\"
15425 tar -g incr -cf arch.1 -v foo
15426
15427 mv foo/bar/baz foo
15428
15429 echo \"Creating incremental archive\"
15430 tar -g incr -cf arch.2 -v foo
15431
15432 mv foo old
15433
15434 tar xfg arch.1 /dev/null 2>tmperr
15435 sort tmperr >&2
15436
15437 echo \"Begin directory listing 1\"
15438 find foo | sort
15439 echo \"End directory listing 1\"
15440
15441 tar xfgv arch.2 /dev/null
15442 echo Begin directory listing 2
15443 find foo | sort
15444 echo End directory listing 2
15445 )"
15446 echo rename02.at:27 >"$at_check_line_file"
15447
15448 at_trace_this=
15449 if test -n "$at_traceon"; then
15450     echo 'Not enabling shell tracing (command contains an embedded newline)'
15451 fi
15452
15453 if test -n "$at_trace_this"; then
15454     ( $at_traceon;
15455 mkdir posix
15456 (cd posix
15457 TEST_TAR_FORMAT=posix
15458 export TEST_TAR_FORMAT
15459 TAR_OPTIONS="-H posix"
15460 export TAR_OPTIONS
15461 rm -rf *
15462
15463
15464 test -z "`sort < /dev/null 2>&1`" || exit 77
15465
15466 mkdir foo
15467 genfile --file foo/file1
15468 genfile --file foo/file2
15469 mkdir foo/bar
15470 genfile --file foo/bar/file.r
15471 mkdir foo/bar/baz
15472 genfile --file foo/bar/baz/file.z
15473
15474 sleep 1
15475
15476 echo "Creating base archive"
15477 tar -g incr -cf arch.1 -v foo
15478
15479 mv foo/bar/baz foo
15480
15481 echo "Creating incremental archive"
15482 tar -g incr -cf arch.2 -v foo
15483
15484 mv foo old
15485
15486 tar xfg arch.1 /dev/null 2>tmperr
15487 sort tmperr >&2
15488
15489 echo "Begin directory listing 1"
15490 find foo | sort
15491 echo "End directory listing 1"
15492
15493 tar xfgv arch.2 /dev/null
15494 echo Begin directory listing 2
15495 find foo | sort
15496 echo End directory listing 2
15497 ) ) >"$at_stdout" 2>"$at_stder1"
15498     at_status=$?
15499     grep '^ *+' "$at_stder1" >&2
15500     grep -v '^ *+' "$at_stder1" >"$at_stderr"
15501 else
15502     ( :;
15503 mkdir posix
15504 (cd posix
15505 TEST_TAR_FORMAT=posix
15506 export TEST_TAR_FORMAT
15507 TAR_OPTIONS="-H posix"
15508 export TAR_OPTIONS
15509 rm -rf *
15510
15511
15512 test -z "`sort < /dev/null 2>&1`" || exit 77
15513
15514 mkdir foo
15515 genfile --file foo/file1
15516 genfile --file foo/file2
15517 mkdir foo/bar
15518 genfile --file foo/bar/file.r
15519 mkdir foo/bar/baz
15520 genfile --file foo/bar/baz/file.z
15521
15522 sleep 1
15523
15524 echo "Creating base archive"
15525 tar -g incr -cf arch.1 -v foo
15526
15527 mv foo/bar/baz foo
15528
15529 echo "Creating incremental archive"
15530 tar -g incr -cf arch.2 -v foo
15531
15532 mv foo old
15533
15534 tar xfg arch.1 /dev/null 2>tmperr
15535 sort tmperr >&2
15536
15537 echo "Begin directory listing 1"
15538 find foo | sort
15539 echo "End directory listing 1"
15540
15541 tar xfgv arch.2 /dev/null
15542 echo Begin directory listing 2
15543 find foo | sort
15544 echo End directory listing 2
15545 ) ) >"$at_stdout" 2>"$at_stderr"
15546     at_status=$?
15547 fi
15548
15549 at_failed=false
15550 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
15551 tar: foo/bar/baz: Directory is new
15552 tar: foo/baz: Directory has been renamed from \`foo/bar/baz'
15553 " | $at_diff - "$at_stderr" || at_failed=:
15554 echo >>"$at_stdout"; echo "Creating base archive
15555 foo/
15556 foo/bar/
15557 foo/bar/baz/
15558 foo/file1
15559 foo/file2
15560 foo/bar/file.r
15561 foo/bar/baz/file.z
15562 Creating incremental archive
15563 foo/
15564 foo/bar/
15565 foo/baz/
15566 Begin directory listing 1
15567 foo
15568 foo/bar
15569 foo/bar/baz
15570 foo/bar/baz/file.z
15571 foo/bar/file.r
15572 foo/file1
15573 foo/file2
15574 End directory listing 1
15575 foo/
15576 foo/bar/
15577 foo/baz/
15578 Begin directory listing 2
15579 foo
15580 foo/bar
15581 foo/bar/file.r
15582 foo/baz
15583 foo/baz/file.z
15584 foo/file1
15585 foo/file2
15586 End directory listing 2
15587 " | $at_diff - "$at_stdout" || at_failed=:
15588 case $at_status in
15589    77) echo 77 > "$at_status_file"; exit 77;;
15590    0) ;;
15591    *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0"
15592       at_failed=:;;
15593 esac
15594 if $at_failed; then
15595
15596
15597   echo 1 > "$at_status_file"
15598   exit 1
15599 fi
15600
15601 $at_traceon
15602
15603
15604
15605
15606       $at_traceoff
15607       $at_times_p && times >"$at_times_file"
15608     ) 5>&1 2>&1 | eval $at_tee_pipe
15609     at_status=`cat "$at_status_file"`
15610     ;;
15611
15612   35 ) # 35. rename03.at:23: cyclic renames
15613     at_setup_line='rename03.at:23'
15614     at_desc="cyclic renames"
15615     $at_quiet $ECHO_N " 35: cyclic renames                                 $ECHO_C"
15616     at_xfail=no
15617       test -f $XFAILFILE && at_xfail=yes
15618     echo "#                             -*- compilation -*-" >> "$at_group_log"
15619     (
15620       echo "35. rename03.at:23: testing ..."
15621       $at_traceon
15622
15623
15624
15625
15626
15627   $at_traceoff
15628 echo "$at_srcdir/rename03.at:26:
15629 mkdir gnu
15630 (cd gnu
15631 TEST_TAR_FORMAT=gnu
15632 export TEST_TAR_FORMAT
15633 TAR_OPTIONS=\"-H gnu\"
15634 export TAR_OPTIONS
15635 rm -rf *
15636
15637
15638 test -z "`sort < /dev/null 2>&1`" || exit 77
15639
15640
15641 mkdir foo
15642 genfile --file foo/file1
15643 genfile --file foo/file2
15644
15645 mkdir foo/a
15646 genfile --file foo/a/filea
15647
15648 mkdir foo/b
15649 genfile --file foo/b/fileb
15650
15651 mkdir foo/c
15652 genfile --file foo/c/filec
15653
15654 sleep 1
15655
15656 echo \"First dump\"
15657 echo \"First dump\">&2
15658 tar -g incr -cf arch.1 -v foo 2>tmperr
15659 sort tmperr >&2
15660
15661 # Shuffle directories:
15662 (cd foo
15663 mv a \$\$
15664 mv c a
15665 mv b c
15666 mv \$\$ b)
15667
15668 echo \"Second dump\"
15669 echo \"Second dump\" >&2
15670 tar -g incr -cf arch.2 -v foo 2>tmperr
15671 sort tmperr >&2
15672
15673 tar xfg arch.1 /dev/null
15674
15675 echo \"Begin directory listing 1\"
15676 find foo | sort
15677 echo \"End directory listing 1\"
15678
15679 tar xfgv arch.2 /dev/null
15680 echo Begin directory listing 2
15681 find foo | sort
15682 echo End directory listing 2
15683 )"
15684 echo rename03.at:26 >"$at_check_line_file"
15685
15686 at_trace_this=
15687 if test -n "$at_traceon"; then
15688     echo 'Not enabling shell tracing (command contains an embedded newline)'
15689 fi
15690
15691 if test -n "$at_trace_this"; then
15692     ( $at_traceon;
15693 mkdir gnu
15694 (cd gnu
15695 TEST_TAR_FORMAT=gnu
15696 export TEST_TAR_FORMAT
15697 TAR_OPTIONS="-H gnu"
15698 export TAR_OPTIONS
15699 rm -rf *
15700
15701
15702 test -z "`sort < /dev/null 2>&1`" || exit 77
15703
15704
15705 mkdir foo
15706 genfile --file foo/file1
15707 genfile --file foo/file2
15708
15709 mkdir foo/a
15710 genfile --file foo/a/filea
15711
15712 mkdir foo/b
15713 genfile --file foo/b/fileb
15714
15715 mkdir foo/c
15716 genfile --file foo/c/filec
15717
15718 sleep 1
15719
15720 echo "First dump"
15721 echo "First dump">&2
15722 tar -g incr -cf arch.1 -v foo 2>tmperr
15723 sort tmperr >&2
15724
15725 # Shuffle directories:
15726 (cd foo
15727 mv a $$
15728 mv c a
15729 mv b c
15730 mv $$ b)
15731
15732 echo "Second dump"
15733 echo "Second dump" >&2
15734 tar -g incr -cf arch.2 -v foo 2>tmperr
15735 sort tmperr >&2
15736
15737 tar xfg arch.1 /dev/null
15738
15739 echo "Begin directory listing 1"
15740 find foo | sort
15741 echo "End directory listing 1"
15742
15743 tar xfgv arch.2 /dev/null
15744 echo Begin directory listing 2
15745 find foo | sort
15746 echo End directory listing 2
15747 ) ) >"$at_stdout" 2>"$at_stder1"
15748     at_status=$?
15749     grep '^ *+' "$at_stder1" >&2
15750     grep -v '^ *+' "$at_stder1" >"$at_stderr"
15751 else
15752     ( :;
15753 mkdir gnu
15754 (cd gnu
15755 TEST_TAR_FORMAT=gnu
15756 export TEST_TAR_FORMAT
15757 TAR_OPTIONS="-H gnu"
15758 export TAR_OPTIONS
15759 rm -rf *
15760
15761
15762 test -z "`sort < /dev/null 2>&1`" || exit 77
15763
15764
15765 mkdir foo
15766 genfile --file foo/file1
15767 genfile --file foo/file2
15768
15769 mkdir foo/a
15770 genfile --file foo/a/filea
15771
15772 mkdir foo/b
15773 genfile --file foo/b/fileb
15774
15775 mkdir foo/c
15776 genfile --file foo/c/filec
15777
15778 sleep 1
15779
15780 echo "First dump"
15781 echo "First dump">&2
15782 tar -g incr -cf arch.1 -v foo 2>tmperr
15783 sort tmperr >&2
15784
15785 # Shuffle directories:
15786 (cd foo
15787 mv a $$
15788 mv c a
15789 mv b c
15790 mv $$ b)
15791
15792 echo "Second dump"
15793 echo "Second dump" >&2
15794 tar -g incr -cf arch.2 -v foo 2>tmperr
15795 sort tmperr >&2
15796
15797 tar xfg arch.1 /dev/null
15798
15799 echo "Begin directory listing 1"
15800 find foo | sort
15801 echo "End directory listing 1"
15802
15803 tar xfgv arch.2 /dev/null
15804 echo Begin directory listing 2
15805 find foo | sort
15806 echo End directory listing 2
15807 ) ) >"$at_stdout" 2>"$at_stderr"
15808     at_status=$?
15809 fi
15810
15811 at_failed=false
15812 echo >>"$at_stderr"; echo "First dump
15813 tar: foo/a: Directory is new
15814 tar: foo/b: Directory is new
15815 tar: foo/c: Directory is new
15816 Second dump
15817 tar: foo/a: Directory has been renamed from \`foo/c'
15818 tar: foo/b: Directory has been renamed from \`foo/a'
15819 tar: foo/c: Directory has been renamed from \`foo/b'
15820 " | $at_diff - "$at_stderr" || at_failed=:
15821 echo >>"$at_stdout"; echo "First dump
15822 foo/
15823 foo/a/
15824 foo/b/
15825 foo/c/
15826 foo/file1
15827 foo/file2
15828 foo/a/filea
15829 foo/b/fileb
15830 foo/c/filec
15831 Second dump
15832 foo/
15833 foo/a/
15834 foo/b/
15835 foo/c/
15836 Begin directory listing 1
15837 foo
15838 foo/a
15839 foo/a/filea
15840 foo/b
15841 foo/b/fileb
15842 foo/c
15843 foo/c/filec
15844 foo/file1
15845 foo/file2
15846 End directory listing 1
15847 foo/
15848 foo/a/
15849 foo/b/
15850 foo/c/
15851 Begin directory listing 2
15852 foo
15853 foo/a
15854 foo/a/filec
15855 foo/b
15856 foo/b/filea
15857 foo/c
15858 foo/c/fileb
15859 foo/file1
15860 foo/file2
15861 End directory listing 2
15862 " | $at_diff - "$at_stdout" || at_failed=:
15863 case $at_status in
15864    77) echo 77 > "$at_status_file"; exit 77;;
15865    0) ;;
15866    *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0"
15867       at_failed=:;;
15868 esac
15869 if $at_failed; then
15870
15871
15872   echo 1 > "$at_status_file"
15873   exit 1
15874 fi
15875
15876 $at_traceon
15877
15878               $at_traceoff
15879 echo "$at_srcdir/rename03.at:26:
15880 mkdir oldgnu
15881 (cd oldgnu
15882 TEST_TAR_FORMAT=oldgnu
15883 export TEST_TAR_FORMAT
15884 TAR_OPTIONS=\"-H oldgnu\"
15885 export TAR_OPTIONS
15886 rm -rf *
15887
15888
15889 test -z "`sort < /dev/null 2>&1`" || exit 77
15890
15891
15892 mkdir foo
15893 genfile --file foo/file1
15894 genfile --file foo/file2
15895
15896 mkdir foo/a
15897 genfile --file foo/a/filea
15898
15899 mkdir foo/b
15900 genfile --file foo/b/fileb
15901
15902 mkdir foo/c
15903 genfile --file foo/c/filec
15904
15905 sleep 1
15906
15907 echo \"First dump\"
15908 echo \"First dump\">&2
15909 tar -g incr -cf arch.1 -v foo 2>tmperr
15910 sort tmperr >&2
15911
15912 # Shuffle directories:
15913 (cd foo
15914 mv a \$\$
15915 mv c a
15916 mv b c
15917 mv \$\$ b)
15918
15919 echo \"Second dump\"
15920 echo \"Second dump\" >&2
15921 tar -g incr -cf arch.2 -v foo 2>tmperr
15922 sort tmperr >&2
15923
15924 tar xfg arch.1 /dev/null
15925
15926 echo \"Begin directory listing 1\"
15927 find foo | sort
15928 echo \"End directory listing 1\"
15929
15930 tar xfgv arch.2 /dev/null
15931 echo Begin directory listing 2
15932 find foo | sort
15933 echo End directory listing 2
15934 )"
15935 echo rename03.at:26 >"$at_check_line_file"
15936
15937 at_trace_this=
15938 if test -n "$at_traceon"; then
15939     echo 'Not enabling shell tracing (command contains an embedded newline)'
15940 fi
15941
15942 if test -n "$at_trace_this"; then
15943     ( $at_traceon;
15944 mkdir oldgnu
15945 (cd oldgnu
15946 TEST_TAR_FORMAT=oldgnu
15947 export TEST_TAR_FORMAT
15948 TAR_OPTIONS="-H oldgnu"
15949 export TAR_OPTIONS
15950 rm -rf *
15951
15952
15953 test -z "`sort < /dev/null 2>&1`" || exit 77
15954
15955
15956 mkdir foo
15957 genfile --file foo/file1
15958 genfile --file foo/file2
15959
15960 mkdir foo/a
15961 genfile --file foo/a/filea
15962
15963 mkdir foo/b
15964 genfile --file foo/b/fileb
15965
15966 mkdir foo/c
15967 genfile --file foo/c/filec
15968
15969 sleep 1
15970
15971 echo "First dump"
15972 echo "First dump">&2
15973 tar -g incr -cf arch.1 -v foo 2>tmperr
15974 sort tmperr >&2
15975
15976 # Shuffle directories:
15977 (cd foo
15978 mv a $$
15979 mv c a
15980 mv b c
15981 mv $$ b)
15982
15983 echo "Second dump"
15984 echo "Second dump" >&2
15985 tar -g incr -cf arch.2 -v foo 2>tmperr
15986 sort tmperr >&2
15987
15988 tar xfg arch.1 /dev/null
15989
15990 echo "Begin directory listing 1"
15991 find foo | sort
15992 echo "End directory listing 1"
15993
15994 tar xfgv arch.2 /dev/null
15995 echo Begin directory listing 2
15996 find foo | sort
15997 echo End directory listing 2
15998 ) ) >"$at_stdout" 2>"$at_stder1"
15999     at_status=$?
16000     grep '^ *+' "$at_stder1" >&2
16001     grep -v '^ *+' "$at_stder1" >"$at_stderr"
16002 else
16003     ( :;
16004 mkdir oldgnu
16005 (cd oldgnu
16006 TEST_TAR_FORMAT=oldgnu
16007 export TEST_TAR_FORMAT
16008 TAR_OPTIONS="-H oldgnu"
16009 export TAR_OPTIONS
16010 rm -rf *
16011
16012
16013 test -z "`sort < /dev/null 2>&1`" || exit 77
16014
16015
16016 mkdir foo
16017 genfile --file foo/file1
16018 genfile --file foo/file2
16019
16020 mkdir foo/a
16021 genfile --file foo/a/filea
16022
16023 mkdir foo/b
16024 genfile --file foo/b/fileb
16025
16026 mkdir foo/c
16027 genfile --file foo/c/filec
16028
16029 sleep 1
16030
16031 echo "First dump"
16032 echo "First dump">&2
16033 tar -g incr -cf arch.1 -v foo 2>tmperr
16034 sort tmperr >&2
16035
16036 # Shuffle directories:
16037 (cd foo
16038 mv a $$
16039 mv c a
16040 mv b c
16041 mv $$ b)
16042
16043 echo "Second dump"
16044 echo "Second dump" >&2
16045 tar -g incr -cf arch.2 -v foo 2>tmperr
16046 sort tmperr >&2
16047
16048 tar xfg arch.1 /dev/null
16049
16050 echo "Begin directory listing 1"
16051 find foo | sort
16052 echo "End directory listing 1"
16053
16054 tar xfgv arch.2 /dev/null
16055 echo Begin directory listing 2
16056 find foo | sort
16057 echo End directory listing 2
16058 ) ) >"$at_stdout" 2>"$at_stderr"
16059     at_status=$?
16060 fi
16061
16062 at_failed=false
16063 echo >>"$at_stderr"; echo "First dump
16064 tar: foo/a: Directory is new
16065 tar: foo/b: Directory is new
16066 tar: foo/c: Directory is new
16067 Second dump
16068 tar: foo/a: Directory has been renamed from \`foo/c'
16069 tar: foo/b: Directory has been renamed from \`foo/a'
16070 tar: foo/c: Directory has been renamed from \`foo/b'
16071 " | $at_diff - "$at_stderr" || at_failed=:
16072 echo >>"$at_stdout"; echo "First dump
16073 foo/
16074 foo/a/
16075 foo/b/
16076 foo/c/
16077 foo/file1
16078 foo/file2
16079 foo/a/filea
16080 foo/b/fileb
16081 foo/c/filec
16082 Second dump
16083 foo/
16084 foo/a/
16085 foo/b/
16086 foo/c/
16087 Begin directory listing 1
16088 foo
16089 foo/a
16090 foo/a/filea
16091 foo/b
16092 foo/b/fileb
16093 foo/c
16094 foo/c/filec
16095 foo/file1
16096 foo/file2
16097 End directory listing 1
16098 foo/
16099 foo/a/
16100 foo/b/
16101 foo/c/
16102 Begin directory listing 2
16103 foo
16104 foo/a
16105 foo/a/filec
16106 foo/b
16107 foo/b/filea
16108 foo/c
16109 foo/c/fileb
16110 foo/file1
16111 foo/file2
16112 End directory listing 2
16113 " | $at_diff - "$at_stdout" || at_failed=:
16114 case $at_status in
16115    77) echo 77 > "$at_status_file"; exit 77;;
16116    0) ;;
16117    *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0"
16118       at_failed=:;;
16119 esac
16120 if $at_failed; then
16121
16122
16123   echo 1 > "$at_status_file"
16124   exit 1
16125 fi
16126
16127 $at_traceon
16128
16129               $at_traceoff
16130 echo "$at_srcdir/rename03.at:26:
16131 mkdir posix
16132 (cd posix
16133 TEST_TAR_FORMAT=posix
16134 export TEST_TAR_FORMAT
16135 TAR_OPTIONS=\"-H posix\"
16136 export TAR_OPTIONS
16137 rm -rf *
16138
16139
16140 test -z "`sort < /dev/null 2>&1`" || exit 77
16141
16142
16143 mkdir foo
16144 genfile --file foo/file1
16145 genfile --file foo/file2
16146
16147 mkdir foo/a
16148 genfile --file foo/a/filea
16149
16150 mkdir foo/b
16151 genfile --file foo/b/fileb
16152
16153 mkdir foo/c
16154 genfile --file foo/c/filec
16155
16156 sleep 1
16157
16158 echo \"First dump\"
16159 echo \"First dump\">&2
16160 tar -g incr -cf arch.1 -v foo 2>tmperr
16161 sort tmperr >&2
16162
16163 # Shuffle directories:
16164 (cd foo
16165 mv a \$\$
16166 mv c a
16167 mv b c
16168 mv \$\$ b)
16169
16170 echo \"Second dump\"
16171 echo \"Second dump\" >&2
16172 tar -g incr -cf arch.2 -v foo 2>tmperr
16173 sort tmperr >&2
16174
16175 tar xfg arch.1 /dev/null
16176
16177 echo \"Begin directory listing 1\"
16178 find foo | sort
16179 echo \"End directory listing 1\"
16180
16181 tar xfgv arch.2 /dev/null
16182 echo Begin directory listing 2
16183 find foo | sort
16184 echo End directory listing 2
16185 )"
16186 echo rename03.at:26 >"$at_check_line_file"
16187
16188 at_trace_this=
16189 if test -n "$at_traceon"; then
16190     echo 'Not enabling shell tracing (command contains an embedded newline)'
16191 fi
16192
16193 if test -n "$at_trace_this"; then
16194     ( $at_traceon;
16195 mkdir posix
16196 (cd posix
16197 TEST_TAR_FORMAT=posix
16198 export TEST_TAR_FORMAT
16199 TAR_OPTIONS="-H posix"
16200 export TAR_OPTIONS
16201 rm -rf *
16202
16203
16204 test -z "`sort < /dev/null 2>&1`" || exit 77
16205
16206
16207 mkdir foo
16208 genfile --file foo/file1
16209 genfile --file foo/file2
16210
16211 mkdir foo/a
16212 genfile --file foo/a/filea
16213
16214 mkdir foo/b
16215 genfile --file foo/b/fileb
16216
16217 mkdir foo/c
16218 genfile --file foo/c/filec
16219
16220 sleep 1
16221
16222 echo "First dump"
16223 echo "First dump">&2
16224 tar -g incr -cf arch.1 -v foo 2>tmperr
16225 sort tmperr >&2
16226
16227 # Shuffle directories:
16228 (cd foo
16229 mv a $$
16230 mv c a
16231 mv b c
16232 mv $$ b)
16233
16234 echo "Second dump"
16235 echo "Second dump" >&2
16236 tar -g incr -cf arch.2 -v foo 2>tmperr
16237 sort tmperr >&2
16238
16239 tar xfg arch.1 /dev/null
16240
16241 echo "Begin directory listing 1"
16242 find foo | sort
16243 echo "End directory listing 1"
16244
16245 tar xfgv arch.2 /dev/null
16246 echo Begin directory listing 2
16247 find foo | sort
16248 echo End directory listing 2
16249 ) ) >"$at_stdout" 2>"$at_stder1"
16250     at_status=$?
16251     grep '^ *+' "$at_stder1" >&2
16252     grep -v '^ *+' "$at_stder1" >"$at_stderr"
16253 else
16254     ( :;
16255 mkdir posix
16256 (cd posix
16257 TEST_TAR_FORMAT=posix
16258 export TEST_TAR_FORMAT
16259 TAR_OPTIONS="-H posix"
16260 export TAR_OPTIONS
16261 rm -rf *
16262
16263
16264 test -z "`sort < /dev/null 2>&1`" || exit 77
16265
16266
16267 mkdir foo
16268 genfile --file foo/file1
16269 genfile --file foo/file2
16270
16271 mkdir foo/a
16272 genfile --file foo/a/filea
16273
16274 mkdir foo/b
16275 genfile --file foo/b/fileb
16276
16277 mkdir foo/c
16278 genfile --file foo/c/filec
16279
16280 sleep 1
16281
16282 echo "First dump"
16283 echo "First dump">&2
16284 tar -g incr -cf arch.1 -v foo 2>tmperr
16285 sort tmperr >&2
16286
16287 # Shuffle directories:
16288 (cd foo
16289 mv a $$
16290 mv c a
16291 mv b c
16292 mv $$ b)
16293
16294 echo "Second dump"
16295 echo "Second dump" >&2
16296 tar -g incr -cf arch.2 -v foo 2>tmperr
16297 sort tmperr >&2
16298
16299 tar xfg arch.1 /dev/null
16300
16301 echo "Begin directory listing 1"
16302 find foo | sort
16303 echo "End directory listing 1"
16304
16305 tar xfgv arch.2 /dev/null
16306 echo Begin directory listing 2
16307 find foo | sort
16308 echo End directory listing 2
16309 ) ) >"$at_stdout" 2>"$at_stderr"
16310     at_status=$?
16311 fi
16312
16313 at_failed=false
16314 echo >>"$at_stderr"; echo "First dump
16315 tar: foo/a: Directory is new
16316 tar: foo/b: Directory is new
16317 tar: foo/c: Directory is new
16318 Second dump
16319 tar: foo/a: Directory has been renamed from \`foo/c'
16320 tar: foo/b: Directory has been renamed from \`foo/a'
16321 tar: foo/c: Directory has been renamed from \`foo/b'
16322 " | $at_diff - "$at_stderr" || at_failed=:
16323 echo >>"$at_stdout"; echo "First dump
16324 foo/
16325 foo/a/
16326 foo/b/
16327 foo/c/
16328 foo/file1
16329 foo/file2
16330 foo/a/filea
16331 foo/b/fileb
16332 foo/c/filec
16333 Second dump
16334 foo/
16335 foo/a/
16336 foo/b/
16337 foo/c/
16338 Begin directory listing 1
16339 foo
16340 foo/a
16341 foo/a/filea
16342 foo/b
16343 foo/b/fileb
16344 foo/c
16345 foo/c/filec
16346 foo/file1
16347 foo/file2
16348 End directory listing 1
16349 foo/
16350 foo/a/
16351 foo/b/
16352 foo/c/
16353 Begin directory listing 2
16354 foo
16355 foo/a
16356 foo/a/filec
16357 foo/b
16358 foo/b/filea
16359 foo/c
16360 foo/c/fileb
16361 foo/file1
16362 foo/file2
16363 End directory listing 2
16364 " | $at_diff - "$at_stdout" || at_failed=:
16365 case $at_status in
16366    77) echo 77 > "$at_status_file"; exit 77;;
16367    0) ;;
16368    *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0"
16369       at_failed=:;;
16370 esac
16371 if $at_failed; then
16372
16373
16374   echo 1 > "$at_status_file"
16375   exit 1
16376 fi
16377
16378 $at_traceon
16379
16380
16381
16382
16383       $at_traceoff
16384       $at_times_p && times >"$at_times_file"
16385     ) 5>&1 2>&1 | eval $at_tee_pipe
16386     at_status=`cat "$at_status_file"`
16387     ;;
16388
16389   36 ) # 36. rename04.at:27: renamed directory containing subdirectories
16390     at_setup_line='rename04.at:27'
16391     at_desc="renamed directory containing subdirectories"
16392     $at_quiet $ECHO_N " 36: renamed directory containing subdirectories    $ECHO_C"
16393     at_xfail=no
16394       test -f $XFAILFILE && at_xfail=yes
16395     echo "#                             -*- compilation -*-" >> "$at_group_log"
16396     (
16397       echo "36. rename04.at:27: testing ..."
16398       $at_traceon
16399
16400
16401
16402
16403
16404   $at_traceoff
16405 echo "$at_srcdir/rename04.at:30:
16406 mkdir gnu
16407 (cd gnu
16408 TEST_TAR_FORMAT=gnu
16409 export TEST_TAR_FORMAT
16410 TAR_OPTIONS=\"-H gnu\"
16411 export TAR_OPTIONS
16412 rm -rf *
16413
16414
16415 test -z "`sort < /dev/null 2>&1`" || exit 77
16416
16417
16418 decho Creating directory structure
16419 mkdir directory
16420 mkdir directory/subdir
16421 genfile --file=directory/file
16422
16423 decho Creating initial archive
16424 tar -cf archive.1 -g db.1 directory
16425
16426 decho Renaming
16427 mv directory dir
16428
16429 decho Creating incremental archive
16430 cp db.1 db.2
16431 tar -cf archive.2 -g db.2 dir
16432
16433 mv dir orig
16434
16435 decho First restore
16436 tar -xf archive.1 -g db.1
16437 find directory | sort
16438
16439 decho Second restore
16440 tar -xf archive.2 -g db.2
16441 find dir | sort
16442 )"
16443 echo rename04.at:30 >"$at_check_line_file"
16444
16445 at_trace_this=
16446 if test -n "$at_traceon"; then
16447     echo 'Not enabling shell tracing (command contains an embedded newline)'
16448 fi
16449
16450 if test -n "$at_trace_this"; then
16451     ( $at_traceon;
16452 mkdir gnu
16453 (cd gnu
16454 TEST_TAR_FORMAT=gnu
16455 export TEST_TAR_FORMAT
16456 TAR_OPTIONS="-H gnu"
16457 export TAR_OPTIONS
16458 rm -rf *
16459
16460
16461 test -z "`sort < /dev/null 2>&1`" || exit 77
16462
16463
16464 decho Creating directory structure
16465 mkdir directory
16466 mkdir directory/subdir
16467 genfile --file=directory/file
16468
16469 decho Creating initial archive
16470 tar -cf archive.1 -g db.1 directory
16471
16472 decho Renaming
16473 mv directory dir
16474
16475 decho Creating incremental archive
16476 cp db.1 db.2
16477 tar -cf archive.2 -g db.2 dir
16478
16479 mv dir orig
16480
16481 decho First restore
16482 tar -xf archive.1 -g db.1
16483 find directory | sort
16484
16485 decho Second restore
16486 tar -xf archive.2 -g db.2
16487 find dir | sort
16488 ) ) >"$at_stdout" 2>"$at_stder1"
16489     at_status=$?
16490     grep '^ *+' "$at_stder1" >&2
16491     grep -v '^ *+' "$at_stder1" >"$at_stderr"
16492 else
16493     ( :;
16494 mkdir gnu
16495 (cd gnu
16496 TEST_TAR_FORMAT=gnu
16497 export TEST_TAR_FORMAT
16498 TAR_OPTIONS="-H gnu"
16499 export TAR_OPTIONS
16500 rm -rf *
16501
16502
16503 test -z "`sort < /dev/null 2>&1`" || exit 77
16504
16505
16506 decho Creating directory structure
16507 mkdir directory
16508 mkdir directory/subdir
16509 genfile --file=directory/file
16510
16511 decho Creating initial archive
16512 tar -cf archive.1 -g db.1 directory
16513
16514 decho Renaming
16515 mv directory dir
16516
16517 decho Creating incremental archive
16518 cp db.1 db.2
16519 tar -cf archive.2 -g db.2 dir
16520
16521 mv dir orig
16522
16523 decho First restore
16524 tar -xf archive.1 -g db.1
16525 find directory | sort
16526
16527 decho Second restore
16528 tar -xf archive.2 -g db.2
16529 find dir | sort
16530 ) ) >"$at_stdout" 2>"$at_stderr"
16531     at_status=$?
16532 fi
16533
16534 at_failed=false
16535 echo >>"$at_stderr"; echo "Creating directory structure
16536 Creating initial archive
16537 Renaming
16538 Creating incremental archive
16539 First restore
16540 Second restore
16541 " | $at_diff - "$at_stderr" || at_failed=:
16542 echo >>"$at_stdout"; echo "Creating directory structure
16543 Creating initial archive
16544 Renaming
16545 Creating incremental archive
16546 First restore
16547 directory
16548 directory/file
16549 directory/subdir
16550 Second restore
16551 dir
16552 dir/subdir
16553 " | $at_diff - "$at_stdout" || at_failed=:
16554 case $at_status in
16555    77) echo 77 > "$at_status_file"; exit 77;;
16556    0) ;;
16557    *) echo "$at_srcdir/rename04.at:30: exit code was $at_status, expected 0"
16558       at_failed=:;;
16559 esac
16560 if $at_failed; then
16561
16562
16563   echo 1 > "$at_status_file"
16564   exit 1
16565 fi
16566
16567 $at_traceon
16568
16569               $at_traceoff
16570 echo "$at_srcdir/rename04.at:30:
16571 mkdir oldgnu
16572 (cd oldgnu
16573 TEST_TAR_FORMAT=oldgnu
16574 export TEST_TAR_FORMAT
16575 TAR_OPTIONS=\"-H oldgnu\"
16576 export TAR_OPTIONS
16577 rm -rf *
16578
16579
16580 test -z "`sort < /dev/null 2>&1`" || exit 77
16581
16582
16583 decho Creating directory structure
16584 mkdir directory
16585 mkdir directory/subdir
16586 genfile --file=directory/file
16587
16588 decho Creating initial archive
16589 tar -cf archive.1 -g db.1 directory
16590
16591 decho Renaming
16592 mv directory dir
16593
16594 decho Creating incremental archive
16595 cp db.1 db.2
16596 tar -cf archive.2 -g db.2 dir
16597
16598 mv dir orig
16599
16600 decho First restore
16601 tar -xf archive.1 -g db.1
16602 find directory | sort
16603
16604 decho Second restore
16605 tar -xf archive.2 -g db.2
16606 find dir | sort
16607 )"
16608 echo rename04.at:30 >"$at_check_line_file"
16609
16610 at_trace_this=
16611 if test -n "$at_traceon"; then
16612     echo 'Not enabling shell tracing (command contains an embedded newline)'
16613 fi
16614
16615 if test -n "$at_trace_this"; then
16616     ( $at_traceon;
16617 mkdir oldgnu
16618 (cd oldgnu
16619 TEST_TAR_FORMAT=oldgnu
16620 export TEST_TAR_FORMAT
16621 TAR_OPTIONS="-H oldgnu"
16622 export TAR_OPTIONS
16623 rm -rf *
16624
16625
16626 test -z "`sort < /dev/null 2>&1`" || exit 77
16627
16628
16629 decho Creating directory structure
16630 mkdir directory
16631 mkdir directory/subdir
16632 genfile --file=directory/file
16633
16634 decho Creating initial archive
16635 tar -cf archive.1 -g db.1 directory
16636
16637 decho Renaming
16638 mv directory dir
16639
16640 decho Creating incremental archive
16641 cp db.1 db.2
16642 tar -cf archive.2 -g db.2 dir
16643
16644 mv dir orig
16645
16646 decho First restore
16647 tar -xf archive.1 -g db.1
16648 find directory | sort
16649
16650 decho Second restore
16651 tar -xf archive.2 -g db.2
16652 find dir | sort
16653 ) ) >"$at_stdout" 2>"$at_stder1"
16654     at_status=$?
16655     grep '^ *+' "$at_stder1" >&2
16656     grep -v '^ *+' "$at_stder1" >"$at_stderr"
16657 else
16658     ( :;
16659 mkdir oldgnu
16660 (cd oldgnu
16661 TEST_TAR_FORMAT=oldgnu
16662 export TEST_TAR_FORMAT
16663 TAR_OPTIONS="-H oldgnu"
16664 export TAR_OPTIONS
16665 rm -rf *
16666
16667
16668 test -z "`sort < /dev/null 2>&1`" || exit 77
16669
16670
16671 decho Creating directory structure
16672 mkdir directory
16673 mkdir directory/subdir
16674 genfile --file=directory/file
16675
16676 decho Creating initial archive
16677 tar -cf archive.1 -g db.1 directory
16678
16679 decho Renaming
16680 mv directory dir
16681
16682 decho Creating incremental archive
16683 cp db.1 db.2
16684 tar -cf archive.2 -g db.2 dir
16685
16686 mv dir orig
16687
16688 decho First restore
16689 tar -xf archive.1 -g db.1
16690 find directory | sort
16691
16692 decho Second restore
16693 tar -xf archive.2 -g db.2
16694 find dir | sort
16695 ) ) >"$at_stdout" 2>"$at_stderr"
16696     at_status=$?
16697 fi
16698
16699 at_failed=false
16700 echo >>"$at_stderr"; echo "Creating directory structure
16701 Creating initial archive
16702 Renaming
16703 Creating incremental archive
16704 First restore
16705 Second restore
16706 " | $at_diff - "$at_stderr" || at_failed=:
16707 echo >>"$at_stdout"; echo "Creating directory structure
16708 Creating initial archive
16709 Renaming
16710 Creating incremental archive
16711 First restore
16712 directory
16713 directory/file
16714 directory/subdir
16715 Second restore
16716 dir
16717 dir/subdir
16718 " | $at_diff - "$at_stdout" || at_failed=:
16719 case $at_status in
16720    77) echo 77 > "$at_status_file"; exit 77;;
16721    0) ;;
16722    *) echo "$at_srcdir/rename04.at:30: exit code was $at_status, expected 0"
16723       at_failed=:;;
16724 esac
16725 if $at_failed; then
16726
16727
16728   echo 1 > "$at_status_file"
16729   exit 1
16730 fi
16731
16732 $at_traceon
16733
16734               $at_traceoff
16735 echo "$at_srcdir/rename04.at:30:
16736 mkdir posix
16737 (cd posix
16738 TEST_TAR_FORMAT=posix
16739 export TEST_TAR_FORMAT
16740 TAR_OPTIONS=\"-H posix\"
16741 export TAR_OPTIONS
16742 rm -rf *
16743
16744
16745 test -z "`sort < /dev/null 2>&1`" || exit 77
16746
16747
16748 decho Creating directory structure
16749 mkdir directory
16750 mkdir directory/subdir
16751 genfile --file=directory/file
16752
16753 decho Creating initial archive
16754 tar -cf archive.1 -g db.1 directory
16755
16756 decho Renaming
16757 mv directory dir
16758
16759 decho Creating incremental archive
16760 cp db.1 db.2
16761 tar -cf archive.2 -g db.2 dir
16762
16763 mv dir orig
16764
16765 decho First restore
16766 tar -xf archive.1 -g db.1
16767 find directory | sort
16768
16769 decho Second restore
16770 tar -xf archive.2 -g db.2
16771 find dir | sort
16772 )"
16773 echo rename04.at:30 >"$at_check_line_file"
16774
16775 at_trace_this=
16776 if test -n "$at_traceon"; then
16777     echo 'Not enabling shell tracing (command contains an embedded newline)'
16778 fi
16779
16780 if test -n "$at_trace_this"; then
16781     ( $at_traceon;
16782 mkdir posix
16783 (cd posix
16784 TEST_TAR_FORMAT=posix
16785 export TEST_TAR_FORMAT
16786 TAR_OPTIONS="-H posix"
16787 export TAR_OPTIONS
16788 rm -rf *
16789
16790
16791 test -z "`sort < /dev/null 2>&1`" || exit 77
16792
16793
16794 decho Creating directory structure
16795 mkdir directory
16796 mkdir directory/subdir
16797 genfile --file=directory/file
16798
16799 decho Creating initial archive
16800 tar -cf archive.1 -g db.1 directory
16801
16802 decho Renaming
16803 mv directory dir
16804
16805 decho Creating incremental archive
16806 cp db.1 db.2
16807 tar -cf archive.2 -g db.2 dir
16808
16809 mv dir orig
16810
16811 decho First restore
16812 tar -xf archive.1 -g db.1
16813 find directory | sort
16814
16815 decho Second restore
16816 tar -xf archive.2 -g db.2
16817 find dir | sort
16818 ) ) >"$at_stdout" 2>"$at_stder1"
16819     at_status=$?
16820     grep '^ *+' "$at_stder1" >&2
16821     grep -v '^ *+' "$at_stder1" >"$at_stderr"
16822 else
16823     ( :;
16824 mkdir posix
16825 (cd posix
16826 TEST_TAR_FORMAT=posix
16827 export TEST_TAR_FORMAT
16828 TAR_OPTIONS="-H posix"
16829 export TAR_OPTIONS
16830 rm -rf *
16831
16832
16833 test -z "`sort < /dev/null 2>&1`" || exit 77
16834
16835
16836 decho Creating directory structure
16837 mkdir directory
16838 mkdir directory/subdir
16839 genfile --file=directory/file
16840
16841 decho Creating initial archive
16842 tar -cf archive.1 -g db.1 directory
16843
16844 decho Renaming
16845 mv directory dir
16846
16847 decho Creating incremental archive
16848 cp db.1 db.2
16849 tar -cf archive.2 -g db.2 dir
16850
16851 mv dir orig
16852
16853 decho First restore
16854 tar -xf archive.1 -g db.1
16855 find directory | sort
16856
16857 decho Second restore
16858 tar -xf archive.2 -g db.2
16859 find dir | sort
16860 ) ) >"$at_stdout" 2>"$at_stderr"
16861     at_status=$?
16862 fi
16863
16864 at_failed=false
16865 echo >>"$at_stderr"; echo "Creating directory structure
16866 Creating initial archive
16867 Renaming
16868 Creating incremental archive
16869 First restore
16870 Second restore
16871 " | $at_diff - "$at_stderr" || at_failed=:
16872 echo >>"$at_stdout"; echo "Creating directory structure
16873 Creating initial archive
16874 Renaming
16875 Creating incremental archive
16876 First restore
16877 directory
16878 directory/file
16879 directory/subdir
16880 Second restore
16881 dir
16882 dir/subdir
16883 " | $at_diff - "$at_stdout" || at_failed=:
16884 case $at_status in
16885    77) echo 77 > "$at_status_file"; exit 77;;
16886    0) ;;
16887    *) echo "$at_srcdir/rename04.at:30: exit code was $at_status, expected 0"
16888       at_failed=:;;
16889 esac
16890 if $at_failed; then
16891
16892
16893   echo 1 > "$at_status_file"
16894   exit 1
16895 fi
16896
16897 $at_traceon
16898
16899
16900
16901
16902       $at_traceoff
16903       $at_times_p && times >"$at_times_file"
16904     ) 5>&1 2>&1 | eval $at_tee_pipe
16905     at_status=`cat "$at_status_file"`
16906     ;;
16907
16908   37 ) # 37. rename05.at:24: renamed subdirectories
16909     at_setup_line='rename05.at:24'
16910     at_desc="renamed subdirectories"
16911     $at_quiet $ECHO_N " 37: renamed subdirectories                         $ECHO_C"
16912     at_xfail=no
16913       test -f $XFAILFILE && at_xfail=yes
16914     echo "#                             -*- compilation -*-" >> "$at_group_log"
16915     (
16916       echo "37. rename05.at:24: testing ..."
16917       $at_traceon
16918
16919
16920
16921
16922
16923   $at_traceoff
16924 echo "$at_srcdir/rename05.at:27:
16925 mkdir gnu
16926 (cd gnu
16927 TEST_TAR_FORMAT=gnu
16928 export TEST_TAR_FORMAT
16929 TAR_OPTIONS=\"-H gnu\"
16930 export TAR_OPTIONS
16931 rm -rf *
16932
16933
16934 test -z "`sort < /dev/null 2>&1`" || exit 77
16935
16936
16937 decho Creating directory structure
16938 mkdir directory
16939 mkdir directory/subdir
16940 genfile --file=directory/file
16941
16942 decho Creating initial archive
16943 tar -cf archive.1 -g db.1 directory
16944
16945 decho Renaming
16946 mv directory/subdir directory/subdir.0
16947 mv directory dir
16948
16949 decho Creating incremental archive
16950 cp db.1 db.2
16951 tar -cf archive.2 -g db.2 dir
16952
16953 mv dir orig
16954
16955 decho First restore
16956 tar -xf archive.1 -g db.1
16957 find directory | sort
16958
16959 decho Second restore
16960 tar -xf archive.2 -g db.2
16961 find dir | sort
16962 )"
16963 echo rename05.at:27 >"$at_check_line_file"
16964
16965 at_trace_this=
16966 if test -n "$at_traceon"; then
16967     echo 'Not enabling shell tracing (command contains an embedded newline)'
16968 fi
16969
16970 if test -n "$at_trace_this"; then
16971     ( $at_traceon;
16972 mkdir gnu
16973 (cd gnu
16974 TEST_TAR_FORMAT=gnu
16975 export TEST_TAR_FORMAT
16976 TAR_OPTIONS="-H gnu"
16977 export TAR_OPTIONS
16978 rm -rf *
16979
16980
16981 test -z "`sort < /dev/null 2>&1`" || exit 77
16982
16983
16984 decho Creating directory structure
16985 mkdir directory
16986 mkdir directory/subdir
16987 genfile --file=directory/file
16988
16989 decho Creating initial archive
16990 tar -cf archive.1 -g db.1 directory
16991
16992 decho Renaming
16993 mv directory/subdir directory/subdir.0
16994 mv directory dir
16995
16996 decho Creating incremental archive
16997 cp db.1 db.2
16998 tar -cf archive.2 -g db.2 dir
16999
17000 mv dir orig
17001
17002 decho First restore
17003 tar -xf archive.1 -g db.1
17004 find directory | sort
17005
17006 decho Second restore
17007 tar -xf archive.2 -g db.2
17008 find dir | sort
17009 ) ) >"$at_stdout" 2>"$at_stder1"
17010     at_status=$?
17011     grep '^ *+' "$at_stder1" >&2
17012     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17013 else
17014     ( :;
17015 mkdir gnu
17016 (cd gnu
17017 TEST_TAR_FORMAT=gnu
17018 export TEST_TAR_FORMAT
17019 TAR_OPTIONS="-H gnu"
17020 export TAR_OPTIONS
17021 rm -rf *
17022
17023
17024 test -z "`sort < /dev/null 2>&1`" || exit 77
17025
17026
17027 decho Creating directory structure
17028 mkdir directory
17029 mkdir directory/subdir
17030 genfile --file=directory/file
17031
17032 decho Creating initial archive
17033 tar -cf archive.1 -g db.1 directory
17034
17035 decho Renaming
17036 mv directory/subdir directory/subdir.0
17037 mv directory dir
17038
17039 decho Creating incremental archive
17040 cp db.1 db.2
17041 tar -cf archive.2 -g db.2 dir
17042
17043 mv dir orig
17044
17045 decho First restore
17046 tar -xf archive.1 -g db.1
17047 find directory | sort
17048
17049 decho Second restore
17050 tar -xf archive.2 -g db.2
17051 find dir | sort
17052 ) ) >"$at_stdout" 2>"$at_stderr"
17053     at_status=$?
17054 fi
17055
17056 at_failed=false
17057 echo >>"$at_stderr"; echo "Creating directory structure
17058 Creating initial archive
17059 Renaming
17060 Creating incremental archive
17061 First restore
17062 Second restore
17063 " | $at_diff - "$at_stderr" || at_failed=:
17064 echo >>"$at_stdout"; echo "Creating directory structure
17065 Creating initial archive
17066 Renaming
17067 Creating incremental archive
17068 First restore
17069 directory
17070 directory/file
17071 directory/subdir
17072 Second restore
17073 dir
17074 dir/subdir.0
17075 " | $at_diff - "$at_stdout" || at_failed=:
17076 case $at_status in
17077    77) echo 77 > "$at_status_file"; exit 77;;
17078    0) ;;
17079    *) echo "$at_srcdir/rename05.at:27: exit code was $at_status, expected 0"
17080       at_failed=:;;
17081 esac
17082 if $at_failed; then
17083
17084
17085   echo 1 > "$at_status_file"
17086   exit 1
17087 fi
17088
17089 $at_traceon
17090
17091               $at_traceoff
17092 echo "$at_srcdir/rename05.at:27:
17093 mkdir oldgnu
17094 (cd oldgnu
17095 TEST_TAR_FORMAT=oldgnu
17096 export TEST_TAR_FORMAT
17097 TAR_OPTIONS=\"-H oldgnu\"
17098 export TAR_OPTIONS
17099 rm -rf *
17100
17101
17102 test -z "`sort < /dev/null 2>&1`" || exit 77
17103
17104
17105 decho Creating directory structure
17106 mkdir directory
17107 mkdir directory/subdir
17108 genfile --file=directory/file
17109
17110 decho Creating initial archive
17111 tar -cf archive.1 -g db.1 directory
17112
17113 decho Renaming
17114 mv directory/subdir directory/subdir.0
17115 mv directory dir
17116
17117 decho Creating incremental archive
17118 cp db.1 db.2
17119 tar -cf archive.2 -g db.2 dir
17120
17121 mv dir orig
17122
17123 decho First restore
17124 tar -xf archive.1 -g db.1
17125 find directory | sort
17126
17127 decho Second restore
17128 tar -xf archive.2 -g db.2
17129 find dir | sort
17130 )"
17131 echo rename05.at:27 >"$at_check_line_file"
17132
17133 at_trace_this=
17134 if test -n "$at_traceon"; then
17135     echo 'Not enabling shell tracing (command contains an embedded newline)'
17136 fi
17137
17138 if test -n "$at_trace_this"; then
17139     ( $at_traceon;
17140 mkdir oldgnu
17141 (cd oldgnu
17142 TEST_TAR_FORMAT=oldgnu
17143 export TEST_TAR_FORMAT
17144 TAR_OPTIONS="-H oldgnu"
17145 export TAR_OPTIONS
17146 rm -rf *
17147
17148
17149 test -z "`sort < /dev/null 2>&1`" || exit 77
17150
17151
17152 decho Creating directory structure
17153 mkdir directory
17154 mkdir directory/subdir
17155 genfile --file=directory/file
17156
17157 decho Creating initial archive
17158 tar -cf archive.1 -g db.1 directory
17159
17160 decho Renaming
17161 mv directory/subdir directory/subdir.0
17162 mv directory dir
17163
17164 decho Creating incremental archive
17165 cp db.1 db.2
17166 tar -cf archive.2 -g db.2 dir
17167
17168 mv dir orig
17169
17170 decho First restore
17171 tar -xf archive.1 -g db.1
17172 find directory | sort
17173
17174 decho Second restore
17175 tar -xf archive.2 -g db.2
17176 find dir | sort
17177 ) ) >"$at_stdout" 2>"$at_stder1"
17178     at_status=$?
17179     grep '^ *+' "$at_stder1" >&2
17180     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17181 else
17182     ( :;
17183 mkdir oldgnu
17184 (cd oldgnu
17185 TEST_TAR_FORMAT=oldgnu
17186 export TEST_TAR_FORMAT
17187 TAR_OPTIONS="-H oldgnu"
17188 export TAR_OPTIONS
17189 rm -rf *
17190
17191
17192 test -z "`sort < /dev/null 2>&1`" || exit 77
17193
17194
17195 decho Creating directory structure
17196 mkdir directory
17197 mkdir directory/subdir
17198 genfile --file=directory/file
17199
17200 decho Creating initial archive
17201 tar -cf archive.1 -g db.1 directory
17202
17203 decho Renaming
17204 mv directory/subdir directory/subdir.0
17205 mv directory dir
17206
17207 decho Creating incremental archive
17208 cp db.1 db.2
17209 tar -cf archive.2 -g db.2 dir
17210
17211 mv dir orig
17212
17213 decho First restore
17214 tar -xf archive.1 -g db.1
17215 find directory | sort
17216
17217 decho Second restore
17218 tar -xf archive.2 -g db.2
17219 find dir | sort
17220 ) ) >"$at_stdout" 2>"$at_stderr"
17221     at_status=$?
17222 fi
17223
17224 at_failed=false
17225 echo >>"$at_stderr"; echo "Creating directory structure
17226 Creating initial archive
17227 Renaming
17228 Creating incremental archive
17229 First restore
17230 Second restore
17231 " | $at_diff - "$at_stderr" || at_failed=:
17232 echo >>"$at_stdout"; echo "Creating directory structure
17233 Creating initial archive
17234 Renaming
17235 Creating incremental archive
17236 First restore
17237 directory
17238 directory/file
17239 directory/subdir
17240 Second restore
17241 dir
17242 dir/subdir.0
17243 " | $at_diff - "$at_stdout" || at_failed=:
17244 case $at_status in
17245    77) echo 77 > "$at_status_file"; exit 77;;
17246    0) ;;
17247    *) echo "$at_srcdir/rename05.at:27: exit code was $at_status, expected 0"
17248       at_failed=:;;
17249 esac
17250 if $at_failed; then
17251
17252
17253   echo 1 > "$at_status_file"
17254   exit 1
17255 fi
17256
17257 $at_traceon
17258
17259               $at_traceoff
17260 echo "$at_srcdir/rename05.at:27:
17261 mkdir posix
17262 (cd posix
17263 TEST_TAR_FORMAT=posix
17264 export TEST_TAR_FORMAT
17265 TAR_OPTIONS=\"-H posix\"
17266 export TAR_OPTIONS
17267 rm -rf *
17268
17269
17270 test -z "`sort < /dev/null 2>&1`" || exit 77
17271
17272
17273 decho Creating directory structure
17274 mkdir directory
17275 mkdir directory/subdir
17276 genfile --file=directory/file
17277
17278 decho Creating initial archive
17279 tar -cf archive.1 -g db.1 directory
17280
17281 decho Renaming
17282 mv directory/subdir directory/subdir.0
17283 mv directory dir
17284
17285 decho Creating incremental archive
17286 cp db.1 db.2
17287 tar -cf archive.2 -g db.2 dir
17288
17289 mv dir orig
17290
17291 decho First restore
17292 tar -xf archive.1 -g db.1
17293 find directory | sort
17294
17295 decho Second restore
17296 tar -xf archive.2 -g db.2
17297 find dir | sort
17298 )"
17299 echo rename05.at:27 >"$at_check_line_file"
17300
17301 at_trace_this=
17302 if test -n "$at_traceon"; then
17303     echo 'Not enabling shell tracing (command contains an embedded newline)'
17304 fi
17305
17306 if test -n "$at_trace_this"; then
17307     ( $at_traceon;
17308 mkdir posix
17309 (cd posix
17310 TEST_TAR_FORMAT=posix
17311 export TEST_TAR_FORMAT
17312 TAR_OPTIONS="-H posix"
17313 export TAR_OPTIONS
17314 rm -rf *
17315
17316
17317 test -z "`sort < /dev/null 2>&1`" || exit 77
17318
17319
17320 decho Creating directory structure
17321 mkdir directory
17322 mkdir directory/subdir
17323 genfile --file=directory/file
17324
17325 decho Creating initial archive
17326 tar -cf archive.1 -g db.1 directory
17327
17328 decho Renaming
17329 mv directory/subdir directory/subdir.0
17330 mv directory dir
17331
17332 decho Creating incremental archive
17333 cp db.1 db.2
17334 tar -cf archive.2 -g db.2 dir
17335
17336 mv dir orig
17337
17338 decho First restore
17339 tar -xf archive.1 -g db.1
17340 find directory | sort
17341
17342 decho Second restore
17343 tar -xf archive.2 -g db.2
17344 find dir | sort
17345 ) ) >"$at_stdout" 2>"$at_stder1"
17346     at_status=$?
17347     grep '^ *+' "$at_stder1" >&2
17348     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17349 else
17350     ( :;
17351 mkdir posix
17352 (cd posix
17353 TEST_TAR_FORMAT=posix
17354 export TEST_TAR_FORMAT
17355 TAR_OPTIONS="-H posix"
17356 export TAR_OPTIONS
17357 rm -rf *
17358
17359
17360 test -z "`sort < /dev/null 2>&1`" || exit 77
17361
17362
17363 decho Creating directory structure
17364 mkdir directory
17365 mkdir directory/subdir
17366 genfile --file=directory/file
17367
17368 decho Creating initial archive
17369 tar -cf archive.1 -g db.1 directory
17370
17371 decho Renaming
17372 mv directory/subdir directory/subdir.0
17373 mv directory dir
17374
17375 decho Creating incremental archive
17376 cp db.1 db.2
17377 tar -cf archive.2 -g db.2 dir
17378
17379 mv dir orig
17380
17381 decho First restore
17382 tar -xf archive.1 -g db.1
17383 find directory | sort
17384
17385 decho Second restore
17386 tar -xf archive.2 -g db.2
17387 find dir | sort
17388 ) ) >"$at_stdout" 2>"$at_stderr"
17389     at_status=$?
17390 fi
17391
17392 at_failed=false
17393 echo >>"$at_stderr"; echo "Creating directory structure
17394 Creating initial archive
17395 Renaming
17396 Creating incremental archive
17397 First restore
17398 Second restore
17399 " | $at_diff - "$at_stderr" || at_failed=:
17400 echo >>"$at_stdout"; echo "Creating directory structure
17401 Creating initial archive
17402 Renaming
17403 Creating incremental archive
17404 First restore
17405 directory
17406 directory/file
17407 directory/subdir
17408 Second restore
17409 dir
17410 dir/subdir.0
17411 " | $at_diff - "$at_stdout" || at_failed=:
17412 case $at_status in
17413    77) echo 77 > "$at_status_file"; exit 77;;
17414    0) ;;
17415    *) echo "$at_srcdir/rename05.at:27: exit code was $at_status, expected 0"
17416       at_failed=:;;
17417 esac
17418 if $at_failed; then
17419
17420
17421   echo 1 > "$at_status_file"
17422   exit 1
17423 fi
17424
17425 $at_traceon
17426
17427
17428
17429
17430       $at_traceoff
17431       $at_times_p && times >"$at_times_file"
17432     ) 5>&1 2>&1 | eval $at_tee_pipe
17433     at_status=`cat "$at_status_file"`
17434     ;;
17435
17436   38 ) # 38. chtype.at:27: changed file types in incrementals
17437     at_setup_line='chtype.at:27'
17438     at_desc="changed file types in incrementals"
17439     $at_quiet $ECHO_N " 38: changed file types in incrementals             $ECHO_C"
17440     at_xfail=no
17441       test -f $XFAILFILE && at_xfail=yes
17442     echo "#                             -*- compilation -*-" >> "$at_group_log"
17443     (
17444       echo "38. chtype.at:27: testing ..."
17445       $at_traceon
17446
17447
17448
17449
17450
17451   $at_traceoff
17452 echo "$at_srcdir/chtype.at:30:
17453 mkdir gnu
17454 (cd gnu
17455 TEST_TAR_FORMAT=gnu
17456 export TEST_TAR_FORMAT
17457 TAR_OPTIONS=\"-H gnu\"
17458 export TAR_OPTIONS
17459 rm -rf *
17460
17461
17462 test -z "`sort < /dev/null 2>&1`" || exit 77
17463
17464
17465 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
17466 mkdir directory/a
17467 genfile --file directory/a/a
17468
17469 echo First backup
17470 tar --create --file=archive.1 --listed-incremental=db.1 directory
17471
17472 sleep 2
17473
17474 # Remove directory b and create a file with this name.
17475 # Previous versions were not able to restore over this file.
17476 rm -r directory/b
17477 genfile --file directory/b
17478 genfile --file directory/a/b
17479
17480 echo Second backup
17481 tar --create --file=archive.2 --listed-incremental=db.2 directory
17482
17483 # Delete a
17484 rm -r directory
17485
17486 echo Restore archive.1
17487 tar -xf archive.1 --listed-incremental=/dev/null
17488 echo Restore archive.2
17489 tar -xf archive.2 --listed-incremental=/dev/null
17490 find directory | sort
17491 )"
17492 echo chtype.at:30 >"$at_check_line_file"
17493
17494 at_trace_this=
17495 if test -n "$at_traceon"; then
17496     echo 'Not enabling shell tracing (command contains an embedded newline)'
17497 fi
17498
17499 if test -n "$at_trace_this"; then
17500     ( $at_traceon;
17501 mkdir gnu
17502 (cd gnu
17503 TEST_TAR_FORMAT=gnu
17504 export TEST_TAR_FORMAT
17505 TAR_OPTIONS="-H gnu"
17506 export TAR_OPTIONS
17507 rm -rf *
17508
17509
17510 test -z "`sort < /dev/null 2>&1`" || exit 77
17511
17512
17513 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
17514 mkdir directory/a
17515 genfile --file directory/a/a
17516
17517 echo First backup
17518 tar --create --file=archive.1 --listed-incremental=db.1 directory
17519
17520 sleep 2
17521
17522 # Remove directory b and create a file with this name.
17523 # Previous versions were not able to restore over this file.
17524 rm -r directory/b
17525 genfile --file directory/b
17526 genfile --file directory/a/b
17527
17528 echo Second backup
17529 tar --create --file=archive.2 --listed-incremental=db.2 directory
17530
17531 # Delete a
17532 rm -r directory
17533
17534 echo Restore archive.1
17535 tar -xf archive.1 --listed-incremental=/dev/null
17536 echo Restore archive.2
17537 tar -xf archive.2 --listed-incremental=/dev/null
17538 find directory | sort
17539 ) ) >"$at_stdout" 2>"$at_stder1"
17540     at_status=$?
17541     grep '^ *+' "$at_stder1" >&2
17542     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17543 else
17544     ( :;
17545 mkdir gnu
17546 (cd gnu
17547 TEST_TAR_FORMAT=gnu
17548 export TEST_TAR_FORMAT
17549 TAR_OPTIONS="-H gnu"
17550 export TAR_OPTIONS
17551 rm -rf *
17552
17553
17554 test -z "`sort < /dev/null 2>&1`" || exit 77
17555
17556
17557 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
17558 mkdir directory/a
17559 genfile --file directory/a/a
17560
17561 echo First backup
17562 tar --create --file=archive.1 --listed-incremental=db.1 directory
17563
17564 sleep 2
17565
17566 # Remove directory b and create a file with this name.
17567 # Previous versions were not able to restore over this file.
17568 rm -r directory/b
17569 genfile --file directory/b
17570 genfile --file directory/a/b
17571
17572 echo Second backup
17573 tar --create --file=archive.2 --listed-incremental=db.2 directory
17574
17575 # Delete a
17576 rm -r directory
17577
17578 echo Restore archive.1
17579 tar -xf archive.1 --listed-incremental=/dev/null
17580 echo Restore archive.2
17581 tar -xf archive.2 --listed-incremental=/dev/null
17582 find directory | sort
17583 ) ) >"$at_stdout" 2>"$at_stderr"
17584     at_status=$?
17585 fi
17586
17587 at_failed=false
17588 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
17589 echo >>"$at_stdout"; echo "First backup
17590 Second backup
17591 Restore archive.1
17592 Restore archive.2
17593 directory
17594 directory/a
17595 directory/a/a
17596 directory/a/b
17597 directory/b
17598 " | $at_diff - "$at_stdout" || at_failed=:
17599 case $at_status in
17600    77) echo 77 > "$at_status_file"; exit 77;;
17601    0) ;;
17602    *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0"
17603       at_failed=:;;
17604 esac
17605 if $at_failed; then
17606
17607
17608   echo 1 > "$at_status_file"
17609   exit 1
17610 fi
17611
17612 $at_traceon
17613
17614               $at_traceoff
17615 echo "$at_srcdir/chtype.at:30:
17616 mkdir oldgnu
17617 (cd oldgnu
17618 TEST_TAR_FORMAT=oldgnu
17619 export TEST_TAR_FORMAT
17620 TAR_OPTIONS=\"-H oldgnu\"
17621 export TAR_OPTIONS
17622 rm -rf *
17623
17624
17625 test -z "`sort < /dev/null 2>&1`" || exit 77
17626
17627
17628 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
17629 mkdir directory/a
17630 genfile --file directory/a/a
17631
17632 echo First backup
17633 tar --create --file=archive.1 --listed-incremental=db.1 directory
17634
17635 sleep 2
17636
17637 # Remove directory b and create a file with this name.
17638 # Previous versions were not able to restore over this file.
17639 rm -r directory/b
17640 genfile --file directory/b
17641 genfile --file directory/a/b
17642
17643 echo Second backup
17644 tar --create --file=archive.2 --listed-incremental=db.2 directory
17645
17646 # Delete a
17647 rm -r directory
17648
17649 echo Restore archive.1
17650 tar -xf archive.1 --listed-incremental=/dev/null
17651 echo Restore archive.2
17652 tar -xf archive.2 --listed-incremental=/dev/null
17653 find directory | sort
17654 )"
17655 echo chtype.at:30 >"$at_check_line_file"
17656
17657 at_trace_this=
17658 if test -n "$at_traceon"; then
17659     echo 'Not enabling shell tracing (command contains an embedded newline)'
17660 fi
17661
17662 if test -n "$at_trace_this"; then
17663     ( $at_traceon;
17664 mkdir oldgnu
17665 (cd oldgnu
17666 TEST_TAR_FORMAT=oldgnu
17667 export TEST_TAR_FORMAT
17668 TAR_OPTIONS="-H oldgnu"
17669 export TAR_OPTIONS
17670 rm -rf *
17671
17672
17673 test -z "`sort < /dev/null 2>&1`" || exit 77
17674
17675
17676 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
17677 mkdir directory/a
17678 genfile --file directory/a/a
17679
17680 echo First backup
17681 tar --create --file=archive.1 --listed-incremental=db.1 directory
17682
17683 sleep 2
17684
17685 # Remove directory b and create a file with this name.
17686 # Previous versions were not able to restore over this file.
17687 rm -r directory/b
17688 genfile --file directory/b
17689 genfile --file directory/a/b
17690
17691 echo Second backup
17692 tar --create --file=archive.2 --listed-incremental=db.2 directory
17693
17694 # Delete a
17695 rm -r directory
17696
17697 echo Restore archive.1
17698 tar -xf archive.1 --listed-incremental=/dev/null
17699 echo Restore archive.2
17700 tar -xf archive.2 --listed-incremental=/dev/null
17701 find directory | sort
17702 ) ) >"$at_stdout" 2>"$at_stder1"
17703     at_status=$?
17704     grep '^ *+' "$at_stder1" >&2
17705     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17706 else
17707     ( :;
17708 mkdir oldgnu
17709 (cd oldgnu
17710 TEST_TAR_FORMAT=oldgnu
17711 export TEST_TAR_FORMAT
17712 TAR_OPTIONS="-H oldgnu"
17713 export TAR_OPTIONS
17714 rm -rf *
17715
17716
17717 test -z "`sort < /dev/null 2>&1`" || exit 77
17718
17719
17720 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
17721 mkdir directory/a
17722 genfile --file directory/a/a
17723
17724 echo First backup
17725 tar --create --file=archive.1 --listed-incremental=db.1 directory
17726
17727 sleep 2
17728
17729 # Remove directory b and create a file with this name.
17730 # Previous versions were not able to restore over this file.
17731 rm -r directory/b
17732 genfile --file directory/b
17733 genfile --file directory/a/b
17734
17735 echo Second backup
17736 tar --create --file=archive.2 --listed-incremental=db.2 directory
17737
17738 # Delete a
17739 rm -r directory
17740
17741 echo Restore archive.1
17742 tar -xf archive.1 --listed-incremental=/dev/null
17743 echo Restore archive.2
17744 tar -xf archive.2 --listed-incremental=/dev/null
17745 find directory | sort
17746 ) ) >"$at_stdout" 2>"$at_stderr"
17747     at_status=$?
17748 fi
17749
17750 at_failed=false
17751 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
17752 echo >>"$at_stdout"; echo "First backup
17753 Second backup
17754 Restore archive.1
17755 Restore archive.2
17756 directory
17757 directory/a
17758 directory/a/a
17759 directory/a/b
17760 directory/b
17761 " | $at_diff - "$at_stdout" || at_failed=:
17762 case $at_status in
17763    77) echo 77 > "$at_status_file"; exit 77;;
17764    0) ;;
17765    *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0"
17766       at_failed=:;;
17767 esac
17768 if $at_failed; then
17769
17770
17771   echo 1 > "$at_status_file"
17772   exit 1
17773 fi
17774
17775 $at_traceon
17776
17777               $at_traceoff
17778 echo "$at_srcdir/chtype.at:30:
17779 mkdir posix
17780 (cd posix
17781 TEST_TAR_FORMAT=posix
17782 export TEST_TAR_FORMAT
17783 TAR_OPTIONS=\"-H posix\"
17784 export TAR_OPTIONS
17785 rm -rf *
17786
17787
17788 test -z "`sort < /dev/null 2>&1`" || exit 77
17789
17790
17791 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
17792 mkdir directory/a
17793 genfile --file directory/a/a
17794
17795 echo First backup
17796 tar --create --file=archive.1 --listed-incremental=db.1 directory
17797
17798 sleep 2
17799
17800 # Remove directory b and create a file with this name.
17801 # Previous versions were not able to restore over this file.
17802 rm -r directory/b
17803 genfile --file directory/b
17804 genfile --file directory/a/b
17805
17806 echo Second backup
17807 tar --create --file=archive.2 --listed-incremental=db.2 directory
17808
17809 # Delete a
17810 rm -r directory
17811
17812 echo Restore archive.1
17813 tar -xf archive.1 --listed-incremental=/dev/null
17814 echo Restore archive.2
17815 tar -xf archive.2 --listed-incremental=/dev/null
17816 find directory | sort
17817 )"
17818 echo chtype.at:30 >"$at_check_line_file"
17819
17820 at_trace_this=
17821 if test -n "$at_traceon"; then
17822     echo 'Not enabling shell tracing (command contains an embedded newline)'
17823 fi
17824
17825 if test -n "$at_trace_this"; then
17826     ( $at_traceon;
17827 mkdir posix
17828 (cd posix
17829 TEST_TAR_FORMAT=posix
17830 export TEST_TAR_FORMAT
17831 TAR_OPTIONS="-H posix"
17832 export TAR_OPTIONS
17833 rm -rf *
17834
17835
17836 test -z "`sort < /dev/null 2>&1`" || exit 77
17837
17838
17839 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
17840 mkdir directory/a
17841 genfile --file directory/a/a
17842
17843 echo First backup
17844 tar --create --file=archive.1 --listed-incremental=db.1 directory
17845
17846 sleep 2
17847
17848 # Remove directory b and create a file with this name.
17849 # Previous versions were not able to restore over this file.
17850 rm -r directory/b
17851 genfile --file directory/b
17852 genfile --file directory/a/b
17853
17854 echo Second backup
17855 tar --create --file=archive.2 --listed-incremental=db.2 directory
17856
17857 # Delete a
17858 rm -r directory
17859
17860 echo Restore archive.1
17861 tar -xf archive.1 --listed-incremental=/dev/null
17862 echo Restore archive.2
17863 tar -xf archive.2 --listed-incremental=/dev/null
17864 find directory | sort
17865 ) ) >"$at_stdout" 2>"$at_stder1"
17866     at_status=$?
17867     grep '^ *+' "$at_stder1" >&2
17868     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17869 else
17870     ( :;
17871 mkdir posix
17872 (cd posix
17873 TEST_TAR_FORMAT=posix
17874 export TEST_TAR_FORMAT
17875 TAR_OPTIONS="-H posix"
17876 export TAR_OPTIONS
17877 rm -rf *
17878
17879
17880 test -z "`sort < /dev/null 2>&1`" || exit 77
17881
17882
17883 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
17884 mkdir directory/a
17885 genfile --file directory/a/a
17886
17887 echo First backup
17888 tar --create --file=archive.1 --listed-incremental=db.1 directory
17889
17890 sleep 2
17891
17892 # Remove directory b and create a file with this name.
17893 # Previous versions were not able to restore over this file.
17894 rm -r directory/b
17895 genfile --file directory/b
17896 genfile --file directory/a/b
17897
17898 echo Second backup
17899 tar --create --file=archive.2 --listed-incremental=db.2 directory
17900
17901 # Delete a
17902 rm -r directory
17903
17904 echo Restore archive.1
17905 tar -xf archive.1 --listed-incremental=/dev/null
17906 echo Restore archive.2
17907 tar -xf archive.2 --listed-incremental=/dev/null
17908 find directory | sort
17909 ) ) >"$at_stdout" 2>"$at_stderr"
17910     at_status=$?
17911 fi
17912
17913 at_failed=false
17914 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
17915 echo >>"$at_stdout"; echo "First backup
17916 Second backup
17917 Restore archive.1
17918 Restore archive.2
17919 directory
17920 directory/a
17921 directory/a/a
17922 directory/a/b
17923 directory/b
17924 " | $at_diff - "$at_stdout" || at_failed=:
17925 case $at_status in
17926    77) echo 77 > "$at_status_file"; exit 77;;
17927    0) ;;
17928    *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0"
17929       at_failed=:;;
17930 esac
17931 if $at_failed; then
17932
17933
17934   echo 1 > "$at_status_file"
17935   exit 1
17936 fi
17937
17938 $at_traceon
17939
17940
17941
17942
17943       $at_traceoff
17944       $at_times_p && times >"$at_times_file"
17945     ) 5>&1 2>&1 | eval $at_tee_pipe
17946     at_status=`cat "$at_status_file"`
17947     ;;
17948
17949   39 ) # 39. ignfail.at:23: ignfail
17950     at_setup_line='ignfail.at:23'
17951     at_desc="ignfail"
17952     $at_quiet $ECHO_N " 39: ignfail                                        $ECHO_C"
17953     at_xfail=no
17954       test -f $XFAILFILE && at_xfail=yes
17955     echo "#                             -*- compilation -*-" >> "$at_group_log"
17956     (
17957       echo "39. ignfail.at:23: testing ..."
17958       $at_traceon
17959
17960
17961
17962
17963
17964   $at_traceoff
17965 echo "$at_srcdir/ignfail.at:26:
17966 mkdir v7
17967 (cd v7
17968 TEST_TAR_FORMAT=v7
17969 export TEST_TAR_FORMAT
17970 TAR_OPTIONS=\"-H v7\"
17971 export TAR_OPTIONS
17972 rm -rf *
17973
17974 # The test is meaningless for super-user.
17975
17976 echo "test" > $$
17977 chmod 0 $$
17978 cat $$ > /dev/null 2>&1
17979 result=$?
17980 rm -f $$
17981 test $result -eq 0 && exit 77
17982
17983
17984 touch file
17985 mkdir directory
17986 touch directory/file
17987
17988 echo 1>&2 -----
17989 chmod 000 file
17990 tar cf archive file
17991 status=\$?
17992 chmod 600 file
17993 test \$status = 2 || exit 1
17994
17995 echo 1>&2 -----
17996 chmod 000 file
17997 tar cf archive --ignore-failed-read file || exit 1
17998 status=\$?
17999 chmod 600 file
18000 test \$status = 0 || exit 1
18001
18002 echo 1>&2 -----
18003 chmod 000 directory
18004 tar cf archive directory
18005 status=\$?
18006 chmod 700 directory
18007 test \$status = 2 || exit 1
18008
18009 echo 1>&2 -----
18010 chmod 000 directory
18011 tar cf archive --ignore-failed-read directory || exit 1
18012 status=\$?
18013 chmod 700 directory
18014 test \$status = 0
18015 )"
18016 echo ignfail.at:26 >"$at_check_line_file"
18017
18018 at_trace_this=
18019 if test -n "$at_traceon"; then
18020     echo 'Not enabling shell tracing (command contains an embedded newline)'
18021 fi
18022
18023 if test -n "$at_trace_this"; then
18024     ( $at_traceon;
18025 mkdir v7
18026 (cd v7
18027 TEST_TAR_FORMAT=v7
18028 export TEST_TAR_FORMAT
18029 TAR_OPTIONS="-H v7"
18030 export TAR_OPTIONS
18031 rm -rf *
18032
18033 # The test is meaningless for super-user.
18034
18035 echo "test" > $$
18036 chmod 0 $$
18037 cat $$ > /dev/null 2>&1
18038 result=$?
18039 rm -f $$
18040 test $result -eq 0 && exit 77
18041
18042
18043 touch file
18044 mkdir directory
18045 touch directory/file
18046
18047 echo 1>&2 -----
18048 chmod 000 file
18049 tar cf archive file
18050 status=$?
18051 chmod 600 file
18052 test $status = 2 || exit 1
18053
18054 echo 1>&2 -----
18055 chmod 000 file
18056 tar cf archive --ignore-failed-read file || exit 1
18057 status=$?
18058 chmod 600 file
18059 test $status = 0 || exit 1
18060
18061 echo 1>&2 -----
18062 chmod 000 directory
18063 tar cf archive directory
18064 status=$?
18065 chmod 700 directory
18066 test $status = 2 || exit 1
18067
18068 echo 1>&2 -----
18069 chmod 000 directory
18070 tar cf archive --ignore-failed-read directory || exit 1
18071 status=$?
18072 chmod 700 directory
18073 test $status = 0
18074 ) ) >"$at_stdout" 2>"$at_stder1"
18075     at_status=$?
18076     grep '^ *+' "$at_stder1" >&2
18077     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18078 else
18079     ( :;
18080 mkdir v7
18081 (cd v7
18082 TEST_TAR_FORMAT=v7
18083 export TEST_TAR_FORMAT
18084 TAR_OPTIONS="-H v7"
18085 export TAR_OPTIONS
18086 rm -rf *
18087
18088 # The test is meaningless for super-user.
18089
18090 echo "test" > $$
18091 chmod 0 $$
18092 cat $$ > /dev/null 2>&1
18093 result=$?
18094 rm -f $$
18095 test $result -eq 0 && exit 77
18096
18097
18098 touch file
18099 mkdir directory
18100 touch directory/file
18101
18102 echo 1>&2 -----
18103 chmod 000 file
18104 tar cf archive file
18105 status=$?
18106 chmod 600 file
18107 test $status = 2 || exit 1
18108
18109 echo 1>&2 -----
18110 chmod 000 file
18111 tar cf archive --ignore-failed-read file || exit 1
18112 status=$?
18113 chmod 600 file
18114 test $status = 0 || exit 1
18115
18116 echo 1>&2 -----
18117 chmod 000 directory
18118 tar cf archive directory
18119 status=$?
18120 chmod 700 directory
18121 test $status = 2 || exit 1
18122
18123 echo 1>&2 -----
18124 chmod 000 directory
18125 tar cf archive --ignore-failed-read directory || exit 1
18126 status=$?
18127 chmod 700 directory
18128 test $status = 0
18129 ) ) >"$at_stdout" 2>"$at_stderr"
18130     at_status=$?
18131 fi
18132
18133 at_failed=false
18134 echo >>"$at_stderr"; echo "-----
18135 tar: file: Cannot open: Permission denied
18136 tar: Exiting with failure status due to previous errors
18137 -----
18138 tar: file: Warning: Cannot open: Permission denied
18139 -----
18140 tar: directory: Cannot open: Permission denied
18141 tar: Exiting with failure status due to previous errors
18142 -----
18143 tar: directory: Warning: Cannot open: Permission denied
18144 " | $at_diff - "$at_stderr" || at_failed=:
18145 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
18146 case $at_status in
18147    77) echo 77 > "$at_status_file"; exit 77;;
18148    0) ;;
18149    *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
18150       at_failed=:;;
18151 esac
18152 if $at_failed; then
18153
18154
18155   echo 1 > "$at_status_file"
18156   exit 1
18157 fi
18158
18159 $at_traceon
18160
18161               $at_traceoff
18162 echo "$at_srcdir/ignfail.at:26:
18163 mkdir oldgnu
18164 (cd oldgnu
18165 TEST_TAR_FORMAT=oldgnu
18166 export TEST_TAR_FORMAT
18167 TAR_OPTIONS=\"-H oldgnu\"
18168 export TAR_OPTIONS
18169 rm -rf *
18170
18171 # The test is meaningless for super-user.
18172
18173 echo "test" > $$
18174 chmod 0 $$
18175 cat $$ > /dev/null 2>&1
18176 result=$?
18177 rm -f $$
18178 test $result -eq 0 && exit 77
18179
18180
18181 touch file
18182 mkdir directory
18183 touch directory/file
18184
18185 echo 1>&2 -----
18186 chmod 000 file
18187 tar cf archive file
18188 status=\$?
18189 chmod 600 file
18190 test \$status = 2 || exit 1
18191
18192 echo 1>&2 -----
18193 chmod 000 file
18194 tar cf archive --ignore-failed-read file || exit 1
18195 status=\$?
18196 chmod 600 file
18197 test \$status = 0 || exit 1
18198
18199 echo 1>&2 -----
18200 chmod 000 directory
18201 tar cf archive directory
18202 status=\$?
18203 chmod 700 directory
18204 test \$status = 2 || exit 1
18205
18206 echo 1>&2 -----
18207 chmod 000 directory
18208 tar cf archive --ignore-failed-read directory || exit 1
18209 status=\$?
18210 chmod 700 directory
18211 test \$status = 0
18212 )"
18213 echo ignfail.at:26 >"$at_check_line_file"
18214
18215 at_trace_this=
18216 if test -n "$at_traceon"; then
18217     echo 'Not enabling shell tracing (command contains an embedded newline)'
18218 fi
18219
18220 if test -n "$at_trace_this"; then
18221     ( $at_traceon;
18222 mkdir oldgnu
18223 (cd oldgnu
18224 TEST_TAR_FORMAT=oldgnu
18225 export TEST_TAR_FORMAT
18226 TAR_OPTIONS="-H oldgnu"
18227 export TAR_OPTIONS
18228 rm -rf *
18229
18230 # The test is meaningless for super-user.
18231
18232 echo "test" > $$
18233 chmod 0 $$
18234 cat $$ > /dev/null 2>&1
18235 result=$?
18236 rm -f $$
18237 test $result -eq 0 && exit 77
18238
18239
18240 touch file
18241 mkdir directory
18242 touch directory/file
18243
18244 echo 1>&2 -----
18245 chmod 000 file
18246 tar cf archive file
18247 status=$?
18248 chmod 600 file
18249 test $status = 2 || exit 1
18250
18251 echo 1>&2 -----
18252 chmod 000 file
18253 tar cf archive --ignore-failed-read file || exit 1
18254 status=$?
18255 chmod 600 file
18256 test $status = 0 || exit 1
18257
18258 echo 1>&2 -----
18259 chmod 000 directory
18260 tar cf archive directory
18261 status=$?
18262 chmod 700 directory
18263 test $status = 2 || exit 1
18264
18265 echo 1>&2 -----
18266 chmod 000 directory
18267 tar cf archive --ignore-failed-read directory || exit 1
18268 status=$?
18269 chmod 700 directory
18270 test $status = 0
18271 ) ) >"$at_stdout" 2>"$at_stder1"
18272     at_status=$?
18273     grep '^ *+' "$at_stder1" >&2
18274     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18275 else
18276     ( :;
18277 mkdir oldgnu
18278 (cd oldgnu
18279 TEST_TAR_FORMAT=oldgnu
18280 export TEST_TAR_FORMAT
18281 TAR_OPTIONS="-H oldgnu"
18282 export TAR_OPTIONS
18283 rm -rf *
18284
18285 # The test is meaningless for super-user.
18286
18287 echo "test" > $$
18288 chmod 0 $$
18289 cat $$ > /dev/null 2>&1
18290 result=$?
18291 rm -f $$
18292 test $result -eq 0 && exit 77
18293
18294
18295 touch file
18296 mkdir directory
18297 touch directory/file
18298
18299 echo 1>&2 -----
18300 chmod 000 file
18301 tar cf archive file
18302 status=$?
18303 chmod 600 file
18304 test $status = 2 || exit 1
18305
18306 echo 1>&2 -----
18307 chmod 000 file
18308 tar cf archive --ignore-failed-read file || exit 1
18309 status=$?
18310 chmod 600 file
18311 test $status = 0 || exit 1
18312
18313 echo 1>&2 -----
18314 chmod 000 directory
18315 tar cf archive directory
18316 status=$?
18317 chmod 700 directory
18318 test $status = 2 || exit 1
18319
18320 echo 1>&2 -----
18321 chmod 000 directory
18322 tar cf archive --ignore-failed-read directory || exit 1
18323 status=$?
18324 chmod 700 directory
18325 test $status = 0
18326 ) ) >"$at_stdout" 2>"$at_stderr"
18327     at_status=$?
18328 fi
18329
18330 at_failed=false
18331 echo >>"$at_stderr"; echo "-----
18332 tar: file: Cannot open: Permission denied
18333 tar: Exiting with failure status due to previous errors
18334 -----
18335 tar: file: Warning: Cannot open: Permission denied
18336 -----
18337 tar: directory: Cannot open: Permission denied
18338 tar: Exiting with failure status due to previous errors
18339 -----
18340 tar: directory: Warning: Cannot open: Permission denied
18341 " | $at_diff - "$at_stderr" || at_failed=:
18342 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
18343 case $at_status in
18344    77) echo 77 > "$at_status_file"; exit 77;;
18345    0) ;;
18346    *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
18347       at_failed=:;;
18348 esac
18349 if $at_failed; then
18350
18351
18352   echo 1 > "$at_status_file"
18353   exit 1
18354 fi
18355
18356 $at_traceon
18357
18358               $at_traceoff
18359 echo "$at_srcdir/ignfail.at:26:
18360 mkdir ustar
18361 (cd ustar
18362 TEST_TAR_FORMAT=ustar
18363 export TEST_TAR_FORMAT
18364 TAR_OPTIONS=\"-H ustar\"
18365 export TAR_OPTIONS
18366 rm -rf *
18367
18368 # The test is meaningless for super-user.
18369
18370 echo "test" > $$
18371 chmod 0 $$
18372 cat $$ > /dev/null 2>&1
18373 result=$?
18374 rm -f $$
18375 test $result -eq 0 && exit 77
18376
18377
18378 touch file
18379 mkdir directory
18380 touch directory/file
18381
18382 echo 1>&2 -----
18383 chmod 000 file
18384 tar cf archive file
18385 status=\$?
18386 chmod 600 file
18387 test \$status = 2 || exit 1
18388
18389 echo 1>&2 -----
18390 chmod 000 file
18391 tar cf archive --ignore-failed-read file || exit 1
18392 status=\$?
18393 chmod 600 file
18394 test \$status = 0 || exit 1
18395
18396 echo 1>&2 -----
18397 chmod 000 directory
18398 tar cf archive directory
18399 status=\$?
18400 chmod 700 directory
18401 test \$status = 2 || exit 1
18402
18403 echo 1>&2 -----
18404 chmod 000 directory
18405 tar cf archive --ignore-failed-read directory || exit 1
18406 status=\$?
18407 chmod 700 directory
18408 test \$status = 0
18409 )"
18410 echo ignfail.at:26 >"$at_check_line_file"
18411
18412 at_trace_this=
18413 if test -n "$at_traceon"; then
18414     echo 'Not enabling shell tracing (command contains an embedded newline)'
18415 fi
18416
18417 if test -n "$at_trace_this"; then
18418     ( $at_traceon;
18419 mkdir ustar
18420 (cd ustar
18421 TEST_TAR_FORMAT=ustar
18422 export TEST_TAR_FORMAT
18423 TAR_OPTIONS="-H ustar"
18424 export TAR_OPTIONS
18425 rm -rf *
18426
18427 # The test is meaningless for super-user.
18428
18429 echo "test" > $$
18430 chmod 0 $$
18431 cat $$ > /dev/null 2>&1
18432 result=$?
18433 rm -f $$
18434 test $result -eq 0 && exit 77
18435
18436
18437 touch file
18438 mkdir directory
18439 touch directory/file
18440
18441 echo 1>&2 -----
18442 chmod 000 file
18443 tar cf archive file
18444 status=$?
18445 chmod 600 file
18446 test $status = 2 || exit 1
18447
18448 echo 1>&2 -----
18449 chmod 000 file
18450 tar cf archive --ignore-failed-read file || exit 1
18451 status=$?
18452 chmod 600 file
18453 test $status = 0 || exit 1
18454
18455 echo 1>&2 -----
18456 chmod 000 directory
18457 tar cf archive directory
18458 status=$?
18459 chmod 700 directory
18460 test $status = 2 || exit 1
18461
18462 echo 1>&2 -----
18463 chmod 000 directory
18464 tar cf archive --ignore-failed-read directory || exit 1
18465 status=$?
18466 chmod 700 directory
18467 test $status = 0
18468 ) ) >"$at_stdout" 2>"$at_stder1"
18469     at_status=$?
18470     grep '^ *+' "$at_stder1" >&2
18471     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18472 else
18473     ( :;
18474 mkdir ustar
18475 (cd ustar
18476 TEST_TAR_FORMAT=ustar
18477 export TEST_TAR_FORMAT
18478 TAR_OPTIONS="-H ustar"
18479 export TAR_OPTIONS
18480 rm -rf *
18481
18482 # The test is meaningless for super-user.
18483
18484 echo "test" > $$
18485 chmod 0 $$
18486 cat $$ > /dev/null 2>&1
18487 result=$?
18488 rm -f $$
18489 test $result -eq 0 && exit 77
18490
18491
18492 touch file
18493 mkdir directory
18494 touch directory/file
18495
18496 echo 1>&2 -----
18497 chmod 000 file
18498 tar cf archive file
18499 status=$?
18500 chmod 600 file
18501 test $status = 2 || exit 1
18502
18503 echo 1>&2 -----
18504 chmod 000 file
18505 tar cf archive --ignore-failed-read file || exit 1
18506 status=$?
18507 chmod 600 file
18508 test $status = 0 || exit 1
18509
18510 echo 1>&2 -----
18511 chmod 000 directory
18512 tar cf archive directory
18513 status=$?
18514 chmod 700 directory
18515 test $status = 2 || exit 1
18516
18517 echo 1>&2 -----
18518 chmod 000 directory
18519 tar cf archive --ignore-failed-read directory || exit 1
18520 status=$?
18521 chmod 700 directory
18522 test $status = 0
18523 ) ) >"$at_stdout" 2>"$at_stderr"
18524     at_status=$?
18525 fi
18526
18527 at_failed=false
18528 echo >>"$at_stderr"; echo "-----
18529 tar: file: Cannot open: Permission denied
18530 tar: Exiting with failure status due to previous errors
18531 -----
18532 tar: file: Warning: Cannot open: Permission denied
18533 -----
18534 tar: directory: Cannot open: Permission denied
18535 tar: Exiting with failure status due to previous errors
18536 -----
18537 tar: directory: Warning: Cannot open: Permission denied
18538 " | $at_diff - "$at_stderr" || at_failed=:
18539 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
18540 case $at_status in
18541    77) echo 77 > "$at_status_file"; exit 77;;
18542    0) ;;
18543    *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
18544       at_failed=:;;
18545 esac
18546 if $at_failed; then
18547
18548
18549   echo 1 > "$at_status_file"
18550   exit 1
18551 fi
18552
18553 $at_traceon
18554
18555               $at_traceoff
18556 echo "$at_srcdir/ignfail.at:26:
18557 mkdir posix
18558 (cd posix
18559 TEST_TAR_FORMAT=posix
18560 export TEST_TAR_FORMAT
18561 TAR_OPTIONS=\"-H posix\"
18562 export TAR_OPTIONS
18563 rm -rf *
18564
18565 # The test is meaningless for super-user.
18566
18567 echo "test" > $$
18568 chmod 0 $$
18569 cat $$ > /dev/null 2>&1
18570 result=$?
18571 rm -f $$
18572 test $result -eq 0 && exit 77
18573
18574
18575 touch file
18576 mkdir directory
18577 touch directory/file
18578
18579 echo 1>&2 -----
18580 chmod 000 file
18581 tar cf archive file
18582 status=\$?
18583 chmod 600 file
18584 test \$status = 2 || exit 1
18585
18586 echo 1>&2 -----
18587 chmod 000 file
18588 tar cf archive --ignore-failed-read file || exit 1
18589 status=\$?
18590 chmod 600 file
18591 test \$status = 0 || exit 1
18592
18593 echo 1>&2 -----
18594 chmod 000 directory
18595 tar cf archive directory
18596 status=\$?
18597 chmod 700 directory
18598 test \$status = 2 || exit 1
18599
18600 echo 1>&2 -----
18601 chmod 000 directory
18602 tar cf archive --ignore-failed-read directory || exit 1
18603 status=\$?
18604 chmod 700 directory
18605 test \$status = 0
18606 )"
18607 echo ignfail.at:26 >"$at_check_line_file"
18608
18609 at_trace_this=
18610 if test -n "$at_traceon"; then
18611     echo 'Not enabling shell tracing (command contains an embedded newline)'
18612 fi
18613
18614 if test -n "$at_trace_this"; then
18615     ( $at_traceon;
18616 mkdir posix
18617 (cd posix
18618 TEST_TAR_FORMAT=posix
18619 export TEST_TAR_FORMAT
18620 TAR_OPTIONS="-H posix"
18621 export TAR_OPTIONS
18622 rm -rf *
18623
18624 # The test is meaningless for super-user.
18625
18626 echo "test" > $$
18627 chmod 0 $$
18628 cat $$ > /dev/null 2>&1
18629 result=$?
18630 rm -f $$
18631 test $result -eq 0 && exit 77
18632
18633
18634 touch file
18635 mkdir directory
18636 touch directory/file
18637
18638 echo 1>&2 -----
18639 chmod 000 file
18640 tar cf archive file
18641 status=$?
18642 chmod 600 file
18643 test $status = 2 || exit 1
18644
18645 echo 1>&2 -----
18646 chmod 000 file
18647 tar cf archive --ignore-failed-read file || exit 1
18648 status=$?
18649 chmod 600 file
18650 test $status = 0 || exit 1
18651
18652 echo 1>&2 -----
18653 chmod 000 directory
18654 tar cf archive directory
18655 status=$?
18656 chmod 700 directory
18657 test $status = 2 || exit 1
18658
18659 echo 1>&2 -----
18660 chmod 000 directory
18661 tar cf archive --ignore-failed-read directory || exit 1
18662 status=$?
18663 chmod 700 directory
18664 test $status = 0
18665 ) ) >"$at_stdout" 2>"$at_stder1"
18666     at_status=$?
18667     grep '^ *+' "$at_stder1" >&2
18668     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18669 else
18670     ( :;
18671 mkdir posix
18672 (cd posix
18673 TEST_TAR_FORMAT=posix
18674 export TEST_TAR_FORMAT
18675 TAR_OPTIONS="-H posix"
18676 export TAR_OPTIONS
18677 rm -rf *
18678
18679 # The test is meaningless for super-user.
18680
18681 echo "test" > $$
18682 chmod 0 $$
18683 cat $$ > /dev/null 2>&1
18684 result=$?
18685 rm -f $$
18686 test $result -eq 0 && exit 77
18687
18688
18689 touch file
18690 mkdir directory
18691 touch directory/file
18692
18693 echo 1>&2 -----
18694 chmod 000 file
18695 tar cf archive file
18696 status=$?
18697 chmod 600 file
18698 test $status = 2 || exit 1
18699
18700 echo 1>&2 -----
18701 chmod 000 file
18702 tar cf archive --ignore-failed-read file || exit 1
18703 status=$?
18704 chmod 600 file
18705 test $status = 0 || exit 1
18706
18707 echo 1>&2 -----
18708 chmod 000 directory
18709 tar cf archive directory
18710 status=$?
18711 chmod 700 directory
18712 test $status = 2 || exit 1
18713
18714 echo 1>&2 -----
18715 chmod 000 directory
18716 tar cf archive --ignore-failed-read directory || exit 1
18717 status=$?
18718 chmod 700 directory
18719 test $status = 0
18720 ) ) >"$at_stdout" 2>"$at_stderr"
18721     at_status=$?
18722 fi
18723
18724 at_failed=false
18725 echo >>"$at_stderr"; echo "-----
18726 tar: file: Cannot open: Permission denied
18727 tar: Exiting with failure status due to previous errors
18728 -----
18729 tar: file: Warning: Cannot open: Permission denied
18730 -----
18731 tar: directory: Cannot open: Permission denied
18732 tar: Exiting with failure status due to previous errors
18733 -----
18734 tar: directory: Warning: Cannot open: Permission denied
18735 " | $at_diff - "$at_stderr" || at_failed=:
18736 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
18737 case $at_status in
18738    77) echo 77 > "$at_status_file"; exit 77;;
18739    0) ;;
18740    *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
18741       at_failed=:;;
18742 esac
18743 if $at_failed; then
18744
18745
18746   echo 1 > "$at_status_file"
18747   exit 1
18748 fi
18749
18750 $at_traceon
18751
18752               $at_traceoff
18753 echo "$at_srcdir/ignfail.at:26:
18754 mkdir gnu
18755 (cd gnu
18756 TEST_TAR_FORMAT=gnu
18757 export TEST_TAR_FORMAT
18758 TAR_OPTIONS=\"-H gnu\"
18759 export TAR_OPTIONS
18760 rm -rf *
18761
18762 # The test is meaningless for super-user.
18763
18764 echo "test" > $$
18765 chmod 0 $$
18766 cat $$ > /dev/null 2>&1
18767 result=$?
18768 rm -f $$
18769 test $result -eq 0 && exit 77
18770
18771
18772 touch file
18773 mkdir directory
18774 touch directory/file
18775
18776 echo 1>&2 -----
18777 chmod 000 file
18778 tar cf archive file
18779 status=\$?
18780 chmod 600 file
18781 test \$status = 2 || exit 1
18782
18783 echo 1>&2 -----
18784 chmod 000 file
18785 tar cf archive --ignore-failed-read file || exit 1
18786 status=\$?
18787 chmod 600 file
18788 test \$status = 0 || exit 1
18789
18790 echo 1>&2 -----
18791 chmod 000 directory
18792 tar cf archive directory
18793 status=\$?
18794 chmod 700 directory
18795 test \$status = 2 || exit 1
18796
18797 echo 1>&2 -----
18798 chmod 000 directory
18799 tar cf archive --ignore-failed-read directory || exit 1
18800 status=\$?
18801 chmod 700 directory
18802 test \$status = 0
18803 )"
18804 echo ignfail.at:26 >"$at_check_line_file"
18805
18806 at_trace_this=
18807 if test -n "$at_traceon"; then
18808     echo 'Not enabling shell tracing (command contains an embedded newline)'
18809 fi
18810
18811 if test -n "$at_trace_this"; then
18812     ( $at_traceon;
18813 mkdir gnu
18814 (cd gnu
18815 TEST_TAR_FORMAT=gnu
18816 export TEST_TAR_FORMAT
18817 TAR_OPTIONS="-H gnu"
18818 export TAR_OPTIONS
18819 rm -rf *
18820
18821 # The test is meaningless for super-user.
18822
18823 echo "test" > $$
18824 chmod 0 $$
18825 cat $$ > /dev/null 2>&1
18826 result=$?
18827 rm -f $$
18828 test $result -eq 0 && exit 77
18829
18830
18831 touch file
18832 mkdir directory
18833 touch directory/file
18834
18835 echo 1>&2 -----
18836 chmod 000 file
18837 tar cf archive file
18838 status=$?
18839 chmod 600 file
18840 test $status = 2 || exit 1
18841
18842 echo 1>&2 -----
18843 chmod 000 file
18844 tar cf archive --ignore-failed-read file || exit 1
18845 status=$?
18846 chmod 600 file
18847 test $status = 0 || exit 1
18848
18849 echo 1>&2 -----
18850 chmod 000 directory
18851 tar cf archive directory
18852 status=$?
18853 chmod 700 directory
18854 test $status = 2 || exit 1
18855
18856 echo 1>&2 -----
18857 chmod 000 directory
18858 tar cf archive --ignore-failed-read directory || exit 1
18859 status=$?
18860 chmod 700 directory
18861 test $status = 0
18862 ) ) >"$at_stdout" 2>"$at_stder1"
18863     at_status=$?
18864     grep '^ *+' "$at_stder1" >&2
18865     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18866 else
18867     ( :;
18868 mkdir gnu
18869 (cd gnu
18870 TEST_TAR_FORMAT=gnu
18871 export TEST_TAR_FORMAT
18872 TAR_OPTIONS="-H gnu"
18873 export TAR_OPTIONS
18874 rm -rf *
18875
18876 # The test is meaningless for super-user.
18877
18878 echo "test" > $$
18879 chmod 0 $$
18880 cat $$ > /dev/null 2>&1
18881 result=$?
18882 rm -f $$
18883 test $result -eq 0 && exit 77
18884
18885
18886 touch file
18887 mkdir directory
18888 touch directory/file
18889
18890 echo 1>&2 -----
18891 chmod 000 file
18892 tar cf archive file
18893 status=$?
18894 chmod 600 file
18895 test $status = 2 || exit 1
18896
18897 echo 1>&2 -----
18898 chmod 000 file
18899 tar cf archive --ignore-failed-read file || exit 1
18900 status=$?
18901 chmod 600 file
18902 test $status = 0 || exit 1
18903
18904 echo 1>&2 -----
18905 chmod 000 directory
18906 tar cf archive directory
18907 status=$?
18908 chmod 700 directory
18909 test $status = 2 || exit 1
18910
18911 echo 1>&2 -----
18912 chmod 000 directory
18913 tar cf archive --ignore-failed-read directory || exit 1
18914 status=$?
18915 chmod 700 directory
18916 test $status = 0
18917 ) ) >"$at_stdout" 2>"$at_stderr"
18918     at_status=$?
18919 fi
18920
18921 at_failed=false
18922 echo >>"$at_stderr"; echo "-----
18923 tar: file: Cannot open: Permission denied
18924 tar: Exiting with failure status due to previous errors
18925 -----
18926 tar: file: Warning: Cannot open: Permission denied
18927 -----
18928 tar: directory: Cannot open: Permission denied
18929 tar: Exiting with failure status due to previous errors
18930 -----
18931 tar: directory: Warning: Cannot open: Permission denied
18932 " | $at_diff - "$at_stderr" || at_failed=:
18933 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
18934 case $at_status in
18935    77) echo 77 > "$at_status_file"; exit 77;;
18936    0) ;;
18937    *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
18938       at_failed=:;;
18939 esac
18940 if $at_failed; then
18941
18942
18943   echo 1 > "$at_status_file"
18944   exit 1
18945 fi
18946
18947 $at_traceon
18948
18949
18950
18951
18952       $at_traceoff
18953       $at_times_p && times >"$at_times_file"
18954     ) 5>&1 2>&1 | eval $at_tee_pipe
18955     at_status=`cat "$at_status_file"`
18956     ;;
18957
18958   40 ) # 40. link01.at:33: link count gt 2
18959     at_setup_line='link01.at:33'
18960     at_desc="link count gt 2"
18961     $at_quiet $ECHO_N " 40: link count gt 2                                $ECHO_C"
18962     at_xfail=no
18963       test -f $XFAILFILE && at_xfail=yes
18964     echo "#                             -*- compilation -*-" >> "$at_group_log"
18965     (
18966       echo "40. link01.at:33: testing ..."
18967       $at_traceon
18968
18969
18970
18971
18972
18973   $at_traceoff
18974 echo "$at_srcdir/link01.at:36:
18975 mkdir v7
18976 (cd v7
18977 TEST_TAR_FORMAT=v7
18978 export TEST_TAR_FORMAT
18979 TAR_OPTIONS=\"-H v7\"
18980 export TAR_OPTIONS
18981 rm -rf *
18982
18983 mkdir directory
18984 mkdir directory/test1
18985 mkdir directory/test2
18986
18987 echo TEST > directory/test1/test.txt
18988 ln directory/test1/test.txt directory/test2/test.txt || exit 77
18989
18990 tar cf archive directory/test1/test.txt directory/test1/test.txt
18991
18992 rm -r directory
18993 tar xf archive
18994
18995 ls directory/test1
18996 )"
18997 echo link01.at:36 >"$at_check_line_file"
18998
18999 at_trace_this=
19000 if test -n "$at_traceon"; then
19001     echo 'Not enabling shell tracing (command contains an embedded newline)'
19002 fi
19003
19004 if test -n "$at_trace_this"; then
19005     ( $at_traceon;
19006 mkdir v7
19007 (cd v7
19008 TEST_TAR_FORMAT=v7
19009 export TEST_TAR_FORMAT
19010 TAR_OPTIONS="-H v7"
19011 export TAR_OPTIONS
19012 rm -rf *
19013
19014 mkdir directory
19015 mkdir directory/test1
19016 mkdir directory/test2
19017
19018 echo TEST > directory/test1/test.txt
19019 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19020
19021 tar cf archive directory/test1/test.txt directory/test1/test.txt
19022
19023 rm -r directory
19024 tar xf archive
19025
19026 ls directory/test1
19027 ) ) >"$at_stdout" 2>"$at_stder1"
19028     at_status=$?
19029     grep '^ *+' "$at_stder1" >&2
19030     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19031 else
19032     ( :;
19033 mkdir v7
19034 (cd v7
19035 TEST_TAR_FORMAT=v7
19036 export TEST_TAR_FORMAT
19037 TAR_OPTIONS="-H v7"
19038 export TAR_OPTIONS
19039 rm -rf *
19040
19041 mkdir directory
19042 mkdir directory/test1
19043 mkdir directory/test2
19044
19045 echo TEST > directory/test1/test.txt
19046 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19047
19048 tar cf archive directory/test1/test.txt directory/test1/test.txt
19049
19050 rm -r directory
19051 tar xf archive
19052
19053 ls directory/test1
19054 ) ) >"$at_stdout" 2>"$at_stderr"
19055     at_status=$?
19056 fi
19057
19058 at_failed=false
19059 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19060 echo >>"$at_stdout"; echo "test.txt
19061 " | $at_diff - "$at_stdout" || at_failed=:
19062 case $at_status in
19063    77) echo 77 > "$at_status_file"; exit 77;;
19064    0) ;;
19065    *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
19066       at_failed=:;;
19067 esac
19068 if $at_failed; then
19069
19070
19071   echo 1 > "$at_status_file"
19072   exit 1
19073 fi
19074
19075 $at_traceon
19076
19077               $at_traceoff
19078 echo "$at_srcdir/link01.at:36:
19079 mkdir oldgnu
19080 (cd oldgnu
19081 TEST_TAR_FORMAT=oldgnu
19082 export TEST_TAR_FORMAT
19083 TAR_OPTIONS=\"-H oldgnu\"
19084 export TAR_OPTIONS
19085 rm -rf *
19086
19087 mkdir directory
19088 mkdir directory/test1
19089 mkdir directory/test2
19090
19091 echo TEST > directory/test1/test.txt
19092 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19093
19094 tar cf archive directory/test1/test.txt directory/test1/test.txt
19095
19096 rm -r directory
19097 tar xf archive
19098
19099 ls directory/test1
19100 )"
19101 echo link01.at:36 >"$at_check_line_file"
19102
19103 at_trace_this=
19104 if test -n "$at_traceon"; then
19105     echo 'Not enabling shell tracing (command contains an embedded newline)'
19106 fi
19107
19108 if test -n "$at_trace_this"; then
19109     ( $at_traceon;
19110 mkdir oldgnu
19111 (cd oldgnu
19112 TEST_TAR_FORMAT=oldgnu
19113 export TEST_TAR_FORMAT
19114 TAR_OPTIONS="-H oldgnu"
19115 export TAR_OPTIONS
19116 rm -rf *
19117
19118 mkdir directory
19119 mkdir directory/test1
19120 mkdir directory/test2
19121
19122 echo TEST > directory/test1/test.txt
19123 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19124
19125 tar cf archive directory/test1/test.txt directory/test1/test.txt
19126
19127 rm -r directory
19128 tar xf archive
19129
19130 ls directory/test1
19131 ) ) >"$at_stdout" 2>"$at_stder1"
19132     at_status=$?
19133     grep '^ *+' "$at_stder1" >&2
19134     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19135 else
19136     ( :;
19137 mkdir oldgnu
19138 (cd oldgnu
19139 TEST_TAR_FORMAT=oldgnu
19140 export TEST_TAR_FORMAT
19141 TAR_OPTIONS="-H oldgnu"
19142 export TAR_OPTIONS
19143 rm -rf *
19144
19145 mkdir directory
19146 mkdir directory/test1
19147 mkdir directory/test2
19148
19149 echo TEST > directory/test1/test.txt
19150 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19151
19152 tar cf archive directory/test1/test.txt directory/test1/test.txt
19153
19154 rm -r directory
19155 tar xf archive
19156
19157 ls directory/test1
19158 ) ) >"$at_stdout" 2>"$at_stderr"
19159     at_status=$?
19160 fi
19161
19162 at_failed=false
19163 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19164 echo >>"$at_stdout"; echo "test.txt
19165 " | $at_diff - "$at_stdout" || at_failed=:
19166 case $at_status in
19167    77) echo 77 > "$at_status_file"; exit 77;;
19168    0) ;;
19169    *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
19170       at_failed=:;;
19171 esac
19172 if $at_failed; then
19173
19174
19175   echo 1 > "$at_status_file"
19176   exit 1
19177 fi
19178
19179 $at_traceon
19180
19181               $at_traceoff
19182 echo "$at_srcdir/link01.at:36:
19183 mkdir ustar
19184 (cd ustar
19185 TEST_TAR_FORMAT=ustar
19186 export TEST_TAR_FORMAT
19187 TAR_OPTIONS=\"-H ustar\"
19188 export TAR_OPTIONS
19189 rm -rf *
19190
19191 mkdir directory
19192 mkdir directory/test1
19193 mkdir directory/test2
19194
19195 echo TEST > directory/test1/test.txt
19196 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19197
19198 tar cf archive directory/test1/test.txt directory/test1/test.txt
19199
19200 rm -r directory
19201 tar xf archive
19202
19203 ls directory/test1
19204 )"
19205 echo link01.at:36 >"$at_check_line_file"
19206
19207 at_trace_this=
19208 if test -n "$at_traceon"; then
19209     echo 'Not enabling shell tracing (command contains an embedded newline)'
19210 fi
19211
19212 if test -n "$at_trace_this"; then
19213     ( $at_traceon;
19214 mkdir ustar
19215 (cd ustar
19216 TEST_TAR_FORMAT=ustar
19217 export TEST_TAR_FORMAT
19218 TAR_OPTIONS="-H ustar"
19219 export TAR_OPTIONS
19220 rm -rf *
19221
19222 mkdir directory
19223 mkdir directory/test1
19224 mkdir directory/test2
19225
19226 echo TEST > directory/test1/test.txt
19227 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19228
19229 tar cf archive directory/test1/test.txt directory/test1/test.txt
19230
19231 rm -r directory
19232 tar xf archive
19233
19234 ls directory/test1
19235 ) ) >"$at_stdout" 2>"$at_stder1"
19236     at_status=$?
19237     grep '^ *+' "$at_stder1" >&2
19238     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19239 else
19240     ( :;
19241 mkdir ustar
19242 (cd ustar
19243 TEST_TAR_FORMAT=ustar
19244 export TEST_TAR_FORMAT
19245 TAR_OPTIONS="-H ustar"
19246 export TAR_OPTIONS
19247 rm -rf *
19248
19249 mkdir directory
19250 mkdir directory/test1
19251 mkdir directory/test2
19252
19253 echo TEST > directory/test1/test.txt
19254 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19255
19256 tar cf archive directory/test1/test.txt directory/test1/test.txt
19257
19258 rm -r directory
19259 tar xf archive
19260
19261 ls directory/test1
19262 ) ) >"$at_stdout" 2>"$at_stderr"
19263     at_status=$?
19264 fi
19265
19266 at_failed=false
19267 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19268 echo >>"$at_stdout"; echo "test.txt
19269 " | $at_diff - "$at_stdout" || at_failed=:
19270 case $at_status in
19271    77) echo 77 > "$at_status_file"; exit 77;;
19272    0) ;;
19273    *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
19274       at_failed=:;;
19275 esac
19276 if $at_failed; then
19277
19278
19279   echo 1 > "$at_status_file"
19280   exit 1
19281 fi
19282
19283 $at_traceon
19284
19285               $at_traceoff
19286 echo "$at_srcdir/link01.at:36:
19287 mkdir posix
19288 (cd posix
19289 TEST_TAR_FORMAT=posix
19290 export TEST_TAR_FORMAT
19291 TAR_OPTIONS=\"-H posix\"
19292 export TAR_OPTIONS
19293 rm -rf *
19294
19295 mkdir directory
19296 mkdir directory/test1
19297 mkdir directory/test2
19298
19299 echo TEST > directory/test1/test.txt
19300 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19301
19302 tar cf archive directory/test1/test.txt directory/test1/test.txt
19303
19304 rm -r directory
19305 tar xf archive
19306
19307 ls directory/test1
19308 )"
19309 echo link01.at:36 >"$at_check_line_file"
19310
19311 at_trace_this=
19312 if test -n "$at_traceon"; then
19313     echo 'Not enabling shell tracing (command contains an embedded newline)'
19314 fi
19315
19316 if test -n "$at_trace_this"; then
19317     ( $at_traceon;
19318 mkdir posix
19319 (cd posix
19320 TEST_TAR_FORMAT=posix
19321 export TEST_TAR_FORMAT
19322 TAR_OPTIONS="-H posix"
19323 export TAR_OPTIONS
19324 rm -rf *
19325
19326 mkdir directory
19327 mkdir directory/test1
19328 mkdir directory/test2
19329
19330 echo TEST > directory/test1/test.txt
19331 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19332
19333 tar cf archive directory/test1/test.txt directory/test1/test.txt
19334
19335 rm -r directory
19336 tar xf archive
19337
19338 ls directory/test1
19339 ) ) >"$at_stdout" 2>"$at_stder1"
19340     at_status=$?
19341     grep '^ *+' "$at_stder1" >&2
19342     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19343 else
19344     ( :;
19345 mkdir posix
19346 (cd posix
19347 TEST_TAR_FORMAT=posix
19348 export TEST_TAR_FORMAT
19349 TAR_OPTIONS="-H posix"
19350 export TAR_OPTIONS
19351 rm -rf *
19352
19353 mkdir directory
19354 mkdir directory/test1
19355 mkdir directory/test2
19356
19357 echo TEST > directory/test1/test.txt
19358 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19359
19360 tar cf archive directory/test1/test.txt directory/test1/test.txt
19361
19362 rm -r directory
19363 tar xf archive
19364
19365 ls directory/test1
19366 ) ) >"$at_stdout" 2>"$at_stderr"
19367     at_status=$?
19368 fi
19369
19370 at_failed=false
19371 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19372 echo >>"$at_stdout"; echo "test.txt
19373 " | $at_diff - "$at_stdout" || at_failed=:
19374 case $at_status in
19375    77) echo 77 > "$at_status_file"; exit 77;;
19376    0) ;;
19377    *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
19378       at_failed=:;;
19379 esac
19380 if $at_failed; then
19381
19382
19383   echo 1 > "$at_status_file"
19384   exit 1
19385 fi
19386
19387 $at_traceon
19388
19389               $at_traceoff
19390 echo "$at_srcdir/link01.at:36:
19391 mkdir gnu
19392 (cd gnu
19393 TEST_TAR_FORMAT=gnu
19394 export TEST_TAR_FORMAT
19395 TAR_OPTIONS=\"-H gnu\"
19396 export TAR_OPTIONS
19397 rm -rf *
19398
19399 mkdir directory
19400 mkdir directory/test1
19401 mkdir directory/test2
19402
19403 echo TEST > directory/test1/test.txt
19404 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19405
19406 tar cf archive directory/test1/test.txt directory/test1/test.txt
19407
19408 rm -r directory
19409 tar xf archive
19410
19411 ls directory/test1
19412 )"
19413 echo link01.at:36 >"$at_check_line_file"
19414
19415 at_trace_this=
19416 if test -n "$at_traceon"; then
19417     echo 'Not enabling shell tracing (command contains an embedded newline)'
19418 fi
19419
19420 if test -n "$at_trace_this"; then
19421     ( $at_traceon;
19422 mkdir gnu
19423 (cd gnu
19424 TEST_TAR_FORMAT=gnu
19425 export TEST_TAR_FORMAT
19426 TAR_OPTIONS="-H gnu"
19427 export TAR_OPTIONS
19428 rm -rf *
19429
19430 mkdir directory
19431 mkdir directory/test1
19432 mkdir directory/test2
19433
19434 echo TEST > directory/test1/test.txt
19435 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19436
19437 tar cf archive directory/test1/test.txt directory/test1/test.txt
19438
19439 rm -r directory
19440 tar xf archive
19441
19442 ls directory/test1
19443 ) ) >"$at_stdout" 2>"$at_stder1"
19444     at_status=$?
19445     grep '^ *+' "$at_stder1" >&2
19446     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19447 else
19448     ( :;
19449 mkdir gnu
19450 (cd gnu
19451 TEST_TAR_FORMAT=gnu
19452 export TEST_TAR_FORMAT
19453 TAR_OPTIONS="-H gnu"
19454 export TAR_OPTIONS
19455 rm -rf *
19456
19457 mkdir directory
19458 mkdir directory/test1
19459 mkdir directory/test2
19460
19461 echo TEST > directory/test1/test.txt
19462 ln directory/test1/test.txt directory/test2/test.txt || exit 77
19463
19464 tar cf archive directory/test1/test.txt directory/test1/test.txt
19465
19466 rm -r directory
19467 tar xf archive
19468
19469 ls directory/test1
19470 ) ) >"$at_stdout" 2>"$at_stderr"
19471     at_status=$?
19472 fi
19473
19474 at_failed=false
19475 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19476 echo >>"$at_stdout"; echo "test.txt
19477 " | $at_diff - "$at_stdout" || at_failed=:
19478 case $at_status in
19479    77) echo 77 > "$at_status_file"; exit 77;;
19480    0) ;;
19481    *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
19482       at_failed=:;;
19483 esac
19484 if $at_failed; then
19485
19486
19487   echo 1 > "$at_status_file"
19488   exit 1
19489 fi
19490
19491 $at_traceon
19492
19493
19494
19495
19496       $at_traceoff
19497       $at_times_p && times >"$at_times_file"
19498     ) 5>&1 2>&1 | eval $at_tee_pipe
19499     at_status=`cat "$at_status_file"`
19500     ;;
19501
19502   41 ) # 41. longv7.at:24: long names in V7 archives
19503     at_setup_line='longv7.at:24'
19504     at_desc="long names in V7 archives"
19505     $at_quiet $ECHO_N " 41: long names in V7 archives                      $ECHO_C"
19506     at_xfail=no
19507       test -f $XFAILFILE && at_xfail=yes
19508     echo "#                             -*- compilation -*-" >> "$at_group_log"
19509     (
19510       echo "41. longv7.at:24: testing ..."
19511       $at_traceon
19512
19513
19514
19515
19516
19517
19518
19519
19520   $at_traceoff
19521 echo "$at_srcdir/longv7.at:30:
19522 mkdir v7
19523 (cd v7
19524 TEST_TAR_FORMAT=v7
19525 export TEST_TAR_FORMAT
19526 TAR_OPTIONS=\"-H v7\"
19527 export TAR_OPTIONS
19528 rm -rf *
19529
19530 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
19531 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
19532
19533 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
19534 echo separator
19535 tar tf archive
19536 )"
19537 echo longv7.at:30 >"$at_check_line_file"
19538
19539 at_trace_this=
19540 if test -n "$at_traceon"; then
19541     echo 'Not enabling shell tracing (command contains an embedded newline)'
19542 fi
19543
19544 if test -n "$at_trace_this"; then
19545     ( $at_traceon;
19546 mkdir v7
19547 (cd v7
19548 TEST_TAR_FORMAT=v7
19549 export TEST_TAR_FORMAT
19550 TAR_OPTIONS="-H v7"
19551 export TAR_OPTIONS
19552 rm -rf *
19553
19554 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
19555 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
19556
19557 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
19558 echo separator
19559 tar tf archive
19560 ) ) >"$at_stdout" 2>"$at_stder1"
19561     at_status=$?
19562     grep '^ *+' "$at_stder1" >&2
19563     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19564 else
19565     ( :;
19566 mkdir v7
19567 (cd v7
19568 TEST_TAR_FORMAT=v7
19569 export TEST_TAR_FORMAT
19570 TAR_OPTIONS="-H v7"
19571 export TAR_OPTIONS
19572 rm -rf *
19573
19574 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
19575 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
19576
19577 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
19578 echo separator
19579 tar tf archive
19580 ) ) >"$at_stdout" 2>"$at_stderr"
19581     at_status=$?
19582 fi
19583
19584 at_failed=false
19585 echo >>"$at_stderr"; echo "tar: this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c: file name is too long (max 99); not dumped
19586 tar: Exiting with failure status due to previous errors
19587 " | $at_diff - "$at_stderr" || at_failed=:
19588 echo >>"$at_stdout"; echo "separator
19589 this_is_a_very_long_name_for_a_directory_which_causes_problems/
19590 " | $at_diff - "$at_stdout" || at_failed=:
19591 case $at_status in
19592    77) echo 77 > "$at_status_file"; exit 77;;
19593    0) ;;
19594    *) echo "$at_srcdir/longv7.at:30: exit code was $at_status, expected 0"
19595       at_failed=:;;
19596 esac
19597 if $at_failed; then
19598
19599
19600   echo 1 > "$at_status_file"
19601   exit 1
19602 fi
19603
19604 $at_traceon
19605
19606
19607
19608
19609       $at_traceoff
19610       $at_times_p && times >"$at_times_file"
19611     ) 5>&1 2>&1 | eval $at_tee_pipe
19612     at_status=`cat "$at_status_file"`
19613     ;;
19614
19615   42 ) # 42. long01.at:28: long file names divisible by block size
19616     at_setup_line='long01.at:28'
19617     at_desc="long file names divisible by block size"
19618     $at_quiet $ECHO_N " 42: long file names divisible by block size        $ECHO_C"
19619     at_xfail=no
19620       test -f $XFAILFILE && at_xfail=yes
19621     echo "#                             -*- compilation -*-" >> "$at_group_log"
19622     (
19623       echo "42. long01.at:28: testing ..."
19624       $at_traceon
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634   $at_traceoff
19635 echo "$at_srcdir/long01.at:36:
19636 mkdir gnu
19637 (cd gnu
19638 TEST_TAR_FORMAT=gnu
19639 export TEST_TAR_FORMAT
19640 TAR_OPTIONS=\"-H gnu\"
19641 export TAR_OPTIONS
19642 rm -rf *
19643
19644
19645 install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
19646 echo test > endfile
19647
19648 tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
19649 tar tf archive)"
19650 echo long01.at:36 >"$at_check_line_file"
19651
19652 at_trace_this=
19653 if test -n "$at_traceon"; then
19654     echo 'Not enabling shell tracing (command contains an embedded newline)'
19655 fi
19656
19657 if test -n "$at_trace_this"; then
19658     ( $at_traceon;
19659 mkdir gnu
19660 (cd gnu
19661 TEST_TAR_FORMAT=gnu
19662 export TEST_TAR_FORMAT
19663 TAR_OPTIONS="-H gnu"
19664 export TAR_OPTIONS
19665 rm -rf *
19666
19667
19668 install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
19669 echo test > endfile
19670
19671 tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
19672 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
19673     at_status=$?
19674     grep '^ *+' "$at_stder1" >&2
19675     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19676 else
19677     ( :;
19678 mkdir gnu
19679 (cd gnu
19680 TEST_TAR_FORMAT=gnu
19681 export TEST_TAR_FORMAT
19682 TAR_OPTIONS="-H gnu"
19683 export TAR_OPTIONS
19684 rm -rf *
19685
19686
19687 install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
19688 echo test > endfile
19689
19690 tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
19691 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
19692     at_status=$?
19693 fi
19694
19695 at_failed=false
19696 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19697 echo >>"$at_stdout"; echo "0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde
19698 endfile
19699 " | $at_diff - "$at_stdout" || at_failed=:
19700 case $at_status in
19701    77) echo 77 > "$at_status_file"; exit 77;;
19702    0) ;;
19703    *) echo "$at_srcdir/long01.at:36: exit code was $at_status, expected 0"
19704       at_failed=:;;
19705 esac
19706 if $at_failed; then
19707
19708
19709   echo 1 > "$at_status_file"
19710   exit 1
19711 fi
19712
19713 $at_traceon
19714
19715               $at_traceoff
19716 echo "$at_srcdir/long01.at:36:
19717 mkdir oldgnu
19718 (cd oldgnu
19719 TEST_TAR_FORMAT=oldgnu
19720 export TEST_TAR_FORMAT
19721 TAR_OPTIONS=\"-H oldgnu\"
19722 export TAR_OPTIONS
19723 rm -rf *
19724
19725
19726 install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
19727 echo test > endfile
19728
19729 tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
19730 tar tf archive)"
19731 echo long01.at:36 >"$at_check_line_file"
19732
19733 at_trace_this=
19734 if test -n "$at_traceon"; then
19735     echo 'Not enabling shell tracing (command contains an embedded newline)'
19736 fi
19737
19738 if test -n "$at_trace_this"; then
19739     ( $at_traceon;
19740 mkdir oldgnu
19741 (cd oldgnu
19742 TEST_TAR_FORMAT=oldgnu
19743 export TEST_TAR_FORMAT
19744 TAR_OPTIONS="-H oldgnu"
19745 export TAR_OPTIONS
19746 rm -rf *
19747
19748
19749 install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
19750 echo test > endfile
19751
19752 tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
19753 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
19754     at_status=$?
19755     grep '^ *+' "$at_stder1" >&2
19756     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19757 else
19758     ( :;
19759 mkdir oldgnu
19760 (cd oldgnu
19761 TEST_TAR_FORMAT=oldgnu
19762 export TEST_TAR_FORMAT
19763 TAR_OPTIONS="-H oldgnu"
19764 export TAR_OPTIONS
19765 rm -rf *
19766
19767
19768 install-sh -d 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde >/dev/null && genfile --file 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde || exit 77
19769 echo test > endfile
19770
19771 tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde endfile
19772 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
19773     at_status=$?
19774 fi
19775
19776 at_failed=false
19777 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19778 echo >>"$at_stdout"; echo "0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde
19779 endfile
19780 " | $at_diff - "$at_stdout" || at_failed=:
19781 case $at_status in
19782    77) echo 77 > "$at_status_file"; exit 77;;
19783    0) ;;
19784    *) echo "$at_srcdir/long01.at:36: exit code was $at_status, expected 0"
19785       at_failed=:;;
19786 esac
19787 if $at_failed; then
19788
19789
19790   echo 1 > "$at_status_file"
19791   exit 1
19792 fi
19793
19794 $at_traceon
19795
19796
19797
19798
19799       $at_traceoff
19800       $at_times_p && times >"$at_times_file"
19801     ) 5>&1 2>&1 | eval $at_tee_pipe
19802     at_status=`cat "$at_status_file"`
19803     ;;
19804
19805   43 ) # 43. lustar01.at:21: ustar: unsplittable file name
19806     at_setup_line='lustar01.at:21'
19807     at_desc="ustar: unsplittable file name"
19808     $at_quiet $ECHO_N " 43: ustar: unsplittable file name                  $ECHO_C"
19809     at_xfail=no
19810       test -f $XFAILFILE && at_xfail=yes
19811     echo "#                             -*- compilation -*-" >> "$at_group_log"
19812     (
19813       echo "43. lustar01.at:21: testing ..."
19814       $at_traceon
19815
19816
19817
19818
19819
19820
19821
19822   $at_traceoff
19823 echo "$at_srcdir/lustar01.at:27:
19824 mkdir ustar
19825 (cd ustar
19826 TEST_TAR_FORMAT=ustar
19827 export TEST_TAR_FORMAT
19828 TAR_OPTIONS=\"-H ustar\"
19829 export TAR_OPTIONS
19830 rm -rf *
19831
19832 genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77
19833 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix
19834 )"
19835 echo lustar01.at:27 >"$at_check_line_file"
19836
19837 at_trace_this=
19838 if test -n "$at_traceon"; then
19839     echo 'Not enabling shell tracing (command contains an embedded newline)'
19840 fi
19841
19842 if test -n "$at_trace_this"; then
19843     ( $at_traceon;
19844 mkdir ustar
19845 (cd ustar
19846 TEST_TAR_FORMAT=ustar
19847 export TEST_TAR_FORMAT
19848 TAR_OPTIONS="-H ustar"
19849 export TAR_OPTIONS
19850 rm -rf *
19851
19852 genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77
19853 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix
19854 ) ) >"$at_stdout" 2>"$at_stder1"
19855     at_status=$?
19856     grep '^ *+' "$at_stder1" >&2
19857     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19858 else
19859     ( :;
19860 mkdir ustar
19861 (cd ustar
19862 TEST_TAR_FORMAT=ustar
19863 export TEST_TAR_FORMAT
19864 TAR_OPTIONS="-H ustar"
19865 export TAR_OPTIONS
19866 rm -rf *
19867
19868 genfile --file=this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix || exit 77
19869 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix
19870 ) ) >"$at_stdout" 2>"$at_stderr"
19871     at_status=$?
19872 fi
19873
19874 at_failed=false
19875 echo >>"$at_stderr"; echo "tar: this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix: file name is too long (cannot be split); not dumped
19876 tar: Exiting with failure status due to previous errors
19877 " | $at_diff - "$at_stderr" || at_failed=:
19878 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
19879 case $at_status in
19880    77) echo 77 > "$at_status_file"; exit 77;;
19881    2) ;;
19882    *) echo "$at_srcdir/lustar01.at:27: exit code was $at_status, expected 2"
19883       at_failed=:;;
19884 esac
19885 if $at_failed; then
19886
19887
19888   echo 1 > "$at_status_file"
19889   exit 1
19890 fi
19891
19892 $at_traceon
19893
19894
19895
19896
19897       $at_traceoff
19898       $at_times_p && times >"$at_times_file"
19899     ) 5>&1 2>&1 | eval $at_tee_pipe
19900     at_status=`cat "$at_status_file"`
19901     ;;
19902
19903   44 ) # 44. lustar02.at:21: ustar: unsplittable path name
19904     at_setup_line='lustar02.at:21'
19905     at_desc="ustar: unsplittable path name"
19906     $at_quiet $ECHO_N " 44: ustar: unsplittable path name                  $ECHO_C"
19907     at_xfail=no
19908       test -f $XFAILFILE && at_xfail=yes
19909     echo "#                             -*- compilation -*-" >> "$at_group_log"
19910     (
19911       echo "44. lustar02.at:21: testing ..."
19912       $at_traceon
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924   $at_traceoff
19925 echo "$at_srcdir/lustar02.at:32:
19926 mkdir ustar
19927 (cd ustar
19928 TEST_TAR_FORMAT=ustar
19929 export TEST_TAR_FORMAT
19930 TAR_OPTIONS=\"-H ustar\"
19931 export TAR_OPTIONS
19932 rm -rf *
19933
19934
19935 install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77
19936 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
19937 )"
19938 echo lustar02.at:32 >"$at_check_line_file"
19939
19940 at_trace_this=
19941 if test -n "$at_traceon"; then
19942     echo 'Not enabling shell tracing (command contains an embedded newline)'
19943 fi
19944
19945 if test -n "$at_trace_this"; then
19946     ( $at_traceon;
19947 mkdir ustar
19948 (cd ustar
19949 TEST_TAR_FORMAT=ustar
19950 export TEST_TAR_FORMAT
19951 TAR_OPTIONS="-H ustar"
19952 export TAR_OPTIONS
19953 rm -rf *
19954
19955
19956 install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77
19957 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
19958 ) ) >"$at_stdout" 2>"$at_stder1"
19959     at_status=$?
19960     grep '^ *+' "$at_stder1" >&2
19961     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19962 else
19963     ( :;
19964 mkdir ustar
19965 (cd ustar
19966 TEST_TAR_FORMAT=ustar
19967 export TEST_TAR_FORMAT
19968 TAR_OPTIONS="-H ustar"
19969 export TAR_OPTIONS
19970 rm -rf *
19971
19972
19973 install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/tween_name_and_prefix || exit 77
19974 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
19975 ) ) >"$at_stdout" 2>"$at_stderr"
19976     at_status=$?
19977 fi
19978
19979 at_failed=false
19980 echo >>"$at_stderr"; echo "tar: this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/: file name is too long (cannot be split); not dumped
19981 tar: Exiting with failure status due to previous errors
19982 " | $at_diff - "$at_stderr" || at_failed=:
19983 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
19984 case $at_status in
19985    77) echo 77 > "$at_status_file"; exit 77;;
19986    2) ;;
19987    *) echo "$at_srcdir/lustar02.at:32: exit code was $at_status, expected 2"
19988       at_failed=:;;
19989 esac
19990 if $at_failed; then
19991
19992
19993   echo 1 > "$at_status_file"
19994   exit 1
19995 fi
19996
19997 $at_traceon
19998
19999
20000
20001
20002       $at_traceoff
20003       $at_times_p && times >"$at_times_file"
20004     ) 5>&1 2>&1 | eval $at_tee_pipe
20005     at_status=`cat "$at_status_file"`
20006     ;;
20007
20008   45 ) # 45. lustar03.at:21: ustar: splitting long names
20009     at_setup_line='lustar03.at:21'
20010     at_desc="ustar: splitting long names"
20011     $at_quiet $ECHO_N " 45: ustar: splitting long names                    $ECHO_C"
20012     at_xfail=no
20013       test -f $XFAILFILE && at_xfail=yes
20014     echo "#                             -*- compilation -*-" >> "$at_group_log"
20015     (
20016       echo "45. lustar03.at:21: testing ..."
20017       $at_traceon
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027   $at_traceoff
20028 echo "$at_srcdir/lustar03.at:29:
20029 mkdir ustar
20030 (cd ustar
20031 TEST_TAR_FORMAT=ustar
20032 export TEST_TAR_FORMAT
20033 TAR_OPTIONS=\"-H ustar\"
20034 export TAR_OPTIONS
20035 rm -rf *
20036
20037
20038 install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file || exit 77
20039 echo \"Create archive\"
20040 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
20041 echo \"List archive\"
20042 tar tf archive)"
20043 echo lustar03.at:29 >"$at_check_line_file"
20044
20045 at_trace_this=
20046 if test -n "$at_traceon"; then
20047     echo 'Not enabling shell tracing (command contains an embedded newline)'
20048 fi
20049
20050 if test -n "$at_trace_this"; then
20051     ( $at_traceon;
20052 mkdir ustar
20053 (cd ustar
20054 TEST_TAR_FORMAT=ustar
20055 export TEST_TAR_FORMAT
20056 TAR_OPTIONS="-H ustar"
20057 export TAR_OPTIONS
20058 rm -rf *
20059
20060
20061 install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file || exit 77
20062 echo "Create archive"
20063 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
20064 echo "List archive"
20065 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
20066     at_status=$?
20067     grep '^ *+' "$at_stder1" >&2
20068     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20069 else
20070     ( :;
20071 mkdir ustar
20072 (cd ustar
20073 TEST_TAR_FORMAT=ustar
20074 export TEST_TAR_FORMAT
20075 TAR_OPTIONS="-H ustar"
20076 export TAR_OPTIONS
20077 rm -rf *
20078
20079
20080 install-sh -d this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be >/dev/null && genfile --file this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file || exit 77
20081 echo "Create archive"
20082 tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be
20083 echo "List archive"
20084 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
20085     at_status=$?
20086 fi
20087
20088 at_failed=false
20089 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20090 echo >>"$at_stdout"; echo "Create archive
20091 List archive
20092 this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/
20093 this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be/file
20094 " | $at_diff - "$at_stdout" || at_failed=:
20095 case $at_status in
20096    77) echo 77 > "$at_status_file"; exit 77;;
20097    0) ;;
20098    *) echo "$at_srcdir/lustar03.at:29: exit code was $at_status, expected 0"
20099       at_failed=:;;
20100 esac
20101 if $at_failed; then
20102
20103
20104   echo 1 > "$at_status_file"
20105   exit 1
20106 fi
20107
20108 $at_traceon
20109
20110
20111
20112
20113       $at_traceoff
20114       $at_times_p && times >"$at_times_file"
20115     ) 5>&1 2>&1 | eval $at_tee_pipe
20116     at_status=`cat "$at_status_file"`
20117     ;;
20118
20119   46 ) # 46. multiv01.at:23: multivolume dumps from pipes
20120     at_setup_line='multiv01.at:23'
20121     at_desc="multivolume dumps from pipes"
20122     $at_quiet $ECHO_N " 46: multivolume dumps from pipes                   $ECHO_C"
20123     at_xfail=no
20124       test -f $XFAILFILE && at_xfail=yes
20125     echo "#                             -*- compilation -*-" >> "$at_group_log"
20126     (
20127       echo "46. multiv01.at:23: testing ..."
20128       $at_traceon
20129
20130
20131
20132 # Fixme: should be configurable
20133 #  TRUSS=truss -o /tmp/tr
20134 #  TRUSS=strace
20135
20136
20137
20138   $at_traceoff
20139 echo "$at_srcdir/multiv01.at:30:
20140 mkdir gnu
20141 (cd gnu
20142 TEST_TAR_FORMAT=gnu
20143 export TEST_TAR_FORMAT
20144 TAR_OPTIONS=\"-H gnu\"
20145 export TAR_OPTIONS
20146 rm -rf *
20147
20148 exec <&-
20149 genfile --length 7168 --file file1
20150
20151 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
20152               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
20153   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
20154   for count in 2 3 4 5 6 7 8 ; do
20155     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
20156   done
20157 done >file2
20158
20159 if test \$TEST_TAR_FORMAT = pax; then
20160   TAPE_LENGTH=11
20161 else
20162   TAPE_LENGTH=10
20163 fi
20164
20165 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
20166   --listed-incremental=t.snar \\
20167   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
20168
20169 mkdir extract-dir-pipe
20170 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
20171 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
20172       -C extract-dir-pipe -x --multi-volume \\
20173       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
20174
20175 cmp file1 extract-dir-pipe/file1
20176 cmp file2 extract-dir-pipe/file2
20177 )"
20178 echo multiv01.at:30 >"$at_check_line_file"
20179
20180 at_trace_this=
20181 if test -n "$at_traceon"; then
20182     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
20183 fi
20184
20185 if test -n "$at_trace_this"; then
20186     ( $at_traceon;
20187 mkdir gnu
20188 (cd gnu
20189 TEST_TAR_FORMAT=gnu
20190 export TEST_TAR_FORMAT
20191 TAR_OPTIONS="-H gnu"
20192 export TAR_OPTIONS
20193 rm -rf *
20194
20195 exec <&-
20196 genfile --length 7168 --file file1
20197
20198 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
20199               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
20200   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20201   for count in 2 3 4 5 6 7 8 ; do
20202     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20203   done
20204 done >file2
20205
20206 if test $TEST_TAR_FORMAT = pax; then
20207   TAPE_LENGTH=11
20208 else
20209   TAPE_LENGTH=10
20210 fi
20211
20212 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
20213   --listed-incremental=t.snar \
20214   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
20215
20216 mkdir extract-dir-pipe
20217 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
20218 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
20219       -C extract-dir-pipe -x --multi-volume \
20220       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
20221
20222 cmp file1 extract-dir-pipe/file1
20223 cmp file2 extract-dir-pipe/file2
20224 ) ) >"$at_stdout" 2>"$at_stder1"
20225     at_status=$?
20226     grep '^ *+' "$at_stder1" >&2
20227     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20228 else
20229     ( :;
20230 mkdir gnu
20231 (cd gnu
20232 TEST_TAR_FORMAT=gnu
20233 export TEST_TAR_FORMAT
20234 TAR_OPTIONS="-H gnu"
20235 export TAR_OPTIONS
20236 rm -rf *
20237
20238 exec <&-
20239 genfile --length 7168 --file file1
20240
20241 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
20242               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
20243   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20244   for count in 2 3 4 5 6 7 8 ; do
20245     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20246   done
20247 done >file2
20248
20249 if test $TEST_TAR_FORMAT = pax; then
20250   TAPE_LENGTH=11
20251 else
20252   TAPE_LENGTH=10
20253 fi
20254
20255 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
20256   --listed-incremental=t.snar \
20257   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
20258
20259 mkdir extract-dir-pipe
20260 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
20261 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
20262       -C extract-dir-pipe -x --multi-volume \
20263       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
20264
20265 cmp file1 extract-dir-pipe/file1
20266 cmp file2 extract-dir-pipe/file2
20267 ) ) >"$at_stdout" 2>"$at_stderr"
20268     at_status=$?
20269 fi
20270
20271 at_failed=false
20272 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20273 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
20274 case $at_status in
20275    77) echo 77 > "$at_status_file"; exit 77;;
20276    0) ;;
20277    *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0"
20278       at_failed=:;;
20279 esac
20280 if $at_failed; then
20281
20282
20283   echo 1 > "$at_status_file"
20284   exit 1
20285 fi
20286
20287 $at_traceon
20288
20289               $at_traceoff
20290 echo "$at_srcdir/multiv01.at:30:
20291 mkdir oldgnu
20292 (cd oldgnu
20293 TEST_TAR_FORMAT=oldgnu
20294 export TEST_TAR_FORMAT
20295 TAR_OPTIONS=\"-H oldgnu\"
20296 export TAR_OPTIONS
20297 rm -rf *
20298
20299 exec <&-
20300 genfile --length 7168 --file file1
20301
20302 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
20303               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
20304   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
20305   for count in 2 3 4 5 6 7 8 ; do
20306     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
20307   done
20308 done >file2
20309
20310 if test \$TEST_TAR_FORMAT = pax; then
20311   TAPE_LENGTH=11
20312 else
20313   TAPE_LENGTH=10
20314 fi
20315
20316 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
20317   --listed-incremental=t.snar \\
20318   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
20319
20320 mkdir extract-dir-pipe
20321 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
20322 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
20323       -C extract-dir-pipe -x --multi-volume \\
20324       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
20325
20326 cmp file1 extract-dir-pipe/file1
20327 cmp file2 extract-dir-pipe/file2
20328 )"
20329 echo multiv01.at:30 >"$at_check_line_file"
20330
20331 at_trace_this=
20332 if test -n "$at_traceon"; then
20333     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
20334 fi
20335
20336 if test -n "$at_trace_this"; then
20337     ( $at_traceon;
20338 mkdir oldgnu
20339 (cd oldgnu
20340 TEST_TAR_FORMAT=oldgnu
20341 export TEST_TAR_FORMAT
20342 TAR_OPTIONS="-H oldgnu"
20343 export TAR_OPTIONS
20344 rm -rf *
20345
20346 exec <&-
20347 genfile --length 7168 --file file1
20348
20349 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
20350               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
20351   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20352   for count in 2 3 4 5 6 7 8 ; do
20353     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20354   done
20355 done >file2
20356
20357 if test $TEST_TAR_FORMAT = pax; then
20358   TAPE_LENGTH=11
20359 else
20360   TAPE_LENGTH=10
20361 fi
20362
20363 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
20364   --listed-incremental=t.snar \
20365   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
20366
20367 mkdir extract-dir-pipe
20368 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
20369 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
20370       -C extract-dir-pipe -x --multi-volume \
20371       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
20372
20373 cmp file1 extract-dir-pipe/file1
20374 cmp file2 extract-dir-pipe/file2
20375 ) ) >"$at_stdout" 2>"$at_stder1"
20376     at_status=$?
20377     grep '^ *+' "$at_stder1" >&2
20378     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20379 else
20380     ( :;
20381 mkdir oldgnu
20382 (cd oldgnu
20383 TEST_TAR_FORMAT=oldgnu
20384 export TEST_TAR_FORMAT
20385 TAR_OPTIONS="-H oldgnu"
20386 export TAR_OPTIONS
20387 rm -rf *
20388
20389 exec <&-
20390 genfile --length 7168 --file file1
20391
20392 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
20393               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
20394   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20395   for count in 2 3 4 5 6 7 8 ; do
20396     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20397   done
20398 done >file2
20399
20400 if test $TEST_TAR_FORMAT = pax; then
20401   TAPE_LENGTH=11
20402 else
20403   TAPE_LENGTH=10
20404 fi
20405
20406 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
20407   --listed-incremental=t.snar \
20408   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
20409
20410 mkdir extract-dir-pipe
20411 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
20412 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
20413       -C extract-dir-pipe -x --multi-volume \
20414       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
20415
20416 cmp file1 extract-dir-pipe/file1
20417 cmp file2 extract-dir-pipe/file2
20418 ) ) >"$at_stdout" 2>"$at_stderr"
20419     at_status=$?
20420 fi
20421
20422 at_failed=false
20423 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20424 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
20425 case $at_status in
20426    77) echo 77 > "$at_status_file"; exit 77;;
20427    0) ;;
20428    *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0"
20429       at_failed=:;;
20430 esac
20431 if $at_failed; then
20432
20433
20434   echo 1 > "$at_status_file"
20435   exit 1
20436 fi
20437
20438 $at_traceon
20439
20440               $at_traceoff
20441 echo "$at_srcdir/multiv01.at:30:
20442 mkdir pax
20443 (cd pax
20444 TEST_TAR_FORMAT=pax
20445 export TEST_TAR_FORMAT
20446 TAR_OPTIONS=\"-H pax\"
20447 export TAR_OPTIONS
20448 rm -rf *
20449
20450 exec <&-
20451 genfile --length 7168 --file file1
20452
20453 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
20454               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
20455   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
20456   for count in 2 3 4 5 6 7 8 ; do
20457     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
20458   done
20459 done >file2
20460
20461 if test \$TEST_TAR_FORMAT = pax; then
20462   TAPE_LENGTH=11
20463 else
20464   TAPE_LENGTH=10
20465 fi
20466
20467 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
20468   --listed-incremental=t.snar \\
20469   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
20470
20471 mkdir extract-dir-pipe
20472 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
20473 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
20474       -C extract-dir-pipe -x --multi-volume \\
20475       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
20476
20477 cmp file1 extract-dir-pipe/file1
20478 cmp file2 extract-dir-pipe/file2
20479 )"
20480 echo multiv01.at:30 >"$at_check_line_file"
20481
20482 at_trace_this=
20483 if test -n "$at_traceon"; then
20484     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
20485 fi
20486
20487 if test -n "$at_trace_this"; then
20488     ( $at_traceon;
20489 mkdir pax
20490 (cd pax
20491 TEST_TAR_FORMAT=pax
20492 export TEST_TAR_FORMAT
20493 TAR_OPTIONS="-H pax"
20494 export TAR_OPTIONS
20495 rm -rf *
20496
20497 exec <&-
20498 genfile --length 7168 --file file1
20499
20500 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
20501               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
20502   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20503   for count in 2 3 4 5 6 7 8 ; do
20504     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20505   done
20506 done >file2
20507
20508 if test $TEST_TAR_FORMAT = pax; then
20509   TAPE_LENGTH=11
20510 else
20511   TAPE_LENGTH=10
20512 fi
20513
20514 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
20515   --listed-incremental=t.snar \
20516   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
20517
20518 mkdir extract-dir-pipe
20519 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
20520 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
20521       -C extract-dir-pipe -x --multi-volume \
20522       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
20523
20524 cmp file1 extract-dir-pipe/file1
20525 cmp file2 extract-dir-pipe/file2
20526 ) ) >"$at_stdout" 2>"$at_stder1"
20527     at_status=$?
20528     grep '^ *+' "$at_stder1" >&2
20529     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20530 else
20531     ( :;
20532 mkdir pax
20533 (cd pax
20534 TEST_TAR_FORMAT=pax
20535 export TEST_TAR_FORMAT
20536 TAR_OPTIONS="-H pax"
20537 export TAR_OPTIONS
20538 rm -rf *
20539
20540 exec <&-
20541 genfile --length 7168 --file file1
20542
20543 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
20544               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
20545   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20546   for count in 2 3 4 5 6 7 8 ; do
20547     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
20548   done
20549 done >file2
20550
20551 if test $TEST_TAR_FORMAT = pax; then
20552   TAPE_LENGTH=11
20553 else
20554   TAPE_LENGTH=10
20555 fi
20556
20557 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
20558   --listed-incremental=t.snar \
20559   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
20560
20561 mkdir extract-dir-pipe
20562 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
20563 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
20564       -C extract-dir-pipe -x --multi-volume \
20565       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
20566
20567 cmp file1 extract-dir-pipe/file1
20568 cmp file2 extract-dir-pipe/file2
20569 ) ) >"$at_stdout" 2>"$at_stderr"
20570     at_status=$?
20571 fi
20572
20573 at_failed=false
20574 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20575 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
20576 case $at_status in
20577    77) echo 77 > "$at_status_file"; exit 77;;
20578    0) ;;
20579    *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0"
20580       at_failed=:;;
20581 esac
20582 if $at_failed; then
20583
20584
20585   echo 1 > "$at_status_file"
20586   exit 1
20587 fi
20588
20589 $at_traceon
20590
20591
20592
20593
20594       $at_traceoff
20595       $at_times_p && times >"$at_times_file"
20596     ) 5>&1 2>&1 | eval $at_tee_pipe
20597     at_status=`cat "$at_status_file"`
20598     ;;
20599
20600   47 ) # 47. multiv02.at:28: skipping a straddling member
20601     at_setup_line='multiv02.at:28'
20602     at_desc="skipping a straddling member"
20603     $at_quiet $ECHO_N " 47: skipping a straddling member                   $ECHO_C"
20604     at_xfail=no
20605       test -f $XFAILFILE && at_xfail=yes
20606     echo "#                             -*- compilation -*-" >> "$at_group_log"
20607     (
20608       echo "47. multiv02.at:28: testing ..."
20609       $at_traceon
20610
20611
20612
20613
20614
20615   $at_traceoff
20616 echo "$at_srcdir/multiv02.at:31:
20617 mkdir gnu
20618 (cd gnu
20619 TEST_TAR_FORMAT=gnu
20620 export TEST_TAR_FORMAT
20621 TAR_OPTIONS=\"-H gnu\"
20622 export TAR_OPTIONS
20623 rm -rf *
20624
20625 genfile --length 10240 --file en
20626 genfile --length 20000 --file to
20627 genfile --length 20000 --file tre
20628 genfile --length 10240 --file fire
20629
20630 exec <&-
20631
20632 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
20633 echo separator
20634 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
20635 )"
20636 echo multiv02.at:31 >"$at_check_line_file"
20637
20638 at_trace_this=
20639 if test -n "$at_traceon"; then
20640     echo 'Not enabling shell tracing (command contains an embedded newline)'
20641 fi
20642
20643 if test -n "$at_trace_this"; then
20644     ( $at_traceon;
20645 mkdir gnu
20646 (cd gnu
20647 TEST_TAR_FORMAT=gnu
20648 export TEST_TAR_FORMAT
20649 TAR_OPTIONS="-H gnu"
20650 export TAR_OPTIONS
20651 rm -rf *
20652
20653 genfile --length 10240 --file en
20654 genfile --length 20000 --file to
20655 genfile --length 20000 --file tre
20656 genfile --length 10240 --file fire
20657
20658 exec <&-
20659
20660 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
20661 echo separator
20662 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
20663 ) ) >"$at_stdout" 2>"$at_stder1"
20664     at_status=$?
20665     grep '^ *+' "$at_stder1" >&2
20666     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20667 else
20668     ( :;
20669 mkdir gnu
20670 (cd gnu
20671 TEST_TAR_FORMAT=gnu
20672 export TEST_TAR_FORMAT
20673 TAR_OPTIONS="-H gnu"
20674 export TAR_OPTIONS
20675 rm -rf *
20676
20677 genfile --length 10240 --file en
20678 genfile --length 20000 --file to
20679 genfile --length 20000 --file tre
20680 genfile --length 10240 --file fire
20681
20682 exec <&-
20683
20684 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
20685 echo separator
20686 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
20687 ) ) >"$at_stdout" 2>"$at_stderr"
20688     at_status=$?
20689 fi
20690
20691 at_failed=false
20692 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20693 echo >>"$at_stdout"; echo "separator
20694 en
20695 " | $at_diff - "$at_stdout" || at_failed=:
20696 case $at_status in
20697    77) echo 77 > "$at_status_file"; exit 77;;
20698    0) ;;
20699    *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0"
20700       at_failed=:;;
20701 esac
20702 if $at_failed; then
20703
20704
20705   echo 1 > "$at_status_file"
20706   exit 1
20707 fi
20708
20709 $at_traceon
20710
20711               $at_traceoff
20712 echo "$at_srcdir/multiv02.at:31:
20713 mkdir oldgnu
20714 (cd oldgnu
20715 TEST_TAR_FORMAT=oldgnu
20716 export TEST_TAR_FORMAT
20717 TAR_OPTIONS=\"-H oldgnu\"
20718 export TAR_OPTIONS
20719 rm -rf *
20720
20721 genfile --length 10240 --file en
20722 genfile --length 20000 --file to
20723 genfile --length 20000 --file tre
20724 genfile --length 10240 --file fire
20725
20726 exec <&-
20727
20728 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
20729 echo separator
20730 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
20731 )"
20732 echo multiv02.at:31 >"$at_check_line_file"
20733
20734 at_trace_this=
20735 if test -n "$at_traceon"; then
20736     echo 'Not enabling shell tracing (command contains an embedded newline)'
20737 fi
20738
20739 if test -n "$at_trace_this"; then
20740     ( $at_traceon;
20741 mkdir oldgnu
20742 (cd oldgnu
20743 TEST_TAR_FORMAT=oldgnu
20744 export TEST_TAR_FORMAT
20745 TAR_OPTIONS="-H oldgnu"
20746 export TAR_OPTIONS
20747 rm -rf *
20748
20749 genfile --length 10240 --file en
20750 genfile --length 20000 --file to
20751 genfile --length 20000 --file tre
20752 genfile --length 10240 --file fire
20753
20754 exec <&-
20755
20756 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
20757 echo separator
20758 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
20759 ) ) >"$at_stdout" 2>"$at_stder1"
20760     at_status=$?
20761     grep '^ *+' "$at_stder1" >&2
20762     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20763 else
20764     ( :;
20765 mkdir oldgnu
20766 (cd oldgnu
20767 TEST_TAR_FORMAT=oldgnu
20768 export TEST_TAR_FORMAT
20769 TAR_OPTIONS="-H oldgnu"
20770 export TAR_OPTIONS
20771 rm -rf *
20772
20773 genfile --length 10240 --file en
20774 genfile --length 20000 --file to
20775 genfile --length 20000 --file tre
20776 genfile --length 10240 --file fire
20777
20778 exec <&-
20779
20780 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
20781 echo separator
20782 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
20783 ) ) >"$at_stdout" 2>"$at_stderr"
20784     at_status=$?
20785 fi
20786
20787 at_failed=false
20788 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20789 echo >>"$at_stdout"; echo "separator
20790 en
20791 " | $at_diff - "$at_stdout" || at_failed=:
20792 case $at_status in
20793    77) echo 77 > "$at_status_file"; exit 77;;
20794    0) ;;
20795    *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0"
20796       at_failed=:;;
20797 esac
20798 if $at_failed; then
20799
20800
20801   echo 1 > "$at_status_file"
20802   exit 1
20803 fi
20804
20805 $at_traceon
20806
20807               $at_traceoff
20808 echo "$at_srcdir/multiv02.at:31:
20809 mkdir pax
20810 (cd pax
20811 TEST_TAR_FORMAT=pax
20812 export TEST_TAR_FORMAT
20813 TAR_OPTIONS=\"-H pax\"
20814 export TAR_OPTIONS
20815 rm -rf *
20816
20817 genfile --length 10240 --file en
20818 genfile --length 20000 --file to
20819 genfile --length 20000 --file tre
20820 genfile --length 10240 --file fire
20821
20822 exec <&-
20823
20824 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
20825 echo separator
20826 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
20827 )"
20828 echo multiv02.at:31 >"$at_check_line_file"
20829
20830 at_trace_this=
20831 if test -n "$at_traceon"; then
20832     echo 'Not enabling shell tracing (command contains an embedded newline)'
20833 fi
20834
20835 if test -n "$at_trace_this"; then
20836     ( $at_traceon;
20837 mkdir pax
20838 (cd pax
20839 TEST_TAR_FORMAT=pax
20840 export TEST_TAR_FORMAT
20841 TAR_OPTIONS="-H pax"
20842 export TAR_OPTIONS
20843 rm -rf *
20844
20845 genfile --length 10240 --file en
20846 genfile --length 20000 --file to
20847 genfile --length 20000 --file tre
20848 genfile --length 10240 --file fire
20849
20850 exec <&-
20851
20852 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
20853 echo separator
20854 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
20855 ) ) >"$at_stdout" 2>"$at_stder1"
20856     at_status=$?
20857     grep '^ *+' "$at_stder1" >&2
20858     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20859 else
20860     ( :;
20861 mkdir pax
20862 (cd pax
20863 TEST_TAR_FORMAT=pax
20864 export TEST_TAR_FORMAT
20865 TAR_OPTIONS="-H pax"
20866 export TAR_OPTIONS
20867 rm -rf *
20868
20869 genfile --length 10240 --file en
20870 genfile --length 20000 --file to
20871 genfile --length 20000 --file tre
20872 genfile --length 10240 --file fire
20873
20874 exec <&-
20875
20876 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
20877 echo separator
20878 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
20879 ) ) >"$at_stdout" 2>"$at_stderr"
20880     at_status=$?
20881 fi
20882
20883 at_failed=false
20884 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20885 echo >>"$at_stdout"; echo "separator
20886 en
20887 " | $at_diff - "$at_stdout" || at_failed=:
20888 case $at_status in
20889    77) echo 77 > "$at_status_file"; exit 77;;
20890    0) ;;
20891    *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0"
20892       at_failed=:;;
20893 esac
20894 if $at_failed; then
20895
20896
20897   echo 1 > "$at_status_file"
20898   exit 1
20899 fi
20900
20901 $at_traceon
20902
20903
20904
20905
20906       $at_traceoff
20907       $at_times_p && times >"$at_times_file"
20908     ) 5>&1 2>&1 | eval $at_tee_pipe
20909     at_status=`cat "$at_status_file"`
20910     ;;
20911
20912   48 ) # 48. multiv03.at:30: MV archive & long filenames
20913     at_setup_line='multiv03.at:30'
20914     at_desc="MV archive & long filenames"
20915     $at_quiet $ECHO_N " 48: MV archive & long filenames                    $ECHO_C"
20916     at_xfail=no
20917       test -f $XFAILFILE && at_xfail=yes
20918     echo "#                             -*- compilation -*-" >> "$at_group_log"
20919     (
20920       echo "48. multiv03.at:30: testing ..."
20921       $at_traceon
20922
20923
20924
20925
20926
20927   $at_traceoff
20928 echo "$at_srcdir/multiv03.at:33:
20929 mkdir gnu
20930 (cd gnu
20931 TEST_TAR_FORMAT=gnu
20932 export TEST_TAR_FORMAT
20933 TAR_OPTIONS=\"-H gnu\"
20934 export TAR_OPTIONS
20935 rm -rf *
20936
20937 AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
20938 BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
20939
20940 cat > ../experr <<EOF
20941 tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
20942 tar: \\\`\$BFILE' is possibly continued on this volume: header contains truncated name
20943 EOF
20944
20945 cat > ../expout <<EOF
20946 \$AFILE
20947 separator-1
20948 separator-2
20949 EOF
20950
20951 genfile --length 15360 --file \$AFILE
20952
20953 exec <&-
20954
20955 tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
20956 tar -tM -f arch.1 -f arch.2 || exit 1
20957
20958 echo separator-1
20959
20960 genfile --length 15360 --file \$BFILE
20961 tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
20962
20963 echo separator-2
20964 mv \$BFILE bfile
20965 tar -M -x -f arch.1 -f arch.2 || exit 1
20966 cmp \$BFILE bfile
20967 )"
20968 echo multiv03.at:33 >"$at_check_line_file"
20969
20970 at_trace_this=
20971 if test -n "$at_traceon"; then
20972     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
20973 fi
20974
20975 if test -n "$at_trace_this"; then
20976     ( $at_traceon;
20977 mkdir gnu
20978 (cd gnu
20979 TEST_TAR_FORMAT=gnu
20980 export TEST_TAR_FORMAT
20981 TAR_OPTIONS="-H gnu"
20982 export TAR_OPTIONS
20983 rm -rf *
20984
20985 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
20986 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
20987
20988 cat > ../experr <<EOF
20989 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
20990 tar: \`$BFILE' is possibly continued on this volume: header contains truncated name
20991 EOF
20992
20993 cat > ../expout <<EOF
20994 $AFILE
20995 separator-1
20996 separator-2
20997 EOF
20998
20999 genfile --length 15360 --file $AFILE
21000
21001 exec <&-
21002
21003 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
21004 tar -tM -f arch.1 -f arch.2 || exit 1
21005
21006 echo separator-1
21007
21008 genfile --length 15360 --file $BFILE
21009 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
21010
21011 echo separator-2
21012 mv $BFILE bfile
21013 tar -M -x -f arch.1 -f arch.2 || exit 1
21014 cmp $BFILE bfile
21015 ) ) >"$at_stdout" 2>"$at_stder1"
21016     at_status=$?
21017     grep '^ *+' "$at_stder1" >&2
21018     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21019 else
21020     ( :;
21021 mkdir gnu
21022 (cd gnu
21023 TEST_TAR_FORMAT=gnu
21024 export TEST_TAR_FORMAT
21025 TAR_OPTIONS="-H gnu"
21026 export TAR_OPTIONS
21027 rm -rf *
21028
21029 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
21030 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
21031
21032 cat > ../experr <<EOF
21033 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
21034 tar: \`$BFILE' is possibly continued on this volume: header contains truncated name
21035 EOF
21036
21037 cat > ../expout <<EOF
21038 $AFILE
21039 separator-1
21040 separator-2
21041 EOF
21042
21043 genfile --length 15360 --file $AFILE
21044
21045 exec <&-
21046
21047 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
21048 tar -tM -f arch.1 -f arch.2 || exit 1
21049
21050 echo separator-1
21051
21052 genfile --length 15360 --file $BFILE
21053 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
21054
21055 echo separator-2
21056 mv $BFILE bfile
21057 tar -M -x -f arch.1 -f arch.2 || exit 1
21058 cmp $BFILE bfile
21059 ) ) >"$at_stdout" 2>"$at_stderr"
21060     at_status=$?
21061 fi
21062
21063 at_failed=false
21064 $at_diff experr "$at_stderr" || at_failed=:
21065 $at_diff expout "$at_stdout" || at_failed=:
21066 case $at_status in
21067    77) echo 77 > "$at_status_file"; exit 77;;
21068    0) ;;
21069    *) echo "$at_srcdir/multiv03.at:33: exit code was $at_status, expected 0"
21070       at_failed=:;;
21071 esac
21072 if $at_failed; then
21073
21074
21075   echo 1 > "$at_status_file"
21076   exit 1
21077 fi
21078
21079 $at_traceon
21080
21081               $at_traceoff
21082 echo "$at_srcdir/multiv03.at:33:
21083 mkdir oldgnu
21084 (cd oldgnu
21085 TEST_TAR_FORMAT=oldgnu
21086 export TEST_TAR_FORMAT
21087 TAR_OPTIONS=\"-H oldgnu\"
21088 export TAR_OPTIONS
21089 rm -rf *
21090
21091 AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
21092 BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
21093
21094 cat > ../experr <<EOF
21095 tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
21096 tar: \\\`\$BFILE' is possibly continued on this volume: header contains truncated name
21097 EOF
21098
21099 cat > ../expout <<EOF
21100 \$AFILE
21101 separator-1
21102 separator-2
21103 EOF
21104
21105 genfile --length 15360 --file \$AFILE
21106
21107 exec <&-
21108
21109 tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
21110 tar -tM -f arch.1 -f arch.2 || exit 1
21111
21112 echo separator-1
21113
21114 genfile --length 15360 --file \$BFILE
21115 tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
21116
21117 echo separator-2
21118 mv \$BFILE bfile
21119 tar -M -x -f arch.1 -f arch.2 || exit 1
21120 cmp \$BFILE bfile
21121 )"
21122 echo multiv03.at:33 >"$at_check_line_file"
21123
21124 at_trace_this=
21125 if test -n "$at_traceon"; then
21126     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
21127 fi
21128
21129 if test -n "$at_trace_this"; then
21130     ( $at_traceon;
21131 mkdir oldgnu
21132 (cd oldgnu
21133 TEST_TAR_FORMAT=oldgnu
21134 export TEST_TAR_FORMAT
21135 TAR_OPTIONS="-H oldgnu"
21136 export TAR_OPTIONS
21137 rm -rf *
21138
21139 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
21140 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
21141
21142 cat > ../experr <<EOF
21143 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
21144 tar: \`$BFILE' is possibly continued on this volume: header contains truncated name
21145 EOF
21146
21147 cat > ../expout <<EOF
21148 $AFILE
21149 separator-1
21150 separator-2
21151 EOF
21152
21153 genfile --length 15360 --file $AFILE
21154
21155 exec <&-
21156
21157 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
21158 tar -tM -f arch.1 -f arch.2 || exit 1
21159
21160 echo separator-1
21161
21162 genfile --length 15360 --file $BFILE
21163 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
21164
21165 echo separator-2
21166 mv $BFILE bfile
21167 tar -M -x -f arch.1 -f arch.2 || exit 1
21168 cmp $BFILE bfile
21169 ) ) >"$at_stdout" 2>"$at_stder1"
21170     at_status=$?
21171     grep '^ *+' "$at_stder1" >&2
21172     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21173 else
21174     ( :;
21175 mkdir oldgnu
21176 (cd oldgnu
21177 TEST_TAR_FORMAT=oldgnu
21178 export TEST_TAR_FORMAT
21179 TAR_OPTIONS="-H oldgnu"
21180 export TAR_OPTIONS
21181 rm -rf *
21182
21183 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
21184 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
21185
21186 cat > ../experr <<EOF
21187 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
21188 tar: \`$BFILE' is possibly continued on this volume: header contains truncated name
21189 EOF
21190
21191 cat > ../expout <<EOF
21192 $AFILE
21193 separator-1
21194 separator-2
21195 EOF
21196
21197 genfile --length 15360 --file $AFILE
21198
21199 exec <&-
21200
21201 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
21202 tar -tM -f arch.1 -f arch.2 || exit 1
21203
21204 echo separator-1
21205
21206 genfile --length 15360 --file $BFILE
21207 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
21208
21209 echo separator-2
21210 mv $BFILE bfile
21211 tar -M -x -f arch.1 -f arch.2 || exit 1
21212 cmp $BFILE bfile
21213 ) ) >"$at_stdout" 2>"$at_stderr"
21214     at_status=$?
21215 fi
21216
21217 at_failed=false
21218 $at_diff experr "$at_stderr" || at_failed=:
21219 $at_diff expout "$at_stdout" || at_failed=:
21220 case $at_status in
21221    77) echo 77 > "$at_status_file"; exit 77;;
21222    0) ;;
21223    *) echo "$at_srcdir/multiv03.at:33: exit code was $at_status, expected 0"
21224       at_failed=:;;
21225 esac
21226 if $at_failed; then
21227
21228
21229   echo 1 > "$at_status_file"
21230   exit 1
21231 fi
21232
21233 $at_traceon
21234
21235
21236
21237
21238       $at_traceoff
21239       $at_times_p && times >"$at_times_file"
21240     ) 5>&1 2>&1 | eval $at_tee_pipe
21241     at_status=`cat "$at_status_file"`
21242     ;;
21243
21244   49 ) # 49. multiv04.at:36: split directory members in a MV archive
21245     at_setup_line='multiv04.at:36'
21246     at_desc="split directory members in a MV archive"
21247     $at_quiet $ECHO_N " 49: split directory members in a MV archive        $ECHO_C"
21248     at_xfail=no
21249       test -f $XFAILFILE && at_xfail=yes
21250     echo "#                             -*- compilation -*-" >> "$at_group_log"
21251     (
21252       echo "49. multiv04.at:36: testing ..."
21253       $at_traceon
21254
21255
21256
21257
21258
21259   $at_traceoff
21260 echo "$at_srcdir/multiv04.at:39:
21261 mkdir gnu
21262 (cd gnu
21263 TEST_TAR_FORMAT=gnu
21264 export TEST_TAR_FORMAT
21265 TAR_OPTIONS=\"-H gnu\"
21266 export TAR_OPTIONS
21267 rm -rf *
21268
21269
21270 mkdir directory
21271 awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
21272
21273 exec <&-
21274
21275 sleep 2
21276
21277 tar --listed-incremental=list -c -f archive.a directory
21278
21279 sleep 2
21280
21281 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
21282
21283 echo separator
21284
21285 tar -MRt -f arc.1 -f arc.2)"
21286 echo multiv04.at:39 >"$at_check_line_file"
21287
21288 at_trace_this=
21289 if test -n "$at_traceon"; then
21290     echo 'Not enabling shell tracing (command contains an embedded newline)'
21291 fi
21292
21293 if test -n "$at_trace_this"; then
21294     ( $at_traceon;
21295 mkdir gnu
21296 (cd gnu
21297 TEST_TAR_FORMAT=gnu
21298 export TEST_TAR_FORMAT
21299 TAR_OPTIONS="-H gnu"
21300 export TAR_OPTIONS
21301 rm -rf *
21302
21303
21304 mkdir directory
21305 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
21306
21307 exec <&-
21308
21309 sleep 2
21310
21311 tar --listed-incremental=list -c -f archive.a directory
21312
21313 sleep 2
21314
21315 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
21316
21317 echo separator
21318
21319 tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stder1"
21320     at_status=$?
21321     grep '^ *+' "$at_stder1" >&2
21322     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21323 else
21324     ( :;
21325 mkdir gnu
21326 (cd gnu
21327 TEST_TAR_FORMAT=gnu
21328 export TEST_TAR_FORMAT
21329 TAR_OPTIONS="-H gnu"
21330 export TAR_OPTIONS
21331 rm -rf *
21332
21333
21334 mkdir directory
21335 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
21336
21337 exec <&-
21338
21339 sleep 2
21340
21341 tar --listed-incremental=list -c -f archive.a directory
21342
21343 sleep 2
21344
21345 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
21346
21347 echo separator
21348
21349 tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stderr"
21350     at_status=$?
21351 fi
21352
21353 at_failed=false
21354 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21355 echo >>"$at_stdout"; echo "directory/
21356 separator
21357 block 0: directory/
21358 block 35: ** Block of NULs **
21359 " | $at_diff - "$at_stdout" || at_failed=:
21360 case $at_status in
21361    77) echo 77 > "$at_status_file"; exit 77;;
21362    0) ;;
21363    *) echo "$at_srcdir/multiv04.at:39: exit code was $at_status, expected 0"
21364       at_failed=:;;
21365 esac
21366 if $at_failed; then
21367
21368
21369   echo 1 > "$at_status_file"
21370   exit 1
21371 fi
21372
21373 $at_traceon
21374
21375               $at_traceoff
21376 echo "$at_srcdir/multiv04.at:39:
21377 mkdir oldgnu
21378 (cd oldgnu
21379 TEST_TAR_FORMAT=oldgnu
21380 export TEST_TAR_FORMAT
21381 TAR_OPTIONS=\"-H oldgnu\"
21382 export TAR_OPTIONS
21383 rm -rf *
21384
21385
21386 mkdir directory
21387 awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
21388
21389 exec <&-
21390
21391 sleep 2
21392
21393 tar --listed-incremental=list -c -f archive.a directory
21394
21395 sleep 2
21396
21397 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
21398
21399 echo separator
21400
21401 tar -MRt -f arc.1 -f arc.2)"
21402 echo multiv04.at:39 >"$at_check_line_file"
21403
21404 at_trace_this=
21405 if test -n "$at_traceon"; then
21406     echo 'Not enabling shell tracing (command contains an embedded newline)'
21407 fi
21408
21409 if test -n "$at_trace_this"; then
21410     ( $at_traceon;
21411 mkdir oldgnu
21412 (cd oldgnu
21413 TEST_TAR_FORMAT=oldgnu
21414 export TEST_TAR_FORMAT
21415 TAR_OPTIONS="-H oldgnu"
21416 export TAR_OPTIONS
21417 rm -rf *
21418
21419
21420 mkdir directory
21421 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
21422
21423 exec <&-
21424
21425 sleep 2
21426
21427 tar --listed-incremental=list -c -f archive.a directory
21428
21429 sleep 2
21430
21431 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
21432
21433 echo separator
21434
21435 tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stder1"
21436     at_status=$?
21437     grep '^ *+' "$at_stder1" >&2
21438     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21439 else
21440     ( :;
21441 mkdir oldgnu
21442 (cd oldgnu
21443 TEST_TAR_FORMAT=oldgnu
21444 export TEST_TAR_FORMAT
21445 TAR_OPTIONS="-H oldgnu"
21446 export TAR_OPTIONS
21447 rm -rf *
21448
21449
21450 mkdir directory
21451 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
21452
21453 exec <&-
21454
21455 sleep 2
21456
21457 tar --listed-incremental=list -c -f archive.a directory
21458
21459 sleep 2
21460
21461 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
21462
21463 echo separator
21464
21465 tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stderr"
21466     at_status=$?
21467 fi
21468
21469 at_failed=false
21470 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21471 echo >>"$at_stdout"; echo "directory/
21472 separator
21473 block 0: directory/
21474 block 35: ** Block of NULs **
21475 " | $at_diff - "$at_stdout" || at_failed=:
21476 case $at_status in
21477    77) echo 77 > "$at_status_file"; exit 77;;
21478    0) ;;
21479    *) echo "$at_srcdir/multiv04.at:39: exit code was $at_status, expected 0"
21480       at_failed=:;;
21481 esac
21482 if $at_failed; then
21483
21484
21485   echo 1 > "$at_status_file"
21486   exit 1
21487 fi
21488
21489 $at_traceon
21490
21491
21492
21493
21494       $at_traceoff
21495       $at_times_p && times >"$at_times_file"
21496     ) 5>&1 2>&1 | eval $at_tee_pipe
21497     at_status=`cat "$at_status_file"`
21498     ;;
21499
21500   50 ) # 50. multiv05.at:26: Restoring after an out of sync volume
21501     at_setup_line='multiv05.at:26'
21502     at_desc="Restoring after an out of sync volume"
21503     $at_quiet $ECHO_N " 50: Restoring after an out of sync volume          $ECHO_C"
21504     at_xfail=no
21505       test -f $XFAILFILE && at_xfail=yes
21506     echo "#                             -*- compilation -*-" >> "$at_group_log"
21507     (
21508       echo "50. multiv05.at:26: testing ..."
21509       $at_traceon
21510
21511
21512
21513
21514
21515
21516   $at_traceoff
21517 echo "$at_srcdir/multiv05.at:30:
21518 mkdir gnu
21519 (cd gnu
21520 TEST_TAR_FORMAT=gnu
21521 export TEST_TAR_FORMAT
21522 TAR_OPTIONS=\"-H gnu\"
21523 export TAR_OPTIONS
21524 rm -rf *
21525
21526 exec <&-
21527
21528 genfile --length 250k --file jeden
21529 genfile --length 250k --file dwa
21530 genfile --length 250k --file trzy
21531 genfile --length 250k --file cztery
21532 genfile --length 250k --file piec
21533 genfile --length 250k --file szesc
21534
21535
21536 echo Creating archive
21537 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
21538 echo separator
21539 mkdir bak
21540 mv jeden dwa trzy cztery piec szesc bak
21541 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
21542 echo Diffing jeden
21543    cmp bak/jeden jeden || exit 1
21544 echo Diffing dwa
21545    cmp bak/dwa dwa || exit 1
21546 echo Diffing trzy
21547    cmp bak/trzy trzy || exit 1
21548 echo Diffing cztery
21549    cmp bak/cztery cztery || exit 1
21550 echo Diffing piec
21551    cmp bak/piec piec || exit 1
21552 echo Diffing szesc
21553    cmp bak/szesc szesc || exit 1
21554 )"
21555 echo multiv05.at:30 >"$at_check_line_file"
21556
21557 at_trace_this=
21558 if test -n "$at_traceon"; then
21559     echo 'Not enabling shell tracing (command contains an embedded newline)'
21560 fi
21561
21562 if test -n "$at_trace_this"; then
21563     ( $at_traceon;
21564 mkdir gnu
21565 (cd gnu
21566 TEST_TAR_FORMAT=gnu
21567 export TEST_TAR_FORMAT
21568 TAR_OPTIONS="-H gnu"
21569 export TAR_OPTIONS
21570 rm -rf *
21571
21572 exec <&-
21573
21574 genfile --length 250k --file jeden
21575 genfile --length 250k --file dwa
21576 genfile --length 250k --file trzy
21577 genfile --length 250k --file cztery
21578 genfile --length 250k --file piec
21579 genfile --length 250k --file szesc
21580
21581
21582 echo Creating archive
21583 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
21584 echo separator
21585 mkdir bak
21586 mv jeden dwa trzy cztery piec szesc bak
21587 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
21588 echo Diffing jeden
21589    cmp bak/jeden jeden || exit 1
21590 echo Diffing dwa
21591    cmp bak/dwa dwa || exit 1
21592 echo Diffing trzy
21593    cmp bak/trzy trzy || exit 1
21594 echo Diffing cztery
21595    cmp bak/cztery cztery || exit 1
21596 echo Diffing piec
21597    cmp bak/piec piec || exit 1
21598 echo Diffing szesc
21599    cmp bak/szesc szesc || exit 1
21600 ) ) >"$at_stdout" 2>"$at_stder1"
21601     at_status=$?
21602     grep '^ *+' "$at_stder1" >&2
21603     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21604 else
21605     ( :;
21606 mkdir gnu
21607 (cd gnu
21608 TEST_TAR_FORMAT=gnu
21609 export TEST_TAR_FORMAT
21610 TAR_OPTIONS="-H gnu"
21611 export TAR_OPTIONS
21612 rm -rf *
21613
21614 exec <&-
21615
21616 genfile --length 250k --file jeden
21617 genfile --length 250k --file dwa
21618 genfile --length 250k --file trzy
21619 genfile --length 250k --file cztery
21620 genfile --length 250k --file piec
21621 genfile --length 250k --file szesc
21622
21623
21624 echo Creating archive
21625 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
21626 echo separator
21627 mkdir bak
21628 mv jeden dwa trzy cztery piec szesc bak
21629 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
21630 echo Diffing jeden
21631    cmp bak/jeden jeden || exit 1
21632 echo Diffing dwa
21633    cmp bak/dwa dwa || exit 1
21634 echo Diffing trzy
21635    cmp bak/trzy trzy || exit 1
21636 echo Diffing cztery
21637    cmp bak/cztery cztery || exit 1
21638 echo Diffing piec
21639    cmp bak/piec piec || exit 1
21640 echo Diffing szesc
21641    cmp bak/szesc szesc || exit 1
21642 ) ) >"$at_stdout" 2>"$at_stderr"
21643     at_status=$?
21644 fi
21645
21646 at_failed=false
21647 echo >>"$at_stderr"; echo "tar: \`trzy' is not continued on this volume
21648 " | $at_diff - "$at_stderr" || at_failed=:
21649 echo >>"$at_stdout"; echo "Creating archive
21650 separator
21651 jeden
21652 dwa
21653 trzy
21654 cztery
21655 piec
21656 szesc
21657 Diffing jeden
21658 Diffing dwa
21659 Diffing trzy
21660 Diffing cztery
21661 Diffing piec
21662 Diffing szesc
21663 " | $at_diff - "$at_stdout" || at_failed=:
21664 case $at_status in
21665    77) echo 77 > "$at_status_file"; exit 77;;
21666    0) ;;
21667    *) echo "$at_srcdir/multiv05.at:30: exit code was $at_status, expected 0"
21668       at_failed=:;;
21669 esac
21670 if $at_failed; then
21671
21672
21673   echo 1 > "$at_status_file"
21674   exit 1
21675 fi
21676
21677 $at_traceon
21678
21679
21680
21681
21682       $at_traceoff
21683       $at_times_p && times >"$at_times_file"
21684     ) 5>&1 2>&1 | eval $at_tee_pipe
21685     at_status=`cat "$at_status_file"`
21686     ;;
21687
21688   51 ) # 51. multiv06.at:27: Multivolumes with L=record_size
21689     at_setup_line='multiv06.at:27'
21690     at_desc="Multivolumes with L=record_size"
21691     $at_quiet $ECHO_N " 51: Multivolumes with L=record_size                $ECHO_C"
21692     at_xfail=no
21693       test -f $XFAILFILE && at_xfail=yes
21694     echo "#                             -*- compilation -*-" >> "$at_group_log"
21695     (
21696       echo "51. multiv06.at:27: testing ..."
21697       $at_traceon
21698
21699
21700
21701
21702
21703   $at_traceoff
21704 echo "$at_srcdir/multiv06.at:30:
21705 mkdir gnu
21706 (cd gnu
21707 TEST_TAR_FORMAT=gnu
21708 export TEST_TAR_FORMAT
21709 TAR_OPTIONS=\"-H gnu\"
21710 export TAR_OPTIONS
21711 rm -rf *
21712
21713 exec <&-
21714 decho Creating file
21715 genfile --length 20139 --file file
21716 decho Creating archive
21717 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
21718 decho Testing archive
21719 tar -t -M -farc.1 -farc.2 -farc.3)"
21720 echo multiv06.at:30 >"$at_check_line_file"
21721
21722 at_trace_this=
21723 if test -n "$at_traceon"; then
21724     echo 'Not enabling shell tracing (command contains an embedded newline)'
21725 fi
21726
21727 if test -n "$at_trace_this"; then
21728     ( $at_traceon;
21729 mkdir gnu
21730 (cd gnu
21731 TEST_TAR_FORMAT=gnu
21732 export TEST_TAR_FORMAT
21733 TAR_OPTIONS="-H gnu"
21734 export TAR_OPTIONS
21735 rm -rf *
21736
21737 exec <&-
21738 decho Creating file
21739 genfile --length 20139 --file file
21740 decho Creating archive
21741 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
21742 decho Testing archive
21743 tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stder1"
21744     at_status=$?
21745     grep '^ *+' "$at_stder1" >&2
21746     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21747 else
21748     ( :;
21749 mkdir gnu
21750 (cd gnu
21751 TEST_TAR_FORMAT=gnu
21752 export TEST_TAR_FORMAT
21753 TAR_OPTIONS="-H gnu"
21754 export TAR_OPTIONS
21755 rm -rf *
21756
21757 exec <&-
21758 decho Creating file
21759 genfile --length 20139 --file file
21760 decho Creating archive
21761 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
21762 decho Testing archive
21763 tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stderr"
21764     at_status=$?
21765 fi
21766
21767 at_failed=false
21768 echo >>"$at_stderr"; echo "Creating file
21769 Creating archive
21770 Testing archive
21771 " | $at_diff - "$at_stderr" || at_failed=:
21772 echo >>"$at_stdout"; echo "Creating file
21773 Creating archive
21774 Testing archive
21775 file
21776 " | $at_diff - "$at_stdout" || at_failed=:
21777 case $at_status in
21778    77) echo 77 > "$at_status_file"; exit 77;;
21779    0) ;;
21780    *) echo "$at_srcdir/multiv06.at:30: exit code was $at_status, expected 0"
21781       at_failed=:;;
21782 esac
21783 if $at_failed; then
21784
21785
21786   echo 1 > "$at_status_file"
21787   exit 1
21788 fi
21789
21790 $at_traceon
21791
21792               $at_traceoff
21793 echo "$at_srcdir/multiv06.at:30:
21794 mkdir pax
21795 (cd pax
21796 TEST_TAR_FORMAT=pax
21797 export TEST_TAR_FORMAT
21798 TAR_OPTIONS=\"-H pax\"
21799 export TAR_OPTIONS
21800 rm -rf *
21801
21802 exec <&-
21803 decho Creating file
21804 genfile --length 20139 --file file
21805 decho Creating archive
21806 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
21807 decho Testing archive
21808 tar -t -M -farc.1 -farc.2 -farc.3)"
21809 echo multiv06.at:30 >"$at_check_line_file"
21810
21811 at_trace_this=
21812 if test -n "$at_traceon"; then
21813     echo 'Not enabling shell tracing (command contains an embedded newline)'
21814 fi
21815
21816 if test -n "$at_trace_this"; then
21817     ( $at_traceon;
21818 mkdir pax
21819 (cd pax
21820 TEST_TAR_FORMAT=pax
21821 export TEST_TAR_FORMAT
21822 TAR_OPTIONS="-H pax"
21823 export TAR_OPTIONS
21824 rm -rf *
21825
21826 exec <&-
21827 decho Creating file
21828 genfile --length 20139 --file file
21829 decho Creating archive
21830 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
21831 decho Testing archive
21832 tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stder1"
21833     at_status=$?
21834     grep '^ *+' "$at_stder1" >&2
21835     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21836 else
21837     ( :;
21838 mkdir pax
21839 (cd pax
21840 TEST_TAR_FORMAT=pax
21841 export TEST_TAR_FORMAT
21842 TAR_OPTIONS="-H pax"
21843 export TAR_OPTIONS
21844 rm -rf *
21845
21846 exec <&-
21847 decho Creating file
21848 genfile --length 20139 --file file
21849 decho Creating archive
21850 tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file
21851 decho Testing archive
21852 tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stderr"
21853     at_status=$?
21854 fi
21855
21856 at_failed=false
21857 echo >>"$at_stderr"; echo "Creating file
21858 Creating archive
21859 Testing archive
21860 " | $at_diff - "$at_stderr" || at_failed=:
21861 echo >>"$at_stdout"; echo "Creating file
21862 Creating archive
21863 Testing archive
21864 file
21865 " | $at_diff - "$at_stdout" || at_failed=:
21866 case $at_status in
21867    77) echo 77 > "$at_status_file"; exit 77;;
21868    0) ;;
21869    *) echo "$at_srcdir/multiv06.at:30: exit code was $at_status, expected 0"
21870       at_failed=:;;
21871 esac
21872 if $at_failed; then
21873
21874
21875   echo 1 > "$at_status_file"
21876   exit 1
21877 fi
21878
21879 $at_traceon
21880
21881
21882
21883
21884       $at_traceoff
21885       $at_times_p && times >"$at_times_file"
21886     ) 5>&1 2>&1 | eval $at_tee_pipe
21887     at_status=`cat "$at_status_file"`
21888     ;;
21889
21890   52 ) # 52. old.at:23: old archives
21891     at_setup_line='old.at:23'
21892     at_desc="old archives"
21893     $at_quiet $ECHO_N " 52: old archives                                   $ECHO_C"
21894     at_xfail=no
21895     echo "#                             -*- compilation -*-" >> "$at_group_log"
21896     (
21897       echo "52. old.at:23: testing ..."
21898       $at_traceon
21899
21900
21901
21902 unset TAR_OPTIONS
21903 $at_traceoff
21904 echo "$at_srcdir/old.at:27:
21905 mkdir directory
21906 tar cfvo archive directory || exit 1
21907 tar tf archive
21908 "
21909 echo old.at:27 >"$at_check_line_file"
21910
21911 at_trace_this=
21912 if test -n "$at_traceon"; then
21913     echo 'Not enabling shell tracing (command contains an embedded newline)'
21914 fi
21915
21916 if test -n "$at_trace_this"; then
21917     ( $at_traceon;
21918 mkdir directory
21919 tar cfvo archive directory || exit 1
21920 tar tf archive
21921  ) >"$at_stdout" 2>"$at_stder1"
21922     at_status=$?
21923     grep '^ *+' "$at_stder1" >&2
21924     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21925 else
21926     ( :;
21927 mkdir directory
21928 tar cfvo archive directory || exit 1
21929 tar tf archive
21930  ) >"$at_stdout" 2>"$at_stderr"
21931     at_status=$?
21932 fi
21933
21934 at_failed=false
21935 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21936 echo >>"$at_stdout"; echo "directory/
21937 directory/
21938 " | $at_diff - "$at_stdout" || at_failed=:
21939 case $at_status in
21940    77) echo 77 > "$at_status_file"; exit 77;;
21941    0) ;;
21942    *) echo "$at_srcdir/old.at:27: exit code was $at_status, expected 0"
21943       at_failed=:;;
21944 esac
21945 if $at_failed; then
21946
21947
21948   echo 1 > "$at_status_file"
21949   exit 1
21950 fi
21951
21952 $at_traceon
21953
21954
21955       $at_traceoff
21956       $at_times_p && times >"$at_times_file"
21957     ) 5>&1 2>&1 | eval $at_tee_pipe
21958     at_status=`cat "$at_status_file"`
21959     ;;
21960
21961   53 ) # 53. recurse.at:21: recurse
21962     at_setup_line='recurse.at:21'
21963     at_desc="recurse"
21964     $at_quiet $ECHO_N " 53: recurse                                        $ECHO_C"
21965     at_xfail=no
21966       test -f $XFAILFILE && at_xfail=yes
21967     echo "#                             -*- compilation -*-" >> "$at_group_log"
21968     (
21969       echo "53. recurse.at:21: testing ..."
21970       $at_traceon
21971
21972
21973
21974
21975
21976   $at_traceoff
21977 echo "$at_srcdir/recurse.at:24:
21978 mkdir v7
21979 (cd v7
21980 TEST_TAR_FORMAT=v7
21981 export TEST_TAR_FORMAT
21982 TAR_OPTIONS=\"-H v7\"
21983 export TAR_OPTIONS
21984 rm -rf *
21985
21986 mkdir directory
21987 touch directory/file
21988 tar --create --file archive --no-recursion directory || exit 1
21989 tar tf archive
21990 )"
21991 echo recurse.at:24 >"$at_check_line_file"
21992
21993 at_trace_this=
21994 if test -n "$at_traceon"; then
21995     echo 'Not enabling shell tracing (command contains an embedded newline)'
21996 fi
21997
21998 if test -n "$at_trace_this"; then
21999     ( $at_traceon;
22000 mkdir v7
22001 (cd v7
22002 TEST_TAR_FORMAT=v7
22003 export TEST_TAR_FORMAT
22004 TAR_OPTIONS="-H v7"
22005 export TAR_OPTIONS
22006 rm -rf *
22007
22008 mkdir directory
22009 touch directory/file
22010 tar --create --file archive --no-recursion directory || exit 1
22011 tar tf archive
22012 ) ) >"$at_stdout" 2>"$at_stder1"
22013     at_status=$?
22014     grep '^ *+' "$at_stder1" >&2
22015     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22016 else
22017     ( :;
22018 mkdir v7
22019 (cd v7
22020 TEST_TAR_FORMAT=v7
22021 export TEST_TAR_FORMAT
22022 TAR_OPTIONS="-H v7"
22023 export TAR_OPTIONS
22024 rm -rf *
22025
22026 mkdir directory
22027 touch directory/file
22028 tar --create --file archive --no-recursion directory || exit 1
22029 tar tf archive
22030 ) ) >"$at_stdout" 2>"$at_stderr"
22031     at_status=$?
22032 fi
22033
22034 at_failed=false
22035 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22036 echo >>"$at_stdout"; echo "directory/
22037 " | $at_diff - "$at_stdout" || at_failed=:
22038 case $at_status in
22039    77) echo 77 > "$at_status_file"; exit 77;;
22040    0) ;;
22041    *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
22042       at_failed=:;;
22043 esac
22044 if $at_failed; then
22045
22046
22047   echo 1 > "$at_status_file"
22048   exit 1
22049 fi
22050
22051 $at_traceon
22052
22053               $at_traceoff
22054 echo "$at_srcdir/recurse.at:24:
22055 mkdir oldgnu
22056 (cd oldgnu
22057 TEST_TAR_FORMAT=oldgnu
22058 export TEST_TAR_FORMAT
22059 TAR_OPTIONS=\"-H oldgnu\"
22060 export TAR_OPTIONS
22061 rm -rf *
22062
22063 mkdir directory
22064 touch directory/file
22065 tar --create --file archive --no-recursion directory || exit 1
22066 tar tf archive
22067 )"
22068 echo recurse.at:24 >"$at_check_line_file"
22069
22070 at_trace_this=
22071 if test -n "$at_traceon"; then
22072     echo 'Not enabling shell tracing (command contains an embedded newline)'
22073 fi
22074
22075 if test -n "$at_trace_this"; then
22076     ( $at_traceon;
22077 mkdir oldgnu
22078 (cd oldgnu
22079 TEST_TAR_FORMAT=oldgnu
22080 export TEST_TAR_FORMAT
22081 TAR_OPTIONS="-H oldgnu"
22082 export TAR_OPTIONS
22083 rm -rf *
22084
22085 mkdir directory
22086 touch directory/file
22087 tar --create --file archive --no-recursion directory || exit 1
22088 tar tf archive
22089 ) ) >"$at_stdout" 2>"$at_stder1"
22090     at_status=$?
22091     grep '^ *+' "$at_stder1" >&2
22092     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22093 else
22094     ( :;
22095 mkdir oldgnu
22096 (cd oldgnu
22097 TEST_TAR_FORMAT=oldgnu
22098 export TEST_TAR_FORMAT
22099 TAR_OPTIONS="-H oldgnu"
22100 export TAR_OPTIONS
22101 rm -rf *
22102
22103 mkdir directory
22104 touch directory/file
22105 tar --create --file archive --no-recursion directory || exit 1
22106 tar tf archive
22107 ) ) >"$at_stdout" 2>"$at_stderr"
22108     at_status=$?
22109 fi
22110
22111 at_failed=false
22112 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22113 echo >>"$at_stdout"; echo "directory/
22114 " | $at_diff - "$at_stdout" || at_failed=:
22115 case $at_status in
22116    77) echo 77 > "$at_status_file"; exit 77;;
22117    0) ;;
22118    *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
22119       at_failed=:;;
22120 esac
22121 if $at_failed; then
22122
22123
22124   echo 1 > "$at_status_file"
22125   exit 1
22126 fi
22127
22128 $at_traceon
22129
22130               $at_traceoff
22131 echo "$at_srcdir/recurse.at:24:
22132 mkdir ustar
22133 (cd ustar
22134 TEST_TAR_FORMAT=ustar
22135 export TEST_TAR_FORMAT
22136 TAR_OPTIONS=\"-H ustar\"
22137 export TAR_OPTIONS
22138 rm -rf *
22139
22140 mkdir directory
22141 touch directory/file
22142 tar --create --file archive --no-recursion directory || exit 1
22143 tar tf archive
22144 )"
22145 echo recurse.at:24 >"$at_check_line_file"
22146
22147 at_trace_this=
22148 if test -n "$at_traceon"; then
22149     echo 'Not enabling shell tracing (command contains an embedded newline)'
22150 fi
22151
22152 if test -n "$at_trace_this"; then
22153     ( $at_traceon;
22154 mkdir ustar
22155 (cd ustar
22156 TEST_TAR_FORMAT=ustar
22157 export TEST_TAR_FORMAT
22158 TAR_OPTIONS="-H ustar"
22159 export TAR_OPTIONS
22160 rm -rf *
22161
22162 mkdir directory
22163 touch directory/file
22164 tar --create --file archive --no-recursion directory || exit 1
22165 tar tf archive
22166 ) ) >"$at_stdout" 2>"$at_stder1"
22167     at_status=$?
22168     grep '^ *+' "$at_stder1" >&2
22169     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22170 else
22171     ( :;
22172 mkdir ustar
22173 (cd ustar
22174 TEST_TAR_FORMAT=ustar
22175 export TEST_TAR_FORMAT
22176 TAR_OPTIONS="-H ustar"
22177 export TAR_OPTIONS
22178 rm -rf *
22179
22180 mkdir directory
22181 touch directory/file
22182 tar --create --file archive --no-recursion directory || exit 1
22183 tar tf archive
22184 ) ) >"$at_stdout" 2>"$at_stderr"
22185     at_status=$?
22186 fi
22187
22188 at_failed=false
22189 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22190 echo >>"$at_stdout"; echo "directory/
22191 " | $at_diff - "$at_stdout" || at_failed=:
22192 case $at_status in
22193    77) echo 77 > "$at_status_file"; exit 77;;
22194    0) ;;
22195    *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
22196       at_failed=:;;
22197 esac
22198 if $at_failed; then
22199
22200
22201   echo 1 > "$at_status_file"
22202   exit 1
22203 fi
22204
22205 $at_traceon
22206
22207               $at_traceoff
22208 echo "$at_srcdir/recurse.at:24:
22209 mkdir posix
22210 (cd posix
22211 TEST_TAR_FORMAT=posix
22212 export TEST_TAR_FORMAT
22213 TAR_OPTIONS=\"-H posix\"
22214 export TAR_OPTIONS
22215 rm -rf *
22216
22217 mkdir directory
22218 touch directory/file
22219 tar --create --file archive --no-recursion directory || exit 1
22220 tar tf archive
22221 )"
22222 echo recurse.at:24 >"$at_check_line_file"
22223
22224 at_trace_this=
22225 if test -n "$at_traceon"; then
22226     echo 'Not enabling shell tracing (command contains an embedded newline)'
22227 fi
22228
22229 if test -n "$at_trace_this"; then
22230     ( $at_traceon;
22231 mkdir posix
22232 (cd posix
22233 TEST_TAR_FORMAT=posix
22234 export TEST_TAR_FORMAT
22235 TAR_OPTIONS="-H posix"
22236 export TAR_OPTIONS
22237 rm -rf *
22238
22239 mkdir directory
22240 touch directory/file
22241 tar --create --file archive --no-recursion directory || exit 1
22242 tar tf archive
22243 ) ) >"$at_stdout" 2>"$at_stder1"
22244     at_status=$?
22245     grep '^ *+' "$at_stder1" >&2
22246     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22247 else
22248     ( :;
22249 mkdir posix
22250 (cd posix
22251 TEST_TAR_FORMAT=posix
22252 export TEST_TAR_FORMAT
22253 TAR_OPTIONS="-H posix"
22254 export TAR_OPTIONS
22255 rm -rf *
22256
22257 mkdir directory
22258 touch directory/file
22259 tar --create --file archive --no-recursion directory || exit 1
22260 tar tf archive
22261 ) ) >"$at_stdout" 2>"$at_stderr"
22262     at_status=$?
22263 fi
22264
22265 at_failed=false
22266 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22267 echo >>"$at_stdout"; echo "directory/
22268 " | $at_diff - "$at_stdout" || at_failed=:
22269 case $at_status in
22270    77) echo 77 > "$at_status_file"; exit 77;;
22271    0) ;;
22272    *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
22273       at_failed=:;;
22274 esac
22275 if $at_failed; then
22276
22277
22278   echo 1 > "$at_status_file"
22279   exit 1
22280 fi
22281
22282 $at_traceon
22283
22284               $at_traceoff
22285 echo "$at_srcdir/recurse.at:24:
22286 mkdir gnu
22287 (cd gnu
22288 TEST_TAR_FORMAT=gnu
22289 export TEST_TAR_FORMAT
22290 TAR_OPTIONS=\"-H gnu\"
22291 export TAR_OPTIONS
22292 rm -rf *
22293
22294 mkdir directory
22295 touch directory/file
22296 tar --create --file archive --no-recursion directory || exit 1
22297 tar tf archive
22298 )"
22299 echo recurse.at:24 >"$at_check_line_file"
22300
22301 at_trace_this=
22302 if test -n "$at_traceon"; then
22303     echo 'Not enabling shell tracing (command contains an embedded newline)'
22304 fi
22305
22306 if test -n "$at_trace_this"; then
22307     ( $at_traceon;
22308 mkdir gnu
22309 (cd gnu
22310 TEST_TAR_FORMAT=gnu
22311 export TEST_TAR_FORMAT
22312 TAR_OPTIONS="-H gnu"
22313 export TAR_OPTIONS
22314 rm -rf *
22315
22316 mkdir directory
22317 touch directory/file
22318 tar --create --file archive --no-recursion directory || exit 1
22319 tar tf archive
22320 ) ) >"$at_stdout" 2>"$at_stder1"
22321     at_status=$?
22322     grep '^ *+' "$at_stder1" >&2
22323     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22324 else
22325     ( :;
22326 mkdir gnu
22327 (cd gnu
22328 TEST_TAR_FORMAT=gnu
22329 export TEST_TAR_FORMAT
22330 TAR_OPTIONS="-H gnu"
22331 export TAR_OPTIONS
22332 rm -rf *
22333
22334 mkdir directory
22335 touch directory/file
22336 tar --create --file archive --no-recursion directory || exit 1
22337 tar tf archive
22338 ) ) >"$at_stdout" 2>"$at_stderr"
22339     at_status=$?
22340 fi
22341
22342 at_failed=false
22343 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22344 echo >>"$at_stdout"; echo "directory/
22345 " | $at_diff - "$at_stdout" || at_failed=:
22346 case $at_status in
22347    77) echo 77 > "$at_status_file"; exit 77;;
22348    0) ;;
22349    *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
22350       at_failed=:;;
22351 esac
22352 if $at_failed; then
22353
22354
22355   echo 1 > "$at_status_file"
22356   exit 1
22357 fi
22358
22359 $at_traceon
22360
22361
22362
22363
22364       $at_traceoff
22365       $at_times_p && times >"$at_times_file"
22366     ) 5>&1 2>&1 | eval $at_tee_pipe
22367     at_status=`cat "$at_status_file"`
22368     ;;
22369
22370   54 ) # 54. same-order01.at:26: working -C with --same-order
22371     at_setup_line='same-order01.at:26'
22372     at_desc="working -C with --same-order"
22373     $at_quiet $ECHO_N " 54: working -C with --same-order                   $ECHO_C"
22374     at_xfail=no
22375       test -f $XFAILFILE && at_xfail=yes
22376     echo "#                             -*- compilation -*-" >> "$at_group_log"
22377     (
22378       echo "54. same-order01.at:26: testing ..."
22379       $at_traceon
22380
22381
22382
22383
22384
22385   $at_traceoff
22386 echo "$at_srcdir/same-order01.at:29:
22387 mkdir v7
22388 (cd v7
22389 TEST_TAR_FORMAT=v7
22390 export TEST_TAR_FORMAT
22391 TAR_OPTIONS=\"-H v7\"
22392 export TAR_OPTIONS
22393 rm -rf *
22394
22395
22396 test -z "`sort < /dev/null 2>&1`" || exit 77
22397
22398
22399 genfile -l 1024 -f file1
22400 genfile -l 1024 -f file2
22401 tar cf archive file1 file2
22402
22403 mkdir directory
22404 tar -xf archive --same-order -C directory || exit 1
22405
22406 ls directory|sort
22407 )"
22408 echo same-order01.at:29 >"$at_check_line_file"
22409
22410 at_trace_this=
22411 if test -n "$at_traceon"; then
22412     echo 'Not enabling shell tracing (command contains an embedded newline)'
22413 fi
22414
22415 if test -n "$at_trace_this"; then
22416     ( $at_traceon;
22417 mkdir v7
22418 (cd v7
22419 TEST_TAR_FORMAT=v7
22420 export TEST_TAR_FORMAT
22421 TAR_OPTIONS="-H v7"
22422 export TAR_OPTIONS
22423 rm -rf *
22424
22425
22426 test -z "`sort < /dev/null 2>&1`" || exit 77
22427
22428
22429 genfile -l 1024 -f file1
22430 genfile -l 1024 -f file2
22431 tar cf archive file1 file2
22432
22433 mkdir directory
22434 tar -xf archive --same-order -C directory || exit 1
22435
22436 ls directory|sort
22437 ) ) >"$at_stdout" 2>"$at_stder1"
22438     at_status=$?
22439     grep '^ *+' "$at_stder1" >&2
22440     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22441 else
22442     ( :;
22443 mkdir v7
22444 (cd v7
22445 TEST_TAR_FORMAT=v7
22446 export TEST_TAR_FORMAT
22447 TAR_OPTIONS="-H v7"
22448 export TAR_OPTIONS
22449 rm -rf *
22450
22451
22452 test -z "`sort < /dev/null 2>&1`" || exit 77
22453
22454
22455 genfile -l 1024 -f file1
22456 genfile -l 1024 -f file2
22457 tar cf archive file1 file2
22458
22459 mkdir directory
22460 tar -xf archive --same-order -C directory || exit 1
22461
22462 ls directory|sort
22463 ) ) >"$at_stdout" 2>"$at_stderr"
22464     at_status=$?
22465 fi
22466
22467 at_failed=false
22468 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22469 echo >>"$at_stdout"; echo "file1
22470 file2
22471 " | $at_diff - "$at_stdout" || at_failed=:
22472 case $at_status in
22473    77) echo 77 > "$at_status_file"; exit 77;;
22474    0) ;;
22475    *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
22476       at_failed=:;;
22477 esac
22478 if $at_failed; then
22479
22480
22481   echo 1 > "$at_status_file"
22482   exit 1
22483 fi
22484
22485 $at_traceon
22486
22487               $at_traceoff
22488 echo "$at_srcdir/same-order01.at:29:
22489 mkdir oldgnu
22490 (cd oldgnu
22491 TEST_TAR_FORMAT=oldgnu
22492 export TEST_TAR_FORMAT
22493 TAR_OPTIONS=\"-H oldgnu\"
22494 export TAR_OPTIONS
22495 rm -rf *
22496
22497
22498 test -z "`sort < /dev/null 2>&1`" || exit 77
22499
22500
22501 genfile -l 1024 -f file1
22502 genfile -l 1024 -f file2
22503 tar cf archive file1 file2
22504
22505 mkdir directory
22506 tar -xf archive --same-order -C directory || exit 1
22507
22508 ls directory|sort
22509 )"
22510 echo same-order01.at:29 >"$at_check_line_file"
22511
22512 at_trace_this=
22513 if test -n "$at_traceon"; then
22514     echo 'Not enabling shell tracing (command contains an embedded newline)'
22515 fi
22516
22517 if test -n "$at_trace_this"; then
22518     ( $at_traceon;
22519 mkdir oldgnu
22520 (cd oldgnu
22521 TEST_TAR_FORMAT=oldgnu
22522 export TEST_TAR_FORMAT
22523 TAR_OPTIONS="-H oldgnu"
22524 export TAR_OPTIONS
22525 rm -rf *
22526
22527
22528 test -z "`sort < /dev/null 2>&1`" || exit 77
22529
22530
22531 genfile -l 1024 -f file1
22532 genfile -l 1024 -f file2
22533 tar cf archive file1 file2
22534
22535 mkdir directory
22536 tar -xf archive --same-order -C directory || exit 1
22537
22538 ls directory|sort
22539 ) ) >"$at_stdout" 2>"$at_stder1"
22540     at_status=$?
22541     grep '^ *+' "$at_stder1" >&2
22542     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22543 else
22544     ( :;
22545 mkdir oldgnu
22546 (cd oldgnu
22547 TEST_TAR_FORMAT=oldgnu
22548 export TEST_TAR_FORMAT
22549 TAR_OPTIONS="-H oldgnu"
22550 export TAR_OPTIONS
22551 rm -rf *
22552
22553
22554 test -z "`sort < /dev/null 2>&1`" || exit 77
22555
22556
22557 genfile -l 1024 -f file1
22558 genfile -l 1024 -f file2
22559 tar cf archive file1 file2
22560
22561 mkdir directory
22562 tar -xf archive --same-order -C directory || exit 1
22563
22564 ls directory|sort
22565 ) ) >"$at_stdout" 2>"$at_stderr"
22566     at_status=$?
22567 fi
22568
22569 at_failed=false
22570 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22571 echo >>"$at_stdout"; echo "file1
22572 file2
22573 " | $at_diff - "$at_stdout" || at_failed=:
22574 case $at_status in
22575    77) echo 77 > "$at_status_file"; exit 77;;
22576    0) ;;
22577    *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
22578       at_failed=:;;
22579 esac
22580 if $at_failed; then
22581
22582
22583   echo 1 > "$at_status_file"
22584   exit 1
22585 fi
22586
22587 $at_traceon
22588
22589               $at_traceoff
22590 echo "$at_srcdir/same-order01.at:29:
22591 mkdir ustar
22592 (cd ustar
22593 TEST_TAR_FORMAT=ustar
22594 export TEST_TAR_FORMAT
22595 TAR_OPTIONS=\"-H ustar\"
22596 export TAR_OPTIONS
22597 rm -rf *
22598
22599
22600 test -z "`sort < /dev/null 2>&1`" || exit 77
22601
22602
22603 genfile -l 1024 -f file1
22604 genfile -l 1024 -f file2
22605 tar cf archive file1 file2
22606
22607 mkdir directory
22608 tar -xf archive --same-order -C directory || exit 1
22609
22610 ls directory|sort
22611 )"
22612 echo same-order01.at:29 >"$at_check_line_file"
22613
22614 at_trace_this=
22615 if test -n "$at_traceon"; then
22616     echo 'Not enabling shell tracing (command contains an embedded newline)'
22617 fi
22618
22619 if test -n "$at_trace_this"; then
22620     ( $at_traceon;
22621 mkdir ustar
22622 (cd ustar
22623 TEST_TAR_FORMAT=ustar
22624 export TEST_TAR_FORMAT
22625 TAR_OPTIONS="-H ustar"
22626 export TAR_OPTIONS
22627 rm -rf *
22628
22629
22630 test -z "`sort < /dev/null 2>&1`" || exit 77
22631
22632
22633 genfile -l 1024 -f file1
22634 genfile -l 1024 -f file2
22635 tar cf archive file1 file2
22636
22637 mkdir directory
22638 tar -xf archive --same-order -C directory || exit 1
22639
22640 ls directory|sort
22641 ) ) >"$at_stdout" 2>"$at_stder1"
22642     at_status=$?
22643     grep '^ *+' "$at_stder1" >&2
22644     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22645 else
22646     ( :;
22647 mkdir ustar
22648 (cd ustar
22649 TEST_TAR_FORMAT=ustar
22650 export TEST_TAR_FORMAT
22651 TAR_OPTIONS="-H ustar"
22652 export TAR_OPTIONS
22653 rm -rf *
22654
22655
22656 test -z "`sort < /dev/null 2>&1`" || exit 77
22657
22658
22659 genfile -l 1024 -f file1
22660 genfile -l 1024 -f file2
22661 tar cf archive file1 file2
22662
22663 mkdir directory
22664 tar -xf archive --same-order -C directory || exit 1
22665
22666 ls directory|sort
22667 ) ) >"$at_stdout" 2>"$at_stderr"
22668     at_status=$?
22669 fi
22670
22671 at_failed=false
22672 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22673 echo >>"$at_stdout"; echo "file1
22674 file2
22675 " | $at_diff - "$at_stdout" || at_failed=:
22676 case $at_status in
22677    77) echo 77 > "$at_status_file"; exit 77;;
22678    0) ;;
22679    *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
22680       at_failed=:;;
22681 esac
22682 if $at_failed; then
22683
22684
22685   echo 1 > "$at_status_file"
22686   exit 1
22687 fi
22688
22689 $at_traceon
22690
22691               $at_traceoff
22692 echo "$at_srcdir/same-order01.at:29:
22693 mkdir posix
22694 (cd posix
22695 TEST_TAR_FORMAT=posix
22696 export TEST_TAR_FORMAT
22697 TAR_OPTIONS=\"-H posix\"
22698 export TAR_OPTIONS
22699 rm -rf *
22700
22701
22702 test -z "`sort < /dev/null 2>&1`" || exit 77
22703
22704
22705 genfile -l 1024 -f file1
22706 genfile -l 1024 -f file2
22707 tar cf archive file1 file2
22708
22709 mkdir directory
22710 tar -xf archive --same-order -C directory || exit 1
22711
22712 ls directory|sort
22713 )"
22714 echo same-order01.at:29 >"$at_check_line_file"
22715
22716 at_trace_this=
22717 if test -n "$at_traceon"; then
22718     echo 'Not enabling shell tracing (command contains an embedded newline)'
22719 fi
22720
22721 if test -n "$at_trace_this"; then
22722     ( $at_traceon;
22723 mkdir posix
22724 (cd posix
22725 TEST_TAR_FORMAT=posix
22726 export TEST_TAR_FORMAT
22727 TAR_OPTIONS="-H posix"
22728 export TAR_OPTIONS
22729 rm -rf *
22730
22731
22732 test -z "`sort < /dev/null 2>&1`" || exit 77
22733
22734
22735 genfile -l 1024 -f file1
22736 genfile -l 1024 -f file2
22737 tar cf archive file1 file2
22738
22739 mkdir directory
22740 tar -xf archive --same-order -C directory || exit 1
22741
22742 ls directory|sort
22743 ) ) >"$at_stdout" 2>"$at_stder1"
22744     at_status=$?
22745     grep '^ *+' "$at_stder1" >&2
22746     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22747 else
22748     ( :;
22749 mkdir posix
22750 (cd posix
22751 TEST_TAR_FORMAT=posix
22752 export TEST_TAR_FORMAT
22753 TAR_OPTIONS="-H posix"
22754 export TAR_OPTIONS
22755 rm -rf *
22756
22757
22758 test -z "`sort < /dev/null 2>&1`" || exit 77
22759
22760
22761 genfile -l 1024 -f file1
22762 genfile -l 1024 -f file2
22763 tar cf archive file1 file2
22764
22765 mkdir directory
22766 tar -xf archive --same-order -C directory || exit 1
22767
22768 ls directory|sort
22769 ) ) >"$at_stdout" 2>"$at_stderr"
22770     at_status=$?
22771 fi
22772
22773 at_failed=false
22774 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22775 echo >>"$at_stdout"; echo "file1
22776 file2
22777 " | $at_diff - "$at_stdout" || at_failed=:
22778 case $at_status in
22779    77) echo 77 > "$at_status_file"; exit 77;;
22780    0) ;;
22781    *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
22782       at_failed=:;;
22783 esac
22784 if $at_failed; then
22785
22786
22787   echo 1 > "$at_status_file"
22788   exit 1
22789 fi
22790
22791 $at_traceon
22792
22793               $at_traceoff
22794 echo "$at_srcdir/same-order01.at:29:
22795 mkdir gnu
22796 (cd gnu
22797 TEST_TAR_FORMAT=gnu
22798 export TEST_TAR_FORMAT
22799 TAR_OPTIONS=\"-H gnu\"
22800 export TAR_OPTIONS
22801 rm -rf *
22802
22803
22804 test -z "`sort < /dev/null 2>&1`" || exit 77
22805
22806
22807 genfile -l 1024 -f file1
22808 genfile -l 1024 -f file2
22809 tar cf archive file1 file2
22810
22811 mkdir directory
22812 tar -xf archive --same-order -C directory || exit 1
22813
22814 ls directory|sort
22815 )"
22816 echo same-order01.at:29 >"$at_check_line_file"
22817
22818 at_trace_this=
22819 if test -n "$at_traceon"; then
22820     echo 'Not enabling shell tracing (command contains an embedded newline)'
22821 fi
22822
22823 if test -n "$at_trace_this"; then
22824     ( $at_traceon;
22825 mkdir gnu
22826 (cd gnu
22827 TEST_TAR_FORMAT=gnu
22828 export TEST_TAR_FORMAT
22829 TAR_OPTIONS="-H gnu"
22830 export TAR_OPTIONS
22831 rm -rf *
22832
22833
22834 test -z "`sort < /dev/null 2>&1`" || exit 77
22835
22836
22837 genfile -l 1024 -f file1
22838 genfile -l 1024 -f file2
22839 tar cf archive file1 file2
22840
22841 mkdir directory
22842 tar -xf archive --same-order -C directory || exit 1
22843
22844 ls directory|sort
22845 ) ) >"$at_stdout" 2>"$at_stder1"
22846     at_status=$?
22847     grep '^ *+' "$at_stder1" >&2
22848     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22849 else
22850     ( :;
22851 mkdir gnu
22852 (cd gnu
22853 TEST_TAR_FORMAT=gnu
22854 export TEST_TAR_FORMAT
22855 TAR_OPTIONS="-H gnu"
22856 export TAR_OPTIONS
22857 rm -rf *
22858
22859
22860 test -z "`sort < /dev/null 2>&1`" || exit 77
22861
22862
22863 genfile -l 1024 -f file1
22864 genfile -l 1024 -f file2
22865 tar cf archive file1 file2
22866
22867 mkdir directory
22868 tar -xf archive --same-order -C directory || exit 1
22869
22870 ls directory|sort
22871 ) ) >"$at_stdout" 2>"$at_stderr"
22872     at_status=$?
22873 fi
22874
22875 at_failed=false
22876 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22877 echo >>"$at_stdout"; echo "file1
22878 file2
22879 " | $at_diff - "$at_stdout" || at_failed=:
22880 case $at_status in
22881    77) echo 77 > "$at_status_file"; exit 77;;
22882    0) ;;
22883    *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
22884       at_failed=:;;
22885 esac
22886 if $at_failed; then
22887
22888
22889   echo 1 > "$at_status_file"
22890   exit 1
22891 fi
22892
22893 $at_traceon
22894
22895
22896
22897
22898       $at_traceoff
22899       $at_times_p && times >"$at_times_file"
22900     ) 5>&1 2>&1 | eval $at_tee_pipe
22901     at_status=`cat "$at_status_file"`
22902     ;;
22903
22904   55 ) # 55. same-order02.at:25: multiple -C options
22905     at_setup_line='same-order02.at:25'
22906     at_desc="multiple -C options"
22907     $at_quiet $ECHO_N " 55: multiple -C options                            $ECHO_C"
22908     at_xfail=no
22909       test -f $XFAILFILE && at_xfail=yes
22910     echo "#                             -*- compilation -*-" >> "$at_group_log"
22911     (
22912       echo "55. same-order02.at:25: testing ..."
22913       $at_traceon
22914
22915
22916
22917
22918
22919   $at_traceoff
22920 echo "$at_srcdir/same-order02.at:28:
22921 mkdir v7
22922 (cd v7
22923 TEST_TAR_FORMAT=v7
22924 export TEST_TAR_FORMAT
22925 TAR_OPTIONS=\"-H v7\"
22926 export TAR_OPTIONS
22927 rm -rf *
22928
22929 genfile -l 1024 -f file1
22930 genfile -l 1024 -f file2
22931 tar cf archive file1 file2
22932
22933 mkdir en
22934 mkdir to
22935
22936 HERE=\`pwd\`
22937 tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
22938
22939 ls en
22940 echo separator
22941 ls to
22942 )"
22943 echo same-order02.at:28 >"$at_check_line_file"
22944
22945 at_trace_this=
22946 if test -n "$at_traceon"; then
22947     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
22948 fi
22949
22950 if test -n "$at_trace_this"; then
22951     ( $at_traceon;
22952 mkdir v7
22953 (cd v7
22954 TEST_TAR_FORMAT=v7
22955 export TEST_TAR_FORMAT
22956 TAR_OPTIONS="-H v7"
22957 export TAR_OPTIONS
22958 rm -rf *
22959
22960 genfile -l 1024 -f file1
22961 genfile -l 1024 -f file2
22962 tar cf archive file1 file2
22963
22964 mkdir en
22965 mkdir to
22966
22967 HERE=`pwd`
22968 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
22969
22970 ls en
22971 echo separator
22972 ls to
22973 ) ) >"$at_stdout" 2>"$at_stder1"
22974     at_status=$?
22975     grep '^ *+' "$at_stder1" >&2
22976     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22977 else
22978     ( :;
22979 mkdir v7
22980 (cd v7
22981 TEST_TAR_FORMAT=v7
22982 export TEST_TAR_FORMAT
22983 TAR_OPTIONS="-H v7"
22984 export TAR_OPTIONS
22985 rm -rf *
22986
22987 genfile -l 1024 -f file1
22988 genfile -l 1024 -f file2
22989 tar cf archive file1 file2
22990
22991 mkdir en
22992 mkdir to
22993
22994 HERE=`pwd`
22995 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
22996
22997 ls en
22998 echo separator
22999 ls to
23000 ) ) >"$at_stdout" 2>"$at_stderr"
23001     at_status=$?
23002 fi
23003
23004 at_failed=false
23005 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23006 echo >>"$at_stdout"; echo "file1
23007 separator
23008 file2
23009 " | $at_diff - "$at_stdout" || at_failed=:
23010 case $at_status in
23011    77) echo 77 > "$at_status_file"; exit 77;;
23012    0) ;;
23013    *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
23014       at_failed=:;;
23015 esac
23016 if $at_failed; then
23017
23018
23019   echo 1 > "$at_status_file"
23020   exit 1
23021 fi
23022
23023 $at_traceon
23024
23025               $at_traceoff
23026 echo "$at_srcdir/same-order02.at:28:
23027 mkdir oldgnu
23028 (cd oldgnu
23029 TEST_TAR_FORMAT=oldgnu
23030 export TEST_TAR_FORMAT
23031 TAR_OPTIONS=\"-H oldgnu\"
23032 export TAR_OPTIONS
23033 rm -rf *
23034
23035 genfile -l 1024 -f file1
23036 genfile -l 1024 -f file2
23037 tar cf archive file1 file2
23038
23039 mkdir en
23040 mkdir to
23041
23042 HERE=\`pwd\`
23043 tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
23044
23045 ls en
23046 echo separator
23047 ls to
23048 )"
23049 echo same-order02.at:28 >"$at_check_line_file"
23050
23051 at_trace_this=
23052 if test -n "$at_traceon"; then
23053     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
23054 fi
23055
23056 if test -n "$at_trace_this"; then
23057     ( $at_traceon;
23058 mkdir oldgnu
23059 (cd oldgnu
23060 TEST_TAR_FORMAT=oldgnu
23061 export TEST_TAR_FORMAT
23062 TAR_OPTIONS="-H oldgnu"
23063 export TAR_OPTIONS
23064 rm -rf *
23065
23066 genfile -l 1024 -f file1
23067 genfile -l 1024 -f file2
23068 tar cf archive file1 file2
23069
23070 mkdir en
23071 mkdir to
23072
23073 HERE=`pwd`
23074 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
23075
23076 ls en
23077 echo separator
23078 ls to
23079 ) ) >"$at_stdout" 2>"$at_stder1"
23080     at_status=$?
23081     grep '^ *+' "$at_stder1" >&2
23082     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23083 else
23084     ( :;
23085 mkdir oldgnu
23086 (cd oldgnu
23087 TEST_TAR_FORMAT=oldgnu
23088 export TEST_TAR_FORMAT
23089 TAR_OPTIONS="-H oldgnu"
23090 export TAR_OPTIONS
23091 rm -rf *
23092
23093 genfile -l 1024 -f file1
23094 genfile -l 1024 -f file2
23095 tar cf archive file1 file2
23096
23097 mkdir en
23098 mkdir to
23099
23100 HERE=`pwd`
23101 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
23102
23103 ls en
23104 echo separator
23105 ls to
23106 ) ) >"$at_stdout" 2>"$at_stderr"
23107     at_status=$?
23108 fi
23109
23110 at_failed=false
23111 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23112 echo >>"$at_stdout"; echo "file1
23113 separator
23114 file2
23115 " | $at_diff - "$at_stdout" || at_failed=:
23116 case $at_status in
23117    77) echo 77 > "$at_status_file"; exit 77;;
23118    0) ;;
23119    *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
23120       at_failed=:;;
23121 esac
23122 if $at_failed; then
23123
23124
23125   echo 1 > "$at_status_file"
23126   exit 1
23127 fi
23128
23129 $at_traceon
23130
23131               $at_traceoff
23132 echo "$at_srcdir/same-order02.at:28:
23133 mkdir ustar
23134 (cd ustar
23135 TEST_TAR_FORMAT=ustar
23136 export TEST_TAR_FORMAT
23137 TAR_OPTIONS=\"-H ustar\"
23138 export TAR_OPTIONS
23139 rm -rf *
23140
23141 genfile -l 1024 -f file1
23142 genfile -l 1024 -f file2
23143 tar cf archive file1 file2
23144
23145 mkdir en
23146 mkdir to
23147
23148 HERE=\`pwd\`
23149 tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
23150
23151 ls en
23152 echo separator
23153 ls to
23154 )"
23155 echo same-order02.at:28 >"$at_check_line_file"
23156
23157 at_trace_this=
23158 if test -n "$at_traceon"; then
23159     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
23160 fi
23161
23162 if test -n "$at_trace_this"; then
23163     ( $at_traceon;
23164 mkdir ustar
23165 (cd ustar
23166 TEST_TAR_FORMAT=ustar
23167 export TEST_TAR_FORMAT
23168 TAR_OPTIONS="-H ustar"
23169 export TAR_OPTIONS
23170 rm -rf *
23171
23172 genfile -l 1024 -f file1
23173 genfile -l 1024 -f file2
23174 tar cf archive file1 file2
23175
23176 mkdir en
23177 mkdir to
23178
23179 HERE=`pwd`
23180 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
23181
23182 ls en
23183 echo separator
23184 ls to
23185 ) ) >"$at_stdout" 2>"$at_stder1"
23186     at_status=$?
23187     grep '^ *+' "$at_stder1" >&2
23188     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23189 else
23190     ( :;
23191 mkdir ustar
23192 (cd ustar
23193 TEST_TAR_FORMAT=ustar
23194 export TEST_TAR_FORMAT
23195 TAR_OPTIONS="-H ustar"
23196 export TAR_OPTIONS
23197 rm -rf *
23198
23199 genfile -l 1024 -f file1
23200 genfile -l 1024 -f file2
23201 tar cf archive file1 file2
23202
23203 mkdir en
23204 mkdir to
23205
23206 HERE=`pwd`
23207 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
23208
23209 ls en
23210 echo separator
23211 ls to
23212 ) ) >"$at_stdout" 2>"$at_stderr"
23213     at_status=$?
23214 fi
23215
23216 at_failed=false
23217 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23218 echo >>"$at_stdout"; echo "file1
23219 separator
23220 file2
23221 " | $at_diff - "$at_stdout" || at_failed=:
23222 case $at_status in
23223    77) echo 77 > "$at_status_file"; exit 77;;
23224    0) ;;
23225    *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
23226       at_failed=:;;
23227 esac
23228 if $at_failed; then
23229
23230
23231   echo 1 > "$at_status_file"
23232   exit 1
23233 fi
23234
23235 $at_traceon
23236
23237               $at_traceoff
23238 echo "$at_srcdir/same-order02.at:28:
23239 mkdir posix
23240 (cd posix
23241 TEST_TAR_FORMAT=posix
23242 export TEST_TAR_FORMAT
23243 TAR_OPTIONS=\"-H posix\"
23244 export TAR_OPTIONS
23245 rm -rf *
23246
23247 genfile -l 1024 -f file1
23248 genfile -l 1024 -f file2
23249 tar cf archive file1 file2
23250
23251 mkdir en
23252 mkdir to
23253
23254 HERE=\`pwd\`
23255 tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
23256
23257 ls en
23258 echo separator
23259 ls to
23260 )"
23261 echo same-order02.at:28 >"$at_check_line_file"
23262
23263 at_trace_this=
23264 if test -n "$at_traceon"; then
23265     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
23266 fi
23267
23268 if test -n "$at_trace_this"; then
23269     ( $at_traceon;
23270 mkdir posix
23271 (cd posix
23272 TEST_TAR_FORMAT=posix
23273 export TEST_TAR_FORMAT
23274 TAR_OPTIONS="-H posix"
23275 export TAR_OPTIONS
23276 rm -rf *
23277
23278 genfile -l 1024 -f file1
23279 genfile -l 1024 -f file2
23280 tar cf archive file1 file2
23281
23282 mkdir en
23283 mkdir to
23284
23285 HERE=`pwd`
23286 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
23287
23288 ls en
23289 echo separator
23290 ls to
23291 ) ) >"$at_stdout" 2>"$at_stder1"
23292     at_status=$?
23293     grep '^ *+' "$at_stder1" >&2
23294     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23295 else
23296     ( :;
23297 mkdir posix
23298 (cd posix
23299 TEST_TAR_FORMAT=posix
23300 export TEST_TAR_FORMAT
23301 TAR_OPTIONS="-H posix"
23302 export TAR_OPTIONS
23303 rm -rf *
23304
23305 genfile -l 1024 -f file1
23306 genfile -l 1024 -f file2
23307 tar cf archive file1 file2
23308
23309 mkdir en
23310 mkdir to
23311
23312 HERE=`pwd`
23313 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
23314
23315 ls en
23316 echo separator
23317 ls to
23318 ) ) >"$at_stdout" 2>"$at_stderr"
23319     at_status=$?
23320 fi
23321
23322 at_failed=false
23323 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23324 echo >>"$at_stdout"; echo "file1
23325 separator
23326 file2
23327 " | $at_diff - "$at_stdout" || at_failed=:
23328 case $at_status in
23329    77) echo 77 > "$at_status_file"; exit 77;;
23330    0) ;;
23331    *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
23332       at_failed=:;;
23333 esac
23334 if $at_failed; then
23335
23336
23337   echo 1 > "$at_status_file"
23338   exit 1
23339 fi
23340
23341 $at_traceon
23342
23343               $at_traceoff
23344 echo "$at_srcdir/same-order02.at:28:
23345 mkdir gnu
23346 (cd gnu
23347 TEST_TAR_FORMAT=gnu
23348 export TEST_TAR_FORMAT
23349 TAR_OPTIONS=\"-H gnu\"
23350 export TAR_OPTIONS
23351 rm -rf *
23352
23353 genfile -l 1024 -f file1
23354 genfile -l 1024 -f file2
23355 tar cf archive file1 file2
23356
23357 mkdir en
23358 mkdir to
23359
23360 HERE=\`pwd\`
23361 tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
23362
23363 ls en
23364 echo separator
23365 ls to
23366 )"
23367 echo same-order02.at:28 >"$at_check_line_file"
23368
23369 at_trace_this=
23370 if test -n "$at_traceon"; then
23371     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
23372 fi
23373
23374 if test -n "$at_trace_this"; then
23375     ( $at_traceon;
23376 mkdir gnu
23377 (cd gnu
23378 TEST_TAR_FORMAT=gnu
23379 export TEST_TAR_FORMAT
23380 TAR_OPTIONS="-H gnu"
23381 export TAR_OPTIONS
23382 rm -rf *
23383
23384 genfile -l 1024 -f file1
23385 genfile -l 1024 -f file2
23386 tar cf archive file1 file2
23387
23388 mkdir en
23389 mkdir to
23390
23391 HERE=`pwd`
23392 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
23393
23394 ls en
23395 echo separator
23396 ls to
23397 ) ) >"$at_stdout" 2>"$at_stder1"
23398     at_status=$?
23399     grep '^ *+' "$at_stder1" >&2
23400     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23401 else
23402     ( :;
23403 mkdir gnu
23404 (cd gnu
23405 TEST_TAR_FORMAT=gnu
23406 export TEST_TAR_FORMAT
23407 TAR_OPTIONS="-H gnu"
23408 export TAR_OPTIONS
23409 rm -rf *
23410
23411 genfile -l 1024 -f file1
23412 genfile -l 1024 -f file2
23413 tar cf archive file1 file2
23414
23415 mkdir en
23416 mkdir to
23417
23418 HERE=`pwd`
23419 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
23420
23421 ls en
23422 echo separator
23423 ls to
23424 ) ) >"$at_stdout" 2>"$at_stderr"
23425     at_status=$?
23426 fi
23427
23428 at_failed=false
23429 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23430 echo >>"$at_stdout"; echo "file1
23431 separator
23432 file2
23433 " | $at_diff - "$at_stdout" || at_failed=:
23434 case $at_status in
23435    77) echo 77 > "$at_status_file"; exit 77;;
23436    0) ;;
23437    *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
23438       at_failed=:;;
23439 esac
23440 if $at_failed; then
23441
23442
23443   echo 1 > "$at_status_file"
23444   exit 1
23445 fi
23446
23447 $at_traceon
23448
23449
23450
23451
23452       $at_traceoff
23453       $at_times_p && times >"$at_times_file"
23454     ) 5>&1 2>&1 | eval $at_tee_pipe
23455     at_status=`cat "$at_status_file"`
23456     ;;
23457
23458   56 ) # 56. shortrec.at:25: short records
23459     at_setup_line='shortrec.at:25'
23460     at_desc="short records"
23461     $at_quiet $ECHO_N " 56: short records                                  $ECHO_C"
23462     at_xfail=no
23463       test -f $XFAILFILE && at_xfail=yes
23464     echo "#                             -*- compilation -*-" >> "$at_group_log"
23465     (
23466       echo "56. shortrec.at:25: testing ..."
23467       $at_traceon
23468
23469
23470
23471
23472
23473
23474
23475   $at_traceoff
23476 echo "$at_srcdir/shortrec.at:28:
23477 mkdir v7
23478 (cd v7
23479 TEST_TAR_FORMAT=v7
23480 export TEST_TAR_FORMAT
23481 TAR_OPTIONS=\"-H v7\"
23482 export TAR_OPTIONS
23483 rm -rf *
23484
23485 mkdir directory
23486 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23487 tar -c -b 1 -f - directory | tar -t -f -
23488 tar -c -b 1 -f archive directory
23489 tar -t -f archive
23490 tar -t -f - < archive
23491
23492 rm -r directory
23493 )"
23494 echo shortrec.at:28 >"$at_check_line_file"
23495
23496 at_trace_this=
23497 if test -n "$at_traceon"; then
23498     echo 'Not enabling shell tracing (command contains an embedded newline)'
23499 fi
23500
23501 if test -n "$at_trace_this"; then
23502     ( $at_traceon;
23503 mkdir v7
23504 (cd v7
23505 TEST_TAR_FORMAT=v7
23506 export TEST_TAR_FORMAT
23507 TAR_OPTIONS="-H v7"
23508 export TAR_OPTIONS
23509 rm -rf *
23510
23511 mkdir directory
23512 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23513 tar -c -b 1 -f - directory | tar -t -f -
23514 tar -c -b 1 -f archive directory
23515 tar -t -f archive
23516 tar -t -f - < archive
23517
23518 rm -r directory
23519 ) ) >"$at_stdout" 2>"$at_stder1"
23520     at_status=$?
23521     grep '^ *+' "$at_stder1" >&2
23522     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23523 else
23524     ( :;
23525 mkdir v7
23526 (cd v7
23527 TEST_TAR_FORMAT=v7
23528 export TEST_TAR_FORMAT
23529 TAR_OPTIONS="-H v7"
23530 export TAR_OPTIONS
23531 rm -rf *
23532
23533 mkdir directory
23534 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23535 tar -c -b 1 -f - directory | tar -t -f -
23536 tar -c -b 1 -f archive directory
23537 tar -t -f archive
23538 tar -t -f - < archive
23539
23540 rm -r directory
23541 ) ) >"$at_stdout" 2>"$at_stderr"
23542     at_status=$?
23543 fi
23544
23545 at_failed=false
23546 echo stderr:; tee stderr <"$at_stderr"
23547 echo stdout:; cat "$at_stdout"
23548 case $at_status in
23549    77) echo 77 > "$at_status_file"; exit 77;;
23550    0) ;;
23551    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
23552       at_failed=:;;
23553 esac
23554 if $at_failed; then
23555
23556
23557   echo 1 > "$at_status_file"
23558   exit 1
23559 fi
23560
23561 $at_traceon
23562
23563
23564   $at_traceoff
23565 echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0"
23566 echo shortrec.at:28 >"$at_check_line_file"
23567
23568 at_trace_this=
23569 if test -n "$at_traceon"; then
23570     at_trace_this=yes
23571 fi
23572
23573 if test -n "$at_trace_this"; then
23574     ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1"
23575     at_status=$?
23576     grep '^ *+' "$at_stder1" >&2
23577     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23578 else
23579     ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr"
23580     at_status=$?
23581 fi
23582
23583 at_failed=false
23584 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23585 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
23586 case $at_status in
23587    77) echo 77 > "$at_status_file"; exit 77;;
23588    0) ;;
23589    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
23590       at_failed=:;;
23591 esac
23592 if $at_failed; then
23593
23594
23595   echo 1 > "$at_status_file"
23596   exit 1
23597 fi
23598
23599 $at_traceon
23600
23601 $at_traceoff
23602 echo "$at_srcdir/shortrec.at:28:
23603 mkdir oldgnu
23604 (cd oldgnu
23605 TEST_TAR_FORMAT=oldgnu
23606 export TEST_TAR_FORMAT
23607 TAR_OPTIONS=\"-H oldgnu\"
23608 export TAR_OPTIONS
23609 rm -rf *
23610
23611 mkdir directory
23612 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23613 tar -c -b 1 -f - directory | tar -t -f -
23614 tar -c -b 1 -f archive directory
23615 tar -t -f archive
23616 tar -t -f - < archive
23617
23618 rm -r directory
23619 )"
23620 echo shortrec.at:28 >"$at_check_line_file"
23621
23622 at_trace_this=
23623 if test -n "$at_traceon"; then
23624     echo 'Not enabling shell tracing (command contains an embedded newline)'
23625 fi
23626
23627 if test -n "$at_trace_this"; then
23628     ( $at_traceon;
23629 mkdir oldgnu
23630 (cd oldgnu
23631 TEST_TAR_FORMAT=oldgnu
23632 export TEST_TAR_FORMAT
23633 TAR_OPTIONS="-H oldgnu"
23634 export TAR_OPTIONS
23635 rm -rf *
23636
23637 mkdir directory
23638 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23639 tar -c -b 1 -f - directory | tar -t -f -
23640 tar -c -b 1 -f archive directory
23641 tar -t -f archive
23642 tar -t -f - < archive
23643
23644 rm -r directory
23645 ) ) >"$at_stdout" 2>"$at_stder1"
23646     at_status=$?
23647     grep '^ *+' "$at_stder1" >&2
23648     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23649 else
23650     ( :;
23651 mkdir oldgnu
23652 (cd oldgnu
23653 TEST_TAR_FORMAT=oldgnu
23654 export TEST_TAR_FORMAT
23655 TAR_OPTIONS="-H oldgnu"
23656 export TAR_OPTIONS
23657 rm -rf *
23658
23659 mkdir directory
23660 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23661 tar -c -b 1 -f - directory | tar -t -f -
23662 tar -c -b 1 -f archive directory
23663 tar -t -f archive
23664 tar -t -f - < archive
23665
23666 rm -r directory
23667 ) ) >"$at_stdout" 2>"$at_stderr"
23668     at_status=$?
23669 fi
23670
23671 at_failed=false
23672 echo stderr:; tee stderr <"$at_stderr"
23673 echo stdout:; cat "$at_stdout"
23674 case $at_status in
23675    77) echo 77 > "$at_status_file"; exit 77;;
23676    0) ;;
23677    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
23678       at_failed=:;;
23679 esac
23680 if $at_failed; then
23681
23682
23683   echo 1 > "$at_status_file"
23684   exit 1
23685 fi
23686
23687 $at_traceon
23688
23689
23690   $at_traceoff
23691 echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0"
23692 echo shortrec.at:28 >"$at_check_line_file"
23693
23694 at_trace_this=
23695 if test -n "$at_traceon"; then
23696     at_trace_this=yes
23697 fi
23698
23699 if test -n "$at_trace_this"; then
23700     ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1"
23701     at_status=$?
23702     grep '^ *+' "$at_stder1" >&2
23703     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23704 else
23705     ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr"
23706     at_status=$?
23707 fi
23708
23709 at_failed=false
23710 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23711 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
23712 case $at_status in
23713    77) echo 77 > "$at_status_file"; exit 77;;
23714    0) ;;
23715    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
23716       at_failed=:;;
23717 esac
23718 if $at_failed; then
23719
23720
23721   echo 1 > "$at_status_file"
23722   exit 1
23723 fi
23724
23725 $at_traceon
23726
23727 $at_traceoff
23728 echo "$at_srcdir/shortrec.at:28:
23729 mkdir ustar
23730 (cd ustar
23731 TEST_TAR_FORMAT=ustar
23732 export TEST_TAR_FORMAT
23733 TAR_OPTIONS=\"-H ustar\"
23734 export TAR_OPTIONS
23735 rm -rf *
23736
23737 mkdir directory
23738 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23739 tar -c -b 1 -f - directory | tar -t -f -
23740 tar -c -b 1 -f archive directory
23741 tar -t -f archive
23742 tar -t -f - < archive
23743
23744 rm -r directory
23745 )"
23746 echo shortrec.at:28 >"$at_check_line_file"
23747
23748 at_trace_this=
23749 if test -n "$at_traceon"; then
23750     echo 'Not enabling shell tracing (command contains an embedded newline)'
23751 fi
23752
23753 if test -n "$at_trace_this"; then
23754     ( $at_traceon;
23755 mkdir ustar
23756 (cd ustar
23757 TEST_TAR_FORMAT=ustar
23758 export TEST_TAR_FORMAT
23759 TAR_OPTIONS="-H ustar"
23760 export TAR_OPTIONS
23761 rm -rf *
23762
23763 mkdir directory
23764 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23765 tar -c -b 1 -f - directory | tar -t -f -
23766 tar -c -b 1 -f archive directory
23767 tar -t -f archive
23768 tar -t -f - < archive
23769
23770 rm -r directory
23771 ) ) >"$at_stdout" 2>"$at_stder1"
23772     at_status=$?
23773     grep '^ *+' "$at_stder1" >&2
23774     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23775 else
23776     ( :;
23777 mkdir ustar
23778 (cd ustar
23779 TEST_TAR_FORMAT=ustar
23780 export TEST_TAR_FORMAT
23781 TAR_OPTIONS="-H ustar"
23782 export TAR_OPTIONS
23783 rm -rf *
23784
23785 mkdir directory
23786 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23787 tar -c -b 1 -f - directory | tar -t -f -
23788 tar -c -b 1 -f archive directory
23789 tar -t -f archive
23790 tar -t -f - < archive
23791
23792 rm -r directory
23793 ) ) >"$at_stdout" 2>"$at_stderr"
23794     at_status=$?
23795 fi
23796
23797 at_failed=false
23798 echo stderr:; tee stderr <"$at_stderr"
23799 echo stdout:; cat "$at_stdout"
23800 case $at_status in
23801    77) echo 77 > "$at_status_file"; exit 77;;
23802    0) ;;
23803    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
23804       at_failed=:;;
23805 esac
23806 if $at_failed; then
23807
23808
23809   echo 1 > "$at_status_file"
23810   exit 1
23811 fi
23812
23813 $at_traceon
23814
23815
23816   $at_traceoff
23817 echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0"
23818 echo shortrec.at:28 >"$at_check_line_file"
23819
23820 at_trace_this=
23821 if test -n "$at_traceon"; then
23822     at_trace_this=yes
23823 fi
23824
23825 if test -n "$at_trace_this"; then
23826     ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1"
23827     at_status=$?
23828     grep '^ *+' "$at_stder1" >&2
23829     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23830 else
23831     ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr"
23832     at_status=$?
23833 fi
23834
23835 at_failed=false
23836 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23837 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
23838 case $at_status in
23839    77) echo 77 > "$at_status_file"; exit 77;;
23840    0) ;;
23841    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
23842       at_failed=:;;
23843 esac
23844 if $at_failed; then
23845
23846
23847   echo 1 > "$at_status_file"
23848   exit 1
23849 fi
23850
23851 $at_traceon
23852
23853 $at_traceoff
23854 echo "$at_srcdir/shortrec.at:28:
23855 mkdir posix
23856 (cd posix
23857 TEST_TAR_FORMAT=posix
23858 export TEST_TAR_FORMAT
23859 TAR_OPTIONS=\"-H posix\"
23860 export TAR_OPTIONS
23861 rm -rf *
23862
23863 mkdir directory
23864 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23865 tar -c -b 1 -f - directory | tar -t -f -
23866 tar -c -b 1 -f archive directory
23867 tar -t -f archive
23868 tar -t -f - < archive
23869
23870 rm -r directory
23871 )"
23872 echo shortrec.at:28 >"$at_check_line_file"
23873
23874 at_trace_this=
23875 if test -n "$at_traceon"; then
23876     echo 'Not enabling shell tracing (command contains an embedded newline)'
23877 fi
23878
23879 if test -n "$at_trace_this"; then
23880     ( $at_traceon;
23881 mkdir posix
23882 (cd posix
23883 TEST_TAR_FORMAT=posix
23884 export TEST_TAR_FORMAT
23885 TAR_OPTIONS="-H posix"
23886 export TAR_OPTIONS
23887 rm -rf *
23888
23889 mkdir directory
23890 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23891 tar -c -b 1 -f - directory | tar -t -f -
23892 tar -c -b 1 -f archive directory
23893 tar -t -f archive
23894 tar -t -f - < archive
23895
23896 rm -r directory
23897 ) ) >"$at_stdout" 2>"$at_stder1"
23898     at_status=$?
23899     grep '^ *+' "$at_stder1" >&2
23900     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23901 else
23902     ( :;
23903 mkdir posix
23904 (cd posix
23905 TEST_TAR_FORMAT=posix
23906 export TEST_TAR_FORMAT
23907 TAR_OPTIONS="-H posix"
23908 export TAR_OPTIONS
23909 rm -rf *
23910
23911 mkdir directory
23912 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23913 tar -c -b 1 -f - directory | tar -t -f -
23914 tar -c -b 1 -f archive directory
23915 tar -t -f archive
23916 tar -t -f - < archive
23917
23918 rm -r directory
23919 ) ) >"$at_stdout" 2>"$at_stderr"
23920     at_status=$?
23921 fi
23922
23923 at_failed=false
23924 echo stderr:; tee stderr <"$at_stderr"
23925 echo stdout:; cat "$at_stdout"
23926 case $at_status in
23927    77) echo 77 > "$at_status_file"; exit 77;;
23928    0) ;;
23929    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
23930       at_failed=:;;
23931 esac
23932 if $at_failed; then
23933
23934
23935   echo 1 > "$at_status_file"
23936   exit 1
23937 fi
23938
23939 $at_traceon
23940
23941
23942   $at_traceoff
23943 echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0"
23944 echo shortrec.at:28 >"$at_check_line_file"
23945
23946 at_trace_this=
23947 if test -n "$at_traceon"; then
23948     at_trace_this=yes
23949 fi
23950
23951 if test -n "$at_trace_this"; then
23952     ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1"
23953     at_status=$?
23954     grep '^ *+' "$at_stder1" >&2
23955     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23956 else
23957     ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr"
23958     at_status=$?
23959 fi
23960
23961 at_failed=false
23962 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23963 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
23964 case $at_status in
23965    77) echo 77 > "$at_status_file"; exit 77;;
23966    0) ;;
23967    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
23968       at_failed=:;;
23969 esac
23970 if $at_failed; then
23971
23972
23973   echo 1 > "$at_status_file"
23974   exit 1
23975 fi
23976
23977 $at_traceon
23978
23979 $at_traceoff
23980 echo "$at_srcdir/shortrec.at:28:
23981 mkdir gnu
23982 (cd gnu
23983 TEST_TAR_FORMAT=gnu
23984 export TEST_TAR_FORMAT
23985 TAR_OPTIONS=\"-H gnu\"
23986 export TAR_OPTIONS
23987 rm -rf *
23988
23989 mkdir directory
23990 (cd directory && touch a b c d e f g h i j k l m n o p q r)
23991 tar -c -b 1 -f - directory | tar -t -f -
23992 tar -c -b 1 -f archive directory
23993 tar -t -f archive
23994 tar -t -f - < archive
23995
23996 rm -r directory
23997 )"
23998 echo shortrec.at:28 >"$at_check_line_file"
23999
24000 at_trace_this=
24001 if test -n "$at_traceon"; then
24002     echo 'Not enabling shell tracing (command contains an embedded newline)'
24003 fi
24004
24005 if test -n "$at_trace_this"; then
24006     ( $at_traceon;
24007 mkdir gnu
24008 (cd gnu
24009 TEST_TAR_FORMAT=gnu
24010 export TEST_TAR_FORMAT
24011 TAR_OPTIONS="-H gnu"
24012 export TAR_OPTIONS
24013 rm -rf *
24014
24015 mkdir directory
24016 (cd directory && touch a b c d e f g h i j k l m n o p q r)
24017 tar -c -b 1 -f - directory | tar -t -f -
24018 tar -c -b 1 -f archive directory
24019 tar -t -f archive
24020 tar -t -f - < archive
24021
24022 rm -r directory
24023 ) ) >"$at_stdout" 2>"$at_stder1"
24024     at_status=$?
24025     grep '^ *+' "$at_stder1" >&2
24026     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24027 else
24028     ( :;
24029 mkdir gnu
24030 (cd gnu
24031 TEST_TAR_FORMAT=gnu
24032 export TEST_TAR_FORMAT
24033 TAR_OPTIONS="-H gnu"
24034 export TAR_OPTIONS
24035 rm -rf *
24036
24037 mkdir directory
24038 (cd directory && touch a b c d e f g h i j k l m n o p q r)
24039 tar -c -b 1 -f - directory | tar -t -f -
24040 tar -c -b 1 -f archive directory
24041 tar -t -f archive
24042 tar -t -f - < archive
24043
24044 rm -r directory
24045 ) ) >"$at_stdout" 2>"$at_stderr"
24046     at_status=$?
24047 fi
24048
24049 at_failed=false
24050 echo stderr:; tee stderr <"$at_stderr"
24051 echo stdout:; cat "$at_stdout"
24052 case $at_status in
24053    77) echo 77 > "$at_status_file"; exit 77;;
24054    0) ;;
24055    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
24056       at_failed=:;;
24057 esac
24058 if $at_failed; then
24059
24060
24061   echo 1 > "$at_status_file"
24062   exit 1
24063 fi
24064
24065 $at_traceon
24066
24067
24068   $at_traceoff
24069 echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0"
24070 echo shortrec.at:28 >"$at_check_line_file"
24071
24072 at_trace_this=
24073 if test -n "$at_traceon"; then
24074     at_trace_this=yes
24075 fi
24076
24077 if test -n "$at_trace_this"; then
24078     ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1"
24079     at_status=$?
24080     grep '^ *+' "$at_stder1" >&2
24081     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24082 else
24083     ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr"
24084     at_status=$?
24085 fi
24086
24087 at_failed=false
24088 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24089 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
24090 case $at_status in
24091    77) echo 77 > "$at_status_file"; exit 77;;
24092    0) ;;
24093    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
24094       at_failed=:;;
24095 esac
24096 if $at_failed; then
24097
24098
24099   echo 1 > "$at_status_file"
24100   exit 1
24101 fi
24102
24103 $at_traceon
24104
24105
24106
24107
24108
24109
24110
24111       $at_traceoff
24112       $at_times_p && times >"$at_times_file"
24113     ) 5>&1 2>&1 | eval $at_tee_pipe
24114     at_status=`cat "$at_status_file"`
24115     ;;
24116
24117   57 ) # 57. sparse01.at:21: sparse files
24118     at_setup_line='sparse01.at:21'
24119     at_desc="sparse files"
24120     $at_quiet $ECHO_N " 57: sparse files                                   $ECHO_C"
24121     at_xfail=no
24122       test -f $XFAILFILE && at_xfail=yes
24123     echo "#                             -*- compilation -*-" >> "$at_group_log"
24124     (
24125       echo "57. sparse01.at:21: testing ..."
24126       $at_traceon
24127
24128
24129
24130
24131
24132   $at_traceoff
24133 echo "$at_srcdir/sparse01.at:24:
24134 mkdir posix
24135 (cd posix
24136 TEST_TAR_FORMAT=posix
24137 export TEST_TAR_FORMAT
24138 TAR_OPTIONS=\"-H posix\"
24139 export TAR_OPTIONS
24140 rm -rf *
24141
24142 genfile --length 1000 -f begin
24143 genfile --length 1000 -f end
24144 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24145 tar -c -f archive --sparse begin sparsefile end || exit 1
24146 echo separator
24147
24148 tar tfv archive
24149 echo separator
24150 mkdir directory
24151 tar Cxf directory archive
24152 genfile --stat=name,size sparsefile
24153 cmp sparsefile directory/sparsefile
24154 )"
24155 echo sparse01.at:24 >"$at_check_line_file"
24156
24157 at_trace_this=
24158 if test -n "$at_traceon"; then
24159     echo 'Not enabling shell tracing (command contains an embedded newline)'
24160 fi
24161
24162 if test -n "$at_trace_this"; then
24163     ( $at_traceon;
24164 mkdir posix
24165 (cd posix
24166 TEST_TAR_FORMAT=posix
24167 export TEST_TAR_FORMAT
24168 TAR_OPTIONS="-H posix"
24169 export TAR_OPTIONS
24170 rm -rf *
24171
24172 genfile --length 1000 -f begin
24173 genfile --length 1000 -f end
24174 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24175 tar -c -f archive --sparse begin sparsefile end || exit 1
24176 echo separator
24177
24178 tar tfv archive
24179 echo separator
24180 mkdir directory
24181 tar Cxf directory archive
24182 genfile --stat=name,size sparsefile
24183 cmp sparsefile directory/sparsefile
24184 ) ) >"$at_stdout" 2>"$at_stder1"
24185     at_status=$?
24186     grep '^ *+' "$at_stder1" >&2
24187     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24188 else
24189     ( :;
24190 mkdir posix
24191 (cd posix
24192 TEST_TAR_FORMAT=posix
24193 export TEST_TAR_FORMAT
24194 TAR_OPTIONS="-H posix"
24195 export TAR_OPTIONS
24196 rm -rf *
24197
24198 genfile --length 1000 -f begin
24199 genfile --length 1000 -f end
24200 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24201 tar -c -f archive --sparse begin sparsefile end || exit 1
24202 echo separator
24203
24204 tar tfv archive
24205 echo separator
24206 mkdir directory
24207 tar Cxf directory archive
24208 genfile --stat=name,size sparsefile
24209 cmp sparsefile directory/sparsefile
24210 ) ) >"$at_stdout" 2>"$at_stderr"
24211     at_status=$?
24212 fi
24213
24214 at_failed=false
24215 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24216 echo stdout:; tee stdout <"$at_stdout"
24217 case $at_status in
24218    77) echo 77 > "$at_status_file"; exit 77;;
24219    0) ;;
24220    *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0"
24221       at_failed=:;;
24222 esac
24223 if $at_failed; then
24224
24225
24226   echo 1 > "$at_status_file"
24227   exit 1
24228 fi
24229
24230 $at_traceon
24231
24232               $at_traceoff
24233 echo "$at_srcdir/sparse01.at:24:
24234 mkdir gnu
24235 (cd gnu
24236 TEST_TAR_FORMAT=gnu
24237 export TEST_TAR_FORMAT
24238 TAR_OPTIONS=\"-H gnu\"
24239 export TAR_OPTIONS
24240 rm -rf *
24241
24242 genfile --length 1000 -f begin
24243 genfile --length 1000 -f end
24244 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24245 tar -c -f archive --sparse begin sparsefile end || exit 1
24246 echo separator
24247
24248 tar tfv archive
24249 echo separator
24250 mkdir directory
24251 tar Cxf directory archive
24252 genfile --stat=name,size sparsefile
24253 cmp sparsefile directory/sparsefile
24254 )"
24255 echo sparse01.at:24 >"$at_check_line_file"
24256
24257 at_trace_this=
24258 if test -n "$at_traceon"; then
24259     echo 'Not enabling shell tracing (command contains an embedded newline)'
24260 fi
24261
24262 if test -n "$at_trace_this"; then
24263     ( $at_traceon;
24264 mkdir gnu
24265 (cd gnu
24266 TEST_TAR_FORMAT=gnu
24267 export TEST_TAR_FORMAT
24268 TAR_OPTIONS="-H gnu"
24269 export TAR_OPTIONS
24270 rm -rf *
24271
24272 genfile --length 1000 -f begin
24273 genfile --length 1000 -f end
24274 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24275 tar -c -f archive --sparse begin sparsefile end || exit 1
24276 echo separator
24277
24278 tar tfv archive
24279 echo separator
24280 mkdir directory
24281 tar Cxf directory archive
24282 genfile --stat=name,size sparsefile
24283 cmp sparsefile directory/sparsefile
24284 ) ) >"$at_stdout" 2>"$at_stder1"
24285     at_status=$?
24286     grep '^ *+' "$at_stder1" >&2
24287     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24288 else
24289     ( :;
24290 mkdir gnu
24291 (cd gnu
24292 TEST_TAR_FORMAT=gnu
24293 export TEST_TAR_FORMAT
24294 TAR_OPTIONS="-H gnu"
24295 export TAR_OPTIONS
24296 rm -rf *
24297
24298 genfile --length 1000 -f begin
24299 genfile --length 1000 -f end
24300 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24301 tar -c -f archive --sparse begin sparsefile end || exit 1
24302 echo separator
24303
24304 tar tfv archive
24305 echo separator
24306 mkdir directory
24307 tar Cxf directory archive
24308 genfile --stat=name,size sparsefile
24309 cmp sparsefile directory/sparsefile
24310 ) ) >"$at_stdout" 2>"$at_stderr"
24311     at_status=$?
24312 fi
24313
24314 at_failed=false
24315 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24316 echo stdout:; tee stdout <"$at_stdout"
24317 case $at_status in
24318    77) echo 77 > "$at_status_file"; exit 77;;
24319    0) ;;
24320    *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0"
24321       at_failed=:;;
24322 esac
24323 if $at_failed; then
24324
24325
24326   echo 1 > "$at_status_file"
24327   exit 1
24328 fi
24329
24330 $at_traceon
24331
24332               $at_traceoff
24333 echo "$at_srcdir/sparse01.at:24:
24334 mkdir oldgnu
24335 (cd oldgnu
24336 TEST_TAR_FORMAT=oldgnu
24337 export TEST_TAR_FORMAT
24338 TAR_OPTIONS=\"-H oldgnu\"
24339 export TAR_OPTIONS
24340 rm -rf *
24341
24342 genfile --length 1000 -f begin
24343 genfile --length 1000 -f end
24344 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24345 tar -c -f archive --sparse begin sparsefile end || exit 1
24346 echo separator
24347
24348 tar tfv archive
24349 echo separator
24350 mkdir directory
24351 tar Cxf directory archive
24352 genfile --stat=name,size sparsefile
24353 cmp sparsefile directory/sparsefile
24354 )"
24355 echo sparse01.at:24 >"$at_check_line_file"
24356
24357 at_trace_this=
24358 if test -n "$at_traceon"; then
24359     echo 'Not enabling shell tracing (command contains an embedded newline)'
24360 fi
24361
24362 if test -n "$at_trace_this"; then
24363     ( $at_traceon;
24364 mkdir oldgnu
24365 (cd oldgnu
24366 TEST_TAR_FORMAT=oldgnu
24367 export TEST_TAR_FORMAT
24368 TAR_OPTIONS="-H oldgnu"
24369 export TAR_OPTIONS
24370 rm -rf *
24371
24372 genfile --length 1000 -f begin
24373 genfile --length 1000 -f end
24374 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24375 tar -c -f archive --sparse begin sparsefile end || exit 1
24376 echo separator
24377
24378 tar tfv archive
24379 echo separator
24380 mkdir directory
24381 tar Cxf directory archive
24382 genfile --stat=name,size sparsefile
24383 cmp sparsefile directory/sparsefile
24384 ) ) >"$at_stdout" 2>"$at_stder1"
24385     at_status=$?
24386     grep '^ *+' "$at_stder1" >&2
24387     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24388 else
24389     ( :;
24390 mkdir oldgnu
24391 (cd oldgnu
24392 TEST_TAR_FORMAT=oldgnu
24393 export TEST_TAR_FORMAT
24394 TAR_OPTIONS="-H oldgnu"
24395 export TAR_OPTIONS
24396 rm -rf *
24397
24398 genfile --length 1000 -f begin
24399 genfile --length 1000 -f end
24400 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24401 tar -c -f archive --sparse begin sparsefile end || exit 1
24402 echo separator
24403
24404 tar tfv archive
24405 echo separator
24406 mkdir directory
24407 tar Cxf directory archive
24408 genfile --stat=name,size sparsefile
24409 cmp sparsefile directory/sparsefile
24410 ) ) >"$at_stdout" 2>"$at_stderr"
24411     at_status=$?
24412 fi
24413
24414 at_failed=false
24415 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24416 echo stdout:; tee stdout <"$at_stdout"
24417 case $at_status in
24418    77) echo 77 > "$at_status_file"; exit 77;;
24419    0) ;;
24420    *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0"
24421       at_failed=:;;
24422 esac
24423 if $at_failed; then
24424
24425
24426   echo 1 > "$at_status_file"
24427   exit 1
24428 fi
24429
24430 $at_traceon
24431
24432
24433
24434
24435
24436 cat >stdout.re <<'_ATEOF'
24437 separator
24438 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
24439 -rw-r--r-- ^ ^ *  *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
24440 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
24441 separator
24442 sparsefile 10344448
24443 _ATEOF
24444
24445 awk '{print NR " " $0}' stdout > $$.1
24446 awk '{print NR " " $0}' stdout.re | join - $$.1 |
24447 while read NUM RE LINE
24448 do
24449   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
24450 done
24451
24452
24453       $at_traceoff
24454       $at_times_p && times >"$at_times_file"
24455     ) 5>&1 2>&1 | eval $at_tee_pipe
24456     at_status=`cat "$at_status_file"`
24457     ;;
24458
24459   58 ) # 58. sparse02.at:21: extracting sparse file over a pipe
24460     at_setup_line='sparse02.at:21'
24461     at_desc="extracting sparse file over a pipe"
24462     $at_quiet $ECHO_N " 58: extracting sparse file over a pipe             $ECHO_C"
24463     at_xfail=no
24464       test -f $XFAILFILE && at_xfail=yes
24465     echo "#                             -*- compilation -*-" >> "$at_group_log"
24466     (
24467       echo "58. sparse02.at:21: testing ..."
24468       $at_traceon
24469
24470
24471
24472 # Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe.
24473 # References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us>
24474 # http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html
24475
24476
24477
24478   $at_traceoff
24479 echo "$at_srcdir/sparse02.at:28:
24480 mkdir posix
24481 (cd posix
24482 TEST_TAR_FORMAT=posix
24483 export TEST_TAR_FORMAT
24484 TAR_OPTIONS=\"-H posix\"
24485 export TAR_OPTIONS
24486 rm -rf *
24487
24488 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24489 tar -c -f archive --sparse sparsefile || exit 1
24490 echo separator
24491
24492 tar xfO archive | cat - > sparsecopy || exit 1
24493 cmp sparsefile sparsecopy
24494 )"
24495 echo sparse02.at:28 >"$at_check_line_file"
24496
24497 at_trace_this=
24498 if test -n "$at_traceon"; then
24499     echo 'Not enabling shell tracing (command contains an embedded newline)'
24500 fi
24501
24502 if test -n "$at_trace_this"; then
24503     ( $at_traceon;
24504 mkdir posix
24505 (cd posix
24506 TEST_TAR_FORMAT=posix
24507 export TEST_TAR_FORMAT
24508 TAR_OPTIONS="-H posix"
24509 export TAR_OPTIONS
24510 rm -rf *
24511
24512 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24513 tar -c -f archive --sparse sparsefile || exit 1
24514 echo separator
24515
24516 tar xfO archive | cat - > sparsecopy || exit 1
24517 cmp sparsefile sparsecopy
24518 ) ) >"$at_stdout" 2>"$at_stder1"
24519     at_status=$?
24520     grep '^ *+' "$at_stder1" >&2
24521     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24522 else
24523     ( :;
24524 mkdir posix
24525 (cd posix
24526 TEST_TAR_FORMAT=posix
24527 export TEST_TAR_FORMAT
24528 TAR_OPTIONS="-H posix"
24529 export TAR_OPTIONS
24530 rm -rf *
24531
24532 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24533 tar -c -f archive --sparse sparsefile || exit 1
24534 echo separator
24535
24536 tar xfO archive | cat - > sparsecopy || exit 1
24537 cmp sparsefile sparsecopy
24538 ) ) >"$at_stdout" 2>"$at_stderr"
24539     at_status=$?
24540 fi
24541
24542 at_failed=false
24543 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24544 echo >>"$at_stdout"; echo "separator
24545 " | $at_diff - "$at_stdout" || at_failed=:
24546 case $at_status in
24547    77) echo 77 > "$at_status_file"; exit 77;;
24548    0) ;;
24549    *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0"
24550       at_failed=:;;
24551 esac
24552 if $at_failed; then
24553
24554
24555   echo 1 > "$at_status_file"
24556   exit 1
24557 fi
24558
24559 $at_traceon
24560
24561               $at_traceoff
24562 echo "$at_srcdir/sparse02.at:28:
24563 mkdir gnu
24564 (cd gnu
24565 TEST_TAR_FORMAT=gnu
24566 export TEST_TAR_FORMAT
24567 TAR_OPTIONS=\"-H gnu\"
24568 export TAR_OPTIONS
24569 rm -rf *
24570
24571 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24572 tar -c -f archive --sparse sparsefile || exit 1
24573 echo separator
24574
24575 tar xfO archive | cat - > sparsecopy || exit 1
24576 cmp sparsefile sparsecopy
24577 )"
24578 echo sparse02.at:28 >"$at_check_line_file"
24579
24580 at_trace_this=
24581 if test -n "$at_traceon"; then
24582     echo 'Not enabling shell tracing (command contains an embedded newline)'
24583 fi
24584
24585 if test -n "$at_trace_this"; then
24586     ( $at_traceon;
24587 mkdir gnu
24588 (cd gnu
24589 TEST_TAR_FORMAT=gnu
24590 export TEST_TAR_FORMAT
24591 TAR_OPTIONS="-H gnu"
24592 export TAR_OPTIONS
24593 rm -rf *
24594
24595 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24596 tar -c -f archive --sparse sparsefile || exit 1
24597 echo separator
24598
24599 tar xfO archive | cat - > sparsecopy || exit 1
24600 cmp sparsefile sparsecopy
24601 ) ) >"$at_stdout" 2>"$at_stder1"
24602     at_status=$?
24603     grep '^ *+' "$at_stder1" >&2
24604     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24605 else
24606     ( :;
24607 mkdir gnu
24608 (cd gnu
24609 TEST_TAR_FORMAT=gnu
24610 export TEST_TAR_FORMAT
24611 TAR_OPTIONS="-H gnu"
24612 export TAR_OPTIONS
24613 rm -rf *
24614
24615 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24616 tar -c -f archive --sparse sparsefile || exit 1
24617 echo separator
24618
24619 tar xfO archive | cat - > sparsecopy || exit 1
24620 cmp sparsefile sparsecopy
24621 ) ) >"$at_stdout" 2>"$at_stderr"
24622     at_status=$?
24623 fi
24624
24625 at_failed=false
24626 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24627 echo >>"$at_stdout"; echo "separator
24628 " | $at_diff - "$at_stdout" || at_failed=:
24629 case $at_status in
24630    77) echo 77 > "$at_status_file"; exit 77;;
24631    0) ;;
24632    *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0"
24633       at_failed=:;;
24634 esac
24635 if $at_failed; then
24636
24637
24638   echo 1 > "$at_status_file"
24639   exit 1
24640 fi
24641
24642 $at_traceon
24643
24644               $at_traceoff
24645 echo "$at_srcdir/sparse02.at:28:
24646 mkdir oldgnu
24647 (cd oldgnu
24648 TEST_TAR_FORMAT=oldgnu
24649 export TEST_TAR_FORMAT
24650 TAR_OPTIONS=\"-H oldgnu\"
24651 export TAR_OPTIONS
24652 rm -rf *
24653
24654 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24655 tar -c -f archive --sparse sparsefile || exit 1
24656 echo separator
24657
24658 tar xfO archive | cat - > sparsecopy || exit 1
24659 cmp sparsefile sparsecopy
24660 )"
24661 echo sparse02.at:28 >"$at_check_line_file"
24662
24663 at_trace_this=
24664 if test -n "$at_traceon"; then
24665     echo 'Not enabling shell tracing (command contains an embedded newline)'
24666 fi
24667
24668 if test -n "$at_trace_this"; then
24669     ( $at_traceon;
24670 mkdir oldgnu
24671 (cd oldgnu
24672 TEST_TAR_FORMAT=oldgnu
24673 export TEST_TAR_FORMAT
24674 TAR_OPTIONS="-H oldgnu"
24675 export TAR_OPTIONS
24676 rm -rf *
24677
24678 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24679 tar -c -f archive --sparse sparsefile || exit 1
24680 echo separator
24681
24682 tar xfO archive | cat - > sparsecopy || exit 1
24683 cmp sparsefile sparsecopy
24684 ) ) >"$at_stdout" 2>"$at_stder1"
24685     at_status=$?
24686     grep '^ *+' "$at_stder1" >&2
24687     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24688 else
24689     ( :;
24690 mkdir oldgnu
24691 (cd oldgnu
24692 TEST_TAR_FORMAT=oldgnu
24693 export TEST_TAR_FORMAT
24694 TAR_OPTIONS="-H oldgnu"
24695 export TAR_OPTIONS
24696 rm -rf *
24697
24698 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
24699 tar -c -f archive --sparse sparsefile || exit 1
24700 echo separator
24701
24702 tar xfO archive | cat - > sparsecopy || exit 1
24703 cmp sparsefile sparsecopy
24704 ) ) >"$at_stdout" 2>"$at_stderr"
24705     at_status=$?
24706 fi
24707
24708 at_failed=false
24709 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24710 echo >>"$at_stdout"; echo "separator
24711 " | $at_diff - "$at_stdout" || at_failed=:
24712 case $at_status in
24713    77) echo 77 > "$at_status_file"; exit 77;;
24714    0) ;;
24715    *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0"
24716       at_failed=:;;
24717 esac
24718 if $at_failed; then
24719
24720
24721   echo 1 > "$at_status_file"
24722   exit 1
24723 fi
24724
24725 $at_traceon
24726
24727
24728
24729
24730       $at_traceoff
24731       $at_times_p && times >"$at_times_file"
24732     ) 5>&1 2>&1 | eval $at_tee_pipe
24733     at_status=`cat "$at_status_file"`
24734     ;;
24735
24736   59 ) # 59. sparse03.at:21: storing sparse files > 8G
24737     at_setup_line='sparse03.at:21'
24738     at_desc="storing sparse files > 8G"
24739     $at_quiet $ECHO_N " 59: storing sparse files > 8G                      $ECHO_C"
24740     at_xfail=no
24741       test -f $XFAILFILE && at_xfail=yes
24742     echo "#                             -*- compilation -*-" >> "$at_group_log"
24743     (
24744       echo "59. sparse03.at:21: testing ..."
24745       $at_traceon
24746
24747
24748
24749 # Tar 1.15.1 incorrectly computed sparse member size if the extended
24750 # PAX header contained size keyword.
24751 # References: <87vf46nb36.fsf@penguin.cs.ucla.edu>
24752 # http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
24753
24754
24755
24756   $at_traceoff
24757 echo "$at_srcdir/sparse03.at:29:
24758 mkdir posix
24759 (cd posix
24760 TEST_TAR_FORMAT=posix
24761 export TEST_TAR_FORMAT
24762 TAR_OPTIONS=\"-H posix\"
24763 export TAR_OPTIONS
24764 rm -rf *
24765
24766 genfile --length 1000 --file begin
24767 genfile --length 1000 --file end
24768 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
24769 tar -c -f archive --sparse begin sparsefile end || exit 1
24770 echo separator
24771
24772 tar tfv archive
24773 echo separator
24774 mkdir directory
24775 tar Cxf directory archive
24776 genfile --stat=name,size sparsefile
24777 cmp sparsefile directory/sparsefile
24778 )"
24779 echo sparse03.at:29 >"$at_check_line_file"
24780
24781 at_trace_this=
24782 if test -n "$at_traceon"; then
24783     echo 'Not enabling shell tracing (command contains an embedded newline)'
24784 fi
24785
24786 if test -n "$at_trace_this"; then
24787     ( $at_traceon;
24788 mkdir posix
24789 (cd posix
24790 TEST_TAR_FORMAT=posix
24791 export TEST_TAR_FORMAT
24792 TAR_OPTIONS="-H posix"
24793 export TAR_OPTIONS
24794 rm -rf *
24795
24796 genfile --length 1000 --file begin
24797 genfile --length 1000 --file end
24798 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
24799 tar -c -f archive --sparse begin sparsefile end || exit 1
24800 echo separator
24801
24802 tar tfv archive
24803 echo separator
24804 mkdir directory
24805 tar Cxf directory archive
24806 genfile --stat=name,size sparsefile
24807 cmp sparsefile directory/sparsefile
24808 ) ) >"$at_stdout" 2>"$at_stder1"
24809     at_status=$?
24810     grep '^ *+' "$at_stder1" >&2
24811     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24812 else
24813     ( :;
24814 mkdir posix
24815 (cd posix
24816 TEST_TAR_FORMAT=posix
24817 export TEST_TAR_FORMAT
24818 TAR_OPTIONS="-H posix"
24819 export TAR_OPTIONS
24820 rm -rf *
24821
24822 genfile --length 1000 --file begin
24823 genfile --length 1000 --file end
24824 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
24825 tar -c -f archive --sparse begin sparsefile end || exit 1
24826 echo separator
24827
24828 tar tfv archive
24829 echo separator
24830 mkdir directory
24831 tar Cxf directory archive
24832 genfile --stat=name,size sparsefile
24833 cmp sparsefile directory/sparsefile
24834 ) ) >"$at_stdout" 2>"$at_stderr"
24835     at_status=$?
24836 fi
24837
24838 at_failed=false
24839 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24840 echo stdout:; tee stdout <"$at_stdout"
24841 case $at_status in
24842    77) echo 77 > "$at_status_file"; exit 77;;
24843    0) ;;
24844    *) echo "$at_srcdir/sparse03.at:29: exit code was $at_status, expected 0"
24845       at_failed=:;;
24846 esac
24847 if $at_failed; then
24848
24849
24850   echo 1 > "$at_status_file"
24851   exit 1
24852 fi
24853
24854 $at_traceon
24855
24856
24857
24858
24859
24860 cat >stdout.re <<'_ATEOF'
24861 separator
24862 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
24863 -rw-r--r-- ^ ^ *  *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
24864 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
24865 separator
24866 sparsefile 8589935104
24867 _ATEOF
24868
24869 awk '{print NR " " $0}' stdout > $$.1
24870 awk '{print NR " " $0}' stdout.re | join - $$.1 |
24871 while read NUM RE LINE
24872 do
24873   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
24874 done
24875
24876
24877       $at_traceoff
24878       $at_times_p && times >"$at_times_file"
24879     ) 5>&1 2>&1 | eval $at_tee_pipe
24880     at_status=`cat "$at_status_file"`
24881     ;;
24882
24883   60 ) # 60. sparsemv.at:21: sparse files in MV archives
24884     at_setup_line='sparsemv.at:21'
24885     at_desc="sparse files in MV archives"
24886     $at_quiet $ECHO_N " 60: sparse files in MV archives                    $ECHO_C"
24887     at_xfail=no
24888       test -f $XFAILFILE && at_xfail=yes
24889     echo "#                             -*- compilation -*-" >> "$at_group_log"
24890     (
24891       echo "60. sparsemv.at:21: testing ..."
24892       $at_traceon
24893
24894
24895
24896 # Check if sparse files are correctly split between GNU multi-volume
24897 # archives.
24898 # There are two cases: the file can be split within an empty (null) block,
24899 # or within a data block. Since null blocks are not archived, the first
24900 # case means the file is split between two consecutive data blocks.
24901 #
24902
24903
24904
24905   $at_traceoff
24906 echo "$at_srcdir/sparsemv.at:31:
24907 mkdir gnu
24908 (cd gnu
24909 TEST_TAR_FORMAT=gnu
24910 export TEST_TAR_FORMAT
24911 TAR_OPTIONS=\"-H gnu\"
24912 export TAR_OPTIONS
24913 rm -rf *
24914
24915 exec <&-
24916 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
24917 echo \"Pass 1: Split between data blocks\"
24918 echo \"Create archive\"
24919 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
24920 echo \"Test archive\"
24921 tar --record-size=512 -t -M -f arc.1 -f arc.2
24922 echo \"Compare archive\"
24923 tar --record-size=512 -d -M -f arc.1 -f arc.2
24924
24925 echo \"Pass 2: Split within a data block\"
24926 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
24927 echo \"Create archive\"
24928 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
24929 echo \"Test archive\"
24930 tar --record-size=512 -t -M -f arc.1 -f arc.2
24931 echo \"Compare archive\"
24932 tar --record-size=512 -d -M -f arc.1 -f arc.2
24933 )"
24934 echo sparsemv.at:31 >"$at_check_line_file"
24935
24936 at_trace_this=
24937 if test -n "$at_traceon"; then
24938     echo 'Not enabling shell tracing (command contains an embedded newline)'
24939 fi
24940
24941 if test -n "$at_trace_this"; then
24942     ( $at_traceon;
24943 mkdir gnu
24944 (cd gnu
24945 TEST_TAR_FORMAT=gnu
24946 export TEST_TAR_FORMAT
24947 TAR_OPTIONS="-H gnu"
24948 export TAR_OPTIONS
24949 rm -rf *
24950
24951 exec <&-
24952 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
24953 echo "Pass 1: Split between data blocks"
24954 echo "Create archive"
24955 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
24956 echo "Test archive"
24957 tar --record-size=512 -t -M -f arc.1 -f arc.2
24958 echo "Compare archive"
24959 tar --record-size=512 -d -M -f arc.1 -f arc.2
24960
24961 echo "Pass 2: Split within a data block"
24962 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
24963 echo "Create archive"
24964 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
24965 echo "Test archive"
24966 tar --record-size=512 -t -M -f arc.1 -f arc.2
24967 echo "Compare archive"
24968 tar --record-size=512 -d -M -f arc.1 -f arc.2
24969 ) ) >"$at_stdout" 2>"$at_stder1"
24970     at_status=$?
24971     grep '^ *+' "$at_stder1" >&2
24972     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24973 else
24974     ( :;
24975 mkdir gnu
24976 (cd gnu
24977 TEST_TAR_FORMAT=gnu
24978 export TEST_TAR_FORMAT
24979 TAR_OPTIONS="-H gnu"
24980 export TAR_OPTIONS
24981 rm -rf *
24982
24983 exec <&-
24984 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
24985 echo "Pass 1: Split between data blocks"
24986 echo "Create archive"
24987 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
24988 echo "Test archive"
24989 tar --record-size=512 -t -M -f arc.1 -f arc.2
24990 echo "Compare archive"
24991 tar --record-size=512 -d -M -f arc.1 -f arc.2
24992
24993 echo "Pass 2: Split within a data block"
24994 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
24995 echo "Create archive"
24996 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
24997 echo "Test archive"
24998 tar --record-size=512 -t -M -f arc.1 -f arc.2
24999 echo "Compare archive"
25000 tar --record-size=512 -d -M -f arc.1 -f arc.2
25001 ) ) >"$at_stdout" 2>"$at_stderr"
25002     at_status=$?
25003 fi
25004
25005 at_failed=false
25006 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25007 echo >>"$at_stdout"; echo "Pass 1: Split between data blocks
25008 Create archive
25009 Test archive
25010 sparsefile
25011 Compare archive
25012 Pass 2: Split within a data block
25013 Create archive
25014 Test archive
25015 sparsefile
25016 Compare archive
25017 " | $at_diff - "$at_stdout" || at_failed=:
25018 case $at_status in
25019    77) echo 77 > "$at_status_file"; exit 77;;
25020    0) ;;
25021    *) echo "$at_srcdir/sparsemv.at:31: exit code was $at_status, expected 0"
25022       at_failed=:;;
25023 esac
25024 if $at_failed; then
25025
25026
25027   echo 1 > "$at_status_file"
25028   exit 1
25029 fi
25030
25031 $at_traceon
25032
25033               $at_traceoff
25034 echo "$at_srcdir/sparsemv.at:31:
25035 mkdir oldgnu
25036 (cd oldgnu
25037 TEST_TAR_FORMAT=oldgnu
25038 export TEST_TAR_FORMAT
25039 TAR_OPTIONS=\"-H oldgnu\"
25040 export TAR_OPTIONS
25041 rm -rf *
25042
25043 exec <&-
25044 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
25045 echo \"Pass 1: Split between data blocks\"
25046 echo \"Create archive\"
25047 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
25048 echo \"Test archive\"
25049 tar --record-size=512 -t -M -f arc.1 -f arc.2
25050 echo \"Compare archive\"
25051 tar --record-size=512 -d -M -f arc.1 -f arc.2
25052
25053 echo \"Pass 2: Split within a data block\"
25054 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
25055 echo \"Create archive\"
25056 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
25057 echo \"Test archive\"
25058 tar --record-size=512 -t -M -f arc.1 -f arc.2
25059 echo \"Compare archive\"
25060 tar --record-size=512 -d -M -f arc.1 -f arc.2
25061 )"
25062 echo sparsemv.at:31 >"$at_check_line_file"
25063
25064 at_trace_this=
25065 if test -n "$at_traceon"; then
25066     echo 'Not enabling shell tracing (command contains an embedded newline)'
25067 fi
25068
25069 if test -n "$at_trace_this"; then
25070     ( $at_traceon;
25071 mkdir oldgnu
25072 (cd oldgnu
25073 TEST_TAR_FORMAT=oldgnu
25074 export TEST_TAR_FORMAT
25075 TAR_OPTIONS="-H oldgnu"
25076 export TAR_OPTIONS
25077 rm -rf *
25078
25079 exec <&-
25080 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
25081 echo "Pass 1: Split between data blocks"
25082 echo "Create archive"
25083 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
25084 echo "Test archive"
25085 tar --record-size=512 -t -M -f arc.1 -f arc.2
25086 echo "Compare archive"
25087 tar --record-size=512 -d -M -f arc.1 -f arc.2
25088
25089 echo "Pass 2: Split within a data block"
25090 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
25091 echo "Create archive"
25092 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
25093 echo "Test archive"
25094 tar --record-size=512 -t -M -f arc.1 -f arc.2
25095 echo "Compare archive"
25096 tar --record-size=512 -d -M -f arc.1 -f arc.2
25097 ) ) >"$at_stdout" 2>"$at_stder1"
25098     at_status=$?
25099     grep '^ *+' "$at_stder1" >&2
25100     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25101 else
25102     ( :;
25103 mkdir oldgnu
25104 (cd oldgnu
25105 TEST_TAR_FORMAT=oldgnu
25106 export TEST_TAR_FORMAT
25107 TAR_OPTIONS="-H oldgnu"
25108 export TAR_OPTIONS
25109 rm -rf *
25110
25111 exec <&-
25112 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
25113 echo "Pass 1: Split between data blocks"
25114 echo "Create archive"
25115 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
25116 echo "Test archive"
25117 tar --record-size=512 -t -M -f arc.1 -f arc.2
25118 echo "Compare archive"
25119 tar --record-size=512 -d -M -f arc.1 -f arc.2
25120
25121 echo "Pass 2: Split within a data block"
25122 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
25123 echo "Create archive"
25124 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
25125 echo "Test archive"
25126 tar --record-size=512 -t -M -f arc.1 -f arc.2
25127 echo "Compare archive"
25128 tar --record-size=512 -d -M -f arc.1 -f arc.2
25129 ) ) >"$at_stdout" 2>"$at_stderr"
25130     at_status=$?
25131 fi
25132
25133 at_failed=false
25134 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25135 echo >>"$at_stdout"; echo "Pass 1: Split between data blocks
25136 Create archive
25137 Test archive
25138 sparsefile
25139 Compare archive
25140 Pass 2: Split within a data block
25141 Create archive
25142 Test archive
25143 sparsefile
25144 Compare archive
25145 " | $at_diff - "$at_stdout" || at_failed=:
25146 case $at_status in
25147    77) echo 77 > "$at_status_file"; exit 77;;
25148    0) ;;
25149    *) echo "$at_srcdir/sparsemv.at:31: exit code was $at_status, expected 0"
25150       at_failed=:;;
25151 esac
25152 if $at_failed; then
25153
25154
25155   echo 1 > "$at_status_file"
25156   exit 1
25157 fi
25158
25159 $at_traceon
25160
25161
25162
25163
25164       $at_traceoff
25165       $at_times_p && times >"$at_times_file"
25166     ) 5>&1 2>&1 | eval $at_tee_pipe
25167     at_status=`cat "$at_status_file"`
25168     ;;
25169
25170   61 ) # 61. spmvp00.at:21: sparse files in PAX MV archives, v.0.0
25171     at_setup_line='spmvp00.at:21'
25172     at_desc="sparse files in PAX MV archives, v.0.0"
25173     $at_quiet $ECHO_N " 61: sparse files in PAX MV archives, v.0.0         $ECHO_C"
25174     at_xfail=no
25175       test -f $XFAILFILE && at_xfail=yes
25176     echo "#                             -*- compilation -*-" >> "$at_group_log"
25177     (
25178       echo "61. spmvp00.at:21: testing ..."
25179       $at_traceon
25180
25181
25182
25183
25184
25185
25186   $at_traceoff
25187 echo "$at_srcdir/spmvp00.at:24:
25188 mkdir pax
25189 (cd pax
25190 TEST_TAR_FORMAT=pax
25191 export TEST_TAR_FORMAT
25192 TAR_OPTIONS=\"-H pax\"
25193 export TAR_OPTIONS
25194 rm -rf *
25195
25196 exec <&-
25197 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
25198 echo \"Pass 1: Split between data blocks\"
25199 echo \"Create archive\"
25200 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25201 echo \"Test archive\"
25202 tar -t -M -f arc.1 -f arc.2 -f arc.3
25203 echo \"Compare archive\"
25204 tar -d -M -f arc.1 -f arc.2 -f arc.3
25205
25206 echo \"Pass 2: Split within a data block\"
25207 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
25208 echo \"Create archive\"
25209 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25210 echo \"Test archive\"
25211 tar -t -M -f arc.1 -f arc.2 -f arc.3
25212 echo \"Compare archive\"
25213 tar -d -M -f arc.1 -f arc.2 -f arc.3
25214 )"
25215 echo spmvp00.at:24 >"$at_check_line_file"
25216
25217 at_trace_this=
25218 if test -n "$at_traceon"; then
25219     echo 'Not enabling shell tracing (command contains an embedded newline)'
25220 fi
25221
25222 if test -n "$at_trace_this"; then
25223     ( $at_traceon;
25224 mkdir pax
25225 (cd pax
25226 TEST_TAR_FORMAT=pax
25227 export TEST_TAR_FORMAT
25228 TAR_OPTIONS="-H pax"
25229 export TAR_OPTIONS
25230 rm -rf *
25231
25232 exec <&-
25233 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
25234 echo "Pass 1: Split between data blocks"
25235 echo "Create archive"
25236 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25237 echo "Test archive"
25238 tar -t -M -f arc.1 -f arc.2 -f arc.3
25239 echo "Compare archive"
25240 tar -d -M -f arc.1 -f arc.2 -f arc.3
25241
25242 echo "Pass 2: Split within a data block"
25243 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
25244 echo "Create archive"
25245 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25246 echo "Test archive"
25247 tar -t -M -f arc.1 -f arc.2 -f arc.3
25248 echo "Compare archive"
25249 tar -d -M -f arc.1 -f arc.2 -f arc.3
25250 ) ) >"$at_stdout" 2>"$at_stder1"
25251     at_status=$?
25252     grep '^ *+' "$at_stder1" >&2
25253     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25254 else
25255     ( :;
25256 mkdir pax
25257 (cd pax
25258 TEST_TAR_FORMAT=pax
25259 export TEST_TAR_FORMAT
25260 TAR_OPTIONS="-H pax"
25261 export TAR_OPTIONS
25262 rm -rf *
25263
25264 exec <&-
25265 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
25266 echo "Pass 1: Split between data blocks"
25267 echo "Create archive"
25268 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25269 echo "Test archive"
25270 tar -t -M -f arc.1 -f arc.2 -f arc.3
25271 echo "Compare archive"
25272 tar -d -M -f arc.1 -f arc.2 -f arc.3
25273
25274 echo "Pass 2: Split within a data block"
25275 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
25276 echo "Create archive"
25277 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25278 echo "Test archive"
25279 tar -t -M -f arc.1 -f arc.2 -f arc.3
25280 echo "Compare archive"
25281 tar -d -M -f arc.1 -f arc.2 -f arc.3
25282 ) ) >"$at_stdout" 2>"$at_stderr"
25283     at_status=$?
25284 fi
25285
25286 at_failed=false
25287 echo >>"$at_stderr"; echo "tar: Record size = 12 blocks
25288 tar: Record size = 12 blocks
25289 " | $at_diff - "$at_stderr" || at_failed=:
25290 echo >>"$at_stdout"; echo "Pass 1: Split between data blocks
25291 Create archive
25292 Test archive
25293 sparsefile
25294 Compare archive
25295 Pass 2: Split within a data block
25296 Create archive
25297 Test archive
25298 sparsefile
25299 Compare archive
25300 " | $at_diff - "$at_stdout" || at_failed=:
25301 case $at_status in
25302    77) echo 77 > "$at_status_file"; exit 77;;
25303    0) ;;
25304    *) echo "$at_srcdir/spmvp00.at:24: exit code was $at_status, expected 0"
25305       at_failed=:;;
25306 esac
25307 if $at_failed; then
25308
25309
25310   echo 1 > "$at_status_file"
25311   exit 1
25312 fi
25313
25314 $at_traceon
25315
25316
25317
25318
25319       $at_traceoff
25320       $at_times_p && times >"$at_times_file"
25321     ) 5>&1 2>&1 | eval $at_tee_pipe
25322     at_status=`cat "$at_status_file"`
25323     ;;
25324
25325   62 ) # 62. spmvp01.at:21: sparse files in PAX MV archives, v.0.1
25326     at_setup_line='spmvp01.at:21'
25327     at_desc="sparse files in PAX MV archives, v.0.1"
25328     $at_quiet $ECHO_N " 62: sparse files in PAX MV archives, v.0.1         $ECHO_C"
25329     at_xfail=no
25330       test -f $XFAILFILE && at_xfail=yes
25331     echo "#                             -*- compilation -*-" >> "$at_group_log"
25332     (
25333       echo "62. spmvp01.at:21: testing ..."
25334       $at_traceon
25335
25336
25337
25338
25339
25340
25341   $at_traceoff
25342 echo "$at_srcdir/spmvp01.at:24:
25343 mkdir pax
25344 (cd pax
25345 TEST_TAR_FORMAT=pax
25346 export TEST_TAR_FORMAT
25347 TAR_OPTIONS=\"-H pax\"
25348 export TAR_OPTIONS
25349 rm -rf *
25350
25351 exec <&-
25352 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
25353 echo \"Pass 1: Split between data blocks\"
25354 echo \"Create archive\"
25355 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25356 echo \"Test archive\"
25357 tar -t -M -f arc.1 -f arc.2 -f arc.3
25358 echo \"Compare archive\"
25359 tar -d -M -f arc.1 -f arc.2 -f arc.3
25360
25361 echo \"Pass 2: Split within a data block\"
25362 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
25363 echo \"Create archive\"
25364 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25365 echo \"Test archive\"
25366 tar -t -M -f arc.1 -f arc.2 -f arc.3
25367 echo \"Compare archive\"
25368 tar -d -M -f arc.1 -f arc.2 -f arc.3
25369 )"
25370 echo spmvp01.at:24 >"$at_check_line_file"
25371
25372 at_trace_this=
25373 if test -n "$at_traceon"; then
25374     echo 'Not enabling shell tracing (command contains an embedded newline)'
25375 fi
25376
25377 if test -n "$at_trace_this"; then
25378     ( $at_traceon;
25379 mkdir pax
25380 (cd pax
25381 TEST_TAR_FORMAT=pax
25382 export TEST_TAR_FORMAT
25383 TAR_OPTIONS="-H pax"
25384 export TAR_OPTIONS
25385 rm -rf *
25386
25387 exec <&-
25388 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
25389 echo "Pass 1: Split between data blocks"
25390 echo "Create archive"
25391 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25392 echo "Test archive"
25393 tar -t -M -f arc.1 -f arc.2 -f arc.3
25394 echo "Compare archive"
25395 tar -d -M -f arc.1 -f arc.2 -f arc.3
25396
25397 echo "Pass 2: Split within a data block"
25398 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
25399 echo "Create archive"
25400 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25401 echo "Test archive"
25402 tar -t -M -f arc.1 -f arc.2 -f arc.3
25403 echo "Compare archive"
25404 tar -d -M -f arc.1 -f arc.2 -f arc.3
25405 ) ) >"$at_stdout" 2>"$at_stder1"
25406     at_status=$?
25407     grep '^ *+' "$at_stder1" >&2
25408     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25409 else
25410     ( :;
25411 mkdir pax
25412 (cd pax
25413 TEST_TAR_FORMAT=pax
25414 export TEST_TAR_FORMAT
25415 TAR_OPTIONS="-H pax"
25416 export TAR_OPTIONS
25417 rm -rf *
25418
25419 exec <&-
25420 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
25421 echo "Pass 1: Split between data blocks"
25422 echo "Create archive"
25423 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25424 echo "Test archive"
25425 tar -t -M -f arc.1 -f arc.2 -f arc.3
25426 echo "Compare archive"
25427 tar -d -M -f arc.1 -f arc.2 -f arc.3
25428
25429 echo "Pass 2: Split within a data block"
25430 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
25431 echo "Create archive"
25432 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25433 echo "Test archive"
25434 tar -t -M -f arc.1 -f arc.2 -f arc.3
25435 echo "Compare archive"
25436 tar -d -M -f arc.1 -f arc.2 -f arc.3
25437 ) ) >"$at_stdout" 2>"$at_stderr"
25438     at_status=$?
25439 fi
25440
25441 at_failed=false
25442 echo >>"$at_stderr"; echo "tar: Record size = 12 blocks
25443 tar: Record size = 12 blocks
25444 " | $at_diff - "$at_stderr" || at_failed=:
25445 echo >>"$at_stdout"; echo "Pass 1: Split between data blocks
25446 Create archive
25447 Test archive
25448 sparsefile
25449 Compare archive
25450 Pass 2: Split within a data block
25451 Create archive
25452 Test archive
25453 sparsefile
25454 Compare archive
25455 " | $at_diff - "$at_stdout" || at_failed=:
25456 case $at_status in
25457    77) echo 77 > "$at_status_file"; exit 77;;
25458    0) ;;
25459    *) echo "$at_srcdir/spmvp01.at:24: exit code was $at_status, expected 0"
25460       at_failed=:;;
25461 esac
25462 if $at_failed; then
25463
25464
25465   echo 1 > "$at_status_file"
25466   exit 1
25467 fi
25468
25469 $at_traceon
25470
25471
25472
25473
25474       $at_traceoff
25475       $at_times_p && times >"$at_times_file"
25476     ) 5>&1 2>&1 | eval $at_tee_pipe
25477     at_status=`cat "$at_status_file"`
25478     ;;
25479
25480   63 ) # 63. spmvp10.at:21: sparse files in PAX MV archives, v.1.0
25481     at_setup_line='spmvp10.at:21'
25482     at_desc="sparse files in PAX MV archives, v.1.0"
25483     $at_quiet $ECHO_N " 63: sparse files in PAX MV archives, v.1.0         $ECHO_C"
25484     at_xfail=no
25485       test -f $XFAILFILE && at_xfail=yes
25486     echo "#                             -*- compilation -*-" >> "$at_group_log"
25487     (
25488       echo "63. spmvp10.at:21: testing ..."
25489       $at_traceon
25490
25491
25492
25493
25494
25495
25496   $at_traceoff
25497 echo "$at_srcdir/spmvp10.at:24:
25498 mkdir pax
25499 (cd pax
25500 TEST_TAR_FORMAT=pax
25501 export TEST_TAR_FORMAT
25502 TAR_OPTIONS=\"-H pax\"
25503 export TAR_OPTIONS
25504 rm -rf *
25505
25506 exec <&-
25507 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
25508 echo \"Pass 1: Split between data blocks\"
25509 echo \"Create archive\"
25510 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25511 echo \"Test archive\"
25512 tar -t -M -f arc.1 -f arc.2 -f arc.3
25513 echo \"Compare archive\"
25514 tar -d -M -f arc.1 -f arc.2 -f arc.3
25515
25516 echo \"Pass 2: Split within a data block\"
25517 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
25518 echo \"Create archive\"
25519 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25520 echo \"Test archive\"
25521 tar -t -M -f arc.1 -f arc.2 -f arc.3
25522 echo \"Compare archive\"
25523 tar -d -M -f arc.1 -f arc.2 -f arc.3
25524 )"
25525 echo spmvp10.at:24 >"$at_check_line_file"
25526
25527 at_trace_this=
25528 if test -n "$at_traceon"; then
25529     echo 'Not enabling shell tracing (command contains an embedded newline)'
25530 fi
25531
25532 if test -n "$at_trace_this"; then
25533     ( $at_traceon;
25534 mkdir pax
25535 (cd pax
25536 TEST_TAR_FORMAT=pax
25537 export TEST_TAR_FORMAT
25538 TAR_OPTIONS="-H pax"
25539 export TAR_OPTIONS
25540 rm -rf *
25541
25542 exec <&-
25543 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
25544 echo "Pass 1: Split between data blocks"
25545 echo "Create archive"
25546 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25547 echo "Test archive"
25548 tar -t -M -f arc.1 -f arc.2 -f arc.3
25549 echo "Compare archive"
25550 tar -d -M -f arc.1 -f arc.2 -f arc.3
25551
25552 echo "Pass 2: Split within a data block"
25553 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
25554 echo "Create archive"
25555 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25556 echo "Test archive"
25557 tar -t -M -f arc.1 -f arc.2 -f arc.3
25558 echo "Compare archive"
25559 tar -d -M -f arc.1 -f arc.2 -f arc.3
25560 ) ) >"$at_stdout" 2>"$at_stder1"
25561     at_status=$?
25562     grep '^ *+' "$at_stder1" >&2
25563     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25564 else
25565     ( :;
25566 mkdir pax
25567 (cd pax
25568 TEST_TAR_FORMAT=pax
25569 export TEST_TAR_FORMAT
25570 TAR_OPTIONS="-H pax"
25571 export TAR_OPTIONS
25572 rm -rf *
25573
25574 exec <&-
25575 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
25576 echo "Pass 1: Split between data blocks"
25577 echo "Create archive"
25578 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25579 echo "Test archive"
25580 tar -t -M -f arc.1 -f arc.2 -f arc.3
25581 echo "Compare archive"
25582 tar -d -M -f arc.1 -f arc.2 -f arc.3
25583
25584 echo "Pass 2: Split within a data block"
25585 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
25586 echo "Create archive"
25587 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
25588 echo "Test archive"
25589 tar -t -M -f arc.1 -f arc.2 -f arc.3
25590 echo "Compare archive"
25591 tar -d -M -f arc.1 -f arc.2 -f arc.3
25592 ) ) >"$at_stdout" 2>"$at_stderr"
25593     at_status=$?
25594 fi
25595
25596 at_failed=false
25597 echo >>"$at_stderr"; echo "tar: Record size = 12 blocks
25598 tar: Record size = 12 blocks
25599 " | $at_diff - "$at_stderr" || at_failed=:
25600 echo >>"$at_stdout"; echo "Pass 1: Split between data blocks
25601 Create archive
25602 Test archive
25603 sparsefile
25604 Compare archive
25605 Pass 2: Split within a data block
25606 Create archive
25607 Test archive
25608 sparsefile
25609 Compare archive
25610 " | $at_diff - "$at_stdout" || at_failed=:
25611 case $at_status in
25612    77) echo 77 > "$at_status_file"; exit 77;;
25613    0) ;;
25614    *) echo "$at_srcdir/spmvp10.at:24: exit code was $at_status, expected 0"
25615       at_failed=:;;
25616 esac
25617 if $at_failed; then
25618
25619
25620   echo 1 > "$at_status_file"
25621   exit 1
25622 fi
25623
25624 $at_traceon
25625
25626
25627
25628
25629       $at_traceoff
25630       $at_times_p && times >"$at_times_file"
25631     ) 5>&1 2>&1 | eval $at_tee_pipe
25632     at_status=`cat "$at_status_file"`
25633     ;;
25634
25635   64 ) # 64. update.at:27: update unchanged directories
25636     at_setup_line='update.at:27'
25637     at_desc="update unchanged directories"
25638     $at_quiet $ECHO_N " 64: update unchanged directories                   $ECHO_C"
25639     at_xfail=no
25640       test -f $XFAILFILE && at_xfail=yes
25641     echo "#                             -*- compilation -*-" >> "$at_group_log"
25642     (
25643       echo "64. update.at:27: testing ..."
25644       $at_traceon
25645
25646
25647
25648
25649
25650   $at_traceoff
25651 echo "$at_srcdir/update.at:30:
25652 mkdir v7
25653 (cd v7
25654 TEST_TAR_FORMAT=v7
25655 export TEST_TAR_FORMAT
25656 TAR_OPTIONS=\"-H v7\"
25657 export TAR_OPTIONS
25658 rm -rf *
25659
25660
25661 test -z "`sort < /dev/null 2>&1`" || exit 77
25662
25663 mkdir directory
25664 genfile --length 10240 --pattern zeros --file directory/file1
25665 genfile --length 10240 --pattern default --file directory/file2
25666
25667 tar cf archive directory || exit 1
25668 echo separator
25669 tar uf archive directory || exit 1
25670 echo separator
25671 tar tf archive | sort || exit 1
25672 )"
25673 echo update.at:30 >"$at_check_line_file"
25674
25675 at_trace_this=
25676 if test -n "$at_traceon"; then
25677     echo 'Not enabling shell tracing (command contains an embedded newline)'
25678 fi
25679
25680 if test -n "$at_trace_this"; then
25681     ( $at_traceon;
25682 mkdir v7
25683 (cd v7
25684 TEST_TAR_FORMAT=v7
25685 export TEST_TAR_FORMAT
25686 TAR_OPTIONS="-H v7"
25687 export TAR_OPTIONS
25688 rm -rf *
25689
25690
25691 test -z "`sort < /dev/null 2>&1`" || exit 77
25692
25693 mkdir directory
25694 genfile --length 10240 --pattern zeros --file directory/file1
25695 genfile --length 10240 --pattern default --file directory/file2
25696
25697 tar cf archive directory || exit 1
25698 echo separator
25699 tar uf archive directory || exit 1
25700 echo separator
25701 tar tf archive | sort || exit 1
25702 ) ) >"$at_stdout" 2>"$at_stder1"
25703     at_status=$?
25704     grep '^ *+' "$at_stder1" >&2
25705     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25706 else
25707     ( :;
25708 mkdir v7
25709 (cd v7
25710 TEST_TAR_FORMAT=v7
25711 export TEST_TAR_FORMAT
25712 TAR_OPTIONS="-H v7"
25713 export TAR_OPTIONS
25714 rm -rf *
25715
25716
25717 test -z "`sort < /dev/null 2>&1`" || exit 77
25718
25719 mkdir directory
25720 genfile --length 10240 --pattern zeros --file directory/file1
25721 genfile --length 10240 --pattern default --file directory/file2
25722
25723 tar cf archive directory || exit 1
25724 echo separator
25725 tar uf archive directory || exit 1
25726 echo separator
25727 tar tf archive | sort || exit 1
25728 ) ) >"$at_stdout" 2>"$at_stderr"
25729     at_status=$?
25730 fi
25731
25732 at_failed=false
25733 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25734 echo >>"$at_stdout"; echo "separator
25735 separator
25736 directory/
25737 directory/file1
25738 directory/file2
25739 " | $at_diff - "$at_stdout" || at_failed=:
25740 case $at_status in
25741    77) echo 77 > "$at_status_file"; exit 77;;
25742    0) ;;
25743    *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
25744       at_failed=:;;
25745 esac
25746 if $at_failed; then
25747
25748
25749   echo 1 > "$at_status_file"
25750   exit 1
25751 fi
25752
25753 $at_traceon
25754
25755               $at_traceoff
25756 echo "$at_srcdir/update.at:30:
25757 mkdir oldgnu
25758 (cd oldgnu
25759 TEST_TAR_FORMAT=oldgnu
25760 export TEST_TAR_FORMAT
25761 TAR_OPTIONS=\"-H oldgnu\"
25762 export TAR_OPTIONS
25763 rm -rf *
25764
25765
25766 test -z "`sort < /dev/null 2>&1`" || exit 77
25767
25768 mkdir directory
25769 genfile --length 10240 --pattern zeros --file directory/file1
25770 genfile --length 10240 --pattern default --file directory/file2
25771
25772 tar cf archive directory || exit 1
25773 echo separator
25774 tar uf archive directory || exit 1
25775 echo separator
25776 tar tf archive | sort || exit 1
25777 )"
25778 echo update.at:30 >"$at_check_line_file"
25779
25780 at_trace_this=
25781 if test -n "$at_traceon"; then
25782     echo 'Not enabling shell tracing (command contains an embedded newline)'
25783 fi
25784
25785 if test -n "$at_trace_this"; then
25786     ( $at_traceon;
25787 mkdir oldgnu
25788 (cd oldgnu
25789 TEST_TAR_FORMAT=oldgnu
25790 export TEST_TAR_FORMAT
25791 TAR_OPTIONS="-H oldgnu"
25792 export TAR_OPTIONS
25793 rm -rf *
25794
25795
25796 test -z "`sort < /dev/null 2>&1`" || exit 77
25797
25798 mkdir directory
25799 genfile --length 10240 --pattern zeros --file directory/file1
25800 genfile --length 10240 --pattern default --file directory/file2
25801
25802 tar cf archive directory || exit 1
25803 echo separator
25804 tar uf archive directory || exit 1
25805 echo separator
25806 tar tf archive | sort || exit 1
25807 ) ) >"$at_stdout" 2>"$at_stder1"
25808     at_status=$?
25809     grep '^ *+' "$at_stder1" >&2
25810     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25811 else
25812     ( :;
25813 mkdir oldgnu
25814 (cd oldgnu
25815 TEST_TAR_FORMAT=oldgnu
25816 export TEST_TAR_FORMAT
25817 TAR_OPTIONS="-H oldgnu"
25818 export TAR_OPTIONS
25819 rm -rf *
25820
25821
25822 test -z "`sort < /dev/null 2>&1`" || exit 77
25823
25824 mkdir directory
25825 genfile --length 10240 --pattern zeros --file directory/file1
25826 genfile --length 10240 --pattern default --file directory/file2
25827
25828 tar cf archive directory || exit 1
25829 echo separator
25830 tar uf archive directory || exit 1
25831 echo separator
25832 tar tf archive | sort || exit 1
25833 ) ) >"$at_stdout" 2>"$at_stderr"
25834     at_status=$?
25835 fi
25836
25837 at_failed=false
25838 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25839 echo >>"$at_stdout"; echo "separator
25840 separator
25841 directory/
25842 directory/file1
25843 directory/file2
25844 " | $at_diff - "$at_stdout" || at_failed=:
25845 case $at_status in
25846    77) echo 77 > "$at_status_file"; exit 77;;
25847    0) ;;
25848    *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
25849       at_failed=:;;
25850 esac
25851 if $at_failed; then
25852
25853
25854   echo 1 > "$at_status_file"
25855   exit 1
25856 fi
25857
25858 $at_traceon
25859
25860               $at_traceoff
25861 echo "$at_srcdir/update.at:30:
25862 mkdir ustar
25863 (cd ustar
25864 TEST_TAR_FORMAT=ustar
25865 export TEST_TAR_FORMAT
25866 TAR_OPTIONS=\"-H ustar\"
25867 export TAR_OPTIONS
25868 rm -rf *
25869
25870
25871 test -z "`sort < /dev/null 2>&1`" || exit 77
25872
25873 mkdir directory
25874 genfile --length 10240 --pattern zeros --file directory/file1
25875 genfile --length 10240 --pattern default --file directory/file2
25876
25877 tar cf archive directory || exit 1
25878 echo separator
25879 tar uf archive directory || exit 1
25880 echo separator
25881 tar tf archive | sort || exit 1
25882 )"
25883 echo update.at:30 >"$at_check_line_file"
25884
25885 at_trace_this=
25886 if test -n "$at_traceon"; then
25887     echo 'Not enabling shell tracing (command contains an embedded newline)'
25888 fi
25889
25890 if test -n "$at_trace_this"; then
25891     ( $at_traceon;
25892 mkdir ustar
25893 (cd ustar
25894 TEST_TAR_FORMAT=ustar
25895 export TEST_TAR_FORMAT
25896 TAR_OPTIONS="-H ustar"
25897 export TAR_OPTIONS
25898 rm -rf *
25899
25900
25901 test -z "`sort < /dev/null 2>&1`" || exit 77
25902
25903 mkdir directory
25904 genfile --length 10240 --pattern zeros --file directory/file1
25905 genfile --length 10240 --pattern default --file directory/file2
25906
25907 tar cf archive directory || exit 1
25908 echo separator
25909 tar uf archive directory || exit 1
25910 echo separator
25911 tar tf archive | sort || exit 1
25912 ) ) >"$at_stdout" 2>"$at_stder1"
25913     at_status=$?
25914     grep '^ *+' "$at_stder1" >&2
25915     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25916 else
25917     ( :;
25918 mkdir ustar
25919 (cd ustar
25920 TEST_TAR_FORMAT=ustar
25921 export TEST_TAR_FORMAT
25922 TAR_OPTIONS="-H ustar"
25923 export TAR_OPTIONS
25924 rm -rf *
25925
25926
25927 test -z "`sort < /dev/null 2>&1`" || exit 77
25928
25929 mkdir directory
25930 genfile --length 10240 --pattern zeros --file directory/file1
25931 genfile --length 10240 --pattern default --file directory/file2
25932
25933 tar cf archive directory || exit 1
25934 echo separator
25935 tar uf archive directory || exit 1
25936 echo separator
25937 tar tf archive | sort || exit 1
25938 ) ) >"$at_stdout" 2>"$at_stderr"
25939     at_status=$?
25940 fi
25941
25942 at_failed=false
25943 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25944 echo >>"$at_stdout"; echo "separator
25945 separator
25946 directory/
25947 directory/file1
25948 directory/file2
25949 " | $at_diff - "$at_stdout" || at_failed=:
25950 case $at_status in
25951    77) echo 77 > "$at_status_file"; exit 77;;
25952    0) ;;
25953    *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
25954       at_failed=:;;
25955 esac
25956 if $at_failed; then
25957
25958
25959   echo 1 > "$at_status_file"
25960   exit 1
25961 fi
25962
25963 $at_traceon
25964
25965               $at_traceoff
25966 echo "$at_srcdir/update.at:30:
25967 mkdir posix
25968 (cd posix
25969 TEST_TAR_FORMAT=posix
25970 export TEST_TAR_FORMAT
25971 TAR_OPTIONS=\"-H posix\"
25972 export TAR_OPTIONS
25973 rm -rf *
25974
25975
25976 test -z "`sort < /dev/null 2>&1`" || exit 77
25977
25978 mkdir directory
25979 genfile --length 10240 --pattern zeros --file directory/file1
25980 genfile --length 10240 --pattern default --file directory/file2
25981
25982 tar cf archive directory || exit 1
25983 echo separator
25984 tar uf archive directory || exit 1
25985 echo separator
25986 tar tf archive | sort || exit 1
25987 )"
25988 echo update.at:30 >"$at_check_line_file"
25989
25990 at_trace_this=
25991 if test -n "$at_traceon"; then
25992     echo 'Not enabling shell tracing (command contains an embedded newline)'
25993 fi
25994
25995 if test -n "$at_trace_this"; then
25996     ( $at_traceon;
25997 mkdir posix
25998 (cd posix
25999 TEST_TAR_FORMAT=posix
26000 export TEST_TAR_FORMAT
26001 TAR_OPTIONS="-H posix"
26002 export TAR_OPTIONS
26003 rm -rf *
26004
26005
26006 test -z "`sort < /dev/null 2>&1`" || exit 77
26007
26008 mkdir directory
26009 genfile --length 10240 --pattern zeros --file directory/file1
26010 genfile --length 10240 --pattern default --file directory/file2
26011
26012 tar cf archive directory || exit 1
26013 echo separator
26014 tar uf archive directory || exit 1
26015 echo separator
26016 tar tf archive | sort || exit 1
26017 ) ) >"$at_stdout" 2>"$at_stder1"
26018     at_status=$?
26019     grep '^ *+' "$at_stder1" >&2
26020     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26021 else
26022     ( :;
26023 mkdir posix
26024 (cd posix
26025 TEST_TAR_FORMAT=posix
26026 export TEST_TAR_FORMAT
26027 TAR_OPTIONS="-H posix"
26028 export TAR_OPTIONS
26029 rm -rf *
26030
26031
26032 test -z "`sort < /dev/null 2>&1`" || exit 77
26033
26034 mkdir directory
26035 genfile --length 10240 --pattern zeros --file directory/file1
26036 genfile --length 10240 --pattern default --file directory/file2
26037
26038 tar cf archive directory || exit 1
26039 echo separator
26040 tar uf archive directory || exit 1
26041 echo separator
26042 tar tf archive | sort || exit 1
26043 ) ) >"$at_stdout" 2>"$at_stderr"
26044     at_status=$?
26045 fi
26046
26047 at_failed=false
26048 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
26049 echo >>"$at_stdout"; echo "separator
26050 separator
26051 directory/
26052 directory/file1
26053 directory/file2
26054 " | $at_diff - "$at_stdout" || at_failed=:
26055 case $at_status in
26056    77) echo 77 > "$at_status_file"; exit 77;;
26057    0) ;;
26058    *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
26059       at_failed=:;;
26060 esac
26061 if $at_failed; then
26062
26063
26064   echo 1 > "$at_status_file"
26065   exit 1
26066 fi
26067
26068 $at_traceon
26069
26070               $at_traceoff
26071 echo "$at_srcdir/update.at:30:
26072 mkdir gnu
26073 (cd gnu
26074 TEST_TAR_FORMAT=gnu
26075 export TEST_TAR_FORMAT
26076 TAR_OPTIONS=\"-H gnu\"
26077 export TAR_OPTIONS
26078 rm -rf *
26079
26080
26081 test -z "`sort < /dev/null 2>&1`" || exit 77
26082
26083 mkdir directory
26084 genfile --length 10240 --pattern zeros --file directory/file1
26085 genfile --length 10240 --pattern default --file directory/file2
26086
26087 tar cf archive directory || exit 1
26088 echo separator
26089 tar uf archive directory || exit 1
26090 echo separator
26091 tar tf archive | sort || exit 1
26092 )"
26093 echo update.at:30 >"$at_check_line_file"
26094
26095 at_trace_this=
26096 if test -n "$at_traceon"; then
26097     echo 'Not enabling shell tracing (command contains an embedded newline)'
26098 fi
26099
26100 if test -n "$at_trace_this"; then
26101     ( $at_traceon;
26102 mkdir gnu
26103 (cd gnu
26104 TEST_TAR_FORMAT=gnu
26105 export TEST_TAR_FORMAT
26106 TAR_OPTIONS="-H gnu"
26107 export TAR_OPTIONS
26108 rm -rf *
26109
26110
26111 test -z "`sort < /dev/null 2>&1`" || exit 77
26112
26113 mkdir directory
26114 genfile --length 10240 --pattern zeros --file directory/file1
26115 genfile --length 10240 --pattern default --file directory/file2
26116
26117 tar cf archive directory || exit 1
26118 echo separator
26119 tar uf archive directory || exit 1
26120 echo separator
26121 tar tf archive | sort || exit 1
26122 ) ) >"$at_stdout" 2>"$at_stder1"
26123     at_status=$?
26124     grep '^ *+' "$at_stder1" >&2
26125     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26126 else
26127     ( :;
26128 mkdir gnu
26129 (cd gnu
26130 TEST_TAR_FORMAT=gnu
26131 export TEST_TAR_FORMAT
26132 TAR_OPTIONS="-H gnu"
26133 export TAR_OPTIONS
26134 rm -rf *
26135
26136
26137 test -z "`sort < /dev/null 2>&1`" || exit 77
26138
26139 mkdir directory
26140 genfile --length 10240 --pattern zeros --file directory/file1
26141 genfile --length 10240 --pattern default --file directory/file2
26142
26143 tar cf archive directory || exit 1
26144 echo separator
26145 tar uf archive directory || exit 1
26146 echo separator
26147 tar tf archive | sort || exit 1
26148 ) ) >"$at_stdout" 2>"$at_stderr"
26149     at_status=$?
26150 fi
26151
26152 at_failed=false
26153 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
26154 echo >>"$at_stdout"; echo "separator
26155 separator
26156 directory/
26157 directory/file1
26158 directory/file2
26159 " | $at_diff - "$at_stdout" || at_failed=:
26160 case $at_status in
26161    77) echo 77 > "$at_status_file"; exit 77;;
26162    0) ;;
26163    *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
26164       at_failed=:;;
26165 esac
26166 if $at_failed; then
26167
26168
26169   echo 1 > "$at_status_file"
26170   exit 1
26171 fi
26172
26173 $at_traceon
26174
26175
26176
26177
26178       $at_traceoff
26179       $at_times_p && times >"$at_times_file"
26180     ) 5>&1 2>&1 | eval $at_tee_pipe
26181     at_status=`cat "$at_status_file"`
26182     ;;
26183
26184   65 ) # 65. volume.at:23: volume
26185     at_setup_line='volume.at:23'
26186     at_desc="volume"
26187     $at_quiet $ECHO_N " 65: volume                                         $ECHO_C"
26188     at_xfail=no
26189       test -f $XFAILFILE && at_xfail=yes
26190     echo "#                             -*- compilation -*-" >> "$at_group_log"
26191     (
26192       echo "65. volume.at:23: testing ..."
26193       $at_traceon
26194
26195
26196
26197
26198
26199   $at_traceoff
26200 echo "$at_srcdir/volume.at:26:
26201 mkdir gnu
26202 (cd gnu
26203 TEST_TAR_FORMAT=gnu
26204 export TEST_TAR_FORMAT
26205 TAR_OPTIONS=\"-H gnu\"
26206 export TAR_OPTIONS
26207 rm -rf *
26208
26209 tar -cf archive -V label -T /dev/null || exit 1
26210
26211 tar xfV archive label || exit 1
26212 tar xfV archive 'la?el' || exit 1
26213 tar xfV archive 'l*l' || exit 1
26214
26215 echo 1>&2 -----
26216 tar xfV archive lab
26217 test \$? = 2 || exit 1
26218 echo 1>&2 -----
26219 tar xfV archive bel
26220 test \$? = 2 || exit 1
26221 echo 1>&2 -----
26222 tar xfV archive babel
26223 test \$? = 2
26224 )"
26225 echo volume.at:26 >"$at_check_line_file"
26226
26227 at_trace_this=
26228 if test -n "$at_traceon"; then
26229     echo 'Not enabling shell tracing (command contains an embedded newline)'
26230 fi
26231
26232 if test -n "$at_trace_this"; then
26233     ( $at_traceon;
26234 mkdir gnu
26235 (cd gnu
26236 TEST_TAR_FORMAT=gnu
26237 export TEST_TAR_FORMAT
26238 TAR_OPTIONS="-H gnu"
26239 export TAR_OPTIONS
26240 rm -rf *
26241
26242 tar -cf archive -V label -T /dev/null || exit 1
26243
26244 tar xfV archive label || exit 1
26245 tar xfV archive 'la?el' || exit 1
26246 tar xfV archive 'l*l' || exit 1
26247
26248 echo 1>&2 -----
26249 tar xfV archive lab
26250 test $? = 2 || exit 1
26251 echo 1>&2 -----
26252 tar xfV archive bel
26253 test $? = 2 || exit 1
26254 echo 1>&2 -----
26255 tar xfV archive babel
26256 test $? = 2
26257 ) ) >"$at_stdout" 2>"$at_stder1"
26258     at_status=$?
26259     grep '^ *+' "$at_stder1" >&2
26260     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26261 else
26262     ( :;
26263 mkdir gnu
26264 (cd gnu
26265 TEST_TAR_FORMAT=gnu
26266 export TEST_TAR_FORMAT
26267 TAR_OPTIONS="-H gnu"
26268 export TAR_OPTIONS
26269 rm -rf *
26270
26271 tar -cf archive -V label -T /dev/null || exit 1
26272
26273 tar xfV archive label || exit 1
26274 tar xfV archive 'la?el' || exit 1
26275 tar xfV archive 'l*l' || exit 1
26276
26277 echo 1>&2 -----
26278 tar xfV archive lab
26279 test $? = 2 || exit 1
26280 echo 1>&2 -----
26281 tar xfV archive bel
26282 test $? = 2 || exit 1
26283 echo 1>&2 -----
26284 tar xfV archive babel
26285 test $? = 2
26286 ) ) >"$at_stdout" 2>"$at_stderr"
26287     at_status=$?
26288 fi
26289
26290 at_failed=false
26291 echo >>"$at_stderr"; echo "-----
26292 tar: Volume \`label' does not match \`lab'
26293 tar: Error is not recoverable: exiting now
26294 -----
26295 tar: Volume \`label' does not match \`bel'
26296 tar: Error is not recoverable: exiting now
26297 -----
26298 tar: Volume \`label' does not match \`babel'
26299 tar: Error is not recoverable: exiting now
26300 " | $at_diff - "$at_stderr" || at_failed=:
26301 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
26302 case $at_status in
26303    77) echo 77 > "$at_status_file"; exit 77;;
26304    0) ;;
26305    *) echo "$at_srcdir/volume.at:26: exit code was $at_status, expected 0"
26306       at_failed=:;;
26307 esac
26308 if $at_failed; then
26309
26310
26311   echo 1 > "$at_status_file"
26312   exit 1
26313 fi
26314
26315 $at_traceon
26316
26317               $at_traceoff
26318 echo "$at_srcdir/volume.at:26:
26319 mkdir oldgnu
26320 (cd oldgnu
26321 TEST_TAR_FORMAT=oldgnu
26322 export TEST_TAR_FORMAT
26323 TAR_OPTIONS=\"-H oldgnu\"
26324 export TAR_OPTIONS
26325 rm -rf *
26326
26327 tar -cf archive -V label -T /dev/null || exit 1
26328
26329 tar xfV archive label || exit 1
26330 tar xfV archive 'la?el' || exit 1
26331 tar xfV archive 'l*l' || exit 1
26332
26333 echo 1>&2 -----
26334 tar xfV archive lab
26335 test \$? = 2 || exit 1
26336 echo 1>&2 -----
26337 tar xfV archive bel
26338 test \$? = 2 || exit 1
26339 echo 1>&2 -----
26340 tar xfV archive babel
26341 test \$? = 2
26342 )"
26343 echo volume.at:26 >"$at_check_line_file"
26344
26345 at_trace_this=
26346 if test -n "$at_traceon"; then
26347     echo 'Not enabling shell tracing (command contains an embedded newline)'
26348 fi
26349
26350 if test -n "$at_trace_this"; then
26351     ( $at_traceon;
26352 mkdir oldgnu
26353 (cd oldgnu
26354 TEST_TAR_FORMAT=oldgnu
26355 export TEST_TAR_FORMAT
26356 TAR_OPTIONS="-H oldgnu"
26357 export TAR_OPTIONS
26358 rm -rf *
26359
26360 tar -cf archive -V label -T /dev/null || exit 1
26361
26362 tar xfV archive label || exit 1
26363 tar xfV archive 'la?el' || exit 1
26364 tar xfV archive 'l*l' || exit 1
26365
26366 echo 1>&2 -----
26367 tar xfV archive lab
26368 test $? = 2 || exit 1
26369 echo 1>&2 -----
26370 tar xfV archive bel
26371 test $? = 2 || exit 1
26372 echo 1>&2 -----
26373 tar xfV archive babel
26374 test $? = 2
26375 ) ) >"$at_stdout" 2>"$at_stder1"
26376     at_status=$?
26377     grep '^ *+' "$at_stder1" >&2
26378     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26379 else
26380     ( :;
26381 mkdir oldgnu
26382 (cd oldgnu
26383 TEST_TAR_FORMAT=oldgnu
26384 export TEST_TAR_FORMAT
26385 TAR_OPTIONS="-H oldgnu"
26386 export TAR_OPTIONS
26387 rm -rf *
26388
26389 tar -cf archive -V label -T /dev/null || exit 1
26390
26391 tar xfV archive label || exit 1
26392 tar xfV archive 'la?el' || exit 1
26393 tar xfV archive 'l*l' || exit 1
26394
26395 echo 1>&2 -----
26396 tar xfV archive lab
26397 test $? = 2 || exit 1
26398 echo 1>&2 -----
26399 tar xfV archive bel
26400 test $? = 2 || exit 1
26401 echo 1>&2 -----
26402 tar xfV archive babel
26403 test $? = 2
26404 ) ) >"$at_stdout" 2>"$at_stderr"
26405     at_status=$?
26406 fi
26407
26408 at_failed=false
26409 echo >>"$at_stderr"; echo "-----
26410 tar: Volume \`label' does not match \`lab'
26411 tar: Error is not recoverable: exiting now
26412 -----
26413 tar: Volume \`label' does not match \`bel'
26414 tar: Error is not recoverable: exiting now
26415 -----
26416 tar: Volume \`label' does not match \`babel'
26417 tar: Error is not recoverable: exiting now
26418 " | $at_diff - "$at_stderr" || at_failed=:
26419 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
26420 case $at_status in
26421    77) echo 77 > "$at_status_file"; exit 77;;
26422    0) ;;
26423    *) echo "$at_srcdir/volume.at:26: exit code was $at_status, expected 0"
26424       at_failed=:;;
26425 esac
26426 if $at_failed; then
26427
26428
26429   echo 1 > "$at_status_file"
26430   exit 1
26431 fi
26432
26433 $at_traceon
26434
26435
26436
26437
26438       $at_traceoff
26439       $at_times_p && times >"$at_times_file"
26440     ) 5>&1 2>&1 | eval $at_tee_pipe
26441     at_status=`cat "$at_status_file"`
26442     ;;
26443
26444   66 ) # 66. volsize.at:29: volume header size
26445     at_setup_line='volsize.at:29'
26446     at_desc="volume header size"
26447     $at_quiet $ECHO_N " 66: volume header size                             $ECHO_C"
26448     at_xfail=no
26449       test -f $XFAILFILE && at_xfail=yes
26450     echo "#                             -*- compilation -*-" >> "$at_group_log"
26451     (
26452       echo "66. volsize.at:29: testing ..."
26453       $at_traceon
26454
26455
26456
26457
26458
26459   $at_traceoff
26460 echo "$at_srcdir/volsize.at:32:
26461 mkdir v7
26462 (cd v7
26463 TEST_TAR_FORMAT=v7
26464 export TEST_TAR_FORMAT
26465 TAR_OPTIONS=\"-H v7\"
26466 export TAR_OPTIONS
26467 rm -rf *
26468
26469
26470 test -z "`sort < /dev/null 2>&1`" || exit 77
26471
26472
26473 test -z "$TEST_DATA_DIR" && exit 77
26474 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26475
26476 echo Short Listing
26477 tar tf \$TEST_DATA_DIR/abc.tar
26478 echo Verbose Listing
26479 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
26480 echo Extracted directory
26481 tar xf \$TEST_DATA_DIR/abc.tar
26482 find abc|sort
26483 )"
26484 echo volsize.at:32 >"$at_check_line_file"
26485
26486 at_trace_this=
26487 if test -n "$at_traceon"; then
26488     echo 'Not enabling shell tracing (command contains an embedded newline)'
26489 fi
26490
26491 if test -n "$at_trace_this"; then
26492     ( $at_traceon;
26493 mkdir v7
26494 (cd v7
26495 TEST_TAR_FORMAT=v7
26496 export TEST_TAR_FORMAT
26497 TAR_OPTIONS="-H v7"
26498 export TAR_OPTIONS
26499 rm -rf *
26500
26501
26502 test -z "`sort < /dev/null 2>&1`" || exit 77
26503
26504
26505 test -z "$TEST_DATA_DIR" && exit 77
26506 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26507
26508 echo Short Listing
26509 tar tf $TEST_DATA_DIR/abc.tar
26510 echo Verbose Listing
26511 tar --utc -tvf $TEST_DATA_DIR/abc.tar
26512 echo Extracted directory
26513 tar xf $TEST_DATA_DIR/abc.tar
26514 find abc|sort
26515 ) ) >"$at_stdout" 2>"$at_stder1"
26516     at_status=$?
26517     grep '^ *+' "$at_stder1" >&2
26518     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26519 else
26520     ( :;
26521 mkdir v7
26522 (cd v7
26523 TEST_TAR_FORMAT=v7
26524 export TEST_TAR_FORMAT
26525 TAR_OPTIONS="-H v7"
26526 export TAR_OPTIONS
26527 rm -rf *
26528
26529
26530 test -z "`sort < /dev/null 2>&1`" || exit 77
26531
26532
26533 test -z "$TEST_DATA_DIR" && exit 77
26534 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26535
26536 echo Short Listing
26537 tar tf $TEST_DATA_DIR/abc.tar
26538 echo Verbose Listing
26539 tar --utc -tvf $TEST_DATA_DIR/abc.tar
26540 echo Extracted directory
26541 tar xf $TEST_DATA_DIR/abc.tar
26542 find abc|sort
26543 ) ) >"$at_stdout" 2>"$at_stderr"
26544     at_status=$?
26545 fi
26546
26547 at_failed=false
26548 echo >>"$at_stderr"; echo "tar: Record size = 5 blocks
26549 tar: Record size = 5 blocks
26550 " | $at_diff - "$at_stderr" || at_failed=:
26551 echo >>"$at_stdout"; echo "Short Listing
26552 abc/not-a-file.gif
26553 abc/CCC
26554 Verbose Listing
26555 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
26556 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
26557 Extracted directory
26558 abc
26559 abc/CCC
26560 " | $at_diff - "$at_stdout" || at_failed=:
26561 case $at_status in
26562    77) echo 77 > "$at_status_file"; exit 77;;
26563    0) ;;
26564    *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
26565       at_failed=:;;
26566 esac
26567 if $at_failed; then
26568
26569
26570   echo 1 > "$at_status_file"
26571   exit 1
26572 fi
26573
26574 $at_traceon
26575
26576               $at_traceoff
26577 echo "$at_srcdir/volsize.at:32:
26578 mkdir oldgnu
26579 (cd oldgnu
26580 TEST_TAR_FORMAT=oldgnu
26581 export TEST_TAR_FORMAT
26582 TAR_OPTIONS=\"-H oldgnu\"
26583 export TAR_OPTIONS
26584 rm -rf *
26585
26586
26587 test -z "`sort < /dev/null 2>&1`" || exit 77
26588
26589
26590 test -z "$TEST_DATA_DIR" && exit 77
26591 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26592
26593 echo Short Listing
26594 tar tf \$TEST_DATA_DIR/abc.tar
26595 echo Verbose Listing
26596 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
26597 echo Extracted directory
26598 tar xf \$TEST_DATA_DIR/abc.tar
26599 find abc|sort
26600 )"
26601 echo volsize.at:32 >"$at_check_line_file"
26602
26603 at_trace_this=
26604 if test -n "$at_traceon"; then
26605     echo 'Not enabling shell tracing (command contains an embedded newline)'
26606 fi
26607
26608 if test -n "$at_trace_this"; then
26609     ( $at_traceon;
26610 mkdir oldgnu
26611 (cd oldgnu
26612 TEST_TAR_FORMAT=oldgnu
26613 export TEST_TAR_FORMAT
26614 TAR_OPTIONS="-H oldgnu"
26615 export TAR_OPTIONS
26616 rm -rf *
26617
26618
26619 test -z "`sort < /dev/null 2>&1`" || exit 77
26620
26621
26622 test -z "$TEST_DATA_DIR" && exit 77
26623 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26624
26625 echo Short Listing
26626 tar tf $TEST_DATA_DIR/abc.tar
26627 echo Verbose Listing
26628 tar --utc -tvf $TEST_DATA_DIR/abc.tar
26629 echo Extracted directory
26630 tar xf $TEST_DATA_DIR/abc.tar
26631 find abc|sort
26632 ) ) >"$at_stdout" 2>"$at_stder1"
26633     at_status=$?
26634     grep '^ *+' "$at_stder1" >&2
26635     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26636 else
26637     ( :;
26638 mkdir oldgnu
26639 (cd oldgnu
26640 TEST_TAR_FORMAT=oldgnu
26641 export TEST_TAR_FORMAT
26642 TAR_OPTIONS="-H oldgnu"
26643 export TAR_OPTIONS
26644 rm -rf *
26645
26646
26647 test -z "`sort < /dev/null 2>&1`" || exit 77
26648
26649
26650 test -z "$TEST_DATA_DIR" && exit 77
26651 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26652
26653 echo Short Listing
26654 tar tf $TEST_DATA_DIR/abc.tar
26655 echo Verbose Listing
26656 tar --utc -tvf $TEST_DATA_DIR/abc.tar
26657 echo Extracted directory
26658 tar xf $TEST_DATA_DIR/abc.tar
26659 find abc|sort
26660 ) ) >"$at_stdout" 2>"$at_stderr"
26661     at_status=$?
26662 fi
26663
26664 at_failed=false
26665 echo >>"$at_stderr"; echo "tar: Record size = 5 blocks
26666 tar: Record size = 5 blocks
26667 " | $at_diff - "$at_stderr" || at_failed=:
26668 echo >>"$at_stdout"; echo "Short Listing
26669 abc/not-a-file.gif
26670 abc/CCC
26671 Verbose Listing
26672 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
26673 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
26674 Extracted directory
26675 abc
26676 abc/CCC
26677 " | $at_diff - "$at_stdout" || at_failed=:
26678 case $at_status in
26679    77) echo 77 > "$at_status_file"; exit 77;;
26680    0) ;;
26681    *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
26682       at_failed=:;;
26683 esac
26684 if $at_failed; then
26685
26686
26687   echo 1 > "$at_status_file"
26688   exit 1
26689 fi
26690
26691 $at_traceon
26692
26693               $at_traceoff
26694 echo "$at_srcdir/volsize.at:32:
26695 mkdir ustar
26696 (cd ustar
26697 TEST_TAR_FORMAT=ustar
26698 export TEST_TAR_FORMAT
26699 TAR_OPTIONS=\"-H ustar\"
26700 export TAR_OPTIONS
26701 rm -rf *
26702
26703
26704 test -z "`sort < /dev/null 2>&1`" || exit 77
26705
26706
26707 test -z "$TEST_DATA_DIR" && exit 77
26708 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26709
26710 echo Short Listing
26711 tar tf \$TEST_DATA_DIR/abc.tar
26712 echo Verbose Listing
26713 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
26714 echo Extracted directory
26715 tar xf \$TEST_DATA_DIR/abc.tar
26716 find abc|sort
26717 )"
26718 echo volsize.at:32 >"$at_check_line_file"
26719
26720 at_trace_this=
26721 if test -n "$at_traceon"; then
26722     echo 'Not enabling shell tracing (command contains an embedded newline)'
26723 fi
26724
26725 if test -n "$at_trace_this"; then
26726     ( $at_traceon;
26727 mkdir ustar
26728 (cd ustar
26729 TEST_TAR_FORMAT=ustar
26730 export TEST_TAR_FORMAT
26731 TAR_OPTIONS="-H ustar"
26732 export TAR_OPTIONS
26733 rm -rf *
26734
26735
26736 test -z "`sort < /dev/null 2>&1`" || exit 77
26737
26738
26739 test -z "$TEST_DATA_DIR" && exit 77
26740 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26741
26742 echo Short Listing
26743 tar tf $TEST_DATA_DIR/abc.tar
26744 echo Verbose Listing
26745 tar --utc -tvf $TEST_DATA_DIR/abc.tar
26746 echo Extracted directory
26747 tar xf $TEST_DATA_DIR/abc.tar
26748 find abc|sort
26749 ) ) >"$at_stdout" 2>"$at_stder1"
26750     at_status=$?
26751     grep '^ *+' "$at_stder1" >&2
26752     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26753 else
26754     ( :;
26755 mkdir ustar
26756 (cd ustar
26757 TEST_TAR_FORMAT=ustar
26758 export TEST_TAR_FORMAT
26759 TAR_OPTIONS="-H ustar"
26760 export TAR_OPTIONS
26761 rm -rf *
26762
26763
26764 test -z "`sort < /dev/null 2>&1`" || exit 77
26765
26766
26767 test -z "$TEST_DATA_DIR" && exit 77
26768 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26769
26770 echo Short Listing
26771 tar tf $TEST_DATA_DIR/abc.tar
26772 echo Verbose Listing
26773 tar --utc -tvf $TEST_DATA_DIR/abc.tar
26774 echo Extracted directory
26775 tar xf $TEST_DATA_DIR/abc.tar
26776 find abc|sort
26777 ) ) >"$at_stdout" 2>"$at_stderr"
26778     at_status=$?
26779 fi
26780
26781 at_failed=false
26782 echo >>"$at_stderr"; echo "tar: Record size = 5 blocks
26783 tar: Record size = 5 blocks
26784 " | $at_diff - "$at_stderr" || at_failed=:
26785 echo >>"$at_stdout"; echo "Short Listing
26786 abc/not-a-file.gif
26787 abc/CCC
26788 Verbose Listing
26789 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
26790 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
26791 Extracted directory
26792 abc
26793 abc/CCC
26794 " | $at_diff - "$at_stdout" || at_failed=:
26795 case $at_status in
26796    77) echo 77 > "$at_status_file"; exit 77;;
26797    0) ;;
26798    *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
26799       at_failed=:;;
26800 esac
26801 if $at_failed; then
26802
26803
26804   echo 1 > "$at_status_file"
26805   exit 1
26806 fi
26807
26808 $at_traceon
26809
26810               $at_traceoff
26811 echo "$at_srcdir/volsize.at:32:
26812 mkdir posix
26813 (cd posix
26814 TEST_TAR_FORMAT=posix
26815 export TEST_TAR_FORMAT
26816 TAR_OPTIONS=\"-H posix\"
26817 export TAR_OPTIONS
26818 rm -rf *
26819
26820
26821 test -z "`sort < /dev/null 2>&1`" || exit 77
26822
26823
26824 test -z "$TEST_DATA_DIR" && exit 77
26825 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26826
26827 echo Short Listing
26828 tar tf \$TEST_DATA_DIR/abc.tar
26829 echo Verbose Listing
26830 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
26831 echo Extracted directory
26832 tar xf \$TEST_DATA_DIR/abc.tar
26833 find abc|sort
26834 )"
26835 echo volsize.at:32 >"$at_check_line_file"
26836
26837 at_trace_this=
26838 if test -n "$at_traceon"; then
26839     echo 'Not enabling shell tracing (command contains an embedded newline)'
26840 fi
26841
26842 if test -n "$at_trace_this"; then
26843     ( $at_traceon;
26844 mkdir posix
26845 (cd posix
26846 TEST_TAR_FORMAT=posix
26847 export TEST_TAR_FORMAT
26848 TAR_OPTIONS="-H posix"
26849 export TAR_OPTIONS
26850 rm -rf *
26851
26852
26853 test -z "`sort < /dev/null 2>&1`" || exit 77
26854
26855
26856 test -z "$TEST_DATA_DIR" && exit 77
26857 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26858
26859 echo Short Listing
26860 tar tf $TEST_DATA_DIR/abc.tar
26861 echo Verbose Listing
26862 tar --utc -tvf $TEST_DATA_DIR/abc.tar
26863 echo Extracted directory
26864 tar xf $TEST_DATA_DIR/abc.tar
26865 find abc|sort
26866 ) ) >"$at_stdout" 2>"$at_stder1"
26867     at_status=$?
26868     grep '^ *+' "$at_stder1" >&2
26869     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26870 else
26871     ( :;
26872 mkdir posix
26873 (cd posix
26874 TEST_TAR_FORMAT=posix
26875 export TEST_TAR_FORMAT
26876 TAR_OPTIONS="-H posix"
26877 export TAR_OPTIONS
26878 rm -rf *
26879
26880
26881 test -z "`sort < /dev/null 2>&1`" || exit 77
26882
26883
26884 test -z "$TEST_DATA_DIR" && exit 77
26885 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26886
26887 echo Short Listing
26888 tar tf $TEST_DATA_DIR/abc.tar
26889 echo Verbose Listing
26890 tar --utc -tvf $TEST_DATA_DIR/abc.tar
26891 echo Extracted directory
26892 tar xf $TEST_DATA_DIR/abc.tar
26893 find abc|sort
26894 ) ) >"$at_stdout" 2>"$at_stderr"
26895     at_status=$?
26896 fi
26897
26898 at_failed=false
26899 echo >>"$at_stderr"; echo "tar: Record size = 5 blocks
26900 tar: Record size = 5 blocks
26901 " | $at_diff - "$at_stderr" || at_failed=:
26902 echo >>"$at_stdout"; echo "Short Listing
26903 abc/not-a-file.gif
26904 abc/CCC
26905 Verbose Listing
26906 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
26907 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
26908 Extracted directory
26909 abc
26910 abc/CCC
26911 " | $at_diff - "$at_stdout" || at_failed=:
26912 case $at_status in
26913    77) echo 77 > "$at_status_file"; exit 77;;
26914    0) ;;
26915    *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
26916       at_failed=:;;
26917 esac
26918 if $at_failed; then
26919
26920
26921   echo 1 > "$at_status_file"
26922   exit 1
26923 fi
26924
26925 $at_traceon
26926
26927               $at_traceoff
26928 echo "$at_srcdir/volsize.at:32:
26929 mkdir gnu
26930 (cd gnu
26931 TEST_TAR_FORMAT=gnu
26932 export TEST_TAR_FORMAT
26933 TAR_OPTIONS=\"-H gnu\"
26934 export TAR_OPTIONS
26935 rm -rf *
26936
26937
26938 test -z "`sort < /dev/null 2>&1`" || exit 77
26939
26940
26941 test -z "$TEST_DATA_DIR" && exit 77
26942 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26943
26944 echo Short Listing
26945 tar tf \$TEST_DATA_DIR/abc.tar
26946 echo Verbose Listing
26947 tar --utc -tvf \$TEST_DATA_DIR/abc.tar
26948 echo Extracted directory
26949 tar xf \$TEST_DATA_DIR/abc.tar
26950 find abc|sort
26951 )"
26952 echo volsize.at:32 >"$at_check_line_file"
26953
26954 at_trace_this=
26955 if test -n "$at_traceon"; then
26956     echo 'Not enabling shell tracing (command contains an embedded newline)'
26957 fi
26958
26959 if test -n "$at_trace_this"; then
26960     ( $at_traceon;
26961 mkdir gnu
26962 (cd gnu
26963 TEST_TAR_FORMAT=gnu
26964 export TEST_TAR_FORMAT
26965 TAR_OPTIONS="-H gnu"
26966 export TAR_OPTIONS
26967 rm -rf *
26968
26969
26970 test -z "`sort < /dev/null 2>&1`" || exit 77
26971
26972
26973 test -z "$TEST_DATA_DIR" && exit 77
26974 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
26975
26976 echo Short Listing
26977 tar tf $TEST_DATA_DIR/abc.tar
26978 echo Verbose Listing
26979 tar --utc -tvf $TEST_DATA_DIR/abc.tar
26980 echo Extracted directory
26981 tar xf $TEST_DATA_DIR/abc.tar
26982 find abc|sort
26983 ) ) >"$at_stdout" 2>"$at_stder1"
26984     at_status=$?
26985     grep '^ *+' "$at_stder1" >&2
26986     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26987 else
26988     ( :;
26989 mkdir gnu
26990 (cd gnu
26991 TEST_TAR_FORMAT=gnu
26992 export TEST_TAR_FORMAT
26993 TAR_OPTIONS="-H gnu"
26994 export TAR_OPTIONS
26995 rm -rf *
26996
26997
26998 test -z "`sort < /dev/null 2>&1`" || exit 77
26999
27000
27001 test -z "$TEST_DATA_DIR" && exit 77
27002 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
27003
27004 echo Short Listing
27005 tar tf $TEST_DATA_DIR/abc.tar
27006 echo Verbose Listing
27007 tar --utc -tvf $TEST_DATA_DIR/abc.tar
27008 echo Extracted directory
27009 tar xf $TEST_DATA_DIR/abc.tar
27010 find abc|sort
27011 ) ) >"$at_stdout" 2>"$at_stderr"
27012     at_status=$?
27013 fi
27014
27015 at_failed=false
27016 echo >>"$at_stderr"; echo "tar: Record size = 5 blocks
27017 tar: Record size = 5 blocks
27018 " | $at_diff - "$at_stderr" || at_failed=:
27019 echo >>"$at_stdout"; echo "Short Listing
27020 abc/not-a-file.gif
27021 abc/CCC
27022 Verbose Listing
27023 V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
27024 -rw-r--r-- tom/users         0 2006-04-22 19:52 abc/CCC
27025 Extracted directory
27026 abc
27027 abc/CCC
27028 " | $at_diff - "$at_stdout" || at_failed=:
27029 case $at_status in
27030    77) echo 77 > "$at_status_file"; exit 77;;
27031    0) ;;
27032    *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
27033       at_failed=:;;
27034 esac
27035 if $at_failed; then
27036
27037
27038   echo 1 > "$at_status_file"
27039   exit 1
27040 fi
27041
27042 $at_traceon
27043
27044
27045
27046
27047       $at_traceoff
27048       $at_times_p && times >"$at_times_file"
27049     ) 5>&1 2>&1 | eval $at_tee_pipe
27050     at_status=`cat "$at_status_file"`
27051     ;;
27052
27053   67 ) # 67. comprec.at:21: compressed format recognition
27054     at_setup_line='comprec.at:21'
27055     at_desc="compressed format recognition"
27056     $at_quiet $ECHO_N " 67: compressed format recognition                  $ECHO_C"
27057     at_xfail=no
27058       test -f $XFAILFILE && at_xfail=yes
27059     echo "#                             -*- compilation -*-" >> "$at_group_log"
27060     (
27061       echo "67. comprec.at:21: testing ..."
27062       $at_traceon
27063
27064
27065
27066
27067
27068
27069   $at_traceoff
27070 echo "$at_srcdir/comprec.at:25:
27071 mkdir v7
27072 (cd v7
27073 TEST_TAR_FORMAT=v7
27074 export TEST_TAR_FORMAT
27075 TAR_OPTIONS=\"-H v7\"
27076 export TAR_OPTIONS
27077 rm -rf *
27078
27079
27080 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27081
27082 genfile --length 10240 --file file1
27083 echo \"separator\"
27084 tar cfz archive file1
27085 echo \"separator\"
27086 mv file1 orig
27087 tar xfv archive
27088 cmp orig file1
27089 )"
27090 echo comprec.at:25 >"$at_check_line_file"
27091
27092 at_trace_this=
27093 if test -n "$at_traceon"; then
27094     echo 'Not enabling shell tracing (command contains an embedded newline)'
27095 fi
27096
27097 if test -n "$at_trace_this"; then
27098     ( $at_traceon;
27099 mkdir v7
27100 (cd v7
27101 TEST_TAR_FORMAT=v7
27102 export TEST_TAR_FORMAT
27103 TAR_OPTIONS="-H v7"
27104 export TAR_OPTIONS
27105 rm -rf *
27106
27107
27108 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27109
27110 genfile --length 10240 --file file1
27111 echo "separator"
27112 tar cfz archive file1
27113 echo "separator"
27114 mv file1 orig
27115 tar xfv archive
27116 cmp orig file1
27117 ) ) >"$at_stdout" 2>"$at_stder1"
27118     at_status=$?
27119     grep '^ *+' "$at_stder1" >&2
27120     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27121 else
27122     ( :;
27123 mkdir v7
27124 (cd v7
27125 TEST_TAR_FORMAT=v7
27126 export TEST_TAR_FORMAT
27127 TAR_OPTIONS="-H v7"
27128 export TAR_OPTIONS
27129 rm -rf *
27130
27131
27132 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27133
27134 genfile --length 10240 --file file1
27135 echo "separator"
27136 tar cfz archive file1
27137 echo "separator"
27138 mv file1 orig
27139 tar xfv archive
27140 cmp orig file1
27141 ) ) >"$at_stdout" 2>"$at_stderr"
27142     at_status=$?
27143 fi
27144
27145 at_failed=false
27146 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27147 echo >>"$at_stdout"; echo "separator
27148 separator
27149 file1
27150 " | $at_diff - "$at_stdout" || at_failed=:
27151 case $at_status in
27152    77) echo 77 > "$at_status_file"; exit 77;;
27153    0) ;;
27154    *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
27155       at_failed=:;;
27156 esac
27157 if $at_failed; then
27158
27159
27160   echo 1 > "$at_status_file"
27161   exit 1
27162 fi
27163
27164 $at_traceon
27165
27166               $at_traceoff
27167 echo "$at_srcdir/comprec.at:25:
27168 mkdir oldgnu
27169 (cd oldgnu
27170 TEST_TAR_FORMAT=oldgnu
27171 export TEST_TAR_FORMAT
27172 TAR_OPTIONS=\"-H oldgnu\"
27173 export TAR_OPTIONS
27174 rm -rf *
27175
27176
27177 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27178
27179 genfile --length 10240 --file file1
27180 echo \"separator\"
27181 tar cfz archive file1
27182 echo \"separator\"
27183 mv file1 orig
27184 tar xfv archive
27185 cmp orig file1
27186 )"
27187 echo comprec.at:25 >"$at_check_line_file"
27188
27189 at_trace_this=
27190 if test -n "$at_traceon"; then
27191     echo 'Not enabling shell tracing (command contains an embedded newline)'
27192 fi
27193
27194 if test -n "$at_trace_this"; then
27195     ( $at_traceon;
27196 mkdir oldgnu
27197 (cd oldgnu
27198 TEST_TAR_FORMAT=oldgnu
27199 export TEST_TAR_FORMAT
27200 TAR_OPTIONS="-H oldgnu"
27201 export TAR_OPTIONS
27202 rm -rf *
27203
27204
27205 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27206
27207 genfile --length 10240 --file file1
27208 echo "separator"
27209 tar cfz archive file1
27210 echo "separator"
27211 mv file1 orig
27212 tar xfv archive
27213 cmp orig file1
27214 ) ) >"$at_stdout" 2>"$at_stder1"
27215     at_status=$?
27216     grep '^ *+' "$at_stder1" >&2
27217     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27218 else
27219     ( :;
27220 mkdir oldgnu
27221 (cd oldgnu
27222 TEST_TAR_FORMAT=oldgnu
27223 export TEST_TAR_FORMAT
27224 TAR_OPTIONS="-H oldgnu"
27225 export TAR_OPTIONS
27226 rm -rf *
27227
27228
27229 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27230
27231 genfile --length 10240 --file file1
27232 echo "separator"
27233 tar cfz archive file1
27234 echo "separator"
27235 mv file1 orig
27236 tar xfv archive
27237 cmp orig file1
27238 ) ) >"$at_stdout" 2>"$at_stderr"
27239     at_status=$?
27240 fi
27241
27242 at_failed=false
27243 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27244 echo >>"$at_stdout"; echo "separator
27245 separator
27246 file1
27247 " | $at_diff - "$at_stdout" || at_failed=:
27248 case $at_status in
27249    77) echo 77 > "$at_status_file"; exit 77;;
27250    0) ;;
27251    *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
27252       at_failed=:;;
27253 esac
27254 if $at_failed; then
27255
27256
27257   echo 1 > "$at_status_file"
27258   exit 1
27259 fi
27260
27261 $at_traceon
27262
27263               $at_traceoff
27264 echo "$at_srcdir/comprec.at:25:
27265 mkdir ustar
27266 (cd ustar
27267 TEST_TAR_FORMAT=ustar
27268 export TEST_TAR_FORMAT
27269 TAR_OPTIONS=\"-H ustar\"
27270 export TAR_OPTIONS
27271 rm -rf *
27272
27273
27274 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27275
27276 genfile --length 10240 --file file1
27277 echo \"separator\"
27278 tar cfz archive file1
27279 echo \"separator\"
27280 mv file1 orig
27281 tar xfv archive
27282 cmp orig file1
27283 )"
27284 echo comprec.at:25 >"$at_check_line_file"
27285
27286 at_trace_this=
27287 if test -n "$at_traceon"; then
27288     echo 'Not enabling shell tracing (command contains an embedded newline)'
27289 fi
27290
27291 if test -n "$at_trace_this"; then
27292     ( $at_traceon;
27293 mkdir ustar
27294 (cd ustar
27295 TEST_TAR_FORMAT=ustar
27296 export TEST_TAR_FORMAT
27297 TAR_OPTIONS="-H ustar"
27298 export TAR_OPTIONS
27299 rm -rf *
27300
27301
27302 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27303
27304 genfile --length 10240 --file file1
27305 echo "separator"
27306 tar cfz archive file1
27307 echo "separator"
27308 mv file1 orig
27309 tar xfv archive
27310 cmp orig file1
27311 ) ) >"$at_stdout" 2>"$at_stder1"
27312     at_status=$?
27313     grep '^ *+' "$at_stder1" >&2
27314     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27315 else
27316     ( :;
27317 mkdir ustar
27318 (cd ustar
27319 TEST_TAR_FORMAT=ustar
27320 export TEST_TAR_FORMAT
27321 TAR_OPTIONS="-H ustar"
27322 export TAR_OPTIONS
27323 rm -rf *
27324
27325
27326 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27327
27328 genfile --length 10240 --file file1
27329 echo "separator"
27330 tar cfz archive file1
27331 echo "separator"
27332 mv file1 orig
27333 tar xfv archive
27334 cmp orig file1
27335 ) ) >"$at_stdout" 2>"$at_stderr"
27336     at_status=$?
27337 fi
27338
27339 at_failed=false
27340 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27341 echo >>"$at_stdout"; echo "separator
27342 separator
27343 file1
27344 " | $at_diff - "$at_stdout" || at_failed=:
27345 case $at_status in
27346    77) echo 77 > "$at_status_file"; exit 77;;
27347    0) ;;
27348    *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
27349       at_failed=:;;
27350 esac
27351 if $at_failed; then
27352
27353
27354   echo 1 > "$at_status_file"
27355   exit 1
27356 fi
27357
27358 $at_traceon
27359
27360               $at_traceoff
27361 echo "$at_srcdir/comprec.at:25:
27362 mkdir posix
27363 (cd posix
27364 TEST_TAR_FORMAT=posix
27365 export TEST_TAR_FORMAT
27366 TAR_OPTIONS=\"-H posix\"
27367 export TAR_OPTIONS
27368 rm -rf *
27369
27370
27371 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27372
27373 genfile --length 10240 --file file1
27374 echo \"separator\"
27375 tar cfz archive file1
27376 echo \"separator\"
27377 mv file1 orig
27378 tar xfv archive
27379 cmp orig file1
27380 )"
27381 echo comprec.at:25 >"$at_check_line_file"
27382
27383 at_trace_this=
27384 if test -n "$at_traceon"; then
27385     echo 'Not enabling shell tracing (command contains an embedded newline)'
27386 fi
27387
27388 if test -n "$at_trace_this"; then
27389     ( $at_traceon;
27390 mkdir posix
27391 (cd posix
27392 TEST_TAR_FORMAT=posix
27393 export TEST_TAR_FORMAT
27394 TAR_OPTIONS="-H posix"
27395 export TAR_OPTIONS
27396 rm -rf *
27397
27398
27399 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27400
27401 genfile --length 10240 --file file1
27402 echo "separator"
27403 tar cfz archive file1
27404 echo "separator"
27405 mv file1 orig
27406 tar xfv archive
27407 cmp orig file1
27408 ) ) >"$at_stdout" 2>"$at_stder1"
27409     at_status=$?
27410     grep '^ *+' "$at_stder1" >&2
27411     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27412 else
27413     ( :;
27414 mkdir posix
27415 (cd posix
27416 TEST_TAR_FORMAT=posix
27417 export TEST_TAR_FORMAT
27418 TAR_OPTIONS="-H posix"
27419 export TAR_OPTIONS
27420 rm -rf *
27421
27422
27423 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27424
27425 genfile --length 10240 --file file1
27426 echo "separator"
27427 tar cfz archive file1
27428 echo "separator"
27429 mv file1 orig
27430 tar xfv archive
27431 cmp orig file1
27432 ) ) >"$at_stdout" 2>"$at_stderr"
27433     at_status=$?
27434 fi
27435
27436 at_failed=false
27437 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27438 echo >>"$at_stdout"; echo "separator
27439 separator
27440 file1
27441 " | $at_diff - "$at_stdout" || at_failed=:
27442 case $at_status in
27443    77) echo 77 > "$at_status_file"; exit 77;;
27444    0) ;;
27445    *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
27446       at_failed=:;;
27447 esac
27448 if $at_failed; then
27449
27450
27451   echo 1 > "$at_status_file"
27452   exit 1
27453 fi
27454
27455 $at_traceon
27456
27457               $at_traceoff
27458 echo "$at_srcdir/comprec.at:25:
27459 mkdir gnu
27460 (cd gnu
27461 TEST_TAR_FORMAT=gnu
27462 export TEST_TAR_FORMAT
27463 TAR_OPTIONS=\"-H gnu\"
27464 export TAR_OPTIONS
27465 rm -rf *
27466
27467
27468 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27469
27470 genfile --length 10240 --file file1
27471 echo \"separator\"
27472 tar cfz archive file1
27473 echo \"separator\"
27474 mv file1 orig
27475 tar xfv archive
27476 cmp orig file1
27477 )"
27478 echo comprec.at:25 >"$at_check_line_file"
27479
27480 at_trace_this=
27481 if test -n "$at_traceon"; then
27482     echo 'Not enabling shell tracing (command contains an embedded newline)'
27483 fi
27484
27485 if test -n "$at_trace_this"; then
27486     ( $at_traceon;
27487 mkdir gnu
27488 (cd gnu
27489 TEST_TAR_FORMAT=gnu
27490 export TEST_TAR_FORMAT
27491 TAR_OPTIONS="-H gnu"
27492 export TAR_OPTIONS
27493 rm -rf *
27494
27495
27496 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27497
27498 genfile --length 10240 --file file1
27499 echo "separator"
27500 tar cfz archive file1
27501 echo "separator"
27502 mv file1 orig
27503 tar xfv archive
27504 cmp orig file1
27505 ) ) >"$at_stdout" 2>"$at_stder1"
27506     at_status=$?
27507     grep '^ *+' "$at_stder1" >&2
27508     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27509 else
27510     ( :;
27511 mkdir gnu
27512 (cd gnu
27513 TEST_TAR_FORMAT=gnu
27514 export TEST_TAR_FORMAT
27515 TAR_OPTIONS="-H gnu"
27516 export TAR_OPTIONS
27517 rm -rf *
27518
27519
27520 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
27521
27522 genfile --length 10240 --file file1
27523 echo "separator"
27524 tar cfz archive file1
27525 echo "separator"
27526 mv file1 orig
27527 tar xfv archive
27528 cmp orig file1
27529 ) ) >"$at_stdout" 2>"$at_stderr"
27530     at_status=$?
27531 fi
27532
27533 at_failed=false
27534 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27535 echo >>"$at_stdout"; echo "separator
27536 separator
27537 file1
27538 " | $at_diff - "$at_stdout" || at_failed=:
27539 case $at_status in
27540    77) echo 77 > "$at_status_file"; exit 77;;
27541    0) ;;
27542    *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
27543       at_failed=:;;
27544 esac
27545 if $at_failed; then
27546
27547
27548   echo 1 > "$at_status_file"
27549   exit 1
27550 fi
27551
27552 $at_traceon
27553
27554
27555
27556
27557       $at_traceoff
27558       $at_times_p && times >"$at_times_file"
27559     ) 5>&1 2>&1 | eval $at_tee_pipe
27560     at_status=`cat "$at_status_file"`
27561     ;;
27562
27563   68 ) # 68. shortfile.at:26: short input files
27564     at_setup_line='shortfile.at:26'
27565     at_desc="short input files"
27566     $at_quiet $ECHO_N " 68: short input files                              $ECHO_C"
27567     at_xfail=no
27568       test -f $XFAILFILE && at_xfail=yes
27569     echo "#                             -*- compilation -*-" >> "$at_group_log"
27570     (
27571       echo "68. shortfile.at:26: testing ..."
27572       $at_traceon
27573
27574
27575
27576
27577
27578   $at_traceoff
27579 echo "$at_srcdir/shortfile.at:29:
27580 mkdir gnu
27581 (cd gnu
27582 TEST_TAR_FORMAT=gnu
27583 export TEST_TAR_FORMAT
27584 TAR_OPTIONS=\"-H gnu\"
27585 export TAR_OPTIONS
27586 rm -rf *
27587
27588 genfile --length 511 --file foo || exit 5
27589 tar tf foo
27590 )"
27591 echo shortfile.at:29 >"$at_check_line_file"
27592
27593 at_trace_this=
27594 if test -n "$at_traceon"; then
27595     echo 'Not enabling shell tracing (command contains an embedded newline)'
27596 fi
27597
27598 if test -n "$at_trace_this"; then
27599     ( $at_traceon;
27600 mkdir gnu
27601 (cd gnu
27602 TEST_TAR_FORMAT=gnu
27603 export TEST_TAR_FORMAT
27604 TAR_OPTIONS="-H gnu"
27605 export TAR_OPTIONS
27606 rm -rf *
27607
27608 genfile --length 511 --file foo || exit 5
27609 tar tf foo
27610 ) ) >"$at_stdout" 2>"$at_stder1"
27611     at_status=$?
27612     grep '^ *+' "$at_stder1" >&2
27613     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27614 else
27615     ( :;
27616 mkdir gnu
27617 (cd gnu
27618 TEST_TAR_FORMAT=gnu
27619 export TEST_TAR_FORMAT
27620 TAR_OPTIONS="-H gnu"
27621 export TAR_OPTIONS
27622 rm -rf *
27623
27624 genfile --length 511 --file foo || exit 5
27625 tar tf foo
27626 ) ) >"$at_stdout" 2>"$at_stderr"
27627     at_status=$?
27628 fi
27629
27630 at_failed=false
27631 echo >>"$at_stderr"; echo "tar: This does not look like a tar archive
27632 tar: Exiting with failure status due to previous errors
27633 " | $at_diff - "$at_stderr" || at_failed=:
27634 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
27635 case $at_status in
27636    77) echo 77 > "$at_status_file"; exit 77;;
27637    2) ;;
27638    *) echo "$at_srcdir/shortfile.at:29: exit code was $at_status, expected 2"
27639       at_failed=:;;
27640 esac
27641 if $at_failed; then
27642
27643
27644   echo 1 > "$at_status_file"
27645   exit 1
27646 fi
27647
27648 $at_traceon
27649
27650
27651
27652
27653       $at_traceoff
27654       $at_times_p && times >"$at_times_file"
27655     ) 5>&1 2>&1 | eval $at_tee_pipe
27656     at_status=`cat "$at_status_file"`
27657     ;;
27658
27659   69 ) # 69. shortupd.at:29: updating short archives
27660     at_setup_line='shortupd.at:29'
27661     at_desc="updating short archives"
27662     $at_quiet $ECHO_N " 69: updating short archives                        $ECHO_C"
27663     at_xfail=no
27664       test -f $XFAILFILE && at_xfail=yes
27665     echo "#                             -*- compilation -*-" >> "$at_group_log"
27666     (
27667       echo "69. shortupd.at:29: testing ..."
27668       $at_traceon
27669
27670
27671
27672
27673
27674   $at_traceoff
27675 echo "$at_srcdir/shortupd.at:32:
27676 mkdir v7
27677 (cd v7
27678 TEST_TAR_FORMAT=v7
27679 export TEST_TAR_FORMAT
27680 TAR_OPTIONS=\"-H v7\"
27681 export TAR_OPTIONS
27682 rm -rf *
27683
27684 touch foo
27685 tar uf archive foo
27686 )"
27687 echo shortupd.at:32 >"$at_check_line_file"
27688
27689 at_trace_this=
27690 if test -n "$at_traceon"; then
27691     echo 'Not enabling shell tracing (command contains an embedded newline)'
27692 fi
27693
27694 if test -n "$at_trace_this"; then
27695     ( $at_traceon;
27696 mkdir v7
27697 (cd v7
27698 TEST_TAR_FORMAT=v7
27699 export TEST_TAR_FORMAT
27700 TAR_OPTIONS="-H v7"
27701 export TAR_OPTIONS
27702 rm -rf *
27703
27704 touch foo
27705 tar uf archive foo
27706 ) ) >"$at_stdout" 2>"$at_stder1"
27707     at_status=$?
27708     grep '^ *+' "$at_stder1" >&2
27709     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27710 else
27711     ( :;
27712 mkdir v7
27713 (cd v7
27714 TEST_TAR_FORMAT=v7
27715 export TEST_TAR_FORMAT
27716 TAR_OPTIONS="-H v7"
27717 export TAR_OPTIONS
27718 rm -rf *
27719
27720 touch foo
27721 tar uf archive foo
27722 ) ) >"$at_stdout" 2>"$at_stderr"
27723     at_status=$?
27724 fi
27725
27726 at_failed=false
27727 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27728 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
27729 case $at_status in
27730    77) echo 77 > "$at_status_file"; exit 77;;
27731    0) ;;
27732    *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0"
27733       at_failed=:;;
27734 esac
27735 if $at_failed; then
27736
27737
27738   echo 1 > "$at_status_file"
27739   exit 1
27740 fi
27741
27742 $at_traceon
27743
27744               $at_traceoff
27745 echo "$at_srcdir/shortupd.at:32:
27746 mkdir oldgnu
27747 (cd oldgnu
27748 TEST_TAR_FORMAT=oldgnu
27749 export TEST_TAR_FORMAT
27750 TAR_OPTIONS=\"-H oldgnu\"
27751 export TAR_OPTIONS
27752 rm -rf *
27753
27754 touch foo
27755 tar uf archive foo
27756 )"
27757 echo shortupd.at:32 >"$at_check_line_file"
27758
27759 at_trace_this=
27760 if test -n "$at_traceon"; then
27761     echo 'Not enabling shell tracing (command contains an embedded newline)'
27762 fi
27763
27764 if test -n "$at_trace_this"; then
27765     ( $at_traceon;
27766 mkdir oldgnu
27767 (cd oldgnu
27768 TEST_TAR_FORMAT=oldgnu
27769 export TEST_TAR_FORMAT
27770 TAR_OPTIONS="-H oldgnu"
27771 export TAR_OPTIONS
27772 rm -rf *
27773
27774 touch foo
27775 tar uf archive foo
27776 ) ) >"$at_stdout" 2>"$at_stder1"
27777     at_status=$?
27778     grep '^ *+' "$at_stder1" >&2
27779     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27780 else
27781     ( :;
27782 mkdir oldgnu
27783 (cd oldgnu
27784 TEST_TAR_FORMAT=oldgnu
27785 export TEST_TAR_FORMAT
27786 TAR_OPTIONS="-H oldgnu"
27787 export TAR_OPTIONS
27788 rm -rf *
27789
27790 touch foo
27791 tar uf archive foo
27792 ) ) >"$at_stdout" 2>"$at_stderr"
27793     at_status=$?
27794 fi
27795
27796 at_failed=false
27797 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27798 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
27799 case $at_status in
27800    77) echo 77 > "$at_status_file"; exit 77;;
27801    0) ;;
27802    *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0"
27803       at_failed=:;;
27804 esac
27805 if $at_failed; then
27806
27807
27808   echo 1 > "$at_status_file"
27809   exit 1
27810 fi
27811
27812 $at_traceon
27813
27814               $at_traceoff
27815 echo "$at_srcdir/shortupd.at:32:
27816 mkdir ustar
27817 (cd ustar
27818 TEST_TAR_FORMAT=ustar
27819 export TEST_TAR_FORMAT
27820 TAR_OPTIONS=\"-H ustar\"
27821 export TAR_OPTIONS
27822 rm -rf *
27823
27824 touch foo
27825 tar uf archive foo
27826 )"
27827 echo shortupd.at:32 >"$at_check_line_file"
27828
27829 at_trace_this=
27830 if test -n "$at_traceon"; then
27831     echo 'Not enabling shell tracing (command contains an embedded newline)'
27832 fi
27833
27834 if test -n "$at_trace_this"; then
27835     ( $at_traceon;
27836 mkdir ustar
27837 (cd ustar
27838 TEST_TAR_FORMAT=ustar
27839 export TEST_TAR_FORMAT
27840 TAR_OPTIONS="-H ustar"
27841 export TAR_OPTIONS
27842 rm -rf *
27843
27844 touch foo
27845 tar uf archive foo
27846 ) ) >"$at_stdout" 2>"$at_stder1"
27847     at_status=$?
27848     grep '^ *+' "$at_stder1" >&2
27849     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27850 else
27851     ( :;
27852 mkdir ustar
27853 (cd ustar
27854 TEST_TAR_FORMAT=ustar
27855 export TEST_TAR_FORMAT
27856 TAR_OPTIONS="-H ustar"
27857 export TAR_OPTIONS
27858 rm -rf *
27859
27860 touch foo
27861 tar uf archive foo
27862 ) ) >"$at_stdout" 2>"$at_stderr"
27863     at_status=$?
27864 fi
27865
27866 at_failed=false
27867 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27868 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
27869 case $at_status in
27870    77) echo 77 > "$at_status_file"; exit 77;;
27871    0) ;;
27872    *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0"
27873       at_failed=:;;
27874 esac
27875 if $at_failed; then
27876
27877
27878   echo 1 > "$at_status_file"
27879   exit 1
27880 fi
27881
27882 $at_traceon
27883
27884               $at_traceoff
27885 echo "$at_srcdir/shortupd.at:32:
27886 mkdir posix
27887 (cd posix
27888 TEST_TAR_FORMAT=posix
27889 export TEST_TAR_FORMAT
27890 TAR_OPTIONS=\"-H posix\"
27891 export TAR_OPTIONS
27892 rm -rf *
27893
27894 touch foo
27895 tar uf archive foo
27896 )"
27897 echo shortupd.at:32 >"$at_check_line_file"
27898
27899 at_trace_this=
27900 if test -n "$at_traceon"; then
27901     echo 'Not enabling shell tracing (command contains an embedded newline)'
27902 fi
27903
27904 if test -n "$at_trace_this"; then
27905     ( $at_traceon;
27906 mkdir posix
27907 (cd posix
27908 TEST_TAR_FORMAT=posix
27909 export TEST_TAR_FORMAT
27910 TAR_OPTIONS="-H posix"
27911 export TAR_OPTIONS
27912 rm -rf *
27913
27914 touch foo
27915 tar uf archive foo
27916 ) ) >"$at_stdout" 2>"$at_stder1"
27917     at_status=$?
27918     grep '^ *+' "$at_stder1" >&2
27919     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27920 else
27921     ( :;
27922 mkdir posix
27923 (cd posix
27924 TEST_TAR_FORMAT=posix
27925 export TEST_TAR_FORMAT
27926 TAR_OPTIONS="-H posix"
27927 export TAR_OPTIONS
27928 rm -rf *
27929
27930 touch foo
27931 tar uf archive foo
27932 ) ) >"$at_stdout" 2>"$at_stderr"
27933     at_status=$?
27934 fi
27935
27936 at_failed=false
27937 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27938 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
27939 case $at_status in
27940    77) echo 77 > "$at_status_file"; exit 77;;
27941    0) ;;
27942    *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0"
27943       at_failed=:;;
27944 esac
27945 if $at_failed; then
27946
27947
27948   echo 1 > "$at_status_file"
27949   exit 1
27950 fi
27951
27952 $at_traceon
27953
27954               $at_traceoff
27955 echo "$at_srcdir/shortupd.at:32:
27956 mkdir gnu
27957 (cd gnu
27958 TEST_TAR_FORMAT=gnu
27959 export TEST_TAR_FORMAT
27960 TAR_OPTIONS=\"-H gnu\"
27961 export TAR_OPTIONS
27962 rm -rf *
27963
27964 touch foo
27965 tar uf archive foo
27966 )"
27967 echo shortupd.at:32 >"$at_check_line_file"
27968
27969 at_trace_this=
27970 if test -n "$at_traceon"; then
27971     echo 'Not enabling shell tracing (command contains an embedded newline)'
27972 fi
27973
27974 if test -n "$at_trace_this"; then
27975     ( $at_traceon;
27976 mkdir gnu
27977 (cd gnu
27978 TEST_TAR_FORMAT=gnu
27979 export TEST_TAR_FORMAT
27980 TAR_OPTIONS="-H gnu"
27981 export TAR_OPTIONS
27982 rm -rf *
27983
27984 touch foo
27985 tar uf archive foo
27986 ) ) >"$at_stdout" 2>"$at_stder1"
27987     at_status=$?
27988     grep '^ *+' "$at_stder1" >&2
27989     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27990 else
27991     ( :;
27992 mkdir gnu
27993 (cd gnu
27994 TEST_TAR_FORMAT=gnu
27995 export TEST_TAR_FORMAT
27996 TAR_OPTIONS="-H gnu"
27997 export TAR_OPTIONS
27998 rm -rf *
27999
28000 touch foo
28001 tar uf archive foo
28002 ) ) >"$at_stdout" 2>"$at_stderr"
28003     at_status=$?
28004 fi
28005
28006 at_failed=false
28007 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
28008 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
28009 case $at_status in
28010    77) echo 77 > "$at_status_file"; exit 77;;
28011    0) ;;
28012    *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0"
28013       at_failed=:;;
28014 esac
28015 if $at_failed; then
28016
28017
28018   echo 1 > "$at_status_file"
28019   exit 1
28020 fi
28021
28022 $at_traceon
28023
28024
28025
28026
28027       $at_traceoff
28028       $at_times_p && times >"$at_times_file"
28029     ) 5>&1 2>&1 | eval $at_tee_pipe
28030     at_status=`cat "$at_status_file"`
28031     ;;
28032
28033   70 ) # 70. truncate.at:29: truncate
28034     at_setup_line='truncate.at:29'
28035     at_desc="truncate"
28036     $at_quiet $ECHO_N " 70: truncate                                       $ECHO_C"
28037     at_xfail=no
28038       test -f $XFAILFILE && at_xfail=yes
28039     echo "#                             -*- compilation -*-" >> "$at_group_log"
28040     (
28041       echo "70. truncate.at:29: testing ..."
28042       $at_traceon
28043
28044
28045
28046
28047
28048   $at_traceoff
28049 echo "$at_srcdir/truncate.at:32:
28050 mkdir v7
28051 (cd v7
28052 TEST_TAR_FORMAT=v7
28053 export TEST_TAR_FORMAT
28054 TAR_OPTIONS=\"-H v7\"
28055 export TAR_OPTIONS
28056 rm -rf *
28057
28058 genfile --file foo --length 50000k
28059 genfile --file baz
28060 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28061 echo Exit status: \$?
28062 echo separator
28063 sleep 1
28064 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28065 tar dvf bar)"
28066 echo truncate.at:32 >"$at_check_line_file"
28067
28068 at_trace_this=
28069 if test -n "$at_traceon"; then
28070     echo 'Not enabling shell tracing (command contains an embedded newline)'
28071 fi
28072
28073 if test -n "$at_trace_this"; then
28074     ( $at_traceon;
28075 mkdir v7
28076 (cd v7
28077 TEST_TAR_FORMAT=v7
28078 export TEST_TAR_FORMAT
28079 TAR_OPTIONS="-H v7"
28080 export TAR_OPTIONS
28081 rm -rf *
28082
28083 genfile --file foo --length 50000k
28084 genfile --file baz
28085 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28086 echo Exit status: $?
28087 echo separator
28088 sleep 1
28089 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28090 tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
28091     at_status=$?
28092     grep '^ *+' "$at_stder1" >&2
28093     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28094 else
28095     ( :;
28096 mkdir v7
28097 (cd v7
28098 TEST_TAR_FORMAT=v7
28099 export TEST_TAR_FORMAT
28100 TAR_OPTIONS="-H v7"
28101 export TAR_OPTIONS
28102 rm -rf *
28103
28104 genfile --file foo --length 50000k
28105 genfile --file baz
28106 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28107 echo Exit status: $?
28108 echo separator
28109 sleep 1
28110 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28111 tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
28112     at_status=$?
28113 fi
28114
28115 at_failed=false
28116 echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
28117 " | $at_diff - "$at_stderr" || at_failed=:
28118 echo >>"$at_stdout"; echo "foo
28119 baz
28120 Exit status: 1
28121 separator
28122 foo
28123 foo: Mod time differs
28124 baz
28125 " | $at_diff - "$at_stdout" || at_failed=:
28126 case $at_status in
28127    77) echo 77 > "$at_status_file"; exit 77;;
28128    1) ;;
28129    *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
28130       at_failed=:;;
28131 esac
28132 if $at_failed; then
28133
28134
28135   echo 1 > "$at_status_file"
28136   exit 1
28137 fi
28138
28139 $at_traceon
28140
28141               $at_traceoff
28142 echo "$at_srcdir/truncate.at:32:
28143 mkdir oldgnu
28144 (cd oldgnu
28145 TEST_TAR_FORMAT=oldgnu
28146 export TEST_TAR_FORMAT
28147 TAR_OPTIONS=\"-H oldgnu\"
28148 export TAR_OPTIONS
28149 rm -rf *
28150
28151 genfile --file foo --length 50000k
28152 genfile --file baz
28153 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28154 echo Exit status: \$?
28155 echo separator
28156 sleep 1
28157 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28158 tar dvf bar)"
28159 echo truncate.at:32 >"$at_check_line_file"
28160
28161 at_trace_this=
28162 if test -n "$at_traceon"; then
28163     echo 'Not enabling shell tracing (command contains an embedded newline)'
28164 fi
28165
28166 if test -n "$at_trace_this"; then
28167     ( $at_traceon;
28168 mkdir oldgnu
28169 (cd oldgnu
28170 TEST_TAR_FORMAT=oldgnu
28171 export TEST_TAR_FORMAT
28172 TAR_OPTIONS="-H oldgnu"
28173 export TAR_OPTIONS
28174 rm -rf *
28175
28176 genfile --file foo --length 50000k
28177 genfile --file baz
28178 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28179 echo Exit status: $?
28180 echo separator
28181 sleep 1
28182 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28183 tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
28184     at_status=$?
28185     grep '^ *+' "$at_stder1" >&2
28186     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28187 else
28188     ( :;
28189 mkdir oldgnu
28190 (cd oldgnu
28191 TEST_TAR_FORMAT=oldgnu
28192 export TEST_TAR_FORMAT
28193 TAR_OPTIONS="-H oldgnu"
28194 export TAR_OPTIONS
28195 rm -rf *
28196
28197 genfile --file foo --length 50000k
28198 genfile --file baz
28199 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28200 echo Exit status: $?
28201 echo separator
28202 sleep 1
28203 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28204 tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
28205     at_status=$?
28206 fi
28207
28208 at_failed=false
28209 echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
28210 " | $at_diff - "$at_stderr" || at_failed=:
28211 echo >>"$at_stdout"; echo "foo
28212 baz
28213 Exit status: 1
28214 separator
28215 foo
28216 foo: Mod time differs
28217 baz
28218 " | $at_diff - "$at_stdout" || at_failed=:
28219 case $at_status in
28220    77) echo 77 > "$at_status_file"; exit 77;;
28221    1) ;;
28222    *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
28223       at_failed=:;;
28224 esac
28225 if $at_failed; then
28226
28227
28228   echo 1 > "$at_status_file"
28229   exit 1
28230 fi
28231
28232 $at_traceon
28233
28234               $at_traceoff
28235 echo "$at_srcdir/truncate.at:32:
28236 mkdir ustar
28237 (cd ustar
28238 TEST_TAR_FORMAT=ustar
28239 export TEST_TAR_FORMAT
28240 TAR_OPTIONS=\"-H ustar\"
28241 export TAR_OPTIONS
28242 rm -rf *
28243
28244 genfile --file foo --length 50000k
28245 genfile --file baz
28246 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28247 echo Exit status: \$?
28248 echo separator
28249 sleep 1
28250 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28251 tar dvf bar)"
28252 echo truncate.at:32 >"$at_check_line_file"
28253
28254 at_trace_this=
28255 if test -n "$at_traceon"; then
28256     echo 'Not enabling shell tracing (command contains an embedded newline)'
28257 fi
28258
28259 if test -n "$at_trace_this"; then
28260     ( $at_traceon;
28261 mkdir ustar
28262 (cd ustar
28263 TEST_TAR_FORMAT=ustar
28264 export TEST_TAR_FORMAT
28265 TAR_OPTIONS="-H ustar"
28266 export TAR_OPTIONS
28267 rm -rf *
28268
28269 genfile --file foo --length 50000k
28270 genfile --file baz
28271 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28272 echo Exit status: $?
28273 echo separator
28274 sleep 1
28275 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28276 tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
28277     at_status=$?
28278     grep '^ *+' "$at_stder1" >&2
28279     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28280 else
28281     ( :;
28282 mkdir ustar
28283 (cd ustar
28284 TEST_TAR_FORMAT=ustar
28285 export TEST_TAR_FORMAT
28286 TAR_OPTIONS="-H ustar"
28287 export TAR_OPTIONS
28288 rm -rf *
28289
28290 genfile --file foo --length 50000k
28291 genfile --file baz
28292 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28293 echo Exit status: $?
28294 echo separator
28295 sleep 1
28296 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28297 tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
28298     at_status=$?
28299 fi
28300
28301 at_failed=false
28302 echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
28303 " | $at_diff - "$at_stderr" || at_failed=:
28304 echo >>"$at_stdout"; echo "foo
28305 baz
28306 Exit status: 1
28307 separator
28308 foo
28309 foo: Mod time differs
28310 baz
28311 " | $at_diff - "$at_stdout" || at_failed=:
28312 case $at_status in
28313    77) echo 77 > "$at_status_file"; exit 77;;
28314    1) ;;
28315    *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
28316       at_failed=:;;
28317 esac
28318 if $at_failed; then
28319
28320
28321   echo 1 > "$at_status_file"
28322   exit 1
28323 fi
28324
28325 $at_traceon
28326
28327               $at_traceoff
28328 echo "$at_srcdir/truncate.at:32:
28329 mkdir posix
28330 (cd posix
28331 TEST_TAR_FORMAT=posix
28332 export TEST_TAR_FORMAT
28333 TAR_OPTIONS=\"-H posix\"
28334 export TAR_OPTIONS
28335 rm -rf *
28336
28337 genfile --file foo --length 50000k
28338 genfile --file baz
28339 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28340 echo Exit status: \$?
28341 echo separator
28342 sleep 1
28343 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28344 tar dvf bar)"
28345 echo truncate.at:32 >"$at_check_line_file"
28346
28347 at_trace_this=
28348 if test -n "$at_traceon"; then
28349     echo 'Not enabling shell tracing (command contains an embedded newline)'
28350 fi
28351
28352 if test -n "$at_trace_this"; then
28353     ( $at_traceon;
28354 mkdir posix
28355 (cd posix
28356 TEST_TAR_FORMAT=posix
28357 export TEST_TAR_FORMAT
28358 TAR_OPTIONS="-H posix"
28359 export TAR_OPTIONS
28360 rm -rf *
28361
28362 genfile --file foo --length 50000k
28363 genfile --file baz
28364 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28365 echo Exit status: $?
28366 echo separator
28367 sleep 1
28368 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28369 tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
28370     at_status=$?
28371     grep '^ *+' "$at_stder1" >&2
28372     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28373 else
28374     ( :;
28375 mkdir posix
28376 (cd posix
28377 TEST_TAR_FORMAT=posix
28378 export TEST_TAR_FORMAT
28379 TAR_OPTIONS="-H posix"
28380 export TAR_OPTIONS
28381 rm -rf *
28382
28383 genfile --file foo --length 50000k
28384 genfile --file baz
28385 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28386 echo Exit status: $?
28387 echo separator
28388 sleep 1
28389 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28390 tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
28391     at_status=$?
28392 fi
28393
28394 at_failed=false
28395 echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
28396 " | $at_diff - "$at_stderr" || at_failed=:
28397 echo >>"$at_stdout"; echo "foo
28398 baz
28399 Exit status: 1
28400 separator
28401 foo
28402 foo: Mod time differs
28403 baz
28404 " | $at_diff - "$at_stdout" || at_failed=:
28405 case $at_status in
28406    77) echo 77 > "$at_status_file"; exit 77;;
28407    1) ;;
28408    *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
28409       at_failed=:;;
28410 esac
28411 if $at_failed; then
28412
28413
28414   echo 1 > "$at_status_file"
28415   exit 1
28416 fi
28417
28418 $at_traceon
28419
28420               $at_traceoff
28421 echo "$at_srcdir/truncate.at:32:
28422 mkdir gnu
28423 (cd gnu
28424 TEST_TAR_FORMAT=gnu
28425 export TEST_TAR_FORMAT
28426 TAR_OPTIONS=\"-H gnu\"
28427 export TAR_OPTIONS
28428 rm -rf *
28429
28430 genfile --file foo --length 50000k
28431 genfile --file baz
28432 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28433 echo Exit status: \$?
28434 echo separator
28435 sleep 1
28436 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28437 tar dvf bar)"
28438 echo truncate.at:32 >"$at_check_line_file"
28439
28440 at_trace_this=
28441 if test -n "$at_traceon"; then
28442     echo 'Not enabling shell tracing (command contains an embedded newline)'
28443 fi
28444
28445 if test -n "$at_trace_this"; then
28446     ( $at_traceon;
28447 mkdir gnu
28448 (cd gnu
28449 TEST_TAR_FORMAT=gnu
28450 export TEST_TAR_FORMAT
28451 TAR_OPTIONS="-H gnu"
28452 export TAR_OPTIONS
28453 rm -rf *
28454
28455 genfile --file foo --length 50000k
28456 genfile --file baz
28457 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28458 echo Exit status: $?
28459 echo separator
28460 sleep 1
28461 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28462 tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
28463     at_status=$?
28464     grep '^ *+' "$at_stder1" >&2
28465     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28466 else
28467     ( :;
28468 mkdir gnu
28469 (cd gnu
28470 TEST_TAR_FORMAT=gnu
28471 export TEST_TAR_FORMAT
28472 TAR_OPTIONS="-H gnu"
28473 export TAR_OPTIONS
28474 rm -rf *
28475
28476 genfile --file foo --length 50000k
28477 genfile --file baz
28478 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
28479 echo Exit status: $?
28480 echo separator
28481 sleep 1
28482 genfile --file foo --seek 49995k --length 5k --pattern=zeros
28483 tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
28484     at_status=$?
28485 fi
28486
28487 at_failed=false
28488 echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
28489 " | $at_diff - "$at_stderr" || at_failed=:
28490 echo >>"$at_stdout"; echo "foo
28491 baz
28492 Exit status: 1
28493 separator
28494 foo
28495 foo: Mod time differs
28496 baz
28497 " | $at_diff - "$at_stdout" || at_failed=:
28498 case $at_status in
28499    77) echo 77 > "$at_status_file"; exit 77;;
28500    1) ;;
28501    *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
28502       at_failed=:;;
28503 esac
28504 if $at_failed; then
28505
28506
28507   echo 1 > "$at_status_file"
28508   exit 1
28509 fi
28510
28511 $at_traceon
28512
28513
28514
28515
28516       $at_traceoff
28517       $at_times_p && times >"$at_times_file"
28518     ) 5>&1 2>&1 | eval $at_tee_pipe
28519     at_status=`cat "$at_status_file"`
28520     ;;
28521
28522   71 ) # 71. grow.at:24: grow
28523     at_setup_line='grow.at:24'
28524     at_desc="grow"
28525     $at_quiet $ECHO_N " 71: grow                                           $ECHO_C"
28526     at_xfail=no
28527       test -f $XFAILFILE && at_xfail=yes
28528     echo "#                             -*- compilation -*-" >> "$at_group_log"
28529     (
28530       echo "71. grow.at:24: testing ..."
28531       $at_traceon
28532
28533
28534
28535
28536
28537   $at_traceoff
28538 echo "$at_srcdir/grow.at:27:
28539 mkdir v7
28540 (cd v7
28541 TEST_TAR_FORMAT=v7
28542 export TEST_TAR_FORMAT
28543 TAR_OPTIONS=\"-H v7\"
28544 export TAR_OPTIONS
28545 rm -rf *
28546
28547 genfile --file foo --length 50000k
28548 genfile --file baz
28549 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
28550         --append foo
28551 )"
28552 echo grow.at:27 >"$at_check_line_file"
28553
28554 at_trace_this=
28555 if test -n "$at_traceon"; then
28556     echo 'Not enabling shell tracing (command contains an embedded newline)'
28557 fi
28558
28559 if test -n "$at_trace_this"; then
28560     ( $at_traceon;
28561 mkdir v7
28562 (cd v7
28563 TEST_TAR_FORMAT=v7
28564 export TEST_TAR_FORMAT
28565 TAR_OPTIONS="-H v7"
28566 export TAR_OPTIONS
28567 rm -rf *
28568
28569 genfile --file foo --length 50000k
28570 genfile --file baz
28571 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
28572         --append foo
28573 ) ) >"$at_stdout" 2>"$at_stder1"
28574     at_status=$?
28575     grep '^ *+' "$at_stder1" >&2
28576     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28577 else
28578     ( :;
28579 mkdir v7
28580 (cd v7
28581 TEST_TAR_FORMAT=v7
28582 export TEST_TAR_FORMAT
28583 TAR_OPTIONS="-H v7"
28584 export TAR_OPTIONS
28585 rm -rf *
28586
28587 genfile --file foo --length 50000k
28588 genfile --file baz
28589 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
28590         --append foo
28591 ) ) >"$at_stdout" 2>"$at_stderr"
28592     at_status=$?
28593 fi
28594
28595 at_failed=false
28596 echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
28597 " | $at_diff - "$at_stderr" || at_failed=:
28598 echo >>"$at_stdout"; echo "foo
28599 baz
28600 " | $at_diff - "$at_stdout" || at_failed=:
28601 case $at_status in
28602    77) echo 77 > "$at_status_file"; exit 77;;
28603    1) ;;
28604    *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
28605       at_failed=:;;
28606 esac
28607 if $at_failed; then
28608
28609
28610   echo 1 > "$at_status_file"
28611   exit 1
28612 fi
28613
28614 $at_traceon
28615
28616               $at_traceoff
28617 echo "$at_srcdir/grow.at:27:
28618 mkdir oldgnu
28619 (cd oldgnu
28620 TEST_TAR_FORMAT=oldgnu
28621 export TEST_TAR_FORMAT
28622 TAR_OPTIONS=\"-H oldgnu\"
28623 export TAR_OPTIONS
28624 rm -rf *
28625
28626 genfile --file foo --length 50000k
28627 genfile --file baz
28628 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
28629         --append foo
28630 )"
28631 echo grow.at:27 >"$at_check_line_file"
28632
28633 at_trace_this=
28634 if test -n "$at_traceon"; then
28635     echo 'Not enabling shell tracing (command contains an embedded newline)'
28636 fi
28637
28638 if test -n "$at_trace_this"; then
28639     ( $at_traceon;
28640 mkdir oldgnu
28641 (cd oldgnu
28642 TEST_TAR_FORMAT=oldgnu
28643 export TEST_TAR_FORMAT
28644 TAR_OPTIONS="-H oldgnu"
28645 export TAR_OPTIONS
28646 rm -rf *
28647
28648 genfile --file foo --length 50000k
28649 genfile --file baz
28650 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
28651         --append foo
28652 ) ) >"$at_stdout" 2>"$at_stder1"
28653     at_status=$?
28654     grep '^ *+' "$at_stder1" >&2
28655     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28656 else
28657     ( :;
28658 mkdir oldgnu
28659 (cd oldgnu
28660 TEST_TAR_FORMAT=oldgnu
28661 export TEST_TAR_FORMAT
28662 TAR_OPTIONS="-H oldgnu"
28663 export TAR_OPTIONS
28664 rm -rf *
28665
28666 genfile --file foo --length 50000k
28667 genfile --file baz
28668 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
28669         --append foo
28670 ) ) >"$at_stdout" 2>"$at_stderr"
28671     at_status=$?
28672 fi
28673
28674 at_failed=false
28675 echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
28676 " | $at_diff - "$at_stderr" || at_failed=:
28677 echo >>"$at_stdout"; echo "foo
28678 baz
28679 " | $at_diff - "$at_stdout" || at_failed=:
28680 case $at_status in
28681    77) echo 77 > "$at_status_file"; exit 77;;
28682    1) ;;
28683    *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
28684       at_failed=:;;
28685 esac
28686 if $at_failed; then
28687
28688
28689   echo 1 > "$at_status_file"
28690   exit 1
28691 fi
28692
28693 $at_traceon
28694
28695               $at_traceoff
28696 echo "$at_srcdir/grow.at:27:
28697 mkdir ustar
28698 (cd ustar
28699 TEST_TAR_FORMAT=ustar
28700 export TEST_TAR_FORMAT
28701 TAR_OPTIONS=\"-H ustar\"
28702 export TAR_OPTIONS
28703 rm -rf *
28704
28705 genfile --file foo --length 50000k
28706 genfile --file baz
28707 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
28708         --append foo
28709 )"
28710 echo grow.at:27 >"$at_check_line_file"
28711
28712 at_trace_this=
28713 if test -n "$at_traceon"; then
28714     echo 'Not enabling shell tracing (command contains an embedded newline)'
28715 fi
28716
28717 if test -n "$at_trace_this"; then
28718     ( $at_traceon;
28719 mkdir ustar
28720 (cd ustar
28721 TEST_TAR_FORMAT=ustar
28722 export TEST_TAR_FORMAT
28723 TAR_OPTIONS="-H ustar"
28724 export TAR_OPTIONS
28725 rm -rf *
28726
28727 genfile --file foo --length 50000k
28728 genfile --file baz
28729 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
28730         --append foo
28731 ) ) >"$at_stdout" 2>"$at_stder1"
28732     at_status=$?
28733     grep '^ *+' "$at_stder1" >&2
28734     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28735 else
28736     ( :;
28737 mkdir ustar
28738 (cd ustar
28739 TEST_TAR_FORMAT=ustar
28740 export TEST_TAR_FORMAT
28741 TAR_OPTIONS="-H ustar"
28742 export TAR_OPTIONS
28743 rm -rf *
28744
28745 genfile --file foo --length 50000k
28746 genfile --file baz
28747 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
28748         --append foo
28749 ) ) >"$at_stdout" 2>"$at_stderr"
28750     at_status=$?
28751 fi
28752
28753 at_failed=false
28754 echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
28755 " | $at_diff - "$at_stderr" || at_failed=:
28756 echo >>"$at_stdout"; echo "foo
28757 baz
28758 " | $at_diff - "$at_stdout" || at_failed=:
28759 case $at_status in
28760    77) echo 77 > "$at_status_file"; exit 77;;
28761    1) ;;
28762    *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
28763       at_failed=:;;
28764 esac
28765 if $at_failed; then
28766
28767
28768   echo 1 > "$at_status_file"
28769   exit 1
28770 fi
28771
28772 $at_traceon
28773
28774               $at_traceoff
28775 echo "$at_srcdir/grow.at:27:
28776 mkdir posix
28777 (cd posix
28778 TEST_TAR_FORMAT=posix
28779 export TEST_TAR_FORMAT
28780 TAR_OPTIONS=\"-H posix\"
28781 export TAR_OPTIONS
28782 rm -rf *
28783
28784 genfile --file foo --length 50000k
28785 genfile --file baz
28786 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
28787         --append foo
28788 )"
28789 echo grow.at:27 >"$at_check_line_file"
28790
28791 at_trace_this=
28792 if test -n "$at_traceon"; then
28793     echo 'Not enabling shell tracing (command contains an embedded newline)'
28794 fi
28795
28796 if test -n "$at_trace_this"; then
28797     ( $at_traceon;
28798 mkdir posix
28799 (cd posix
28800 TEST_TAR_FORMAT=posix
28801 export TEST_TAR_FORMAT
28802 TAR_OPTIONS="-H posix"
28803 export TAR_OPTIONS
28804 rm -rf *
28805
28806 genfile --file foo --length 50000k
28807 genfile --file baz
28808 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
28809         --append foo
28810 ) ) >"$at_stdout" 2>"$at_stder1"
28811     at_status=$?
28812     grep '^ *+' "$at_stder1" >&2
28813     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28814 else
28815     ( :;
28816 mkdir posix
28817 (cd posix
28818 TEST_TAR_FORMAT=posix
28819 export TEST_TAR_FORMAT
28820 TAR_OPTIONS="-H posix"
28821 export TAR_OPTIONS
28822 rm -rf *
28823
28824 genfile --file foo --length 50000k
28825 genfile --file baz
28826 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
28827         --append foo
28828 ) ) >"$at_stdout" 2>"$at_stderr"
28829     at_status=$?
28830 fi
28831
28832 at_failed=false
28833 echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
28834 " | $at_diff - "$at_stderr" || at_failed=:
28835 echo >>"$at_stdout"; echo "foo
28836 baz
28837 " | $at_diff - "$at_stdout" || at_failed=:
28838 case $at_status in
28839    77) echo 77 > "$at_status_file"; exit 77;;
28840    1) ;;
28841    *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
28842       at_failed=:;;
28843 esac
28844 if $at_failed; then
28845
28846
28847   echo 1 > "$at_status_file"
28848   exit 1
28849 fi
28850
28851 $at_traceon
28852
28853               $at_traceoff
28854 echo "$at_srcdir/grow.at:27:
28855 mkdir gnu
28856 (cd gnu
28857 TEST_TAR_FORMAT=gnu
28858 export TEST_TAR_FORMAT
28859 TAR_OPTIONS=\"-H gnu\"
28860 export TAR_OPTIONS
28861 rm -rf *
28862
28863 genfile --file foo --length 50000k
28864 genfile --file baz
28865 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
28866         --append foo
28867 )"
28868 echo grow.at:27 >"$at_check_line_file"
28869
28870 at_trace_this=
28871 if test -n "$at_traceon"; then
28872     echo 'Not enabling shell tracing (command contains an embedded newline)'
28873 fi
28874
28875 if test -n "$at_trace_this"; then
28876     ( $at_traceon;
28877 mkdir gnu
28878 (cd gnu
28879 TEST_TAR_FORMAT=gnu
28880 export TEST_TAR_FORMAT
28881 TAR_OPTIONS="-H gnu"
28882 export TAR_OPTIONS
28883 rm -rf *
28884
28885 genfile --file foo --length 50000k
28886 genfile --file baz
28887 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
28888         --append foo
28889 ) ) >"$at_stdout" 2>"$at_stder1"
28890     at_status=$?
28891     grep '^ *+' "$at_stder1" >&2
28892     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28893 else
28894     ( :;
28895 mkdir gnu
28896 (cd gnu
28897 TEST_TAR_FORMAT=gnu
28898 export TEST_TAR_FORMAT
28899 TAR_OPTIONS="-H gnu"
28900 export TAR_OPTIONS
28901 rm -rf *
28902
28903 genfile --file foo --length 50000k
28904 genfile --file baz
28905 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
28906         --append foo
28907 ) ) >"$at_stdout" 2>"$at_stderr"
28908     at_status=$?
28909 fi
28910
28911 at_failed=false
28912 echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
28913 " | $at_diff - "$at_stderr" || at_failed=:
28914 echo >>"$at_stdout"; echo "foo
28915 baz
28916 " | $at_diff - "$at_stdout" || at_failed=:
28917 case $at_status in
28918    77) echo 77 > "$at_status_file"; exit 77;;
28919    1) ;;
28920    *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
28921       at_failed=:;;
28922 esac
28923 if $at_failed; then
28924
28925
28926   echo 1 > "$at_status_file"
28927   exit 1
28928 fi
28929
28930 $at_traceon
28931
28932
28933
28934
28935       $at_traceoff
28936       $at_times_p && times >"$at_times_file"
28937     ) 5>&1 2>&1 | eval $at_tee_pipe
28938     at_status=`cat "$at_status_file"`
28939     ;;
28940
28941   72 ) # 72. gtarfail.at:21: gtarfail
28942     at_setup_line='gtarfail.at:21'
28943     at_desc="gtarfail"
28944     $at_quiet $ECHO_N " 72: gtarfail                                       $ECHO_C"
28945     at_xfail=no
28946     echo "#                             -*- compilation -*-" >> "$at_group_log"
28947     (
28948       echo "72. gtarfail.at:21: testing ..."
28949       $at_traceon
28950
28951
28952
28953 unset TAR_OPTIONS
28954
28955 $at_traceoff
28956 echo "$at_srcdir/gtarfail.at:26:
28957
28958 test -z "$STAR_TESTSCRIPTS" && exit 77
28959 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
28960
28961
28962 tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail.tar
28963 "
28964 echo gtarfail.at:26 >"$at_check_line_file"
28965
28966 at_trace_this=
28967 if test -n "$at_traceon"; then
28968     echo 'Not enabling shell tracing (command contains an embedded newline)'
28969 fi
28970
28971 if test -n "$at_trace_this"; then
28972     ( $at_traceon;
28973
28974 test -z "$STAR_TESTSCRIPTS" && exit 77
28975 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
28976
28977
28978 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
28979  ) >"$at_stdout" 2>"$at_stder1"
28980     at_status=$?
28981     grep '^ *+' "$at_stder1" >&2
28982     grep -v '^ *+' "$at_stder1" >"$at_stderr"
28983 else
28984     ( :;
28985
28986 test -z "$STAR_TESTSCRIPTS" && exit 77
28987 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
28988
28989
28990 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
28991  ) >"$at_stdout" 2>"$at_stderr"
28992     at_status=$?
28993 fi
28994
28995 at_failed=false
28996 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
28997 echo >>"$at_stdout"; echo "-rw-r--r-- jes/glone       518 2001-05-25 14:41 vedpowered.gif
28998 -rw-r--r-- jes/glone      6825 1997-04-29 00:19 cd.gif
28999 -rw-r--r-- jes/glone     33354 1999-06-22 12:17 DSCN0049c.JPG
29000 -rw-r--r-- jes/glone     86159 2001-06-05 18:16 Window1.jpg
29001 -rw-r--r-- jes/glone      1310 2001-05-25 13:05 vipower.gif
29002 -rw-rw-rw- jes/glone    148753 1998-09-15 13:08 billyboy.jpg
29003 " | $at_diff - "$at_stdout" || at_failed=:
29004 case $at_status in
29005    77) echo 77 > "$at_status_file"; exit 77;;
29006    0) ;;
29007    *) echo "$at_srcdir/gtarfail.at:26: exit code was $at_status, expected 0"
29008       at_failed=:;;
29009 esac
29010 if $at_failed; then
29011
29012
29013   echo 1 > "$at_status_file"
29014   exit 1
29015 fi
29016
29017 $at_traceon
29018
29019
29020       $at_traceoff
29021       $at_times_p && times >"$at_times_file"
29022     ) 5>&1 2>&1 | eval $at_tee_pipe
29023     at_status=`cat "$at_status_file"`
29024     ;;
29025
29026   73 ) # 73. gtarfail2.at:21: gtarfail2
29027     at_setup_line='gtarfail2.at:21'
29028     at_desc="gtarfail2"
29029     $at_quiet $ECHO_N " 73: gtarfail2                                      $ECHO_C"
29030     at_xfail=no
29031     echo "#                             -*- compilation -*-" >> "$at_group_log"
29032     (
29033       echo "73. gtarfail2.at:21: testing ..."
29034       $at_traceon
29035
29036
29037
29038 unset TAR_OPTIONS
29039
29040 $at_traceoff
29041 echo "$at_srcdir/gtarfail2.at:26:
29042
29043 test -z "$STAR_TESTSCRIPTS" && exit 77
29044 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29045
29046 tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail2.tar
29047 "
29048 echo gtarfail2.at:26 >"$at_check_line_file"
29049
29050 at_trace_this=
29051 if test -n "$at_traceon"; then
29052     echo 'Not enabling shell tracing (command contains an embedded newline)'
29053 fi
29054
29055 if test -n "$at_trace_this"; then
29056     ( $at_traceon;
29057
29058 test -z "$STAR_TESTSCRIPTS" && exit 77
29059 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29060
29061 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
29062  ) >"$at_stdout" 2>"$at_stder1"
29063     at_status=$?
29064     grep '^ *+' "$at_stder1" >&2
29065     grep -v '^ *+' "$at_stder1" >"$at_stderr"
29066 else
29067     ( :;
29068
29069 test -z "$STAR_TESTSCRIPTS" && exit 77
29070 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29071
29072 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
29073  ) >"$at_stdout" 2>"$at_stderr"
29074     at_status=$?
29075 fi
29076
29077 at_failed=false
29078 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
29079 echo >>"$at_stdout"; echo "-rwxr-xr-x jes/glone       214 2001-09-21 14:08 .clean
29080 lrwxrwxrwx jes/cats          0 1998-05-07 12:39 RULES -> makefiles/RULES
29081 drwxr-sr-x jes/glone         0 2001-12-10 00:00 build/
29082 -rw-r--r-- jes/glone    312019 2001-12-10 00:00 build/smake-1.2.tar.gz
29083 drwxr-sr-x jes/glone         0 2001-11-09 18:20 build/psmake/
29084 -rwxr-xr-x jes/glone       259 2000-01-09 16:36 build/psmake/MAKE
29085 -rwxr-xr-x jes/glone      4820 2001-02-25 22:45 build/psmake/MAKE.sh
29086 -rw-r--r-- jes/glone       647 2001-02-25 23:50 build/psmake/Makefile
29087 lrwxrwxrwx jes/glone         0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c
29088 lrwxrwxrwx jes/glone         0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c
29089 " | $at_diff - "$at_stdout" || at_failed=:
29090 case $at_status in
29091    77) echo 77 > "$at_status_file"; exit 77;;
29092    0) ;;
29093    *) echo "$at_srcdir/gtarfail2.at:26: exit code was $at_status, expected 0"
29094       at_failed=:;;
29095 esac
29096 if $at_failed; then
29097
29098
29099   echo 1 > "$at_status_file"
29100   exit 1
29101 fi
29102
29103 $at_traceon
29104
29105
29106       $at_traceoff
29107       $at_times_p && times >"$at_times_file"
29108     ) 5>&1 2>&1 | eval $at_tee_pipe
29109     at_status=`cat "$at_status_file"`
29110     ;;
29111
29112   74 ) # 74. multi-fail.at:21: multi-fail
29113     at_setup_line='multi-fail.at:21'
29114     at_desc="multi-fail"
29115     $at_quiet $ECHO_N " 74: multi-fail                                     $ECHO_C"
29116     at_xfail=no
29117     echo "#                             -*- compilation -*-" >> "$at_group_log"
29118     (
29119       echo "74. multi-fail.at:21: testing ..."
29120       $at_traceon
29121
29122
29123
29124 unset TAR_OPTIONS
29125
29126 $at_traceoff
29127 echo "$at_srcdir/multi-fail.at:26:
29128
29129 test -z "$STAR_TESTSCRIPTS" && exit 77
29130 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29131
29132
29133 test -z "$STAR_TESTSCRIPTS" && exit 77
29134 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29135
29136
29137 tar --utc -tvM -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \\
29138                -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
29139 "
29140 echo multi-fail.at:26 >"$at_check_line_file"
29141
29142 at_trace_this=
29143 if test -n "$at_traceon"; then
29144     echo 'Not enabling shell tracing (command contains an embedded newline)'
29145 fi
29146
29147 if test -n "$at_trace_this"; then
29148     ( $at_traceon;
29149
29150 test -z "$STAR_TESTSCRIPTS" && exit 77
29151 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29152
29153
29154 test -z "$STAR_TESTSCRIPTS" && exit 77
29155 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29156
29157
29158 tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
29159                -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
29160  ) >"$at_stdout" 2>"$at_stder1"
29161     at_status=$?
29162     grep '^ *+' "$at_stder1" >&2
29163     grep -v '^ *+' "$at_stder1" >"$at_stderr"
29164 else
29165     ( :;
29166
29167 test -z "$STAR_TESTSCRIPTS" && exit 77
29168 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29169
29170
29171 test -z "$STAR_TESTSCRIPTS" && exit 77
29172 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29173
29174
29175 tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
29176                -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
29177  ) >"$at_stdout" 2>"$at_stderr"
29178     at_status=$?
29179 fi
29180
29181 at_failed=false
29182 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
29183 echo >>"$at_stdout"; echo "drwxrwsr-x joerg/bs          0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/
29184 -rw-r--r-- joerg/bs          1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull
29185 -rw-r--r-- joerg/bs       1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d
29186 -rw-r--r-- joerg/bs       1460 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.d
29187 -rw-r--r-- joerg/bs       1540 2003-10-10 18:06 OBJ/i386-sunos5-gcc/cpiohdr.d
29188 -rw-r--r-- joerg/bs       2245 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xheader.d
29189 -rw-r--r-- joerg/bs       1254 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xattr.d
29190 -rw-r--r-- joerg/bs       1330 2003-10-10 18:06 OBJ/i386-sunos5-gcc/list.d
29191 -rw-r--r-- joerg/bs       1745 2003-10-10 18:06 OBJ/i386-sunos5-gcc/extract.d
29192 -rw-r--r-- joerg/bs       1518 2003-10-10 18:06 OBJ/i386-sunos5-gcc/create.d
29193 -rw-r--r-- joerg/bs       1235 2003-10-10 18:06 OBJ/i386-sunos5-gcc/append.d
29194 -rw-r--r-- joerg/bs       1368 2003-10-10 18:06 OBJ/i386-sunos5-gcc/diff.d
29195 -rw-r--r-- joerg/bs       1423 2003-10-10 18:06 OBJ/i386-sunos5-gcc/remove.d
29196 -rw-r--r-- joerg/bs       1493 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.d
29197 -rw-r--r-- joerg/bs       1572 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.d
29198 -rw-r--r-- joerg/bs       1453 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.d
29199 -rw-r--r-- joerg/bs       2257 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.d
29200 -rw-r--r-- joerg/bs        969 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.d
29201 -rw-r--r-- joerg/bs       1308 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.d
29202 -rw-r--r-- joerg/bs       1287 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.d
29203 -rw-r--r-- joerg/bs       1105 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.d
29204 -rw-r--r-- joerg/bs       1230 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.d
29205 -rw-r--r-- joerg/bs       1091 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.d
29206 -rw-r--r-- joerg/bs        961 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.d
29207 -rw-r--r-- joerg/bs       1113 2003-10-10 18:07 OBJ/i386-sunos5-gcc/props.d
29208 -rw-r--r-- joerg/bs       2146 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fetchdir.d
29209 -rw-r--r-- joerg/bs       1093 2003-10-10 18:07 OBJ/i386-sunos5-gcc/unicode.d
29210 -rw-r--r-- joerg/bs       1211 2003-10-10 18:07 OBJ/i386-sunos5-gcc/subst.d
29211 -rw-r--r-- joerg/bs       2076 2003-10-11 11:53 OBJ/i386-sunos5-gcc/volhdr.d
29212 -rw-r--r-- joerg/bs       1480 2003-10-10 18:07 OBJ/i386-sunos5-gcc/chdir.d
29213 -rw-r--r-- joerg/bs      42460 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star.o
29214 -rw-r--r-- joerg/bs      22564 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.o
29215 -rw-r--r-- joerg/bs       7880 2003-10-10 18:07 OBJ/i386-sunos5-gcc/cpiohdr.o
29216 -rw-r--r-- joerg/bs      14624 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xheader.o
29217 -rw-r--r-- joerg/bs        924 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xattr.o
29218 -rw-r--r-- joerg/bs       6120 2003-10-10 18:07 OBJ/i386-sunos5-gcc/list.o
29219 -rw-r--r-- joerg/bs      12764 2003-10-10 18:07 OBJ/i386-sunos5-gcc/extract.o
29220 -rw-r--r-- joerg/bs      14668 2003-10-10 18:07 OBJ/i386-sunos5-gcc/create.o
29221 -rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/append.o
29222 -rw-r--r-- joerg/bs       7636 2003-10-10 18:07 OBJ/i386-sunos5-gcc/diff.o
29223 -rw-r--r-- joerg/bs       3072 2003-10-10 18:07 OBJ/i386-sunos5-gcc/remove.o
29224 -rw-r--r-- joerg/bs       5612 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.o
29225 -rw-r--r-- joerg/bs       6220 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.o
29226 -rw-r--r-- joerg/bs       1092 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.o
29227 -rw-r--r-- joerg/bs      20996 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.o
29228 -rw-r--r-- joerg/bs       2060 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.o
29229 -rw-r--r-- joerg/bs       1664 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.o
29230 -rw-r--r-- joerg/bs      10564 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.o
29231 -rw-r--r-- joerg/bs       3864 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.o
29232 -rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.o
29233 -rw-r--r-- joerg/bs        952 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.o
29234 -rw-r--r-- joerg/bs       2756 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.o
29235 " | $at_diff - "$at_stdout" || at_failed=:
29236 case $at_status in
29237    77) echo 77 > "$at_status_file"; exit 77;;
29238    0) ;;
29239    *) echo "$at_srcdir/multi-fail.at:26: exit code was $at_status, expected 0"
29240       at_failed=:;;
29241 esac
29242 if $at_failed; then
29243
29244
29245   echo 1 > "$at_status_file"
29246   exit 1
29247 fi
29248
29249 $at_traceon
29250
29251
29252       $at_traceoff
29253       $at_times_p && times >"$at_times_file"
29254     ) 5>&1 2>&1 | eval $at_tee_pipe
29255     at_status=`cat "$at_status_file"`
29256     ;;
29257
29258   75 ) # 75. ustar-big-2g.at:21: ustar-big-2g
29259     at_setup_line='ustar-big-2g.at:21'
29260     at_desc="ustar-big-2g"
29261     $at_quiet $ECHO_N " 75: ustar-big-2g                                   $ECHO_C"
29262     at_xfail=no
29263     echo "#                             -*- compilation -*-" >> "$at_group_log"
29264     (
29265       echo "75. ustar-big-2g.at:21: testing ..."
29266       $at_traceon
29267
29268
29269
29270 unset TAR_OPTIONS
29271
29272 $at_traceoff
29273 echo "$at_srcdir/ustar-big-2g.at:26:
29274
29275 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
29276
29277
29278 test -z "$STAR_TESTSCRIPTS" && exit 77
29279 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29280
29281
29282 tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
29283 "
29284 echo ustar-big-2g.at:26 >"$at_check_line_file"
29285
29286 at_trace_this=
29287 if test -n "$at_traceon"; then
29288     echo 'Not enabling shell tracing (command contains an embedded newline)'
29289 fi
29290
29291 if test -n "$at_trace_this"; then
29292     ( $at_traceon;
29293
29294 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
29295
29296
29297 test -z "$STAR_TESTSCRIPTS" && exit 77
29298 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29299
29300
29301 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
29302  ) >"$at_stdout" 2>"$at_stder1"
29303     at_status=$?
29304     grep '^ *+' "$at_stder1" >&2
29305     grep -v '^ *+' "$at_stder1" >"$at_stderr"
29306 else
29307     ( :;
29308
29309 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
29310
29311
29312 test -z "$STAR_TESTSCRIPTS" && exit 77
29313 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29314
29315
29316 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
29317  ) >"$at_stdout" 2>"$at_stderr"
29318     at_status=$?
29319 fi
29320
29321 at_failed=false
29322 echo stderr:; tee stderr <"$at_stderr"
29323 echo >>"$at_stdout"; echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big
29324 -rw-r--r-- jes/glone          0 2002-06-15 14:53 file
29325 " | $at_diff - "$at_stdout" || at_failed=:
29326 case $at_status in
29327    77) echo 77 > "$at_status_file"; exit 77;;
29328    0) ;;
29329    *) echo "$at_srcdir/ustar-big-2g.at:26: exit code was $at_status, expected 0"
29330       at_failed=:;;
29331 esac
29332 if $at_failed; then
29333
29334
29335   echo 1 > "$at_status_file"
29336   exit 1
29337 fi
29338
29339 $at_traceon
29340
29341
29342
29343 cat >stderr.re <<'_ATEOF'
29344 tar: Record size = .*
29345 _ATEOF
29346
29347 awk '{print NR " " $0}' stderr > $$.1
29348 awk '{print NR " " $0}' stderr.re | join - $$.1 |
29349 while read NUM RE LINE
29350 do
29351   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
29352 done
29353
29354
29355       $at_traceoff
29356       $at_times_p && times >"$at_times_file"
29357     ) 5>&1 2>&1 | eval $at_tee_pipe
29358     at_status=`cat "$at_status_file"`
29359     ;;
29360
29361   76 ) # 76. ustar-big-8g.at:21: ustar-big-8g
29362     at_setup_line='ustar-big-8g.at:21'
29363     at_desc="ustar-big-8g"
29364     $at_quiet $ECHO_N " 76: ustar-big-8g                                   $ECHO_C"
29365     at_xfail=no
29366     echo "#                             -*- compilation -*-" >> "$at_group_log"
29367     (
29368       echo "76. ustar-big-8g.at:21: testing ..."
29369       $at_traceon
29370
29371
29372
29373 unset TAR_OPTIONS
29374
29375 $at_traceoff
29376 echo "$at_srcdir/ustar-big-8g.at:26:
29377
29378 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
29379
29380
29381 test -z "$STAR_TESTSCRIPTS" && exit 77
29382 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29383
29384
29385 tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
29386 "
29387 echo ustar-big-8g.at:26 >"$at_check_line_file"
29388
29389 at_trace_this=
29390 if test -n "$at_traceon"; then
29391     echo 'Not enabling shell tracing (command contains an embedded newline)'
29392 fi
29393
29394 if test -n "$at_trace_this"; then
29395     ( $at_traceon;
29396
29397 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
29398
29399
29400 test -z "$STAR_TESTSCRIPTS" && exit 77
29401 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29402
29403
29404 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
29405  ) >"$at_stdout" 2>"$at_stder1"
29406     at_status=$?
29407     grep '^ *+' "$at_stder1" >&2
29408     grep -v '^ *+' "$at_stder1" >"$at_stderr"
29409 else
29410     ( :;
29411
29412 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
29413
29414
29415 test -z "$STAR_TESTSCRIPTS" && exit 77
29416 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29417
29418
29419 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
29420  ) >"$at_stdout" 2>"$at_stderr"
29421     at_status=$?
29422 fi
29423
29424 at_failed=false
29425 echo stderr:; tee stderr <"$at_stderr"
29426 echo >>"$at_stdout"; echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1
29427 -rw-r--r-- jes/glone          0 2002-06-15 14:53 file
29428 " | $at_diff - "$at_stdout" || at_failed=:
29429 case $at_status in
29430    77) echo 77 > "$at_status_file"; exit 77;;
29431    0) ;;
29432    *) echo "$at_srcdir/ustar-big-8g.at:26: exit code was $at_status, expected 0"
29433       at_failed=:;;
29434 esac
29435 if $at_failed; then
29436
29437
29438   echo 1 > "$at_status_file"
29439   exit 1
29440 fi
29441
29442 $at_traceon
29443
29444
29445
29446 cat >stderr.re <<'_ATEOF'
29447 tar: Record size = .*
29448 _ATEOF
29449
29450 awk '{print NR " " $0}' stderr > $$.1
29451 awk '{print NR " " $0}' stderr.re | join - $$.1 |
29452 while read NUM RE LINE
29453 do
29454   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
29455 done
29456
29457
29458       $at_traceoff
29459       $at_times_p && times >"$at_times_file"
29460     ) 5>&1 2>&1 | eval $at_tee_pipe
29461     at_status=`cat "$at_status_file"`
29462     ;;
29463
29464   77 ) # 77. pax-big-10g.at:21: pax-big-10g
29465     at_setup_line='pax-big-10g.at:21'
29466     at_desc="pax-big-10g"
29467     $at_quiet $ECHO_N " 77: pax-big-10g                                    $ECHO_C"
29468     at_xfail=no
29469     echo "#                             -*- compilation -*-" >> "$at_group_log"
29470     (
29471       echo "77. pax-big-10g.at:21: testing ..."
29472       $at_traceon
29473
29474
29475
29476 unset TAR_OPTIONS
29477
29478 $at_traceoff
29479 echo "$at_srcdir/pax-big-10g.at:26:
29480
29481 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
29482
29483
29484 test -z "$STAR_TESTSCRIPTS" && exit 77
29485 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29486
29487
29488 tar --utc -tvjf \$STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
29489 "
29490 echo pax-big-10g.at:26 >"$at_check_line_file"
29491
29492 at_trace_this=
29493 if test -n "$at_traceon"; then
29494     echo 'Not enabling shell tracing (command contains an embedded newline)'
29495 fi
29496
29497 if test -n "$at_trace_this"; then
29498     ( $at_traceon;
29499
29500 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
29501
29502
29503 test -z "$STAR_TESTSCRIPTS" && exit 77
29504 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29505
29506
29507 tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
29508  ) >"$at_stdout" 2>"$at_stder1"
29509     at_status=$?
29510     grep '^ *+' "$at_stder1" >&2
29511     grep -v '^ *+' "$at_stder1" >"$at_stderr"
29512 else
29513     ( :;
29514
29515 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
29516
29517
29518 test -z "$STAR_TESTSCRIPTS" && exit 77
29519 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
29520
29521
29522 tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
29523  ) >"$at_stdout" 2>"$at_stderr"
29524     at_status=$?
29525 fi
29526
29527 at_failed=false
29528 echo stderr:; tee stderr <"$at_stderr"
29529 echo >>"$at_stdout"; echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g
29530 -rw-r--r-- jes/glone           0 2002-06-15 14:53 file
29531 " | $at_diff - "$at_stdout" || at_failed=:
29532 case $at_status in
29533    77) echo 77 > "$at_status_file"; exit 77;;
29534    0) ;;
29535    *) echo "$at_srcdir/pax-big-10g.at:26: exit code was $at_status, expected 0"
29536       at_failed=:;;
29537 esac
29538 if $at_failed; then
29539
29540
29541   echo 1 > "$at_status_file"
29542   exit 1
29543 fi
29544
29545 $at_traceon
29546
29547
29548
29549 cat >stderr.re <<'_ATEOF'
29550 tar: Record size = .*
29551 _ATEOF
29552
29553 awk '{print NR " " $0}' stderr > $$.1
29554 awk '{print NR " " $0}' stderr.re | join - $$.1 |
29555 while read NUM RE LINE
29556 do
29557   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
29558 done
29559
29560
29561       $at_traceoff
29562       $at_times_p && times >"$at_times_file"
29563     ) 5>&1 2>&1 | eval $at_tee_pipe
29564     at_status=`cat "$at_status_file"`
29565     ;;
29566
29567
29568   * )
29569     echo "$as_me: no such test group: $at_group" >&2
29570     continue
29571     ;;
29572   esac
29573
29574   # Be sure to come back to the suite directory, in particular
29575   # since below we might `rm' the group directory we are in currently.
29576   cd "$at_suite_dir"
29577
29578   case $at_group in
29579     banner-*) ;;
29580     *)
29581       if test ! -f "$at_check_line_file"; then
29582         sed "s/^ */$as_me: warning: /" <<_ATEOF
29583         A failure happened in a test group before any test could be
29584         run. This means that test suite is improperly designed.  Please
29585         report this failure to <bug-tar@gnu.org>.
29586 _ATEOF
29587         echo "$at_setup_line" >"$at_check_line_file"
29588       fi
29589       at_group_count=`expr 1 + $at_group_count`
29590       $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
29591       echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> "$at_group_log"
29592       case $at_xfail:$at_status in
29593         yes:0)
29594             at_msg="UNEXPECTED PASS"
29595             at_xpass_list="$at_xpass_list $at_group"
29596             at_errexit=$at_errexit_p
29597             ;;
29598         no:0)
29599             at_msg="ok"
29600             at_pass_list="$at_pass_list $at_group"
29601             at_errexit=false
29602             ;;
29603         *:77)
29604             at_msg='skipped ('`cat "$at_check_line_file"`')'
29605             at_skip_list="$at_skip_list $at_group"
29606             at_errexit=false
29607             ;;
29608         yes:*)
29609             at_msg='expected failure ('`cat "$at_check_line_file"`')'
29610             at_xfail_list="$at_xfail_list $at_group"
29611             at_errexit=false
29612             ;;
29613         no:*)
29614             at_msg='FAILED ('`cat "$at_check_line_file"`')'
29615             at_fail_list="$at_fail_list $at_group"
29616             at_errexit=$at_errexit_p
29617             ;;
29618       esac
29619       # Make sure there is a separator even with long titles.
29620       echo " $at_msg"
29621       at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
29622       case $at_status in
29623         0|77)
29624           # $at_times_file is only available if the group succeeded.
29625           # We're not including the group log, so the success message
29626           # is written in the global log separately.  But we also
29627           # write to the group log in case they're using -d.
29628           if test -f "$at_times_file"; then
29629             at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
29630             rm -f "$at_times_file"
29631           fi
29632           echo "$at_log_msg" >> "$at_group_log"
29633           echo "$at_log_msg" >&5
29634
29635           # Cleanup the group directory, unless the user wants the files.
29636           if $at_debug_p ; then
29637                   {
29638             echo "#! /bin/sh"
29639             echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
29640             echo "cd '$at_dir'"
29641             echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
29642                  '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
29643             echo 'exit 1'
29644           } >$at_group_dir/run
29645           chmod +x $at_group_dir/run
29646
29647           elif test -d "$at_group_dir"; then
29648             find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
29649             rm -fr "$at_group_dir"
29650           fi
29651           ;;
29652         *)
29653           # Upon failure, include the log into the testsuite's global
29654           # log.  The failure message is written in the group log.  It
29655           # is later included in the global log.
29656           echo "$at_log_msg" >> "$at_group_log"
29657
29658           # Upon failure, keep the group directory for autopsy, and
29659           # create the debugging script.
29660                   {
29661             echo "#! /bin/sh"
29662             echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
29663             echo "cd '$at_dir'"
29664             echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
29665                  '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
29666             echo 'exit 1'
29667           } >$at_group_dir/run
29668           chmod +x $at_group_dir/run
29669
29670           $at_errexit && break
29671           ;;
29672       esac
29673       ;;
29674   esac
29675 done
29676
29677 # Back to the top directory.
29678 cd "$at_dir"
29679
29680 # Compute the duration of the suite.
29681 at_stop_date=`date`
29682 at_stop_time=`date +%s 2>/dev/null`
29683 echo "$as_me: ending at: $at_stop_date" >&5
29684 case $at_start_time,$at_stop_time in
29685   [0-9]*,[0-9]*)
29686     at_duration_s=`expr $at_stop_time - $at_start_time`
29687     at_duration_m=`expr $at_duration_s / 60`
29688     at_duration_h=`expr $at_duration_m / 60`
29689     at_duration_s=`expr $at_duration_s % 60`
29690     at_duration_m=`expr $at_duration_m % 60`
29691     at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
29692     echo "$as_me: test suite duration: $at_duration" >&5
29693     ;;
29694 esac
29695
29696 # Wrap up the test suite with summary statistics.
29697 at_skip_count=`set dummy $at_skip_list; shift; echo $#`
29698 at_fail_count=`set dummy $at_fail_list; shift; echo $#`
29699 at_xpass_count=`set dummy $at_xpass_list; shift; echo $#`
29700 at_xfail_count=`set dummy $at_xfail_list; shift; echo $#`
29701
29702 at_run_count=`expr $at_group_count - $at_skip_count`
29703 at_unexpected_count=`expr $at_xpass_count + $at_fail_count`
29704 at_total_fail_count=`expr $at_xfail_count + $at_fail_count`
29705
29706 echo
29707 cat <<\_ASBOX
29708 ## ------------- ##
29709 ## Test results. ##
29710 ## ------------- ##
29711 _ASBOX
29712 echo
29713 {
29714   echo
29715   cat <<\_ASBOX
29716 ## ------------- ##
29717 ## Test results. ##
29718 ## ------------- ##
29719 _ASBOX
29720   echo
29721 } >&5
29722
29723 if test $at_run_count = 1; then
29724   at_result="1 test"
29725   at_were=was
29726 else
29727   at_result="$at_run_count tests"
29728   at_were=were
29729 fi
29730 if $at_errexit_p && test $at_unexpected_count != 0; then
29731   if test $at_xpass_count = 1; then
29732     at_result="$at_result $at_were run, one passed"
29733   else
29734     at_result="$at_result $at_were run, one failed"
29735   fi
29736   at_result="$at_result unexpectedly and inhibited subsequent tests."
29737 else
29738   # Don't you just love exponential explosion of the number of cases?
29739   case $at_xpass_count:$at_fail_count:$at_xfail_count in
29740     # So far, so good.
29741     0:0:0) at_result="$at_result $at_were successful." ;;
29742     0:0:*) at_result="$at_result behaved as expected." ;;
29743
29744     # Some unexpected failures
29745     0:*:0) at_result="$at_result $at_were run,
29746 $at_fail_count failed unexpectedly." ;;
29747
29748     # Some failures, both expected and unexpected
29749     0:*:1) at_result="$at_result $at_were run,
29750 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
29751     0:*:*) at_result="$at_result $at_were run,
29752 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
29753
29754     # No unexpected failures, but some xpasses
29755     *:0:*) at_result="$at_result $at_were run,
29756 $at_xpass_count passed unexpectedly." ;;
29757
29758     # No expected failures, but failures and xpasses
29759     *:1:0) at_result="$at_result $at_were run,
29760 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
29761     *:*:0) at_result="$at_result $at_were run,
29762 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
29763
29764     # All of them.
29765     *:*:1) at_result="$at_result $at_were run,
29766 $at_xpass_count passed unexpectedly,
29767 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
29768     *:*:*) at_result="$at_result $at_were run,
29769 $at_xpass_count passed unexpectedly,
29770 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
29771   esac
29772
29773   if test $at_skip_count = 0 && test $at_run_count -gt 1; then
29774     at_result="All $at_result"
29775   fi
29776 fi
29777
29778 # Now put skips in the mix.
29779 case $at_skip_count in
29780   0) ;;
29781   1) at_result="$at_result
29782 1 test was skipped." ;;
29783   *) at_result="$at_result
29784 $at_skip_count tests were skipped." ;;
29785 esac
29786
29787 if test $at_unexpected_count = 0; then
29788   echo "$at_result"
29789   echo "$at_result" >&5
29790 else
29791   echo "ERROR: $at_result" >&2
29792   echo "ERROR: $at_result" >&5
29793   {
29794     echo
29795     cat <<\_ASBOX
29796 ## ------------------------ ##
29797 ## Summary of the failures. ##
29798 ## ------------------------ ##
29799 _ASBOX
29800
29801     # Summary of failed and skipped tests.
29802     if test $at_fail_count != 0; then
29803       echo "Failed tests:"
29804       $SHELL "$0" $at_fail_list --list
29805       echo
29806     fi
29807     if test $at_skip_count != 0; then
29808       echo "Skipped tests:"
29809       $SHELL "$0" $at_skip_list --list
29810       echo
29811     fi
29812     if test $at_xpass_count != 0; then
29813       echo "Unexpected passes:"
29814       $SHELL "$0" $at_xpass_list --list
29815       echo
29816     fi
29817     if test $at_fail_count != 0; then
29818       cat <<\_ASBOX
29819 ## ---------------------- ##
29820 ## Detailed failed tests. ##
29821 ## ---------------------- ##
29822 _ASBOX
29823       echo
29824       for at_group in $at_fail_list
29825       do
29826         at_group_normalized=$at_group
29827
29828   while :; do
29829     case $at_group_normalized in #(
29830     $at_format*) break;;
29831     esac
29832     at_group_normalized=0$at_group_normalized
29833   done
29834
29835         cat "$at_suite_dir/$at_group_normalized/$as_me.log"
29836         echo
29837       done
29838       echo
29839     fi
29840     if test -n "$at_top_srcdir"; then
29841       sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29842 ## ${at_top_build_prefix}config.log ##
29843 _ASBOX
29844       sed 's/^/| /' ${at_top_build_prefix}config.log
29845       echo
29846     fi
29847   } >&5
29848
29849   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
29850 ## $as_me.log was created. ##
29851 _ASBOX
29852
29853   echo
29854   echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:"
29855   echo
29856   echo "   To: <bug-tar@gnu.org>"
29857   echo "   Subject: [GNU tar 1.22] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}"
29858   echo
29859   if test $at_debug_p = false; then
29860     echo
29861     echo 'You may investigate any problem if you feel able to do so, in which'
29862     echo 'case the test suite provides a good starting point.  Its output may'
29863     echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."
29864     echo
29865   fi
29866     exit 1
29867 fi
29868
29869 exit 0
29870
29871
29872