]> git.cworth.org Git - tar/blob - tests/testsuite
Imported Upstream version 1.20
[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'
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;chtype.at:27;changed file types in incrementals;incremental chtype;
665 37;ignfail.at:23;ignfail;ignfail;
666 38;link01.at:33;link count gt 2;link01;
667 39;longv7.at:24;long names in V7 archives;longname longv7;
668 40;long01.at:28;long file names divisible by block size;longname long512;
669 41;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01;
670 42;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02;
671 43;lustar03.at:21;ustar: splitting long names;longname ustar lustar03;
672 44;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01;
673 45;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02;
674 46;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03;
675 47;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental multiv04;
676 48;multiv05.at:26;Restoring after an out of sync folume;multivolume multiv multiv05 sync;
677 49;old.at:23;old archives;old;
678 50;recurse.at:21;recurse;recurse;
679 51;same-order01.at:26;working -C with --same-order;same-order same-order01;
680 52;same-order02.at:25;multiple -C options;same-order same-order02;
681 53;shortrec.at:25;short records;shortrec.at;
682 54;sparse01.at:21;sparse files;sparse sparse01;
683 55;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02;
684 56;sparse03.at:21;storing sparse files > 8G;sparse sparse03;
685 57;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv;
686 58;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multiv sparsemvp sparsemvp00;
687 59;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01;
688 60;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multiv sparsemvp sparsemvp10;
689 61;update.at:27;update unchanged directories;update;
690 62;volume.at:23;volume;volume volcheck;
691 63;volsize.at:29;volume header size;volume volsize;
692 64;comprec.at:21;compressed format recognition;comprec;
693 65;shortfile.at:26;short input files;shortfile shortfile0;
694 66;shortupd.at:29;updating short archives;shortfile shortfile1 shortupd;
695 67;truncate.at:29;truncate;truncate filechange;
696 68;grow.at:24;grow;grow filechange;
697 69;gtarfail.at:21;gtarfail;star gtarfail;
698 70;gtarfail2.at:21;gtarfail2;star gtarfail2;
699 71;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail;
700 72;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g;
701 73;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g;
702 74;pax-big-10g.at:21;pax-big-10g;star pax-big-10g;
703 "
704
705 at_prev=
706 for at_option
707 do
708   # If the previous option needs an argument, assign it.
709   if test -n "$at_prev"; then
710     at_option=$at_prev=$at_option
711     at_prev=
712   fi
713
714   case $at_option in
715   *=*) at_optarg=`expr "x$at_option" : 'x[^=]*=\(.*\)'` ;;
716   *)   at_optarg= ;;
717   esac
718
719   # Accept the important Cygnus configure options, so we can diagnose typos.
720
721   case $at_option in
722     --help | -h )
723         at_help_p=:
724         ;;
725
726     --list | -l )
727         at_list_p=:
728         ;;
729
730     --version | -V )
731         at_version_p=:
732         ;;
733
734     --clean | -c )
735         test -d "$at_suite_dir" &&
736           find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
737         rm -f -r "$at_suite_dir" "$at_suite_log"
738         exit 0
739         ;;
740
741     --debug | -d )
742         at_debug_p=:
743         ;;
744
745     --errexit | -e )
746         at_debug_p=:
747         at_errexit_p=:
748         ;;
749
750     --verbose | -v )
751         at_verbose=echo; at_quiet=:
752         ;;
753
754     --trace | -x )
755         at_traceon='set -x'; at_traceoff='set +x'
756         ;;
757
758     [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9])
759         at_groups="$at_groups$at_option "
760         ;;
761
762     # Ranges
763     [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-)
764         at_range_start=`echo $at_option |tr -d X-`
765         at_range=`echo " $at_groups_all " | \
766           sed -e 's/^.* \('$at_range_start' \)/\1/'`
767         at_groups="$at_groups$at_range "
768         ;;
769
770     -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9])
771         at_range_end=`echo $at_option |tr -d X-`
772         at_range=`echo " $at_groups_all " | \
773           sed -e 's/\( '$at_range_end'\) .*$/\1/'`
774         at_groups="$at_groups$at_range "
775         ;;
776
777     [0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9] | \
778     [0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9] | \
779     [0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9] | \
780     [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] | \
782     [0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] )
783         at_range_start=`expr $at_option : '\(.*\)-'`
784         at_range_end=`expr $at_option : '.*-\(.*\)'`
785         if test $at_range_start -gt $at_range_end; then
786           at_tmp=$at_range_end
787           at_range_end=$at_range_start
788           at_range_start=$at_tmp
789         fi
790         at_range=`echo " $at_groups_all " | \
791           sed -e 's/^.*\( '$at_range_start' \)/\1/' \
792               -e 's/\( '$at_range_end'\) .*$/\1/'`
793         at_groups="$at_groups$at_range "
794         ;;
795
796     # Keywords.
797     --keywords | -k )
798         at_prev=--keywords
799         ;;
800     --keywords=* )
801         at_groups_selected=$at_help_all
802         at_save_IFS=$IFS
803         IFS=,
804         set X $at_optarg
805         shift
806         IFS=$at_save_IFS
807         for at_keyword
808         do
809           at_invert=
810           case $at_keyword in
811           '!'*)
812             at_invert="-v"
813             at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
814             ;;
815           esac
816           # It is on purpose that we match the test group titles too.
817           at_groups_selected=`echo "$at_groups_selected" |
818               grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"`
819         done
820         at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
821         # Smash the newlines.
822         at_groups="$at_groups`echo $at_groups_selected` "
823         ;;
824
825     *=*)
826         at_envvar=`expr "x$at_option" : 'x\([^=]*\)='`
827         # Reject names that are not valid shell variable names.
828         expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
829           { echo "$as_me: error: invalid variable name: $at_envvar" >&2
830    { (exit 1); exit 1; }; }
831         at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
832         eval "$at_envvar='$at_value'"
833         export $at_envvar
834         # Propagate to debug scripts.
835         at_debug_args="$at_debug_args $at_envvar='$at_value'"
836         ;;
837
838      *) echo "$as_me: invalid option: $at_option" >&2
839         echo "Try \`$0 --help' for more information." >&2
840         exit 1
841         ;;
842   esac
843 done
844
845 # Selected test groups.
846 if test -z "$at_groups"; then
847   at_groups=$at_groups_all
848 else
849   # Sort the tests, removing duplicates:
850   at_groups=`echo $at_groups | tr ' ' "$as_nl" | sort -nu`
851   # and add banners.  (Passing at_groups_all is tricky--see the comment
852   # starting with "Passing at_groups is tricky.")
853   at_groups=`echo "$at_groups$as_nl $at_groups_all" |
854     awk 'BEGIN { FS = "@" } # Effectively switch off field splitting.
855         /^$/ { next }  # Ignore the empty line.
856         !/ / { groups++; selected[$ 0] = 1; next }
857         # The last line, containing at_groups_all.
858         {
859                 n = split($ 0, a, " ")
860                 # If there are several tests, select their banners:
861                 if (groups > 1) {
862                         for (i = 1; i <= n; i++) {
863                                 if (a[i] ~ /^banner-/)
864                                         banner = a[i]
865                                 else if (banner != "" && selected[a[i]] == 1)
866                                         selected[banner] = 1
867                         }
868                 }
869                 for (i = 1; i <= n; i++)
870                         if (selected[a[i]] == 1)
871                                 list = list " " a[i]
872                 print list
873         }'`
874 fi
875
876 # Help message.
877 if $at_help_p; then
878   cat <<_ATEOF
879 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS]
880
881 Run all the tests, or the selected TESTS, given by numeric ranges, and
882 save a detailed log file.  Upon failure, create debugging scripts.
883
884 You should not change environment variables unless explicitly passed
885 as command line arguments.  Set \`AUTOTEST_PATH' to select the executables
886 to exercise.  Each relative directory is expanded as build and source
887 directories relatively to the top level of this distribution.  E.g.,
888
889   $ $0 AUTOTEST_PATH=bin
890
891 possibly amounts into
892
893   PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH
894 _ATEOF
895 cat <<_ATEOF
896
897 Operation modes:
898   -h, --help     print the help message, then exit
899   -V, --version  print version number, then exit
900   -c, --clean    remove all the files this test suite might create and exit
901   -l, --list     describes all the tests, or the selected TESTS
902 _ATEOF
903 cat <<_ATEOF
904
905 Execution tuning:
906   -k, --keywords=KEYWORDS
907                  select the tests matching all the comma-separated KEYWORDS
908                  multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD
909   -e, --errexit  abort as soon as a test fails; implies --debug
910   -v, --verbose  force more detailed output
911                  default for debugging scripts
912   -d, --debug    inhibit clean up and top-level logging
913                  default for debugging scripts
914   -x, --trace    enable tests shell tracing
915 _ATEOF
916 cat <<_ATEOF
917
918 Report bugs to <bug-tar@gnu.org>.
919 _ATEOF
920   exit 0
921 fi
922
923 # List of tests.
924 if $at_list_p; then
925   cat <<_ATEOF
926 GNU tar 1.20 test suite test groups:
927
928  NUM: FILE-NAME:LINE     TEST-GROUP-NAME
929       KEYWORDS
930
931 _ATEOF
932   # Passing at_groups is tricky.  We cannot use it to form a literal string
933   # or regexp because of the limitation of AIX awk.  And Solaris' awk
934   # doesn't grok more than 99 fields in a record, so we have to use `split'.
935   echo "$at_groups$as_nl$at_help_all" |
936     awk 'BEGIN { FS = ";" }
937          NR == 1 {
938            for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1
939            next
940          }
941          {
942            if (selected[$ 1]) {
943              printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
944              if ($ 4) printf "      %s\n", $ 4
945            }
946          }'
947   exit 0
948 fi
949 if $at_version_p; then
950   echo "$as_me (GNU tar 1.20)"
951   cat <<\_ACEOF
952
953 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
954 Foundation, Inc.
955 This test suite is free software; the Free Software Foundation gives
956 unlimited permission to copy, distribute and modify it.
957 _ACEOF
958   exit 0
959 fi
960
961 # Don't take risks: use only absolute directories in PATH.
962 #
963 # For stand-alone test suites, AUTOTEST_PATH is relative to `.'.
964 #
965 # For embedded test suites, AUTOTEST_PATH is relative to the top level
966 # of the package.  Then expand it into build/src parts, since users
967 # may create executables in both places.
968 AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s&:&$PATH_SEPARATOR&g"`
969 at_path=
970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
971 for as_dir in $AUTOTEST_PATH $PATH
972 do
973   IFS=$as_save_IFS
974   test -z "$as_dir" && as_dir=.
975   test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR
976 case $as_dir in
977   [\\/]* | ?:[\\/]* )
978     at_path=$at_path$as_dir
979     ;;
980   * )
981     if test -z "$at_top_build_prefix"; then
982       # Stand-alone test suite.
983       at_path=$at_path$as_dir
984     else
985       # Embedded test suite.
986       at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR
987       at_path=$at_path$at_top_srcdir/$as_dir
988     fi
989     ;;
990 esac
991 done
992 IFS=$as_save_IFS
993
994
995 # Now build and simplify PATH.
996 #
997 # There might be directories that don't exist, but don't redirect
998 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
999 PATH=
1000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1001 for as_dir in $at_path
1002 do
1003   IFS=$as_save_IFS
1004   test -z "$as_dir" && as_dir=.
1005   as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
1006 test -d "$as_dir" || continue
1007 case $PATH in
1008                   $as_dir                 | \
1009                   $as_dir$PATH_SEPARATOR* | \
1010   *$PATH_SEPARATOR$as_dir                 | \
1011   *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;
1012
1013   '') PATH=$as_dir ;;
1014    *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
1015 esac
1016 done
1017 IFS=$as_save_IFS
1018
1019 export PATH
1020
1021 # Setting up the FDs.
1022 # 5 is the log file.  Not to be overwritten if `-d'.
1023
1024 if $at_debug_p; then
1025   at_suite_log=/dev/null
1026 else
1027   : >"$at_suite_log"
1028 fi
1029 exec 5>>"$at_suite_log"
1030
1031 # Banners and logs.
1032 cat <<\_ASBOX
1033 ## ------------------------ ##
1034 ## GNU tar 1.20 test suite. ##
1035 ## ------------------------ ##
1036 _ASBOX
1037 {
1038   cat <<\_ASBOX
1039 ## ------------------------ ##
1040 ## GNU tar 1.20 test suite. ##
1041 ## ------------------------ ##
1042 _ASBOX
1043   echo
1044
1045   echo "$as_me: command line was:"
1046   echo "  $ $0 $at_cli_args"
1047   echo
1048
1049   # Try to find a few ChangeLogs in case it might help determining the
1050   # exact version.  Use the relative dir: if the top dir is a symlink,
1051   # find will not follow it (and options to follow the links are not
1052   # portable), which would result in no output here.
1053   if test -n "$at_top_srcdir"; then
1054     cat <<\_ASBOX
1055 ## ----------- ##
1056 ## ChangeLogs. ##
1057 ## ----------- ##
1058 _ASBOX
1059     echo
1060     for at_file in `find "$at_top_srcdir" -name ChangeLog -print`
1061     do
1062       echo "$as_me: $at_file:"
1063       sed 's/^/| /;10q' $at_file
1064       echo
1065     done
1066
1067     {
1068 cat <<_ASUNAME
1069 ## --------- ##
1070 ## Platform. ##
1071 ## --------- ##
1072
1073 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1074 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1075 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1076 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1077 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1078
1079 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1080 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1081
1082 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1083 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1084 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1085 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1086 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1087 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1088 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1089
1090 _ASUNAME
1091
1092 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1093 for as_dir in $PATH
1094 do
1095   IFS=$as_save_IFS
1096   test -z "$as_dir" && as_dir=.
1097   echo "PATH: $as_dir"
1098 done
1099 IFS=$as_save_IFS
1100
1101 }
1102     echo
1103   fi
1104
1105   # Contents of the config files.
1106   for at_file in atconfig atlocal
1107   do
1108     test -r $at_file || continue
1109     echo "$as_me: $at_file:"
1110     sed 's/^/| /' $at_file
1111     echo
1112   done
1113
1114   cat <<\_ASBOX
1115 ## ---------------- ##
1116 ## Tested programs. ##
1117 ## ---------------- ##
1118 _ASBOX
1119   echo
1120 } >&5
1121
1122 # Report what programs are being tested.
1123 for at_program in : $at_tested
1124 do
1125   test "$at_program" = : && continue
1126   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1127 for as_dir in $PATH
1128 do
1129   IFS=$as_save_IFS
1130   test -z "$as_dir" && as_dir=.
1131   test -f "$as_dir/$at_program" && break
1132 done
1133 IFS=$as_save_IFS
1134
1135   if test -f "$as_dir/$at_program"; then
1136     {
1137       echo "$at_srcdir/testsuite.at:92: $as_dir/$at_program --version"
1138       "$as_dir/$at_program" --version
1139       echo
1140     } >&5 2>&1
1141   else
1142     { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5
1143 echo "$as_me: error: cannot find $at_program" >&2;}
1144    { (exit 1); exit 1; }; }
1145   fi
1146 done
1147
1148 {
1149   cat <<\_ASBOX
1150 ## ------------------ ##
1151 ## Running the tests. ##
1152 ## ------------------ ##
1153 _ASBOX
1154 } >&5
1155
1156 at_start_date=`date`
1157 at_start_time=`date +%s 2>/dev/null`
1158 echo "$as_me: starting at: $at_start_date" >&5
1159 at_xpass_list=
1160 at_xfail_list=
1161 at_pass_list=
1162 at_fail_list=
1163 at_skip_list=
1164 at_group_count=0
1165
1166 # Create the master directory if it doesn't already exist.
1167 test -d "$at_suite_dir" ||
1168   mkdir "$at_suite_dir" ||
1169   { { echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5
1170 echo "$as_me: error: cannot create '$at_suite_dir'" >&2;}
1171    { (exit 1); exit 1; }; }
1172
1173 # Can we diff with `/dev/null'?  DU 5.0 refuses.
1174 if diff /dev/null /dev/null >/dev/null 2>&1; then
1175   at_devnull=/dev/null
1176 else
1177   at_devnull=$at_suite_dir/devnull
1178   >"$at_devnull"
1179 fi
1180
1181 # Use `diff -u' when possible.
1182 if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
1183 then
1184   at_diff='diff -u'
1185 else
1186   at_diff=diff
1187 fi
1188
1189
1190 for at_group in $at_groups
1191 do
1192   # Be sure to come back to the top test directory.
1193   cd "$at_suite_dir"
1194
1195   case $at_group in
1196     banner-*)
1197       at_group_log=$at_suite_log
1198       ;;
1199
1200     *)
1201       at_group_normalized=$at_group
1202
1203   while :; do
1204     case $at_group_normalized in #(
1205     $at_format*) break;;
1206     esac
1207     at_group_normalized=0$at_group_normalized
1208   done
1209
1210
1211       # Create a fresh directory for the next test group, and enter.
1212       at_group_dir=$at_suite_dir/$at_group_normalized
1213       at_group_log=$at_group_dir/$as_me.log
1214       if test -d "$at_group_dir"; then
1215         find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
1216         rm -fr "$at_group_dir"
1217       fi
1218       # Be tolerant if the above `rm' was not able to remove the directory.
1219       { as_dir=$at_group_dir
1220   case $as_dir in #(
1221   -*) as_dir=./$as_dir;;
1222   esac
1223   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
1224     as_dirs=
1225     while :; do
1226       case $as_dir in #(
1227       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
1228       *) as_qdir=$as_dir;;
1229       esac
1230       as_dirs="'$as_qdir' $as_dirs"
1231       as_dir=`$as_dirname -- "$as_dir" ||
1232 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1233          X"$as_dir" : 'X\(//\)[^/]' \| \
1234          X"$as_dir" : 'X\(//\)$' \| \
1235          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
1236 echo X"$as_dir" |
1237     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1238             s//\1/
1239             q
1240           }
1241           /^X\(\/\/\)[^/].*/{
1242             s//\1/
1243             q
1244           }
1245           /^X\(\/\/\)$/{
1246             s//\1/
1247             q
1248           }
1249           /^X\(\/\).*/{
1250             s//\1/
1251             q
1252           }
1253           s/.*/./; q'`
1254       test -d "$as_dir" && break
1255     done
1256     test -z "$as_dirs" || eval "mkdir $as_dirs"
1257   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
1258 echo "$as_me: error: cannot create directory $as_dir" >&2;}
1259    { (exit 1); exit 1; }; }; }
1260       cd $at_group_dir
1261       ;;
1262   esac
1263
1264   echo 0 > "$at_status_file"
1265
1266   # Clearly separate the test groups when verbose.
1267   test $at_group_count != 0 && $at_verbose
1268
1269   # In verbose mode, append to the log file *and* show on
1270   # the standard output; in quiet mode only write to the log
1271   if test $at_verbose = echo; then
1272     at_tee_pipe='tee -a "$at_group_log"'
1273   else
1274     at_tee_pipe='cat >> "$at_group_log"'
1275   fi
1276
1277   case $at_group in
1278   1 ) # 1. version.at:19: tar version
1279     at_setup_line='version.at:19'
1280     at_desc="tar version"
1281     $at_quiet $ECHO_N "  1: tar version                                    $ECHO_C"
1282     at_xfail=no
1283     echo "#                             -*- compilation -*-" >> "$at_group_log"
1284     (
1285       echo "1. version.at:19: testing ..."
1286       $at_traceon
1287
1288
1289 $at_traceoff
1290 echo "$at_srcdir/version.at:21: tar --version | sed 1q"
1291 echo version.at:21 >"$at_check_line_file"
1292
1293 at_trace_this=
1294 if test -n "$at_traceon"; then
1295     at_trace_this=yes
1296 fi
1297
1298 if test -n "$at_trace_this"; then
1299     ( $at_traceon; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stder1"
1300     at_status=$?
1301     grep '^ *+' "$at_stder1" >&2
1302     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1303 else
1304     ( :; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stderr"
1305     at_status=$?
1306 fi
1307
1308 at_failed=false
1309 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1310 echo >>"$at_stdout"; echo "tar (GNU tar) 1.20
1311 " | $at_diff - "$at_stdout" || at_failed=:
1312 case $at_status in
1313    77) echo 77 > "$at_status_file"; exit 77;;
1314    0) ;;
1315    *) echo "$at_srcdir/version.at:21: exit code was $at_status, expected 0"
1316       at_failed=:;;
1317 esac
1318 if $at_failed; then
1319   cat >$XFAILFILE <<'_EOT'
1320
1321 ==============================================================
1322 WARNING: Not using the proper version, *all* checks dubious...
1323 ==============================================================
1324 _EOT
1325
1326
1327   echo 1 > "$at_status_file"
1328   exit 1
1329 else
1330   rm -f $XFAILFILE
1331 fi
1332
1333 $at_traceon
1334
1335
1336       $at_traceoff
1337       $at_times_p && times >"$at_times_file"
1338     ) 5>&1 2>&1 | eval $at_tee_pipe
1339     at_status=`cat "$at_status_file"`
1340     ;;
1341
1342   2 ) # 2. pipe.at:29: decompressing from stdin
1343     at_setup_line='pipe.at:29'
1344     at_desc="decompressing from stdin"
1345     $at_quiet $ECHO_N "  2: decompressing from stdin                       $ECHO_C"
1346     at_xfail=no
1347       test -f $XFAILFILE && at_xfail=yes
1348     echo "#                             -*- compilation -*-" >> "$at_group_log"
1349     (
1350       echo "2. pipe.at:29: testing ..."
1351       $at_traceon
1352
1353
1354
1355
1356
1357
1358   $at_traceoff
1359 echo "$at_srcdir/pipe.at:33:
1360 mkdir v7
1361 (cd v7
1362 TEST_TAR_FORMAT=v7
1363 export TEST_TAR_FORMAT
1364 TAR_OPTIONS=\"-H v7\"
1365 export TAR_OPTIONS
1366 rm -rf *
1367
1368
1369 test -z "`sort < /dev/null 2>&1`" || exit 77
1370
1371
1372 mkdir directory
1373 genfile --length 10240 --pattern zeros --file directory/file1
1374 genfile --length 13 --file directory/file2
1375 tar cf archive directory|sort
1376 mv directory orig
1377 cat archive | tar xfv - | sort
1378 echo \"separator\"
1379 cmp orig/file1 directory/file1
1380 echo \"separator\"
1381 cmp orig/file2 directory/file2)"
1382 echo pipe.at:33 >"$at_check_line_file"
1383
1384 at_trace_this=
1385 if test -n "$at_traceon"; then
1386     echo 'Not enabling shell tracing (command contains an embedded newline)'
1387 fi
1388
1389 if test -n "$at_trace_this"; then
1390     ( $at_traceon;
1391 mkdir v7
1392 (cd v7
1393 TEST_TAR_FORMAT=v7
1394 export TEST_TAR_FORMAT
1395 TAR_OPTIONS="-H v7"
1396 export TAR_OPTIONS
1397 rm -rf *
1398
1399
1400 test -z "`sort < /dev/null 2>&1`" || exit 77
1401
1402
1403 mkdir directory
1404 genfile --length 10240 --pattern zeros --file directory/file1
1405 genfile --length 13 --file directory/file2
1406 tar cf archive directory|sort
1407 mv directory orig
1408 cat archive | tar xfv - | sort
1409 echo "separator"
1410 cmp orig/file1 directory/file1
1411 echo "separator"
1412 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
1413     at_status=$?
1414     grep '^ *+' "$at_stder1" >&2
1415     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1416 else
1417     ( :;
1418 mkdir v7
1419 (cd v7
1420 TEST_TAR_FORMAT=v7
1421 export TEST_TAR_FORMAT
1422 TAR_OPTIONS="-H v7"
1423 export TAR_OPTIONS
1424 rm -rf *
1425
1426
1427 test -z "`sort < /dev/null 2>&1`" || exit 77
1428
1429
1430 mkdir directory
1431 genfile --length 10240 --pattern zeros --file directory/file1
1432 genfile --length 13 --file directory/file2
1433 tar cf archive directory|sort
1434 mv directory orig
1435 cat archive | tar xfv - | sort
1436 echo "separator"
1437 cmp orig/file1 directory/file1
1438 echo "separator"
1439 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
1440     at_status=$?
1441 fi
1442
1443 at_failed=false
1444 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1445 echo >>"$at_stdout"; echo "directory/
1446 directory/file1
1447 directory/file2
1448 separator
1449 separator
1450 " | $at_diff - "$at_stdout" || at_failed=:
1451 case $at_status in
1452    77) echo 77 > "$at_status_file"; exit 77;;
1453    0) ;;
1454    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1455       at_failed=:;;
1456 esac
1457 if $at_failed; then
1458
1459
1460   echo 1 > "$at_status_file"
1461   exit 1
1462 fi
1463
1464 $at_traceon
1465 $at_traceoff
1466 echo "$at_srcdir/pipe.at:33:
1467 mkdir oldgnu
1468 (cd oldgnu
1469 TEST_TAR_FORMAT=oldgnu
1470 export TEST_TAR_FORMAT
1471 TAR_OPTIONS=\"-H oldgnu\"
1472 export TAR_OPTIONS
1473 rm -rf *
1474
1475
1476 test -z "`sort < /dev/null 2>&1`" || exit 77
1477
1478
1479 mkdir directory
1480 genfile --length 10240 --pattern zeros --file directory/file1
1481 genfile --length 13 --file directory/file2
1482 tar cf archive directory|sort
1483 mv directory orig
1484 cat archive | tar xfv - | sort
1485 echo \"separator\"
1486 cmp orig/file1 directory/file1
1487 echo \"separator\"
1488 cmp orig/file2 directory/file2)"
1489 echo pipe.at:33 >"$at_check_line_file"
1490
1491 at_trace_this=
1492 if test -n "$at_traceon"; then
1493     echo 'Not enabling shell tracing (command contains an embedded newline)'
1494 fi
1495
1496 if test -n "$at_trace_this"; then
1497     ( $at_traceon;
1498 mkdir oldgnu
1499 (cd oldgnu
1500 TEST_TAR_FORMAT=oldgnu
1501 export TEST_TAR_FORMAT
1502 TAR_OPTIONS="-H oldgnu"
1503 export TAR_OPTIONS
1504 rm -rf *
1505
1506
1507 test -z "`sort < /dev/null 2>&1`" || exit 77
1508
1509
1510 mkdir directory
1511 genfile --length 10240 --pattern zeros --file directory/file1
1512 genfile --length 13 --file directory/file2
1513 tar cf archive directory|sort
1514 mv directory orig
1515 cat archive | tar xfv - | sort
1516 echo "separator"
1517 cmp orig/file1 directory/file1
1518 echo "separator"
1519 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
1520     at_status=$?
1521     grep '^ *+' "$at_stder1" >&2
1522     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1523 else
1524     ( :;
1525 mkdir oldgnu
1526 (cd oldgnu
1527 TEST_TAR_FORMAT=oldgnu
1528 export TEST_TAR_FORMAT
1529 TAR_OPTIONS="-H oldgnu"
1530 export TAR_OPTIONS
1531 rm -rf *
1532
1533
1534 test -z "`sort < /dev/null 2>&1`" || exit 77
1535
1536
1537 mkdir directory
1538 genfile --length 10240 --pattern zeros --file directory/file1
1539 genfile --length 13 --file directory/file2
1540 tar cf archive directory|sort
1541 mv directory orig
1542 cat archive | tar xfv - | sort
1543 echo "separator"
1544 cmp orig/file1 directory/file1
1545 echo "separator"
1546 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
1547     at_status=$?
1548 fi
1549
1550 at_failed=false
1551 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1552 echo >>"$at_stdout"; echo "directory/
1553 directory/file1
1554 directory/file2
1555 separator
1556 separator
1557 " | $at_diff - "$at_stdout" || at_failed=:
1558 case $at_status in
1559    77) echo 77 > "$at_status_file"; exit 77;;
1560    0) ;;
1561    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1562       at_failed=:;;
1563 esac
1564 if $at_failed; then
1565
1566
1567   echo 1 > "$at_status_file"
1568   exit 1
1569 fi
1570
1571 $at_traceon
1572 $at_traceoff
1573 echo "$at_srcdir/pipe.at:33:
1574 mkdir ustar
1575 (cd ustar
1576 TEST_TAR_FORMAT=ustar
1577 export TEST_TAR_FORMAT
1578 TAR_OPTIONS=\"-H ustar\"
1579 export TAR_OPTIONS
1580 rm -rf *
1581
1582
1583 test -z "`sort < /dev/null 2>&1`" || exit 77
1584
1585
1586 mkdir directory
1587 genfile --length 10240 --pattern zeros --file directory/file1
1588 genfile --length 13 --file directory/file2
1589 tar cf archive directory|sort
1590 mv directory orig
1591 cat archive | tar xfv - | sort
1592 echo \"separator\"
1593 cmp orig/file1 directory/file1
1594 echo \"separator\"
1595 cmp orig/file2 directory/file2)"
1596 echo pipe.at:33 >"$at_check_line_file"
1597
1598 at_trace_this=
1599 if test -n "$at_traceon"; then
1600     echo 'Not enabling shell tracing (command contains an embedded newline)'
1601 fi
1602
1603 if test -n "$at_trace_this"; then
1604     ( $at_traceon;
1605 mkdir ustar
1606 (cd ustar
1607 TEST_TAR_FORMAT=ustar
1608 export TEST_TAR_FORMAT
1609 TAR_OPTIONS="-H ustar"
1610 export TAR_OPTIONS
1611 rm -rf *
1612
1613
1614 test -z "`sort < /dev/null 2>&1`" || exit 77
1615
1616
1617 mkdir directory
1618 genfile --length 10240 --pattern zeros --file directory/file1
1619 genfile --length 13 --file directory/file2
1620 tar cf archive directory|sort
1621 mv directory orig
1622 cat archive | tar xfv - | sort
1623 echo "separator"
1624 cmp orig/file1 directory/file1
1625 echo "separator"
1626 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
1627     at_status=$?
1628     grep '^ *+' "$at_stder1" >&2
1629     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1630 else
1631     ( :;
1632 mkdir ustar
1633 (cd ustar
1634 TEST_TAR_FORMAT=ustar
1635 export TEST_TAR_FORMAT
1636 TAR_OPTIONS="-H ustar"
1637 export TAR_OPTIONS
1638 rm -rf *
1639
1640
1641 test -z "`sort < /dev/null 2>&1`" || exit 77
1642
1643
1644 mkdir directory
1645 genfile --length 10240 --pattern zeros --file directory/file1
1646 genfile --length 13 --file directory/file2
1647 tar cf archive directory|sort
1648 mv directory orig
1649 cat archive | tar xfv - | sort
1650 echo "separator"
1651 cmp orig/file1 directory/file1
1652 echo "separator"
1653 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
1654     at_status=$?
1655 fi
1656
1657 at_failed=false
1658 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1659 echo >>"$at_stdout"; echo "directory/
1660 directory/file1
1661 directory/file2
1662 separator
1663 separator
1664 " | $at_diff - "$at_stdout" || at_failed=:
1665 case $at_status in
1666    77) echo 77 > "$at_status_file"; exit 77;;
1667    0) ;;
1668    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1669       at_failed=:;;
1670 esac
1671 if $at_failed; then
1672
1673
1674   echo 1 > "$at_status_file"
1675   exit 1
1676 fi
1677
1678 $at_traceon
1679 $at_traceoff
1680 echo "$at_srcdir/pipe.at:33:
1681 mkdir posix
1682 (cd posix
1683 TEST_TAR_FORMAT=posix
1684 export TEST_TAR_FORMAT
1685 TAR_OPTIONS=\"-H posix\"
1686 export TAR_OPTIONS
1687 rm -rf *
1688
1689
1690 test -z "`sort < /dev/null 2>&1`" || exit 77
1691
1692
1693 mkdir directory
1694 genfile --length 10240 --pattern zeros --file directory/file1
1695 genfile --length 13 --file directory/file2
1696 tar cf archive directory|sort
1697 mv directory orig
1698 cat archive | tar xfv - | sort
1699 echo \"separator\"
1700 cmp orig/file1 directory/file1
1701 echo \"separator\"
1702 cmp orig/file2 directory/file2)"
1703 echo pipe.at:33 >"$at_check_line_file"
1704
1705 at_trace_this=
1706 if test -n "$at_traceon"; then
1707     echo 'Not enabling shell tracing (command contains an embedded newline)'
1708 fi
1709
1710 if test -n "$at_trace_this"; then
1711     ( $at_traceon;
1712 mkdir posix
1713 (cd posix
1714 TEST_TAR_FORMAT=posix
1715 export TEST_TAR_FORMAT
1716 TAR_OPTIONS="-H posix"
1717 export TAR_OPTIONS
1718 rm -rf *
1719
1720
1721 test -z "`sort < /dev/null 2>&1`" || exit 77
1722
1723
1724 mkdir directory
1725 genfile --length 10240 --pattern zeros --file directory/file1
1726 genfile --length 13 --file directory/file2
1727 tar cf archive directory|sort
1728 mv directory orig
1729 cat archive | tar xfv - | sort
1730 echo "separator"
1731 cmp orig/file1 directory/file1
1732 echo "separator"
1733 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
1734     at_status=$?
1735     grep '^ *+' "$at_stder1" >&2
1736     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1737 else
1738     ( :;
1739 mkdir posix
1740 (cd posix
1741 TEST_TAR_FORMAT=posix
1742 export TEST_TAR_FORMAT
1743 TAR_OPTIONS="-H posix"
1744 export TAR_OPTIONS
1745 rm -rf *
1746
1747
1748 test -z "`sort < /dev/null 2>&1`" || exit 77
1749
1750
1751 mkdir directory
1752 genfile --length 10240 --pattern zeros --file directory/file1
1753 genfile --length 13 --file directory/file2
1754 tar cf archive directory|sort
1755 mv directory orig
1756 cat archive | tar xfv - | sort
1757 echo "separator"
1758 cmp orig/file1 directory/file1
1759 echo "separator"
1760 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
1761     at_status=$?
1762 fi
1763
1764 at_failed=false
1765 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1766 echo >>"$at_stdout"; echo "directory/
1767 directory/file1
1768 directory/file2
1769 separator
1770 separator
1771 " | $at_diff - "$at_stdout" || at_failed=:
1772 case $at_status in
1773    77) echo 77 > "$at_status_file"; exit 77;;
1774    0) ;;
1775    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1776       at_failed=:;;
1777 esac
1778 if $at_failed; then
1779
1780
1781   echo 1 > "$at_status_file"
1782   exit 1
1783 fi
1784
1785 $at_traceon
1786 $at_traceoff
1787 echo "$at_srcdir/pipe.at:33:
1788 mkdir gnu
1789 (cd gnu
1790 TEST_TAR_FORMAT=gnu
1791 export TEST_TAR_FORMAT
1792 TAR_OPTIONS=\"-H gnu\"
1793 export TAR_OPTIONS
1794 rm -rf *
1795
1796
1797 test -z "`sort < /dev/null 2>&1`" || exit 77
1798
1799
1800 mkdir directory
1801 genfile --length 10240 --pattern zeros --file directory/file1
1802 genfile --length 13 --file directory/file2
1803 tar cf archive directory|sort
1804 mv directory orig
1805 cat archive | tar xfv - | sort
1806 echo \"separator\"
1807 cmp orig/file1 directory/file1
1808 echo \"separator\"
1809 cmp orig/file2 directory/file2)"
1810 echo pipe.at:33 >"$at_check_line_file"
1811
1812 at_trace_this=
1813 if test -n "$at_traceon"; then
1814     echo 'Not enabling shell tracing (command contains an embedded newline)'
1815 fi
1816
1817 if test -n "$at_trace_this"; then
1818     ( $at_traceon;
1819 mkdir gnu
1820 (cd gnu
1821 TEST_TAR_FORMAT=gnu
1822 export TEST_TAR_FORMAT
1823 TAR_OPTIONS="-H gnu"
1824 export TAR_OPTIONS
1825 rm -rf *
1826
1827
1828 test -z "`sort < /dev/null 2>&1`" || exit 77
1829
1830
1831 mkdir directory
1832 genfile --length 10240 --pattern zeros --file directory/file1
1833 genfile --length 13 --file directory/file2
1834 tar cf archive directory|sort
1835 mv directory orig
1836 cat archive | tar xfv - | sort
1837 echo "separator"
1838 cmp orig/file1 directory/file1
1839 echo "separator"
1840 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1"
1841     at_status=$?
1842     grep '^ *+' "$at_stder1" >&2
1843     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1844 else
1845     ( :;
1846 mkdir gnu
1847 (cd gnu
1848 TEST_TAR_FORMAT=gnu
1849 export TEST_TAR_FORMAT
1850 TAR_OPTIONS="-H gnu"
1851 export TAR_OPTIONS
1852 rm -rf *
1853
1854
1855 test -z "`sort < /dev/null 2>&1`" || exit 77
1856
1857
1858 mkdir directory
1859 genfile --length 10240 --pattern zeros --file directory/file1
1860 genfile --length 13 --file directory/file2
1861 tar cf archive directory|sort
1862 mv directory orig
1863 cat archive | tar xfv - | sort
1864 echo "separator"
1865 cmp orig/file1 directory/file1
1866 echo "separator"
1867 cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr"
1868     at_status=$?
1869 fi
1870
1871 at_failed=false
1872 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1873 echo >>"$at_stdout"; echo "directory/
1874 directory/file1
1875 directory/file2
1876 separator
1877 separator
1878 " | $at_diff - "$at_stdout" || at_failed=:
1879 case $at_status in
1880    77) echo 77 > "$at_status_file"; exit 77;;
1881    0) ;;
1882    *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0"
1883       at_failed=:;;
1884 esac
1885 if $at_failed; then
1886
1887
1888   echo 1 > "$at_status_file"
1889   exit 1
1890 fi
1891
1892 $at_traceon
1893
1894
1895
1896       $at_traceoff
1897       $at_times_p && times >"$at_times_file"
1898     ) 5>&1 2>&1 | eval $at_tee_pipe
1899     at_status=`cat "$at_status_file"`
1900     ;;
1901
1902   3 ) # 3. options.at:24: mixing options
1903     at_setup_line='options.at:24'
1904     at_desc="mixing options"
1905     $at_quiet $ECHO_N "  3: mixing options                                 $ECHO_C"
1906     at_xfail=no
1907     echo "#                             -*- compilation -*-" >> "$at_group_log"
1908     (
1909       echo "3. options.at:24: testing ..."
1910       $at_traceon
1911
1912
1913
1914 $at_traceoff
1915 echo "$at_srcdir/options.at:27:
1916 echo > file1
1917 TAR_OPTIONS=--numeric-owner tar chof archive file1
1918 tar tf archive
1919 "
1920 echo options.at:27 >"$at_check_line_file"
1921
1922 at_trace_this=
1923 if test -n "$at_traceon"; then
1924     echo 'Not enabling shell tracing (command contains an embedded newline)'
1925 fi
1926
1927 if test -n "$at_trace_this"; then
1928     ( $at_traceon;
1929 echo > file1
1930 TAR_OPTIONS=--numeric-owner tar chof archive file1
1931 tar tf archive
1932  ) >"$at_stdout" 2>"$at_stder1"
1933     at_status=$?
1934     grep '^ *+' "$at_stder1" >&2
1935     grep -v '^ *+' "$at_stder1" >"$at_stderr"
1936 else
1937     ( :;
1938 echo > file1
1939 TAR_OPTIONS=--numeric-owner tar chof archive file1
1940 tar tf archive
1941  ) >"$at_stdout" 2>"$at_stderr"
1942     at_status=$?
1943 fi
1944
1945 at_failed=false
1946 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
1947 echo >>"$at_stdout"; echo "file1
1948 " | $at_diff - "$at_stdout" || at_failed=:
1949 case $at_status in
1950    77) echo 77 > "$at_status_file"; exit 77;;
1951    0) ;;
1952    *) echo "$at_srcdir/options.at:27: exit code was $at_status, expected 0"
1953       at_failed=:;;
1954 esac
1955 if $at_failed; then
1956
1957
1958   echo 1 > "$at_status_file"
1959   exit 1
1960 fi
1961
1962 $at_traceon
1963
1964
1965       $at_traceoff
1966       $at_times_p && times >"$at_times_file"
1967     ) 5>&1 2>&1 | eval $at_tee_pipe
1968     at_status=`cat "$at_status_file"`
1969     ;;
1970
1971   4 ) # 4. options02.at:26: interspersed options
1972     at_setup_line='options02.at:26'
1973     at_desc="interspersed options"
1974     $at_quiet $ECHO_N "  4: interspersed options                           $ECHO_C"
1975     at_xfail=no
1976     echo "#                             -*- compilation -*-" >> "$at_group_log"
1977     (
1978       echo "4. options02.at:26: testing ..."
1979       $at_traceon
1980
1981
1982
1983 $at_traceoff
1984 echo "$at_srcdir/options02.at:29:
1985 echo > file1
1986 tar c file1 -f archive
1987 tar tf archive
1988 "
1989 echo options02.at:29 >"$at_check_line_file"
1990
1991 at_trace_this=
1992 if test -n "$at_traceon"; then
1993     echo 'Not enabling shell tracing (command contains an embedded newline)'
1994 fi
1995
1996 if test -n "$at_trace_this"; then
1997     ( $at_traceon;
1998 echo > file1
1999 tar c file1 -f archive
2000 tar tf archive
2001  ) >"$at_stdout" 2>"$at_stder1"
2002     at_status=$?
2003     grep '^ *+' "$at_stder1" >&2
2004     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2005 else
2006     ( :;
2007 echo > file1
2008 tar c file1 -f archive
2009 tar tf archive
2010  ) >"$at_stdout" 2>"$at_stderr"
2011     at_status=$?
2012 fi
2013
2014 at_failed=false
2015 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2016 echo >>"$at_stdout"; echo "file1
2017 " | $at_diff - "$at_stdout" || at_failed=:
2018 case $at_status in
2019    77) echo 77 > "$at_status_file"; exit 77;;
2020    0) ;;
2021    *) echo "$at_srcdir/options02.at:29: exit code was $at_status, expected 0"
2022       at_failed=:;;
2023 esac
2024 if $at_failed; then
2025
2026
2027   echo 1 > "$at_status_file"
2028   exit 1
2029 fi
2030
2031 $at_traceon
2032
2033
2034       $at_traceoff
2035       $at_times_p && times >"$at_times_file"
2036     ) 5>&1 2>&1 | eval $at_tee_pipe
2037     at_status=`cat "$at_status_file"`
2038     ;;
2039
2040   5 ) # 5. T-empty.at:26: files-from: empty entries
2041     at_setup_line='T-empty.at:26'
2042     at_desc="files-from: empty entries"
2043     $at_quiet $ECHO_N "  5: files-from: empty entries                      $ECHO_C"
2044     at_xfail=no
2045       test -f $XFAILFILE && at_xfail=yes
2046     echo "#                             -*- compilation -*-" >> "$at_group_log"
2047     (
2048       echo "5. T-empty.at:26: testing ..."
2049       $at_traceon
2050
2051
2052
2053 cat >file-list <<'_ATEOF'
2054 jeden
2055 dwa
2056
2057 trzy
2058 _ATEOF
2059
2060
2061
2062
2063   $at_traceoff
2064 echo "$at_srcdir/T-empty.at:36:
2065 mkdir ustar
2066 (cd ustar
2067 TEST_TAR_FORMAT=ustar
2068 export TEST_TAR_FORMAT
2069 TAR_OPTIONS=\"-H ustar\"
2070 export TAR_OPTIONS
2071 rm -rf *
2072
2073
2074 test -z "`sort < /dev/null 2>&1`" || exit 77
2075
2076
2077 genfile --file jeden
2078 genfile --file dwa
2079 genfile --file trzy
2080
2081 tar cfvT archive ../file-list | sort
2082 )"
2083 echo T-empty.at:36 >"$at_check_line_file"
2084
2085 at_trace_this=
2086 if test -n "$at_traceon"; then
2087     echo 'Not enabling shell tracing (command contains an embedded newline)'
2088 fi
2089
2090 if test -n "$at_trace_this"; then
2091     ( $at_traceon;
2092 mkdir ustar
2093 (cd ustar
2094 TEST_TAR_FORMAT=ustar
2095 export TEST_TAR_FORMAT
2096 TAR_OPTIONS="-H ustar"
2097 export TAR_OPTIONS
2098 rm -rf *
2099
2100
2101 test -z "`sort < /dev/null 2>&1`" || exit 77
2102
2103
2104 genfile --file jeden
2105 genfile --file dwa
2106 genfile --file trzy
2107
2108 tar cfvT archive ../file-list | sort
2109 ) ) >"$at_stdout" 2>"$at_stder1"
2110     at_status=$?
2111     grep '^ *+' "$at_stder1" >&2
2112     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2113 else
2114     ( :;
2115 mkdir ustar
2116 (cd ustar
2117 TEST_TAR_FORMAT=ustar
2118 export TEST_TAR_FORMAT
2119 TAR_OPTIONS="-H ustar"
2120 export TAR_OPTIONS
2121 rm -rf *
2122
2123
2124 test -z "`sort < /dev/null 2>&1`" || exit 77
2125
2126
2127 genfile --file jeden
2128 genfile --file dwa
2129 genfile --file trzy
2130
2131 tar cfvT archive ../file-list | sort
2132 ) ) >"$at_stdout" 2>"$at_stderr"
2133     at_status=$?
2134 fi
2135
2136 at_failed=false
2137 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2138 echo >>"$at_stdout"; echo "dwa
2139 jeden
2140 trzy
2141 " | $at_diff - "$at_stdout" || at_failed=:
2142 case $at_status in
2143    77) echo 77 > "$at_status_file"; exit 77;;
2144    0) ;;
2145    *) echo "$at_srcdir/T-empty.at:36: exit code was $at_status, expected 0"
2146       at_failed=:;;
2147 esac
2148 if $at_failed; then
2149
2150
2151   echo 1 > "$at_status_file"
2152   exit 1
2153 fi
2154
2155 $at_traceon
2156
2157  # Testing one format is enough
2158
2159       $at_traceoff
2160       $at_times_p && times >"$at_times_file"
2161     ) 5>&1 2>&1 | eval $at_tee_pipe
2162     at_status=`cat "$at_status_file"`
2163     ;;
2164
2165   6 ) # 6. T-null.at:21: files-from: 0-separated file without -0
2166     at_setup_line='T-null.at:21'
2167     at_desc="files-from: 0-separated file without -0"
2168     $at_quiet $ECHO_N "  6: files-from: 0-separated file without -0        $ECHO_C"
2169     at_xfail=no
2170       test -f $XFAILFILE && at_xfail=yes
2171     echo "#                             -*- compilation -*-" >> "$at_group_log"
2172     (
2173       echo "6. T-null.at:21: testing ..."
2174       $at_traceon
2175
2176
2177
2178 cat >expout <<'_ATEOF'
2179 jeden\ndwa
2180 trzy
2181 _ATEOF
2182
2183
2184
2185
2186   $at_traceoff
2187 echo "$at_srcdir/T-null.at:28:
2188 mkdir ustar
2189 (cd ustar
2190 TEST_TAR_FORMAT=ustar
2191 export TEST_TAR_FORMAT
2192 TAR_OPTIONS=\"-H ustar\"
2193 export TAR_OPTIONS
2194 rm -rf *
2195
2196
2197 test -z "`sort < /dev/null 2>&1`" || exit 77
2198
2199
2200 echo dwa > temp
2201 echo trzy >> temp
2202 cat temp | tr '\\n' '\\0' > temp1
2203 echo jeden > file-list
2204 cat temp1 >> file-list
2205
2206 genfile -f \"jeden
2207 dwa\" || exit 77
2208 genfile -f trzy
2209
2210 tar cfTv archive file-list | sort
2211 )"
2212 echo T-null.at:28 >"$at_check_line_file"
2213
2214 at_trace_this=
2215 if test -n "$at_traceon"; then
2216     echo 'Not enabling shell tracing (command contains an embedded newline)'
2217 fi
2218
2219 if test -n "$at_trace_this"; then
2220     ( $at_traceon;
2221 mkdir ustar
2222 (cd ustar
2223 TEST_TAR_FORMAT=ustar
2224 export TEST_TAR_FORMAT
2225 TAR_OPTIONS="-H ustar"
2226 export TAR_OPTIONS
2227 rm -rf *
2228
2229
2230 test -z "`sort < /dev/null 2>&1`" || exit 77
2231
2232
2233 echo dwa > temp
2234 echo trzy >> temp
2235 cat temp | tr '\n' '\0' > temp1
2236 echo jeden > file-list
2237 cat temp1 >> file-list
2238
2239 genfile -f "jeden
2240 dwa" || exit 77
2241 genfile -f trzy
2242
2243 tar cfTv archive file-list | sort
2244 ) ) >"$at_stdout" 2>"$at_stder1"
2245     at_status=$?
2246     grep '^ *+' "$at_stder1" >&2
2247     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2248 else
2249     ( :;
2250 mkdir ustar
2251 (cd ustar
2252 TEST_TAR_FORMAT=ustar
2253 export TEST_TAR_FORMAT
2254 TAR_OPTIONS="-H ustar"
2255 export TAR_OPTIONS
2256 rm -rf *
2257
2258
2259 test -z "`sort < /dev/null 2>&1`" || exit 77
2260
2261
2262 echo dwa > temp
2263 echo trzy >> temp
2264 cat temp | tr '\n' '\0' > temp1
2265 echo jeden > file-list
2266 cat temp1 >> file-list
2267
2268 genfile -f "jeden
2269 dwa" || exit 77
2270 genfile -f trzy
2271
2272 tar cfTv archive file-list | sort
2273 ) ) >"$at_stdout" 2>"$at_stderr"
2274     at_status=$?
2275 fi
2276
2277 at_failed=false
2278 echo >>"$at_stderr"; echo "tar: file-list: file name read contains nul character
2279 " | $at_diff - "$at_stderr" || at_failed=:
2280 $at_diff expout "$at_stdout" || at_failed=:
2281 case $at_status in
2282    77) echo 77 > "$at_status_file"; exit 77;;
2283    0) ;;
2284    *) echo "$at_srcdir/T-null.at:28: exit code was $at_status, expected 0"
2285       at_failed=:;;
2286 esac
2287 if $at_failed; then
2288
2289
2290   echo 1 > "$at_status_file"
2291   exit 1
2292 fi
2293
2294 $at_traceon
2295
2296  # Testing one format is enough
2297
2298       $at_traceoff
2299       $at_times_p && times >"$at_times_file"
2300     ) 5>&1 2>&1 | eval $at_tee_pipe
2301     at_status=`cat "$at_status_file"`
2302     ;;
2303
2304   7 ) # 7. indexfile.at:26: tar --index-file=FILE --file=-
2305     at_setup_line='indexfile.at:26'
2306     at_desc="tar --index-file=FILE --file=-"
2307     $at_quiet $ECHO_N "  7: tar --index-file=FILE --file=-                 $ECHO_C"
2308     at_xfail=no
2309       test -f $XFAILFILE && at_xfail=yes
2310     echo "#                             -*- compilation -*-" >> "$at_group_log"
2311     (
2312       echo "7. indexfile.at:26: testing ..."
2313       $at_traceon
2314
2315
2316
2317
2318
2319   $at_traceoff
2320 echo "$at_srcdir/indexfile.at:29:
2321 mkdir v7
2322 (cd v7
2323 TEST_TAR_FORMAT=v7
2324 export TEST_TAR_FORMAT
2325 TAR_OPTIONS=\"-H v7\"
2326 export TAR_OPTIONS
2327 rm -rf *
2328
2329
2330 mkdir directory
2331 genfile --file=directory/a --length=1035
2332
2333 echo \"Creating the archive\"
2334 tar -c -v -f - --index-file=idx directory > archive
2335
2336 echo \"Testing the archive\"
2337 tar -tf archive
2338 )"
2339 echo indexfile.at:29 >"$at_check_line_file"
2340
2341 at_trace_this=
2342 if test -n "$at_traceon"; then
2343     echo 'Not enabling shell tracing (command contains an embedded newline)'
2344 fi
2345
2346 if test -n "$at_trace_this"; then
2347     ( $at_traceon;
2348 mkdir v7
2349 (cd v7
2350 TEST_TAR_FORMAT=v7
2351 export TEST_TAR_FORMAT
2352 TAR_OPTIONS="-H v7"
2353 export TAR_OPTIONS
2354 rm -rf *
2355
2356
2357 mkdir directory
2358 genfile --file=directory/a --length=1035
2359
2360 echo "Creating the archive"
2361 tar -c -v -f - --index-file=idx directory > archive
2362
2363 echo "Testing the archive"
2364 tar -tf archive
2365 ) ) >"$at_stdout" 2>"$at_stder1"
2366     at_status=$?
2367     grep '^ *+' "$at_stder1" >&2
2368     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2369 else
2370     ( :;
2371 mkdir v7
2372 (cd v7
2373 TEST_TAR_FORMAT=v7
2374 export TEST_TAR_FORMAT
2375 TAR_OPTIONS="-H v7"
2376 export TAR_OPTIONS
2377 rm -rf *
2378
2379
2380 mkdir directory
2381 genfile --file=directory/a --length=1035
2382
2383 echo "Creating the archive"
2384 tar -c -v -f - --index-file=idx directory > archive
2385
2386 echo "Testing the archive"
2387 tar -tf archive
2388 ) ) >"$at_stdout" 2>"$at_stderr"
2389     at_status=$?
2390 fi
2391
2392 at_failed=false
2393 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2394 echo >>"$at_stdout"; echo "Creating the archive
2395 Testing the archive
2396 directory/
2397 directory/a
2398 " | $at_diff - "$at_stdout" || at_failed=:
2399 case $at_status in
2400    77) echo 77 > "$at_status_file"; exit 77;;
2401    0) ;;
2402    *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
2403       at_failed=:;;
2404 esac
2405 if $at_failed; then
2406
2407
2408   echo 1 > "$at_status_file"
2409   exit 1
2410 fi
2411
2412 $at_traceon
2413 $at_traceoff
2414 echo "$at_srcdir/indexfile.at:29:
2415 mkdir oldgnu
2416 (cd oldgnu
2417 TEST_TAR_FORMAT=oldgnu
2418 export TEST_TAR_FORMAT
2419 TAR_OPTIONS=\"-H oldgnu\"
2420 export TAR_OPTIONS
2421 rm -rf *
2422
2423
2424 mkdir directory
2425 genfile --file=directory/a --length=1035
2426
2427 echo \"Creating the archive\"
2428 tar -c -v -f - --index-file=idx directory > archive
2429
2430 echo \"Testing the archive\"
2431 tar -tf archive
2432 )"
2433 echo indexfile.at:29 >"$at_check_line_file"
2434
2435 at_trace_this=
2436 if test -n "$at_traceon"; then
2437     echo 'Not enabling shell tracing (command contains an embedded newline)'
2438 fi
2439
2440 if test -n "$at_trace_this"; then
2441     ( $at_traceon;
2442 mkdir oldgnu
2443 (cd oldgnu
2444 TEST_TAR_FORMAT=oldgnu
2445 export TEST_TAR_FORMAT
2446 TAR_OPTIONS="-H oldgnu"
2447 export TAR_OPTIONS
2448 rm -rf *
2449
2450
2451 mkdir directory
2452 genfile --file=directory/a --length=1035
2453
2454 echo "Creating the archive"
2455 tar -c -v -f - --index-file=idx directory > archive
2456
2457 echo "Testing the archive"
2458 tar -tf archive
2459 ) ) >"$at_stdout" 2>"$at_stder1"
2460     at_status=$?
2461     grep '^ *+' "$at_stder1" >&2
2462     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2463 else
2464     ( :;
2465 mkdir oldgnu
2466 (cd oldgnu
2467 TEST_TAR_FORMAT=oldgnu
2468 export TEST_TAR_FORMAT
2469 TAR_OPTIONS="-H oldgnu"
2470 export TAR_OPTIONS
2471 rm -rf *
2472
2473
2474 mkdir directory
2475 genfile --file=directory/a --length=1035
2476
2477 echo "Creating the archive"
2478 tar -c -v -f - --index-file=idx directory > archive
2479
2480 echo "Testing the archive"
2481 tar -tf archive
2482 ) ) >"$at_stdout" 2>"$at_stderr"
2483     at_status=$?
2484 fi
2485
2486 at_failed=false
2487 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2488 echo >>"$at_stdout"; echo "Creating the archive
2489 Testing the archive
2490 directory/
2491 directory/a
2492 " | $at_diff - "$at_stdout" || at_failed=:
2493 case $at_status in
2494    77) echo 77 > "$at_status_file"; exit 77;;
2495    0) ;;
2496    *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
2497       at_failed=:;;
2498 esac
2499 if $at_failed; then
2500
2501
2502   echo 1 > "$at_status_file"
2503   exit 1
2504 fi
2505
2506 $at_traceon
2507 $at_traceoff
2508 echo "$at_srcdir/indexfile.at:29:
2509 mkdir ustar
2510 (cd ustar
2511 TEST_TAR_FORMAT=ustar
2512 export TEST_TAR_FORMAT
2513 TAR_OPTIONS=\"-H ustar\"
2514 export TAR_OPTIONS
2515 rm -rf *
2516
2517
2518 mkdir directory
2519 genfile --file=directory/a --length=1035
2520
2521 echo \"Creating the archive\"
2522 tar -c -v -f - --index-file=idx directory > archive
2523
2524 echo \"Testing the archive\"
2525 tar -tf archive
2526 )"
2527 echo indexfile.at:29 >"$at_check_line_file"
2528
2529 at_trace_this=
2530 if test -n "$at_traceon"; then
2531     echo 'Not enabling shell tracing (command contains an embedded newline)'
2532 fi
2533
2534 if test -n "$at_trace_this"; then
2535     ( $at_traceon;
2536 mkdir ustar
2537 (cd ustar
2538 TEST_TAR_FORMAT=ustar
2539 export TEST_TAR_FORMAT
2540 TAR_OPTIONS="-H ustar"
2541 export TAR_OPTIONS
2542 rm -rf *
2543
2544
2545 mkdir directory
2546 genfile --file=directory/a --length=1035
2547
2548 echo "Creating the archive"
2549 tar -c -v -f - --index-file=idx directory > archive
2550
2551 echo "Testing the archive"
2552 tar -tf archive
2553 ) ) >"$at_stdout" 2>"$at_stder1"
2554     at_status=$?
2555     grep '^ *+' "$at_stder1" >&2
2556     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2557 else
2558     ( :;
2559 mkdir ustar
2560 (cd ustar
2561 TEST_TAR_FORMAT=ustar
2562 export TEST_TAR_FORMAT
2563 TAR_OPTIONS="-H ustar"
2564 export TAR_OPTIONS
2565 rm -rf *
2566
2567
2568 mkdir directory
2569 genfile --file=directory/a --length=1035
2570
2571 echo "Creating the archive"
2572 tar -c -v -f - --index-file=idx directory > archive
2573
2574 echo "Testing the archive"
2575 tar -tf archive
2576 ) ) >"$at_stdout" 2>"$at_stderr"
2577     at_status=$?
2578 fi
2579
2580 at_failed=false
2581 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2582 echo >>"$at_stdout"; echo "Creating the archive
2583 Testing the archive
2584 directory/
2585 directory/a
2586 " | $at_diff - "$at_stdout" || at_failed=:
2587 case $at_status in
2588    77) echo 77 > "$at_status_file"; exit 77;;
2589    0) ;;
2590    *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
2591       at_failed=:;;
2592 esac
2593 if $at_failed; then
2594
2595
2596   echo 1 > "$at_status_file"
2597   exit 1
2598 fi
2599
2600 $at_traceon
2601 $at_traceoff
2602 echo "$at_srcdir/indexfile.at:29:
2603 mkdir posix
2604 (cd posix
2605 TEST_TAR_FORMAT=posix
2606 export TEST_TAR_FORMAT
2607 TAR_OPTIONS=\"-H posix\"
2608 export TAR_OPTIONS
2609 rm -rf *
2610
2611
2612 mkdir directory
2613 genfile --file=directory/a --length=1035
2614
2615 echo \"Creating the archive\"
2616 tar -c -v -f - --index-file=idx directory > archive
2617
2618 echo \"Testing the archive\"
2619 tar -tf archive
2620 )"
2621 echo indexfile.at:29 >"$at_check_line_file"
2622
2623 at_trace_this=
2624 if test -n "$at_traceon"; then
2625     echo 'Not enabling shell tracing (command contains an embedded newline)'
2626 fi
2627
2628 if test -n "$at_trace_this"; then
2629     ( $at_traceon;
2630 mkdir posix
2631 (cd posix
2632 TEST_TAR_FORMAT=posix
2633 export TEST_TAR_FORMAT
2634 TAR_OPTIONS="-H posix"
2635 export TAR_OPTIONS
2636 rm -rf *
2637
2638
2639 mkdir directory
2640 genfile --file=directory/a --length=1035
2641
2642 echo "Creating the archive"
2643 tar -c -v -f - --index-file=idx directory > archive
2644
2645 echo "Testing the archive"
2646 tar -tf archive
2647 ) ) >"$at_stdout" 2>"$at_stder1"
2648     at_status=$?
2649     grep '^ *+' "$at_stder1" >&2
2650     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2651 else
2652     ( :;
2653 mkdir posix
2654 (cd posix
2655 TEST_TAR_FORMAT=posix
2656 export TEST_TAR_FORMAT
2657 TAR_OPTIONS="-H posix"
2658 export TAR_OPTIONS
2659 rm -rf *
2660
2661
2662 mkdir directory
2663 genfile --file=directory/a --length=1035
2664
2665 echo "Creating the archive"
2666 tar -c -v -f - --index-file=idx directory > archive
2667
2668 echo "Testing the archive"
2669 tar -tf archive
2670 ) ) >"$at_stdout" 2>"$at_stderr"
2671     at_status=$?
2672 fi
2673
2674 at_failed=false
2675 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2676 echo >>"$at_stdout"; echo "Creating the archive
2677 Testing the archive
2678 directory/
2679 directory/a
2680 " | $at_diff - "$at_stdout" || at_failed=:
2681 case $at_status in
2682    77) echo 77 > "$at_status_file"; exit 77;;
2683    0) ;;
2684    *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
2685       at_failed=:;;
2686 esac
2687 if $at_failed; then
2688
2689
2690   echo 1 > "$at_status_file"
2691   exit 1
2692 fi
2693
2694 $at_traceon
2695 $at_traceoff
2696 echo "$at_srcdir/indexfile.at:29:
2697 mkdir gnu
2698 (cd gnu
2699 TEST_TAR_FORMAT=gnu
2700 export TEST_TAR_FORMAT
2701 TAR_OPTIONS=\"-H gnu\"
2702 export TAR_OPTIONS
2703 rm -rf *
2704
2705
2706 mkdir directory
2707 genfile --file=directory/a --length=1035
2708
2709 echo \"Creating the archive\"
2710 tar -c -v -f - --index-file=idx directory > archive
2711
2712 echo \"Testing the archive\"
2713 tar -tf archive
2714 )"
2715 echo indexfile.at:29 >"$at_check_line_file"
2716
2717 at_trace_this=
2718 if test -n "$at_traceon"; then
2719     echo 'Not enabling shell tracing (command contains an embedded newline)'
2720 fi
2721
2722 if test -n "$at_trace_this"; then
2723     ( $at_traceon;
2724 mkdir gnu
2725 (cd gnu
2726 TEST_TAR_FORMAT=gnu
2727 export TEST_TAR_FORMAT
2728 TAR_OPTIONS="-H gnu"
2729 export TAR_OPTIONS
2730 rm -rf *
2731
2732
2733 mkdir directory
2734 genfile --file=directory/a --length=1035
2735
2736 echo "Creating the archive"
2737 tar -c -v -f - --index-file=idx directory > archive
2738
2739 echo "Testing the archive"
2740 tar -tf archive
2741 ) ) >"$at_stdout" 2>"$at_stder1"
2742     at_status=$?
2743     grep '^ *+' "$at_stder1" >&2
2744     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2745 else
2746     ( :;
2747 mkdir gnu
2748 (cd gnu
2749 TEST_TAR_FORMAT=gnu
2750 export TEST_TAR_FORMAT
2751 TAR_OPTIONS="-H gnu"
2752 export TAR_OPTIONS
2753 rm -rf *
2754
2755
2756 mkdir directory
2757 genfile --file=directory/a --length=1035
2758
2759 echo "Creating the archive"
2760 tar -c -v -f - --index-file=idx directory > archive
2761
2762 echo "Testing the archive"
2763 tar -tf archive
2764 ) ) >"$at_stdout" 2>"$at_stderr"
2765     at_status=$?
2766 fi
2767
2768 at_failed=false
2769 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
2770 echo >>"$at_stdout"; echo "Creating the archive
2771 Testing the archive
2772 directory/
2773 directory/a
2774 " | $at_diff - "$at_stdout" || at_failed=:
2775 case $at_status in
2776    77) echo 77 > "$at_status_file"; exit 77;;
2777    0) ;;
2778    *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0"
2779       at_failed=:;;
2780 esac
2781 if $at_failed; then
2782
2783
2784   echo 1 > "$at_status_file"
2785   exit 1
2786 fi
2787
2788 $at_traceon
2789
2790
2791
2792       $at_traceoff
2793       $at_times_p && times >"$at_times_file"
2794     ) 5>&1 2>&1 | eval $at_tee_pipe
2795     at_status=`cat "$at_status_file"`
2796     ;;
2797
2798   8 ) # 8. verbose.at:26: tar cvf -
2799     at_setup_line='verbose.at:26'
2800     at_desc="tar cvf -"
2801     $at_quiet $ECHO_N "  8: tar cvf -                                      $ECHO_C"
2802     at_xfail=no
2803       test -f $XFAILFILE && at_xfail=yes
2804     echo "#                             -*- compilation -*-" >> "$at_group_log"
2805     (
2806       echo "8. verbose.at:26: testing ..."
2807       $at_traceon
2808
2809
2810
2811
2812
2813   $at_traceoff
2814 echo "$at_srcdir/verbose.at:29:
2815 mkdir v7
2816 (cd v7
2817 TEST_TAR_FORMAT=v7
2818 export TEST_TAR_FORMAT
2819 TAR_OPTIONS=\"-H v7\"
2820 export TAR_OPTIONS
2821 rm -rf *
2822
2823 genfile --file file --length 10240
2824 echo Creating the archive
2825 tar cvf - file > archive
2826 echo Testing the archive
2827 tar tf archive
2828 )"
2829 echo verbose.at:29 >"$at_check_line_file"
2830
2831 at_trace_this=
2832 if test -n "$at_traceon"; then
2833     echo 'Not enabling shell tracing (command contains an embedded newline)'
2834 fi
2835
2836 if test -n "$at_trace_this"; then
2837     ( $at_traceon;
2838 mkdir v7
2839 (cd v7
2840 TEST_TAR_FORMAT=v7
2841 export TEST_TAR_FORMAT
2842 TAR_OPTIONS="-H v7"
2843 export TAR_OPTIONS
2844 rm -rf *
2845
2846 genfile --file file --length 10240
2847 echo Creating the archive
2848 tar cvf - file > archive
2849 echo Testing the archive
2850 tar tf archive
2851 ) ) >"$at_stdout" 2>"$at_stder1"
2852     at_status=$?
2853     grep '^ *+' "$at_stder1" >&2
2854     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2855 else
2856     ( :;
2857 mkdir v7
2858 (cd v7
2859 TEST_TAR_FORMAT=v7
2860 export TEST_TAR_FORMAT
2861 TAR_OPTIONS="-H v7"
2862 export TAR_OPTIONS
2863 rm -rf *
2864
2865 genfile --file file --length 10240
2866 echo Creating the archive
2867 tar cvf - file > archive
2868 echo Testing the archive
2869 tar tf archive
2870 ) ) >"$at_stdout" 2>"$at_stderr"
2871     at_status=$?
2872 fi
2873
2874 at_failed=false
2875 echo >>"$at_stderr"; echo "file
2876 " | $at_diff - "$at_stderr" || at_failed=:
2877 echo >>"$at_stdout"; echo "Creating the archive
2878 Testing the archive
2879 file
2880 " | $at_diff - "$at_stdout" || at_failed=:
2881 case $at_status in
2882    77) echo 77 > "$at_status_file"; exit 77;;
2883    0) ;;
2884    *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
2885       at_failed=:;;
2886 esac
2887 if $at_failed; then
2888
2889
2890   echo 1 > "$at_status_file"
2891   exit 1
2892 fi
2893
2894 $at_traceon
2895 $at_traceoff
2896 echo "$at_srcdir/verbose.at:29:
2897 mkdir oldgnu
2898 (cd oldgnu
2899 TEST_TAR_FORMAT=oldgnu
2900 export TEST_TAR_FORMAT
2901 TAR_OPTIONS=\"-H oldgnu\"
2902 export TAR_OPTIONS
2903 rm -rf *
2904
2905 genfile --file file --length 10240
2906 echo Creating the archive
2907 tar cvf - file > archive
2908 echo Testing the archive
2909 tar tf archive
2910 )"
2911 echo verbose.at:29 >"$at_check_line_file"
2912
2913 at_trace_this=
2914 if test -n "$at_traceon"; then
2915     echo 'Not enabling shell tracing (command contains an embedded newline)'
2916 fi
2917
2918 if test -n "$at_trace_this"; then
2919     ( $at_traceon;
2920 mkdir oldgnu
2921 (cd oldgnu
2922 TEST_TAR_FORMAT=oldgnu
2923 export TEST_TAR_FORMAT
2924 TAR_OPTIONS="-H oldgnu"
2925 export TAR_OPTIONS
2926 rm -rf *
2927
2928 genfile --file file --length 10240
2929 echo Creating the archive
2930 tar cvf - file > archive
2931 echo Testing the archive
2932 tar tf archive
2933 ) ) >"$at_stdout" 2>"$at_stder1"
2934     at_status=$?
2935     grep '^ *+' "$at_stder1" >&2
2936     grep -v '^ *+' "$at_stder1" >"$at_stderr"
2937 else
2938     ( :;
2939 mkdir oldgnu
2940 (cd oldgnu
2941 TEST_TAR_FORMAT=oldgnu
2942 export TEST_TAR_FORMAT
2943 TAR_OPTIONS="-H oldgnu"
2944 export TAR_OPTIONS
2945 rm -rf *
2946
2947 genfile --file file --length 10240
2948 echo Creating the archive
2949 tar cvf - file > archive
2950 echo Testing the archive
2951 tar tf archive
2952 ) ) >"$at_stdout" 2>"$at_stderr"
2953     at_status=$?
2954 fi
2955
2956 at_failed=false
2957 echo >>"$at_stderr"; echo "file
2958 " | $at_diff - "$at_stderr" || at_failed=:
2959 echo >>"$at_stdout"; echo "Creating the archive
2960 Testing the archive
2961 file
2962 " | $at_diff - "$at_stdout" || at_failed=:
2963 case $at_status in
2964    77) echo 77 > "$at_status_file"; exit 77;;
2965    0) ;;
2966    *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
2967       at_failed=:;;
2968 esac
2969 if $at_failed; then
2970
2971
2972   echo 1 > "$at_status_file"
2973   exit 1
2974 fi
2975
2976 $at_traceon
2977 $at_traceoff
2978 echo "$at_srcdir/verbose.at:29:
2979 mkdir ustar
2980 (cd ustar
2981 TEST_TAR_FORMAT=ustar
2982 export TEST_TAR_FORMAT
2983 TAR_OPTIONS=\"-H ustar\"
2984 export TAR_OPTIONS
2985 rm -rf *
2986
2987 genfile --file file --length 10240
2988 echo Creating the archive
2989 tar cvf - file > archive
2990 echo Testing the archive
2991 tar tf archive
2992 )"
2993 echo verbose.at:29 >"$at_check_line_file"
2994
2995 at_trace_this=
2996 if test -n "$at_traceon"; then
2997     echo 'Not enabling shell tracing (command contains an embedded newline)'
2998 fi
2999
3000 if test -n "$at_trace_this"; then
3001     ( $at_traceon;
3002 mkdir ustar
3003 (cd ustar
3004 TEST_TAR_FORMAT=ustar
3005 export TEST_TAR_FORMAT
3006 TAR_OPTIONS="-H ustar"
3007 export TAR_OPTIONS
3008 rm -rf *
3009
3010 genfile --file file --length 10240
3011 echo Creating the archive
3012 tar cvf - file > archive
3013 echo Testing the archive
3014 tar tf archive
3015 ) ) >"$at_stdout" 2>"$at_stder1"
3016     at_status=$?
3017     grep '^ *+' "$at_stder1" >&2
3018     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3019 else
3020     ( :;
3021 mkdir ustar
3022 (cd ustar
3023 TEST_TAR_FORMAT=ustar
3024 export TEST_TAR_FORMAT
3025 TAR_OPTIONS="-H ustar"
3026 export TAR_OPTIONS
3027 rm -rf *
3028
3029 genfile --file file --length 10240
3030 echo Creating the archive
3031 tar cvf - file > archive
3032 echo Testing the archive
3033 tar tf archive
3034 ) ) >"$at_stdout" 2>"$at_stderr"
3035     at_status=$?
3036 fi
3037
3038 at_failed=false
3039 echo >>"$at_stderr"; echo "file
3040 " | $at_diff - "$at_stderr" || at_failed=:
3041 echo >>"$at_stdout"; echo "Creating the archive
3042 Testing the archive
3043 file
3044 " | $at_diff - "$at_stdout" || at_failed=:
3045 case $at_status in
3046    77) echo 77 > "$at_status_file"; exit 77;;
3047    0) ;;
3048    *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
3049       at_failed=:;;
3050 esac
3051 if $at_failed; then
3052
3053
3054   echo 1 > "$at_status_file"
3055   exit 1
3056 fi
3057
3058 $at_traceon
3059 $at_traceoff
3060 echo "$at_srcdir/verbose.at:29:
3061 mkdir posix
3062 (cd posix
3063 TEST_TAR_FORMAT=posix
3064 export TEST_TAR_FORMAT
3065 TAR_OPTIONS=\"-H posix\"
3066 export TAR_OPTIONS
3067 rm -rf *
3068
3069 genfile --file file --length 10240
3070 echo Creating the archive
3071 tar cvf - file > archive
3072 echo Testing the archive
3073 tar tf archive
3074 )"
3075 echo verbose.at:29 >"$at_check_line_file"
3076
3077 at_trace_this=
3078 if test -n "$at_traceon"; then
3079     echo 'Not enabling shell tracing (command contains an embedded newline)'
3080 fi
3081
3082 if test -n "$at_trace_this"; then
3083     ( $at_traceon;
3084 mkdir posix
3085 (cd posix
3086 TEST_TAR_FORMAT=posix
3087 export TEST_TAR_FORMAT
3088 TAR_OPTIONS="-H posix"
3089 export TAR_OPTIONS
3090 rm -rf *
3091
3092 genfile --file file --length 10240
3093 echo Creating the archive
3094 tar cvf - file > archive
3095 echo Testing the archive
3096 tar tf archive
3097 ) ) >"$at_stdout" 2>"$at_stder1"
3098     at_status=$?
3099     grep '^ *+' "$at_stder1" >&2
3100     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3101 else
3102     ( :;
3103 mkdir posix
3104 (cd posix
3105 TEST_TAR_FORMAT=posix
3106 export TEST_TAR_FORMAT
3107 TAR_OPTIONS="-H posix"
3108 export TAR_OPTIONS
3109 rm -rf *
3110
3111 genfile --file file --length 10240
3112 echo Creating the archive
3113 tar cvf - file > archive
3114 echo Testing the archive
3115 tar tf archive
3116 ) ) >"$at_stdout" 2>"$at_stderr"
3117     at_status=$?
3118 fi
3119
3120 at_failed=false
3121 echo >>"$at_stderr"; echo "file
3122 " | $at_diff - "$at_stderr" || at_failed=:
3123 echo >>"$at_stdout"; echo "Creating the archive
3124 Testing the archive
3125 file
3126 " | $at_diff - "$at_stdout" || at_failed=:
3127 case $at_status in
3128    77) echo 77 > "$at_status_file"; exit 77;;
3129    0) ;;
3130    *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
3131       at_failed=:;;
3132 esac
3133 if $at_failed; then
3134
3135
3136   echo 1 > "$at_status_file"
3137   exit 1
3138 fi
3139
3140 $at_traceon
3141 $at_traceoff
3142 echo "$at_srcdir/verbose.at:29:
3143 mkdir gnu
3144 (cd gnu
3145 TEST_TAR_FORMAT=gnu
3146 export TEST_TAR_FORMAT
3147 TAR_OPTIONS=\"-H gnu\"
3148 export TAR_OPTIONS
3149 rm -rf *
3150
3151 genfile --file file --length 10240
3152 echo Creating the archive
3153 tar cvf - file > archive
3154 echo Testing the archive
3155 tar tf archive
3156 )"
3157 echo verbose.at:29 >"$at_check_line_file"
3158
3159 at_trace_this=
3160 if test -n "$at_traceon"; then
3161     echo 'Not enabling shell tracing (command contains an embedded newline)'
3162 fi
3163
3164 if test -n "$at_trace_this"; then
3165     ( $at_traceon;
3166 mkdir gnu
3167 (cd gnu
3168 TEST_TAR_FORMAT=gnu
3169 export TEST_TAR_FORMAT
3170 TAR_OPTIONS="-H gnu"
3171 export TAR_OPTIONS
3172 rm -rf *
3173
3174 genfile --file file --length 10240
3175 echo Creating the archive
3176 tar cvf - file > archive
3177 echo Testing the archive
3178 tar tf archive
3179 ) ) >"$at_stdout" 2>"$at_stder1"
3180     at_status=$?
3181     grep '^ *+' "$at_stder1" >&2
3182     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3183 else
3184     ( :;
3185 mkdir gnu
3186 (cd gnu
3187 TEST_TAR_FORMAT=gnu
3188 export TEST_TAR_FORMAT
3189 TAR_OPTIONS="-H gnu"
3190 export TAR_OPTIONS
3191 rm -rf *
3192
3193 genfile --file file --length 10240
3194 echo Creating the archive
3195 tar cvf - file > archive
3196 echo Testing the archive
3197 tar tf archive
3198 ) ) >"$at_stdout" 2>"$at_stderr"
3199     at_status=$?
3200 fi
3201
3202 at_failed=false
3203 echo >>"$at_stderr"; echo "file
3204 " | $at_diff - "$at_stderr" || at_failed=:
3205 echo >>"$at_stdout"; echo "Creating the archive
3206 Testing the archive
3207 file
3208 " | $at_diff - "$at_stdout" || at_failed=:
3209 case $at_status in
3210    77) echo 77 > "$at_status_file"; exit 77;;
3211    0) ;;
3212    *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0"
3213       at_failed=:;;
3214 esac
3215 if $at_failed; then
3216
3217
3218   echo 1 > "$at_status_file"
3219   exit 1
3220 fi
3221
3222 $at_traceon
3223
3224
3225
3226       $at_traceoff
3227       $at_times_p && times >"$at_times_file"
3228     ) 5>&1 2>&1 | eval $at_tee_pipe
3229     at_status=`cat "$at_status_file"`
3230     ;;
3231
3232   9 ) # 9. append.at:21: append
3233     at_setup_line='append.at:21'
3234     at_desc="append"
3235     $at_quiet $ECHO_N "  9: append                                         $ECHO_C"
3236     at_xfail=no
3237       test -f $XFAILFILE && at_xfail=yes
3238     echo "#                             -*- compilation -*-" >> "$at_group_log"
3239     (
3240       echo "9. append.at:21: testing ..."
3241       $at_traceon
3242
3243
3244
3245
3246
3247   $at_traceoff
3248 echo "$at_srcdir/append.at:24:
3249 mkdir v7
3250 (cd v7
3251 TEST_TAR_FORMAT=v7
3252 export TEST_TAR_FORMAT
3253 TAR_OPTIONS=\"-H v7\"
3254 export TAR_OPTIONS
3255 rm -rf *
3256 touch file1
3257           touch file2
3258           tar cf archive file1
3259           tar rf archive file2
3260           tar tf archive)"
3261 echo append.at:24 >"$at_check_line_file"
3262
3263 at_trace_this=
3264 if test -n "$at_traceon"; then
3265     echo 'Not enabling shell tracing (command contains an embedded newline)'
3266 fi
3267
3268 if test -n "$at_trace_this"; then
3269     ( $at_traceon;
3270 mkdir v7
3271 (cd v7
3272 TEST_TAR_FORMAT=v7
3273 export TEST_TAR_FORMAT
3274 TAR_OPTIONS="-H v7"
3275 export TAR_OPTIONS
3276 rm -rf *
3277 touch file1
3278           touch file2
3279           tar cf archive file1
3280           tar rf archive file2
3281           tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
3282     at_status=$?
3283     grep '^ *+' "$at_stder1" >&2
3284     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3285 else
3286     ( :;
3287 mkdir v7
3288 (cd v7
3289 TEST_TAR_FORMAT=v7
3290 export TEST_TAR_FORMAT
3291 TAR_OPTIONS="-H v7"
3292 export TAR_OPTIONS
3293 rm -rf *
3294 touch file1
3295           touch file2
3296           tar cf archive file1
3297           tar rf archive file2
3298           tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
3299     at_status=$?
3300 fi
3301
3302 at_failed=false
3303 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3304 echo >>"$at_stdout"; echo "file1
3305 file2
3306 " | $at_diff - "$at_stdout" || at_failed=:
3307 case $at_status in
3308    77) echo 77 > "$at_status_file"; exit 77;;
3309    0) ;;
3310    *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
3311       at_failed=:;;
3312 esac
3313 if $at_failed; then
3314
3315
3316   echo 1 > "$at_status_file"
3317   exit 1
3318 fi
3319
3320 $at_traceon
3321 $at_traceoff
3322 echo "$at_srcdir/append.at:24:
3323 mkdir oldgnu
3324 (cd oldgnu
3325 TEST_TAR_FORMAT=oldgnu
3326 export TEST_TAR_FORMAT
3327 TAR_OPTIONS=\"-H oldgnu\"
3328 export TAR_OPTIONS
3329 rm -rf *
3330 touch file1
3331           touch file2
3332           tar cf archive file1
3333           tar rf archive file2
3334           tar tf archive)"
3335 echo append.at:24 >"$at_check_line_file"
3336
3337 at_trace_this=
3338 if test -n "$at_traceon"; then
3339     echo 'Not enabling shell tracing (command contains an embedded newline)'
3340 fi
3341
3342 if test -n "$at_trace_this"; then
3343     ( $at_traceon;
3344 mkdir oldgnu
3345 (cd oldgnu
3346 TEST_TAR_FORMAT=oldgnu
3347 export TEST_TAR_FORMAT
3348 TAR_OPTIONS="-H oldgnu"
3349 export TAR_OPTIONS
3350 rm -rf *
3351 touch file1
3352           touch file2
3353           tar cf archive file1
3354           tar rf archive file2
3355           tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
3356     at_status=$?
3357     grep '^ *+' "$at_stder1" >&2
3358     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3359 else
3360     ( :;
3361 mkdir oldgnu
3362 (cd oldgnu
3363 TEST_TAR_FORMAT=oldgnu
3364 export TEST_TAR_FORMAT
3365 TAR_OPTIONS="-H oldgnu"
3366 export TAR_OPTIONS
3367 rm -rf *
3368 touch file1
3369           touch file2
3370           tar cf archive file1
3371           tar rf archive file2
3372           tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
3373     at_status=$?
3374 fi
3375
3376 at_failed=false
3377 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3378 echo >>"$at_stdout"; echo "file1
3379 file2
3380 " | $at_diff - "$at_stdout" || at_failed=:
3381 case $at_status in
3382    77) echo 77 > "$at_status_file"; exit 77;;
3383    0) ;;
3384    *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
3385       at_failed=:;;
3386 esac
3387 if $at_failed; then
3388
3389
3390   echo 1 > "$at_status_file"
3391   exit 1
3392 fi
3393
3394 $at_traceon
3395 $at_traceoff
3396 echo "$at_srcdir/append.at:24:
3397 mkdir ustar
3398 (cd ustar
3399 TEST_TAR_FORMAT=ustar
3400 export TEST_TAR_FORMAT
3401 TAR_OPTIONS=\"-H ustar\"
3402 export TAR_OPTIONS
3403 rm -rf *
3404 touch file1
3405           touch file2
3406           tar cf archive file1
3407           tar rf archive file2
3408           tar tf archive)"
3409 echo append.at:24 >"$at_check_line_file"
3410
3411 at_trace_this=
3412 if test -n "$at_traceon"; then
3413     echo 'Not enabling shell tracing (command contains an embedded newline)'
3414 fi
3415
3416 if test -n "$at_trace_this"; then
3417     ( $at_traceon;
3418 mkdir ustar
3419 (cd ustar
3420 TEST_TAR_FORMAT=ustar
3421 export TEST_TAR_FORMAT
3422 TAR_OPTIONS="-H ustar"
3423 export TAR_OPTIONS
3424 rm -rf *
3425 touch file1
3426           touch file2
3427           tar cf archive file1
3428           tar rf archive file2
3429           tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
3430     at_status=$?
3431     grep '^ *+' "$at_stder1" >&2
3432     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3433 else
3434     ( :;
3435 mkdir ustar
3436 (cd ustar
3437 TEST_TAR_FORMAT=ustar
3438 export TEST_TAR_FORMAT
3439 TAR_OPTIONS="-H ustar"
3440 export TAR_OPTIONS
3441 rm -rf *
3442 touch file1
3443           touch file2
3444           tar cf archive file1
3445           tar rf archive file2
3446           tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
3447     at_status=$?
3448 fi
3449
3450 at_failed=false
3451 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3452 echo >>"$at_stdout"; echo "file1
3453 file2
3454 " | $at_diff - "$at_stdout" || at_failed=:
3455 case $at_status in
3456    77) echo 77 > "$at_status_file"; exit 77;;
3457    0) ;;
3458    *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
3459       at_failed=:;;
3460 esac
3461 if $at_failed; then
3462
3463
3464   echo 1 > "$at_status_file"
3465   exit 1
3466 fi
3467
3468 $at_traceon
3469 $at_traceoff
3470 echo "$at_srcdir/append.at:24:
3471 mkdir posix
3472 (cd posix
3473 TEST_TAR_FORMAT=posix
3474 export TEST_TAR_FORMAT
3475 TAR_OPTIONS=\"-H posix\"
3476 export TAR_OPTIONS
3477 rm -rf *
3478 touch file1
3479           touch file2
3480           tar cf archive file1
3481           tar rf archive file2
3482           tar tf archive)"
3483 echo append.at:24 >"$at_check_line_file"
3484
3485 at_trace_this=
3486 if test -n "$at_traceon"; then
3487     echo 'Not enabling shell tracing (command contains an embedded newline)'
3488 fi
3489
3490 if test -n "$at_trace_this"; then
3491     ( $at_traceon;
3492 mkdir posix
3493 (cd posix
3494 TEST_TAR_FORMAT=posix
3495 export TEST_TAR_FORMAT
3496 TAR_OPTIONS="-H posix"
3497 export TAR_OPTIONS
3498 rm -rf *
3499 touch file1
3500           touch file2
3501           tar cf archive file1
3502           tar rf archive file2
3503           tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
3504     at_status=$?
3505     grep '^ *+' "$at_stder1" >&2
3506     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3507 else
3508     ( :;
3509 mkdir posix
3510 (cd posix
3511 TEST_TAR_FORMAT=posix
3512 export TEST_TAR_FORMAT
3513 TAR_OPTIONS="-H posix"
3514 export TAR_OPTIONS
3515 rm -rf *
3516 touch file1
3517           touch file2
3518           tar cf archive file1
3519           tar rf archive file2
3520           tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
3521     at_status=$?
3522 fi
3523
3524 at_failed=false
3525 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3526 echo >>"$at_stdout"; echo "file1
3527 file2
3528 " | $at_diff - "$at_stdout" || at_failed=:
3529 case $at_status in
3530    77) echo 77 > "$at_status_file"; exit 77;;
3531    0) ;;
3532    *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
3533       at_failed=:;;
3534 esac
3535 if $at_failed; then
3536
3537
3538   echo 1 > "$at_status_file"
3539   exit 1
3540 fi
3541
3542 $at_traceon
3543 $at_traceoff
3544 echo "$at_srcdir/append.at:24:
3545 mkdir gnu
3546 (cd gnu
3547 TEST_TAR_FORMAT=gnu
3548 export TEST_TAR_FORMAT
3549 TAR_OPTIONS=\"-H gnu\"
3550 export TAR_OPTIONS
3551 rm -rf *
3552 touch file1
3553           touch file2
3554           tar cf archive file1
3555           tar rf archive file2
3556           tar tf archive)"
3557 echo append.at:24 >"$at_check_line_file"
3558
3559 at_trace_this=
3560 if test -n "$at_traceon"; then
3561     echo 'Not enabling shell tracing (command contains an embedded newline)'
3562 fi
3563
3564 if test -n "$at_trace_this"; then
3565     ( $at_traceon;
3566 mkdir gnu
3567 (cd gnu
3568 TEST_TAR_FORMAT=gnu
3569 export TEST_TAR_FORMAT
3570 TAR_OPTIONS="-H gnu"
3571 export TAR_OPTIONS
3572 rm -rf *
3573 touch file1
3574           touch file2
3575           tar cf archive file1
3576           tar rf archive file2
3577           tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
3578     at_status=$?
3579     grep '^ *+' "$at_stder1" >&2
3580     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3581 else
3582     ( :;
3583 mkdir gnu
3584 (cd gnu
3585 TEST_TAR_FORMAT=gnu
3586 export TEST_TAR_FORMAT
3587 TAR_OPTIONS="-H gnu"
3588 export TAR_OPTIONS
3589 rm -rf *
3590 touch file1
3591           touch file2
3592           tar cf archive file1
3593           tar rf archive file2
3594           tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
3595     at_status=$?
3596 fi
3597
3598 at_failed=false
3599 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3600 echo >>"$at_stdout"; echo "file1
3601 file2
3602 " | $at_diff - "$at_stdout" || at_failed=:
3603 case $at_status in
3604    77) echo 77 > "$at_status_file"; exit 77;;
3605    0) ;;
3606    *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0"
3607       at_failed=:;;
3608 esac
3609 if $at_failed; then
3610
3611
3612   echo 1 > "$at_status_file"
3613   exit 1
3614 fi
3615
3616 $at_traceon
3617
3618
3619
3620       $at_traceoff
3621       $at_times_p && times >"$at_times_file"
3622     ) 5>&1 2>&1 | eval $at_tee_pipe
3623     at_status=`cat "$at_status_file"`
3624     ;;
3625
3626   10 ) # 10. append01.at:29: appending files with long names
3627     at_setup_line='append01.at:29'
3628     at_desc="appending files with long names"
3629     $at_quiet $ECHO_N " 10: appending files with long names                $ECHO_C"
3630     at_xfail=no
3631       test -f $XFAILFILE && at_xfail=yes
3632     echo "#                             -*- compilation -*-" >> "$at_group_log"
3633     (
3634       echo "10. append01.at:29: testing ..."
3635       $at_traceon
3636
3637
3638
3639
3640
3641
3642
3643   $at_traceoff
3644 echo "$at_srcdir/append01.at:34:
3645 mkdir oldgnu
3646 (cd oldgnu
3647 TEST_TAR_FORMAT=oldgnu
3648 export TEST_TAR_FORMAT
3649 TAR_OPTIONS=\"-H oldgnu\"
3650 export TAR_OPTIONS
3651 rm -rf *
3652
3653 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
3654 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
3655 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
3656 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
3657 tar tf archive
3658 )"
3659 echo append01.at:34 >"$at_check_line_file"
3660
3661 at_trace_this=
3662 if test -n "$at_traceon"; then
3663     echo 'Not enabling shell tracing (command contains an embedded newline)'
3664 fi
3665
3666 if test -n "$at_trace_this"; then
3667     ( $at_traceon;
3668 mkdir oldgnu
3669 (cd oldgnu
3670 TEST_TAR_FORMAT=oldgnu
3671 export TEST_TAR_FORMAT
3672 TAR_OPTIONS="-H oldgnu"
3673 export TAR_OPTIONS
3674 rm -rf *
3675
3676 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
3677 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
3678 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
3679 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
3680 tar tf archive
3681 ) ) >"$at_stdout" 2>"$at_stder1"
3682     at_status=$?
3683     grep '^ *+' "$at_stder1" >&2
3684     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3685 else
3686     ( :;
3687 mkdir oldgnu
3688 (cd oldgnu
3689 TEST_TAR_FORMAT=oldgnu
3690 export TEST_TAR_FORMAT
3691 TAR_OPTIONS="-H oldgnu"
3692 export TAR_OPTIONS
3693 rm -rf *
3694
3695 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
3696 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
3697 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
3698 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
3699 tar tf archive
3700 ) ) >"$at_stdout" 2>"$at_stderr"
3701     at_status=$?
3702 fi
3703
3704 at_failed=false
3705 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3706 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
3707 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
3708 " | $at_diff - "$at_stdout" || at_failed=:
3709 case $at_status in
3710    77) echo 77 > "$at_status_file"; exit 77;;
3711    0) ;;
3712    *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
3713       at_failed=:;;
3714 esac
3715 if $at_failed; then
3716
3717
3718   echo 1 > "$at_status_file"
3719   exit 1
3720 fi
3721
3722 $at_traceon
3723 $at_traceoff
3724 echo "$at_srcdir/append01.at:34:
3725 mkdir ustar
3726 (cd ustar
3727 TEST_TAR_FORMAT=ustar
3728 export TEST_TAR_FORMAT
3729 TAR_OPTIONS=\"-H ustar\"
3730 export TAR_OPTIONS
3731 rm -rf *
3732
3733 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
3734 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
3735 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
3736 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
3737 tar tf archive
3738 )"
3739 echo append01.at:34 >"$at_check_line_file"
3740
3741 at_trace_this=
3742 if test -n "$at_traceon"; then
3743     echo 'Not enabling shell tracing (command contains an embedded newline)'
3744 fi
3745
3746 if test -n "$at_trace_this"; then
3747     ( $at_traceon;
3748 mkdir ustar
3749 (cd ustar
3750 TEST_TAR_FORMAT=ustar
3751 export TEST_TAR_FORMAT
3752 TAR_OPTIONS="-H ustar"
3753 export TAR_OPTIONS
3754 rm -rf *
3755
3756 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
3757 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
3758 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
3759 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
3760 tar tf archive
3761 ) ) >"$at_stdout" 2>"$at_stder1"
3762     at_status=$?
3763     grep '^ *+' "$at_stder1" >&2
3764     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3765 else
3766     ( :;
3767 mkdir ustar
3768 (cd ustar
3769 TEST_TAR_FORMAT=ustar
3770 export TEST_TAR_FORMAT
3771 TAR_OPTIONS="-H ustar"
3772 export TAR_OPTIONS
3773 rm -rf *
3774
3775 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
3776 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
3777 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
3778 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
3779 tar tf archive
3780 ) ) >"$at_stdout" 2>"$at_stderr"
3781     at_status=$?
3782 fi
3783
3784 at_failed=false
3785 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3786 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
3787 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
3788 " | $at_diff - "$at_stdout" || at_failed=:
3789 case $at_status in
3790    77) echo 77 > "$at_status_file"; exit 77;;
3791    0) ;;
3792    *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
3793       at_failed=:;;
3794 esac
3795 if $at_failed; then
3796
3797
3798   echo 1 > "$at_status_file"
3799   exit 1
3800 fi
3801
3802 $at_traceon
3803 $at_traceoff
3804 echo "$at_srcdir/append01.at:34:
3805 mkdir posix
3806 (cd posix
3807 TEST_TAR_FORMAT=posix
3808 export TEST_TAR_FORMAT
3809 TAR_OPTIONS=\"-H posix\"
3810 export TAR_OPTIONS
3811 rm -rf *
3812
3813 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
3814 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
3815 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
3816 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
3817 tar tf archive
3818 )"
3819 echo append01.at:34 >"$at_check_line_file"
3820
3821 at_trace_this=
3822 if test -n "$at_traceon"; then
3823     echo 'Not enabling shell tracing (command contains an embedded newline)'
3824 fi
3825
3826 if test -n "$at_trace_this"; then
3827     ( $at_traceon;
3828 mkdir posix
3829 (cd posix
3830 TEST_TAR_FORMAT=posix
3831 export TEST_TAR_FORMAT
3832 TAR_OPTIONS="-H posix"
3833 export TAR_OPTIONS
3834 rm -rf *
3835
3836 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
3837 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
3838 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
3839 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
3840 tar tf archive
3841 ) ) >"$at_stdout" 2>"$at_stder1"
3842     at_status=$?
3843     grep '^ *+' "$at_stder1" >&2
3844     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3845 else
3846     ( :;
3847 mkdir posix
3848 (cd posix
3849 TEST_TAR_FORMAT=posix
3850 export TEST_TAR_FORMAT
3851 TAR_OPTIONS="-H posix"
3852 export TAR_OPTIONS
3853 rm -rf *
3854
3855 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
3856 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
3857 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
3858 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
3859 tar tf archive
3860 ) ) >"$at_stdout" 2>"$at_stderr"
3861     at_status=$?
3862 fi
3863
3864 at_failed=false
3865 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3866 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
3867 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
3868 " | $at_diff - "$at_stdout" || at_failed=:
3869 case $at_status in
3870    77) echo 77 > "$at_status_file"; exit 77;;
3871    0) ;;
3872    *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
3873       at_failed=:;;
3874 esac
3875 if $at_failed; then
3876
3877
3878   echo 1 > "$at_status_file"
3879   exit 1
3880 fi
3881
3882 $at_traceon
3883 $at_traceoff
3884 echo "$at_srcdir/append01.at:34:
3885 mkdir gnu
3886 (cd gnu
3887 TEST_TAR_FORMAT=gnu
3888 export TEST_TAR_FORMAT
3889 TAR_OPTIONS=\"-H gnu\"
3890 export TAR_OPTIONS
3891 rm -rf *
3892
3893 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
3894 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
3895 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
3896 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
3897 tar tf archive
3898 )"
3899 echo append01.at:34 >"$at_check_line_file"
3900
3901 at_trace_this=
3902 if test -n "$at_traceon"; then
3903     echo 'Not enabling shell tracing (command contains an embedded newline)'
3904 fi
3905
3906 if test -n "$at_trace_this"; then
3907     ( $at_traceon;
3908 mkdir gnu
3909 (cd gnu
3910 TEST_TAR_FORMAT=gnu
3911 export TEST_TAR_FORMAT
3912 TAR_OPTIONS="-H gnu"
3913 export TAR_OPTIONS
3914 rm -rf *
3915
3916 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
3917 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
3918 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
3919 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
3920 tar tf archive
3921 ) ) >"$at_stdout" 2>"$at_stder1"
3922     at_status=$?
3923     grep '^ *+' "$at_stder1" >&2
3924     grep -v '^ *+' "$at_stder1" >"$at_stderr"
3925 else
3926     ( :;
3927 mkdir gnu
3928 (cd gnu
3929 TEST_TAR_FORMAT=gnu
3930 export TEST_TAR_FORMAT
3931 TAR_OPTIONS="-H gnu"
3932 export TAR_OPTIONS
3933 rm -rf *
3934
3935 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
3936 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
3937 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
3938 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
3939 tar tf archive
3940 ) ) >"$at_stdout" 2>"$at_stderr"
3941     at_status=$?
3942 fi
3943
3944 at_failed=false
3945 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
3946 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
3947 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
3948 " | $at_diff - "$at_stdout" || at_failed=:
3949 case $at_status in
3950    77) echo 77 > "$at_status_file"; exit 77;;
3951    0) ;;
3952    *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0"
3953       at_failed=:;;
3954 esac
3955 if $at_failed; then
3956
3957
3958   echo 1 > "$at_status_file"
3959   exit 1
3960 fi
3961
3962 $at_traceon
3963
3964
3965
3966       $at_traceoff
3967       $at_times_p && times >"$at_times_file"
3968     ) 5>&1 2>&1 | eval $at_tee_pipe
3969     at_status=`cat "$at_status_file"`
3970     ;;
3971
3972   11 ) # 11. append02.at:40: append vs. create
3973     at_setup_line='append02.at:40'
3974     at_desc="append vs. create"
3975     $at_quiet $ECHO_N " 11: append vs. create                              $ECHO_C"
3976     at_xfail=no
3977       test -f $XFAILFILE && at_xfail=yes
3978     echo "#                             -*- compilation -*-" >> "$at_group_log"
3979     (
3980       echo "11. append02.at:40: testing ..."
3981       $at_traceon
3982
3983
3984
3985
3986
3987   $at_traceoff
3988 echo "$at_srcdir/append02.at:43:
3989 mkdir v7
3990 (cd v7
3991 TEST_TAR_FORMAT=v7
3992 export TEST_TAR_FORMAT
3993 TAR_OPTIONS=\"-H v7\"
3994 export TAR_OPTIONS
3995 rm -rf *
3996
3997 genfile --file file1
3998 genfile --file file2
3999
4000 # Make sure file timestamps in the archive will not differ
4001 MTIME=\"--mtime=@0\"
4002
4003 # For PAX archives, we need to make sure extended header names are
4004 # reproducible and that their contents won't change with time
4005 if test \$TEST_TAR_FORMAT = posix; then
4006   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
4007 fi
4008
4009 echo Creating archive.1
4010 tar \$MTIME -cf archive.1 file1 file2
4011
4012 echo Creating archive.2
4013 tar \$MTIME -cf archive.2 -T /dev/null
4014 tar \$MTIME -rf archive.2 file1
4015 tar \$MTIME -rf archive.2 file2
4016
4017 echo Comparing archives
4018 cmp archive.1 archive.2
4019 )"
4020 echo append02.at:43 >"$at_check_line_file"
4021
4022 at_trace_this=
4023 if test -n "$at_traceon"; then
4024     echo 'Not enabling shell tracing (command contains an embedded newline)'
4025 fi
4026
4027 if test -n "$at_trace_this"; then
4028     ( $at_traceon;
4029 mkdir v7
4030 (cd v7
4031 TEST_TAR_FORMAT=v7
4032 export TEST_TAR_FORMAT
4033 TAR_OPTIONS="-H v7"
4034 export TAR_OPTIONS
4035 rm -rf *
4036
4037 genfile --file file1
4038 genfile --file file2
4039
4040 # Make sure file timestamps in the archive will not differ
4041 MTIME="--mtime=@0"
4042
4043 # For PAX archives, we need to make sure extended header names are
4044 # reproducible and that their contents won't change with time
4045 if test $TEST_TAR_FORMAT = posix; then
4046   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4047 fi
4048
4049 echo Creating archive.1
4050 tar $MTIME -cf archive.1 file1 file2
4051
4052 echo Creating archive.2
4053 tar $MTIME -cf archive.2 -T /dev/null
4054 tar $MTIME -rf archive.2 file1
4055 tar $MTIME -rf archive.2 file2
4056
4057 echo Comparing archives
4058 cmp archive.1 archive.2
4059 ) ) >"$at_stdout" 2>"$at_stder1"
4060     at_status=$?
4061     grep '^ *+' "$at_stder1" >&2
4062     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4063 else
4064     ( :;
4065 mkdir v7
4066 (cd v7
4067 TEST_TAR_FORMAT=v7
4068 export TEST_TAR_FORMAT
4069 TAR_OPTIONS="-H v7"
4070 export TAR_OPTIONS
4071 rm -rf *
4072
4073 genfile --file file1
4074 genfile --file file2
4075
4076 # Make sure file timestamps in the archive will not differ
4077 MTIME="--mtime=@0"
4078
4079 # For PAX archives, we need to make sure extended header names are
4080 # reproducible and that their contents won't change with time
4081 if test $TEST_TAR_FORMAT = posix; then
4082   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4083 fi
4084
4085 echo Creating archive.1
4086 tar $MTIME -cf archive.1 file1 file2
4087
4088 echo Creating archive.2
4089 tar $MTIME -cf archive.2 -T /dev/null
4090 tar $MTIME -rf archive.2 file1
4091 tar $MTIME -rf archive.2 file2
4092
4093 echo Comparing archives
4094 cmp archive.1 archive.2
4095 ) ) >"$at_stdout" 2>"$at_stderr"
4096     at_status=$?
4097 fi
4098
4099 at_failed=false
4100 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4101 echo >>"$at_stdout"; echo "Creating archive.1
4102 Creating archive.2
4103 Comparing archives
4104 " | $at_diff - "$at_stdout" || at_failed=:
4105 case $at_status in
4106    77) echo 77 > "$at_status_file"; exit 77;;
4107    0) ;;
4108    *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
4109       at_failed=:;;
4110 esac
4111 if $at_failed; then
4112
4113
4114   echo 1 > "$at_status_file"
4115   exit 1
4116 fi
4117
4118 $at_traceon
4119 $at_traceoff
4120 echo "$at_srcdir/append02.at:43:
4121 mkdir oldgnu
4122 (cd oldgnu
4123 TEST_TAR_FORMAT=oldgnu
4124 export TEST_TAR_FORMAT
4125 TAR_OPTIONS=\"-H oldgnu\"
4126 export TAR_OPTIONS
4127 rm -rf *
4128
4129 genfile --file file1
4130 genfile --file file2
4131
4132 # Make sure file timestamps in the archive will not differ
4133 MTIME=\"--mtime=@0\"
4134
4135 # For PAX archives, we need to make sure extended header names are
4136 # reproducible and that their contents won't change with time
4137 if test \$TEST_TAR_FORMAT = posix; then
4138   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
4139 fi
4140
4141 echo Creating archive.1
4142 tar \$MTIME -cf archive.1 file1 file2
4143
4144 echo Creating archive.2
4145 tar \$MTIME -cf archive.2 -T /dev/null
4146 tar \$MTIME -rf archive.2 file1
4147 tar \$MTIME -rf archive.2 file2
4148
4149 echo Comparing archives
4150 cmp archive.1 archive.2
4151 )"
4152 echo append02.at:43 >"$at_check_line_file"
4153
4154 at_trace_this=
4155 if test -n "$at_traceon"; then
4156     echo 'Not enabling shell tracing (command contains an embedded newline)'
4157 fi
4158
4159 if test -n "$at_trace_this"; then
4160     ( $at_traceon;
4161 mkdir oldgnu
4162 (cd oldgnu
4163 TEST_TAR_FORMAT=oldgnu
4164 export TEST_TAR_FORMAT
4165 TAR_OPTIONS="-H oldgnu"
4166 export TAR_OPTIONS
4167 rm -rf *
4168
4169 genfile --file file1
4170 genfile --file file2
4171
4172 # Make sure file timestamps in the archive will not differ
4173 MTIME="--mtime=@0"
4174
4175 # For PAX archives, we need to make sure extended header names are
4176 # reproducible and that their contents won't change with time
4177 if test $TEST_TAR_FORMAT = posix; then
4178   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4179 fi
4180
4181 echo Creating archive.1
4182 tar $MTIME -cf archive.1 file1 file2
4183
4184 echo Creating archive.2
4185 tar $MTIME -cf archive.2 -T /dev/null
4186 tar $MTIME -rf archive.2 file1
4187 tar $MTIME -rf archive.2 file2
4188
4189 echo Comparing archives
4190 cmp archive.1 archive.2
4191 ) ) >"$at_stdout" 2>"$at_stder1"
4192     at_status=$?
4193     grep '^ *+' "$at_stder1" >&2
4194     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4195 else
4196     ( :;
4197 mkdir oldgnu
4198 (cd oldgnu
4199 TEST_TAR_FORMAT=oldgnu
4200 export TEST_TAR_FORMAT
4201 TAR_OPTIONS="-H oldgnu"
4202 export TAR_OPTIONS
4203 rm -rf *
4204
4205 genfile --file file1
4206 genfile --file file2
4207
4208 # Make sure file timestamps in the archive will not differ
4209 MTIME="--mtime=@0"
4210
4211 # For PAX archives, we need to make sure extended header names are
4212 # reproducible and that their contents won't change with time
4213 if test $TEST_TAR_FORMAT = posix; then
4214   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4215 fi
4216
4217 echo Creating archive.1
4218 tar $MTIME -cf archive.1 file1 file2
4219
4220 echo Creating archive.2
4221 tar $MTIME -cf archive.2 -T /dev/null
4222 tar $MTIME -rf archive.2 file1
4223 tar $MTIME -rf archive.2 file2
4224
4225 echo Comparing archives
4226 cmp archive.1 archive.2
4227 ) ) >"$at_stdout" 2>"$at_stderr"
4228     at_status=$?
4229 fi
4230
4231 at_failed=false
4232 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4233 echo >>"$at_stdout"; echo "Creating archive.1
4234 Creating archive.2
4235 Comparing archives
4236 " | $at_diff - "$at_stdout" || at_failed=:
4237 case $at_status in
4238    77) echo 77 > "$at_status_file"; exit 77;;
4239    0) ;;
4240    *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
4241       at_failed=:;;
4242 esac
4243 if $at_failed; then
4244
4245
4246   echo 1 > "$at_status_file"
4247   exit 1
4248 fi
4249
4250 $at_traceon
4251 $at_traceoff
4252 echo "$at_srcdir/append02.at:43:
4253 mkdir ustar
4254 (cd ustar
4255 TEST_TAR_FORMAT=ustar
4256 export TEST_TAR_FORMAT
4257 TAR_OPTIONS=\"-H ustar\"
4258 export TAR_OPTIONS
4259 rm -rf *
4260
4261 genfile --file file1
4262 genfile --file file2
4263
4264 # Make sure file timestamps in the archive will not differ
4265 MTIME=\"--mtime=@0\"
4266
4267 # For PAX archives, we need to make sure extended header names are
4268 # reproducible and that their contents won't change with time
4269 if test \$TEST_TAR_FORMAT = posix; then
4270   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
4271 fi
4272
4273 echo Creating archive.1
4274 tar \$MTIME -cf archive.1 file1 file2
4275
4276 echo Creating archive.2
4277 tar \$MTIME -cf archive.2 -T /dev/null
4278 tar \$MTIME -rf archive.2 file1
4279 tar \$MTIME -rf archive.2 file2
4280
4281 echo Comparing archives
4282 cmp archive.1 archive.2
4283 )"
4284 echo append02.at:43 >"$at_check_line_file"
4285
4286 at_trace_this=
4287 if test -n "$at_traceon"; then
4288     echo 'Not enabling shell tracing (command contains an embedded newline)'
4289 fi
4290
4291 if test -n "$at_trace_this"; then
4292     ( $at_traceon;
4293 mkdir ustar
4294 (cd ustar
4295 TEST_TAR_FORMAT=ustar
4296 export TEST_TAR_FORMAT
4297 TAR_OPTIONS="-H ustar"
4298 export TAR_OPTIONS
4299 rm -rf *
4300
4301 genfile --file file1
4302 genfile --file file2
4303
4304 # Make sure file timestamps in the archive will not differ
4305 MTIME="--mtime=@0"
4306
4307 # For PAX archives, we need to make sure extended header names are
4308 # reproducible and that their contents won't change with time
4309 if test $TEST_TAR_FORMAT = posix; then
4310   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4311 fi
4312
4313 echo Creating archive.1
4314 tar $MTIME -cf archive.1 file1 file2
4315
4316 echo Creating archive.2
4317 tar $MTIME -cf archive.2 -T /dev/null
4318 tar $MTIME -rf archive.2 file1
4319 tar $MTIME -rf archive.2 file2
4320
4321 echo Comparing archives
4322 cmp archive.1 archive.2
4323 ) ) >"$at_stdout" 2>"$at_stder1"
4324     at_status=$?
4325     grep '^ *+' "$at_stder1" >&2
4326     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4327 else
4328     ( :;
4329 mkdir ustar
4330 (cd ustar
4331 TEST_TAR_FORMAT=ustar
4332 export TEST_TAR_FORMAT
4333 TAR_OPTIONS="-H ustar"
4334 export TAR_OPTIONS
4335 rm -rf *
4336
4337 genfile --file file1
4338 genfile --file file2
4339
4340 # Make sure file timestamps in the archive will not differ
4341 MTIME="--mtime=@0"
4342
4343 # For PAX archives, we need to make sure extended header names are
4344 # reproducible and that their contents won't change with time
4345 if test $TEST_TAR_FORMAT = posix; then
4346   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4347 fi
4348
4349 echo Creating archive.1
4350 tar $MTIME -cf archive.1 file1 file2
4351
4352 echo Creating archive.2
4353 tar $MTIME -cf archive.2 -T /dev/null
4354 tar $MTIME -rf archive.2 file1
4355 tar $MTIME -rf archive.2 file2
4356
4357 echo Comparing archives
4358 cmp archive.1 archive.2
4359 ) ) >"$at_stdout" 2>"$at_stderr"
4360     at_status=$?
4361 fi
4362
4363 at_failed=false
4364 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4365 echo >>"$at_stdout"; echo "Creating archive.1
4366 Creating archive.2
4367 Comparing archives
4368 " | $at_diff - "$at_stdout" || at_failed=:
4369 case $at_status in
4370    77) echo 77 > "$at_status_file"; exit 77;;
4371    0) ;;
4372    *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
4373       at_failed=:;;
4374 esac
4375 if $at_failed; then
4376
4377
4378   echo 1 > "$at_status_file"
4379   exit 1
4380 fi
4381
4382 $at_traceon
4383 $at_traceoff
4384 echo "$at_srcdir/append02.at:43:
4385 mkdir posix
4386 (cd posix
4387 TEST_TAR_FORMAT=posix
4388 export TEST_TAR_FORMAT
4389 TAR_OPTIONS=\"-H posix\"
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 )"
4416 echo append02.at:43 >"$at_check_line_file"
4417
4418 at_trace_this=
4419 if test -n "$at_traceon"; then
4420     echo 'Not enabling shell tracing (command contains an embedded newline)'
4421 fi
4422
4423 if test -n "$at_trace_this"; then
4424     ( $at_traceon;
4425 mkdir posix
4426 (cd posix
4427 TEST_TAR_FORMAT=posix
4428 export TEST_TAR_FORMAT
4429 TAR_OPTIONS="-H posix"
4430 export TAR_OPTIONS
4431 rm -rf *
4432
4433 genfile --file file1
4434 genfile --file file2
4435
4436 # Make sure file timestamps in the archive will not differ
4437 MTIME="--mtime=@0"
4438
4439 # For PAX archives, we need to make sure extended header names are
4440 # reproducible and that their contents won't change with time
4441 if test $TEST_TAR_FORMAT = posix; then
4442   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4443 fi
4444
4445 echo Creating archive.1
4446 tar $MTIME -cf archive.1 file1 file2
4447
4448 echo Creating archive.2
4449 tar $MTIME -cf archive.2 -T /dev/null
4450 tar $MTIME -rf archive.2 file1
4451 tar $MTIME -rf archive.2 file2
4452
4453 echo Comparing archives
4454 cmp archive.1 archive.2
4455 ) ) >"$at_stdout" 2>"$at_stder1"
4456     at_status=$?
4457     grep '^ *+' "$at_stder1" >&2
4458     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4459 else
4460     ( :;
4461 mkdir posix
4462 (cd posix
4463 TEST_TAR_FORMAT=posix
4464 export TEST_TAR_FORMAT
4465 TAR_OPTIONS="-H posix"
4466 export TAR_OPTIONS
4467 rm -rf *
4468
4469 genfile --file file1
4470 genfile --file file2
4471
4472 # Make sure file timestamps in the archive will not differ
4473 MTIME="--mtime=@0"
4474
4475 # For PAX archives, we need to make sure extended header names are
4476 # reproducible and that their contents won't change with time
4477 if test $TEST_TAR_FORMAT = posix; then
4478   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4479 fi
4480
4481 echo Creating archive.1
4482 tar $MTIME -cf archive.1 file1 file2
4483
4484 echo Creating archive.2
4485 tar $MTIME -cf archive.2 -T /dev/null
4486 tar $MTIME -rf archive.2 file1
4487 tar $MTIME -rf archive.2 file2
4488
4489 echo Comparing archives
4490 cmp archive.1 archive.2
4491 ) ) >"$at_stdout" 2>"$at_stderr"
4492     at_status=$?
4493 fi
4494
4495 at_failed=false
4496 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4497 echo >>"$at_stdout"; echo "Creating archive.1
4498 Creating archive.2
4499 Comparing archives
4500 " | $at_diff - "$at_stdout" || at_failed=:
4501 case $at_status in
4502    77) echo 77 > "$at_status_file"; exit 77;;
4503    0) ;;
4504    *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
4505       at_failed=:;;
4506 esac
4507 if $at_failed; then
4508
4509
4510   echo 1 > "$at_status_file"
4511   exit 1
4512 fi
4513
4514 $at_traceon
4515 $at_traceoff
4516 echo "$at_srcdir/append02.at:43:
4517 mkdir gnu
4518 (cd gnu
4519 TEST_TAR_FORMAT=gnu
4520 export TEST_TAR_FORMAT
4521 TAR_OPTIONS=\"-H gnu\"
4522 export TAR_OPTIONS
4523 rm -rf *
4524
4525 genfile --file file1
4526 genfile --file file2
4527
4528 # Make sure file timestamps in the archive will not differ
4529 MTIME=\"--mtime=@0\"
4530
4531 # For PAX archives, we need to make sure extended header names are
4532 # reproducible and that their contents won't change with time
4533 if test \$TEST_TAR_FORMAT = posix; then
4534   TAR_OPTIONS=\"\$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime\"
4535 fi
4536
4537 echo Creating archive.1
4538 tar \$MTIME -cf archive.1 file1 file2
4539
4540 echo Creating archive.2
4541 tar \$MTIME -cf archive.2 -T /dev/null
4542 tar \$MTIME -rf archive.2 file1
4543 tar \$MTIME -rf archive.2 file2
4544
4545 echo Comparing archives
4546 cmp archive.1 archive.2
4547 )"
4548 echo append02.at:43 >"$at_check_line_file"
4549
4550 at_trace_this=
4551 if test -n "$at_traceon"; then
4552     echo 'Not enabling shell tracing (command contains an embedded newline)'
4553 fi
4554
4555 if test -n "$at_trace_this"; then
4556     ( $at_traceon;
4557 mkdir gnu
4558 (cd gnu
4559 TEST_TAR_FORMAT=gnu
4560 export TEST_TAR_FORMAT
4561 TAR_OPTIONS="-H gnu"
4562 export TAR_OPTIONS
4563 rm -rf *
4564
4565 genfile --file file1
4566 genfile --file file2
4567
4568 # Make sure file timestamps in the archive will not differ
4569 MTIME="--mtime=@0"
4570
4571 # For PAX archives, we need to make sure extended header names are
4572 # reproducible and that their contents won't change with time
4573 if test $TEST_TAR_FORMAT = posix; then
4574   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4575 fi
4576
4577 echo Creating archive.1
4578 tar $MTIME -cf archive.1 file1 file2
4579
4580 echo Creating archive.2
4581 tar $MTIME -cf archive.2 -T /dev/null
4582 tar $MTIME -rf archive.2 file1
4583 tar $MTIME -rf archive.2 file2
4584
4585 echo Comparing archives
4586 cmp archive.1 archive.2
4587 ) ) >"$at_stdout" 2>"$at_stder1"
4588     at_status=$?
4589     grep '^ *+' "$at_stder1" >&2
4590     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4591 else
4592     ( :;
4593 mkdir gnu
4594 (cd gnu
4595 TEST_TAR_FORMAT=gnu
4596 export TEST_TAR_FORMAT
4597 TAR_OPTIONS="-H gnu"
4598 export TAR_OPTIONS
4599 rm -rf *
4600
4601 genfile --file file1
4602 genfile --file file2
4603
4604 # Make sure file timestamps in the archive will not differ
4605 MTIME="--mtime=@0"
4606
4607 # For PAX archives, we need to make sure extended header names are
4608 # reproducible and that their contents won't change with time
4609 if test $TEST_TAR_FORMAT = posix; then
4610   TAR_OPTIONS="$TAR_OPTIONS --pax-option=exthdr.name=%d/PaxHeaders/%f,delete=mtime,delete=atime,delete=ctime"
4611 fi
4612
4613 echo Creating archive.1
4614 tar $MTIME -cf archive.1 file1 file2
4615
4616 echo Creating archive.2
4617 tar $MTIME -cf archive.2 -T /dev/null
4618 tar $MTIME -rf archive.2 file1
4619 tar $MTIME -rf archive.2 file2
4620
4621 echo Comparing archives
4622 cmp archive.1 archive.2
4623 ) ) >"$at_stdout" 2>"$at_stderr"
4624     at_status=$?
4625 fi
4626
4627 at_failed=false
4628 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4629 echo >>"$at_stdout"; echo "Creating archive.1
4630 Creating archive.2
4631 Comparing archives
4632 " | $at_diff - "$at_stdout" || at_failed=:
4633 case $at_status in
4634    77) echo 77 > "$at_status_file"; exit 77;;
4635    0) ;;
4636    *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0"
4637       at_failed=:;;
4638 esac
4639 if $at_failed; then
4640
4641
4642   echo 1 > "$at_status_file"
4643   exit 1
4644 fi
4645
4646 $at_traceon
4647
4648
4649
4650       $at_traceoff
4651       $at_times_p && times >"$at_times_file"
4652     ) 5>&1 2>&1 | eval $at_tee_pipe
4653     at_status=`cat "$at_status_file"`
4654     ;;
4655
4656   12 ) # 12. exclude.at:23: exclude
4657     at_setup_line='exclude.at:23'
4658     at_desc="exclude"
4659     $at_quiet $ECHO_N " 12: exclude                                        $ECHO_C"
4660     at_xfail=no
4661       test -f $XFAILFILE && at_xfail=yes
4662     echo "#                             -*- compilation -*-" >> "$at_group_log"
4663     (
4664       echo "12. exclude.at:23: testing ..."
4665       $at_traceon
4666
4667
4668
4669
4670
4671   $at_traceoff
4672 echo "$at_srcdir/exclude.at:26:
4673 mkdir ustar
4674 (cd ustar
4675 TEST_TAR_FORMAT=ustar
4676 export TEST_TAR_FORMAT
4677 TAR_OPTIONS=\"-H ustar\"
4678 export TAR_OPTIONS
4679 rm -rf *
4680
4681
4682 test -z "`sort < /dev/null 2>&1`" || exit 77
4683
4684
4685 mkdir dir
4686 echo blues > dir/blues
4687 echo jazz > dir/jazz
4688 mkdir dir/folk
4689 echo tagfile > dir/folk/tagfile
4690 echo sanjuan > dir/folk/sanjuan
4691 mkdir dir/rock
4692 echo \"Signature: 8a477f597d28d172789f06886806bc55\" > dir/rock/CACHEDIR.TAG
4693 echo \"test\" > dir/rock/file
4694
4695 for option in exclude-caches exclude-caches-under exclude-caches-all
4696 do
4697   echo OPTION \$option
4698   tar -cf archive.tar --\$option -v dir 2>err | sort
4699   cat err
4700   echo ARCHIVE
4701   tar tf archive.tar | sort
4702 done
4703
4704 for option in exclude-tag exclude-tag-under exclude-tag-all
4705 do
4706   echo OPTION \$option
4707   tar -cf archive.tar --\${option}=tagfile -v dir 2>err | sort
4708   cat err
4709   echo ARCHIVE
4710   tar tf archive.tar | sort
4711 done
4712 )"
4713 echo exclude.at:26 >"$at_check_line_file"
4714
4715 at_trace_this=
4716 if test -n "$at_traceon"; then
4717     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
4718 fi
4719
4720 if test -n "$at_trace_this"; then
4721     ( $at_traceon;
4722 mkdir ustar
4723 (cd ustar
4724 TEST_TAR_FORMAT=ustar
4725 export TEST_TAR_FORMAT
4726 TAR_OPTIONS="-H ustar"
4727 export TAR_OPTIONS
4728 rm -rf *
4729
4730
4731 test -z "`sort < /dev/null 2>&1`" || exit 77
4732
4733
4734 mkdir dir
4735 echo blues > dir/blues
4736 echo jazz > dir/jazz
4737 mkdir dir/folk
4738 echo tagfile > dir/folk/tagfile
4739 echo sanjuan > dir/folk/sanjuan
4740 mkdir dir/rock
4741 echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
4742 echo "test" > dir/rock/file
4743
4744 for option in exclude-caches exclude-caches-under exclude-caches-all
4745 do
4746   echo OPTION $option
4747   tar -cf archive.tar --$option -v dir 2>err | sort
4748   cat err
4749   echo ARCHIVE
4750   tar tf archive.tar | sort
4751 done
4752
4753 for option in exclude-tag exclude-tag-under exclude-tag-all
4754 do
4755   echo OPTION $option
4756   tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
4757   cat err
4758   echo ARCHIVE
4759   tar tf archive.tar | sort
4760 done
4761 ) ) >"$at_stdout" 2>"$at_stder1"
4762     at_status=$?
4763     grep '^ *+' "$at_stder1" >&2
4764     grep -v '^ *+' "$at_stder1" >"$at_stderr"
4765 else
4766     ( :;
4767 mkdir ustar
4768 (cd ustar
4769 TEST_TAR_FORMAT=ustar
4770 export TEST_TAR_FORMAT
4771 TAR_OPTIONS="-H ustar"
4772 export TAR_OPTIONS
4773 rm -rf *
4774
4775
4776 test -z "`sort < /dev/null 2>&1`" || exit 77
4777
4778
4779 mkdir dir
4780 echo blues > dir/blues
4781 echo jazz > dir/jazz
4782 mkdir dir/folk
4783 echo tagfile > dir/folk/tagfile
4784 echo sanjuan > dir/folk/sanjuan
4785 mkdir dir/rock
4786 echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
4787 echo "test" > dir/rock/file
4788
4789 for option in exclude-caches exclude-caches-under exclude-caches-all
4790 do
4791   echo OPTION $option
4792   tar -cf archive.tar --$option -v dir 2>err | sort
4793   cat err
4794   echo ARCHIVE
4795   tar tf archive.tar | sort
4796 done
4797
4798 for option in exclude-tag exclude-tag-under exclude-tag-all
4799 do
4800   echo OPTION $option
4801   tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort
4802   cat err
4803   echo ARCHIVE
4804   tar tf archive.tar | sort
4805 done
4806 ) ) >"$at_stdout" 2>"$at_stderr"
4807     at_status=$?
4808 fi
4809
4810 at_failed=false
4811 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
4812 echo >>"$at_stdout"; echo "OPTION exclude-caches
4813 dir/
4814 dir/blues
4815 dir/folk/
4816 dir/folk/sanjuan
4817 dir/folk/tagfile
4818 dir/jazz
4819 dir/rock/
4820 dir/rock/CACHEDIR.TAG
4821 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
4822 ARCHIVE
4823 dir/
4824 dir/blues
4825 dir/folk/
4826 dir/folk/sanjuan
4827 dir/folk/tagfile
4828 dir/jazz
4829 dir/rock/
4830 dir/rock/CACHEDIR.TAG
4831 OPTION exclude-caches-under
4832 dir/
4833 dir/blues
4834 dir/folk/
4835 dir/folk/sanjuan
4836 dir/folk/tagfile
4837 dir/jazz
4838 dir/rock/
4839 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
4840 ARCHIVE
4841 dir/
4842 dir/blues
4843 dir/folk/
4844 dir/folk/sanjuan
4845 dir/folk/tagfile
4846 dir/jazz
4847 dir/rock/
4848 OPTION exclude-caches-all
4849 dir/
4850 dir/blues
4851 dir/folk/
4852 dir/folk/sanjuan
4853 dir/folk/tagfile
4854 dir/jazz
4855 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
4856 ARCHIVE
4857 dir/
4858 dir/blues
4859 dir/folk/
4860 dir/folk/sanjuan
4861 dir/folk/tagfile
4862 dir/jazz
4863 OPTION exclude-tag
4864 dir/
4865 dir/blues
4866 dir/folk/
4867 dir/folk/tagfile
4868 dir/jazz
4869 dir/rock/
4870 dir/rock/CACHEDIR.TAG
4871 dir/rock/file
4872 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
4873 ARCHIVE
4874 dir/
4875 dir/blues
4876 dir/folk/
4877 dir/folk/tagfile
4878 dir/jazz
4879 dir/rock/
4880 dir/rock/CACHEDIR.TAG
4881 dir/rock/file
4882 OPTION exclude-tag-under
4883 dir/
4884 dir/blues
4885 dir/folk/
4886 dir/jazz
4887 dir/rock/
4888 dir/rock/CACHEDIR.TAG
4889 dir/rock/file
4890 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
4891 ARCHIVE
4892 dir/
4893 dir/blues
4894 dir/folk/
4895 dir/jazz
4896 dir/rock/
4897 dir/rock/CACHEDIR.TAG
4898 dir/rock/file
4899 OPTION exclude-tag-all
4900 dir/
4901 dir/blues
4902 dir/jazz
4903 dir/rock/
4904 dir/rock/CACHEDIR.TAG
4905 dir/rock/file
4906 tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped
4907 ARCHIVE
4908 dir/
4909 dir/blues
4910 dir/jazz
4911 dir/rock/
4912 dir/rock/CACHEDIR.TAG
4913 dir/rock/file
4914 " | $at_diff - "$at_stdout" || at_failed=:
4915 case $at_status in
4916    77) echo 77 > "$at_status_file"; exit 77;;
4917    0) ;;
4918    *) echo "$at_srcdir/exclude.at:26: exit code was $at_status, expected 0"
4919       at_failed=:;;
4920 esac
4921 if $at_failed; then
4922
4923
4924   echo 1 > "$at_status_file"
4925   exit 1
4926 fi
4927
4928 $at_traceon
4929
4930
4931
4932       $at_traceoff
4933       $at_times_p && times >"$at_times_file"
4934     ) 5>&1 2>&1 | eval $at_tee_pipe
4935     at_status=`cat "$at_status_file"`
4936     ;;
4937
4938   13 ) # 13. delete01.at:23: deleting a member after a big one
4939     at_setup_line='delete01.at:23'
4940     at_desc="deleting a member after a big one"
4941     $at_quiet $ECHO_N " 13: deleting a member after a big one              $ECHO_C"
4942     at_xfail=no
4943       test -f $XFAILFILE && at_xfail=yes
4944     echo "#                             -*- compilation -*-" >> "$at_group_log"
4945     (
4946       echo "13. delete01.at:23: testing ..."
4947       $at_traceon
4948
4949
4950
4951
4952
4953   $at_traceoff
4954 echo "$at_srcdir/delete01.at:26:
4955 mkdir v7
4956 (cd v7
4957 TEST_TAR_FORMAT=v7
4958 export TEST_TAR_FORMAT
4959 TAR_OPTIONS=\"-H v7\"
4960 export TAR_OPTIONS
4961 rm -rf *
4962
4963 genfile -l 50000 --file file1
4964 genfile -l 1024 --file file2
4965 tar cf archive file1 file2
4966 tar f archive --delete file2
4967 tar tf archive)"
4968 echo delete01.at:26 >"$at_check_line_file"
4969
4970 at_trace_this=
4971 if test -n "$at_traceon"; then
4972     echo 'Not enabling shell tracing (command contains an embedded newline)'
4973 fi
4974
4975 if test -n "$at_trace_this"; then
4976     ( $at_traceon;
4977 mkdir v7
4978 (cd v7
4979 TEST_TAR_FORMAT=v7
4980 export TEST_TAR_FORMAT
4981 TAR_OPTIONS="-H v7"
4982 export TAR_OPTIONS
4983 rm -rf *
4984
4985 genfile -l 50000 --file file1
4986 genfile -l 1024 --file file2
4987 tar cf archive file1 file2
4988 tar f archive --delete file2
4989 tar tf archive) ) >"$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 v7
4996 (cd v7
4997 TEST_TAR_FORMAT=v7
4998 export TEST_TAR_FORMAT
4999 TAR_OPTIONS="-H v7"
5000 export TAR_OPTIONS
5001 rm -rf *
5002
5003 genfile -l 50000 --file file1
5004 genfile -l 1024 --file file2
5005 tar cf archive file1 file2
5006 tar f archive --delete file2
5007 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
5008     at_status=$?
5009 fi
5010
5011 at_failed=false
5012 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5013 echo >>"$at_stdout"; echo "file1
5014 " | $at_diff - "$at_stdout" || at_failed=:
5015 case $at_status in
5016    77) echo 77 > "$at_status_file"; exit 77;;
5017    0) ;;
5018    *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
5019       at_failed=:;;
5020 esac
5021 if $at_failed; then
5022
5023
5024   echo 1 > "$at_status_file"
5025   exit 1
5026 fi
5027
5028 $at_traceon
5029 $at_traceoff
5030 echo "$at_srcdir/delete01.at:26:
5031 mkdir oldgnu
5032 (cd oldgnu
5033 TEST_TAR_FORMAT=oldgnu
5034 export TEST_TAR_FORMAT
5035 TAR_OPTIONS=\"-H oldgnu\"
5036 export TAR_OPTIONS
5037 rm -rf *
5038
5039 genfile -l 50000 --file file1
5040 genfile -l 1024 --file file2
5041 tar cf archive file1 file2
5042 tar f archive --delete file2
5043 tar tf archive)"
5044 echo delete01.at:26 >"$at_check_line_file"
5045
5046 at_trace_this=
5047 if test -n "$at_traceon"; then
5048     echo 'Not enabling shell tracing (command contains an embedded newline)'
5049 fi
5050
5051 if test -n "$at_trace_this"; then
5052     ( $at_traceon;
5053 mkdir oldgnu
5054 (cd oldgnu
5055 TEST_TAR_FORMAT=oldgnu
5056 export TEST_TAR_FORMAT
5057 TAR_OPTIONS="-H oldgnu"
5058 export TAR_OPTIONS
5059 rm -rf *
5060
5061 genfile -l 50000 --file file1
5062 genfile -l 1024 --file file2
5063 tar cf archive file1 file2
5064 tar f archive --delete file2
5065 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
5066     at_status=$?
5067     grep '^ *+' "$at_stder1" >&2
5068     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5069 else
5070     ( :;
5071 mkdir oldgnu
5072 (cd oldgnu
5073 TEST_TAR_FORMAT=oldgnu
5074 export TEST_TAR_FORMAT
5075 TAR_OPTIONS="-H oldgnu"
5076 export TAR_OPTIONS
5077 rm -rf *
5078
5079 genfile -l 50000 --file file1
5080 genfile -l 1024 --file file2
5081 tar cf archive file1 file2
5082 tar f archive --delete file2
5083 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
5084     at_status=$?
5085 fi
5086
5087 at_failed=false
5088 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5089 echo >>"$at_stdout"; echo "file1
5090 " | $at_diff - "$at_stdout" || at_failed=:
5091 case $at_status in
5092    77) echo 77 > "$at_status_file"; exit 77;;
5093    0) ;;
5094    *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
5095       at_failed=:;;
5096 esac
5097 if $at_failed; then
5098
5099
5100   echo 1 > "$at_status_file"
5101   exit 1
5102 fi
5103
5104 $at_traceon
5105 $at_traceoff
5106 echo "$at_srcdir/delete01.at:26:
5107 mkdir ustar
5108 (cd ustar
5109 TEST_TAR_FORMAT=ustar
5110 export TEST_TAR_FORMAT
5111 TAR_OPTIONS=\"-H ustar\"
5112 export TAR_OPTIONS
5113 rm -rf *
5114
5115 genfile -l 50000 --file file1
5116 genfile -l 1024 --file file2
5117 tar cf archive file1 file2
5118 tar f archive --delete file2
5119 tar tf archive)"
5120 echo delete01.at:26 >"$at_check_line_file"
5121
5122 at_trace_this=
5123 if test -n "$at_traceon"; then
5124     echo 'Not enabling shell tracing (command contains an embedded newline)'
5125 fi
5126
5127 if test -n "$at_trace_this"; then
5128     ( $at_traceon;
5129 mkdir ustar
5130 (cd ustar
5131 TEST_TAR_FORMAT=ustar
5132 export TEST_TAR_FORMAT
5133 TAR_OPTIONS="-H ustar"
5134 export TAR_OPTIONS
5135 rm -rf *
5136
5137 genfile -l 50000 --file file1
5138 genfile -l 1024 --file file2
5139 tar cf archive file1 file2
5140 tar f archive --delete file2
5141 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
5142     at_status=$?
5143     grep '^ *+' "$at_stder1" >&2
5144     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5145 else
5146     ( :;
5147 mkdir ustar
5148 (cd ustar
5149 TEST_TAR_FORMAT=ustar
5150 export TEST_TAR_FORMAT
5151 TAR_OPTIONS="-H ustar"
5152 export TAR_OPTIONS
5153 rm -rf *
5154
5155 genfile -l 50000 --file file1
5156 genfile -l 1024 --file file2
5157 tar cf archive file1 file2
5158 tar f archive --delete file2
5159 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
5160     at_status=$?
5161 fi
5162
5163 at_failed=false
5164 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5165 echo >>"$at_stdout"; echo "file1
5166 " | $at_diff - "$at_stdout" || at_failed=:
5167 case $at_status in
5168    77) echo 77 > "$at_status_file"; exit 77;;
5169    0) ;;
5170    *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
5171       at_failed=:;;
5172 esac
5173 if $at_failed; then
5174
5175
5176   echo 1 > "$at_status_file"
5177   exit 1
5178 fi
5179
5180 $at_traceon
5181 $at_traceoff
5182 echo "$at_srcdir/delete01.at:26:
5183 mkdir posix
5184 (cd posix
5185 TEST_TAR_FORMAT=posix
5186 export TEST_TAR_FORMAT
5187 TAR_OPTIONS=\"-H posix\"
5188 export TAR_OPTIONS
5189 rm -rf *
5190
5191 genfile -l 50000 --file file1
5192 genfile -l 1024 --file file2
5193 tar cf archive file1 file2
5194 tar f archive --delete file2
5195 tar tf archive)"
5196 echo delete01.at:26 >"$at_check_line_file"
5197
5198 at_trace_this=
5199 if test -n "$at_traceon"; then
5200     echo 'Not enabling shell tracing (command contains an embedded newline)'
5201 fi
5202
5203 if test -n "$at_trace_this"; then
5204     ( $at_traceon;
5205 mkdir posix
5206 (cd posix
5207 TEST_TAR_FORMAT=posix
5208 export TEST_TAR_FORMAT
5209 TAR_OPTIONS="-H posix"
5210 export TAR_OPTIONS
5211 rm -rf *
5212
5213 genfile -l 50000 --file file1
5214 genfile -l 1024 --file file2
5215 tar cf archive file1 file2
5216 tar f archive --delete file2
5217 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
5218     at_status=$?
5219     grep '^ *+' "$at_stder1" >&2
5220     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5221 else
5222     ( :;
5223 mkdir posix
5224 (cd posix
5225 TEST_TAR_FORMAT=posix
5226 export TEST_TAR_FORMAT
5227 TAR_OPTIONS="-H posix"
5228 export TAR_OPTIONS
5229 rm -rf *
5230
5231 genfile -l 50000 --file file1
5232 genfile -l 1024 --file file2
5233 tar cf archive file1 file2
5234 tar f archive --delete file2
5235 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
5236     at_status=$?
5237 fi
5238
5239 at_failed=false
5240 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5241 echo >>"$at_stdout"; echo "file1
5242 " | $at_diff - "$at_stdout" || at_failed=:
5243 case $at_status in
5244    77) echo 77 > "$at_status_file"; exit 77;;
5245    0) ;;
5246    *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
5247       at_failed=:;;
5248 esac
5249 if $at_failed; then
5250
5251
5252   echo 1 > "$at_status_file"
5253   exit 1
5254 fi
5255
5256 $at_traceon
5257 $at_traceoff
5258 echo "$at_srcdir/delete01.at:26:
5259 mkdir gnu
5260 (cd gnu
5261 TEST_TAR_FORMAT=gnu
5262 export TEST_TAR_FORMAT
5263 TAR_OPTIONS=\"-H gnu\"
5264 export TAR_OPTIONS
5265 rm -rf *
5266
5267 genfile -l 50000 --file file1
5268 genfile -l 1024 --file file2
5269 tar cf archive file1 file2
5270 tar f archive --delete file2
5271 tar tf archive)"
5272 echo delete01.at:26 >"$at_check_line_file"
5273
5274 at_trace_this=
5275 if test -n "$at_traceon"; then
5276     echo 'Not enabling shell tracing (command contains an embedded newline)'
5277 fi
5278
5279 if test -n "$at_trace_this"; then
5280     ( $at_traceon;
5281 mkdir gnu
5282 (cd gnu
5283 TEST_TAR_FORMAT=gnu
5284 export TEST_TAR_FORMAT
5285 TAR_OPTIONS="-H gnu"
5286 export TAR_OPTIONS
5287 rm -rf *
5288
5289 genfile -l 50000 --file file1
5290 genfile -l 1024 --file file2
5291 tar cf archive file1 file2
5292 tar f archive --delete file2
5293 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
5294     at_status=$?
5295     grep '^ *+' "$at_stder1" >&2
5296     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5297 else
5298     ( :;
5299 mkdir gnu
5300 (cd gnu
5301 TEST_TAR_FORMAT=gnu
5302 export TEST_TAR_FORMAT
5303 TAR_OPTIONS="-H gnu"
5304 export TAR_OPTIONS
5305 rm -rf *
5306
5307 genfile -l 50000 --file file1
5308 genfile -l 1024 --file file2
5309 tar cf archive file1 file2
5310 tar f archive --delete file2
5311 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
5312     at_status=$?
5313 fi
5314
5315 at_failed=false
5316 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5317 echo >>"$at_stdout"; echo "file1
5318 " | $at_diff - "$at_stdout" || at_failed=:
5319 case $at_status in
5320    77) echo 77 > "$at_status_file"; exit 77;;
5321    0) ;;
5322    *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0"
5323       at_failed=:;;
5324 esac
5325 if $at_failed; then
5326
5327
5328   echo 1 > "$at_status_file"
5329   exit 1
5330 fi
5331
5332 $at_traceon
5333
5334
5335
5336       $at_traceoff
5337       $at_times_p && times >"$at_times_file"
5338     ) 5>&1 2>&1 | eval $at_tee_pipe
5339     at_status=`cat "$at_status_file"`
5340     ;;
5341
5342   14 ) # 14. delete02.at:23: deleting a member from stdin archive
5343     at_setup_line='delete02.at:23'
5344     at_desc="deleting a member from stdin archive"
5345     $at_quiet $ECHO_N " 14: deleting a member from stdin archive           $ECHO_C"
5346     at_xfail=no
5347       test -f $XFAILFILE && at_xfail=yes
5348     echo "#                             -*- compilation -*-" >> "$at_group_log"
5349     (
5350       echo "14. delete02.at:23: testing ..."
5351       $at_traceon
5352
5353
5354
5355
5356
5357   $at_traceoff
5358 echo "$at_srcdir/delete02.at:26:
5359 mkdir v7
5360 (cd v7
5361 TEST_TAR_FORMAT=v7
5362 export TEST_TAR_FORMAT
5363 TAR_OPTIONS=\"-H v7\"
5364 export TAR_OPTIONS
5365 rm -rf *
5366
5367 genfile -l 3073 -p zeros --file 1
5368 cp 1 2
5369 cp 2 3
5370 tar cf archive 1 2 3
5371 tar tf archive
5372 cat archive | tar f - --delete 2 > archive2
5373 echo separator
5374 tar tf archive2)"
5375 echo delete02.at:26 >"$at_check_line_file"
5376
5377 at_trace_this=
5378 if test -n "$at_traceon"; then
5379     echo 'Not enabling shell tracing (command contains an embedded newline)'
5380 fi
5381
5382 if test -n "$at_trace_this"; then
5383     ( $at_traceon;
5384 mkdir v7
5385 (cd v7
5386 TEST_TAR_FORMAT=v7
5387 export TEST_TAR_FORMAT
5388 TAR_OPTIONS="-H v7"
5389 export TAR_OPTIONS
5390 rm -rf *
5391
5392 genfile -l 3073 -p zeros --file 1
5393 cp 1 2
5394 cp 2 3
5395 tar cf archive 1 2 3
5396 tar tf archive
5397 cat archive | tar f - --delete 2 > archive2
5398 echo separator
5399 tar tf archive2) ) >"$at_stdout" 2>"$at_stder1"
5400     at_status=$?
5401     grep '^ *+' "$at_stder1" >&2
5402     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5403 else
5404     ( :;
5405 mkdir v7
5406 (cd v7
5407 TEST_TAR_FORMAT=v7
5408 export TEST_TAR_FORMAT
5409 TAR_OPTIONS="-H v7"
5410 export TAR_OPTIONS
5411 rm -rf *
5412
5413 genfile -l 3073 -p zeros --file 1
5414 cp 1 2
5415 cp 2 3
5416 tar cf archive 1 2 3
5417 tar tf archive
5418 cat archive | tar f - --delete 2 > archive2
5419 echo separator
5420 tar tf archive2) ) >"$at_stdout" 2>"$at_stderr"
5421     at_status=$?
5422 fi
5423
5424 at_failed=false
5425 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5426 echo >>"$at_stdout"; echo "1
5427 2
5428 3
5429 separator
5430 1
5431 3
5432 " | $at_diff - "$at_stdout" || at_failed=:
5433 case $at_status in
5434    77) echo 77 > "$at_status_file"; exit 77;;
5435    0) ;;
5436    *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
5437       at_failed=:;;
5438 esac
5439 if $at_failed; then
5440
5441
5442   echo 1 > "$at_status_file"
5443   exit 1
5444 fi
5445
5446 $at_traceon
5447 $at_traceoff
5448 echo "$at_srcdir/delete02.at:26:
5449 mkdir oldgnu
5450 (cd oldgnu
5451 TEST_TAR_FORMAT=oldgnu
5452 export TEST_TAR_FORMAT
5453 TAR_OPTIONS=\"-H oldgnu\"
5454 export TAR_OPTIONS
5455 rm -rf *
5456
5457 genfile -l 3073 -p zeros --file 1
5458 cp 1 2
5459 cp 2 3
5460 tar cf archive 1 2 3
5461 tar tf archive
5462 cat archive | tar f - --delete 2 > archive2
5463 echo separator
5464 tar tf archive2)"
5465 echo delete02.at:26 >"$at_check_line_file"
5466
5467 at_trace_this=
5468 if test -n "$at_traceon"; then
5469     echo 'Not enabling shell tracing (command contains an embedded newline)'
5470 fi
5471
5472 if test -n "$at_trace_this"; then
5473     ( $at_traceon;
5474 mkdir oldgnu
5475 (cd oldgnu
5476 TEST_TAR_FORMAT=oldgnu
5477 export TEST_TAR_FORMAT
5478 TAR_OPTIONS="-H oldgnu"
5479 export TAR_OPTIONS
5480 rm -rf *
5481
5482 genfile -l 3073 -p zeros --file 1
5483 cp 1 2
5484 cp 2 3
5485 tar cf archive 1 2 3
5486 tar tf archive
5487 cat archive | tar f - --delete 2 > archive2
5488 echo separator
5489 tar tf archive2) ) >"$at_stdout" 2>"$at_stder1"
5490     at_status=$?
5491     grep '^ *+' "$at_stder1" >&2
5492     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5493 else
5494     ( :;
5495 mkdir oldgnu
5496 (cd oldgnu
5497 TEST_TAR_FORMAT=oldgnu
5498 export TEST_TAR_FORMAT
5499 TAR_OPTIONS="-H oldgnu"
5500 export TAR_OPTIONS
5501 rm -rf *
5502
5503 genfile -l 3073 -p zeros --file 1
5504 cp 1 2
5505 cp 2 3
5506 tar cf archive 1 2 3
5507 tar tf archive
5508 cat archive | tar f - --delete 2 > archive2
5509 echo separator
5510 tar tf archive2) ) >"$at_stdout" 2>"$at_stderr"
5511     at_status=$?
5512 fi
5513
5514 at_failed=false
5515 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5516 echo >>"$at_stdout"; echo "1
5517 2
5518 3
5519 separator
5520 1
5521 3
5522 " | $at_diff - "$at_stdout" || at_failed=:
5523 case $at_status in
5524    77) echo 77 > "$at_status_file"; exit 77;;
5525    0) ;;
5526    *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
5527       at_failed=:;;
5528 esac
5529 if $at_failed; then
5530
5531
5532   echo 1 > "$at_status_file"
5533   exit 1
5534 fi
5535
5536 $at_traceon
5537 $at_traceoff
5538 echo "$at_srcdir/delete02.at:26:
5539 mkdir ustar
5540 (cd ustar
5541 TEST_TAR_FORMAT=ustar
5542 export TEST_TAR_FORMAT
5543 TAR_OPTIONS=\"-H ustar\"
5544 export TAR_OPTIONS
5545 rm -rf *
5546
5547 genfile -l 3073 -p zeros --file 1
5548 cp 1 2
5549 cp 2 3
5550 tar cf archive 1 2 3
5551 tar tf archive
5552 cat archive | tar f - --delete 2 > archive2
5553 echo separator
5554 tar tf archive2)"
5555 echo delete02.at:26 >"$at_check_line_file"
5556
5557 at_trace_this=
5558 if test -n "$at_traceon"; then
5559     echo 'Not enabling shell tracing (command contains an embedded newline)'
5560 fi
5561
5562 if test -n "$at_trace_this"; then
5563     ( $at_traceon;
5564 mkdir ustar
5565 (cd ustar
5566 TEST_TAR_FORMAT=ustar
5567 export TEST_TAR_FORMAT
5568 TAR_OPTIONS="-H ustar"
5569 export TAR_OPTIONS
5570 rm -rf *
5571
5572 genfile -l 3073 -p zeros --file 1
5573 cp 1 2
5574 cp 2 3
5575 tar cf archive 1 2 3
5576 tar tf archive
5577 cat archive | tar f - --delete 2 > archive2
5578 echo separator
5579 tar tf archive2) ) >"$at_stdout" 2>"$at_stder1"
5580     at_status=$?
5581     grep '^ *+' "$at_stder1" >&2
5582     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5583 else
5584     ( :;
5585 mkdir ustar
5586 (cd ustar
5587 TEST_TAR_FORMAT=ustar
5588 export TEST_TAR_FORMAT
5589 TAR_OPTIONS="-H ustar"
5590 export TAR_OPTIONS
5591 rm -rf *
5592
5593 genfile -l 3073 -p zeros --file 1
5594 cp 1 2
5595 cp 2 3
5596 tar cf archive 1 2 3
5597 tar tf archive
5598 cat archive | tar f - --delete 2 > archive2
5599 echo separator
5600 tar tf archive2) ) >"$at_stdout" 2>"$at_stderr"
5601     at_status=$?
5602 fi
5603
5604 at_failed=false
5605 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5606 echo >>"$at_stdout"; echo "1
5607 2
5608 3
5609 separator
5610 1
5611 3
5612 " | $at_diff - "$at_stdout" || at_failed=:
5613 case $at_status in
5614    77) echo 77 > "$at_status_file"; exit 77;;
5615    0) ;;
5616    *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
5617       at_failed=:;;
5618 esac
5619 if $at_failed; then
5620
5621
5622   echo 1 > "$at_status_file"
5623   exit 1
5624 fi
5625
5626 $at_traceon
5627 $at_traceoff
5628 echo "$at_srcdir/delete02.at:26:
5629 mkdir posix
5630 (cd posix
5631 TEST_TAR_FORMAT=posix
5632 export TEST_TAR_FORMAT
5633 TAR_OPTIONS=\"-H posix\"
5634 export TAR_OPTIONS
5635 rm -rf *
5636
5637 genfile -l 3073 -p zeros --file 1
5638 cp 1 2
5639 cp 2 3
5640 tar cf archive 1 2 3
5641 tar tf archive
5642 cat archive | tar f - --delete 2 > archive2
5643 echo separator
5644 tar tf archive2)"
5645 echo delete02.at:26 >"$at_check_line_file"
5646
5647 at_trace_this=
5648 if test -n "$at_traceon"; then
5649     echo 'Not enabling shell tracing (command contains an embedded newline)'
5650 fi
5651
5652 if test -n "$at_trace_this"; then
5653     ( $at_traceon;
5654 mkdir posix
5655 (cd posix
5656 TEST_TAR_FORMAT=posix
5657 export TEST_TAR_FORMAT
5658 TAR_OPTIONS="-H posix"
5659 export TAR_OPTIONS
5660 rm -rf *
5661
5662 genfile -l 3073 -p zeros --file 1
5663 cp 1 2
5664 cp 2 3
5665 tar cf archive 1 2 3
5666 tar tf archive
5667 cat archive | tar f - --delete 2 > archive2
5668 echo separator
5669 tar tf archive2) ) >"$at_stdout" 2>"$at_stder1"
5670     at_status=$?
5671     grep '^ *+' "$at_stder1" >&2
5672     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5673 else
5674     ( :;
5675 mkdir posix
5676 (cd posix
5677 TEST_TAR_FORMAT=posix
5678 export TEST_TAR_FORMAT
5679 TAR_OPTIONS="-H posix"
5680 export TAR_OPTIONS
5681 rm -rf *
5682
5683 genfile -l 3073 -p zeros --file 1
5684 cp 1 2
5685 cp 2 3
5686 tar cf archive 1 2 3
5687 tar tf archive
5688 cat archive | tar f - --delete 2 > archive2
5689 echo separator
5690 tar tf archive2) ) >"$at_stdout" 2>"$at_stderr"
5691     at_status=$?
5692 fi
5693
5694 at_failed=false
5695 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5696 echo >>"$at_stdout"; echo "1
5697 2
5698 3
5699 separator
5700 1
5701 3
5702 " | $at_diff - "$at_stdout" || at_failed=:
5703 case $at_status in
5704    77) echo 77 > "$at_status_file"; exit 77;;
5705    0) ;;
5706    *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
5707       at_failed=:;;
5708 esac
5709 if $at_failed; then
5710
5711
5712   echo 1 > "$at_status_file"
5713   exit 1
5714 fi
5715
5716 $at_traceon
5717 $at_traceoff
5718 echo "$at_srcdir/delete02.at:26:
5719 mkdir gnu
5720 (cd gnu
5721 TEST_TAR_FORMAT=gnu
5722 export TEST_TAR_FORMAT
5723 TAR_OPTIONS=\"-H gnu\"
5724 export TAR_OPTIONS
5725 rm -rf *
5726
5727 genfile -l 3073 -p zeros --file 1
5728 cp 1 2
5729 cp 2 3
5730 tar cf archive 1 2 3
5731 tar tf archive
5732 cat archive | tar f - --delete 2 > archive2
5733 echo separator
5734 tar tf archive2)"
5735 echo delete02.at:26 >"$at_check_line_file"
5736
5737 at_trace_this=
5738 if test -n "$at_traceon"; then
5739     echo 'Not enabling shell tracing (command contains an embedded newline)'
5740 fi
5741
5742 if test -n "$at_trace_this"; then
5743     ( $at_traceon;
5744 mkdir gnu
5745 (cd gnu
5746 TEST_TAR_FORMAT=gnu
5747 export TEST_TAR_FORMAT
5748 TAR_OPTIONS="-H gnu"
5749 export TAR_OPTIONS
5750 rm -rf *
5751
5752 genfile -l 3073 -p zeros --file 1
5753 cp 1 2
5754 cp 2 3
5755 tar cf archive 1 2 3
5756 tar tf archive
5757 cat archive | tar f - --delete 2 > archive2
5758 echo separator
5759 tar tf archive2) ) >"$at_stdout" 2>"$at_stder1"
5760     at_status=$?
5761     grep '^ *+' "$at_stder1" >&2
5762     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5763 else
5764     ( :;
5765 mkdir gnu
5766 (cd gnu
5767 TEST_TAR_FORMAT=gnu
5768 export TEST_TAR_FORMAT
5769 TAR_OPTIONS="-H gnu"
5770 export TAR_OPTIONS
5771 rm -rf *
5772
5773 genfile -l 3073 -p zeros --file 1
5774 cp 1 2
5775 cp 2 3
5776 tar cf archive 1 2 3
5777 tar tf archive
5778 cat archive | tar f - --delete 2 > archive2
5779 echo separator
5780 tar tf archive2) ) >"$at_stdout" 2>"$at_stderr"
5781     at_status=$?
5782 fi
5783
5784 at_failed=false
5785 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5786 echo >>"$at_stdout"; echo "1
5787 2
5788 3
5789 separator
5790 1
5791 3
5792 " | $at_diff - "$at_stdout" || at_failed=:
5793 case $at_status in
5794    77) echo 77 > "$at_status_file"; exit 77;;
5795    0) ;;
5796    *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0"
5797       at_failed=:;;
5798 esac
5799 if $at_failed; then
5800
5801
5802   echo 1 > "$at_status_file"
5803   exit 1
5804 fi
5805
5806 $at_traceon
5807
5808
5809
5810       $at_traceoff
5811       $at_times_p && times >"$at_times_file"
5812     ) 5>&1 2>&1 | eval $at_tee_pipe
5813     at_status=`cat "$at_status_file"`
5814     ;;
5815
5816   15 ) # 15. delete03.at:21: deleting members with long names
5817     at_setup_line='delete03.at:21'
5818     at_desc="deleting members with long names"
5819     $at_quiet $ECHO_N " 15: deleting members with long names               $ECHO_C"
5820     at_xfail=no
5821       test -f $XFAILFILE && at_xfail=yes
5822     echo "#                             -*- compilation -*-" >> "$at_group_log"
5823     (
5824       echo "15. delete03.at:21: testing ..."
5825       $at_traceon
5826
5827
5828
5829
5830
5831
5832
5833   $at_traceoff
5834 echo "$at_srcdir/delete03.at:26:
5835 mkdir gnu
5836 (cd gnu
5837 TEST_TAR_FORMAT=gnu
5838 export TEST_TAR_FORMAT
5839 TAR_OPTIONS=\"-H gnu\"
5840 export TAR_OPTIONS
5841 rm -rf *
5842
5843
5844 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
5845 rm -f \$prefix*
5846 for i in 1 2 3 4 5 6 7 8 9
5847 do touch \$prefix\$i
5848 done
5849 tar -cf archive ./\$prefix* &&
5850  tar --delete -f archive ./\${prefix}5 &&
5851  tar -tf archive
5852 )"
5853 echo delete03.at:26 >"$at_check_line_file"
5854
5855 at_trace_this=
5856 if test -n "$at_traceon"; then
5857     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
5858 fi
5859
5860 if test -n "$at_trace_this"; then
5861     ( $at_traceon;
5862 mkdir gnu
5863 (cd gnu
5864 TEST_TAR_FORMAT=gnu
5865 export TEST_TAR_FORMAT
5866 TAR_OPTIONS="-H gnu"
5867 export TAR_OPTIONS
5868 rm -rf *
5869
5870
5871 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
5872 rm -f $prefix*
5873 for i in 1 2 3 4 5 6 7 8 9
5874 do touch $prefix$i
5875 done
5876 tar -cf archive ./$prefix* &&
5877  tar --delete -f archive ./${prefix}5 &&
5878  tar -tf archive
5879 ) ) >"$at_stdout" 2>"$at_stder1"
5880     at_status=$?
5881     grep '^ *+' "$at_stder1" >&2
5882     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5883 else
5884     ( :;
5885 mkdir gnu
5886 (cd gnu
5887 TEST_TAR_FORMAT=gnu
5888 export TEST_TAR_FORMAT
5889 TAR_OPTIONS="-H gnu"
5890 export TAR_OPTIONS
5891 rm -rf *
5892
5893
5894 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
5895 rm -f $prefix*
5896 for i in 1 2 3 4 5 6 7 8 9
5897 do touch $prefix$i
5898 done
5899 tar -cf archive ./$prefix* &&
5900  tar --delete -f archive ./${prefix}5 &&
5901  tar -tf archive
5902 ) ) >"$at_stdout" 2>"$at_stderr"
5903     at_status=$?
5904 fi
5905
5906 at_failed=false
5907 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
5908 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
5909 ./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
5910 ./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
5911 ./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
5912 ./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
5913 ./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
5914 ./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
5915 ./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
5916 " | $at_diff - "$at_stdout" || at_failed=:
5917 case $at_status in
5918    77) echo 77 > "$at_status_file"; exit 77;;
5919    0) ;;
5920    *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0"
5921       at_failed=:;;
5922 esac
5923 if $at_failed; then
5924
5925
5926   echo 1 > "$at_status_file"
5927   exit 1
5928 fi
5929
5930 $at_traceon
5931 $at_traceoff
5932 echo "$at_srcdir/delete03.at:26:
5933 mkdir oldgnu
5934 (cd oldgnu
5935 TEST_TAR_FORMAT=oldgnu
5936 export TEST_TAR_FORMAT
5937 TAR_OPTIONS=\"-H oldgnu\"
5938 export TAR_OPTIONS
5939 rm -rf *
5940
5941
5942 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
5943 rm -f \$prefix*
5944 for i in 1 2 3 4 5 6 7 8 9
5945 do touch \$prefix\$i
5946 done
5947 tar -cf archive ./\$prefix* &&
5948  tar --delete -f archive ./\${prefix}5 &&
5949  tar -tf archive
5950 )"
5951 echo delete03.at:26 >"$at_check_line_file"
5952
5953 at_trace_this=
5954 if test -n "$at_traceon"; then
5955     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
5956 fi
5957
5958 if test -n "$at_trace_this"; then
5959     ( $at_traceon;
5960 mkdir oldgnu
5961 (cd oldgnu
5962 TEST_TAR_FORMAT=oldgnu
5963 export TEST_TAR_FORMAT
5964 TAR_OPTIONS="-H oldgnu"
5965 export TAR_OPTIONS
5966 rm -rf *
5967
5968
5969 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
5970 rm -f $prefix*
5971 for i in 1 2 3 4 5 6 7 8 9
5972 do touch $prefix$i
5973 done
5974 tar -cf archive ./$prefix* &&
5975  tar --delete -f archive ./${prefix}5 &&
5976  tar -tf archive
5977 ) ) >"$at_stdout" 2>"$at_stder1"
5978     at_status=$?
5979     grep '^ *+' "$at_stder1" >&2
5980     grep -v '^ *+' "$at_stder1" >"$at_stderr"
5981 else
5982     ( :;
5983 mkdir oldgnu
5984 (cd oldgnu
5985 TEST_TAR_FORMAT=oldgnu
5986 export TEST_TAR_FORMAT
5987 TAR_OPTIONS="-H oldgnu"
5988 export TAR_OPTIONS
5989 rm -rf *
5990
5991
5992 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
5993 rm -f $prefix*
5994 for i in 1 2 3 4 5 6 7 8 9
5995 do touch $prefix$i
5996 done
5997 tar -cf archive ./$prefix* &&
5998  tar --delete -f archive ./${prefix}5 &&
5999  tar -tf archive
6000 ) ) >"$at_stdout" 2>"$at_stderr"
6001     at_status=$?
6002 fi
6003
6004 at_failed=false
6005 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6006 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
6007 ./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
6008 ./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
6009 ./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
6010 ./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
6011 ./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
6012 ./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
6013 ./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
6014 " | $at_diff - "$at_stdout" || at_failed=:
6015 case $at_status in
6016    77) echo 77 > "$at_status_file"; exit 77;;
6017    0) ;;
6018    *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0"
6019       at_failed=:;;
6020 esac
6021 if $at_failed; then
6022
6023
6024   echo 1 > "$at_status_file"
6025   exit 1
6026 fi
6027
6028 $at_traceon
6029 $at_traceoff
6030 echo "$at_srcdir/delete03.at:26:
6031 mkdir posix
6032 (cd posix
6033 TEST_TAR_FORMAT=posix
6034 export TEST_TAR_FORMAT
6035 TAR_OPTIONS=\"-H posix\"
6036 export TAR_OPTIONS
6037 rm -rf *
6038
6039
6040 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
6041 rm -f \$prefix*
6042 for i in 1 2 3 4 5 6 7 8 9
6043 do touch \$prefix\$i
6044 done
6045 tar -cf archive ./\$prefix* &&
6046  tar --delete -f archive ./\${prefix}5 &&
6047  tar -tf archive
6048 )"
6049 echo delete03.at:26 >"$at_check_line_file"
6050
6051 at_trace_this=
6052 if test -n "$at_traceon"; then
6053     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
6054 fi
6055
6056 if test -n "$at_trace_this"; then
6057     ( $at_traceon;
6058 mkdir posix
6059 (cd posix
6060 TEST_TAR_FORMAT=posix
6061 export TEST_TAR_FORMAT
6062 TAR_OPTIONS="-H posix"
6063 export TAR_OPTIONS
6064 rm -rf *
6065
6066
6067 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
6068 rm -f $prefix*
6069 for i in 1 2 3 4 5 6 7 8 9
6070 do touch $prefix$i
6071 done
6072 tar -cf archive ./$prefix* &&
6073  tar --delete -f archive ./${prefix}5 &&
6074  tar -tf archive
6075 ) ) >"$at_stdout" 2>"$at_stder1"
6076     at_status=$?
6077     grep '^ *+' "$at_stder1" >&2
6078     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6079 else
6080     ( :;
6081 mkdir posix
6082 (cd posix
6083 TEST_TAR_FORMAT=posix
6084 export TEST_TAR_FORMAT
6085 TAR_OPTIONS="-H posix"
6086 export TAR_OPTIONS
6087 rm -rf *
6088
6089
6090 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
6091 rm -f $prefix*
6092 for i in 1 2 3 4 5 6 7 8 9
6093 do touch $prefix$i
6094 done
6095 tar -cf archive ./$prefix* &&
6096  tar --delete -f archive ./${prefix}5 &&
6097  tar -tf archive
6098 ) ) >"$at_stdout" 2>"$at_stderr"
6099     at_status=$?
6100 fi
6101
6102 at_failed=false
6103 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6104 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
6105 ./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
6106 ./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
6107 ./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
6108 ./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
6109 ./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
6110 ./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
6111 ./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
6112 " | $at_diff - "$at_stdout" || at_failed=:
6113 case $at_status in
6114    77) echo 77 > "$at_status_file"; exit 77;;
6115    0) ;;
6116    *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0"
6117       at_failed=:;;
6118 esac
6119 if $at_failed; then
6120
6121
6122   echo 1 > "$at_status_file"
6123   exit 1
6124 fi
6125
6126 $at_traceon
6127
6128
6129
6130       $at_traceoff
6131       $at_times_p && times >"$at_times_file"
6132     ) 5>&1 2>&1 | eval $at_tee_pipe
6133     at_status=`cat "$at_status_file"`
6134     ;;
6135
6136   16 ) # 16. delete04.at:23: deleting a large last member
6137     at_setup_line='delete04.at:23'
6138     at_desc="deleting a large last member"
6139     $at_quiet $ECHO_N " 16: deleting a large last member                   $ECHO_C"
6140     at_xfail=no
6141       test -f $XFAILFILE && at_xfail=yes
6142     echo "#                             -*- compilation -*-" >> "$at_group_log"
6143     (
6144       echo "16. delete04.at:23: testing ..."
6145       $at_traceon
6146
6147
6148
6149
6150
6151   $at_traceoff
6152 echo "$at_srcdir/delete04.at:26:
6153 mkdir v7
6154 (cd v7
6155 TEST_TAR_FORMAT=v7
6156 export TEST_TAR_FORMAT
6157 TAR_OPTIONS=\"-H v7\"
6158 export TAR_OPTIONS
6159 rm -rf *
6160
6161 genfile -l      3 -f file1
6162 genfile -l      5 -f file2
6163 genfile -l      3 -f file3
6164 genfile -l      6 -f file4
6165 genfile -l     24 -f file5
6166 genfile -l     13 -f file6
6167 genfile -l   1385 -f file7
6168 genfile -l     30 -f file8
6169 genfile -l     10 -f file9
6170 genfile -l 256000 -f file10
6171 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6172 tar f archive --delete file10
6173 tar tf archive
6174 )"
6175 echo delete04.at:26 >"$at_check_line_file"
6176
6177 at_trace_this=
6178 if test -n "$at_traceon"; then
6179     echo 'Not enabling shell tracing (command contains an embedded newline)'
6180 fi
6181
6182 if test -n "$at_trace_this"; then
6183     ( $at_traceon;
6184 mkdir v7
6185 (cd v7
6186 TEST_TAR_FORMAT=v7
6187 export TEST_TAR_FORMAT
6188 TAR_OPTIONS="-H v7"
6189 export TAR_OPTIONS
6190 rm -rf *
6191
6192 genfile -l      3 -f file1
6193 genfile -l      5 -f file2
6194 genfile -l      3 -f file3
6195 genfile -l      6 -f file4
6196 genfile -l     24 -f file5
6197 genfile -l     13 -f file6
6198 genfile -l   1385 -f file7
6199 genfile -l     30 -f file8
6200 genfile -l     10 -f file9
6201 genfile -l 256000 -f file10
6202 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6203 tar f archive --delete file10
6204 tar tf archive
6205 ) ) >"$at_stdout" 2>"$at_stder1"
6206     at_status=$?
6207     grep '^ *+' "$at_stder1" >&2
6208     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6209 else
6210     ( :;
6211 mkdir v7
6212 (cd v7
6213 TEST_TAR_FORMAT=v7
6214 export TEST_TAR_FORMAT
6215 TAR_OPTIONS="-H v7"
6216 export TAR_OPTIONS
6217 rm -rf *
6218
6219 genfile -l      3 -f file1
6220 genfile -l      5 -f file2
6221 genfile -l      3 -f file3
6222 genfile -l      6 -f file4
6223 genfile -l     24 -f file5
6224 genfile -l     13 -f file6
6225 genfile -l   1385 -f file7
6226 genfile -l     30 -f file8
6227 genfile -l     10 -f file9
6228 genfile -l 256000 -f file10
6229 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6230 tar f archive --delete file10
6231 tar tf archive
6232 ) ) >"$at_stdout" 2>"$at_stderr"
6233     at_status=$?
6234 fi
6235
6236 at_failed=false
6237 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6238 echo >>"$at_stdout"; echo "file1
6239 file2
6240 file3
6241 file4
6242 file5
6243 file6
6244 file7
6245 file8
6246 file9
6247 " | $at_diff - "$at_stdout" || at_failed=:
6248 case $at_status in
6249    77) echo 77 > "$at_status_file"; exit 77;;
6250    0) ;;
6251    *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
6252       at_failed=:;;
6253 esac
6254 if $at_failed; then
6255
6256
6257   echo 1 > "$at_status_file"
6258   exit 1
6259 fi
6260
6261 $at_traceon
6262 $at_traceoff
6263 echo "$at_srcdir/delete04.at:26:
6264 mkdir oldgnu
6265 (cd oldgnu
6266 TEST_TAR_FORMAT=oldgnu
6267 export TEST_TAR_FORMAT
6268 TAR_OPTIONS=\"-H oldgnu\"
6269 export TAR_OPTIONS
6270 rm -rf *
6271
6272 genfile -l      3 -f file1
6273 genfile -l      5 -f file2
6274 genfile -l      3 -f file3
6275 genfile -l      6 -f file4
6276 genfile -l     24 -f file5
6277 genfile -l     13 -f file6
6278 genfile -l   1385 -f file7
6279 genfile -l     30 -f file8
6280 genfile -l     10 -f file9
6281 genfile -l 256000 -f file10
6282 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6283 tar f archive --delete file10
6284 tar tf archive
6285 )"
6286 echo delete04.at:26 >"$at_check_line_file"
6287
6288 at_trace_this=
6289 if test -n "$at_traceon"; then
6290     echo 'Not enabling shell tracing (command contains an embedded newline)'
6291 fi
6292
6293 if test -n "$at_trace_this"; then
6294     ( $at_traceon;
6295 mkdir oldgnu
6296 (cd oldgnu
6297 TEST_TAR_FORMAT=oldgnu
6298 export TEST_TAR_FORMAT
6299 TAR_OPTIONS="-H oldgnu"
6300 export TAR_OPTIONS
6301 rm -rf *
6302
6303 genfile -l      3 -f file1
6304 genfile -l      5 -f file2
6305 genfile -l      3 -f file3
6306 genfile -l      6 -f file4
6307 genfile -l     24 -f file5
6308 genfile -l     13 -f file6
6309 genfile -l   1385 -f file7
6310 genfile -l     30 -f file8
6311 genfile -l     10 -f file9
6312 genfile -l 256000 -f file10
6313 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6314 tar f archive --delete file10
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 oldgnu
6323 (cd oldgnu
6324 TEST_TAR_FORMAT=oldgnu
6325 export TEST_TAR_FORMAT
6326 TAR_OPTIONS="-H oldgnu"
6327 export TAR_OPTIONS
6328 rm -rf *
6329
6330 genfile -l      3 -f file1
6331 genfile -l      5 -f file2
6332 genfile -l      3 -f file3
6333 genfile -l      6 -f file4
6334 genfile -l     24 -f file5
6335 genfile -l     13 -f file6
6336 genfile -l   1385 -f file7
6337 genfile -l     30 -f file8
6338 genfile -l     10 -f file9
6339 genfile -l 256000 -f file10
6340 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6341 tar f archive --delete file10
6342 tar tf archive
6343 ) ) >"$at_stdout" 2>"$at_stderr"
6344     at_status=$?
6345 fi
6346
6347 at_failed=false
6348 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6349 echo >>"$at_stdout"; echo "file1
6350 file2
6351 file3
6352 file4
6353 file5
6354 file6
6355 file7
6356 file8
6357 file9
6358 " | $at_diff - "$at_stdout" || at_failed=:
6359 case $at_status in
6360    77) echo 77 > "$at_status_file"; exit 77;;
6361    0) ;;
6362    *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
6363       at_failed=:;;
6364 esac
6365 if $at_failed; then
6366
6367
6368   echo 1 > "$at_status_file"
6369   exit 1
6370 fi
6371
6372 $at_traceon
6373 $at_traceoff
6374 echo "$at_srcdir/delete04.at:26:
6375 mkdir ustar
6376 (cd ustar
6377 TEST_TAR_FORMAT=ustar
6378 export TEST_TAR_FORMAT
6379 TAR_OPTIONS=\"-H ustar\"
6380 export TAR_OPTIONS
6381 rm -rf *
6382
6383 genfile -l      3 -f file1
6384 genfile -l      5 -f file2
6385 genfile -l      3 -f file3
6386 genfile -l      6 -f file4
6387 genfile -l     24 -f file5
6388 genfile -l     13 -f file6
6389 genfile -l   1385 -f file7
6390 genfile -l     30 -f file8
6391 genfile -l     10 -f file9
6392 genfile -l 256000 -f file10
6393 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6394 tar f archive --delete file10
6395 tar tf archive
6396 )"
6397 echo delete04.at:26 >"$at_check_line_file"
6398
6399 at_trace_this=
6400 if test -n "$at_traceon"; then
6401     echo 'Not enabling shell tracing (command contains an embedded newline)'
6402 fi
6403
6404 if test -n "$at_trace_this"; then
6405     ( $at_traceon;
6406 mkdir ustar
6407 (cd ustar
6408 TEST_TAR_FORMAT=ustar
6409 export TEST_TAR_FORMAT
6410 TAR_OPTIONS="-H ustar"
6411 export TAR_OPTIONS
6412 rm -rf *
6413
6414 genfile -l      3 -f file1
6415 genfile -l      5 -f file2
6416 genfile -l      3 -f file3
6417 genfile -l      6 -f file4
6418 genfile -l     24 -f file5
6419 genfile -l     13 -f file6
6420 genfile -l   1385 -f file7
6421 genfile -l     30 -f file8
6422 genfile -l     10 -f file9
6423 genfile -l 256000 -f file10
6424 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6425 tar f archive --delete file10
6426 tar tf archive
6427 ) ) >"$at_stdout" 2>"$at_stder1"
6428     at_status=$?
6429     grep '^ *+' "$at_stder1" >&2
6430     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6431 else
6432     ( :;
6433 mkdir ustar
6434 (cd ustar
6435 TEST_TAR_FORMAT=ustar
6436 export TEST_TAR_FORMAT
6437 TAR_OPTIONS="-H ustar"
6438 export TAR_OPTIONS
6439 rm -rf *
6440
6441 genfile -l      3 -f file1
6442 genfile -l      5 -f file2
6443 genfile -l      3 -f file3
6444 genfile -l      6 -f file4
6445 genfile -l     24 -f file5
6446 genfile -l     13 -f file6
6447 genfile -l   1385 -f file7
6448 genfile -l     30 -f file8
6449 genfile -l     10 -f file9
6450 genfile -l 256000 -f file10
6451 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6452 tar f archive --delete file10
6453 tar tf archive
6454 ) ) >"$at_stdout" 2>"$at_stderr"
6455     at_status=$?
6456 fi
6457
6458 at_failed=false
6459 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6460 echo >>"$at_stdout"; echo "file1
6461 file2
6462 file3
6463 file4
6464 file5
6465 file6
6466 file7
6467 file8
6468 file9
6469 " | $at_diff - "$at_stdout" || at_failed=:
6470 case $at_status in
6471    77) echo 77 > "$at_status_file"; exit 77;;
6472    0) ;;
6473    *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
6474       at_failed=:;;
6475 esac
6476 if $at_failed; then
6477
6478
6479   echo 1 > "$at_status_file"
6480   exit 1
6481 fi
6482
6483 $at_traceon
6484 $at_traceoff
6485 echo "$at_srcdir/delete04.at:26:
6486 mkdir posix
6487 (cd posix
6488 TEST_TAR_FORMAT=posix
6489 export TEST_TAR_FORMAT
6490 TAR_OPTIONS=\"-H posix\"
6491 export TAR_OPTIONS
6492 rm -rf *
6493
6494 genfile -l      3 -f file1
6495 genfile -l      5 -f file2
6496 genfile -l      3 -f file3
6497 genfile -l      6 -f file4
6498 genfile -l     24 -f file5
6499 genfile -l     13 -f file6
6500 genfile -l   1385 -f file7
6501 genfile -l     30 -f file8
6502 genfile -l     10 -f file9
6503 genfile -l 256000 -f file10
6504 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6505 tar f archive --delete file10
6506 tar tf archive
6507 )"
6508 echo delete04.at:26 >"$at_check_line_file"
6509
6510 at_trace_this=
6511 if test -n "$at_traceon"; then
6512     echo 'Not enabling shell tracing (command contains an embedded newline)'
6513 fi
6514
6515 if test -n "$at_trace_this"; then
6516     ( $at_traceon;
6517 mkdir posix
6518 (cd posix
6519 TEST_TAR_FORMAT=posix
6520 export TEST_TAR_FORMAT
6521 TAR_OPTIONS="-H posix"
6522 export TAR_OPTIONS
6523 rm -rf *
6524
6525 genfile -l      3 -f file1
6526 genfile -l      5 -f file2
6527 genfile -l      3 -f file3
6528 genfile -l      6 -f file4
6529 genfile -l     24 -f file5
6530 genfile -l     13 -f file6
6531 genfile -l   1385 -f file7
6532 genfile -l     30 -f file8
6533 genfile -l     10 -f file9
6534 genfile -l 256000 -f file10
6535 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6536 tar f archive --delete file10
6537 tar tf archive
6538 ) ) >"$at_stdout" 2>"$at_stder1"
6539     at_status=$?
6540     grep '^ *+' "$at_stder1" >&2
6541     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6542 else
6543     ( :;
6544 mkdir posix
6545 (cd posix
6546 TEST_TAR_FORMAT=posix
6547 export TEST_TAR_FORMAT
6548 TAR_OPTIONS="-H posix"
6549 export TAR_OPTIONS
6550 rm -rf *
6551
6552 genfile -l      3 -f file1
6553 genfile -l      5 -f file2
6554 genfile -l      3 -f file3
6555 genfile -l      6 -f file4
6556 genfile -l     24 -f file5
6557 genfile -l     13 -f file6
6558 genfile -l   1385 -f file7
6559 genfile -l     30 -f file8
6560 genfile -l     10 -f file9
6561 genfile -l 256000 -f file10
6562 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6563 tar f archive --delete file10
6564 tar tf archive
6565 ) ) >"$at_stdout" 2>"$at_stderr"
6566     at_status=$?
6567 fi
6568
6569 at_failed=false
6570 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6571 echo >>"$at_stdout"; echo "file1
6572 file2
6573 file3
6574 file4
6575 file5
6576 file6
6577 file7
6578 file8
6579 file9
6580 " | $at_diff - "$at_stdout" || at_failed=:
6581 case $at_status in
6582    77) echo 77 > "$at_status_file"; exit 77;;
6583    0) ;;
6584    *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
6585       at_failed=:;;
6586 esac
6587 if $at_failed; then
6588
6589
6590   echo 1 > "$at_status_file"
6591   exit 1
6592 fi
6593
6594 $at_traceon
6595 $at_traceoff
6596 echo "$at_srcdir/delete04.at:26:
6597 mkdir gnu
6598 (cd gnu
6599 TEST_TAR_FORMAT=gnu
6600 export TEST_TAR_FORMAT
6601 TAR_OPTIONS=\"-H gnu\"
6602 export TAR_OPTIONS
6603 rm -rf *
6604
6605 genfile -l      3 -f file1
6606 genfile -l      5 -f file2
6607 genfile -l      3 -f file3
6608 genfile -l      6 -f file4
6609 genfile -l     24 -f file5
6610 genfile -l     13 -f file6
6611 genfile -l   1385 -f file7
6612 genfile -l     30 -f file8
6613 genfile -l     10 -f file9
6614 genfile -l 256000 -f file10
6615 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6616 tar f archive --delete file10
6617 tar tf archive
6618 )"
6619 echo delete04.at:26 >"$at_check_line_file"
6620
6621 at_trace_this=
6622 if test -n "$at_traceon"; then
6623     echo 'Not enabling shell tracing (command contains an embedded newline)'
6624 fi
6625
6626 if test -n "$at_trace_this"; then
6627     ( $at_traceon;
6628 mkdir gnu
6629 (cd gnu
6630 TEST_TAR_FORMAT=gnu
6631 export TEST_TAR_FORMAT
6632 TAR_OPTIONS="-H gnu"
6633 export TAR_OPTIONS
6634 rm -rf *
6635
6636 genfile -l      3 -f file1
6637 genfile -l      5 -f file2
6638 genfile -l      3 -f file3
6639 genfile -l      6 -f file4
6640 genfile -l     24 -f file5
6641 genfile -l     13 -f file6
6642 genfile -l   1385 -f file7
6643 genfile -l     30 -f file8
6644 genfile -l     10 -f file9
6645 genfile -l 256000 -f file10
6646 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6647 tar f archive --delete file10
6648 tar tf archive
6649 ) ) >"$at_stdout" 2>"$at_stder1"
6650     at_status=$?
6651     grep '^ *+' "$at_stder1" >&2
6652     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6653 else
6654     ( :;
6655 mkdir gnu
6656 (cd gnu
6657 TEST_TAR_FORMAT=gnu
6658 export TEST_TAR_FORMAT
6659 TAR_OPTIONS="-H gnu"
6660 export TAR_OPTIONS
6661 rm -rf *
6662
6663 genfile -l      3 -f file1
6664 genfile -l      5 -f file2
6665 genfile -l      3 -f file3
6666 genfile -l      6 -f file4
6667 genfile -l     24 -f file5
6668 genfile -l     13 -f file6
6669 genfile -l   1385 -f file7
6670 genfile -l     30 -f file8
6671 genfile -l     10 -f file9
6672 genfile -l 256000 -f file10
6673 tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
6674 tar f archive --delete file10
6675 tar tf archive
6676 ) ) >"$at_stdout" 2>"$at_stderr"
6677     at_status=$?
6678 fi
6679
6680 at_failed=false
6681 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
6682 echo >>"$at_stdout"; echo "file1
6683 file2
6684 file3
6685 file4
6686 file5
6687 file6
6688 file7
6689 file8
6690 file9
6691 " | $at_diff - "$at_stdout" || at_failed=:
6692 case $at_status in
6693    77) echo 77 > "$at_status_file"; exit 77;;
6694    0) ;;
6695    *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0"
6696       at_failed=:;;
6697 esac
6698 if $at_failed; then
6699
6700
6701   echo 1 > "$at_status_file"
6702   exit 1
6703 fi
6704
6705 $at_traceon
6706
6707
6708
6709       $at_traceoff
6710       $at_times_p && times >"$at_times_file"
6711     ) 5>&1 2>&1 | eval $at_tee_pipe
6712     at_status=`cat "$at_status_file"`
6713     ;;
6714
6715   17 ) # 17. delete05.at:27: deleting non-existing member
6716     at_setup_line='delete05.at:27'
6717     at_desc="deleting non-existing member"
6718     $at_quiet $ECHO_N " 17: deleting non-existing member                   $ECHO_C"
6719     at_xfail=no
6720       test -f $XFAILFILE && at_xfail=yes
6721     echo "#                             -*- compilation -*-" >> "$at_group_log"
6722     (
6723       echo "17. delete05.at:27: testing ..."
6724       $at_traceon
6725
6726
6727
6728
6729
6730   $at_traceoff
6731 echo "$at_srcdir/delete05.at:30:
6732 mkdir v7
6733 (cd v7
6734 TEST_TAR_FORMAT=v7
6735 export TEST_TAR_FORMAT
6736 TAR_OPTIONS=\"-H v7\"
6737 export TAR_OPTIONS
6738 rm -rf *
6739
6740 genfile -l 1024 -f en
6741 genfile -l 1024 -f to
6742
6743 tar cf archive en to
6744 # Make sure we don't use bogus blocking factor.
6745 # GNU tar up to and including 1.14.91 produced an empty archive this way:
6746 tar --file archive --blocking-factor=20 --delete tre
6747 tar tf archive
6748 )"
6749 echo delete05.at:30 >"$at_check_line_file"
6750
6751 at_trace_this=
6752 if test -n "$at_traceon"; then
6753     echo 'Not enabling shell tracing (command contains an embedded newline)'
6754 fi
6755
6756 if test -n "$at_trace_this"; then
6757     ( $at_traceon;
6758 mkdir v7
6759 (cd v7
6760 TEST_TAR_FORMAT=v7
6761 export TEST_TAR_FORMAT
6762 TAR_OPTIONS="-H v7"
6763 export TAR_OPTIONS
6764 rm -rf *
6765
6766 genfile -l 1024 -f en
6767 genfile -l 1024 -f to
6768
6769 tar cf archive en to
6770 # Make sure we don't use bogus blocking factor.
6771 # GNU tar up to and including 1.14.91 produced an empty archive this way:
6772 tar --file archive --blocking-factor=20 --delete tre
6773 tar tf archive
6774 ) ) >"$at_stdout" 2>"$at_stder1"
6775     at_status=$?
6776     grep '^ *+' "$at_stder1" >&2
6777     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6778 else
6779     ( :;
6780 mkdir v7
6781 (cd v7
6782 TEST_TAR_FORMAT=v7
6783 export TEST_TAR_FORMAT
6784 TAR_OPTIONS="-H v7"
6785 export TAR_OPTIONS
6786 rm -rf *
6787
6788 genfile -l 1024 -f en
6789 genfile -l 1024 -f to
6790
6791 tar cf archive en to
6792 # Make sure we don't use bogus blocking factor.
6793 # GNU tar up to and including 1.14.91 produced an empty archive this way:
6794 tar --file archive --blocking-factor=20 --delete tre
6795 tar tf archive
6796 ) ) >"$at_stdout" 2>"$at_stderr"
6797     at_status=$?
6798 fi
6799
6800 at_failed=false
6801 echo >>"$at_stderr"; echo "tar: tre: Not found in archive
6802 tar: Error exit delayed from previous errors
6803 " | $at_diff - "$at_stderr" || at_failed=:
6804 echo >>"$at_stdout"; echo "en
6805 to
6806 " | $at_diff - "$at_stdout" || at_failed=:
6807 case $at_status in
6808    77) echo 77 > "$at_status_file"; exit 77;;
6809    0) ;;
6810    *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
6811       at_failed=:;;
6812 esac
6813 if $at_failed; then
6814
6815
6816   echo 1 > "$at_status_file"
6817   exit 1
6818 fi
6819
6820 $at_traceon
6821 $at_traceoff
6822 echo "$at_srcdir/delete05.at:30:
6823 mkdir oldgnu
6824 (cd oldgnu
6825 TEST_TAR_FORMAT=oldgnu
6826 export TEST_TAR_FORMAT
6827 TAR_OPTIONS=\"-H oldgnu\"
6828 export TAR_OPTIONS
6829 rm -rf *
6830
6831 genfile -l 1024 -f en
6832 genfile -l 1024 -f to
6833
6834 tar cf archive en to
6835 # Make sure we don't use bogus blocking factor.
6836 # GNU tar up to and including 1.14.91 produced an empty archive this way:
6837 tar --file archive --blocking-factor=20 --delete tre
6838 tar tf archive
6839 )"
6840 echo delete05.at:30 >"$at_check_line_file"
6841
6842 at_trace_this=
6843 if test -n "$at_traceon"; then
6844     echo 'Not enabling shell tracing (command contains an embedded newline)'
6845 fi
6846
6847 if test -n "$at_trace_this"; then
6848     ( $at_traceon;
6849 mkdir oldgnu
6850 (cd oldgnu
6851 TEST_TAR_FORMAT=oldgnu
6852 export TEST_TAR_FORMAT
6853 TAR_OPTIONS="-H oldgnu"
6854 export TAR_OPTIONS
6855 rm -rf *
6856
6857 genfile -l 1024 -f en
6858 genfile -l 1024 -f to
6859
6860 tar cf archive en to
6861 # Make sure we don't use bogus blocking factor.
6862 # GNU tar up to and including 1.14.91 produced an empty archive this way:
6863 tar --file archive --blocking-factor=20 --delete tre
6864 tar tf archive
6865 ) ) >"$at_stdout" 2>"$at_stder1"
6866     at_status=$?
6867     grep '^ *+' "$at_stder1" >&2
6868     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6869 else
6870     ( :;
6871 mkdir oldgnu
6872 (cd oldgnu
6873 TEST_TAR_FORMAT=oldgnu
6874 export TEST_TAR_FORMAT
6875 TAR_OPTIONS="-H oldgnu"
6876 export TAR_OPTIONS
6877 rm -rf *
6878
6879 genfile -l 1024 -f en
6880 genfile -l 1024 -f to
6881
6882 tar cf archive en to
6883 # Make sure we don't use bogus blocking factor.
6884 # GNU tar up to and including 1.14.91 produced an empty archive this way:
6885 tar --file archive --blocking-factor=20 --delete tre
6886 tar tf archive
6887 ) ) >"$at_stdout" 2>"$at_stderr"
6888     at_status=$?
6889 fi
6890
6891 at_failed=false
6892 echo >>"$at_stderr"; echo "tar: tre: Not found in archive
6893 tar: Error exit delayed from previous errors
6894 " | $at_diff - "$at_stderr" || at_failed=:
6895 echo >>"$at_stdout"; echo "en
6896 to
6897 " | $at_diff - "$at_stdout" || at_failed=:
6898 case $at_status in
6899    77) echo 77 > "$at_status_file"; exit 77;;
6900    0) ;;
6901    *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
6902       at_failed=:;;
6903 esac
6904 if $at_failed; then
6905
6906
6907   echo 1 > "$at_status_file"
6908   exit 1
6909 fi
6910
6911 $at_traceon
6912 $at_traceoff
6913 echo "$at_srcdir/delete05.at:30:
6914 mkdir ustar
6915 (cd ustar
6916 TEST_TAR_FORMAT=ustar
6917 export TEST_TAR_FORMAT
6918 TAR_OPTIONS=\"-H ustar\"
6919 export TAR_OPTIONS
6920 rm -rf *
6921
6922 genfile -l 1024 -f en
6923 genfile -l 1024 -f to
6924
6925 tar cf archive en to
6926 # Make sure we don't use bogus blocking factor.
6927 # GNU tar up to and including 1.14.91 produced an empty archive this way:
6928 tar --file archive --blocking-factor=20 --delete tre
6929 tar tf archive
6930 )"
6931 echo delete05.at:30 >"$at_check_line_file"
6932
6933 at_trace_this=
6934 if test -n "$at_traceon"; then
6935     echo 'Not enabling shell tracing (command contains an embedded newline)'
6936 fi
6937
6938 if test -n "$at_trace_this"; then
6939     ( $at_traceon;
6940 mkdir ustar
6941 (cd ustar
6942 TEST_TAR_FORMAT=ustar
6943 export TEST_TAR_FORMAT
6944 TAR_OPTIONS="-H ustar"
6945 export TAR_OPTIONS
6946 rm -rf *
6947
6948 genfile -l 1024 -f en
6949 genfile -l 1024 -f to
6950
6951 tar cf archive en to
6952 # Make sure we don't use bogus blocking factor.
6953 # GNU tar up to and including 1.14.91 produced an empty archive this way:
6954 tar --file archive --blocking-factor=20 --delete tre
6955 tar tf archive
6956 ) ) >"$at_stdout" 2>"$at_stder1"
6957     at_status=$?
6958     grep '^ *+' "$at_stder1" >&2
6959     grep -v '^ *+' "$at_stder1" >"$at_stderr"
6960 else
6961     ( :;
6962 mkdir ustar
6963 (cd ustar
6964 TEST_TAR_FORMAT=ustar
6965 export TEST_TAR_FORMAT
6966 TAR_OPTIONS="-H ustar"
6967 export TAR_OPTIONS
6968 rm -rf *
6969
6970 genfile -l 1024 -f en
6971 genfile -l 1024 -f to
6972
6973 tar cf archive en to
6974 # Make sure we don't use bogus blocking factor.
6975 # GNU tar up to and including 1.14.91 produced an empty archive this way:
6976 tar --file archive --blocking-factor=20 --delete tre
6977 tar tf archive
6978 ) ) >"$at_stdout" 2>"$at_stderr"
6979     at_status=$?
6980 fi
6981
6982 at_failed=false
6983 echo >>"$at_stderr"; echo "tar: tre: Not found in archive
6984 tar: Error exit delayed from previous errors
6985 " | $at_diff - "$at_stderr" || at_failed=:
6986 echo >>"$at_stdout"; echo "en
6987 to
6988 " | $at_diff - "$at_stdout" || at_failed=:
6989 case $at_status in
6990    77) echo 77 > "$at_status_file"; exit 77;;
6991    0) ;;
6992    *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
6993       at_failed=:;;
6994 esac
6995 if $at_failed; then
6996
6997
6998   echo 1 > "$at_status_file"
6999   exit 1
7000 fi
7001
7002 $at_traceon
7003 $at_traceoff
7004 echo "$at_srcdir/delete05.at:30:
7005 mkdir posix
7006 (cd posix
7007 TEST_TAR_FORMAT=posix
7008 export TEST_TAR_FORMAT
7009 TAR_OPTIONS=\"-H posix\"
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 )"
7022 echo delete05.at:30 >"$at_check_line_file"
7023
7024 at_trace_this=
7025 if test -n "$at_traceon"; then
7026     echo 'Not enabling shell tracing (command contains an embedded newline)'
7027 fi
7028
7029 if test -n "$at_trace_this"; then
7030     ( $at_traceon;
7031 mkdir posix
7032 (cd posix
7033 TEST_TAR_FORMAT=posix
7034 export TEST_TAR_FORMAT
7035 TAR_OPTIONS="-H posix"
7036 export TAR_OPTIONS
7037 rm -rf *
7038
7039 genfile -l 1024 -f en
7040 genfile -l 1024 -f to
7041
7042 tar cf archive en to
7043 # Make sure we don't use bogus blocking factor.
7044 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7045 tar --file archive --blocking-factor=20 --delete tre
7046 tar tf archive
7047 ) ) >"$at_stdout" 2>"$at_stder1"
7048     at_status=$?
7049     grep '^ *+' "$at_stder1" >&2
7050     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7051 else
7052     ( :;
7053 mkdir posix
7054 (cd posix
7055 TEST_TAR_FORMAT=posix
7056 export TEST_TAR_FORMAT
7057 TAR_OPTIONS="-H posix"
7058 export TAR_OPTIONS
7059 rm -rf *
7060
7061 genfile -l 1024 -f en
7062 genfile -l 1024 -f to
7063
7064 tar cf archive en to
7065 # Make sure we don't use bogus blocking factor.
7066 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7067 tar --file archive --blocking-factor=20 --delete tre
7068 tar tf archive
7069 ) ) >"$at_stdout" 2>"$at_stderr"
7070     at_status=$?
7071 fi
7072
7073 at_failed=false
7074 echo >>"$at_stderr"; echo "tar: tre: Not found in archive
7075 tar: Error exit delayed from previous errors
7076 " | $at_diff - "$at_stderr" || at_failed=:
7077 echo >>"$at_stdout"; echo "en
7078 to
7079 " | $at_diff - "$at_stdout" || at_failed=:
7080 case $at_status in
7081    77) echo 77 > "$at_status_file"; exit 77;;
7082    0) ;;
7083    *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
7084       at_failed=:;;
7085 esac
7086 if $at_failed; then
7087
7088
7089   echo 1 > "$at_status_file"
7090   exit 1
7091 fi
7092
7093 $at_traceon
7094 $at_traceoff
7095 echo "$at_srcdir/delete05.at:30:
7096 mkdir gnu
7097 (cd gnu
7098 TEST_TAR_FORMAT=gnu
7099 export TEST_TAR_FORMAT
7100 TAR_OPTIONS=\"-H gnu\"
7101 export TAR_OPTIONS
7102 rm -rf *
7103
7104 genfile -l 1024 -f en
7105 genfile -l 1024 -f to
7106
7107 tar cf archive en to
7108 # Make sure we don't use bogus blocking factor.
7109 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7110 tar --file archive --blocking-factor=20 --delete tre
7111 tar tf archive
7112 )"
7113 echo delete05.at:30 >"$at_check_line_file"
7114
7115 at_trace_this=
7116 if test -n "$at_traceon"; then
7117     echo 'Not enabling shell tracing (command contains an embedded newline)'
7118 fi
7119
7120 if test -n "$at_trace_this"; then
7121     ( $at_traceon;
7122 mkdir gnu
7123 (cd gnu
7124 TEST_TAR_FORMAT=gnu
7125 export TEST_TAR_FORMAT
7126 TAR_OPTIONS="-H gnu"
7127 export TAR_OPTIONS
7128 rm -rf *
7129
7130 genfile -l 1024 -f en
7131 genfile -l 1024 -f to
7132
7133 tar cf archive en to
7134 # Make sure we don't use bogus blocking factor.
7135 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7136 tar --file archive --blocking-factor=20 --delete tre
7137 tar tf archive
7138 ) ) >"$at_stdout" 2>"$at_stder1"
7139     at_status=$?
7140     grep '^ *+' "$at_stder1" >&2
7141     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7142 else
7143     ( :;
7144 mkdir gnu
7145 (cd gnu
7146 TEST_TAR_FORMAT=gnu
7147 export TEST_TAR_FORMAT
7148 TAR_OPTIONS="-H gnu"
7149 export TAR_OPTIONS
7150 rm -rf *
7151
7152 genfile -l 1024 -f en
7153 genfile -l 1024 -f to
7154
7155 tar cf archive en to
7156 # Make sure we don't use bogus blocking factor.
7157 # GNU tar up to and including 1.14.91 produced an empty archive this way:
7158 tar --file archive --blocking-factor=20 --delete tre
7159 tar tf archive
7160 ) ) >"$at_stdout" 2>"$at_stderr"
7161     at_status=$?
7162 fi
7163
7164 at_failed=false
7165 echo >>"$at_stderr"; echo "tar: tre: Not found in archive
7166 tar: Error exit delayed from previous errors
7167 " | $at_diff - "$at_stderr" || at_failed=:
7168 echo >>"$at_stdout"; echo "en
7169 to
7170 " | $at_diff - "$at_stdout" || at_failed=:
7171 case $at_status in
7172    77) echo 77 > "$at_status_file"; exit 77;;
7173    0) ;;
7174    *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0"
7175       at_failed=:;;
7176 esac
7177 if $at_failed; then
7178
7179
7180   echo 1 > "$at_status_file"
7181   exit 1
7182 fi
7183
7184 $at_traceon
7185
7186
7187
7188       $at_traceoff
7189       $at_times_p && times >"$at_times_file"
7190     ) 5>&1 2>&1 | eval $at_tee_pipe
7191     at_status=`cat "$at_status_file"`
7192     ;;
7193
7194   18 ) # 18. extrac01.at:23: extract over an existing directory
7195     at_setup_line='extrac01.at:23'
7196     at_desc="extract over an existing directory"
7197     $at_quiet $ECHO_N " 18: extract over an existing directory             $ECHO_C"
7198     at_xfail=no
7199       test -f $XFAILFILE && at_xfail=yes
7200     echo "#                             -*- compilation -*-" >> "$at_group_log"
7201     (
7202       echo "18. extrac01.at:23: testing ..."
7203       $at_traceon
7204
7205
7206
7207
7208
7209   $at_traceoff
7210 echo "$at_srcdir/extrac01.at:26:
7211 mkdir v7
7212 (cd v7
7213 TEST_TAR_FORMAT=v7
7214 export TEST_TAR_FORMAT
7215 TAR_OPTIONS=\"-H v7\"
7216 export TAR_OPTIONS
7217 rm -rf *
7218
7219 mkdir directory
7220 touch directory/file
7221 tar cf archive directory || exit 1
7222 tar xf archive || exit 1
7223 )"
7224 echo extrac01.at:26 >"$at_check_line_file"
7225
7226 at_trace_this=
7227 if test -n "$at_traceon"; then
7228     echo 'Not enabling shell tracing (command contains an embedded newline)'
7229 fi
7230
7231 if test -n "$at_trace_this"; then
7232     ( $at_traceon;
7233 mkdir v7
7234 (cd v7
7235 TEST_TAR_FORMAT=v7
7236 export TEST_TAR_FORMAT
7237 TAR_OPTIONS="-H v7"
7238 export TAR_OPTIONS
7239 rm -rf *
7240
7241 mkdir directory
7242 touch directory/file
7243 tar cf archive directory || exit 1
7244 tar xf archive || exit 1
7245 ) ) >"$at_stdout" 2>"$at_stder1"
7246     at_status=$?
7247     grep '^ *+' "$at_stder1" >&2
7248     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7249 else
7250     ( :;
7251 mkdir v7
7252 (cd v7
7253 TEST_TAR_FORMAT=v7
7254 export TEST_TAR_FORMAT
7255 TAR_OPTIONS="-H v7"
7256 export TAR_OPTIONS
7257 rm -rf *
7258
7259 mkdir directory
7260 touch directory/file
7261 tar cf archive directory || exit 1
7262 tar xf archive || exit 1
7263 ) ) >"$at_stdout" 2>"$at_stderr"
7264     at_status=$?
7265 fi
7266
7267 at_failed=false
7268 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7269 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7270 case $at_status in
7271    77) echo 77 > "$at_status_file"; exit 77;;
7272    0) ;;
7273    *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
7274       at_failed=:;;
7275 esac
7276 if $at_failed; then
7277
7278
7279   echo 1 > "$at_status_file"
7280   exit 1
7281 fi
7282
7283 $at_traceon
7284 $at_traceoff
7285 echo "$at_srcdir/extrac01.at:26:
7286 mkdir oldgnu
7287 (cd oldgnu
7288 TEST_TAR_FORMAT=oldgnu
7289 export TEST_TAR_FORMAT
7290 TAR_OPTIONS=\"-H oldgnu\"
7291 export TAR_OPTIONS
7292 rm -rf *
7293
7294 mkdir directory
7295 touch directory/file
7296 tar cf archive directory || exit 1
7297 tar xf archive || exit 1
7298 )"
7299 echo extrac01.at:26 >"$at_check_line_file"
7300
7301 at_trace_this=
7302 if test -n "$at_traceon"; then
7303     echo 'Not enabling shell tracing (command contains an embedded newline)'
7304 fi
7305
7306 if test -n "$at_trace_this"; then
7307     ( $at_traceon;
7308 mkdir oldgnu
7309 (cd oldgnu
7310 TEST_TAR_FORMAT=oldgnu
7311 export TEST_TAR_FORMAT
7312 TAR_OPTIONS="-H oldgnu"
7313 export TAR_OPTIONS
7314 rm -rf *
7315
7316 mkdir directory
7317 touch directory/file
7318 tar cf archive directory || exit 1
7319 tar xf archive || exit 1
7320 ) ) >"$at_stdout" 2>"$at_stder1"
7321     at_status=$?
7322     grep '^ *+' "$at_stder1" >&2
7323     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7324 else
7325     ( :;
7326 mkdir oldgnu
7327 (cd oldgnu
7328 TEST_TAR_FORMAT=oldgnu
7329 export TEST_TAR_FORMAT
7330 TAR_OPTIONS="-H oldgnu"
7331 export TAR_OPTIONS
7332 rm -rf *
7333
7334 mkdir directory
7335 touch directory/file
7336 tar cf archive directory || exit 1
7337 tar xf archive || exit 1
7338 ) ) >"$at_stdout" 2>"$at_stderr"
7339     at_status=$?
7340 fi
7341
7342 at_failed=false
7343 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7344 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7345 case $at_status in
7346    77) echo 77 > "$at_status_file"; exit 77;;
7347    0) ;;
7348    *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
7349       at_failed=:;;
7350 esac
7351 if $at_failed; then
7352
7353
7354   echo 1 > "$at_status_file"
7355   exit 1
7356 fi
7357
7358 $at_traceon
7359 $at_traceoff
7360 echo "$at_srcdir/extrac01.at:26:
7361 mkdir ustar
7362 (cd ustar
7363 TEST_TAR_FORMAT=ustar
7364 export TEST_TAR_FORMAT
7365 TAR_OPTIONS=\"-H ustar\"
7366 export TAR_OPTIONS
7367 rm -rf *
7368
7369 mkdir directory
7370 touch directory/file
7371 tar cf archive directory || exit 1
7372 tar xf archive || exit 1
7373 )"
7374 echo extrac01.at:26 >"$at_check_line_file"
7375
7376 at_trace_this=
7377 if test -n "$at_traceon"; then
7378     echo 'Not enabling shell tracing (command contains an embedded newline)'
7379 fi
7380
7381 if test -n "$at_trace_this"; then
7382     ( $at_traceon;
7383 mkdir ustar
7384 (cd ustar
7385 TEST_TAR_FORMAT=ustar
7386 export TEST_TAR_FORMAT
7387 TAR_OPTIONS="-H ustar"
7388 export TAR_OPTIONS
7389 rm -rf *
7390
7391 mkdir directory
7392 touch directory/file
7393 tar cf archive directory || exit 1
7394 tar xf archive || exit 1
7395 ) ) >"$at_stdout" 2>"$at_stder1"
7396     at_status=$?
7397     grep '^ *+' "$at_stder1" >&2
7398     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7399 else
7400     ( :;
7401 mkdir ustar
7402 (cd ustar
7403 TEST_TAR_FORMAT=ustar
7404 export TEST_TAR_FORMAT
7405 TAR_OPTIONS="-H ustar"
7406 export TAR_OPTIONS
7407 rm -rf *
7408
7409 mkdir directory
7410 touch directory/file
7411 tar cf archive directory || exit 1
7412 tar xf archive || exit 1
7413 ) ) >"$at_stdout" 2>"$at_stderr"
7414     at_status=$?
7415 fi
7416
7417 at_failed=false
7418 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7419 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7420 case $at_status in
7421    77) echo 77 > "$at_status_file"; exit 77;;
7422    0) ;;
7423    *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
7424       at_failed=:;;
7425 esac
7426 if $at_failed; then
7427
7428
7429   echo 1 > "$at_status_file"
7430   exit 1
7431 fi
7432
7433 $at_traceon
7434 $at_traceoff
7435 echo "$at_srcdir/extrac01.at:26:
7436 mkdir posix
7437 (cd posix
7438 TEST_TAR_FORMAT=posix
7439 export TEST_TAR_FORMAT
7440 TAR_OPTIONS=\"-H posix\"
7441 export TAR_OPTIONS
7442 rm -rf *
7443
7444 mkdir directory
7445 touch directory/file
7446 tar cf archive directory || exit 1
7447 tar xf archive || exit 1
7448 )"
7449 echo extrac01.at:26 >"$at_check_line_file"
7450
7451 at_trace_this=
7452 if test -n "$at_traceon"; then
7453     echo 'Not enabling shell tracing (command contains an embedded newline)'
7454 fi
7455
7456 if test -n "$at_trace_this"; then
7457     ( $at_traceon;
7458 mkdir posix
7459 (cd posix
7460 TEST_TAR_FORMAT=posix
7461 export TEST_TAR_FORMAT
7462 TAR_OPTIONS="-H posix"
7463 export TAR_OPTIONS
7464 rm -rf *
7465
7466 mkdir directory
7467 touch directory/file
7468 tar cf archive directory || exit 1
7469 tar xf archive || exit 1
7470 ) ) >"$at_stdout" 2>"$at_stder1"
7471     at_status=$?
7472     grep '^ *+' "$at_stder1" >&2
7473     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7474 else
7475     ( :;
7476 mkdir posix
7477 (cd posix
7478 TEST_TAR_FORMAT=posix
7479 export TEST_TAR_FORMAT
7480 TAR_OPTIONS="-H posix"
7481 export TAR_OPTIONS
7482 rm -rf *
7483
7484 mkdir directory
7485 touch directory/file
7486 tar cf archive directory || exit 1
7487 tar xf archive || exit 1
7488 ) ) >"$at_stdout" 2>"$at_stderr"
7489     at_status=$?
7490 fi
7491
7492 at_failed=false
7493 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7494 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7495 case $at_status in
7496    77) echo 77 > "$at_status_file"; exit 77;;
7497    0) ;;
7498    *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
7499       at_failed=:;;
7500 esac
7501 if $at_failed; then
7502
7503
7504   echo 1 > "$at_status_file"
7505   exit 1
7506 fi
7507
7508 $at_traceon
7509 $at_traceoff
7510 echo "$at_srcdir/extrac01.at:26:
7511 mkdir gnu
7512 (cd gnu
7513 TEST_TAR_FORMAT=gnu
7514 export TEST_TAR_FORMAT
7515 TAR_OPTIONS=\"-H gnu\"
7516 export TAR_OPTIONS
7517 rm -rf *
7518
7519 mkdir directory
7520 touch directory/file
7521 tar cf archive directory || exit 1
7522 tar xf archive || exit 1
7523 )"
7524 echo extrac01.at:26 >"$at_check_line_file"
7525
7526 at_trace_this=
7527 if test -n "$at_traceon"; then
7528     echo 'Not enabling shell tracing (command contains an embedded newline)'
7529 fi
7530
7531 if test -n "$at_trace_this"; then
7532     ( $at_traceon;
7533 mkdir gnu
7534 (cd gnu
7535 TEST_TAR_FORMAT=gnu
7536 export TEST_TAR_FORMAT
7537 TAR_OPTIONS="-H gnu"
7538 export TAR_OPTIONS
7539 rm -rf *
7540
7541 mkdir directory
7542 touch directory/file
7543 tar cf archive directory || exit 1
7544 tar xf archive || exit 1
7545 ) ) >"$at_stdout" 2>"$at_stder1"
7546     at_status=$?
7547     grep '^ *+' "$at_stder1" >&2
7548     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7549 else
7550     ( :;
7551 mkdir gnu
7552 (cd gnu
7553 TEST_TAR_FORMAT=gnu
7554 export TEST_TAR_FORMAT
7555 TAR_OPTIONS="-H gnu"
7556 export TAR_OPTIONS
7557 rm -rf *
7558
7559 mkdir directory
7560 touch directory/file
7561 tar cf archive directory || exit 1
7562 tar xf archive || exit 1
7563 ) ) >"$at_stdout" 2>"$at_stderr"
7564     at_status=$?
7565 fi
7566
7567 at_failed=false
7568 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7569 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7570 case $at_status in
7571    77) echo 77 > "$at_status_file"; exit 77;;
7572    0) ;;
7573    *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0"
7574       at_failed=:;;
7575 esac
7576 if $at_failed; then
7577
7578
7579   echo 1 > "$at_status_file"
7580   exit 1
7581 fi
7582
7583 $at_traceon
7584
7585
7586
7587       $at_traceoff
7588       $at_times_p && times >"$at_times_file"
7589     ) 5>&1 2>&1 | eval $at_tee_pipe
7590     at_status=`cat "$at_status_file"`
7591     ;;
7592
7593   19 ) # 19. extrac02.at:23: extracting symlinks over an existing file
7594     at_setup_line='extrac02.at:23'
7595     at_desc="extracting symlinks over an existing file"
7596     $at_quiet $ECHO_N " 19: extracting symlinks over an existing file      $ECHO_C"
7597     at_xfail=no
7598       test -f $XFAILFILE && at_xfail=yes
7599     echo "#                             -*- compilation -*-" >> "$at_group_log"
7600     (
7601       echo "19. extrac02.at:23: testing ..."
7602       $at_traceon
7603
7604
7605
7606 # FIXME: Skip if symlinks are not supported on the system
7607
7608
7609
7610   $at_traceoff
7611 echo "$at_srcdir/extrac02.at:28:
7612 mkdir v7
7613 (cd v7
7614 TEST_TAR_FORMAT=v7
7615 export TEST_TAR_FORMAT
7616 TAR_OPTIONS=\"-H v7\"
7617 export TAR_OPTIONS
7618 rm -rf *
7619
7620 touch file
7621 ln -s file link 2> /dev/null || ln file link
7622 tar cf archive link
7623 rm link
7624 touch link
7625 tar xf archive
7626 )"
7627 echo extrac02.at:28 >"$at_check_line_file"
7628
7629 at_trace_this=
7630 if test -n "$at_traceon"; then
7631     echo 'Not enabling shell tracing (command contains an embedded newline)'
7632 fi
7633
7634 if test -n "$at_trace_this"; then
7635     ( $at_traceon;
7636 mkdir v7
7637 (cd v7
7638 TEST_TAR_FORMAT=v7
7639 export TEST_TAR_FORMAT
7640 TAR_OPTIONS="-H v7"
7641 export TAR_OPTIONS
7642 rm -rf *
7643
7644 touch file
7645 ln -s file link 2> /dev/null || ln file link
7646 tar cf archive link
7647 rm link
7648 touch link
7649 tar xf archive
7650 ) ) >"$at_stdout" 2>"$at_stder1"
7651     at_status=$?
7652     grep '^ *+' "$at_stder1" >&2
7653     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7654 else
7655     ( :;
7656 mkdir v7
7657 (cd v7
7658 TEST_TAR_FORMAT=v7
7659 export TEST_TAR_FORMAT
7660 TAR_OPTIONS="-H v7"
7661 export TAR_OPTIONS
7662 rm -rf *
7663
7664 touch file
7665 ln -s file link 2> /dev/null || ln file link
7666 tar cf archive link
7667 rm link
7668 touch link
7669 tar xf archive
7670 ) ) >"$at_stdout" 2>"$at_stderr"
7671     at_status=$?
7672 fi
7673
7674 at_failed=false
7675 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7676 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7677 case $at_status in
7678    77) echo 77 > "$at_status_file"; exit 77;;
7679    0) ;;
7680    *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
7681       at_failed=:;;
7682 esac
7683 if $at_failed; then
7684
7685
7686   echo 1 > "$at_status_file"
7687   exit 1
7688 fi
7689
7690 $at_traceon
7691 $at_traceoff
7692 echo "$at_srcdir/extrac02.at:28:
7693 mkdir oldgnu
7694 (cd oldgnu
7695 TEST_TAR_FORMAT=oldgnu
7696 export TEST_TAR_FORMAT
7697 TAR_OPTIONS=\"-H oldgnu\"
7698 export TAR_OPTIONS
7699 rm -rf *
7700
7701 touch file
7702 ln -s file link 2> /dev/null || ln file link
7703 tar cf archive link
7704 rm link
7705 touch link
7706 tar xf archive
7707 )"
7708 echo extrac02.at:28 >"$at_check_line_file"
7709
7710 at_trace_this=
7711 if test -n "$at_traceon"; then
7712     echo 'Not enabling shell tracing (command contains an embedded newline)'
7713 fi
7714
7715 if test -n "$at_trace_this"; then
7716     ( $at_traceon;
7717 mkdir oldgnu
7718 (cd oldgnu
7719 TEST_TAR_FORMAT=oldgnu
7720 export TEST_TAR_FORMAT
7721 TAR_OPTIONS="-H oldgnu"
7722 export TAR_OPTIONS
7723 rm -rf *
7724
7725 touch file
7726 ln -s file link 2> /dev/null || ln file link
7727 tar cf archive link
7728 rm link
7729 touch link
7730 tar xf archive
7731 ) ) >"$at_stdout" 2>"$at_stder1"
7732     at_status=$?
7733     grep '^ *+' "$at_stder1" >&2
7734     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7735 else
7736     ( :;
7737 mkdir oldgnu
7738 (cd oldgnu
7739 TEST_TAR_FORMAT=oldgnu
7740 export TEST_TAR_FORMAT
7741 TAR_OPTIONS="-H oldgnu"
7742 export TAR_OPTIONS
7743 rm -rf *
7744
7745 touch file
7746 ln -s file link 2> /dev/null || ln file link
7747 tar cf archive link
7748 rm link
7749 touch link
7750 tar xf archive
7751 ) ) >"$at_stdout" 2>"$at_stderr"
7752     at_status=$?
7753 fi
7754
7755 at_failed=false
7756 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7757 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7758 case $at_status in
7759    77) echo 77 > "$at_status_file"; exit 77;;
7760    0) ;;
7761    *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
7762       at_failed=:;;
7763 esac
7764 if $at_failed; then
7765
7766
7767   echo 1 > "$at_status_file"
7768   exit 1
7769 fi
7770
7771 $at_traceon
7772 $at_traceoff
7773 echo "$at_srcdir/extrac02.at:28:
7774 mkdir ustar
7775 (cd ustar
7776 TEST_TAR_FORMAT=ustar
7777 export TEST_TAR_FORMAT
7778 TAR_OPTIONS=\"-H ustar\"
7779 export TAR_OPTIONS
7780 rm -rf *
7781
7782 touch file
7783 ln -s file link 2> /dev/null || ln file link
7784 tar cf archive link
7785 rm link
7786 touch link
7787 tar xf archive
7788 )"
7789 echo extrac02.at:28 >"$at_check_line_file"
7790
7791 at_trace_this=
7792 if test -n "$at_traceon"; then
7793     echo 'Not enabling shell tracing (command contains an embedded newline)'
7794 fi
7795
7796 if test -n "$at_trace_this"; then
7797     ( $at_traceon;
7798 mkdir ustar
7799 (cd ustar
7800 TEST_TAR_FORMAT=ustar
7801 export TEST_TAR_FORMAT
7802 TAR_OPTIONS="-H ustar"
7803 export TAR_OPTIONS
7804 rm -rf *
7805
7806 touch file
7807 ln -s file link 2> /dev/null || ln file link
7808 tar cf archive link
7809 rm link
7810 touch link
7811 tar xf archive
7812 ) ) >"$at_stdout" 2>"$at_stder1"
7813     at_status=$?
7814     grep '^ *+' "$at_stder1" >&2
7815     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7816 else
7817     ( :;
7818 mkdir ustar
7819 (cd ustar
7820 TEST_TAR_FORMAT=ustar
7821 export TEST_TAR_FORMAT
7822 TAR_OPTIONS="-H ustar"
7823 export TAR_OPTIONS
7824 rm -rf *
7825
7826 touch file
7827 ln -s file link 2> /dev/null || ln file link
7828 tar cf archive link
7829 rm link
7830 touch link
7831 tar xf archive
7832 ) ) >"$at_stdout" 2>"$at_stderr"
7833     at_status=$?
7834 fi
7835
7836 at_failed=false
7837 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7838 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7839 case $at_status in
7840    77) echo 77 > "$at_status_file"; exit 77;;
7841    0) ;;
7842    *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
7843       at_failed=:;;
7844 esac
7845 if $at_failed; then
7846
7847
7848   echo 1 > "$at_status_file"
7849   exit 1
7850 fi
7851
7852 $at_traceon
7853 $at_traceoff
7854 echo "$at_srcdir/extrac02.at:28:
7855 mkdir posix
7856 (cd posix
7857 TEST_TAR_FORMAT=posix
7858 export TEST_TAR_FORMAT
7859 TAR_OPTIONS=\"-H posix\"
7860 export TAR_OPTIONS
7861 rm -rf *
7862
7863 touch file
7864 ln -s file link 2> /dev/null || ln file link
7865 tar cf archive link
7866 rm link
7867 touch link
7868 tar xf archive
7869 )"
7870 echo extrac02.at:28 >"$at_check_line_file"
7871
7872 at_trace_this=
7873 if test -n "$at_traceon"; then
7874     echo 'Not enabling shell tracing (command contains an embedded newline)'
7875 fi
7876
7877 if test -n "$at_trace_this"; then
7878     ( $at_traceon;
7879 mkdir posix
7880 (cd posix
7881 TEST_TAR_FORMAT=posix
7882 export TEST_TAR_FORMAT
7883 TAR_OPTIONS="-H posix"
7884 export TAR_OPTIONS
7885 rm -rf *
7886
7887 touch file
7888 ln -s file link 2> /dev/null || ln file link
7889 tar cf archive link
7890 rm link
7891 touch link
7892 tar xf archive
7893 ) ) >"$at_stdout" 2>"$at_stder1"
7894     at_status=$?
7895     grep '^ *+' "$at_stder1" >&2
7896     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7897 else
7898     ( :;
7899 mkdir posix
7900 (cd posix
7901 TEST_TAR_FORMAT=posix
7902 export TEST_TAR_FORMAT
7903 TAR_OPTIONS="-H posix"
7904 export TAR_OPTIONS
7905 rm -rf *
7906
7907 touch file
7908 ln -s file link 2> /dev/null || ln file link
7909 tar cf archive link
7910 rm link
7911 touch link
7912 tar xf archive
7913 ) ) >"$at_stdout" 2>"$at_stderr"
7914     at_status=$?
7915 fi
7916
7917 at_failed=false
7918 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
7919 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
7920 case $at_status in
7921    77) echo 77 > "$at_status_file"; exit 77;;
7922    0) ;;
7923    *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
7924       at_failed=:;;
7925 esac
7926 if $at_failed; then
7927
7928
7929   echo 1 > "$at_status_file"
7930   exit 1
7931 fi
7932
7933 $at_traceon
7934 $at_traceoff
7935 echo "$at_srcdir/extrac02.at:28:
7936 mkdir gnu
7937 (cd gnu
7938 TEST_TAR_FORMAT=gnu
7939 export TEST_TAR_FORMAT
7940 TAR_OPTIONS=\"-H gnu\"
7941 export TAR_OPTIONS
7942 rm -rf *
7943
7944 touch file
7945 ln -s file link 2> /dev/null || ln file link
7946 tar cf archive link
7947 rm link
7948 touch link
7949 tar xf archive
7950 )"
7951 echo extrac02.at:28 >"$at_check_line_file"
7952
7953 at_trace_this=
7954 if test -n "$at_traceon"; then
7955     echo 'Not enabling shell tracing (command contains an embedded newline)'
7956 fi
7957
7958 if test -n "$at_trace_this"; then
7959     ( $at_traceon;
7960 mkdir gnu
7961 (cd gnu
7962 TEST_TAR_FORMAT=gnu
7963 export TEST_TAR_FORMAT
7964 TAR_OPTIONS="-H gnu"
7965 export TAR_OPTIONS
7966 rm -rf *
7967
7968 touch file
7969 ln -s file link 2> /dev/null || ln file link
7970 tar cf archive link
7971 rm link
7972 touch link
7973 tar xf archive
7974 ) ) >"$at_stdout" 2>"$at_stder1"
7975     at_status=$?
7976     grep '^ *+' "$at_stder1" >&2
7977     grep -v '^ *+' "$at_stder1" >"$at_stderr"
7978 else
7979     ( :;
7980 mkdir gnu
7981 (cd gnu
7982 TEST_TAR_FORMAT=gnu
7983 export TEST_TAR_FORMAT
7984 TAR_OPTIONS="-H gnu"
7985 export TAR_OPTIONS
7986 rm -rf *
7987
7988 touch file
7989 ln -s file link 2> /dev/null || ln file link
7990 tar cf archive link
7991 rm link
7992 touch link
7993 tar xf archive
7994 ) ) >"$at_stdout" 2>"$at_stderr"
7995     at_status=$?
7996 fi
7997
7998 at_failed=false
7999 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8000 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
8001 case $at_status in
8002    77) echo 77 > "$at_status_file"; exit 77;;
8003    0) ;;
8004    *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0"
8005       at_failed=:;;
8006 esac
8007 if $at_failed; then
8008
8009
8010   echo 1 > "$at_status_file"
8011   exit 1
8012 fi
8013
8014 $at_traceon
8015
8016
8017
8018       $at_traceoff
8019       $at_times_p && times >"$at_times_file"
8020     ) 5>&1 2>&1 | eval $at_tee_pipe
8021     at_status=`cat "$at_status_file"`
8022     ;;
8023
8024   20 ) # 20. extrac03.at:23: extraction loops
8025     at_setup_line='extrac03.at:23'
8026     at_desc="extraction loops"
8027     $at_quiet $ECHO_N " 20: extraction loops                               $ECHO_C"
8028     at_xfail=no
8029       test -f $XFAILFILE && at_xfail=yes
8030     echo "#                             -*- compilation -*-" >> "$at_group_log"
8031     (
8032       echo "20. extrac03.at:23: testing ..."
8033       $at_traceon
8034
8035
8036
8037
8038
8039   $at_traceoff
8040 echo "$at_srcdir/extrac03.at:26:
8041 mkdir v7
8042 (cd v7
8043 TEST_TAR_FORMAT=v7
8044 export TEST_TAR_FORMAT
8045 TAR_OPTIONS=\"-H v7\"
8046 export TAR_OPTIONS
8047 rm -rf *
8048
8049 mkdir directory
8050 tar -cPvf archive directory/../directory
8051 echo separator
8052 tar -xPvf archive)"
8053 echo extrac03.at:26 >"$at_check_line_file"
8054
8055 at_trace_this=
8056 if test -n "$at_traceon"; then
8057     echo 'Not enabling shell tracing (command contains an embedded newline)'
8058 fi
8059
8060 if test -n "$at_trace_this"; then
8061     ( $at_traceon;
8062 mkdir v7
8063 (cd v7
8064 TEST_TAR_FORMAT=v7
8065 export TEST_TAR_FORMAT
8066 TAR_OPTIONS="-H v7"
8067 export TAR_OPTIONS
8068 rm -rf *
8069
8070 mkdir directory
8071 tar -cPvf archive directory/../directory
8072 echo separator
8073 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1"
8074     at_status=$?
8075     grep '^ *+' "$at_stder1" >&2
8076     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8077 else
8078     ( :;
8079 mkdir v7
8080 (cd v7
8081 TEST_TAR_FORMAT=v7
8082 export TEST_TAR_FORMAT
8083 TAR_OPTIONS="-H v7"
8084 export TAR_OPTIONS
8085 rm -rf *
8086
8087 mkdir directory
8088 tar -cPvf archive directory/../directory
8089 echo separator
8090 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr"
8091     at_status=$?
8092 fi
8093
8094 at_failed=false
8095 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8096 echo >>"$at_stdout"; echo "directory/../directory/
8097 separator
8098 directory/../directory/
8099 " | $at_diff - "$at_stdout" || at_failed=:
8100 case $at_status in
8101    77) echo 77 > "$at_status_file"; exit 77;;
8102    0) ;;
8103    *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
8104       at_failed=:;;
8105 esac
8106 if $at_failed; then
8107
8108
8109   echo 1 > "$at_status_file"
8110   exit 1
8111 fi
8112
8113 $at_traceon
8114 $at_traceoff
8115 echo "$at_srcdir/extrac03.at:26:
8116 mkdir oldgnu
8117 (cd oldgnu
8118 TEST_TAR_FORMAT=oldgnu
8119 export TEST_TAR_FORMAT
8120 TAR_OPTIONS=\"-H oldgnu\"
8121 export TAR_OPTIONS
8122 rm -rf *
8123
8124 mkdir directory
8125 tar -cPvf archive directory/../directory
8126 echo separator
8127 tar -xPvf archive)"
8128 echo extrac03.at:26 >"$at_check_line_file"
8129
8130 at_trace_this=
8131 if test -n "$at_traceon"; then
8132     echo 'Not enabling shell tracing (command contains an embedded newline)'
8133 fi
8134
8135 if test -n "$at_trace_this"; then
8136     ( $at_traceon;
8137 mkdir oldgnu
8138 (cd oldgnu
8139 TEST_TAR_FORMAT=oldgnu
8140 export TEST_TAR_FORMAT
8141 TAR_OPTIONS="-H oldgnu"
8142 export TAR_OPTIONS
8143 rm -rf *
8144
8145 mkdir directory
8146 tar -cPvf archive directory/../directory
8147 echo separator
8148 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1"
8149     at_status=$?
8150     grep '^ *+' "$at_stder1" >&2
8151     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8152 else
8153     ( :;
8154 mkdir oldgnu
8155 (cd oldgnu
8156 TEST_TAR_FORMAT=oldgnu
8157 export TEST_TAR_FORMAT
8158 TAR_OPTIONS="-H oldgnu"
8159 export TAR_OPTIONS
8160 rm -rf *
8161
8162 mkdir directory
8163 tar -cPvf archive directory/../directory
8164 echo separator
8165 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr"
8166     at_status=$?
8167 fi
8168
8169 at_failed=false
8170 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8171 echo >>"$at_stdout"; echo "directory/../directory/
8172 separator
8173 directory/../directory/
8174 " | $at_diff - "$at_stdout" || at_failed=:
8175 case $at_status in
8176    77) echo 77 > "$at_status_file"; exit 77;;
8177    0) ;;
8178    *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
8179       at_failed=:;;
8180 esac
8181 if $at_failed; then
8182
8183
8184   echo 1 > "$at_status_file"
8185   exit 1
8186 fi
8187
8188 $at_traceon
8189 $at_traceoff
8190 echo "$at_srcdir/extrac03.at:26:
8191 mkdir ustar
8192 (cd ustar
8193 TEST_TAR_FORMAT=ustar
8194 export TEST_TAR_FORMAT
8195 TAR_OPTIONS=\"-H ustar\"
8196 export TAR_OPTIONS
8197 rm -rf *
8198
8199 mkdir directory
8200 tar -cPvf archive directory/../directory
8201 echo separator
8202 tar -xPvf archive)"
8203 echo extrac03.at:26 >"$at_check_line_file"
8204
8205 at_trace_this=
8206 if test -n "$at_traceon"; then
8207     echo 'Not enabling shell tracing (command contains an embedded newline)'
8208 fi
8209
8210 if test -n "$at_trace_this"; then
8211     ( $at_traceon;
8212 mkdir ustar
8213 (cd ustar
8214 TEST_TAR_FORMAT=ustar
8215 export TEST_TAR_FORMAT
8216 TAR_OPTIONS="-H ustar"
8217 export TAR_OPTIONS
8218 rm -rf *
8219
8220 mkdir directory
8221 tar -cPvf archive directory/../directory
8222 echo separator
8223 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1"
8224     at_status=$?
8225     grep '^ *+' "$at_stder1" >&2
8226     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8227 else
8228     ( :;
8229 mkdir ustar
8230 (cd ustar
8231 TEST_TAR_FORMAT=ustar
8232 export TEST_TAR_FORMAT
8233 TAR_OPTIONS="-H ustar"
8234 export TAR_OPTIONS
8235 rm -rf *
8236
8237 mkdir directory
8238 tar -cPvf archive directory/../directory
8239 echo separator
8240 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr"
8241     at_status=$?
8242 fi
8243
8244 at_failed=false
8245 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8246 echo >>"$at_stdout"; echo "directory/../directory/
8247 separator
8248 directory/../directory/
8249 " | $at_diff - "$at_stdout" || at_failed=:
8250 case $at_status in
8251    77) echo 77 > "$at_status_file"; exit 77;;
8252    0) ;;
8253    *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
8254       at_failed=:;;
8255 esac
8256 if $at_failed; then
8257
8258
8259   echo 1 > "$at_status_file"
8260   exit 1
8261 fi
8262
8263 $at_traceon
8264 $at_traceoff
8265 echo "$at_srcdir/extrac03.at:26:
8266 mkdir posix
8267 (cd posix
8268 TEST_TAR_FORMAT=posix
8269 export TEST_TAR_FORMAT
8270 TAR_OPTIONS=\"-H posix\"
8271 export TAR_OPTIONS
8272 rm -rf *
8273
8274 mkdir directory
8275 tar -cPvf archive directory/../directory
8276 echo separator
8277 tar -xPvf archive)"
8278 echo extrac03.at:26 >"$at_check_line_file"
8279
8280 at_trace_this=
8281 if test -n "$at_traceon"; then
8282     echo 'Not enabling shell tracing (command contains an embedded newline)'
8283 fi
8284
8285 if test -n "$at_trace_this"; then
8286     ( $at_traceon;
8287 mkdir posix
8288 (cd posix
8289 TEST_TAR_FORMAT=posix
8290 export TEST_TAR_FORMAT
8291 TAR_OPTIONS="-H posix"
8292 export TAR_OPTIONS
8293 rm -rf *
8294
8295 mkdir directory
8296 tar -cPvf archive directory/../directory
8297 echo separator
8298 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1"
8299     at_status=$?
8300     grep '^ *+' "$at_stder1" >&2
8301     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8302 else
8303     ( :;
8304 mkdir posix
8305 (cd posix
8306 TEST_TAR_FORMAT=posix
8307 export TEST_TAR_FORMAT
8308 TAR_OPTIONS="-H posix"
8309 export TAR_OPTIONS
8310 rm -rf *
8311
8312 mkdir directory
8313 tar -cPvf archive directory/../directory
8314 echo separator
8315 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr"
8316     at_status=$?
8317 fi
8318
8319 at_failed=false
8320 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8321 echo >>"$at_stdout"; echo "directory/../directory/
8322 separator
8323 directory/../directory/
8324 " | $at_diff - "$at_stdout" || at_failed=:
8325 case $at_status in
8326    77) echo 77 > "$at_status_file"; exit 77;;
8327    0) ;;
8328    *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
8329       at_failed=:;;
8330 esac
8331 if $at_failed; then
8332
8333
8334   echo 1 > "$at_status_file"
8335   exit 1
8336 fi
8337
8338 $at_traceon
8339 $at_traceoff
8340 echo "$at_srcdir/extrac03.at:26:
8341 mkdir gnu
8342 (cd gnu
8343 TEST_TAR_FORMAT=gnu
8344 export TEST_TAR_FORMAT
8345 TAR_OPTIONS=\"-H gnu\"
8346 export TAR_OPTIONS
8347 rm -rf *
8348
8349 mkdir directory
8350 tar -cPvf archive directory/../directory
8351 echo separator
8352 tar -xPvf archive)"
8353 echo extrac03.at:26 >"$at_check_line_file"
8354
8355 at_trace_this=
8356 if test -n "$at_traceon"; then
8357     echo 'Not enabling shell tracing (command contains an embedded newline)'
8358 fi
8359
8360 if test -n "$at_trace_this"; then
8361     ( $at_traceon;
8362 mkdir gnu
8363 (cd gnu
8364 TEST_TAR_FORMAT=gnu
8365 export TEST_TAR_FORMAT
8366 TAR_OPTIONS="-H gnu"
8367 export TAR_OPTIONS
8368 rm -rf *
8369
8370 mkdir directory
8371 tar -cPvf archive directory/../directory
8372 echo separator
8373 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1"
8374     at_status=$?
8375     grep '^ *+' "$at_stder1" >&2
8376     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8377 else
8378     ( :;
8379 mkdir gnu
8380 (cd gnu
8381 TEST_TAR_FORMAT=gnu
8382 export TEST_TAR_FORMAT
8383 TAR_OPTIONS="-H gnu"
8384 export TAR_OPTIONS
8385 rm -rf *
8386
8387 mkdir directory
8388 tar -cPvf archive directory/../directory
8389 echo separator
8390 tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr"
8391     at_status=$?
8392 fi
8393
8394 at_failed=false
8395 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8396 echo >>"$at_stdout"; echo "directory/../directory/
8397 separator
8398 directory/../directory/
8399 " | $at_diff - "$at_stdout" || at_failed=:
8400 case $at_status in
8401    77) echo 77 > "$at_status_file"; exit 77;;
8402    0) ;;
8403    *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0"
8404       at_failed=:;;
8405 esac
8406 if $at_failed; then
8407
8408
8409   echo 1 > "$at_status_file"
8410   exit 1
8411 fi
8412
8413 $at_traceon
8414
8415
8416
8417       $at_traceoff
8418       $at_times_p && times >"$at_times_file"
8419     ) 5>&1 2>&1 | eval $at_tee_pipe
8420     at_status=`cat "$at_status_file"`
8421     ;;
8422
8423   21 ) # 21. extrac04.at:23: extract + fnmatch
8424     at_setup_line='extrac04.at:23'
8425     at_desc="extract + fnmatch"
8426     $at_quiet $ECHO_N " 21: extract + fnmatch                              $ECHO_C"
8427     at_xfail=no
8428       test -f $XFAILFILE && at_xfail=yes
8429     echo "#                             -*- compilation -*-" >> "$at_group_log"
8430     (
8431       echo "21. extrac04.at:23: testing ..."
8432       $at_traceon
8433
8434
8435
8436
8437
8438   $at_traceoff
8439 echo "$at_srcdir/extrac04.at:26:
8440 mkdir v7
8441 (cd v7
8442 TEST_TAR_FORMAT=v7
8443 export TEST_TAR_FORMAT
8444 TAR_OPTIONS=\"-H v7\"
8445 export TAR_OPTIONS
8446 rm -rf *
8447
8448
8449 test -z "`sort < /dev/null 2>&1`" || exit 77
8450
8451 touch file1
8452 mkdir directory
8453 mkdir directory/subdirectory
8454 touch directory/file1
8455 touch directory/file2
8456 touch directory/subdirectory/file1
8457 touch directory/subdirectory/file2
8458 tar -cf archive ./file1 directory
8459 tar -tf archive \\
8460   --exclude='./*1' \\
8461   --exclude='d*/*1' \\
8462   --exclude='d*/s*/*2' | sort
8463 )"
8464 echo extrac04.at:26 >"$at_check_line_file"
8465
8466 at_trace_this=
8467 if test -n "$at_traceon"; then
8468     echo 'Not enabling shell tracing (command contains an embedded newline)'
8469 fi
8470
8471 if test -n "$at_trace_this"; then
8472     ( $at_traceon;
8473 mkdir v7
8474 (cd v7
8475 TEST_TAR_FORMAT=v7
8476 export TEST_TAR_FORMAT
8477 TAR_OPTIONS="-H v7"
8478 export TAR_OPTIONS
8479 rm -rf *
8480
8481
8482 test -z "`sort < /dev/null 2>&1`" || exit 77
8483
8484 touch file1
8485 mkdir directory
8486 mkdir directory/subdirectory
8487 touch directory/file1
8488 touch directory/file2
8489 touch directory/subdirectory/file1
8490 touch directory/subdirectory/file2
8491 tar -cf archive ./file1 directory
8492 tar -tf archive \
8493   --exclude='./*1' \
8494   --exclude='d*/*1' \
8495   --exclude='d*/s*/*2' | sort
8496 ) ) >"$at_stdout" 2>"$at_stder1"
8497     at_status=$?
8498     grep '^ *+' "$at_stder1" >&2
8499     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8500 else
8501     ( :;
8502 mkdir v7
8503 (cd v7
8504 TEST_TAR_FORMAT=v7
8505 export TEST_TAR_FORMAT
8506 TAR_OPTIONS="-H v7"
8507 export TAR_OPTIONS
8508 rm -rf *
8509
8510
8511 test -z "`sort < /dev/null 2>&1`" || exit 77
8512
8513 touch file1
8514 mkdir directory
8515 mkdir directory/subdirectory
8516 touch directory/file1
8517 touch directory/file2
8518 touch directory/subdirectory/file1
8519 touch directory/subdirectory/file2
8520 tar -cf archive ./file1 directory
8521 tar -tf archive \
8522   --exclude='./*1' \
8523   --exclude='d*/*1' \
8524   --exclude='d*/s*/*2' | sort
8525 ) ) >"$at_stdout" 2>"$at_stderr"
8526     at_status=$?
8527 fi
8528
8529 at_failed=false
8530 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8531 echo >>"$at_stdout"; echo "directory/
8532 directory/file2
8533 directory/subdirectory/
8534 " | $at_diff - "$at_stdout" || at_failed=:
8535 case $at_status in
8536    77) echo 77 > "$at_status_file"; exit 77;;
8537    0) ;;
8538    *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
8539       at_failed=:;;
8540 esac
8541 if $at_failed; then
8542
8543
8544   echo 1 > "$at_status_file"
8545   exit 1
8546 fi
8547
8548 $at_traceon
8549 $at_traceoff
8550 echo "$at_srcdir/extrac04.at:26:
8551 mkdir oldgnu
8552 (cd oldgnu
8553 TEST_TAR_FORMAT=oldgnu
8554 export TEST_TAR_FORMAT
8555 TAR_OPTIONS=\"-H oldgnu\"
8556 export TAR_OPTIONS
8557 rm -rf *
8558
8559
8560 test -z "`sort < /dev/null 2>&1`" || exit 77
8561
8562 touch file1
8563 mkdir directory
8564 mkdir directory/subdirectory
8565 touch directory/file1
8566 touch directory/file2
8567 touch directory/subdirectory/file1
8568 touch directory/subdirectory/file2
8569 tar -cf archive ./file1 directory
8570 tar -tf archive \\
8571   --exclude='./*1' \\
8572   --exclude='d*/*1' \\
8573   --exclude='d*/s*/*2' | sort
8574 )"
8575 echo extrac04.at:26 >"$at_check_line_file"
8576
8577 at_trace_this=
8578 if test -n "$at_traceon"; then
8579     echo 'Not enabling shell tracing (command contains an embedded newline)'
8580 fi
8581
8582 if test -n "$at_trace_this"; then
8583     ( $at_traceon;
8584 mkdir oldgnu
8585 (cd oldgnu
8586 TEST_TAR_FORMAT=oldgnu
8587 export TEST_TAR_FORMAT
8588 TAR_OPTIONS="-H oldgnu"
8589 export TAR_OPTIONS
8590 rm -rf *
8591
8592
8593 test -z "`sort < /dev/null 2>&1`" || exit 77
8594
8595 touch file1
8596 mkdir directory
8597 mkdir directory/subdirectory
8598 touch directory/file1
8599 touch directory/file2
8600 touch directory/subdirectory/file1
8601 touch directory/subdirectory/file2
8602 tar -cf archive ./file1 directory
8603 tar -tf archive \
8604   --exclude='./*1' \
8605   --exclude='d*/*1' \
8606   --exclude='d*/s*/*2' | sort
8607 ) ) >"$at_stdout" 2>"$at_stder1"
8608     at_status=$?
8609     grep '^ *+' "$at_stder1" >&2
8610     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8611 else
8612     ( :;
8613 mkdir oldgnu
8614 (cd oldgnu
8615 TEST_TAR_FORMAT=oldgnu
8616 export TEST_TAR_FORMAT
8617 TAR_OPTIONS="-H oldgnu"
8618 export TAR_OPTIONS
8619 rm -rf *
8620
8621
8622 test -z "`sort < /dev/null 2>&1`" || exit 77
8623
8624 touch file1
8625 mkdir directory
8626 mkdir directory/subdirectory
8627 touch directory/file1
8628 touch directory/file2
8629 touch directory/subdirectory/file1
8630 touch directory/subdirectory/file2
8631 tar -cf archive ./file1 directory
8632 tar -tf archive \
8633   --exclude='./*1' \
8634   --exclude='d*/*1' \
8635   --exclude='d*/s*/*2' | sort
8636 ) ) >"$at_stdout" 2>"$at_stderr"
8637     at_status=$?
8638 fi
8639
8640 at_failed=false
8641 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8642 echo >>"$at_stdout"; echo "directory/
8643 directory/file2
8644 directory/subdirectory/
8645 " | $at_diff - "$at_stdout" || at_failed=:
8646 case $at_status in
8647    77) echo 77 > "$at_status_file"; exit 77;;
8648    0) ;;
8649    *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
8650       at_failed=:;;
8651 esac
8652 if $at_failed; then
8653
8654
8655   echo 1 > "$at_status_file"
8656   exit 1
8657 fi
8658
8659 $at_traceon
8660 $at_traceoff
8661 echo "$at_srcdir/extrac04.at:26:
8662 mkdir ustar
8663 (cd ustar
8664 TEST_TAR_FORMAT=ustar
8665 export TEST_TAR_FORMAT
8666 TAR_OPTIONS=\"-H ustar\"
8667 export TAR_OPTIONS
8668 rm -rf *
8669
8670
8671 test -z "`sort < /dev/null 2>&1`" || exit 77
8672
8673 touch file1
8674 mkdir directory
8675 mkdir directory/subdirectory
8676 touch directory/file1
8677 touch directory/file2
8678 touch directory/subdirectory/file1
8679 touch directory/subdirectory/file2
8680 tar -cf archive ./file1 directory
8681 tar -tf archive \\
8682   --exclude='./*1' \\
8683   --exclude='d*/*1' \\
8684   --exclude='d*/s*/*2' | sort
8685 )"
8686 echo extrac04.at:26 >"$at_check_line_file"
8687
8688 at_trace_this=
8689 if test -n "$at_traceon"; then
8690     echo 'Not enabling shell tracing (command contains an embedded newline)'
8691 fi
8692
8693 if test -n "$at_trace_this"; then
8694     ( $at_traceon;
8695 mkdir ustar
8696 (cd ustar
8697 TEST_TAR_FORMAT=ustar
8698 export TEST_TAR_FORMAT
8699 TAR_OPTIONS="-H ustar"
8700 export TAR_OPTIONS
8701 rm -rf *
8702
8703
8704 test -z "`sort < /dev/null 2>&1`" || exit 77
8705
8706 touch file1
8707 mkdir directory
8708 mkdir directory/subdirectory
8709 touch directory/file1
8710 touch directory/file2
8711 touch directory/subdirectory/file1
8712 touch directory/subdirectory/file2
8713 tar -cf archive ./file1 directory
8714 tar -tf archive \
8715   --exclude='./*1' \
8716   --exclude='d*/*1' \
8717   --exclude='d*/s*/*2' | sort
8718 ) ) >"$at_stdout" 2>"$at_stder1"
8719     at_status=$?
8720     grep '^ *+' "$at_stder1" >&2
8721     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8722 else
8723     ( :;
8724 mkdir ustar
8725 (cd ustar
8726 TEST_TAR_FORMAT=ustar
8727 export TEST_TAR_FORMAT
8728 TAR_OPTIONS="-H ustar"
8729 export TAR_OPTIONS
8730 rm -rf *
8731
8732
8733 test -z "`sort < /dev/null 2>&1`" || exit 77
8734
8735 touch file1
8736 mkdir directory
8737 mkdir directory/subdirectory
8738 touch directory/file1
8739 touch directory/file2
8740 touch directory/subdirectory/file1
8741 touch directory/subdirectory/file2
8742 tar -cf archive ./file1 directory
8743 tar -tf archive \
8744   --exclude='./*1' \
8745   --exclude='d*/*1' \
8746   --exclude='d*/s*/*2' | sort
8747 ) ) >"$at_stdout" 2>"$at_stderr"
8748     at_status=$?
8749 fi
8750
8751 at_failed=false
8752 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8753 echo >>"$at_stdout"; echo "directory/
8754 directory/file2
8755 directory/subdirectory/
8756 " | $at_diff - "$at_stdout" || at_failed=:
8757 case $at_status in
8758    77) echo 77 > "$at_status_file"; exit 77;;
8759    0) ;;
8760    *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
8761       at_failed=:;;
8762 esac
8763 if $at_failed; then
8764
8765
8766   echo 1 > "$at_status_file"
8767   exit 1
8768 fi
8769
8770 $at_traceon
8771 $at_traceoff
8772 echo "$at_srcdir/extrac04.at:26:
8773 mkdir posix
8774 (cd posix
8775 TEST_TAR_FORMAT=posix
8776 export TEST_TAR_FORMAT
8777 TAR_OPTIONS=\"-H posix\"
8778 export TAR_OPTIONS
8779 rm -rf *
8780
8781
8782 test -z "`sort < /dev/null 2>&1`" || exit 77
8783
8784 touch file1
8785 mkdir directory
8786 mkdir directory/subdirectory
8787 touch directory/file1
8788 touch directory/file2
8789 touch directory/subdirectory/file1
8790 touch directory/subdirectory/file2
8791 tar -cf archive ./file1 directory
8792 tar -tf archive \\
8793   --exclude='./*1' \\
8794   --exclude='d*/*1' \\
8795   --exclude='d*/s*/*2' | sort
8796 )"
8797 echo extrac04.at:26 >"$at_check_line_file"
8798
8799 at_trace_this=
8800 if test -n "$at_traceon"; then
8801     echo 'Not enabling shell tracing (command contains an embedded newline)'
8802 fi
8803
8804 if test -n "$at_trace_this"; then
8805     ( $at_traceon;
8806 mkdir posix
8807 (cd posix
8808 TEST_TAR_FORMAT=posix
8809 export TEST_TAR_FORMAT
8810 TAR_OPTIONS="-H posix"
8811 export TAR_OPTIONS
8812 rm -rf *
8813
8814
8815 test -z "`sort < /dev/null 2>&1`" || exit 77
8816
8817 touch file1
8818 mkdir directory
8819 mkdir directory/subdirectory
8820 touch directory/file1
8821 touch directory/file2
8822 touch directory/subdirectory/file1
8823 touch directory/subdirectory/file2
8824 tar -cf archive ./file1 directory
8825 tar -tf archive \
8826   --exclude='./*1' \
8827   --exclude='d*/*1' \
8828   --exclude='d*/s*/*2' | sort
8829 ) ) >"$at_stdout" 2>"$at_stder1"
8830     at_status=$?
8831     grep '^ *+' "$at_stder1" >&2
8832     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8833 else
8834     ( :;
8835 mkdir posix
8836 (cd posix
8837 TEST_TAR_FORMAT=posix
8838 export TEST_TAR_FORMAT
8839 TAR_OPTIONS="-H posix"
8840 export TAR_OPTIONS
8841 rm -rf *
8842
8843
8844 test -z "`sort < /dev/null 2>&1`" || exit 77
8845
8846 touch file1
8847 mkdir directory
8848 mkdir directory/subdirectory
8849 touch directory/file1
8850 touch directory/file2
8851 touch directory/subdirectory/file1
8852 touch directory/subdirectory/file2
8853 tar -cf archive ./file1 directory
8854 tar -tf archive \
8855   --exclude='./*1' \
8856   --exclude='d*/*1' \
8857   --exclude='d*/s*/*2' | sort
8858 ) ) >"$at_stdout" 2>"$at_stderr"
8859     at_status=$?
8860 fi
8861
8862 at_failed=false
8863 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8864 echo >>"$at_stdout"; echo "directory/
8865 directory/file2
8866 directory/subdirectory/
8867 " | $at_diff - "$at_stdout" || at_failed=:
8868 case $at_status in
8869    77) echo 77 > "$at_status_file"; exit 77;;
8870    0) ;;
8871    *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
8872       at_failed=:;;
8873 esac
8874 if $at_failed; then
8875
8876
8877   echo 1 > "$at_status_file"
8878   exit 1
8879 fi
8880
8881 $at_traceon
8882 $at_traceoff
8883 echo "$at_srcdir/extrac04.at:26:
8884 mkdir gnu
8885 (cd gnu
8886 TEST_TAR_FORMAT=gnu
8887 export TEST_TAR_FORMAT
8888 TAR_OPTIONS=\"-H gnu\"
8889 export TAR_OPTIONS
8890 rm -rf *
8891
8892
8893 test -z "`sort < /dev/null 2>&1`" || exit 77
8894
8895 touch file1
8896 mkdir directory
8897 mkdir directory/subdirectory
8898 touch directory/file1
8899 touch directory/file2
8900 touch directory/subdirectory/file1
8901 touch directory/subdirectory/file2
8902 tar -cf archive ./file1 directory
8903 tar -tf archive \\
8904   --exclude='./*1' \\
8905   --exclude='d*/*1' \\
8906   --exclude='d*/s*/*2' | sort
8907 )"
8908 echo extrac04.at:26 >"$at_check_line_file"
8909
8910 at_trace_this=
8911 if test -n "$at_traceon"; then
8912     echo 'Not enabling shell tracing (command contains an embedded newline)'
8913 fi
8914
8915 if test -n "$at_trace_this"; then
8916     ( $at_traceon;
8917 mkdir gnu
8918 (cd gnu
8919 TEST_TAR_FORMAT=gnu
8920 export TEST_TAR_FORMAT
8921 TAR_OPTIONS="-H gnu"
8922 export TAR_OPTIONS
8923 rm -rf *
8924
8925
8926 test -z "`sort < /dev/null 2>&1`" || exit 77
8927
8928 touch file1
8929 mkdir directory
8930 mkdir directory/subdirectory
8931 touch directory/file1
8932 touch directory/file2
8933 touch directory/subdirectory/file1
8934 touch directory/subdirectory/file2
8935 tar -cf archive ./file1 directory
8936 tar -tf archive \
8937   --exclude='./*1' \
8938   --exclude='d*/*1' \
8939   --exclude='d*/s*/*2' | sort
8940 ) ) >"$at_stdout" 2>"$at_stder1"
8941     at_status=$?
8942     grep '^ *+' "$at_stder1" >&2
8943     grep -v '^ *+' "$at_stder1" >"$at_stderr"
8944 else
8945     ( :;
8946 mkdir gnu
8947 (cd gnu
8948 TEST_TAR_FORMAT=gnu
8949 export TEST_TAR_FORMAT
8950 TAR_OPTIONS="-H gnu"
8951 export TAR_OPTIONS
8952 rm -rf *
8953
8954
8955 test -z "`sort < /dev/null 2>&1`" || exit 77
8956
8957 touch file1
8958 mkdir directory
8959 mkdir directory/subdirectory
8960 touch directory/file1
8961 touch directory/file2
8962 touch directory/subdirectory/file1
8963 touch directory/subdirectory/file2
8964 tar -cf archive ./file1 directory
8965 tar -tf archive \
8966   --exclude='./*1' \
8967   --exclude='d*/*1' \
8968   --exclude='d*/s*/*2' | sort
8969 ) ) >"$at_stdout" 2>"$at_stderr"
8970     at_status=$?
8971 fi
8972
8973 at_failed=false
8974 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
8975 echo >>"$at_stdout"; echo "directory/
8976 directory/file2
8977 directory/subdirectory/
8978 " | $at_diff - "$at_stdout" || at_failed=:
8979 case $at_status in
8980    77) echo 77 > "$at_status_file"; exit 77;;
8981    0) ;;
8982    *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0"
8983       at_failed=:;;
8984 esac
8985 if $at_failed; then
8986
8987
8988   echo 1 > "$at_status_file"
8989   exit 1
8990 fi
8991
8992 $at_traceon
8993
8994
8995
8996       $at_traceoff
8997       $at_times_p && times >"$at_times_file"
8998     ) 5>&1 2>&1 | eval $at_tee_pipe
8999     at_status=`cat "$at_status_file"`
9000     ;;
9001
9002   22 ) # 22. extrac05.at:30: extracting selected members from pax
9003     at_setup_line='extrac05.at:30'
9004     at_desc="extracting selected members from pax"
9005     $at_quiet $ECHO_N " 22: extracting selected members from pax           $ECHO_C"
9006     at_xfail=no
9007       test -f $XFAILFILE && at_xfail=yes
9008     echo "#                             -*- compilation -*-" >> "$at_group_log"
9009     (
9010       echo "22. extrac05.at:30: testing ..."
9011       $at_traceon
9012
9013
9014
9015 cat >list <<'_ATEOF'
9016 jeden
9017 cztery
9018 _ATEOF
9019
9020
9021
9022
9023   $at_traceoff
9024 echo "$at_srcdir/extrac05.at:38:
9025 mkdir posix
9026 (cd posix
9027 TEST_TAR_FORMAT=posix
9028 export TEST_TAR_FORMAT
9029 TAR_OPTIONS=\"-H posix\"
9030 export TAR_OPTIONS
9031 rm -rf *
9032
9033 genfile --length 118 --file jeden
9034 genfile --length 223 --file dwa
9035 genfile --length 517 --file trzy
9036 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
9037 genfile --length 110 --file cztery
9038
9039 tar cf archive jeden dwa trzy cztery || exit 1
9040
9041 mkdir dir
9042 cd dir
9043
9044 tar xvfT ../archive ../../list || exit 1
9045
9046 cd ..
9047 )"
9048 echo extrac05.at:38 >"$at_check_line_file"
9049
9050 at_trace_this=
9051 if test -n "$at_traceon"; then
9052     echo 'Not enabling shell tracing (command contains an embedded newline)'
9053 fi
9054
9055 if test -n "$at_trace_this"; then
9056     ( $at_traceon;
9057 mkdir posix
9058 (cd posix
9059 TEST_TAR_FORMAT=posix
9060 export TEST_TAR_FORMAT
9061 TAR_OPTIONS="-H posix"
9062 export TAR_OPTIONS
9063 rm -rf *
9064
9065 genfile --length 118 --file jeden
9066 genfile --length 223 --file dwa
9067 genfile --length 517 --file trzy
9068 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
9069 genfile --length 110 --file cztery
9070
9071 tar cf archive jeden dwa trzy cztery || exit 1
9072
9073 mkdir dir
9074 cd dir
9075
9076 tar xvfT ../archive ../../list || exit 1
9077
9078 cd ..
9079 ) ) >"$at_stdout" 2>"$at_stder1"
9080     at_status=$?
9081     grep '^ *+' "$at_stder1" >&2
9082     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9083 else
9084     ( :;
9085 mkdir posix
9086 (cd posix
9087 TEST_TAR_FORMAT=posix
9088 export TEST_TAR_FORMAT
9089 TAR_OPTIONS="-H posix"
9090 export TAR_OPTIONS
9091 rm -rf *
9092
9093 genfile --length 118 --file jeden
9094 genfile --length 223 --file dwa
9095 genfile --length 517 --file trzy
9096 genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
9097 genfile --length 110 --file cztery
9098
9099 tar cf archive jeden dwa trzy cztery || exit 1
9100
9101 mkdir dir
9102 cd dir
9103
9104 tar xvfT ../archive ../../list || exit 1
9105
9106 cd ..
9107 ) ) >"$at_stdout" 2>"$at_stderr"
9108     at_status=$?
9109 fi
9110
9111 at_failed=false
9112 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9113 echo >>"$at_stdout"; echo "jeden
9114 cztery
9115 " | $at_diff - "$at_stdout" || at_failed=:
9116 case $at_status in
9117    77) echo 77 > "$at_status_file"; exit 77;;
9118    0) ;;
9119    *) echo "$at_srcdir/extrac05.at:38: exit code was $at_status, expected 0"
9120       at_failed=:;;
9121 esac
9122 if $at_failed; then
9123
9124
9125   echo 1 > "$at_status_file"
9126   exit 1
9127 fi
9128
9129 $at_traceon
9130
9131
9132
9133       $at_traceoff
9134       $at_times_p && times >"$at_times_file"
9135     ) 5>&1 2>&1 | eval $at_tee_pipe
9136     at_status=`cat "$at_status_file"`
9137     ;;
9138
9139   23 ) # 23. extrac06.at:33: mode of extracted directories
9140     at_setup_line='extrac06.at:33'
9141     at_desc="mode of extracted directories"
9142     $at_quiet $ECHO_N " 23: mode of extracted directories                  $ECHO_C"
9143     at_xfail=no
9144       test -f $XFAILFILE && at_xfail=yes
9145     echo "#                             -*- compilation -*-" >> "$at_group_log"
9146     (
9147       echo "23. extrac06.at:33: testing ..."
9148       $at_traceon
9149
9150
9151
9152
9153
9154   $at_traceoff
9155 echo "$at_srcdir/extrac06.at:36:
9156 mkdir v7
9157 (cd v7
9158 TEST_TAR_FORMAT=v7
9159 export TEST_TAR_FORMAT
9160 TAR_OPTIONS=\"-H v7\"
9161 export TAR_OPTIONS
9162 rm -rf *
9163
9164
9165 # Force umask
9166 umask 022
9167
9168 # Make sure user's umask is honored, even if we are superuser
9169 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
9170
9171 # Create a directory
9172 mkdir directory
9173 chmod 777 directory
9174 genfile --stat=mode:777 directory
9175
9176 # Archive it
9177 tar cf arc directory
9178
9179 # Change its permissions ...
9180 chmod 755 directory
9181 genfile --stat=mode:777 directory
9182
9183 # ... and attempt to restore it twice
9184 tar xf arc directory
9185 genfile --stat=mode:777 directory
9186
9187 tar xf arc directory
9188 genfile --stat=mode:777 directory
9189
9190 # After both restores, the directory mode should be 755
9191 )"
9192 echo extrac06.at:36 >"$at_check_line_file"
9193
9194 at_trace_this=
9195 if test -n "$at_traceon"; then
9196     echo 'Not enabling shell tracing (command contains an embedded newline)'
9197 fi
9198
9199 if test -n "$at_trace_this"; then
9200     ( $at_traceon;
9201 mkdir v7
9202 (cd v7
9203 TEST_TAR_FORMAT=v7
9204 export TEST_TAR_FORMAT
9205 TAR_OPTIONS="-H v7"
9206 export TAR_OPTIONS
9207 rm -rf *
9208
9209
9210 # Force umask
9211 umask 022
9212
9213 # Make sure user's umask is honored, even if we are superuser
9214 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9215
9216 # Create a directory
9217 mkdir directory
9218 chmod 777 directory
9219 genfile --stat=mode:777 directory
9220
9221 # Archive it
9222 tar cf arc directory
9223
9224 # Change its permissions ...
9225 chmod 755 directory
9226 genfile --stat=mode:777 directory
9227
9228 # ... and attempt to restore it twice
9229 tar xf arc directory
9230 genfile --stat=mode:777 directory
9231
9232 tar xf arc directory
9233 genfile --stat=mode:777 directory
9234
9235 # After both restores, the directory mode should be 755
9236 ) ) >"$at_stdout" 2>"$at_stder1"
9237     at_status=$?
9238     grep '^ *+' "$at_stder1" >&2
9239     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9240 else
9241     ( :;
9242 mkdir v7
9243 (cd v7
9244 TEST_TAR_FORMAT=v7
9245 export TEST_TAR_FORMAT
9246 TAR_OPTIONS="-H v7"
9247 export TAR_OPTIONS
9248 rm -rf *
9249
9250
9251 # Force umask
9252 umask 022
9253
9254 # Make sure user's umask is honored, even if we are superuser
9255 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9256
9257 # Create a directory
9258 mkdir directory
9259 chmod 777 directory
9260 genfile --stat=mode:777 directory
9261
9262 # Archive it
9263 tar cf arc directory
9264
9265 # Change its permissions ...
9266 chmod 755 directory
9267 genfile --stat=mode:777 directory
9268
9269 # ... and attempt to restore it twice
9270 tar xf arc directory
9271 genfile --stat=mode:777 directory
9272
9273 tar xf arc directory
9274 genfile --stat=mode:777 directory
9275
9276 # After both restores, the directory mode should be 755
9277 ) ) >"$at_stdout" 2>"$at_stderr"
9278     at_status=$?
9279 fi
9280
9281 at_failed=false
9282 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9283 echo >>"$at_stdout"; echo "777
9284 755
9285 755
9286 755
9287 " | $at_diff - "$at_stdout" || at_failed=:
9288 case $at_status in
9289    77) echo 77 > "$at_status_file"; exit 77;;
9290    0) ;;
9291    *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
9292       at_failed=:;;
9293 esac
9294 if $at_failed; then
9295
9296
9297   echo 1 > "$at_status_file"
9298   exit 1
9299 fi
9300
9301 $at_traceon
9302 $at_traceoff
9303 echo "$at_srcdir/extrac06.at:36:
9304 mkdir oldgnu
9305 (cd oldgnu
9306 TEST_TAR_FORMAT=oldgnu
9307 export TEST_TAR_FORMAT
9308 TAR_OPTIONS=\"-H oldgnu\"
9309 export TAR_OPTIONS
9310 rm -rf *
9311
9312
9313 # Force umask
9314 umask 022
9315
9316 # Make sure user's umask is honored, even if we are superuser
9317 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
9318
9319 # Create a directory
9320 mkdir directory
9321 chmod 777 directory
9322 genfile --stat=mode:777 directory
9323
9324 # Archive it
9325 tar cf arc directory
9326
9327 # Change its permissions ...
9328 chmod 755 directory
9329 genfile --stat=mode:777 directory
9330
9331 # ... and attempt to restore it twice
9332 tar xf arc directory
9333 genfile --stat=mode:777 directory
9334
9335 tar xf arc directory
9336 genfile --stat=mode:777 directory
9337
9338 # After both restores, the directory mode should be 755
9339 )"
9340 echo extrac06.at:36 >"$at_check_line_file"
9341
9342 at_trace_this=
9343 if test -n "$at_traceon"; then
9344     echo 'Not enabling shell tracing (command contains an embedded newline)'
9345 fi
9346
9347 if test -n "$at_trace_this"; then
9348     ( $at_traceon;
9349 mkdir oldgnu
9350 (cd oldgnu
9351 TEST_TAR_FORMAT=oldgnu
9352 export TEST_TAR_FORMAT
9353 TAR_OPTIONS="-H oldgnu"
9354 export TAR_OPTIONS
9355 rm -rf *
9356
9357
9358 # Force umask
9359 umask 022
9360
9361 # Make sure user's umask is honored, even if we are superuser
9362 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9363
9364 # Create a directory
9365 mkdir directory
9366 chmod 777 directory
9367 genfile --stat=mode:777 directory
9368
9369 # Archive it
9370 tar cf arc directory
9371
9372 # Change its permissions ...
9373 chmod 755 directory
9374 genfile --stat=mode:777 directory
9375
9376 # ... and attempt to restore it twice
9377 tar xf arc directory
9378 genfile --stat=mode:777 directory
9379
9380 tar xf arc directory
9381 genfile --stat=mode:777 directory
9382
9383 # After both restores, the directory mode should be 755
9384 ) ) >"$at_stdout" 2>"$at_stder1"
9385     at_status=$?
9386     grep '^ *+' "$at_stder1" >&2
9387     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9388 else
9389     ( :;
9390 mkdir oldgnu
9391 (cd oldgnu
9392 TEST_TAR_FORMAT=oldgnu
9393 export TEST_TAR_FORMAT
9394 TAR_OPTIONS="-H oldgnu"
9395 export TAR_OPTIONS
9396 rm -rf *
9397
9398
9399 # Force umask
9400 umask 022
9401
9402 # Make sure user's umask is honored, even if we are superuser
9403 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9404
9405 # Create a directory
9406 mkdir directory
9407 chmod 777 directory
9408 genfile --stat=mode:777 directory
9409
9410 # Archive it
9411 tar cf arc directory
9412
9413 # Change its permissions ...
9414 chmod 755 directory
9415 genfile --stat=mode:777 directory
9416
9417 # ... and attempt to restore it twice
9418 tar xf arc directory
9419 genfile --stat=mode:777 directory
9420
9421 tar xf arc directory
9422 genfile --stat=mode:777 directory
9423
9424 # After both restores, the directory mode should be 755
9425 ) ) >"$at_stdout" 2>"$at_stderr"
9426     at_status=$?
9427 fi
9428
9429 at_failed=false
9430 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9431 echo >>"$at_stdout"; echo "777
9432 755
9433 755
9434 755
9435 " | $at_diff - "$at_stdout" || at_failed=:
9436 case $at_status in
9437    77) echo 77 > "$at_status_file"; exit 77;;
9438    0) ;;
9439    *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
9440       at_failed=:;;
9441 esac
9442 if $at_failed; then
9443
9444
9445   echo 1 > "$at_status_file"
9446   exit 1
9447 fi
9448
9449 $at_traceon
9450 $at_traceoff
9451 echo "$at_srcdir/extrac06.at:36:
9452 mkdir ustar
9453 (cd ustar
9454 TEST_TAR_FORMAT=ustar
9455 export TEST_TAR_FORMAT
9456 TAR_OPTIONS=\"-H ustar\"
9457 export TAR_OPTIONS
9458 rm -rf *
9459
9460
9461 # Force umask
9462 umask 022
9463
9464 # Make sure user's umask is honored, even if we are superuser
9465 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
9466
9467 # Create a directory
9468 mkdir directory
9469 chmod 777 directory
9470 genfile --stat=mode:777 directory
9471
9472 # Archive it
9473 tar cf arc directory
9474
9475 # Change its permissions ...
9476 chmod 755 directory
9477 genfile --stat=mode:777 directory
9478
9479 # ... and attempt to restore it twice
9480 tar xf arc directory
9481 genfile --stat=mode:777 directory
9482
9483 tar xf arc directory
9484 genfile --stat=mode:777 directory
9485
9486 # After both restores, the directory mode should be 755
9487 )"
9488 echo extrac06.at:36 >"$at_check_line_file"
9489
9490 at_trace_this=
9491 if test -n "$at_traceon"; then
9492     echo 'Not enabling shell tracing (command contains an embedded newline)'
9493 fi
9494
9495 if test -n "$at_trace_this"; then
9496     ( $at_traceon;
9497 mkdir ustar
9498 (cd ustar
9499 TEST_TAR_FORMAT=ustar
9500 export TEST_TAR_FORMAT
9501 TAR_OPTIONS="-H ustar"
9502 export TAR_OPTIONS
9503 rm -rf *
9504
9505
9506 # Force umask
9507 umask 022
9508
9509 # Make sure user's umask is honored, even if we are superuser
9510 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9511
9512 # Create a directory
9513 mkdir directory
9514 chmod 777 directory
9515 genfile --stat=mode:777 directory
9516
9517 # Archive it
9518 tar cf arc directory
9519
9520 # Change its permissions ...
9521 chmod 755 directory
9522 genfile --stat=mode:777 directory
9523
9524 # ... and attempt to restore it twice
9525 tar xf arc directory
9526 genfile --stat=mode:777 directory
9527
9528 tar xf arc directory
9529 genfile --stat=mode:777 directory
9530
9531 # After both restores, the directory mode should be 755
9532 ) ) >"$at_stdout" 2>"$at_stder1"
9533     at_status=$?
9534     grep '^ *+' "$at_stder1" >&2
9535     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9536 else
9537     ( :;
9538 mkdir ustar
9539 (cd ustar
9540 TEST_TAR_FORMAT=ustar
9541 export TEST_TAR_FORMAT
9542 TAR_OPTIONS="-H ustar"
9543 export TAR_OPTIONS
9544 rm -rf *
9545
9546
9547 # Force umask
9548 umask 022
9549
9550 # Make sure user's umask is honored, even if we are superuser
9551 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9552
9553 # Create a directory
9554 mkdir directory
9555 chmod 777 directory
9556 genfile --stat=mode:777 directory
9557
9558 # Archive it
9559 tar cf arc directory
9560
9561 # Change its permissions ...
9562 chmod 755 directory
9563 genfile --stat=mode:777 directory
9564
9565 # ... and attempt to restore it twice
9566 tar xf arc directory
9567 genfile --stat=mode:777 directory
9568
9569 tar xf arc directory
9570 genfile --stat=mode:777 directory
9571
9572 # After both restores, the directory mode should be 755
9573 ) ) >"$at_stdout" 2>"$at_stderr"
9574     at_status=$?
9575 fi
9576
9577 at_failed=false
9578 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9579 echo >>"$at_stdout"; echo "777
9580 755
9581 755
9582 755
9583 " | $at_diff - "$at_stdout" || at_failed=:
9584 case $at_status in
9585    77) echo 77 > "$at_status_file"; exit 77;;
9586    0) ;;
9587    *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
9588       at_failed=:;;
9589 esac
9590 if $at_failed; then
9591
9592
9593   echo 1 > "$at_status_file"
9594   exit 1
9595 fi
9596
9597 $at_traceon
9598 $at_traceoff
9599 echo "$at_srcdir/extrac06.at:36:
9600 mkdir posix
9601 (cd posix
9602 TEST_TAR_FORMAT=posix
9603 export TEST_TAR_FORMAT
9604 TAR_OPTIONS=\"-H posix\"
9605 export TAR_OPTIONS
9606 rm -rf *
9607
9608
9609 # Force umask
9610 umask 022
9611
9612 # Make sure user's umask is honored, even if we are superuser
9613 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
9614
9615 # Create a directory
9616 mkdir directory
9617 chmod 777 directory
9618 genfile --stat=mode:777 directory
9619
9620 # Archive it
9621 tar cf arc directory
9622
9623 # Change its permissions ...
9624 chmod 755 directory
9625 genfile --stat=mode:777 directory
9626
9627 # ... and attempt to restore it twice
9628 tar xf arc directory
9629 genfile --stat=mode:777 directory
9630
9631 tar xf arc directory
9632 genfile --stat=mode:777 directory
9633
9634 # After both restores, the directory mode should be 755
9635 )"
9636 echo extrac06.at:36 >"$at_check_line_file"
9637
9638 at_trace_this=
9639 if test -n "$at_traceon"; then
9640     echo 'Not enabling shell tracing (command contains an embedded newline)'
9641 fi
9642
9643 if test -n "$at_trace_this"; then
9644     ( $at_traceon;
9645 mkdir posix
9646 (cd posix
9647 TEST_TAR_FORMAT=posix
9648 export TEST_TAR_FORMAT
9649 TAR_OPTIONS="-H posix"
9650 export TAR_OPTIONS
9651 rm -rf *
9652
9653
9654 # Force umask
9655 umask 022
9656
9657 # Make sure user's umask is honored, even if we are superuser
9658 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9659
9660 # Create a directory
9661 mkdir directory
9662 chmod 777 directory
9663 genfile --stat=mode:777 directory
9664
9665 # Archive it
9666 tar cf arc directory
9667
9668 # Change its permissions ...
9669 chmod 755 directory
9670 genfile --stat=mode:777 directory
9671
9672 # ... and attempt to restore it twice
9673 tar xf arc directory
9674 genfile --stat=mode:777 directory
9675
9676 tar xf arc directory
9677 genfile --stat=mode:777 directory
9678
9679 # After both restores, the directory mode should be 755
9680 ) ) >"$at_stdout" 2>"$at_stder1"
9681     at_status=$?
9682     grep '^ *+' "$at_stder1" >&2
9683     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9684 else
9685     ( :;
9686 mkdir posix
9687 (cd posix
9688 TEST_TAR_FORMAT=posix
9689 export TEST_TAR_FORMAT
9690 TAR_OPTIONS="-H posix"
9691 export TAR_OPTIONS
9692 rm -rf *
9693
9694
9695 # Force umask
9696 umask 022
9697
9698 # Make sure user's umask is honored, even if we are superuser
9699 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9700
9701 # Create a directory
9702 mkdir directory
9703 chmod 777 directory
9704 genfile --stat=mode:777 directory
9705
9706 # Archive it
9707 tar cf arc directory
9708
9709 # Change its permissions ...
9710 chmod 755 directory
9711 genfile --stat=mode:777 directory
9712
9713 # ... and attempt to restore it twice
9714 tar xf arc directory
9715 genfile --stat=mode:777 directory
9716
9717 tar xf arc directory
9718 genfile --stat=mode:777 directory
9719
9720 # After both restores, the directory mode should be 755
9721 ) ) >"$at_stdout" 2>"$at_stderr"
9722     at_status=$?
9723 fi
9724
9725 at_failed=false
9726 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9727 echo >>"$at_stdout"; echo "777
9728 755
9729 755
9730 755
9731 " | $at_diff - "$at_stdout" || at_failed=:
9732 case $at_status in
9733    77) echo 77 > "$at_status_file"; exit 77;;
9734    0) ;;
9735    *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
9736       at_failed=:;;
9737 esac
9738 if $at_failed; then
9739
9740
9741   echo 1 > "$at_status_file"
9742   exit 1
9743 fi
9744
9745 $at_traceon
9746 $at_traceoff
9747 echo "$at_srcdir/extrac06.at:36:
9748 mkdir gnu
9749 (cd gnu
9750 TEST_TAR_FORMAT=gnu
9751 export TEST_TAR_FORMAT
9752 TAR_OPTIONS=\"-H gnu\"
9753 export TAR_OPTIONS
9754 rm -rf *
9755
9756
9757 # Force umask
9758 umask 022
9759
9760 # Make sure user's umask is honored, even if we are superuser
9761 TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\"
9762
9763 # Create a directory
9764 mkdir directory
9765 chmod 777 directory
9766 genfile --stat=mode:777 directory
9767
9768 # Archive it
9769 tar cf arc directory
9770
9771 # Change its permissions ...
9772 chmod 755 directory
9773 genfile --stat=mode:777 directory
9774
9775 # ... and attempt to restore it twice
9776 tar xf arc directory
9777 genfile --stat=mode:777 directory
9778
9779 tar xf arc directory
9780 genfile --stat=mode:777 directory
9781
9782 # After both restores, the directory mode should be 755
9783 )"
9784 echo extrac06.at:36 >"$at_check_line_file"
9785
9786 at_trace_this=
9787 if test -n "$at_traceon"; then
9788     echo 'Not enabling shell tracing (command contains an embedded newline)'
9789 fi
9790
9791 if test -n "$at_trace_this"; then
9792     ( $at_traceon;
9793 mkdir gnu
9794 (cd gnu
9795 TEST_TAR_FORMAT=gnu
9796 export TEST_TAR_FORMAT
9797 TAR_OPTIONS="-H gnu"
9798 export TAR_OPTIONS
9799 rm -rf *
9800
9801
9802 # Force umask
9803 umask 022
9804
9805 # Make sure user's umask is honored, even if we are superuser
9806 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9807
9808 # Create a directory
9809 mkdir directory
9810 chmod 777 directory
9811 genfile --stat=mode:777 directory
9812
9813 # Archive it
9814 tar cf arc directory
9815
9816 # Change its permissions ...
9817 chmod 755 directory
9818 genfile --stat=mode:777 directory
9819
9820 # ... and attempt to restore it twice
9821 tar xf arc directory
9822 genfile --stat=mode:777 directory
9823
9824 tar xf arc directory
9825 genfile --stat=mode:777 directory
9826
9827 # After both restores, the directory mode should be 755
9828 ) ) >"$at_stdout" 2>"$at_stder1"
9829     at_status=$?
9830     grep '^ *+' "$at_stder1" >&2
9831     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9832 else
9833     ( :;
9834 mkdir gnu
9835 (cd gnu
9836 TEST_TAR_FORMAT=gnu
9837 export TEST_TAR_FORMAT
9838 TAR_OPTIONS="-H gnu"
9839 export TAR_OPTIONS
9840 rm -rf *
9841
9842
9843 # Force umask
9844 umask 022
9845
9846 # Make sure user's umask is honored, even if we are superuser
9847 TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions"
9848
9849 # Create a directory
9850 mkdir directory
9851 chmod 777 directory
9852 genfile --stat=mode:777 directory
9853
9854 # Archive it
9855 tar cf arc directory
9856
9857 # Change its permissions ...
9858 chmod 755 directory
9859 genfile --stat=mode:777 directory
9860
9861 # ... and attempt to restore it twice
9862 tar xf arc directory
9863 genfile --stat=mode:777 directory
9864
9865 tar xf arc directory
9866 genfile --stat=mode:777 directory
9867
9868 # After both restores, the directory mode should be 755
9869 ) ) >"$at_stdout" 2>"$at_stderr"
9870     at_status=$?
9871 fi
9872
9873 at_failed=false
9874 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
9875 echo >>"$at_stdout"; echo "777
9876 755
9877 755
9878 755
9879 " | $at_diff - "$at_stdout" || at_failed=:
9880 case $at_status in
9881    77) echo 77 > "$at_status_file"; exit 77;;
9882    0) ;;
9883    *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0"
9884       at_failed=:;;
9885 esac
9886 if $at_failed; then
9887
9888
9889   echo 1 > "$at_status_file"
9890   exit 1
9891 fi
9892
9893 $at_traceon
9894
9895
9896
9897       $at_traceoff
9898       $at_times_p && times >"$at_times_file"
9899     ) 5>&1 2>&1 | eval $at_tee_pipe
9900     at_status=`cat "$at_status_file"`
9901     ;;
9902
9903   24 ) # 24. extrac07.at:27: extracting symlinks to a read-only dir
9904     at_setup_line='extrac07.at:27'
9905     at_desc="extracting symlinks to a read-only dir"
9906     $at_quiet $ECHO_N " 24: extracting symlinks to a read-only dir         $ECHO_C"
9907     at_xfail=no
9908       test -f $XFAILFILE && at_xfail=yes
9909     echo "#                             -*- compilation -*-" >> "$at_group_log"
9910     (
9911       echo "24. extrac07.at:27: testing ..."
9912       $at_traceon
9913
9914
9915
9916
9917
9918   $at_traceoff
9919 echo "$at_srcdir/extrac07.at:30:
9920 mkdir v7
9921 (cd v7
9922 TEST_TAR_FORMAT=v7
9923 export TEST_TAR_FORMAT
9924 TAR_OPTIONS=\"-H v7\"
9925 export TAR_OPTIONS
9926 rm -rf *
9927
9928 echo Prepare the directory
9929 mkdir dir
9930 genfile -f foo
9931 cd dir
9932 ln -s ../foo .
9933 cd ..
9934 chmod -w dir
9935
9936 echo Create the archive
9937 tar cf archive dir || exit 1
9938
9939 chmod +w dir
9940
9941 echo Extract
9942 mkdir out
9943 tar -C out -xvf archive
9944 )"
9945 echo extrac07.at:30 >"$at_check_line_file"
9946
9947 at_trace_this=
9948 if test -n "$at_traceon"; then
9949     echo 'Not enabling shell tracing (command contains an embedded newline)'
9950 fi
9951
9952 if test -n "$at_trace_this"; then
9953     ( $at_traceon;
9954 mkdir v7
9955 (cd v7
9956 TEST_TAR_FORMAT=v7
9957 export TEST_TAR_FORMAT
9958 TAR_OPTIONS="-H v7"
9959 export TAR_OPTIONS
9960 rm -rf *
9961
9962 echo Prepare the directory
9963 mkdir dir
9964 genfile -f foo
9965 cd dir
9966 ln -s ../foo .
9967 cd ..
9968 chmod -w dir
9969
9970 echo Create the archive
9971 tar cf archive dir || exit 1
9972
9973 chmod +w dir
9974
9975 echo Extract
9976 mkdir out
9977 tar -C out -xvf archive
9978 ) ) >"$at_stdout" 2>"$at_stder1"
9979     at_status=$?
9980     grep '^ *+' "$at_stder1" >&2
9981     grep -v '^ *+' "$at_stder1" >"$at_stderr"
9982 else
9983     ( :;
9984 mkdir v7
9985 (cd v7
9986 TEST_TAR_FORMAT=v7
9987 export TEST_TAR_FORMAT
9988 TAR_OPTIONS="-H v7"
9989 export TAR_OPTIONS
9990 rm -rf *
9991
9992 echo Prepare the directory
9993 mkdir dir
9994 genfile -f foo
9995 cd dir
9996 ln -s ../foo .
9997 cd ..
9998 chmod -w dir
9999
10000 echo Create the archive
10001 tar cf archive dir || exit 1
10002
10003 chmod +w dir
10004
10005 echo Extract
10006 mkdir out
10007 tar -C out -xvf archive
10008 ) ) >"$at_stdout" 2>"$at_stderr"
10009     at_status=$?
10010 fi
10011
10012 at_failed=false
10013 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10014 echo >>"$at_stdout"; echo "Prepare the directory
10015 Create the archive
10016 Extract
10017 dir/
10018 dir/foo
10019 " | $at_diff - "$at_stdout" || at_failed=:
10020 case $at_status in
10021    77) echo 77 > "$at_status_file"; exit 77;;
10022    0) ;;
10023    *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
10024       at_failed=:;;
10025 esac
10026 if $at_failed; then
10027
10028
10029   echo 1 > "$at_status_file"
10030   exit 1
10031 else
10032   ustar
10033 fi
10034
10035 $at_traceon
10036 $at_traceoff
10037 echo "$at_srcdir/extrac07.at:30:
10038 mkdir oldgnu
10039 (cd oldgnu
10040 TEST_TAR_FORMAT=oldgnu
10041 export TEST_TAR_FORMAT
10042 TAR_OPTIONS=\"-H oldgnu\"
10043 export TAR_OPTIONS
10044 rm -rf *
10045
10046 echo Prepare the directory
10047 mkdir dir
10048 genfile -f foo
10049 cd dir
10050 ln -s ../foo .
10051 cd ..
10052 chmod -w dir
10053
10054 echo Create the archive
10055 tar cf archive dir || exit 1
10056
10057 chmod +w dir
10058
10059 echo Extract
10060 mkdir out
10061 tar -C out -xvf archive
10062 )"
10063 echo extrac07.at:30 >"$at_check_line_file"
10064
10065 at_trace_this=
10066 if test -n "$at_traceon"; then
10067     echo 'Not enabling shell tracing (command contains an embedded newline)'
10068 fi
10069
10070 if test -n "$at_trace_this"; then
10071     ( $at_traceon;
10072 mkdir oldgnu
10073 (cd oldgnu
10074 TEST_TAR_FORMAT=oldgnu
10075 export TEST_TAR_FORMAT
10076 TAR_OPTIONS="-H oldgnu"
10077 export TAR_OPTIONS
10078 rm -rf *
10079
10080 echo Prepare the directory
10081 mkdir dir
10082 genfile -f foo
10083 cd dir
10084 ln -s ../foo .
10085 cd ..
10086 chmod -w dir
10087
10088 echo Create the archive
10089 tar cf archive dir || exit 1
10090
10091 chmod +w dir
10092
10093 echo Extract
10094 mkdir out
10095 tar -C out -xvf archive
10096 ) ) >"$at_stdout" 2>"$at_stder1"
10097     at_status=$?
10098     grep '^ *+' "$at_stder1" >&2
10099     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10100 else
10101     ( :;
10102 mkdir oldgnu
10103 (cd oldgnu
10104 TEST_TAR_FORMAT=oldgnu
10105 export TEST_TAR_FORMAT
10106 TAR_OPTIONS="-H oldgnu"
10107 export TAR_OPTIONS
10108 rm -rf *
10109
10110 echo Prepare the directory
10111 mkdir dir
10112 genfile -f foo
10113 cd dir
10114 ln -s ../foo .
10115 cd ..
10116 chmod -w dir
10117
10118 echo Create the archive
10119 tar cf archive dir || exit 1
10120
10121 chmod +w dir
10122
10123 echo Extract
10124 mkdir out
10125 tar -C out -xvf archive
10126 ) ) >"$at_stdout" 2>"$at_stderr"
10127     at_status=$?
10128 fi
10129
10130 at_failed=false
10131 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10132 echo >>"$at_stdout"; echo "Prepare the directory
10133 Create the archive
10134 Extract
10135 dir/
10136 dir/foo
10137 " | $at_diff - "$at_stdout" || at_failed=:
10138 case $at_status in
10139    77) echo 77 > "$at_status_file"; exit 77;;
10140    0) ;;
10141    *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
10142       at_failed=:;;
10143 esac
10144 if $at_failed; then
10145
10146
10147   echo 1 > "$at_status_file"
10148   exit 1
10149 else
10150   ustar
10151 fi
10152
10153 $at_traceon
10154 $at_traceoff
10155 echo "$at_srcdir/extrac07.at:30:
10156 mkdir ustar
10157 (cd ustar
10158 TEST_TAR_FORMAT=ustar
10159 export TEST_TAR_FORMAT
10160 TAR_OPTIONS=\"-H ustar\"
10161 export TAR_OPTIONS
10162 rm -rf *
10163
10164 echo Prepare the directory
10165 mkdir dir
10166 genfile -f foo
10167 cd dir
10168 ln -s ../foo .
10169 cd ..
10170 chmod -w dir
10171
10172 echo Create the archive
10173 tar cf archive dir || exit 1
10174
10175 chmod +w dir
10176
10177 echo Extract
10178 mkdir out
10179 tar -C out -xvf archive
10180 )"
10181 echo extrac07.at:30 >"$at_check_line_file"
10182
10183 at_trace_this=
10184 if test -n "$at_traceon"; then
10185     echo 'Not enabling shell tracing (command contains an embedded newline)'
10186 fi
10187
10188 if test -n "$at_trace_this"; then
10189     ( $at_traceon;
10190 mkdir ustar
10191 (cd ustar
10192 TEST_TAR_FORMAT=ustar
10193 export TEST_TAR_FORMAT
10194 TAR_OPTIONS="-H ustar"
10195 export TAR_OPTIONS
10196 rm -rf *
10197
10198 echo Prepare the directory
10199 mkdir dir
10200 genfile -f foo
10201 cd dir
10202 ln -s ../foo .
10203 cd ..
10204 chmod -w dir
10205
10206 echo Create the archive
10207 tar cf archive dir || exit 1
10208
10209 chmod +w dir
10210
10211 echo Extract
10212 mkdir out
10213 tar -C out -xvf archive
10214 ) ) >"$at_stdout" 2>"$at_stder1"
10215     at_status=$?
10216     grep '^ *+' "$at_stder1" >&2
10217     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10218 else
10219     ( :;
10220 mkdir ustar
10221 (cd ustar
10222 TEST_TAR_FORMAT=ustar
10223 export TEST_TAR_FORMAT
10224 TAR_OPTIONS="-H ustar"
10225 export TAR_OPTIONS
10226 rm -rf *
10227
10228 echo Prepare the directory
10229 mkdir dir
10230 genfile -f foo
10231 cd dir
10232 ln -s ../foo .
10233 cd ..
10234 chmod -w dir
10235
10236 echo Create the archive
10237 tar cf archive dir || exit 1
10238
10239 chmod +w dir
10240
10241 echo Extract
10242 mkdir out
10243 tar -C out -xvf archive
10244 ) ) >"$at_stdout" 2>"$at_stderr"
10245     at_status=$?
10246 fi
10247
10248 at_failed=false
10249 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10250 echo >>"$at_stdout"; echo "Prepare the directory
10251 Create the archive
10252 Extract
10253 dir/
10254 dir/foo
10255 " | $at_diff - "$at_stdout" || at_failed=:
10256 case $at_status in
10257    77) echo 77 > "$at_status_file"; exit 77;;
10258    0) ;;
10259    *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
10260       at_failed=:;;
10261 esac
10262 if $at_failed; then
10263
10264
10265   echo 1 > "$at_status_file"
10266   exit 1
10267 else
10268   ustar
10269 fi
10270
10271 $at_traceon
10272 $at_traceoff
10273 echo "$at_srcdir/extrac07.at:30:
10274 mkdir posix
10275 (cd posix
10276 TEST_TAR_FORMAT=posix
10277 export TEST_TAR_FORMAT
10278 TAR_OPTIONS=\"-H posix\"
10279 export TAR_OPTIONS
10280 rm -rf *
10281
10282 echo Prepare the directory
10283 mkdir dir
10284 genfile -f foo
10285 cd dir
10286 ln -s ../foo .
10287 cd ..
10288 chmod -w dir
10289
10290 echo Create the archive
10291 tar cf archive dir || exit 1
10292
10293 chmod +w dir
10294
10295 echo Extract
10296 mkdir out
10297 tar -C out -xvf archive
10298 )"
10299 echo extrac07.at:30 >"$at_check_line_file"
10300
10301 at_trace_this=
10302 if test -n "$at_traceon"; then
10303     echo 'Not enabling shell tracing (command contains an embedded newline)'
10304 fi
10305
10306 if test -n "$at_trace_this"; then
10307     ( $at_traceon;
10308 mkdir posix
10309 (cd posix
10310 TEST_TAR_FORMAT=posix
10311 export TEST_TAR_FORMAT
10312 TAR_OPTIONS="-H posix"
10313 export TAR_OPTIONS
10314 rm -rf *
10315
10316 echo Prepare the directory
10317 mkdir dir
10318 genfile -f foo
10319 cd dir
10320 ln -s ../foo .
10321 cd ..
10322 chmod -w dir
10323
10324 echo Create the archive
10325 tar cf archive dir || exit 1
10326
10327 chmod +w dir
10328
10329 echo Extract
10330 mkdir out
10331 tar -C out -xvf archive
10332 ) ) >"$at_stdout" 2>"$at_stder1"
10333     at_status=$?
10334     grep '^ *+' "$at_stder1" >&2
10335     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10336 else
10337     ( :;
10338 mkdir posix
10339 (cd posix
10340 TEST_TAR_FORMAT=posix
10341 export TEST_TAR_FORMAT
10342 TAR_OPTIONS="-H posix"
10343 export TAR_OPTIONS
10344 rm -rf *
10345
10346 echo Prepare the directory
10347 mkdir dir
10348 genfile -f foo
10349 cd dir
10350 ln -s ../foo .
10351 cd ..
10352 chmod -w dir
10353
10354 echo Create the archive
10355 tar cf archive dir || exit 1
10356
10357 chmod +w dir
10358
10359 echo Extract
10360 mkdir out
10361 tar -C out -xvf archive
10362 ) ) >"$at_stdout" 2>"$at_stderr"
10363     at_status=$?
10364 fi
10365
10366 at_failed=false
10367 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10368 echo >>"$at_stdout"; echo "Prepare the directory
10369 Create the archive
10370 Extract
10371 dir/
10372 dir/foo
10373 " | $at_diff - "$at_stdout" || at_failed=:
10374 case $at_status in
10375    77) echo 77 > "$at_status_file"; exit 77;;
10376    0) ;;
10377    *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
10378       at_failed=:;;
10379 esac
10380 if $at_failed; then
10381
10382
10383   echo 1 > "$at_status_file"
10384   exit 1
10385 else
10386   ustar
10387 fi
10388
10389 $at_traceon
10390 $at_traceoff
10391 echo "$at_srcdir/extrac07.at:30:
10392 mkdir gnu
10393 (cd gnu
10394 TEST_TAR_FORMAT=gnu
10395 export TEST_TAR_FORMAT
10396 TAR_OPTIONS=\"-H gnu\"
10397 export TAR_OPTIONS
10398 rm -rf *
10399
10400 echo Prepare the directory
10401 mkdir dir
10402 genfile -f foo
10403 cd dir
10404 ln -s ../foo .
10405 cd ..
10406 chmod -w dir
10407
10408 echo Create the archive
10409 tar cf archive dir || exit 1
10410
10411 chmod +w dir
10412
10413 echo Extract
10414 mkdir out
10415 tar -C out -xvf archive
10416 )"
10417 echo extrac07.at:30 >"$at_check_line_file"
10418
10419 at_trace_this=
10420 if test -n "$at_traceon"; then
10421     echo 'Not enabling shell tracing (command contains an embedded newline)'
10422 fi
10423
10424 if test -n "$at_trace_this"; then
10425     ( $at_traceon;
10426 mkdir gnu
10427 (cd gnu
10428 TEST_TAR_FORMAT=gnu
10429 export TEST_TAR_FORMAT
10430 TAR_OPTIONS="-H gnu"
10431 export TAR_OPTIONS
10432 rm -rf *
10433
10434 echo Prepare the directory
10435 mkdir dir
10436 genfile -f foo
10437 cd dir
10438 ln -s ../foo .
10439 cd ..
10440 chmod -w dir
10441
10442 echo Create the archive
10443 tar cf archive dir || exit 1
10444
10445 chmod +w dir
10446
10447 echo Extract
10448 mkdir out
10449 tar -C out -xvf archive
10450 ) ) >"$at_stdout" 2>"$at_stder1"
10451     at_status=$?
10452     grep '^ *+' "$at_stder1" >&2
10453     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10454 else
10455     ( :;
10456 mkdir gnu
10457 (cd gnu
10458 TEST_TAR_FORMAT=gnu
10459 export TEST_TAR_FORMAT
10460 TAR_OPTIONS="-H gnu"
10461 export TAR_OPTIONS
10462 rm -rf *
10463
10464 echo Prepare the directory
10465 mkdir dir
10466 genfile -f foo
10467 cd dir
10468 ln -s ../foo .
10469 cd ..
10470 chmod -w dir
10471
10472 echo Create the archive
10473 tar cf archive dir || exit 1
10474
10475 chmod +w dir
10476
10477 echo Extract
10478 mkdir out
10479 tar -C out -xvf archive
10480 ) ) >"$at_stdout" 2>"$at_stderr"
10481     at_status=$?
10482 fi
10483
10484 at_failed=false
10485 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10486 echo >>"$at_stdout"; echo "Prepare the directory
10487 Create the archive
10488 Extract
10489 dir/
10490 dir/foo
10491 " | $at_diff - "$at_stdout" || at_failed=:
10492 case $at_status in
10493    77) echo 77 > "$at_status_file"; exit 77;;
10494    0) ;;
10495    *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0"
10496       at_failed=:;;
10497 esac
10498 if $at_failed; then
10499
10500
10501   echo 1 > "$at_status_file"
10502   exit 1
10503 else
10504   ustar
10505 fi
10506
10507 $at_traceon
10508
10509  # Testing one format is enough
10510
10511       $at_traceoff
10512       $at_times_p && times >"$at_times_file"
10513     ) 5>&1 2>&1 | eval $at_tee_pipe
10514     at_status=`cat "$at_status_file"`
10515     ;;
10516
10517   25 ) # 25. gzip.at:23: gzip
10518     at_setup_line='gzip.at:23'
10519     at_desc="gzip"
10520     $at_quiet $ECHO_N " 25: gzip                                           $ECHO_C"
10521     at_xfail=no
10522     echo "#                             -*- compilation -*-" >> "$at_group_log"
10523     (
10524       echo "25. gzip.at:23: testing ..."
10525       $at_traceon
10526
10527
10528
10529 unset TAR_OPTIONS
10530
10531 $at_traceoff
10532 echo "$at_srcdir/gzip.at:28:
10533
10534 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
10535
10536 tar xfvz /dev/null
10537 test \$? = 2 || exit 1
10538 "
10539 echo gzip.at:28 >"$at_check_line_file"
10540
10541 at_trace_this=
10542 if test -n "$at_traceon"; then
10543     echo 'Not enabling shell tracing (command contains an embedded newline)'
10544 fi
10545
10546 if test -n "$at_trace_this"; then
10547     ( $at_traceon;
10548
10549 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
10550
10551 tar xfvz /dev/null
10552 test $? = 2 || exit 1
10553  ) >"$at_stdout" 2>"$at_stder1"
10554     at_status=$?
10555     grep '^ *+' "$at_stder1" >&2
10556     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10557 else
10558     ( :;
10559
10560 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
10561
10562 tar xfvz /dev/null
10563 test $? = 2 || exit 1
10564  ) >"$at_stdout" 2>"$at_stderr"
10565     at_status=$?
10566 fi
10567
10568 at_failed=false
10569 echo >>"$at_stderr"; echo "
10570 gzip: stdin: unexpected end of file
10571 tar: Child returned status 1
10572 tar: Error exit delayed from previous errors
10573 " | $at_diff - "$at_stderr" || at_failed=:
10574 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
10575 case $at_status in
10576    77) echo 77 > "$at_status_file"; exit 77;;
10577    0) ;;
10578    *) echo "$at_srcdir/gzip.at:28: exit code was $at_status, expected 0"
10579       at_failed=:;;
10580 esac
10581 if $at_failed; then
10582
10583
10584   echo 1 > "$at_status_file"
10585   exit 1
10586 fi
10587
10588 $at_traceon
10589
10590
10591       $at_traceoff
10592       $at_times_p && times >"$at_times_file"
10593     ) 5>&1 2>&1 | eval $at_tee_pipe
10594     at_status=`cat "$at_status_file"`
10595     ;;
10596
10597   26 ) # 26. incremental.at:23: incremental
10598     at_setup_line='incremental.at:23'
10599     at_desc="incremental"
10600     $at_quiet $ECHO_N " 26: incremental                                    $ECHO_C"
10601     at_xfail=no
10602       test -f $XFAILFILE && at_xfail=yes
10603     echo "#                             -*- compilation -*-" >> "$at_group_log"
10604     (
10605       echo "26. incremental.at:23: testing ..."
10606       $at_traceon
10607
10608
10609
10610
10611
10612   $at_traceoff
10613 echo "$at_srcdir/incremental.at:26:
10614 mkdir gnu
10615 (cd gnu
10616 TEST_TAR_FORMAT=gnu
10617 export TEST_TAR_FORMAT
10618 TAR_OPTIONS=\"-H gnu\"
10619 export TAR_OPTIONS
10620 rm -rf *
10621
10622 mkdir structure
10623 echo x >structure/file
10624
10625 # On Nextstep (and perhaps other 4.3BSD systems),
10626 # a newly created file's ctime isn't updated
10627 # until the next sync or stat operation on the file.
10628 ls -l structure/file >/dev/null
10629
10630 # If the time of an initial backup and the creation time of a file contained
10631 # in that backup are the same, the file will be backed up again when an
10632 # incremental backup is done, because the incremental backup backs up
10633 # files created \`on or after' the initial backup time.  Without the sleep
10634 # command, behaviour of tar becomes variable, depending whether the system
10635 # clock ticked over to the next second between creating the file and
10636 # backing it up.
10637 sleep 1
10638
10639 tar cf archive --listed=list structure
10640 tar cfv archive --listed=list structure
10641 echo separator
10642 sleep 1
10643 echo y >structure/file
10644 tar cfv archive --listed=list structure
10645 )"
10646 echo incremental.at:26 >"$at_check_line_file"
10647
10648 at_trace_this=
10649 if test -n "$at_traceon"; then
10650     echo 'Not enabling shell tracing (command contains an embedded newline)'
10651 fi
10652
10653 if test -n "$at_trace_this"; then
10654     ( $at_traceon;
10655 mkdir gnu
10656 (cd gnu
10657 TEST_TAR_FORMAT=gnu
10658 export TEST_TAR_FORMAT
10659 TAR_OPTIONS="-H gnu"
10660 export TAR_OPTIONS
10661 rm -rf *
10662
10663 mkdir structure
10664 echo x >structure/file
10665
10666 # On Nextstep (and perhaps other 4.3BSD systems),
10667 # a newly created file's ctime isn't updated
10668 # until the next sync or stat operation on the file.
10669 ls -l structure/file >/dev/null
10670
10671 # If the time of an initial backup and the creation time of a file contained
10672 # in that backup are the same, the file will be backed up again when an
10673 # incremental backup is done, because the incremental backup backs up
10674 # files created `on or after' the initial backup time.  Without the sleep
10675 # command, behaviour of tar becomes variable, depending whether the system
10676 # clock ticked over to the next second between creating the file and
10677 # backing it up.
10678 sleep 1
10679
10680 tar cf archive --listed=list structure
10681 tar cfv archive --listed=list structure
10682 echo separator
10683 sleep 1
10684 echo y >structure/file
10685 tar cfv archive --listed=list structure
10686 ) ) >"$at_stdout" 2>"$at_stder1"
10687     at_status=$?
10688     grep '^ *+' "$at_stder1" >&2
10689     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10690 else
10691     ( :;
10692 mkdir gnu
10693 (cd gnu
10694 TEST_TAR_FORMAT=gnu
10695 export TEST_TAR_FORMAT
10696 TAR_OPTIONS="-H gnu"
10697 export TAR_OPTIONS
10698 rm -rf *
10699
10700 mkdir structure
10701 echo x >structure/file
10702
10703 # On Nextstep (and perhaps other 4.3BSD systems),
10704 # a newly created file's ctime isn't updated
10705 # until the next sync or stat operation on the file.
10706 ls -l structure/file >/dev/null
10707
10708 # If the time of an initial backup and the creation time of a file contained
10709 # in that backup are the same, the file will be backed up again when an
10710 # incremental backup is done, because the incremental backup backs up
10711 # files created `on or after' the initial backup time.  Without the sleep
10712 # command, behaviour of tar becomes variable, depending whether the system
10713 # clock ticked over to the next second between creating the file and
10714 # backing it up.
10715 sleep 1
10716
10717 tar cf archive --listed=list structure
10718 tar cfv archive --listed=list structure
10719 echo separator
10720 sleep 1
10721 echo y >structure/file
10722 tar cfv archive --listed=list structure
10723 ) ) >"$at_stdout" 2>"$at_stderr"
10724     at_status=$?
10725 fi
10726
10727 at_failed=false
10728 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10729 echo >>"$at_stdout"; echo "structure/
10730 separator
10731 structure/
10732 structure/file
10733 " | $at_diff - "$at_stdout" || at_failed=:
10734 case $at_status in
10735    77) echo 77 > "$at_status_file"; exit 77;;
10736    0) ;;
10737    *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0"
10738       at_failed=:;;
10739 esac
10740 if $at_failed; then
10741
10742
10743   echo 1 > "$at_status_file"
10744   exit 1
10745 fi
10746
10747 $at_traceon
10748 $at_traceoff
10749 echo "$at_srcdir/incremental.at:26:
10750 mkdir oldgnu
10751 (cd oldgnu
10752 TEST_TAR_FORMAT=oldgnu
10753 export TEST_TAR_FORMAT
10754 TAR_OPTIONS=\"-H oldgnu\"
10755 export TAR_OPTIONS
10756 rm -rf *
10757
10758 mkdir structure
10759 echo x >structure/file
10760
10761 # On Nextstep (and perhaps other 4.3BSD systems),
10762 # a newly created file's ctime isn't updated
10763 # until the next sync or stat operation on the file.
10764 ls -l structure/file >/dev/null
10765
10766 # If the time of an initial backup and the creation time of a file contained
10767 # in that backup are the same, the file will be backed up again when an
10768 # incremental backup is done, because the incremental backup backs up
10769 # files created \`on or after' the initial backup time.  Without the sleep
10770 # command, behaviour of tar becomes variable, depending whether the system
10771 # clock ticked over to the next second between creating the file and
10772 # backing it up.
10773 sleep 1
10774
10775 tar cf archive --listed=list structure
10776 tar cfv archive --listed=list structure
10777 echo separator
10778 sleep 1
10779 echo y >structure/file
10780 tar cfv archive --listed=list structure
10781 )"
10782 echo incremental.at:26 >"$at_check_line_file"
10783
10784 at_trace_this=
10785 if test -n "$at_traceon"; then
10786     echo 'Not enabling shell tracing (command contains an embedded newline)'
10787 fi
10788
10789 if test -n "$at_trace_this"; then
10790     ( $at_traceon;
10791 mkdir oldgnu
10792 (cd oldgnu
10793 TEST_TAR_FORMAT=oldgnu
10794 export TEST_TAR_FORMAT
10795 TAR_OPTIONS="-H oldgnu"
10796 export TAR_OPTIONS
10797 rm -rf *
10798
10799 mkdir structure
10800 echo x >structure/file
10801
10802 # On Nextstep (and perhaps other 4.3BSD systems),
10803 # a newly created file's ctime isn't updated
10804 # until the next sync or stat operation on the file.
10805 ls -l structure/file >/dev/null
10806
10807 # If the time of an initial backup and the creation time of a file contained
10808 # in that backup are the same, the file will be backed up again when an
10809 # incremental backup is done, because the incremental backup backs up
10810 # files created `on or after' the initial backup time.  Without the sleep
10811 # command, behaviour of tar becomes variable, depending whether the system
10812 # clock ticked over to the next second between creating the file and
10813 # backing it up.
10814 sleep 1
10815
10816 tar cf archive --listed=list structure
10817 tar cfv archive --listed=list structure
10818 echo separator
10819 sleep 1
10820 echo y >structure/file
10821 tar cfv archive --listed=list structure
10822 ) ) >"$at_stdout" 2>"$at_stder1"
10823     at_status=$?
10824     grep '^ *+' "$at_stder1" >&2
10825     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10826 else
10827     ( :;
10828 mkdir oldgnu
10829 (cd oldgnu
10830 TEST_TAR_FORMAT=oldgnu
10831 export TEST_TAR_FORMAT
10832 TAR_OPTIONS="-H oldgnu"
10833 export TAR_OPTIONS
10834 rm -rf *
10835
10836 mkdir structure
10837 echo x >structure/file
10838
10839 # On Nextstep (and perhaps other 4.3BSD systems),
10840 # a newly created file's ctime isn't updated
10841 # until the next sync or stat operation on the file.
10842 ls -l structure/file >/dev/null
10843
10844 # If the time of an initial backup and the creation time of a file contained
10845 # in that backup are the same, the file will be backed up again when an
10846 # incremental backup is done, because the incremental backup backs up
10847 # files created `on or after' the initial backup time.  Without the sleep
10848 # command, behaviour of tar becomes variable, depending whether the system
10849 # clock ticked over to the next second between creating the file and
10850 # backing it up.
10851 sleep 1
10852
10853 tar cf archive --listed=list structure
10854 tar cfv archive --listed=list structure
10855 echo separator
10856 sleep 1
10857 echo y >structure/file
10858 tar cfv archive --listed=list structure
10859 ) ) >"$at_stdout" 2>"$at_stderr"
10860     at_status=$?
10861 fi
10862
10863 at_failed=false
10864 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
10865 echo >>"$at_stdout"; echo "structure/
10866 separator
10867 structure/
10868 structure/file
10869 " | $at_diff - "$at_stdout" || at_failed=:
10870 case $at_status in
10871    77) echo 77 > "$at_status_file"; exit 77;;
10872    0) ;;
10873    *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0"
10874       at_failed=:;;
10875 esac
10876 if $at_failed; then
10877
10878
10879   echo 1 > "$at_status_file"
10880   exit 1
10881 fi
10882
10883 $at_traceon
10884 $at_traceoff
10885 echo "$at_srcdir/incremental.at:26:
10886 mkdir posix
10887 (cd posix
10888 TEST_TAR_FORMAT=posix
10889 export TEST_TAR_FORMAT
10890 TAR_OPTIONS=\"-H posix\"
10891 export TAR_OPTIONS
10892 rm -rf *
10893
10894 mkdir structure
10895 echo x >structure/file
10896
10897 # On Nextstep (and perhaps other 4.3BSD systems),
10898 # a newly created file's ctime isn't updated
10899 # until the next sync or stat operation on the file.
10900 ls -l structure/file >/dev/null
10901
10902 # If the time of an initial backup and the creation time of a file contained
10903 # in that backup are the same, the file will be backed up again when an
10904 # incremental backup is done, because the incremental backup backs up
10905 # files created \`on or after' the initial backup time.  Without the sleep
10906 # command, behaviour of tar becomes variable, depending whether the system
10907 # clock ticked over to the next second between creating the file and
10908 # backing it up.
10909 sleep 1
10910
10911 tar cf archive --listed=list structure
10912 tar cfv archive --listed=list structure
10913 echo separator
10914 sleep 1
10915 echo y >structure/file
10916 tar cfv archive --listed=list structure
10917 )"
10918 echo incremental.at:26 >"$at_check_line_file"
10919
10920 at_trace_this=
10921 if test -n "$at_traceon"; then
10922     echo 'Not enabling shell tracing (command contains an embedded newline)'
10923 fi
10924
10925 if test -n "$at_trace_this"; then
10926     ( $at_traceon;
10927 mkdir posix
10928 (cd posix
10929 TEST_TAR_FORMAT=posix
10930 export TEST_TAR_FORMAT
10931 TAR_OPTIONS="-H posix"
10932 export TAR_OPTIONS
10933 rm -rf *
10934
10935 mkdir structure
10936 echo x >structure/file
10937
10938 # On Nextstep (and perhaps other 4.3BSD systems),
10939 # a newly created file's ctime isn't updated
10940 # until the next sync or stat operation on the file.
10941 ls -l structure/file >/dev/null
10942
10943 # If the time of an initial backup and the creation time of a file contained
10944 # in that backup are the same, the file will be backed up again when an
10945 # incremental backup is done, because the incremental backup backs up
10946 # files created `on or after' the initial backup time.  Without the sleep
10947 # command, behaviour of tar becomes variable, depending whether the system
10948 # clock ticked over to the next second between creating the file and
10949 # backing it up.
10950 sleep 1
10951
10952 tar cf archive --listed=list structure
10953 tar cfv archive --listed=list structure
10954 echo separator
10955 sleep 1
10956 echo y >structure/file
10957 tar cfv archive --listed=list structure
10958 ) ) >"$at_stdout" 2>"$at_stder1"
10959     at_status=$?
10960     grep '^ *+' "$at_stder1" >&2
10961     grep -v '^ *+' "$at_stder1" >"$at_stderr"
10962 else
10963     ( :;
10964 mkdir posix
10965 (cd posix
10966 TEST_TAR_FORMAT=posix
10967 export TEST_TAR_FORMAT
10968 TAR_OPTIONS="-H posix"
10969 export TAR_OPTIONS
10970 rm -rf *
10971
10972 mkdir structure
10973 echo x >structure/file
10974
10975 # On Nextstep (and perhaps other 4.3BSD systems),
10976 # a newly created file's ctime isn't updated
10977 # until the next sync or stat operation on the file.
10978 ls -l structure/file >/dev/null
10979
10980 # If the time of an initial backup and the creation time of a file contained
10981 # in that backup are the same, the file will be backed up again when an
10982 # incremental backup is done, because the incremental backup backs up
10983 # files created `on or after' the initial backup time.  Without the sleep
10984 # command, behaviour of tar becomes variable, depending whether the system
10985 # clock ticked over to the next second between creating the file and
10986 # backing it up.
10987 sleep 1
10988
10989 tar cf archive --listed=list structure
10990 tar cfv archive --listed=list structure
10991 echo separator
10992 sleep 1
10993 echo y >structure/file
10994 tar cfv archive --listed=list structure
10995 ) ) >"$at_stdout" 2>"$at_stderr"
10996     at_status=$?
10997 fi
10998
10999 at_failed=false
11000 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11001 echo >>"$at_stdout"; echo "structure/
11002 separator
11003 structure/
11004 structure/file
11005 " | $at_diff - "$at_stdout" || at_failed=:
11006 case $at_status in
11007    77) echo 77 > "$at_status_file"; exit 77;;
11008    0) ;;
11009    *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0"
11010       at_failed=:;;
11011 esac
11012 if $at_failed; then
11013
11014
11015   echo 1 > "$at_status_file"
11016   exit 1
11017 fi
11018
11019 $at_traceon
11020
11021
11022
11023       $at_traceoff
11024       $at_times_p && times >"$at_times_file"
11025     ) 5>&1 2>&1 | eval $at_tee_pipe
11026     at_status=`cat "$at_status_file"`
11027     ;;
11028
11029   27 ) # 27. incr01.at:27: restore broken symlinks from incremental
11030     at_setup_line='incr01.at:27'
11031     at_desc="restore broken symlinks from incremental"
11032     $at_quiet $ECHO_N " 27: restore broken symlinks from incremental       $ECHO_C"
11033     at_xfail=no
11034       test -f $XFAILFILE && at_xfail=yes
11035     echo "#                             -*- compilation -*-" >> "$at_group_log"
11036     (
11037       echo "27. incr01.at:27: testing ..."
11038       $at_traceon
11039
11040
11041
11042
11043
11044   $at_traceoff
11045 echo "$at_srcdir/incr01.at:30:
11046 mkdir gnu
11047 (cd gnu
11048 TEST_TAR_FORMAT=gnu
11049 export TEST_TAR_FORMAT
11050 TAR_OPTIONS=\"-H gnu\"
11051 export TAR_OPTIONS
11052 rm -rf *
11053
11054 mkdir directory
11055 \$as_ln_s foo directory/bar
11056
11057 tar -cf archive.0 -g db directory
11058 rm directory/bar
11059 tar -cf archive.1 -g db directory
11060
11061 mv directory orig
11062
11063 tar xvfg archive.0 /dev/null
11064 echo separator
11065 tar xvfg archive.1 /dev/null
11066 )"
11067 echo incr01.at:30 >"$at_check_line_file"
11068
11069 at_trace_this=
11070 if test -n "$at_traceon"; then
11071     echo 'Not enabling shell tracing (command contains an embedded newline)'
11072 fi
11073
11074 if test -n "$at_trace_this"; then
11075     ( $at_traceon;
11076 mkdir gnu
11077 (cd gnu
11078 TEST_TAR_FORMAT=gnu
11079 export TEST_TAR_FORMAT
11080 TAR_OPTIONS="-H gnu"
11081 export TAR_OPTIONS
11082 rm -rf *
11083
11084 mkdir directory
11085 $as_ln_s foo directory/bar
11086
11087 tar -cf archive.0 -g db directory
11088 rm directory/bar
11089 tar -cf archive.1 -g db directory
11090
11091 mv directory orig
11092
11093 tar xvfg archive.0 /dev/null
11094 echo separator
11095 tar xvfg archive.1 /dev/null
11096 ) ) >"$at_stdout" 2>"$at_stder1"
11097     at_status=$?
11098     grep '^ *+' "$at_stder1" >&2
11099     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11100 else
11101     ( :;
11102 mkdir gnu
11103 (cd gnu
11104 TEST_TAR_FORMAT=gnu
11105 export TEST_TAR_FORMAT
11106 TAR_OPTIONS="-H gnu"
11107 export TAR_OPTIONS
11108 rm -rf *
11109
11110 mkdir directory
11111 $as_ln_s foo directory/bar
11112
11113 tar -cf archive.0 -g db directory
11114 rm directory/bar
11115 tar -cf archive.1 -g db directory
11116
11117 mv directory orig
11118
11119 tar xvfg archive.0 /dev/null
11120 echo separator
11121 tar xvfg archive.1 /dev/null
11122 ) ) >"$at_stdout" 2>"$at_stderr"
11123     at_status=$?
11124 fi
11125
11126 at_failed=false
11127 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11128 echo >>"$at_stdout"; echo "directory/
11129 directory/bar
11130 separator
11131 directory/
11132 tar: Deleting \`directory/bar'
11133 " | $at_diff - "$at_stdout" || at_failed=:
11134 case $at_status in
11135    77) echo 77 > "$at_status_file"; exit 77;;
11136    0) ;;
11137    *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0"
11138       at_failed=:;;
11139 esac
11140 if $at_failed; then
11141
11142
11143   echo 1 > "$at_status_file"
11144   exit 1
11145 fi
11146
11147 $at_traceon
11148 $at_traceoff
11149 echo "$at_srcdir/incr01.at:30:
11150 mkdir oldgnu
11151 (cd oldgnu
11152 TEST_TAR_FORMAT=oldgnu
11153 export TEST_TAR_FORMAT
11154 TAR_OPTIONS=\"-H oldgnu\"
11155 export TAR_OPTIONS
11156 rm -rf *
11157
11158 mkdir directory
11159 \$as_ln_s foo directory/bar
11160
11161 tar -cf archive.0 -g db directory
11162 rm directory/bar
11163 tar -cf archive.1 -g db directory
11164
11165 mv directory orig
11166
11167 tar xvfg archive.0 /dev/null
11168 echo separator
11169 tar xvfg archive.1 /dev/null
11170 )"
11171 echo incr01.at:30 >"$at_check_line_file"
11172
11173 at_trace_this=
11174 if test -n "$at_traceon"; then
11175     echo 'Not enabling shell tracing (command contains an embedded newline)'
11176 fi
11177
11178 if test -n "$at_trace_this"; then
11179     ( $at_traceon;
11180 mkdir oldgnu
11181 (cd oldgnu
11182 TEST_TAR_FORMAT=oldgnu
11183 export TEST_TAR_FORMAT
11184 TAR_OPTIONS="-H oldgnu"
11185 export TAR_OPTIONS
11186 rm -rf *
11187
11188 mkdir directory
11189 $as_ln_s foo directory/bar
11190
11191 tar -cf archive.0 -g db directory
11192 rm directory/bar
11193 tar -cf archive.1 -g db directory
11194
11195 mv directory orig
11196
11197 tar xvfg archive.0 /dev/null
11198 echo separator
11199 tar xvfg archive.1 /dev/null
11200 ) ) >"$at_stdout" 2>"$at_stder1"
11201     at_status=$?
11202     grep '^ *+' "$at_stder1" >&2
11203     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11204 else
11205     ( :;
11206 mkdir oldgnu
11207 (cd oldgnu
11208 TEST_TAR_FORMAT=oldgnu
11209 export TEST_TAR_FORMAT
11210 TAR_OPTIONS="-H oldgnu"
11211 export TAR_OPTIONS
11212 rm -rf *
11213
11214 mkdir directory
11215 $as_ln_s foo directory/bar
11216
11217 tar -cf archive.0 -g db directory
11218 rm directory/bar
11219 tar -cf archive.1 -g db directory
11220
11221 mv directory orig
11222
11223 tar xvfg archive.0 /dev/null
11224 echo separator
11225 tar xvfg archive.1 /dev/null
11226 ) ) >"$at_stdout" 2>"$at_stderr"
11227     at_status=$?
11228 fi
11229
11230 at_failed=false
11231 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11232 echo >>"$at_stdout"; echo "directory/
11233 directory/bar
11234 separator
11235 directory/
11236 tar: Deleting \`directory/bar'
11237 " | $at_diff - "$at_stdout" || at_failed=:
11238 case $at_status in
11239    77) echo 77 > "$at_status_file"; exit 77;;
11240    0) ;;
11241    *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0"
11242       at_failed=:;;
11243 esac
11244 if $at_failed; then
11245
11246
11247   echo 1 > "$at_status_file"
11248   exit 1
11249 fi
11250
11251 $at_traceon
11252 $at_traceoff
11253 echo "$at_srcdir/incr01.at:30:
11254 mkdir posix
11255 (cd posix
11256 TEST_TAR_FORMAT=posix
11257 export TEST_TAR_FORMAT
11258 TAR_OPTIONS=\"-H posix\"
11259 export TAR_OPTIONS
11260 rm -rf *
11261
11262 mkdir directory
11263 \$as_ln_s foo directory/bar
11264
11265 tar -cf archive.0 -g db directory
11266 rm directory/bar
11267 tar -cf archive.1 -g db directory
11268
11269 mv directory orig
11270
11271 tar xvfg archive.0 /dev/null
11272 echo separator
11273 tar xvfg archive.1 /dev/null
11274 )"
11275 echo incr01.at:30 >"$at_check_line_file"
11276
11277 at_trace_this=
11278 if test -n "$at_traceon"; then
11279     echo 'Not enabling shell tracing (command contains an embedded newline)'
11280 fi
11281
11282 if test -n "$at_trace_this"; then
11283     ( $at_traceon;
11284 mkdir posix
11285 (cd posix
11286 TEST_TAR_FORMAT=posix
11287 export TEST_TAR_FORMAT
11288 TAR_OPTIONS="-H posix"
11289 export TAR_OPTIONS
11290 rm -rf *
11291
11292 mkdir directory
11293 $as_ln_s foo directory/bar
11294
11295 tar -cf archive.0 -g db directory
11296 rm directory/bar
11297 tar -cf archive.1 -g db directory
11298
11299 mv directory orig
11300
11301 tar xvfg archive.0 /dev/null
11302 echo separator
11303 tar xvfg archive.1 /dev/null
11304 ) ) >"$at_stdout" 2>"$at_stder1"
11305     at_status=$?
11306     grep '^ *+' "$at_stder1" >&2
11307     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11308 else
11309     ( :;
11310 mkdir posix
11311 (cd posix
11312 TEST_TAR_FORMAT=posix
11313 export TEST_TAR_FORMAT
11314 TAR_OPTIONS="-H posix"
11315 export TAR_OPTIONS
11316 rm -rf *
11317
11318 mkdir directory
11319 $as_ln_s foo directory/bar
11320
11321 tar -cf archive.0 -g db directory
11322 rm directory/bar
11323 tar -cf archive.1 -g db directory
11324
11325 mv directory orig
11326
11327 tar xvfg archive.0 /dev/null
11328 echo separator
11329 tar xvfg archive.1 /dev/null
11330 ) ) >"$at_stdout" 2>"$at_stderr"
11331     at_status=$?
11332 fi
11333
11334 at_failed=false
11335 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11336 echo >>"$at_stdout"; echo "directory/
11337 directory/bar
11338 separator
11339 directory/
11340 tar: Deleting \`directory/bar'
11341 " | $at_diff - "$at_stdout" || at_failed=:
11342 case $at_status in
11343    77) echo 77 > "$at_status_file"; exit 77;;
11344    0) ;;
11345    *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0"
11346       at_failed=:;;
11347 esac
11348 if $at_failed; then
11349
11350
11351   echo 1 > "$at_status_file"
11352   exit 1
11353 fi
11354
11355 $at_traceon
11356
11357
11358
11359       $at_traceoff
11360       $at_times_p && times >"$at_times_file"
11361     ) 5>&1 2>&1 | eval $at_tee_pipe
11362     at_status=`cat "$at_status_file"`
11363     ;;
11364
11365   28 ) # 28. incr02.at:32: restoring timestamps from incremental
11366     at_setup_line='incr02.at:32'
11367     at_desc="restoring timestamps from incremental"
11368     $at_quiet $ECHO_N " 28: restoring timestamps from incremental          $ECHO_C"
11369     at_xfail=no
11370       test -f $XFAILFILE && at_xfail=yes
11371     echo "#                             -*- compilation -*-" >> "$at_group_log"
11372     (
11373       echo "28. incr02.at:32: testing ..."
11374       $at_traceon
11375
11376
11377
11378
11379
11380   $at_traceoff
11381 echo "$at_srcdir/incr02.at:35:
11382 mkdir gnu
11383 (cd gnu
11384 TEST_TAR_FORMAT=gnu
11385 export TEST_TAR_FORMAT
11386 TAR_OPTIONS=\"-H gnu\"
11387 export TAR_OPTIONS
11388 rm -rf *
11389
11390 # Create directory structure
11391 mkdir dir
11392 mkdir dir/subdir1
11393 mkdir dir/subdir2
11394 genfile --length 10 --file dir/subdir1/file
11395
11396 # Save mtime for later comparison
11397 genfile --stat=mtime dir/subdir1 > ts
11398
11399 # Create an archive. Using incremental mode makes sure the
11400 # archive will have a directory-first member ordering,
11401 # i.e.:
11402 # dir/
11403 # dir/subdir1/
11404 # dir/subdir2/
11405 # dir/subdir1/foofile
11406 #
11407 # When restoring from this directory structure, \`dir/subdir2/' used to
11408 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11409 # \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the
11410 # latter clobbered the directory timestamp.
11411
11412 tar -cf archive -g db dir
11413
11414 # Move away the directory
11415 mv dir orig
11416
11417 # Wait enough time for timestamps to differ in case of failure.
11418 sleep 5
11419
11420 # Restore the directory
11421 tar -xf archive dir
11422
11423 # Check the timestamp
11424 genfile --stat=mtime dir/subdir1 | diff ts -
11425 )"
11426 echo incr02.at:35 >"$at_check_line_file"
11427
11428 at_trace_this=
11429 if test -n "$at_traceon"; then
11430     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
11431 fi
11432
11433 if test -n "$at_trace_this"; then
11434     ( $at_traceon;
11435 mkdir gnu
11436 (cd gnu
11437 TEST_TAR_FORMAT=gnu
11438 export TEST_TAR_FORMAT
11439 TAR_OPTIONS="-H gnu"
11440 export TAR_OPTIONS
11441 rm -rf *
11442
11443 # Create directory structure
11444 mkdir dir
11445 mkdir dir/subdir1
11446 mkdir dir/subdir2
11447 genfile --length 10 --file dir/subdir1/file
11448
11449 # Save mtime for later comparison
11450 genfile --stat=mtime dir/subdir1 > ts
11451
11452 # Create an archive. Using incremental mode makes sure the
11453 # archive will have a directory-first member ordering,
11454 # i.e.:
11455 # dir/
11456 # dir/subdir1/
11457 # dir/subdir2/
11458 # dir/subdir1/foofile
11459 #
11460 # When restoring from this directory structure, `dir/subdir2/' used to
11461 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11462 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
11463 # latter clobbered the directory timestamp.
11464
11465 tar -cf archive -g db dir
11466
11467 # Move away the directory
11468 mv dir orig
11469
11470 # Wait enough time for timestamps to differ in case of failure.
11471 sleep 5
11472
11473 # Restore the directory
11474 tar -xf archive dir
11475
11476 # Check the timestamp
11477 genfile --stat=mtime dir/subdir1 | diff ts -
11478 ) ) >"$at_stdout" 2>"$at_stder1"
11479     at_status=$?
11480     grep '^ *+' "$at_stder1" >&2
11481     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11482 else
11483     ( :;
11484 mkdir gnu
11485 (cd gnu
11486 TEST_TAR_FORMAT=gnu
11487 export TEST_TAR_FORMAT
11488 TAR_OPTIONS="-H gnu"
11489 export TAR_OPTIONS
11490 rm -rf *
11491
11492 # Create directory structure
11493 mkdir dir
11494 mkdir dir/subdir1
11495 mkdir dir/subdir2
11496 genfile --length 10 --file dir/subdir1/file
11497
11498 # Save mtime for later comparison
11499 genfile --stat=mtime dir/subdir1 > ts
11500
11501 # Create an archive. Using incremental mode makes sure the
11502 # archive will have a directory-first member ordering,
11503 # i.e.:
11504 # dir/
11505 # dir/subdir1/
11506 # dir/subdir2/
11507 # dir/subdir1/foofile
11508 #
11509 # When restoring from this directory structure, `dir/subdir2/' used to
11510 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11511 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
11512 # latter clobbered the directory timestamp.
11513
11514 tar -cf archive -g db dir
11515
11516 # Move away the directory
11517 mv dir orig
11518
11519 # Wait enough time for timestamps to differ in case of failure.
11520 sleep 5
11521
11522 # Restore the directory
11523 tar -xf archive dir
11524
11525 # Check the timestamp
11526 genfile --stat=mtime dir/subdir1 | diff ts -
11527 ) ) >"$at_stdout" 2>"$at_stderr"
11528     at_status=$?
11529 fi
11530
11531 at_failed=false
11532 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11533 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
11534 case $at_status in
11535    77) echo 77 > "$at_status_file"; exit 77;;
11536    0) ;;
11537    *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0"
11538       at_failed=:;;
11539 esac
11540 if $at_failed; then
11541
11542
11543   echo 1 > "$at_status_file"
11544   exit 1
11545 fi
11546
11547 $at_traceon
11548 $at_traceoff
11549 echo "$at_srcdir/incr02.at:35:
11550 mkdir oldgnu
11551 (cd oldgnu
11552 TEST_TAR_FORMAT=oldgnu
11553 export TEST_TAR_FORMAT
11554 TAR_OPTIONS=\"-H oldgnu\"
11555 export TAR_OPTIONS
11556 rm -rf *
11557
11558 # Create directory structure
11559 mkdir dir
11560 mkdir dir/subdir1
11561 mkdir dir/subdir2
11562 genfile --length 10 --file dir/subdir1/file
11563
11564 # Save mtime for later comparison
11565 genfile --stat=mtime dir/subdir1 > ts
11566
11567 # Create an archive. Using incremental mode makes sure the
11568 # archive will have a directory-first member ordering,
11569 # i.e.:
11570 # dir/
11571 # dir/subdir1/
11572 # dir/subdir2/
11573 # dir/subdir1/foofile
11574 #
11575 # When restoring from this directory structure, \`dir/subdir2/' used to
11576 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11577 # \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the
11578 # latter clobbered the directory timestamp.
11579
11580 tar -cf archive -g db dir
11581
11582 # Move away the directory
11583 mv dir orig
11584
11585 # Wait enough time for timestamps to differ in case of failure.
11586 sleep 5
11587
11588 # Restore the directory
11589 tar -xf archive dir
11590
11591 # Check the timestamp
11592 genfile --stat=mtime dir/subdir1 | diff ts -
11593 )"
11594 echo incr02.at:35 >"$at_check_line_file"
11595
11596 at_trace_this=
11597 if test -n "$at_traceon"; then
11598     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
11599 fi
11600
11601 if test -n "$at_trace_this"; then
11602     ( $at_traceon;
11603 mkdir oldgnu
11604 (cd oldgnu
11605 TEST_TAR_FORMAT=oldgnu
11606 export TEST_TAR_FORMAT
11607 TAR_OPTIONS="-H oldgnu"
11608 export TAR_OPTIONS
11609 rm -rf *
11610
11611 # Create directory structure
11612 mkdir dir
11613 mkdir dir/subdir1
11614 mkdir dir/subdir2
11615 genfile --length 10 --file dir/subdir1/file
11616
11617 # Save mtime for later comparison
11618 genfile --stat=mtime dir/subdir1 > ts
11619
11620 # Create an archive. Using incremental mode makes sure the
11621 # archive will have a directory-first member ordering,
11622 # i.e.:
11623 # dir/
11624 # dir/subdir1/
11625 # dir/subdir2/
11626 # dir/subdir1/foofile
11627 #
11628 # When restoring from this directory structure, `dir/subdir2/' used to
11629 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11630 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
11631 # latter clobbered the directory timestamp.
11632
11633 tar -cf archive -g db dir
11634
11635 # Move away the directory
11636 mv dir orig
11637
11638 # Wait enough time for timestamps to differ in case of failure.
11639 sleep 5
11640
11641 # Restore the directory
11642 tar -xf archive dir
11643
11644 # Check the timestamp
11645 genfile --stat=mtime dir/subdir1 | diff ts -
11646 ) ) >"$at_stdout" 2>"$at_stder1"
11647     at_status=$?
11648     grep '^ *+' "$at_stder1" >&2
11649     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11650 else
11651     ( :;
11652 mkdir oldgnu
11653 (cd oldgnu
11654 TEST_TAR_FORMAT=oldgnu
11655 export TEST_TAR_FORMAT
11656 TAR_OPTIONS="-H oldgnu"
11657 export TAR_OPTIONS
11658 rm -rf *
11659
11660 # Create directory structure
11661 mkdir dir
11662 mkdir dir/subdir1
11663 mkdir dir/subdir2
11664 genfile --length 10 --file dir/subdir1/file
11665
11666 # Save mtime for later comparison
11667 genfile --stat=mtime dir/subdir1 > ts
11668
11669 # Create an archive. Using incremental mode makes sure the
11670 # archive will have a directory-first member ordering,
11671 # i.e.:
11672 # dir/
11673 # dir/subdir1/
11674 # dir/subdir2/
11675 # dir/subdir1/foofile
11676 #
11677 # When restoring from this directory structure, `dir/subdir2/' used to
11678 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11679 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
11680 # latter clobbered the directory timestamp.
11681
11682 tar -cf archive -g db dir
11683
11684 # Move away the directory
11685 mv dir orig
11686
11687 # Wait enough time for timestamps to differ in case of failure.
11688 sleep 5
11689
11690 # Restore the directory
11691 tar -xf archive dir
11692
11693 # Check the timestamp
11694 genfile --stat=mtime dir/subdir1 | diff ts -
11695 ) ) >"$at_stdout" 2>"$at_stderr"
11696     at_status=$?
11697 fi
11698
11699 at_failed=false
11700 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11701 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
11702 case $at_status in
11703    77) echo 77 > "$at_status_file"; exit 77;;
11704    0) ;;
11705    *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0"
11706       at_failed=:;;
11707 esac
11708 if $at_failed; then
11709
11710
11711   echo 1 > "$at_status_file"
11712   exit 1
11713 fi
11714
11715 $at_traceon
11716 $at_traceoff
11717 echo "$at_srcdir/incr02.at:35:
11718 mkdir posix
11719 (cd posix
11720 TEST_TAR_FORMAT=posix
11721 export TEST_TAR_FORMAT
11722 TAR_OPTIONS=\"-H posix\"
11723 export TAR_OPTIONS
11724 rm -rf *
11725
11726 # Create directory structure
11727 mkdir dir
11728 mkdir dir/subdir1
11729 mkdir dir/subdir2
11730 genfile --length 10 --file dir/subdir1/file
11731
11732 # Save mtime for later comparison
11733 genfile --stat=mtime dir/subdir1 > ts
11734
11735 # Create an archive. Using incremental mode makes sure the
11736 # archive will have a directory-first member ordering,
11737 # i.e.:
11738 # dir/
11739 # dir/subdir1/
11740 # dir/subdir2/
11741 # dir/subdir1/foofile
11742 #
11743 # When restoring from this directory structure, \`dir/subdir2/' used to
11744 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11745 # \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the
11746 # latter clobbered the directory timestamp.
11747
11748 tar -cf archive -g db dir
11749
11750 # Move away the directory
11751 mv dir orig
11752
11753 # Wait enough time for timestamps to differ in case of failure.
11754 sleep 5
11755
11756 # Restore the directory
11757 tar -xf archive dir
11758
11759 # Check the timestamp
11760 genfile --stat=mtime dir/subdir1 | diff ts -
11761 )"
11762 echo incr02.at:35 >"$at_check_line_file"
11763
11764 at_trace_this=
11765 if test -n "$at_traceon"; then
11766     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
11767 fi
11768
11769 if test -n "$at_trace_this"; then
11770     ( $at_traceon;
11771 mkdir posix
11772 (cd posix
11773 TEST_TAR_FORMAT=posix
11774 export TEST_TAR_FORMAT
11775 TAR_OPTIONS="-H posix"
11776 export TAR_OPTIONS
11777 rm -rf *
11778
11779 # Create directory structure
11780 mkdir dir
11781 mkdir dir/subdir1
11782 mkdir dir/subdir2
11783 genfile --length 10 --file dir/subdir1/file
11784
11785 # Save mtime for later comparison
11786 genfile --stat=mtime dir/subdir1 > ts
11787
11788 # Create an archive. Using incremental mode makes sure the
11789 # archive will have a directory-first member ordering,
11790 # i.e.:
11791 # dir/
11792 # dir/subdir1/
11793 # dir/subdir2/
11794 # dir/subdir1/foofile
11795 #
11796 # When restoring from this directory structure, `dir/subdir2/' used to
11797 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11798 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
11799 # latter clobbered the directory timestamp.
11800
11801 tar -cf archive -g db dir
11802
11803 # Move away the directory
11804 mv dir orig
11805
11806 # Wait enough time for timestamps to differ in case of failure.
11807 sleep 5
11808
11809 # Restore the directory
11810 tar -xf archive dir
11811
11812 # Check the timestamp
11813 genfile --stat=mtime dir/subdir1 | diff ts -
11814 ) ) >"$at_stdout" 2>"$at_stder1"
11815     at_status=$?
11816     grep '^ *+' "$at_stder1" >&2
11817     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11818 else
11819     ( :;
11820 mkdir posix
11821 (cd posix
11822 TEST_TAR_FORMAT=posix
11823 export TEST_TAR_FORMAT
11824 TAR_OPTIONS="-H posix"
11825 export TAR_OPTIONS
11826 rm -rf *
11827
11828 # Create directory structure
11829 mkdir dir
11830 mkdir dir/subdir1
11831 mkdir dir/subdir2
11832 genfile --length 10 --file dir/subdir1/file
11833
11834 # Save mtime for later comparison
11835 genfile --stat=mtime dir/subdir1 > ts
11836
11837 # Create an archive. Using incremental mode makes sure the
11838 # archive will have a directory-first member ordering,
11839 # i.e.:
11840 # dir/
11841 # dir/subdir1/
11842 # dir/subdir2/
11843 # dir/subdir1/foofile
11844 #
11845 # When restoring from this directory structure, `dir/subdir2/' used to
11846 # trigger apply_nonancestor_delayed_set_stat() which restored stats for
11847 # `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the
11848 # latter clobbered the directory timestamp.
11849
11850 tar -cf archive -g db dir
11851
11852 # Move away the directory
11853 mv dir orig
11854
11855 # Wait enough time for timestamps to differ in case of failure.
11856 sleep 5
11857
11858 # Restore the directory
11859 tar -xf archive dir
11860
11861 # Check the timestamp
11862 genfile --stat=mtime dir/subdir1 | diff ts -
11863 ) ) >"$at_stdout" 2>"$at_stderr"
11864     at_status=$?
11865 fi
11866
11867 at_failed=false
11868 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
11869 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
11870 case $at_status in
11871    77) echo 77 > "$at_status_file"; exit 77;;
11872    0) ;;
11873    *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0"
11874       at_failed=:;;
11875 esac
11876 if $at_failed; then
11877
11878
11879   echo 1 > "$at_status_file"
11880   exit 1
11881 fi
11882
11883 $at_traceon
11884
11885
11886
11887       $at_traceoff
11888       $at_times_p && times >"$at_times_file"
11889     ) 5>&1 2>&1 | eval $at_tee_pipe
11890     at_status=`cat "$at_status_file"`
11891     ;;
11892
11893   29 ) # 29. listed01.at:26: --listed for individual files
11894     at_setup_line='listed01.at:26'
11895     at_desc="--listed for individual files"
11896     $at_quiet $ECHO_N " 29: --listed for individual files                  $ECHO_C"
11897     at_xfail=no
11898       test -f $XFAILFILE && at_xfail=yes
11899     echo "#                             -*- compilation -*-" >> "$at_group_log"
11900     (
11901       echo "29. listed01.at:26: testing ..."
11902       $at_traceon
11903
11904
11905
11906
11907
11908   $at_traceoff
11909 echo "$at_srcdir/listed01.at:29:
11910 mkdir gnu
11911 (cd gnu
11912 TEST_TAR_FORMAT=gnu
11913 export TEST_TAR_FORMAT
11914 TAR_OPTIONS=\"-H gnu\"
11915 export TAR_OPTIONS
11916 rm -rf *
11917
11918 mkdir directory
11919 genfile --length 10240 --pattern zeros --file directory/file1
11920 # Let the things settle
11921 sleep 1
11922
11923 tar --create \\
11924     --file=archive.1 \\
11925     --listed-incremental=listing \\
11926     directory/file*
11927
11928 tar tf archive.1 || exit 1
11929
11930 sleep 1
11931
11932 genfile --length 10240 --pattern zeros --file directory/file2
11933
11934 echo \"separator\"
11935
11936 tar --create \\
11937     --file=archive.2 \\
11938     --listed-incremental=listing \\
11939     directory/file* || exit 1
11940
11941 tar tf archive.2 || exit 1
11942 )"
11943 echo listed01.at:29 >"$at_check_line_file"
11944
11945 at_trace_this=
11946 if test -n "$at_traceon"; then
11947     echo 'Not enabling shell tracing (command contains an embedded newline)'
11948 fi
11949
11950 if test -n "$at_trace_this"; then
11951     ( $at_traceon;
11952 mkdir gnu
11953 (cd gnu
11954 TEST_TAR_FORMAT=gnu
11955 export TEST_TAR_FORMAT
11956 TAR_OPTIONS="-H gnu"
11957 export TAR_OPTIONS
11958 rm -rf *
11959
11960 mkdir directory
11961 genfile --length 10240 --pattern zeros --file directory/file1
11962 # Let the things settle
11963 sleep 1
11964
11965 tar --create \
11966     --file=archive.1 \
11967     --listed-incremental=listing \
11968     directory/file*
11969
11970 tar tf archive.1 || exit 1
11971
11972 sleep 1
11973
11974 genfile --length 10240 --pattern zeros --file directory/file2
11975
11976 echo "separator"
11977
11978 tar --create \
11979     --file=archive.2 \
11980     --listed-incremental=listing \
11981     directory/file* || exit 1
11982
11983 tar tf archive.2 || exit 1
11984 ) ) >"$at_stdout" 2>"$at_stder1"
11985     at_status=$?
11986     grep '^ *+' "$at_stder1" >&2
11987     grep -v '^ *+' "$at_stder1" >"$at_stderr"
11988 else
11989     ( :;
11990 mkdir gnu
11991 (cd gnu
11992 TEST_TAR_FORMAT=gnu
11993 export TEST_TAR_FORMAT
11994 TAR_OPTIONS="-H gnu"
11995 export TAR_OPTIONS
11996 rm -rf *
11997
11998 mkdir directory
11999 genfile --length 10240 --pattern zeros --file directory/file1
12000 # Let the things settle
12001 sleep 1
12002
12003 tar --create \
12004     --file=archive.1 \
12005     --listed-incremental=listing \
12006     directory/file*
12007
12008 tar tf archive.1 || exit 1
12009
12010 sleep 1
12011
12012 genfile --length 10240 --pattern zeros --file directory/file2
12013
12014 echo "separator"
12015
12016 tar --create \
12017     --file=archive.2 \
12018     --listed-incremental=listing \
12019     directory/file* || exit 1
12020
12021 tar tf archive.2 || exit 1
12022 ) ) >"$at_stdout" 2>"$at_stderr"
12023     at_status=$?
12024 fi
12025
12026 at_failed=false
12027 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
12028 echo >>"$at_stdout"; echo "directory/file1
12029 separator
12030 directory/file2
12031 " | $at_diff - "$at_stdout" || at_failed=:
12032 case $at_status in
12033    77) echo 77 > "$at_status_file"; exit 77;;
12034    0) ;;
12035    *) echo "$at_srcdir/listed01.at:29: exit code was $at_status, expected 0"
12036       at_failed=:;;
12037 esac
12038 if $at_failed; then
12039
12040
12041   echo 1 > "$at_status_file"
12042   exit 1
12043 fi
12044
12045 $at_traceon
12046 $at_traceoff
12047 echo "$at_srcdir/listed01.at:29:
12048 mkdir oldgnu
12049 (cd oldgnu
12050 TEST_TAR_FORMAT=oldgnu
12051 export TEST_TAR_FORMAT
12052 TAR_OPTIONS=\"-H oldgnu\"
12053 export TAR_OPTIONS
12054 rm -rf *
12055
12056 mkdir directory
12057 genfile --length 10240 --pattern zeros --file directory/file1
12058 # Let the things settle
12059 sleep 1
12060
12061 tar --create \\
12062     --file=archive.1 \\
12063     --listed-incremental=listing \\
12064     directory/file*
12065
12066 tar tf archive.1 || exit 1
12067
12068 sleep 1
12069
12070 genfile --length 10240 --pattern zeros --file directory/file2
12071
12072 echo \"separator\"
12073
12074 tar --create \\
12075     --file=archive.2 \\
12076     --listed-incremental=listing \\
12077     directory/file* || exit 1
12078
12079 tar tf archive.2 || exit 1
12080 )"
12081 echo listed01.at:29 >"$at_check_line_file"
12082
12083 at_trace_this=
12084 if test -n "$at_traceon"; then
12085     echo 'Not enabling shell tracing (command contains an embedded newline)'
12086 fi
12087
12088 if test -n "$at_trace_this"; then
12089     ( $at_traceon;
12090 mkdir oldgnu
12091 (cd oldgnu
12092 TEST_TAR_FORMAT=oldgnu
12093 export TEST_TAR_FORMAT
12094 TAR_OPTIONS="-H oldgnu"
12095 export TAR_OPTIONS
12096 rm -rf *
12097
12098 mkdir directory
12099 genfile --length 10240 --pattern zeros --file directory/file1
12100 # Let the things settle
12101 sleep 1
12102
12103 tar --create \
12104     --file=archive.1 \
12105     --listed-incremental=listing \
12106     directory/file*
12107
12108 tar tf archive.1 || exit 1
12109
12110 sleep 1
12111
12112 genfile --length 10240 --pattern zeros --file directory/file2
12113
12114 echo "separator"
12115
12116 tar --create \
12117     --file=archive.2 \
12118     --listed-incremental=listing \
12119     directory/file* || exit 1
12120
12121 tar tf archive.2 || exit 1
12122 ) ) >"$at_stdout" 2>"$at_stder1"
12123     at_status=$?
12124     grep '^ *+' "$at_stder1" >&2
12125     grep -v '^ *+' "$at_stder1" >"$at_stderr"
12126 else
12127     ( :;
12128 mkdir oldgnu
12129 (cd oldgnu
12130 TEST_TAR_FORMAT=oldgnu
12131 export TEST_TAR_FORMAT
12132 TAR_OPTIONS="-H oldgnu"
12133 export TAR_OPTIONS
12134 rm -rf *
12135
12136 mkdir directory
12137 genfile --length 10240 --pattern zeros --file directory/file1
12138 # Let the things settle
12139 sleep 1
12140
12141 tar --create \
12142     --file=archive.1 \
12143     --listed-incremental=listing \
12144     directory/file*
12145
12146 tar tf archive.1 || exit 1
12147
12148 sleep 1
12149
12150 genfile --length 10240 --pattern zeros --file directory/file2
12151
12152 echo "separator"
12153
12154 tar --create \
12155     --file=archive.2 \
12156     --listed-incremental=listing \
12157     directory/file* || exit 1
12158
12159 tar tf archive.2 || exit 1
12160 ) ) >"$at_stdout" 2>"$at_stderr"
12161     at_status=$?
12162 fi
12163
12164 at_failed=false
12165 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
12166 echo >>"$at_stdout"; echo "directory/file1
12167 separator
12168 directory/file2
12169 " | $at_diff - "$at_stdout" || at_failed=:
12170 case $at_status in
12171    77) echo 77 > "$at_status_file"; exit 77;;
12172    0) ;;
12173    *) echo "$at_srcdir/listed01.at:29: exit code was $at_status, expected 0"
12174       at_failed=:;;
12175 esac
12176 if $at_failed; then
12177
12178
12179   echo 1 > "$at_status_file"
12180   exit 1
12181 fi
12182
12183 $at_traceon
12184
12185
12186
12187       $at_traceoff
12188       $at_times_p && times >"$at_times_file"
12189     ) 5>&1 2>&1 | eval $at_tee_pipe
12190     at_status=`cat "$at_status_file"`
12191     ;;
12192
12193   30 ) # 30. listed02.at:28: working --listed
12194     at_setup_line='listed02.at:28'
12195     at_desc="working --listed"
12196     $at_quiet $ECHO_N " 30: working --listed                               $ECHO_C"
12197     at_xfail=no
12198       test -f $XFAILFILE && at_xfail=yes
12199     echo "#                             -*- compilation -*-" >> "$at_group_log"
12200     (
12201       echo "30. listed02.at:28: testing ..."
12202       $at_traceon
12203
12204
12205
12206
12207
12208   $at_traceoff
12209 echo "$at_srcdir/listed02.at:31:
12210 mkdir gnu
12211 (cd gnu
12212 TEST_TAR_FORMAT=gnu
12213 export TEST_TAR_FORMAT
12214 TAR_OPTIONS=\"-H gnu\"
12215 export TAR_OPTIONS
12216 rm -rf *
12217
12218
12219 test -z "`sort < /dev/null 2>&1`" || exit 77
12220
12221 echo Create directories
12222
12223 mkdir tart
12224 sleep 1
12225 mkdir tart/c0
12226 sleep 1
12227 mkdir tart/c1
12228 sleep 1
12229
12230 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12231 do
12232   echo File \$file > \$file
12233   sleep 1
12234 done
12235
12236 sleep 1
12237 echo Creating main archive
12238 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12239
12240 # The above prints two lines to stderr announcing the new directories c0 and c1.
12241 # Ensure that they appear in this script's stderr in sorted order.
12242 sort err 1>&2; rm -f err
12243
12244 sleep 1
12245 echo Modifying filesystem
12246 rm tart/a1
12247
12248 mv tart/b1 tart/b2
12249 mv tart/c1 tart/c2
12250 touch tart/c2/ca3
12251
12252 echo Directory contents
12253 find tart -print | sort 2>/dev/null
12254
12255 sleep 1
12256 echo Creating incremental archive
12257 cp -p tart.incr1 tart.incr2
12258 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12259
12260 sleep 1
12261
12262 rm -rf tart/*
12263 echo Extracting main archive
12264 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12265 echo Extracting incremental archive
12266 # This command should produce three messages about deletion
12267 # of the existing files, that may appear in any order. Piping
12268 # to sort makes sure we don't depend on any particular ordering.
12269 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12270
12271 echo Final files:
12272 find tart -print | sort 2>/dev/null
12273 )"
12274 echo listed02.at:31 >"$at_check_line_file"
12275
12276 at_trace_this=
12277 if test -n "$at_traceon"; then
12278     echo 'Not enabling shell tracing (command contains an embedded newline)'
12279 fi
12280
12281 if test -n "$at_trace_this"; then
12282     ( $at_traceon;
12283 mkdir gnu
12284 (cd gnu
12285 TEST_TAR_FORMAT=gnu
12286 export TEST_TAR_FORMAT
12287 TAR_OPTIONS="-H gnu"
12288 export TAR_OPTIONS
12289 rm -rf *
12290
12291
12292 test -z "`sort < /dev/null 2>&1`" || exit 77
12293
12294 echo Create directories
12295
12296 mkdir tart
12297 sleep 1
12298 mkdir tart/c0
12299 sleep 1
12300 mkdir tart/c1
12301 sleep 1
12302
12303 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12304 do
12305   echo File $file > $file
12306   sleep 1
12307 done
12308
12309 sleep 1
12310 echo Creating main archive
12311 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12312
12313 # The above prints two lines to stderr announcing the new directories c0 and c1.
12314 # Ensure that they appear in this script's stderr in sorted order.
12315 sort err 1>&2; rm -f err
12316
12317 sleep 1
12318 echo Modifying filesystem
12319 rm tart/a1
12320
12321 mv tart/b1 tart/b2
12322 mv tart/c1 tart/c2
12323 touch tart/c2/ca3
12324
12325 echo Directory contents
12326 find tart -print | sort 2>/dev/null
12327
12328 sleep 1
12329 echo Creating incremental archive
12330 cp -p tart.incr1 tart.incr2
12331 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12332
12333 sleep 1
12334
12335 rm -rf tart/*
12336 echo Extracting main archive
12337 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12338 echo Extracting incremental archive
12339 # This command should produce three messages about deletion
12340 # of the existing files, that may appear in any order. Piping
12341 # to sort makes sure we don't depend on any particular ordering.
12342 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12343
12344 echo Final files:
12345 find tart -print | sort 2>/dev/null
12346 ) ) >"$at_stdout" 2>"$at_stder1"
12347     at_status=$?
12348     grep '^ *+' "$at_stder1" >&2
12349     grep -v '^ *+' "$at_stder1" >"$at_stderr"
12350 else
12351     ( :;
12352 mkdir gnu
12353 (cd gnu
12354 TEST_TAR_FORMAT=gnu
12355 export TEST_TAR_FORMAT
12356 TAR_OPTIONS="-H gnu"
12357 export TAR_OPTIONS
12358 rm -rf *
12359
12360
12361 test -z "`sort < /dev/null 2>&1`" || exit 77
12362
12363 echo Create directories
12364
12365 mkdir tart
12366 sleep 1
12367 mkdir tart/c0
12368 sleep 1
12369 mkdir tart/c1
12370 sleep 1
12371
12372 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12373 do
12374   echo File $file > $file
12375   sleep 1
12376 done
12377
12378 sleep 1
12379 echo Creating main archive
12380 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12381
12382 # The above prints two lines to stderr announcing the new directories c0 and c1.
12383 # Ensure that they appear in this script's stderr in sorted order.
12384 sort err 1>&2; rm -f err
12385
12386 sleep 1
12387 echo Modifying filesystem
12388 rm tart/a1
12389
12390 mv tart/b1 tart/b2
12391 mv tart/c1 tart/c2
12392 touch tart/c2/ca3
12393
12394 echo Directory contents
12395 find tart -print | sort 2>/dev/null
12396
12397 sleep 1
12398 echo Creating incremental archive
12399 cp -p tart.incr1 tart.incr2
12400 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12401
12402 sleep 1
12403
12404 rm -rf tart/*
12405 echo Extracting main archive
12406 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12407 echo Extracting incremental archive
12408 # This command should produce three messages about deletion
12409 # of the existing files, that may appear in any order. Piping
12410 # to sort makes sure we don't depend on any particular ordering.
12411 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12412
12413 echo Final files:
12414 find tart -print | sort 2>/dev/null
12415 ) ) >"$at_stdout" 2>"$at_stderr"
12416     at_status=$?
12417 fi
12418
12419 at_failed=false
12420 echo >>"$at_stderr"; echo "tar: tart/c0: Directory is new
12421 tar: tart/c1: Directory is new
12422 tar: tart/c2: Directory has been renamed from \`tart/c1'
12423 " | $at_diff - "$at_stderr" || at_failed=:
12424 echo >>"$at_stdout"; echo "Create directories
12425 Creating main archive
12426 tart/
12427 tart/c0/
12428 tart/c1/
12429 tart/a1
12430 tart/b1
12431 tart/c0/cq1
12432 tart/c0/cq2
12433 tart/c1/ca1
12434 tart/c1/ca2
12435 Modifying filesystem
12436 Directory contents
12437 tart
12438 tart/b2
12439 tart/c0
12440 tart/c0/cq1
12441 tart/c0/cq2
12442 tart/c2
12443 tart/c2/ca1
12444 tart/c2/ca2
12445 tart/c2/ca3
12446 Creating incremental archive
12447 tart/
12448 tart/c0/
12449 tart/c2/
12450 tart/b2
12451 tart/c2/ca3
12452 Extracting main archive
12453 tart/
12454 tart/c0/
12455 tart/c1/
12456 tart/a1
12457 tart/b1
12458 tart/c0/cq1
12459 tart/c0/cq2
12460 tart/c1/ca1
12461 tart/c1/ca2
12462 Extracting incremental archive
12463 tar: Deleting \`tart/a1'
12464 tar: Deleting \`tart/b1'
12465 tart/
12466 tart/b2
12467 tart/c0/
12468 tart/c2/
12469 tart/c2/ca3
12470 Final files:
12471 tart
12472 tart/b2
12473 tart/c0
12474 tart/c0/cq1
12475 tart/c0/cq2
12476 tart/c2
12477 tart/c2/ca1
12478 tart/c2/ca2
12479 tart/c2/ca3
12480 " | $at_diff - "$at_stdout" || at_failed=:
12481 case $at_status in
12482    77) echo 77 > "$at_status_file"; exit 77;;
12483    0) ;;
12484    *) echo "$at_srcdir/listed02.at:31: exit code was $at_status, expected 0"
12485       at_failed=:;;
12486 esac
12487 if $at_failed; then
12488
12489
12490   echo 1 > "$at_status_file"
12491   exit 1
12492 fi
12493
12494 $at_traceon
12495 $at_traceoff
12496 echo "$at_srcdir/listed02.at:31:
12497 mkdir oldgnu
12498 (cd oldgnu
12499 TEST_TAR_FORMAT=oldgnu
12500 export TEST_TAR_FORMAT
12501 TAR_OPTIONS=\"-H oldgnu\"
12502 export TAR_OPTIONS
12503 rm -rf *
12504
12505
12506 test -z "`sort < /dev/null 2>&1`" || exit 77
12507
12508 echo Create directories
12509
12510 mkdir tart
12511 sleep 1
12512 mkdir tart/c0
12513 sleep 1
12514 mkdir tart/c1
12515 sleep 1
12516
12517 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12518 do
12519   echo File \$file > \$file
12520   sleep 1
12521 done
12522
12523 sleep 1
12524 echo Creating main archive
12525 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12526
12527 # The above prints two lines to stderr announcing the new directories c0 and c1.
12528 # Ensure that they appear in this script's stderr in sorted order.
12529 sort err 1>&2; rm -f err
12530
12531 sleep 1
12532 echo Modifying filesystem
12533 rm tart/a1
12534
12535 mv tart/b1 tart/b2
12536 mv tart/c1 tart/c2
12537 touch tart/c2/ca3
12538
12539 echo Directory contents
12540 find tart -print | sort 2>/dev/null
12541
12542 sleep 1
12543 echo Creating incremental archive
12544 cp -p tart.incr1 tart.incr2
12545 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12546
12547 sleep 1
12548
12549 rm -rf tart/*
12550 echo Extracting main archive
12551 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12552 echo Extracting incremental archive
12553 # This command should produce three messages about deletion
12554 # of the existing files, that may appear in any order. Piping
12555 # to sort makes sure we don't depend on any particular ordering.
12556 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12557
12558 echo Final files:
12559 find tart -print | sort 2>/dev/null
12560 )"
12561 echo listed02.at:31 >"$at_check_line_file"
12562
12563 at_trace_this=
12564 if test -n "$at_traceon"; then
12565     echo 'Not enabling shell tracing (command contains an embedded newline)'
12566 fi
12567
12568 if test -n "$at_trace_this"; then
12569     ( $at_traceon;
12570 mkdir oldgnu
12571 (cd oldgnu
12572 TEST_TAR_FORMAT=oldgnu
12573 export TEST_TAR_FORMAT
12574 TAR_OPTIONS="-H oldgnu"
12575 export TAR_OPTIONS
12576 rm -rf *
12577
12578
12579 test -z "`sort < /dev/null 2>&1`" || exit 77
12580
12581 echo Create directories
12582
12583 mkdir tart
12584 sleep 1
12585 mkdir tart/c0
12586 sleep 1
12587 mkdir tart/c1
12588 sleep 1
12589
12590 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12591 do
12592   echo File $file > $file
12593   sleep 1
12594 done
12595
12596 sleep 1
12597 echo Creating main archive
12598 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12599
12600 # The above prints two lines to stderr announcing the new directories c0 and c1.
12601 # Ensure that they appear in this script's stderr in sorted order.
12602 sort err 1>&2; rm -f err
12603
12604 sleep 1
12605 echo Modifying filesystem
12606 rm tart/a1
12607
12608 mv tart/b1 tart/b2
12609 mv tart/c1 tart/c2
12610 touch tart/c2/ca3
12611
12612 echo Directory contents
12613 find tart -print | sort 2>/dev/null
12614
12615 sleep 1
12616 echo Creating incremental archive
12617 cp -p tart.incr1 tart.incr2
12618 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12619
12620 sleep 1
12621
12622 rm -rf tart/*
12623 echo Extracting main archive
12624 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12625 echo Extracting incremental archive
12626 # This command should produce three messages about deletion
12627 # of the existing files, that may appear in any order. Piping
12628 # to sort makes sure we don't depend on any particular ordering.
12629 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12630
12631 echo Final files:
12632 find tart -print | sort 2>/dev/null
12633 ) ) >"$at_stdout" 2>"$at_stder1"
12634     at_status=$?
12635     grep '^ *+' "$at_stder1" >&2
12636     grep -v '^ *+' "$at_stder1" >"$at_stderr"
12637 else
12638     ( :;
12639 mkdir oldgnu
12640 (cd oldgnu
12641 TEST_TAR_FORMAT=oldgnu
12642 export TEST_TAR_FORMAT
12643 TAR_OPTIONS="-H oldgnu"
12644 export TAR_OPTIONS
12645 rm -rf *
12646
12647
12648 test -z "`sort < /dev/null 2>&1`" || exit 77
12649
12650 echo Create directories
12651
12652 mkdir tart
12653 sleep 1
12654 mkdir tart/c0
12655 sleep 1
12656 mkdir tart/c1
12657 sleep 1
12658
12659 for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
12660 do
12661   echo File $file > $file
12662   sleep 1
12663 done
12664
12665 sleep 1
12666 echo Creating main archive
12667 tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1
12668
12669 # The above prints two lines to stderr announcing the new directories c0 and c1.
12670 # Ensure that they appear in this script's stderr in sorted order.
12671 sort err 1>&2; rm -f err
12672
12673 sleep 1
12674 echo Modifying filesystem
12675 rm tart/a1
12676
12677 mv tart/b1 tart/b2
12678 mv tart/c1 tart/c2
12679 touch tart/c2/ca3
12680
12681 echo Directory contents
12682 find tart -print | sort 2>/dev/null
12683
12684 sleep 1
12685 echo Creating incremental archive
12686 cp -p tart.incr1 tart.incr2
12687 tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1
12688
12689 sleep 1
12690
12691 rm -rf tart/*
12692 echo Extracting main archive
12693 tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
12694 echo Extracting incremental archive
12695 # This command should produce three messages about deletion
12696 # of the existing files, that may appear in any order. Piping
12697 # to sort makes sure we don't depend on any particular ordering.
12698 tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null
12699
12700 echo Final files:
12701 find tart -print | sort 2>/dev/null
12702 ) ) >"$at_stdout" 2>"$at_stderr"
12703     at_status=$?
12704 fi
12705
12706 at_failed=false
12707 echo >>"$at_stderr"; echo "tar: tart/c0: Directory is new
12708 tar: tart/c1: Directory is new
12709 tar: tart/c2: Directory has been renamed from \`tart/c1'
12710 " | $at_diff - "$at_stderr" || at_failed=:
12711 echo >>"$at_stdout"; echo "Create directories
12712 Creating main archive
12713 tart/
12714 tart/c0/
12715 tart/c1/
12716 tart/a1
12717 tart/b1
12718 tart/c0/cq1
12719 tart/c0/cq2
12720 tart/c1/ca1
12721 tart/c1/ca2
12722 Modifying filesystem
12723 Directory contents
12724 tart
12725 tart/b2
12726 tart/c0
12727 tart/c0/cq1
12728 tart/c0/cq2
12729 tart/c2
12730 tart/c2/ca1
12731 tart/c2/ca2
12732 tart/c2/ca3
12733 Creating incremental archive
12734 tart/
12735 tart/c0/
12736 tart/c2/
12737 tart/b2
12738 tart/c2/ca3
12739 Extracting main archive
12740 tart/
12741 tart/c0/
12742 tart/c1/
12743 tart/a1
12744 tart/b1
12745 tart/c0/cq1
12746 tart/c0/cq2
12747 tart/c1/ca1
12748 tart/c1/ca2
12749 Extracting incremental archive
12750 tar: Deleting \`tart/a1'
12751 tar: Deleting \`tart/b1'
12752 tart/
12753 tart/b2
12754 tart/c0/
12755 tart/c2/
12756 tart/c2/ca3
12757 Final files:
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 " | $at_diff - "$at_stdout" || at_failed=:
12768 case $at_status in
12769    77) echo 77 > "$at_status_file"; exit 77;;
12770    0) ;;
12771    *) echo "$at_srcdir/listed02.at:31: exit code was $at_status, expected 0"
12772       at_failed=:;;
12773 esac
12774 if $at_failed; then
12775
12776
12777   echo 1 > "$at_status_file"
12778   exit 1
12779 fi
12780
12781 $at_traceon
12782
12783
12784
12785       $at_traceoff
12786       $at_times_p && times >"$at_times_file"
12787     ) 5>&1 2>&1 | eval $at_tee_pipe
12788     at_status=`cat "$at_status_file"`
12789     ;;
12790
12791   31 ) # 31. incr03.at:28: renamed files in incrementals
12792     at_setup_line='incr03.at:28'
12793     at_desc="renamed files in incrementals"
12794     $at_quiet $ECHO_N " 31: renamed files in incrementals                  $ECHO_C"
12795     at_xfail=no
12796       test -f $XFAILFILE && at_xfail=yes
12797     echo "#                             -*- compilation -*-" >> "$at_group_log"
12798     (
12799       echo "31. incr03.at:28: testing ..."
12800       $at_traceon
12801
12802
12803
12804
12805
12806   $at_traceoff
12807 echo "$at_srcdir/incr03.at:31:
12808 mkdir gnu
12809 (cd gnu
12810 TEST_TAR_FORMAT=gnu
12811 export TEST_TAR_FORMAT
12812 TAR_OPTIONS=\"-H gnu\"
12813 export TAR_OPTIONS
12814 rm -rf *
12815
12816
12817 test -z "`sort < /dev/null 2>&1`" || exit 77
12818
12819 mkdir directory
12820 genfile --file=directory/x
12821 genfile --file=directory/y
12822
12823 sleep 1
12824
12825 tar -cf archive.1 -g db directory
12826
12827 mv directory/x directory/z
12828 tar -cf archive.2 -g db directory
12829
12830 mv directory orig
12831
12832 echo Listing of archive.1
12833 tar -tf archive.1 | sort
12834 echo Listing of archive.2
12835 tar -tf archive.2 | sort
12836
12837 echo Directory after first restore
12838 tar -xf archive.1 -g db
12839 find directory | sort
12840
12841 echo Directory after second restore
12842 tar -xf archive.2 -g db
12843 find directory | sort
12844 )"
12845 echo incr03.at:31 >"$at_check_line_file"
12846
12847 at_trace_this=
12848 if test -n "$at_traceon"; then
12849     echo 'Not enabling shell tracing (command contains an embedded newline)'
12850 fi
12851
12852 if test -n "$at_trace_this"; then
12853     ( $at_traceon;
12854 mkdir gnu
12855 (cd gnu
12856 TEST_TAR_FORMAT=gnu
12857 export TEST_TAR_FORMAT
12858 TAR_OPTIONS="-H gnu"
12859 export TAR_OPTIONS
12860 rm -rf *
12861
12862
12863 test -z "`sort < /dev/null 2>&1`" || exit 77
12864
12865 mkdir directory
12866 genfile --file=directory/x
12867 genfile --file=directory/y
12868
12869 sleep 1
12870
12871 tar -cf archive.1 -g db directory
12872
12873 mv directory/x directory/z
12874 tar -cf archive.2 -g db directory
12875
12876 mv directory orig
12877
12878 echo Listing of archive.1
12879 tar -tf archive.1 | sort
12880 echo Listing of archive.2
12881 tar -tf archive.2 | sort
12882
12883 echo Directory after first restore
12884 tar -xf archive.1 -g db
12885 find directory | sort
12886
12887 echo Directory after second restore
12888 tar -xf archive.2 -g db
12889 find directory | sort
12890 ) ) >"$at_stdout" 2>"$at_stder1"
12891     at_status=$?
12892     grep '^ *+' "$at_stder1" >&2
12893     grep -v '^ *+' "$at_stder1" >"$at_stderr"
12894 else
12895     ( :;
12896 mkdir gnu
12897 (cd gnu
12898 TEST_TAR_FORMAT=gnu
12899 export TEST_TAR_FORMAT
12900 TAR_OPTIONS="-H gnu"
12901 export TAR_OPTIONS
12902 rm -rf *
12903
12904
12905 test -z "`sort < /dev/null 2>&1`" || exit 77
12906
12907 mkdir directory
12908 genfile --file=directory/x
12909 genfile --file=directory/y
12910
12911 sleep 1
12912
12913 tar -cf archive.1 -g db directory
12914
12915 mv directory/x directory/z
12916 tar -cf archive.2 -g db directory
12917
12918 mv directory orig
12919
12920 echo Listing of archive.1
12921 tar -tf archive.1 | sort
12922 echo Listing of archive.2
12923 tar -tf archive.2 | sort
12924
12925 echo Directory after first restore
12926 tar -xf archive.1 -g db
12927 find directory | sort
12928
12929 echo Directory after second restore
12930 tar -xf archive.2 -g db
12931 find directory | sort
12932 ) ) >"$at_stdout" 2>"$at_stderr"
12933     at_status=$?
12934 fi
12935
12936 at_failed=false
12937 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
12938 echo >>"$at_stdout"; echo "Listing of archive.1
12939 directory/
12940 directory/x
12941 directory/y
12942 Listing of archive.2
12943 directory/
12944 directory/z
12945 Directory after first restore
12946 directory
12947 directory/x
12948 directory/y
12949 Directory after second restore
12950 directory
12951 directory/y
12952 directory/z
12953 " | $at_diff - "$at_stdout" || at_failed=:
12954 case $at_status in
12955    77) echo 77 > "$at_status_file"; exit 77;;
12956    0) ;;
12957    *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0"
12958       at_failed=:;;
12959 esac
12960 if $at_failed; then
12961
12962
12963   echo 1 > "$at_status_file"
12964   exit 1
12965 fi
12966
12967 $at_traceon
12968 $at_traceoff
12969 echo "$at_srcdir/incr03.at:31:
12970 mkdir oldgnu
12971 (cd oldgnu
12972 TEST_TAR_FORMAT=oldgnu
12973 export TEST_TAR_FORMAT
12974 TAR_OPTIONS=\"-H oldgnu\"
12975 export TAR_OPTIONS
12976 rm -rf *
12977
12978
12979 test -z "`sort < /dev/null 2>&1`" || exit 77
12980
12981 mkdir directory
12982 genfile --file=directory/x
12983 genfile --file=directory/y
12984
12985 sleep 1
12986
12987 tar -cf archive.1 -g db directory
12988
12989 mv directory/x directory/z
12990 tar -cf archive.2 -g db directory
12991
12992 mv directory orig
12993
12994 echo Listing of archive.1
12995 tar -tf archive.1 | sort
12996 echo Listing of archive.2
12997 tar -tf archive.2 | sort
12998
12999 echo Directory after first restore
13000 tar -xf archive.1 -g db
13001 find directory | sort
13002
13003 echo Directory after second restore
13004 tar -xf archive.2 -g db
13005 find directory | sort
13006 )"
13007 echo incr03.at:31 >"$at_check_line_file"
13008
13009 at_trace_this=
13010 if test -n "$at_traceon"; then
13011     echo 'Not enabling shell tracing (command contains an embedded newline)'
13012 fi
13013
13014 if test -n "$at_trace_this"; then
13015     ( $at_traceon;
13016 mkdir oldgnu
13017 (cd oldgnu
13018 TEST_TAR_FORMAT=oldgnu
13019 export TEST_TAR_FORMAT
13020 TAR_OPTIONS="-H oldgnu"
13021 export TAR_OPTIONS
13022 rm -rf *
13023
13024
13025 test -z "`sort < /dev/null 2>&1`" || exit 77
13026
13027 mkdir directory
13028 genfile --file=directory/x
13029 genfile --file=directory/y
13030
13031 sleep 1
13032
13033 tar -cf archive.1 -g db directory
13034
13035 mv directory/x directory/z
13036 tar -cf archive.2 -g db directory
13037
13038 mv directory orig
13039
13040 echo Listing of archive.1
13041 tar -tf archive.1 | sort
13042 echo Listing of archive.2
13043 tar -tf archive.2 | sort
13044
13045 echo Directory after first restore
13046 tar -xf archive.1 -g db
13047 find directory | sort
13048
13049 echo Directory after second restore
13050 tar -xf archive.2 -g db
13051 find directory | sort
13052 ) ) >"$at_stdout" 2>"$at_stder1"
13053     at_status=$?
13054     grep '^ *+' "$at_stder1" >&2
13055     grep -v '^ *+' "$at_stder1" >"$at_stderr"
13056 else
13057     ( :;
13058 mkdir oldgnu
13059 (cd oldgnu
13060 TEST_TAR_FORMAT=oldgnu
13061 export TEST_TAR_FORMAT
13062 TAR_OPTIONS="-H oldgnu"
13063 export TAR_OPTIONS
13064 rm -rf *
13065
13066
13067 test -z "`sort < /dev/null 2>&1`" || exit 77
13068
13069 mkdir directory
13070 genfile --file=directory/x
13071 genfile --file=directory/y
13072
13073 sleep 1
13074
13075 tar -cf archive.1 -g db directory
13076
13077 mv directory/x directory/z
13078 tar -cf archive.2 -g db directory
13079
13080 mv directory orig
13081
13082 echo Listing of archive.1
13083 tar -tf archive.1 | sort
13084 echo Listing of archive.2
13085 tar -tf archive.2 | sort
13086
13087 echo Directory after first restore
13088 tar -xf archive.1 -g db
13089 find directory | sort
13090
13091 echo Directory after second restore
13092 tar -xf archive.2 -g db
13093 find directory | sort
13094 ) ) >"$at_stdout" 2>"$at_stderr"
13095     at_status=$?
13096 fi
13097
13098 at_failed=false
13099 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
13100 echo >>"$at_stdout"; echo "Listing of archive.1
13101 directory/
13102 directory/x
13103 directory/y
13104 Listing of archive.2
13105 directory/
13106 directory/z
13107 Directory after first restore
13108 directory
13109 directory/x
13110 directory/y
13111 Directory after second restore
13112 directory
13113 directory/y
13114 directory/z
13115 " | $at_diff - "$at_stdout" || at_failed=:
13116 case $at_status in
13117    77) echo 77 > "$at_status_file"; exit 77;;
13118    0) ;;
13119    *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0"
13120       at_failed=:;;
13121 esac
13122 if $at_failed; then
13123
13124
13125   echo 1 > "$at_status_file"
13126   exit 1
13127 fi
13128
13129 $at_traceon
13130 $at_traceoff
13131 echo "$at_srcdir/incr03.at:31:
13132 mkdir posix
13133 (cd posix
13134 TEST_TAR_FORMAT=posix
13135 export TEST_TAR_FORMAT
13136 TAR_OPTIONS=\"-H posix\"
13137 export TAR_OPTIONS
13138 rm -rf *
13139
13140
13141 test -z "`sort < /dev/null 2>&1`" || exit 77
13142
13143 mkdir directory
13144 genfile --file=directory/x
13145 genfile --file=directory/y
13146
13147 sleep 1
13148
13149 tar -cf archive.1 -g db directory
13150
13151 mv directory/x directory/z
13152 tar -cf archive.2 -g db directory
13153
13154 mv directory orig
13155
13156 echo Listing of archive.1
13157 tar -tf archive.1 | sort
13158 echo Listing of archive.2
13159 tar -tf archive.2 | sort
13160
13161 echo Directory after first restore
13162 tar -xf archive.1 -g db
13163 find directory | sort
13164
13165 echo Directory after second restore
13166 tar -xf archive.2 -g db
13167 find directory | sort
13168 )"
13169 echo incr03.at:31 >"$at_check_line_file"
13170
13171 at_trace_this=
13172 if test -n "$at_traceon"; then
13173     echo 'Not enabling shell tracing (command contains an embedded newline)'
13174 fi
13175
13176 if test -n "$at_trace_this"; then
13177     ( $at_traceon;
13178 mkdir posix
13179 (cd posix
13180 TEST_TAR_FORMAT=posix
13181 export TEST_TAR_FORMAT
13182 TAR_OPTIONS="-H posix"
13183 export TAR_OPTIONS
13184 rm -rf *
13185
13186
13187 test -z "`sort < /dev/null 2>&1`" || exit 77
13188
13189 mkdir directory
13190 genfile --file=directory/x
13191 genfile --file=directory/y
13192
13193 sleep 1
13194
13195 tar -cf archive.1 -g db directory
13196
13197 mv directory/x directory/z
13198 tar -cf archive.2 -g db directory
13199
13200 mv directory orig
13201
13202 echo Listing of archive.1
13203 tar -tf archive.1 | sort
13204 echo Listing of archive.2
13205 tar -tf archive.2 | sort
13206
13207 echo Directory after first restore
13208 tar -xf archive.1 -g db
13209 find directory | sort
13210
13211 echo Directory after second restore
13212 tar -xf archive.2 -g db
13213 find directory | sort
13214 ) ) >"$at_stdout" 2>"$at_stder1"
13215     at_status=$?
13216     grep '^ *+' "$at_stder1" >&2
13217     grep -v '^ *+' "$at_stder1" >"$at_stderr"
13218 else
13219     ( :;
13220 mkdir posix
13221 (cd posix
13222 TEST_TAR_FORMAT=posix
13223 export TEST_TAR_FORMAT
13224 TAR_OPTIONS="-H posix"
13225 export TAR_OPTIONS
13226 rm -rf *
13227
13228
13229 test -z "`sort < /dev/null 2>&1`" || exit 77
13230
13231 mkdir directory
13232 genfile --file=directory/x
13233 genfile --file=directory/y
13234
13235 sleep 1
13236
13237 tar -cf archive.1 -g db directory
13238
13239 mv directory/x directory/z
13240 tar -cf archive.2 -g db directory
13241
13242 mv directory orig
13243
13244 echo Listing of archive.1
13245 tar -tf archive.1 | sort
13246 echo Listing of archive.2
13247 tar -tf archive.2 | sort
13248
13249 echo Directory after first restore
13250 tar -xf archive.1 -g db
13251 find directory | sort
13252
13253 echo Directory after second restore
13254 tar -xf archive.2 -g db
13255 find directory | sort
13256 ) ) >"$at_stdout" 2>"$at_stderr"
13257     at_status=$?
13258 fi
13259
13260 at_failed=false
13261 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
13262 echo >>"$at_stdout"; echo "Listing of archive.1
13263 directory/
13264 directory/x
13265 directory/y
13266 Listing of archive.2
13267 directory/
13268 directory/z
13269 Directory after first restore
13270 directory
13271 directory/x
13272 directory/y
13273 Directory after second restore
13274 directory
13275 directory/y
13276 directory/z
13277 " | $at_diff - "$at_stdout" || at_failed=:
13278 case $at_status in
13279    77) echo 77 > "$at_status_file"; exit 77;;
13280    0) ;;
13281    *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0"
13282       at_failed=:;;
13283 esac
13284 if $at_failed; then
13285
13286
13287   echo 1 > "$at_status_file"
13288   exit 1
13289 fi
13290
13291 $at_traceon
13292
13293
13294
13295       $at_traceoff
13296       $at_times_p && times >"$at_times_file"
13297     ) 5>&1 2>&1 | eval $at_tee_pipe
13298     at_status=`cat "$at_status_file"`
13299     ;;
13300
13301   32 ) # 32. incr04.at:29: proper icontents initialization
13302     at_setup_line='incr04.at:29'
13303     at_desc="proper icontents initialization"
13304     $at_quiet $ECHO_N " 32: proper icontents initialization                $ECHO_C"
13305     at_xfail=no
13306       test -f $XFAILFILE && at_xfail=yes
13307     echo "#                             -*- compilation -*-" >> "$at_group_log"
13308     (
13309       echo "32. incr04.at:29: testing ..."
13310       $at_traceon
13311
13312
13313
13314
13315
13316
13317
13318   $at_traceoff
13319 echo "$at_srcdir/incr04.at:34:
13320 mkdir gnu
13321 (cd gnu
13322 TEST_TAR_FORMAT=gnu
13323 export TEST_TAR_FORMAT
13324 TAR_OPTIONS=\"-H gnu\"
13325 export TAR_OPTIONS
13326 rm -rf *
13327
13328
13329 install-sh -d a/b >/dev/null  || exit 77
13330 awk 'BEGIN {
13331   for (i=1;i<=142;i++)
13332     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
13333   }' < /dev/null | genfile --files-from -
13334
13335 sleep 1
13336
13337 echo \"Initial dump\"
13338 tar cvf a0.tar -g a.sna a
13339 mv a/b a/c
13340 echo \"Incremental dump\"
13341 tar cvf a1.tar -g a.sna a
13342 )"
13343 echo incr04.at:34 >"$at_check_line_file"
13344
13345 at_trace_this=
13346 if test -n "$at_traceon"; then
13347     echo 'Not enabling shell tracing (command contains an embedded newline)'
13348 fi
13349
13350 if test -n "$at_trace_this"; then
13351     ( $at_traceon;
13352 mkdir gnu
13353 (cd gnu
13354 TEST_TAR_FORMAT=gnu
13355 export TEST_TAR_FORMAT
13356 TAR_OPTIONS="-H gnu"
13357 export TAR_OPTIONS
13358 rm -rf *
13359
13360
13361 install-sh -d a/b >/dev/null  || exit 77
13362 awk 'BEGIN {
13363   for (i=1;i<=142;i++)
13364     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
13365   }' < /dev/null | genfile --files-from -
13366
13367 sleep 1
13368
13369 echo "Initial dump"
13370 tar cvf a0.tar -g a.sna a
13371 mv a/b a/c
13372 echo "Incremental dump"
13373 tar cvf a1.tar -g a.sna a
13374 ) ) >"$at_stdout" 2>"$at_stder1"
13375     at_status=$?
13376     grep '^ *+' "$at_stder1" >&2
13377     grep -v '^ *+' "$at_stder1" >"$at_stderr"
13378 else
13379     ( :;
13380 mkdir gnu
13381 (cd gnu
13382 TEST_TAR_FORMAT=gnu
13383 export TEST_TAR_FORMAT
13384 TAR_OPTIONS="-H gnu"
13385 export TAR_OPTIONS
13386 rm -rf *
13387
13388
13389 install-sh -d a/b >/dev/null  || exit 77
13390 awk 'BEGIN {
13391   for (i=1;i<=142;i++)
13392     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
13393   }' < /dev/null | genfile --files-from -
13394
13395 sleep 1
13396
13397 echo "Initial dump"
13398 tar cvf a0.tar -g a.sna a
13399 mv a/b a/c
13400 echo "Incremental dump"
13401 tar cvf a1.tar -g a.sna a
13402 ) ) >"$at_stdout" 2>"$at_stderr"
13403     at_status=$?
13404 fi
13405
13406 at_failed=false
13407 echo >>"$at_stderr"; echo "tar: a/b: Directory is new
13408 tar: a/c: Directory has been renamed from \`a/b'
13409 " | $at_diff - "$at_stderr" || at_failed=:
13410 echo >>"$at_stdout"; echo "Initial dump
13411 a/
13412 a/b/
13413 a/b/one_31_chars_long_file_name_001
13414 a/b/one_31_chars_long_file_name_002
13415 a/b/one_31_chars_long_file_name_003
13416 a/b/one_31_chars_long_file_name_004
13417 a/b/one_31_chars_long_file_name_005
13418 a/b/one_31_chars_long_file_name_006
13419 a/b/one_31_chars_long_file_name_007
13420 a/b/one_31_chars_long_file_name_008
13421 a/b/one_31_chars_long_file_name_009
13422 a/b/one_31_chars_long_file_name_010
13423 a/b/one_31_chars_long_file_name_011
13424 a/b/one_31_chars_long_file_name_012
13425 a/b/one_31_chars_long_file_name_013
13426 a/b/one_31_chars_long_file_name_014
13427 a/b/one_31_chars_long_file_name_015
13428 a/b/one_31_chars_long_file_name_016
13429 a/b/one_31_chars_long_file_name_017
13430 a/b/one_31_chars_long_file_name_018
13431 a/b/one_31_chars_long_file_name_019
13432 a/b/one_31_chars_long_file_name_020
13433 a/b/one_31_chars_long_file_name_021
13434 a/b/one_31_chars_long_file_name_022
13435 a/b/one_31_chars_long_file_name_023
13436 a/b/one_31_chars_long_file_name_024
13437 a/b/one_31_chars_long_file_name_025
13438 a/b/one_31_chars_long_file_name_026
13439 a/b/one_31_chars_long_file_name_027
13440 a/b/one_31_chars_long_file_name_028
13441 a/b/one_31_chars_long_file_name_029
13442 a/b/one_31_chars_long_file_name_030
13443 a/b/one_31_chars_long_file_name_031
13444 a/b/one_31_chars_long_file_name_032
13445 a/b/one_31_chars_long_file_name_033
13446 a/b/one_31_chars_long_file_name_034
13447 a/b/one_31_chars_long_file_name_035
13448 a/b/one_31_chars_long_file_name_036
13449 a/b/one_31_chars_long_file_name_037
13450 a/b/one_31_chars_long_file_name_038
13451 a/b/one_31_chars_long_file_name_039
13452 a/b/one_31_chars_long_file_name_040
13453 a/b/one_31_chars_long_file_name_041
13454 a/b/one_31_chars_long_file_name_042
13455 a/b/one_31_chars_long_file_name_043
13456 a/b/one_31_chars_long_file_name_044
13457 a/b/one_31_chars_long_file_name_045
13458 a/b/one_31_chars_long_file_name_046
13459 a/b/one_31_chars_long_file_name_047
13460 a/b/one_31_chars_long_file_name_048
13461 a/b/one_31_chars_long_file_name_049
13462 a/b/one_31_chars_long_file_name_050
13463 a/b/one_31_chars_long_file_name_051
13464 a/b/one_31_chars_long_file_name_052
13465 a/b/one_31_chars_long_file_name_053
13466 a/b/one_31_chars_long_file_name_054
13467 a/b/one_31_chars_long_file_name_055
13468 a/b/one_31_chars_long_file_name_056
13469 a/b/one_31_chars_long_file_name_057
13470 a/b/one_31_chars_long_file_name_058
13471 a/b/one_31_chars_long_file_name_059
13472 a/b/one_31_chars_long_file_name_060
13473 a/b/one_31_chars_long_file_name_061
13474 a/b/one_31_chars_long_file_name_062
13475 a/b/one_31_chars_long_file_name_063
13476 a/b/one_31_chars_long_file_name_064
13477 a/b/one_31_chars_long_file_name_065
13478 a/b/one_31_chars_long_file_name_066
13479 a/b/one_31_chars_long_file_name_067
13480 a/b/one_31_chars_long_file_name_068
13481 a/b/one_31_chars_long_file_name_069
13482 a/b/one_31_chars_long_file_name_070
13483 a/b/one_31_chars_long_file_name_071
13484 a/b/one_31_chars_long_file_name_072
13485 a/b/one_31_chars_long_file_name_073
13486 a/b/one_31_chars_long_file_name_074
13487 a/b/one_31_chars_long_file_name_075
13488 a/b/one_31_chars_long_file_name_076
13489 a/b/one_31_chars_long_file_name_077
13490 a/b/one_31_chars_long_file_name_078
13491 a/b/one_31_chars_long_file_name_079
13492 a/b/one_31_chars_long_file_name_080
13493 a/b/one_31_chars_long_file_name_081
13494 a/b/one_31_chars_long_file_name_082
13495 a/b/one_31_chars_long_file_name_083
13496 a/b/one_31_chars_long_file_name_084
13497 a/b/one_31_chars_long_file_name_085
13498 a/b/one_31_chars_long_file_name_086
13499 a/b/one_31_chars_long_file_name_087
13500 a/b/one_31_chars_long_file_name_088
13501 a/b/one_31_chars_long_file_name_089
13502 a/b/one_31_chars_long_file_name_090
13503 a/b/one_31_chars_long_file_name_091
13504 a/b/one_31_chars_long_file_name_092
13505 a/b/one_31_chars_long_file_name_093
13506 a/b/one_31_chars_long_file_name_094
13507 a/b/one_31_chars_long_file_name_095
13508 a/b/one_31_chars_long_file_name_096
13509 a/b/one_31_chars_long_file_name_097
13510 a/b/one_31_chars_long_file_name_098
13511 a/b/one_31_chars_long_file_name_099
13512 a/b/one_31_chars_long_file_name_100
13513 a/b/one_31_chars_long_file_name_101
13514 a/b/one_31_chars_long_file_name_102
13515 a/b/one_31_chars_long_file_name_103
13516 a/b/one_31_chars_long_file_name_104
13517 a/b/one_31_chars_long_file_name_105
13518 a/b/one_31_chars_long_file_name_106
13519 a/b/one_31_chars_long_file_name_107
13520 a/b/one_31_chars_long_file_name_108
13521 a/b/one_31_chars_long_file_name_109
13522 a/b/one_31_chars_long_file_name_110
13523 a/b/one_31_chars_long_file_name_111
13524 a/b/one_31_chars_long_file_name_112
13525 a/b/one_31_chars_long_file_name_113
13526 a/b/one_31_chars_long_file_name_114
13527 a/b/one_31_chars_long_file_name_115
13528 a/b/one_31_chars_long_file_name_116
13529 a/b/one_31_chars_long_file_name_117
13530 a/b/one_31_chars_long_file_name_118
13531 a/b/one_31_chars_long_file_name_119
13532 a/b/one_31_chars_long_file_name_120
13533 a/b/one_31_chars_long_file_name_121
13534 a/b/one_31_chars_long_file_name_122
13535 a/b/one_31_chars_long_file_name_123
13536 a/b/one_31_chars_long_file_name_124
13537 a/b/one_31_chars_long_file_name_125
13538 a/b/one_31_chars_long_file_name_126
13539 a/b/one_31_chars_long_file_name_127
13540 a/b/one_31_chars_long_file_name_128
13541 a/b/one_31_chars_long_file_name_129
13542 a/b/one_31_chars_long_file_name_130
13543 a/b/one_31_chars_long_file_name_131
13544 a/b/one_31_chars_long_file_name_132
13545 a/b/one_31_chars_long_file_name_133
13546 a/b/one_31_chars_long_file_name_134
13547 a/b/one_31_chars_long_file_name_135
13548 a/b/one_31_chars_long_file_name_136
13549 a/b/one_31_chars_long_file_name_137
13550 a/b/one_31_chars_long_file_name_138
13551 a/b/one_31_chars_long_file_name_139
13552 a/b/one_31_chars_long_file_name_140
13553 a/b/one_31_chars_long_file_name_141
13554 a/b/one_31_chars_long_file_name_142
13555 Incremental dump
13556 a/
13557 a/c/
13558 " | $at_diff - "$at_stdout" || at_failed=:
13559 case $at_status in
13560    77) echo 77 > "$at_status_file"; exit 77;;
13561    0) ;;
13562    *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0"
13563       at_failed=:;;
13564 esac
13565 if $at_failed; then
13566
13567
13568   echo 1 > "$at_status_file"
13569   exit 1
13570 fi
13571
13572 $at_traceon
13573 $at_traceoff
13574 echo "$at_srcdir/incr04.at:34:
13575 mkdir oldgnu
13576 (cd oldgnu
13577 TEST_TAR_FORMAT=oldgnu
13578 export TEST_TAR_FORMAT
13579 TAR_OPTIONS=\"-H oldgnu\"
13580 export TAR_OPTIONS
13581 rm -rf *
13582
13583
13584 install-sh -d a/b >/dev/null  || exit 77
13585 awk 'BEGIN {
13586   for (i=1;i<=142;i++)
13587     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
13588   }' < /dev/null | genfile --files-from -
13589
13590 sleep 1
13591
13592 echo \"Initial dump\"
13593 tar cvf a0.tar -g a.sna a
13594 mv a/b a/c
13595 echo \"Incremental dump\"
13596 tar cvf a1.tar -g a.sna a
13597 )"
13598 echo incr04.at:34 >"$at_check_line_file"
13599
13600 at_trace_this=
13601 if test -n "$at_traceon"; then
13602     echo 'Not enabling shell tracing (command contains an embedded newline)'
13603 fi
13604
13605 if test -n "$at_trace_this"; then
13606     ( $at_traceon;
13607 mkdir oldgnu
13608 (cd oldgnu
13609 TEST_TAR_FORMAT=oldgnu
13610 export TEST_TAR_FORMAT
13611 TAR_OPTIONS="-H oldgnu"
13612 export TAR_OPTIONS
13613 rm -rf *
13614
13615
13616 install-sh -d a/b >/dev/null  || exit 77
13617 awk 'BEGIN {
13618   for (i=1;i<=142;i++)
13619     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
13620   }' < /dev/null | genfile --files-from -
13621
13622 sleep 1
13623
13624 echo "Initial dump"
13625 tar cvf a0.tar -g a.sna a
13626 mv a/b a/c
13627 echo "Incremental dump"
13628 tar cvf a1.tar -g a.sna a
13629 ) ) >"$at_stdout" 2>"$at_stder1"
13630     at_status=$?
13631     grep '^ *+' "$at_stder1" >&2
13632     grep -v '^ *+' "$at_stder1" >"$at_stderr"
13633 else
13634     ( :;
13635 mkdir oldgnu
13636 (cd oldgnu
13637 TEST_TAR_FORMAT=oldgnu
13638 export TEST_TAR_FORMAT
13639 TAR_OPTIONS="-H oldgnu"
13640 export TAR_OPTIONS
13641 rm -rf *
13642
13643
13644 install-sh -d a/b >/dev/null  || exit 77
13645 awk 'BEGIN {
13646   for (i=1;i<=142;i++)
13647     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
13648   }' < /dev/null | genfile --files-from -
13649
13650 sleep 1
13651
13652 echo "Initial dump"
13653 tar cvf a0.tar -g a.sna a
13654 mv a/b a/c
13655 echo "Incremental dump"
13656 tar cvf a1.tar -g a.sna a
13657 ) ) >"$at_stdout" 2>"$at_stderr"
13658     at_status=$?
13659 fi
13660
13661 at_failed=false
13662 echo >>"$at_stderr"; echo "tar: a/b: Directory is new
13663 tar: a/c: Directory has been renamed from \`a/b'
13664 " | $at_diff - "$at_stderr" || at_failed=:
13665 echo >>"$at_stdout"; echo "Initial dump
13666 a/
13667 a/b/
13668 a/b/one_31_chars_long_file_name_001
13669 a/b/one_31_chars_long_file_name_002
13670 a/b/one_31_chars_long_file_name_003
13671 a/b/one_31_chars_long_file_name_004
13672 a/b/one_31_chars_long_file_name_005
13673 a/b/one_31_chars_long_file_name_006
13674 a/b/one_31_chars_long_file_name_007
13675 a/b/one_31_chars_long_file_name_008
13676 a/b/one_31_chars_long_file_name_009
13677 a/b/one_31_chars_long_file_name_010
13678 a/b/one_31_chars_long_file_name_011
13679 a/b/one_31_chars_long_file_name_012
13680 a/b/one_31_chars_long_file_name_013
13681 a/b/one_31_chars_long_file_name_014
13682 a/b/one_31_chars_long_file_name_015
13683 a/b/one_31_chars_long_file_name_016
13684 a/b/one_31_chars_long_file_name_017
13685 a/b/one_31_chars_long_file_name_018
13686 a/b/one_31_chars_long_file_name_019
13687 a/b/one_31_chars_long_file_name_020
13688 a/b/one_31_chars_long_file_name_021
13689 a/b/one_31_chars_long_file_name_022
13690 a/b/one_31_chars_long_file_name_023
13691 a/b/one_31_chars_long_file_name_024
13692 a/b/one_31_chars_long_file_name_025
13693 a/b/one_31_chars_long_file_name_026
13694 a/b/one_31_chars_long_file_name_027
13695 a/b/one_31_chars_long_file_name_028
13696 a/b/one_31_chars_long_file_name_029
13697 a/b/one_31_chars_long_file_name_030
13698 a/b/one_31_chars_long_file_name_031
13699 a/b/one_31_chars_long_file_name_032
13700 a/b/one_31_chars_long_file_name_033
13701 a/b/one_31_chars_long_file_name_034
13702 a/b/one_31_chars_long_file_name_035
13703 a/b/one_31_chars_long_file_name_036
13704 a/b/one_31_chars_long_file_name_037
13705 a/b/one_31_chars_long_file_name_038
13706 a/b/one_31_chars_long_file_name_039
13707 a/b/one_31_chars_long_file_name_040
13708 a/b/one_31_chars_long_file_name_041
13709 a/b/one_31_chars_long_file_name_042
13710 a/b/one_31_chars_long_file_name_043
13711 a/b/one_31_chars_long_file_name_044
13712 a/b/one_31_chars_long_file_name_045
13713 a/b/one_31_chars_long_file_name_046
13714 a/b/one_31_chars_long_file_name_047
13715 a/b/one_31_chars_long_file_name_048
13716 a/b/one_31_chars_long_file_name_049
13717 a/b/one_31_chars_long_file_name_050
13718 a/b/one_31_chars_long_file_name_051
13719 a/b/one_31_chars_long_file_name_052
13720 a/b/one_31_chars_long_file_name_053
13721 a/b/one_31_chars_long_file_name_054
13722 a/b/one_31_chars_long_file_name_055
13723 a/b/one_31_chars_long_file_name_056
13724 a/b/one_31_chars_long_file_name_057
13725 a/b/one_31_chars_long_file_name_058
13726 a/b/one_31_chars_long_file_name_059
13727 a/b/one_31_chars_long_file_name_060
13728 a/b/one_31_chars_long_file_name_061
13729 a/b/one_31_chars_long_file_name_062
13730 a/b/one_31_chars_long_file_name_063
13731 a/b/one_31_chars_long_file_name_064
13732 a/b/one_31_chars_long_file_name_065
13733 a/b/one_31_chars_long_file_name_066
13734 a/b/one_31_chars_long_file_name_067
13735 a/b/one_31_chars_long_file_name_068
13736 a/b/one_31_chars_long_file_name_069
13737 a/b/one_31_chars_long_file_name_070
13738 a/b/one_31_chars_long_file_name_071
13739 a/b/one_31_chars_long_file_name_072
13740 a/b/one_31_chars_long_file_name_073
13741 a/b/one_31_chars_long_file_name_074
13742 a/b/one_31_chars_long_file_name_075
13743 a/b/one_31_chars_long_file_name_076
13744 a/b/one_31_chars_long_file_name_077
13745 a/b/one_31_chars_long_file_name_078
13746 a/b/one_31_chars_long_file_name_079
13747 a/b/one_31_chars_long_file_name_080
13748 a/b/one_31_chars_long_file_name_081
13749 a/b/one_31_chars_long_file_name_082
13750 a/b/one_31_chars_long_file_name_083
13751 a/b/one_31_chars_long_file_name_084
13752 a/b/one_31_chars_long_file_name_085
13753 a/b/one_31_chars_long_file_name_086
13754 a/b/one_31_chars_long_file_name_087
13755 a/b/one_31_chars_long_file_name_088
13756 a/b/one_31_chars_long_file_name_089
13757 a/b/one_31_chars_long_file_name_090
13758 a/b/one_31_chars_long_file_name_091
13759 a/b/one_31_chars_long_file_name_092
13760 a/b/one_31_chars_long_file_name_093
13761 a/b/one_31_chars_long_file_name_094
13762 a/b/one_31_chars_long_file_name_095
13763 a/b/one_31_chars_long_file_name_096
13764 a/b/one_31_chars_long_file_name_097
13765 a/b/one_31_chars_long_file_name_098
13766 a/b/one_31_chars_long_file_name_099
13767 a/b/one_31_chars_long_file_name_100
13768 a/b/one_31_chars_long_file_name_101
13769 a/b/one_31_chars_long_file_name_102
13770 a/b/one_31_chars_long_file_name_103
13771 a/b/one_31_chars_long_file_name_104
13772 a/b/one_31_chars_long_file_name_105
13773 a/b/one_31_chars_long_file_name_106
13774 a/b/one_31_chars_long_file_name_107
13775 a/b/one_31_chars_long_file_name_108
13776 a/b/one_31_chars_long_file_name_109
13777 a/b/one_31_chars_long_file_name_110
13778 a/b/one_31_chars_long_file_name_111
13779 a/b/one_31_chars_long_file_name_112
13780 a/b/one_31_chars_long_file_name_113
13781 a/b/one_31_chars_long_file_name_114
13782 a/b/one_31_chars_long_file_name_115
13783 a/b/one_31_chars_long_file_name_116
13784 a/b/one_31_chars_long_file_name_117
13785 a/b/one_31_chars_long_file_name_118
13786 a/b/one_31_chars_long_file_name_119
13787 a/b/one_31_chars_long_file_name_120
13788 a/b/one_31_chars_long_file_name_121
13789 a/b/one_31_chars_long_file_name_122
13790 a/b/one_31_chars_long_file_name_123
13791 a/b/one_31_chars_long_file_name_124
13792 a/b/one_31_chars_long_file_name_125
13793 a/b/one_31_chars_long_file_name_126
13794 a/b/one_31_chars_long_file_name_127
13795 a/b/one_31_chars_long_file_name_128
13796 a/b/one_31_chars_long_file_name_129
13797 a/b/one_31_chars_long_file_name_130
13798 a/b/one_31_chars_long_file_name_131
13799 a/b/one_31_chars_long_file_name_132
13800 a/b/one_31_chars_long_file_name_133
13801 a/b/one_31_chars_long_file_name_134
13802 a/b/one_31_chars_long_file_name_135
13803 a/b/one_31_chars_long_file_name_136
13804 a/b/one_31_chars_long_file_name_137
13805 a/b/one_31_chars_long_file_name_138
13806 a/b/one_31_chars_long_file_name_139
13807 a/b/one_31_chars_long_file_name_140
13808 a/b/one_31_chars_long_file_name_141
13809 a/b/one_31_chars_long_file_name_142
13810 Incremental dump
13811 a/
13812 a/c/
13813 " | $at_diff - "$at_stdout" || at_failed=:
13814 case $at_status in
13815    77) echo 77 > "$at_status_file"; exit 77;;
13816    0) ;;
13817    *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0"
13818       at_failed=:;;
13819 esac
13820 if $at_failed; then
13821
13822
13823   echo 1 > "$at_status_file"
13824   exit 1
13825 fi
13826
13827 $at_traceon
13828 $at_traceoff
13829 echo "$at_srcdir/incr04.at:34:
13830 mkdir posix
13831 (cd posix
13832 TEST_TAR_FORMAT=posix
13833 export TEST_TAR_FORMAT
13834 TAR_OPTIONS=\"-H posix\"
13835 export TAR_OPTIONS
13836 rm -rf *
13837
13838
13839 install-sh -d a/b >/dev/null  || exit 77
13840 awk 'BEGIN {
13841   for (i=1;i<=142;i++)
13842     printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i);
13843   }' < /dev/null | genfile --files-from -
13844
13845 sleep 1
13846
13847 echo \"Initial dump\"
13848 tar cvf a0.tar -g a.sna a
13849 mv a/b a/c
13850 echo \"Incremental dump\"
13851 tar cvf a1.tar -g a.sna a
13852 )"
13853 echo incr04.at:34 >"$at_check_line_file"
13854
13855 at_trace_this=
13856 if test -n "$at_traceon"; then
13857     echo 'Not enabling shell tracing (command contains an embedded newline)'
13858 fi
13859
13860 if test -n "$at_trace_this"; then
13861     ( $at_traceon;
13862 mkdir posix
13863 (cd posix
13864 TEST_TAR_FORMAT=posix
13865 export TEST_TAR_FORMAT
13866 TAR_OPTIONS="-H posix"
13867 export TAR_OPTIONS
13868 rm -rf *
13869
13870
13871 install-sh -d a/b >/dev/null  || exit 77
13872 awk 'BEGIN {
13873   for (i=1;i<=142;i++)
13874     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
13875   }' < /dev/null | genfile --files-from -
13876
13877 sleep 1
13878
13879 echo "Initial dump"
13880 tar cvf a0.tar -g a.sna a
13881 mv a/b a/c
13882 echo "Incremental dump"
13883 tar cvf a1.tar -g a.sna a
13884 ) ) >"$at_stdout" 2>"$at_stder1"
13885     at_status=$?
13886     grep '^ *+' "$at_stder1" >&2
13887     grep -v '^ *+' "$at_stder1" >"$at_stderr"
13888 else
13889     ( :;
13890 mkdir posix
13891 (cd posix
13892 TEST_TAR_FORMAT=posix
13893 export TEST_TAR_FORMAT
13894 TAR_OPTIONS="-H posix"
13895 export TAR_OPTIONS
13896 rm -rf *
13897
13898
13899 install-sh -d a/b >/dev/null  || exit 77
13900 awk 'BEGIN {
13901   for (i=1;i<=142;i++)
13902     printf("a/b/one_31_chars_long_file_name_%03d\n", i);
13903   }' < /dev/null | genfile --files-from -
13904
13905 sleep 1
13906
13907 echo "Initial dump"
13908 tar cvf a0.tar -g a.sna a
13909 mv a/b a/c
13910 echo "Incremental dump"
13911 tar cvf a1.tar -g a.sna a
13912 ) ) >"$at_stdout" 2>"$at_stderr"
13913     at_status=$?
13914 fi
13915
13916 at_failed=false
13917 echo >>"$at_stderr"; echo "tar: a/b: Directory is new
13918 tar: a/c: Directory has been renamed from \`a/b'
13919 " | $at_diff - "$at_stderr" || at_failed=:
13920 echo >>"$at_stdout"; echo "Initial dump
13921 a/
13922 a/b/
13923 a/b/one_31_chars_long_file_name_001
13924 a/b/one_31_chars_long_file_name_002
13925 a/b/one_31_chars_long_file_name_003
13926 a/b/one_31_chars_long_file_name_004
13927 a/b/one_31_chars_long_file_name_005
13928 a/b/one_31_chars_long_file_name_006
13929 a/b/one_31_chars_long_file_name_007
13930 a/b/one_31_chars_long_file_name_008
13931 a/b/one_31_chars_long_file_name_009
13932 a/b/one_31_chars_long_file_name_010
13933 a/b/one_31_chars_long_file_name_011
13934 a/b/one_31_chars_long_file_name_012
13935 a/b/one_31_chars_long_file_name_013
13936 a/b/one_31_chars_long_file_name_014
13937 a/b/one_31_chars_long_file_name_015
13938 a/b/one_31_chars_long_file_name_016
13939 a/b/one_31_chars_long_file_name_017
13940 a/b/one_31_chars_long_file_name_018
13941 a/b/one_31_chars_long_file_name_019
13942 a/b/one_31_chars_long_file_name_020
13943 a/b/one_31_chars_long_file_name_021
13944 a/b/one_31_chars_long_file_name_022
13945 a/b/one_31_chars_long_file_name_023
13946 a/b/one_31_chars_long_file_name_024
13947 a/b/one_31_chars_long_file_name_025
13948 a/b/one_31_chars_long_file_name_026
13949 a/b/one_31_chars_long_file_name_027
13950 a/b/one_31_chars_long_file_name_028
13951 a/b/one_31_chars_long_file_name_029
13952 a/b/one_31_chars_long_file_name_030
13953 a/b/one_31_chars_long_file_name_031
13954 a/b/one_31_chars_long_file_name_032
13955 a/b/one_31_chars_long_file_name_033
13956 a/b/one_31_chars_long_file_name_034
13957 a/b/one_31_chars_long_file_name_035
13958 a/b/one_31_chars_long_file_name_036
13959 a/b/one_31_chars_long_file_name_037
13960 a/b/one_31_chars_long_file_name_038
13961 a/b/one_31_chars_long_file_name_039
13962 a/b/one_31_chars_long_file_name_040
13963 a/b/one_31_chars_long_file_name_041
13964 a/b/one_31_chars_long_file_name_042
13965 a/b/one_31_chars_long_file_name_043
13966 a/b/one_31_chars_long_file_name_044
13967 a/b/one_31_chars_long_file_name_045
13968 a/b/one_31_chars_long_file_name_046
13969 a/b/one_31_chars_long_file_name_047
13970 a/b/one_31_chars_long_file_name_048
13971 a/b/one_31_chars_long_file_name_049
13972 a/b/one_31_chars_long_file_name_050
13973 a/b/one_31_chars_long_file_name_051
13974 a/b/one_31_chars_long_file_name_052
13975 a/b/one_31_chars_long_file_name_053
13976 a/b/one_31_chars_long_file_name_054
13977 a/b/one_31_chars_long_file_name_055
13978 a/b/one_31_chars_long_file_name_056
13979 a/b/one_31_chars_long_file_name_057
13980 a/b/one_31_chars_long_file_name_058
13981 a/b/one_31_chars_long_file_name_059
13982 a/b/one_31_chars_long_file_name_060
13983 a/b/one_31_chars_long_file_name_061
13984 a/b/one_31_chars_long_file_name_062
13985 a/b/one_31_chars_long_file_name_063
13986 a/b/one_31_chars_long_file_name_064
13987 a/b/one_31_chars_long_file_name_065
13988 a/b/one_31_chars_long_file_name_066
13989 a/b/one_31_chars_long_file_name_067
13990 a/b/one_31_chars_long_file_name_068
13991 a/b/one_31_chars_long_file_name_069
13992 a/b/one_31_chars_long_file_name_070
13993 a/b/one_31_chars_long_file_name_071
13994 a/b/one_31_chars_long_file_name_072
13995 a/b/one_31_chars_long_file_name_073
13996 a/b/one_31_chars_long_file_name_074
13997 a/b/one_31_chars_long_file_name_075
13998 a/b/one_31_chars_long_file_name_076
13999 a/b/one_31_chars_long_file_name_077
14000 a/b/one_31_chars_long_file_name_078
14001 a/b/one_31_chars_long_file_name_079
14002 a/b/one_31_chars_long_file_name_080
14003 a/b/one_31_chars_long_file_name_081
14004 a/b/one_31_chars_long_file_name_082
14005 a/b/one_31_chars_long_file_name_083
14006 a/b/one_31_chars_long_file_name_084
14007 a/b/one_31_chars_long_file_name_085
14008 a/b/one_31_chars_long_file_name_086
14009 a/b/one_31_chars_long_file_name_087
14010 a/b/one_31_chars_long_file_name_088
14011 a/b/one_31_chars_long_file_name_089
14012 a/b/one_31_chars_long_file_name_090
14013 a/b/one_31_chars_long_file_name_091
14014 a/b/one_31_chars_long_file_name_092
14015 a/b/one_31_chars_long_file_name_093
14016 a/b/one_31_chars_long_file_name_094
14017 a/b/one_31_chars_long_file_name_095
14018 a/b/one_31_chars_long_file_name_096
14019 a/b/one_31_chars_long_file_name_097
14020 a/b/one_31_chars_long_file_name_098
14021 a/b/one_31_chars_long_file_name_099
14022 a/b/one_31_chars_long_file_name_100
14023 a/b/one_31_chars_long_file_name_101
14024 a/b/one_31_chars_long_file_name_102
14025 a/b/one_31_chars_long_file_name_103
14026 a/b/one_31_chars_long_file_name_104
14027 a/b/one_31_chars_long_file_name_105
14028 a/b/one_31_chars_long_file_name_106
14029 a/b/one_31_chars_long_file_name_107
14030 a/b/one_31_chars_long_file_name_108
14031 a/b/one_31_chars_long_file_name_109
14032 a/b/one_31_chars_long_file_name_110
14033 a/b/one_31_chars_long_file_name_111
14034 a/b/one_31_chars_long_file_name_112
14035 a/b/one_31_chars_long_file_name_113
14036 a/b/one_31_chars_long_file_name_114
14037 a/b/one_31_chars_long_file_name_115
14038 a/b/one_31_chars_long_file_name_116
14039 a/b/one_31_chars_long_file_name_117
14040 a/b/one_31_chars_long_file_name_118
14041 a/b/one_31_chars_long_file_name_119
14042 a/b/one_31_chars_long_file_name_120
14043 a/b/one_31_chars_long_file_name_121
14044 a/b/one_31_chars_long_file_name_122
14045 a/b/one_31_chars_long_file_name_123
14046 a/b/one_31_chars_long_file_name_124
14047 a/b/one_31_chars_long_file_name_125
14048 a/b/one_31_chars_long_file_name_126
14049 a/b/one_31_chars_long_file_name_127
14050 a/b/one_31_chars_long_file_name_128
14051 a/b/one_31_chars_long_file_name_129
14052 a/b/one_31_chars_long_file_name_130
14053 a/b/one_31_chars_long_file_name_131
14054 a/b/one_31_chars_long_file_name_132
14055 a/b/one_31_chars_long_file_name_133
14056 a/b/one_31_chars_long_file_name_134
14057 a/b/one_31_chars_long_file_name_135
14058 a/b/one_31_chars_long_file_name_136
14059 a/b/one_31_chars_long_file_name_137
14060 a/b/one_31_chars_long_file_name_138
14061 a/b/one_31_chars_long_file_name_139
14062 a/b/one_31_chars_long_file_name_140
14063 a/b/one_31_chars_long_file_name_141
14064 a/b/one_31_chars_long_file_name_142
14065 Incremental dump
14066 a/
14067 a/c/
14068 " | $at_diff - "$at_stdout" || at_failed=:
14069 case $at_status in
14070    77) echo 77 > "$at_status_file"; exit 77;;
14071    0) ;;
14072    *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0"
14073       at_failed=:;;
14074 esac
14075 if $at_failed; then
14076
14077
14078   echo 1 > "$at_status_file"
14079   exit 1
14080 fi
14081
14082 $at_traceon
14083
14084
14085
14086       $at_traceoff
14087       $at_times_p && times >"$at_times_file"
14088     ) 5>&1 2>&1 | eval $at_tee_pipe
14089     at_status=`cat "$at_status_file"`
14090     ;;
14091
14092   33 ) # 33. rename01.at:24: renamed dirs in incrementals
14093     at_setup_line='rename01.at:24'
14094     at_desc="renamed dirs in incrementals"
14095     $at_quiet $ECHO_N " 33: renamed dirs in incrementals                   $ECHO_C"
14096     at_xfail=no
14097       test -f $XFAILFILE && at_xfail=yes
14098     echo "#                             -*- compilation -*-" >> "$at_group_log"
14099     (
14100       echo "33. rename01.at:24: testing ..."
14101       $at_traceon
14102
14103
14104
14105
14106
14107   $at_traceoff
14108 echo "$at_srcdir/rename01.at:27:
14109 mkdir gnu
14110 (cd gnu
14111 TEST_TAR_FORMAT=gnu
14112 export TEST_TAR_FORMAT
14113 TAR_OPTIONS=\"-H gnu\"
14114 export TAR_OPTIONS
14115 rm -rf *
14116
14117
14118 test -z "`sort < /dev/null 2>&1`" || exit 77
14119
14120
14121 mkdir foo
14122 genfile --file foo/file1
14123 genfile --file foo/file2
14124 mkdir foo/bar
14125 genfile --file foo/bar/file
14126
14127 echo \"Creating base archive\"
14128 tar -g incr -cf arch.1 -v foo
14129
14130 mv foo/bar foo/baz
14131
14132 echo \"Creating incremental archive\"
14133 tar -g incr -cf arch.2 -v foo
14134
14135 mv foo old
14136
14137 tar xfg arch.1 /dev/null
14138
14139 echo \"Begin directory listing 1\"
14140 find foo | sort
14141 echo \"End directory listing 1\"
14142
14143 tar xfg arch.2 /dev/null
14144 echo Begin directory listing 2
14145 find foo | sort
14146 echo End directory listing 2
14147 )"
14148 echo rename01.at:27 >"$at_check_line_file"
14149
14150 at_trace_this=
14151 if test -n "$at_traceon"; then
14152     echo 'Not enabling shell tracing (command contains an embedded newline)'
14153 fi
14154
14155 if test -n "$at_trace_this"; then
14156     ( $at_traceon;
14157 mkdir gnu
14158 (cd gnu
14159 TEST_TAR_FORMAT=gnu
14160 export TEST_TAR_FORMAT
14161 TAR_OPTIONS="-H gnu"
14162 export TAR_OPTIONS
14163 rm -rf *
14164
14165
14166 test -z "`sort < /dev/null 2>&1`" || exit 77
14167
14168
14169 mkdir foo
14170 genfile --file foo/file1
14171 genfile --file foo/file2
14172 mkdir foo/bar
14173 genfile --file foo/bar/file
14174
14175 echo "Creating base archive"
14176 tar -g incr -cf arch.1 -v foo
14177
14178 mv foo/bar foo/baz
14179
14180 echo "Creating incremental archive"
14181 tar -g incr -cf arch.2 -v foo
14182
14183 mv foo old
14184
14185 tar xfg arch.1 /dev/null
14186
14187 echo "Begin directory listing 1"
14188 find foo | sort
14189 echo "End directory listing 1"
14190
14191 tar xfg arch.2 /dev/null
14192 echo Begin directory listing 2
14193 find foo | sort
14194 echo End directory listing 2
14195 ) ) >"$at_stdout" 2>"$at_stder1"
14196     at_status=$?
14197     grep '^ *+' "$at_stder1" >&2
14198     grep -v '^ *+' "$at_stder1" >"$at_stderr"
14199 else
14200     ( :;
14201 mkdir gnu
14202 (cd gnu
14203 TEST_TAR_FORMAT=gnu
14204 export TEST_TAR_FORMAT
14205 TAR_OPTIONS="-H gnu"
14206 export TAR_OPTIONS
14207 rm -rf *
14208
14209
14210 test -z "`sort < /dev/null 2>&1`" || exit 77
14211
14212
14213 mkdir foo
14214 genfile --file foo/file1
14215 genfile --file foo/file2
14216 mkdir foo/bar
14217 genfile --file foo/bar/file
14218
14219 echo "Creating base archive"
14220 tar -g incr -cf arch.1 -v foo
14221
14222 mv foo/bar foo/baz
14223
14224 echo "Creating incremental archive"
14225 tar -g incr -cf arch.2 -v foo
14226
14227 mv foo old
14228
14229 tar xfg arch.1 /dev/null
14230
14231 echo "Begin directory listing 1"
14232 find foo | sort
14233 echo "End directory listing 1"
14234
14235 tar xfg arch.2 /dev/null
14236 echo Begin directory listing 2
14237 find foo | sort
14238 echo End directory listing 2
14239 ) ) >"$at_stdout" 2>"$at_stderr"
14240     at_status=$?
14241 fi
14242
14243 at_failed=false
14244 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
14245 tar: foo/baz: Directory has been renamed from \`foo/bar'
14246 " | $at_diff - "$at_stderr" || at_failed=:
14247 echo >>"$at_stdout"; echo "Creating base archive
14248 foo/
14249 foo/bar/
14250 foo/file1
14251 foo/file2
14252 foo/bar/file
14253 Creating incremental archive
14254 foo/
14255 foo/baz/
14256 Begin directory listing 1
14257 foo
14258 foo/bar
14259 foo/bar/file
14260 foo/file1
14261 foo/file2
14262 End directory listing 1
14263 Begin directory listing 2
14264 foo
14265 foo/baz
14266 foo/baz/file
14267 foo/file1
14268 foo/file2
14269 End directory listing 2
14270 " | $at_diff - "$at_stdout" || at_failed=:
14271 case $at_status in
14272    77) echo 77 > "$at_status_file"; exit 77;;
14273    0) ;;
14274    *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0"
14275       at_failed=:;;
14276 esac
14277 if $at_failed; then
14278
14279
14280   echo 1 > "$at_status_file"
14281   exit 1
14282 fi
14283
14284 $at_traceon
14285 $at_traceoff
14286 echo "$at_srcdir/rename01.at:27:
14287 mkdir oldgnu
14288 (cd oldgnu
14289 TEST_TAR_FORMAT=oldgnu
14290 export TEST_TAR_FORMAT
14291 TAR_OPTIONS=\"-H oldgnu\"
14292 export TAR_OPTIONS
14293 rm -rf *
14294
14295
14296 test -z "`sort < /dev/null 2>&1`" || exit 77
14297
14298
14299 mkdir foo
14300 genfile --file foo/file1
14301 genfile --file foo/file2
14302 mkdir foo/bar
14303 genfile --file foo/bar/file
14304
14305 echo \"Creating base archive\"
14306 tar -g incr -cf arch.1 -v foo
14307
14308 mv foo/bar foo/baz
14309
14310 echo \"Creating incremental archive\"
14311 tar -g incr -cf arch.2 -v foo
14312
14313 mv foo old
14314
14315 tar xfg arch.1 /dev/null
14316
14317 echo \"Begin directory listing 1\"
14318 find foo | sort
14319 echo \"End directory listing 1\"
14320
14321 tar xfg arch.2 /dev/null
14322 echo Begin directory listing 2
14323 find foo | sort
14324 echo End directory listing 2
14325 )"
14326 echo rename01.at:27 >"$at_check_line_file"
14327
14328 at_trace_this=
14329 if test -n "$at_traceon"; then
14330     echo 'Not enabling shell tracing (command contains an embedded newline)'
14331 fi
14332
14333 if test -n "$at_trace_this"; then
14334     ( $at_traceon;
14335 mkdir oldgnu
14336 (cd oldgnu
14337 TEST_TAR_FORMAT=oldgnu
14338 export TEST_TAR_FORMAT
14339 TAR_OPTIONS="-H oldgnu"
14340 export TAR_OPTIONS
14341 rm -rf *
14342
14343
14344 test -z "`sort < /dev/null 2>&1`" || exit 77
14345
14346
14347 mkdir foo
14348 genfile --file foo/file1
14349 genfile --file foo/file2
14350 mkdir foo/bar
14351 genfile --file foo/bar/file
14352
14353 echo "Creating base archive"
14354 tar -g incr -cf arch.1 -v foo
14355
14356 mv foo/bar foo/baz
14357
14358 echo "Creating incremental archive"
14359 tar -g incr -cf arch.2 -v foo
14360
14361 mv foo old
14362
14363 tar xfg arch.1 /dev/null
14364
14365 echo "Begin directory listing 1"
14366 find foo | sort
14367 echo "End directory listing 1"
14368
14369 tar xfg arch.2 /dev/null
14370 echo Begin directory listing 2
14371 find foo | sort
14372 echo End directory listing 2
14373 ) ) >"$at_stdout" 2>"$at_stder1"
14374     at_status=$?
14375     grep '^ *+' "$at_stder1" >&2
14376     grep -v '^ *+' "$at_stder1" >"$at_stderr"
14377 else
14378     ( :;
14379 mkdir oldgnu
14380 (cd oldgnu
14381 TEST_TAR_FORMAT=oldgnu
14382 export TEST_TAR_FORMAT
14383 TAR_OPTIONS="-H oldgnu"
14384 export TAR_OPTIONS
14385 rm -rf *
14386
14387
14388 test -z "`sort < /dev/null 2>&1`" || exit 77
14389
14390
14391 mkdir foo
14392 genfile --file foo/file1
14393 genfile --file foo/file2
14394 mkdir foo/bar
14395 genfile --file foo/bar/file
14396
14397 echo "Creating base archive"
14398 tar -g incr -cf arch.1 -v foo
14399
14400 mv foo/bar foo/baz
14401
14402 echo "Creating incremental archive"
14403 tar -g incr -cf arch.2 -v foo
14404
14405 mv foo old
14406
14407 tar xfg arch.1 /dev/null
14408
14409 echo "Begin directory listing 1"
14410 find foo | sort
14411 echo "End directory listing 1"
14412
14413 tar xfg arch.2 /dev/null
14414 echo Begin directory listing 2
14415 find foo | sort
14416 echo End directory listing 2
14417 ) ) >"$at_stdout" 2>"$at_stderr"
14418     at_status=$?
14419 fi
14420
14421 at_failed=false
14422 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
14423 tar: foo/baz: Directory has been renamed from \`foo/bar'
14424 " | $at_diff - "$at_stderr" || at_failed=:
14425 echo >>"$at_stdout"; echo "Creating base archive
14426 foo/
14427 foo/bar/
14428 foo/file1
14429 foo/file2
14430 foo/bar/file
14431 Creating incremental archive
14432 foo/
14433 foo/baz/
14434 Begin directory listing 1
14435 foo
14436 foo/bar
14437 foo/bar/file
14438 foo/file1
14439 foo/file2
14440 End directory listing 1
14441 Begin directory listing 2
14442 foo
14443 foo/baz
14444 foo/baz/file
14445 foo/file1
14446 foo/file2
14447 End directory listing 2
14448 " | $at_diff - "$at_stdout" || at_failed=:
14449 case $at_status in
14450    77) echo 77 > "$at_status_file"; exit 77;;
14451    0) ;;
14452    *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0"
14453       at_failed=:;;
14454 esac
14455 if $at_failed; then
14456
14457
14458   echo 1 > "$at_status_file"
14459   exit 1
14460 fi
14461
14462 $at_traceon
14463 $at_traceoff
14464 echo "$at_srcdir/rename01.at:27:
14465 mkdir posix
14466 (cd posix
14467 TEST_TAR_FORMAT=posix
14468 export TEST_TAR_FORMAT
14469 TAR_OPTIONS=\"-H posix\"
14470 export TAR_OPTIONS
14471 rm -rf *
14472
14473
14474 test -z "`sort < /dev/null 2>&1`" || exit 77
14475
14476
14477 mkdir foo
14478 genfile --file foo/file1
14479 genfile --file foo/file2
14480 mkdir foo/bar
14481 genfile --file foo/bar/file
14482
14483 echo \"Creating base archive\"
14484 tar -g incr -cf arch.1 -v foo
14485
14486 mv foo/bar foo/baz
14487
14488 echo \"Creating incremental archive\"
14489 tar -g incr -cf arch.2 -v foo
14490
14491 mv foo old
14492
14493 tar xfg arch.1 /dev/null
14494
14495 echo \"Begin directory listing 1\"
14496 find foo | sort
14497 echo \"End directory listing 1\"
14498
14499 tar xfg arch.2 /dev/null
14500 echo Begin directory listing 2
14501 find foo | sort
14502 echo End directory listing 2
14503 )"
14504 echo rename01.at:27 >"$at_check_line_file"
14505
14506 at_trace_this=
14507 if test -n "$at_traceon"; then
14508     echo 'Not enabling shell tracing (command contains an embedded newline)'
14509 fi
14510
14511 if test -n "$at_trace_this"; then
14512     ( $at_traceon;
14513 mkdir posix
14514 (cd posix
14515 TEST_TAR_FORMAT=posix
14516 export TEST_TAR_FORMAT
14517 TAR_OPTIONS="-H posix"
14518 export TAR_OPTIONS
14519 rm -rf *
14520
14521
14522 test -z "`sort < /dev/null 2>&1`" || exit 77
14523
14524
14525 mkdir foo
14526 genfile --file foo/file1
14527 genfile --file foo/file2
14528 mkdir foo/bar
14529 genfile --file foo/bar/file
14530
14531 echo "Creating base archive"
14532 tar -g incr -cf arch.1 -v foo
14533
14534 mv foo/bar foo/baz
14535
14536 echo "Creating incremental archive"
14537 tar -g incr -cf arch.2 -v foo
14538
14539 mv foo old
14540
14541 tar xfg arch.1 /dev/null
14542
14543 echo "Begin directory listing 1"
14544 find foo | sort
14545 echo "End directory listing 1"
14546
14547 tar xfg arch.2 /dev/null
14548 echo Begin directory listing 2
14549 find foo | sort
14550 echo End directory listing 2
14551 ) ) >"$at_stdout" 2>"$at_stder1"
14552     at_status=$?
14553     grep '^ *+' "$at_stder1" >&2
14554     grep -v '^ *+' "$at_stder1" >"$at_stderr"
14555 else
14556     ( :;
14557 mkdir posix
14558 (cd posix
14559 TEST_TAR_FORMAT=posix
14560 export TEST_TAR_FORMAT
14561 TAR_OPTIONS="-H posix"
14562 export TAR_OPTIONS
14563 rm -rf *
14564
14565
14566 test -z "`sort < /dev/null 2>&1`" || exit 77
14567
14568
14569 mkdir foo
14570 genfile --file foo/file1
14571 genfile --file foo/file2
14572 mkdir foo/bar
14573 genfile --file foo/bar/file
14574
14575 echo "Creating base archive"
14576 tar -g incr -cf arch.1 -v foo
14577
14578 mv foo/bar foo/baz
14579
14580 echo "Creating incremental archive"
14581 tar -g incr -cf arch.2 -v foo
14582
14583 mv foo old
14584
14585 tar xfg arch.1 /dev/null
14586
14587 echo "Begin directory listing 1"
14588 find foo | sort
14589 echo "End directory listing 1"
14590
14591 tar xfg arch.2 /dev/null
14592 echo Begin directory listing 2
14593 find foo | sort
14594 echo End directory listing 2
14595 ) ) >"$at_stdout" 2>"$at_stderr"
14596     at_status=$?
14597 fi
14598
14599 at_failed=false
14600 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
14601 tar: foo/baz: Directory has been renamed from \`foo/bar'
14602 " | $at_diff - "$at_stderr" || at_failed=:
14603 echo >>"$at_stdout"; echo "Creating base archive
14604 foo/
14605 foo/bar/
14606 foo/file1
14607 foo/file2
14608 foo/bar/file
14609 Creating incremental archive
14610 foo/
14611 foo/baz/
14612 Begin directory listing 1
14613 foo
14614 foo/bar
14615 foo/bar/file
14616 foo/file1
14617 foo/file2
14618 End directory listing 1
14619 Begin directory listing 2
14620 foo
14621 foo/baz
14622 foo/baz/file
14623 foo/file1
14624 foo/file2
14625 End directory listing 2
14626 " | $at_diff - "$at_stdout" || at_failed=:
14627 case $at_status in
14628    77) echo 77 > "$at_status_file"; exit 77;;
14629    0) ;;
14630    *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0"
14631       at_failed=:;;
14632 esac
14633 if $at_failed; then
14634
14635
14636   echo 1 > "$at_status_file"
14637   exit 1
14638 fi
14639
14640 $at_traceon
14641
14642
14643
14644       $at_traceoff
14645       $at_times_p && times >"$at_times_file"
14646     ) 5>&1 2>&1 | eval $at_tee_pipe
14647     at_status=`cat "$at_status_file"`
14648     ;;
14649
14650   34 ) # 34. rename02.at:24: move between hierarchies
14651     at_setup_line='rename02.at:24'
14652     at_desc="move between hierarchies"
14653     $at_quiet $ECHO_N " 34: move between hierarchies                       $ECHO_C"
14654     at_xfail=no
14655       test -f $XFAILFILE && at_xfail=yes
14656     echo "#                             -*- compilation -*-" >> "$at_group_log"
14657     (
14658       echo "34. rename02.at:24: testing ..."
14659       $at_traceon
14660
14661
14662
14663
14664
14665   $at_traceoff
14666 echo "$at_srcdir/rename02.at:27:
14667 mkdir gnu
14668 (cd gnu
14669 TEST_TAR_FORMAT=gnu
14670 export TEST_TAR_FORMAT
14671 TAR_OPTIONS=\"-H gnu\"
14672 export TAR_OPTIONS
14673 rm -rf *
14674
14675
14676 test -z "`sort < /dev/null 2>&1`" || exit 77
14677
14678 mkdir foo
14679 genfile --file foo/file1
14680 genfile --file foo/file2
14681 mkdir foo/bar
14682 genfile --file foo/bar/file.r
14683 mkdir foo/bar/baz
14684 genfile --file foo/bar/baz/file.z
14685
14686 sleep 1
14687
14688 echo \"Creating base archive\"
14689 tar -g incr -cf arch.1 -v foo
14690
14691 mv foo/bar/baz foo
14692
14693 echo \"Creating incremental archive\"
14694 tar -g incr -cf arch.2 -v foo
14695
14696 mv foo old
14697
14698 tar xfg arch.1 /dev/null 2>tmperr
14699 sort tmperr >&2
14700
14701 echo \"Begin directory listing 1\"
14702 find foo | sort
14703 echo \"End directory listing 1\"
14704
14705 tar xfgv arch.2 /dev/null
14706 echo Begin directory listing 2
14707 find foo | sort
14708 echo End directory listing 2
14709 )"
14710 echo rename02.at:27 >"$at_check_line_file"
14711
14712 at_trace_this=
14713 if test -n "$at_traceon"; then
14714     echo 'Not enabling shell tracing (command contains an embedded newline)'
14715 fi
14716
14717 if test -n "$at_trace_this"; then
14718     ( $at_traceon;
14719 mkdir gnu
14720 (cd gnu
14721 TEST_TAR_FORMAT=gnu
14722 export TEST_TAR_FORMAT
14723 TAR_OPTIONS="-H gnu"
14724 export TAR_OPTIONS
14725 rm -rf *
14726
14727
14728 test -z "`sort < /dev/null 2>&1`" || exit 77
14729
14730 mkdir foo
14731 genfile --file foo/file1
14732 genfile --file foo/file2
14733 mkdir foo/bar
14734 genfile --file foo/bar/file.r
14735 mkdir foo/bar/baz
14736 genfile --file foo/bar/baz/file.z
14737
14738 sleep 1
14739
14740 echo "Creating base archive"
14741 tar -g incr -cf arch.1 -v foo
14742
14743 mv foo/bar/baz foo
14744
14745 echo "Creating incremental archive"
14746 tar -g incr -cf arch.2 -v foo
14747
14748 mv foo old
14749
14750 tar xfg arch.1 /dev/null 2>tmperr
14751 sort tmperr >&2
14752
14753 echo "Begin directory listing 1"
14754 find foo | sort
14755 echo "End directory listing 1"
14756
14757 tar xfgv arch.2 /dev/null
14758 echo Begin directory listing 2
14759 find foo | sort
14760 echo End directory listing 2
14761 ) ) >"$at_stdout" 2>"$at_stder1"
14762     at_status=$?
14763     grep '^ *+' "$at_stder1" >&2
14764     grep -v '^ *+' "$at_stder1" >"$at_stderr"
14765 else
14766     ( :;
14767 mkdir gnu
14768 (cd gnu
14769 TEST_TAR_FORMAT=gnu
14770 export TEST_TAR_FORMAT
14771 TAR_OPTIONS="-H gnu"
14772 export TAR_OPTIONS
14773 rm -rf *
14774
14775
14776 test -z "`sort < /dev/null 2>&1`" || exit 77
14777
14778 mkdir foo
14779 genfile --file foo/file1
14780 genfile --file foo/file2
14781 mkdir foo/bar
14782 genfile --file foo/bar/file.r
14783 mkdir foo/bar/baz
14784 genfile --file foo/bar/baz/file.z
14785
14786 sleep 1
14787
14788 echo "Creating base archive"
14789 tar -g incr -cf arch.1 -v foo
14790
14791 mv foo/bar/baz foo
14792
14793 echo "Creating incremental archive"
14794 tar -g incr -cf arch.2 -v foo
14795
14796 mv foo old
14797
14798 tar xfg arch.1 /dev/null 2>tmperr
14799 sort tmperr >&2
14800
14801 echo "Begin directory listing 1"
14802 find foo | sort
14803 echo "End directory listing 1"
14804
14805 tar xfgv arch.2 /dev/null
14806 echo Begin directory listing 2
14807 find foo | sort
14808 echo End directory listing 2
14809 ) ) >"$at_stdout" 2>"$at_stderr"
14810     at_status=$?
14811 fi
14812
14813 at_failed=false
14814 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
14815 tar: foo/bar/baz: Directory is new
14816 tar: foo/baz: Directory has been renamed from \`foo/bar/baz'
14817 " | $at_diff - "$at_stderr" || at_failed=:
14818 echo >>"$at_stdout"; echo "Creating base archive
14819 foo/
14820 foo/bar/
14821 foo/bar/baz/
14822 foo/file1
14823 foo/file2
14824 foo/bar/file.r
14825 foo/bar/baz/file.z
14826 Creating incremental archive
14827 foo/
14828 foo/bar/
14829 foo/baz/
14830 Begin directory listing 1
14831 foo
14832 foo/bar
14833 foo/bar/baz
14834 foo/bar/baz/file.z
14835 foo/bar/file.r
14836 foo/file1
14837 foo/file2
14838 End directory listing 1
14839 foo/
14840 foo/bar/
14841 foo/baz/
14842 Begin directory listing 2
14843 foo
14844 foo/bar
14845 foo/bar/file.r
14846 foo/baz
14847 foo/baz/file.z
14848 foo/file1
14849 foo/file2
14850 End directory listing 2
14851 " | $at_diff - "$at_stdout" || at_failed=:
14852 case $at_status in
14853    77) echo 77 > "$at_status_file"; exit 77;;
14854    0) ;;
14855    *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0"
14856       at_failed=:;;
14857 esac
14858 if $at_failed; then
14859
14860
14861   echo 1 > "$at_status_file"
14862   exit 1
14863 fi
14864
14865 $at_traceon
14866 $at_traceoff
14867 echo "$at_srcdir/rename02.at:27:
14868 mkdir oldgnu
14869 (cd oldgnu
14870 TEST_TAR_FORMAT=oldgnu
14871 export TEST_TAR_FORMAT
14872 TAR_OPTIONS=\"-H oldgnu\"
14873 export TAR_OPTIONS
14874 rm -rf *
14875
14876
14877 test -z "`sort < /dev/null 2>&1`" || exit 77
14878
14879 mkdir foo
14880 genfile --file foo/file1
14881 genfile --file foo/file2
14882 mkdir foo/bar
14883 genfile --file foo/bar/file.r
14884 mkdir foo/bar/baz
14885 genfile --file foo/bar/baz/file.z
14886
14887 sleep 1
14888
14889 echo \"Creating base archive\"
14890 tar -g incr -cf arch.1 -v foo
14891
14892 mv foo/bar/baz foo
14893
14894 echo \"Creating incremental archive\"
14895 tar -g incr -cf arch.2 -v foo
14896
14897 mv foo old
14898
14899 tar xfg arch.1 /dev/null 2>tmperr
14900 sort tmperr >&2
14901
14902 echo \"Begin directory listing 1\"
14903 find foo | sort
14904 echo \"End directory listing 1\"
14905
14906 tar xfgv arch.2 /dev/null
14907 echo Begin directory listing 2
14908 find foo | sort
14909 echo End directory listing 2
14910 )"
14911 echo rename02.at:27 >"$at_check_line_file"
14912
14913 at_trace_this=
14914 if test -n "$at_traceon"; then
14915     echo 'Not enabling shell tracing (command contains an embedded newline)'
14916 fi
14917
14918 if test -n "$at_trace_this"; then
14919     ( $at_traceon;
14920 mkdir oldgnu
14921 (cd oldgnu
14922 TEST_TAR_FORMAT=oldgnu
14923 export TEST_TAR_FORMAT
14924 TAR_OPTIONS="-H oldgnu"
14925 export TAR_OPTIONS
14926 rm -rf *
14927
14928
14929 test -z "`sort < /dev/null 2>&1`" || exit 77
14930
14931 mkdir foo
14932 genfile --file foo/file1
14933 genfile --file foo/file2
14934 mkdir foo/bar
14935 genfile --file foo/bar/file.r
14936 mkdir foo/bar/baz
14937 genfile --file foo/bar/baz/file.z
14938
14939 sleep 1
14940
14941 echo "Creating base archive"
14942 tar -g incr -cf arch.1 -v foo
14943
14944 mv foo/bar/baz foo
14945
14946 echo "Creating incremental archive"
14947 tar -g incr -cf arch.2 -v foo
14948
14949 mv foo old
14950
14951 tar xfg arch.1 /dev/null 2>tmperr
14952 sort tmperr >&2
14953
14954 echo "Begin directory listing 1"
14955 find foo | sort
14956 echo "End directory listing 1"
14957
14958 tar xfgv arch.2 /dev/null
14959 echo Begin directory listing 2
14960 find foo | sort
14961 echo End directory listing 2
14962 ) ) >"$at_stdout" 2>"$at_stder1"
14963     at_status=$?
14964     grep '^ *+' "$at_stder1" >&2
14965     grep -v '^ *+' "$at_stder1" >"$at_stderr"
14966 else
14967     ( :;
14968 mkdir oldgnu
14969 (cd oldgnu
14970 TEST_TAR_FORMAT=oldgnu
14971 export TEST_TAR_FORMAT
14972 TAR_OPTIONS="-H oldgnu"
14973 export TAR_OPTIONS
14974 rm -rf *
14975
14976
14977 test -z "`sort < /dev/null 2>&1`" || exit 77
14978
14979 mkdir foo
14980 genfile --file foo/file1
14981 genfile --file foo/file2
14982 mkdir foo/bar
14983 genfile --file foo/bar/file.r
14984 mkdir foo/bar/baz
14985 genfile --file foo/bar/baz/file.z
14986
14987 sleep 1
14988
14989 echo "Creating base archive"
14990 tar -g incr -cf arch.1 -v foo
14991
14992 mv foo/bar/baz foo
14993
14994 echo "Creating incremental archive"
14995 tar -g incr -cf arch.2 -v foo
14996
14997 mv foo old
14998
14999 tar xfg arch.1 /dev/null 2>tmperr
15000 sort tmperr >&2
15001
15002 echo "Begin directory listing 1"
15003 find foo | sort
15004 echo "End directory listing 1"
15005
15006 tar xfgv arch.2 /dev/null
15007 echo Begin directory listing 2
15008 find foo | sort
15009 echo End directory listing 2
15010 ) ) >"$at_stdout" 2>"$at_stderr"
15011     at_status=$?
15012 fi
15013
15014 at_failed=false
15015 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
15016 tar: foo/bar/baz: Directory is new
15017 tar: foo/baz: Directory has been renamed from \`foo/bar/baz'
15018 " | $at_diff - "$at_stderr" || at_failed=:
15019 echo >>"$at_stdout"; echo "Creating base archive
15020 foo/
15021 foo/bar/
15022 foo/bar/baz/
15023 foo/file1
15024 foo/file2
15025 foo/bar/file.r
15026 foo/bar/baz/file.z
15027 Creating incremental archive
15028 foo/
15029 foo/bar/
15030 foo/baz/
15031 Begin directory listing 1
15032 foo
15033 foo/bar
15034 foo/bar/baz
15035 foo/bar/baz/file.z
15036 foo/bar/file.r
15037 foo/file1
15038 foo/file2
15039 End directory listing 1
15040 foo/
15041 foo/bar/
15042 foo/baz/
15043 Begin directory listing 2
15044 foo
15045 foo/bar
15046 foo/bar/file.r
15047 foo/baz
15048 foo/baz/file.z
15049 foo/file1
15050 foo/file2
15051 End directory listing 2
15052 " | $at_diff - "$at_stdout" || at_failed=:
15053 case $at_status in
15054    77) echo 77 > "$at_status_file"; exit 77;;
15055    0) ;;
15056    *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0"
15057       at_failed=:;;
15058 esac
15059 if $at_failed; then
15060
15061
15062   echo 1 > "$at_status_file"
15063   exit 1
15064 fi
15065
15066 $at_traceon
15067 $at_traceoff
15068 echo "$at_srcdir/rename02.at:27:
15069 mkdir posix
15070 (cd posix
15071 TEST_TAR_FORMAT=posix
15072 export TEST_TAR_FORMAT
15073 TAR_OPTIONS=\"-H posix\"
15074 export TAR_OPTIONS
15075 rm -rf *
15076
15077
15078 test -z "`sort < /dev/null 2>&1`" || exit 77
15079
15080 mkdir foo
15081 genfile --file foo/file1
15082 genfile --file foo/file2
15083 mkdir foo/bar
15084 genfile --file foo/bar/file.r
15085 mkdir foo/bar/baz
15086 genfile --file foo/bar/baz/file.z
15087
15088 sleep 1
15089
15090 echo \"Creating base archive\"
15091 tar -g incr -cf arch.1 -v foo
15092
15093 mv foo/bar/baz foo
15094
15095 echo \"Creating incremental archive\"
15096 tar -g incr -cf arch.2 -v foo
15097
15098 mv foo old
15099
15100 tar xfg arch.1 /dev/null 2>tmperr
15101 sort tmperr >&2
15102
15103 echo \"Begin directory listing 1\"
15104 find foo | sort
15105 echo \"End directory listing 1\"
15106
15107 tar xfgv arch.2 /dev/null
15108 echo Begin directory listing 2
15109 find foo | sort
15110 echo End directory listing 2
15111 )"
15112 echo rename02.at:27 >"$at_check_line_file"
15113
15114 at_trace_this=
15115 if test -n "$at_traceon"; then
15116     echo 'Not enabling shell tracing (command contains an embedded newline)'
15117 fi
15118
15119 if test -n "$at_trace_this"; then
15120     ( $at_traceon;
15121 mkdir posix
15122 (cd posix
15123 TEST_TAR_FORMAT=posix
15124 export TEST_TAR_FORMAT
15125 TAR_OPTIONS="-H posix"
15126 export TAR_OPTIONS
15127 rm -rf *
15128
15129
15130 test -z "`sort < /dev/null 2>&1`" || exit 77
15131
15132 mkdir foo
15133 genfile --file foo/file1
15134 genfile --file foo/file2
15135 mkdir foo/bar
15136 genfile --file foo/bar/file.r
15137 mkdir foo/bar/baz
15138 genfile --file foo/bar/baz/file.z
15139
15140 sleep 1
15141
15142 echo "Creating base archive"
15143 tar -g incr -cf arch.1 -v foo
15144
15145 mv foo/bar/baz foo
15146
15147 echo "Creating incremental archive"
15148 tar -g incr -cf arch.2 -v foo
15149
15150 mv foo old
15151
15152 tar xfg arch.1 /dev/null 2>tmperr
15153 sort tmperr >&2
15154
15155 echo "Begin directory listing 1"
15156 find foo | sort
15157 echo "End directory listing 1"
15158
15159 tar xfgv arch.2 /dev/null
15160 echo Begin directory listing 2
15161 find foo | sort
15162 echo End directory listing 2
15163 ) ) >"$at_stdout" 2>"$at_stder1"
15164     at_status=$?
15165     grep '^ *+' "$at_stder1" >&2
15166     grep -v '^ *+' "$at_stder1" >"$at_stderr"
15167 else
15168     ( :;
15169 mkdir posix
15170 (cd posix
15171 TEST_TAR_FORMAT=posix
15172 export TEST_TAR_FORMAT
15173 TAR_OPTIONS="-H posix"
15174 export TAR_OPTIONS
15175 rm -rf *
15176
15177
15178 test -z "`sort < /dev/null 2>&1`" || exit 77
15179
15180 mkdir foo
15181 genfile --file foo/file1
15182 genfile --file foo/file2
15183 mkdir foo/bar
15184 genfile --file foo/bar/file.r
15185 mkdir foo/bar/baz
15186 genfile --file foo/bar/baz/file.z
15187
15188 sleep 1
15189
15190 echo "Creating base archive"
15191 tar -g incr -cf arch.1 -v foo
15192
15193 mv foo/bar/baz foo
15194
15195 echo "Creating incremental archive"
15196 tar -g incr -cf arch.2 -v foo
15197
15198 mv foo old
15199
15200 tar xfg arch.1 /dev/null 2>tmperr
15201 sort tmperr >&2
15202
15203 echo "Begin directory listing 1"
15204 find foo | sort
15205 echo "End directory listing 1"
15206
15207 tar xfgv arch.2 /dev/null
15208 echo Begin directory listing 2
15209 find foo | sort
15210 echo End directory listing 2
15211 ) ) >"$at_stdout" 2>"$at_stderr"
15212     at_status=$?
15213 fi
15214
15215 at_failed=false
15216 echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new
15217 tar: foo/bar/baz: Directory is new
15218 tar: foo/baz: Directory has been renamed from \`foo/bar/baz'
15219 " | $at_diff - "$at_stderr" || at_failed=:
15220 echo >>"$at_stdout"; echo "Creating base archive
15221 foo/
15222 foo/bar/
15223 foo/bar/baz/
15224 foo/file1
15225 foo/file2
15226 foo/bar/file.r
15227 foo/bar/baz/file.z
15228 Creating incremental archive
15229 foo/
15230 foo/bar/
15231 foo/baz/
15232 Begin directory listing 1
15233 foo
15234 foo/bar
15235 foo/bar/baz
15236 foo/bar/baz/file.z
15237 foo/bar/file.r
15238 foo/file1
15239 foo/file2
15240 End directory listing 1
15241 foo/
15242 foo/bar/
15243 foo/baz/
15244 Begin directory listing 2
15245 foo
15246 foo/bar
15247 foo/bar/file.r
15248 foo/baz
15249 foo/baz/file.z
15250 foo/file1
15251 foo/file2
15252 End directory listing 2
15253 " | $at_diff - "$at_stdout" || at_failed=:
15254 case $at_status in
15255    77) echo 77 > "$at_status_file"; exit 77;;
15256    0) ;;
15257    *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0"
15258       at_failed=:;;
15259 esac
15260 if $at_failed; then
15261
15262
15263   echo 1 > "$at_status_file"
15264   exit 1
15265 fi
15266
15267 $at_traceon
15268
15269
15270
15271       $at_traceoff
15272       $at_times_p && times >"$at_times_file"
15273     ) 5>&1 2>&1 | eval $at_tee_pipe
15274     at_status=`cat "$at_status_file"`
15275     ;;
15276
15277   35 ) # 35. rename03.at:23: cyclic renames
15278     at_setup_line='rename03.at:23'
15279     at_desc="cyclic renames"
15280     $at_quiet $ECHO_N " 35: cyclic renames                                 $ECHO_C"
15281     at_xfail=no
15282       test -f $XFAILFILE && at_xfail=yes
15283     echo "#                             -*- compilation -*-" >> "$at_group_log"
15284     (
15285       echo "35. rename03.at:23: testing ..."
15286       $at_traceon
15287
15288
15289
15290
15291
15292   $at_traceoff
15293 echo "$at_srcdir/rename03.at:26:
15294 mkdir gnu
15295 (cd gnu
15296 TEST_TAR_FORMAT=gnu
15297 export TEST_TAR_FORMAT
15298 TAR_OPTIONS=\"-H gnu\"
15299 export TAR_OPTIONS
15300 rm -rf *
15301
15302
15303 test -z "`sort < /dev/null 2>&1`" || exit 77
15304
15305
15306 mkdir foo
15307 genfile --file foo/file1
15308 genfile --file foo/file2
15309
15310 mkdir foo/a
15311 genfile --file foo/a/filea
15312
15313 mkdir foo/b
15314 genfile --file foo/b/fileb
15315
15316 mkdir foo/c
15317 genfile --file foo/c/filec
15318
15319 sleep 1
15320
15321 echo \"First dump\"
15322 echo \"First dump\">&2
15323 tar -g incr -cf arch.1 -v foo 2>tmperr
15324 sort tmperr >&2
15325
15326 # Shuffle directories:
15327 (cd foo
15328 mv a \$\$
15329 mv c a
15330 mv b c
15331 mv \$\$ b)
15332
15333 echo \"Second dump\"
15334 echo \"Second dump\" >&2
15335 tar -g incr -cf arch.2 -v foo 2>tmperr
15336 sort tmperr >&2
15337
15338 tar xfg arch.1 /dev/null
15339
15340 echo \"Begin directory listing 1\"
15341 find foo | sort
15342 echo \"End directory listing 1\"
15343
15344 tar xfgv arch.2 /dev/null
15345 echo Begin directory listing 2
15346 find foo | sort
15347 echo End directory listing 2
15348 )"
15349 echo rename03.at:26 >"$at_check_line_file"
15350
15351 at_trace_this=
15352 if test -n "$at_traceon"; then
15353     echo 'Not enabling shell tracing (command contains an embedded newline)'
15354 fi
15355
15356 if test -n "$at_trace_this"; then
15357     ( $at_traceon;
15358 mkdir gnu
15359 (cd gnu
15360 TEST_TAR_FORMAT=gnu
15361 export TEST_TAR_FORMAT
15362 TAR_OPTIONS="-H gnu"
15363 export TAR_OPTIONS
15364 rm -rf *
15365
15366
15367 test -z "`sort < /dev/null 2>&1`" || exit 77
15368
15369
15370 mkdir foo
15371 genfile --file foo/file1
15372 genfile --file foo/file2
15373
15374 mkdir foo/a
15375 genfile --file foo/a/filea
15376
15377 mkdir foo/b
15378 genfile --file foo/b/fileb
15379
15380 mkdir foo/c
15381 genfile --file foo/c/filec
15382
15383 sleep 1
15384
15385 echo "First dump"
15386 echo "First dump">&2
15387 tar -g incr -cf arch.1 -v foo 2>tmperr
15388 sort tmperr >&2
15389
15390 # Shuffle directories:
15391 (cd foo
15392 mv a $$
15393 mv c a
15394 mv b c
15395 mv $$ b)
15396
15397 echo "Second dump"
15398 echo "Second dump" >&2
15399 tar -g incr -cf arch.2 -v foo 2>tmperr
15400 sort tmperr >&2
15401
15402 tar xfg arch.1 /dev/null
15403
15404 echo "Begin directory listing 1"
15405 find foo | sort
15406 echo "End directory listing 1"
15407
15408 tar xfgv arch.2 /dev/null
15409 echo Begin directory listing 2
15410 find foo | sort
15411 echo End directory listing 2
15412 ) ) >"$at_stdout" 2>"$at_stder1"
15413     at_status=$?
15414     grep '^ *+' "$at_stder1" >&2
15415     grep -v '^ *+' "$at_stder1" >"$at_stderr"
15416 else
15417     ( :;
15418 mkdir gnu
15419 (cd gnu
15420 TEST_TAR_FORMAT=gnu
15421 export TEST_TAR_FORMAT
15422 TAR_OPTIONS="-H gnu"
15423 export TAR_OPTIONS
15424 rm -rf *
15425
15426
15427 test -z "`sort < /dev/null 2>&1`" || exit 77
15428
15429
15430 mkdir foo
15431 genfile --file foo/file1
15432 genfile --file foo/file2
15433
15434 mkdir foo/a
15435 genfile --file foo/a/filea
15436
15437 mkdir foo/b
15438 genfile --file foo/b/fileb
15439
15440 mkdir foo/c
15441 genfile --file foo/c/filec
15442
15443 sleep 1
15444
15445 echo "First dump"
15446 echo "First dump">&2
15447 tar -g incr -cf arch.1 -v foo 2>tmperr
15448 sort tmperr >&2
15449
15450 # Shuffle directories:
15451 (cd foo
15452 mv a $$
15453 mv c a
15454 mv b c
15455 mv $$ b)
15456
15457 echo "Second dump"
15458 echo "Second dump" >&2
15459 tar -g incr -cf arch.2 -v foo 2>tmperr
15460 sort tmperr >&2
15461
15462 tar xfg arch.1 /dev/null
15463
15464 echo "Begin directory listing 1"
15465 find foo | sort
15466 echo "End directory listing 1"
15467
15468 tar xfgv arch.2 /dev/null
15469 echo Begin directory listing 2
15470 find foo | sort
15471 echo End directory listing 2
15472 ) ) >"$at_stdout" 2>"$at_stderr"
15473     at_status=$?
15474 fi
15475
15476 at_failed=false
15477 echo >>"$at_stderr"; echo "First dump
15478 tar: foo/a: Directory is new
15479 tar: foo/b: Directory is new
15480 tar: foo/c: Directory is new
15481 Second dump
15482 tar: foo/a: Directory has been renamed from \`foo/c'
15483 tar: foo/b: Directory has been renamed from \`foo/a'
15484 tar: foo/c: Directory has been renamed from \`foo/b'
15485 " | $at_diff - "$at_stderr" || at_failed=:
15486 echo >>"$at_stdout"; echo "First dump
15487 foo/
15488 foo/a/
15489 foo/b/
15490 foo/c/
15491 foo/file1
15492 foo/file2
15493 foo/a/filea
15494 foo/b/fileb
15495 foo/c/filec
15496 Second dump
15497 foo/
15498 foo/a/
15499 foo/b/
15500 foo/c/
15501 Begin directory listing 1
15502 foo
15503 foo/a
15504 foo/a/filea
15505 foo/b
15506 foo/b/fileb
15507 foo/c
15508 foo/c/filec
15509 foo/file1
15510 foo/file2
15511 End directory listing 1
15512 foo/
15513 foo/a/
15514 foo/b/
15515 foo/c/
15516 Begin directory listing 2
15517 foo
15518 foo/a
15519 foo/a/filec
15520 foo/b
15521 foo/b/filea
15522 foo/c
15523 foo/c/fileb
15524 foo/file1
15525 foo/file2
15526 End directory listing 2
15527 " | $at_diff - "$at_stdout" || at_failed=:
15528 case $at_status in
15529    77) echo 77 > "$at_status_file"; exit 77;;
15530    0) ;;
15531    *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0"
15532       at_failed=:;;
15533 esac
15534 if $at_failed; then
15535
15536
15537   echo 1 > "$at_status_file"
15538   exit 1
15539 fi
15540
15541 $at_traceon
15542 $at_traceoff
15543 echo "$at_srcdir/rename03.at:26:
15544 mkdir oldgnu
15545 (cd oldgnu
15546 TEST_TAR_FORMAT=oldgnu
15547 export TEST_TAR_FORMAT
15548 TAR_OPTIONS=\"-H oldgnu\"
15549 export TAR_OPTIONS
15550 rm -rf *
15551
15552
15553 test -z "`sort < /dev/null 2>&1`" || exit 77
15554
15555
15556 mkdir foo
15557 genfile --file foo/file1
15558 genfile --file foo/file2
15559
15560 mkdir foo/a
15561 genfile --file foo/a/filea
15562
15563 mkdir foo/b
15564 genfile --file foo/b/fileb
15565
15566 mkdir foo/c
15567 genfile --file foo/c/filec
15568
15569 sleep 1
15570
15571 echo \"First dump\"
15572 echo \"First dump\">&2
15573 tar -g incr -cf arch.1 -v foo 2>tmperr
15574 sort tmperr >&2
15575
15576 # Shuffle directories:
15577 (cd foo
15578 mv a \$\$
15579 mv c a
15580 mv b c
15581 mv \$\$ b)
15582
15583 echo \"Second dump\"
15584 echo \"Second dump\" >&2
15585 tar -g incr -cf arch.2 -v foo 2>tmperr
15586 sort tmperr >&2
15587
15588 tar xfg arch.1 /dev/null
15589
15590 echo \"Begin directory listing 1\"
15591 find foo | sort
15592 echo \"End directory listing 1\"
15593
15594 tar xfgv arch.2 /dev/null
15595 echo Begin directory listing 2
15596 find foo | sort
15597 echo End directory listing 2
15598 )"
15599 echo rename03.at:26 >"$at_check_line_file"
15600
15601 at_trace_this=
15602 if test -n "$at_traceon"; then
15603     echo 'Not enabling shell tracing (command contains an embedded newline)'
15604 fi
15605
15606 if test -n "$at_trace_this"; then
15607     ( $at_traceon;
15608 mkdir oldgnu
15609 (cd oldgnu
15610 TEST_TAR_FORMAT=oldgnu
15611 export TEST_TAR_FORMAT
15612 TAR_OPTIONS="-H oldgnu"
15613 export TAR_OPTIONS
15614 rm -rf *
15615
15616
15617 test -z "`sort < /dev/null 2>&1`" || exit 77
15618
15619
15620 mkdir foo
15621 genfile --file foo/file1
15622 genfile --file foo/file2
15623
15624 mkdir foo/a
15625 genfile --file foo/a/filea
15626
15627 mkdir foo/b
15628 genfile --file foo/b/fileb
15629
15630 mkdir foo/c
15631 genfile --file foo/c/filec
15632
15633 sleep 1
15634
15635 echo "First dump"
15636 echo "First dump">&2
15637 tar -g incr -cf arch.1 -v foo 2>tmperr
15638 sort tmperr >&2
15639
15640 # Shuffle directories:
15641 (cd foo
15642 mv a $$
15643 mv c a
15644 mv b c
15645 mv $$ b)
15646
15647 echo "Second dump"
15648 echo "Second dump" >&2
15649 tar -g incr -cf arch.2 -v foo 2>tmperr
15650 sort tmperr >&2
15651
15652 tar xfg arch.1 /dev/null
15653
15654 echo "Begin directory listing 1"
15655 find foo | sort
15656 echo "End directory listing 1"
15657
15658 tar xfgv arch.2 /dev/null
15659 echo Begin directory listing 2
15660 find foo | sort
15661 echo End directory listing 2
15662 ) ) >"$at_stdout" 2>"$at_stder1"
15663     at_status=$?
15664     grep '^ *+' "$at_stder1" >&2
15665     grep -v '^ *+' "$at_stder1" >"$at_stderr"
15666 else
15667     ( :;
15668 mkdir oldgnu
15669 (cd oldgnu
15670 TEST_TAR_FORMAT=oldgnu
15671 export TEST_TAR_FORMAT
15672 TAR_OPTIONS="-H oldgnu"
15673 export TAR_OPTIONS
15674 rm -rf *
15675
15676
15677 test -z "`sort < /dev/null 2>&1`" || exit 77
15678
15679
15680 mkdir foo
15681 genfile --file foo/file1
15682 genfile --file foo/file2
15683
15684 mkdir foo/a
15685 genfile --file foo/a/filea
15686
15687 mkdir foo/b
15688 genfile --file foo/b/fileb
15689
15690 mkdir foo/c
15691 genfile --file foo/c/filec
15692
15693 sleep 1
15694
15695 echo "First dump"
15696 echo "First dump">&2
15697 tar -g incr -cf arch.1 -v foo 2>tmperr
15698 sort tmperr >&2
15699
15700 # Shuffle directories:
15701 (cd foo
15702 mv a $$
15703 mv c a
15704 mv b c
15705 mv $$ b)
15706
15707 echo "Second dump"
15708 echo "Second dump" >&2
15709 tar -g incr -cf arch.2 -v foo 2>tmperr
15710 sort tmperr >&2
15711
15712 tar xfg arch.1 /dev/null
15713
15714 echo "Begin directory listing 1"
15715 find foo | sort
15716 echo "End directory listing 1"
15717
15718 tar xfgv arch.2 /dev/null
15719 echo Begin directory listing 2
15720 find foo | sort
15721 echo End directory listing 2
15722 ) ) >"$at_stdout" 2>"$at_stderr"
15723     at_status=$?
15724 fi
15725
15726 at_failed=false
15727 echo >>"$at_stderr"; echo "First dump
15728 tar: foo/a: Directory is new
15729 tar: foo/b: Directory is new
15730 tar: foo/c: Directory is new
15731 Second dump
15732 tar: foo/a: Directory has been renamed from \`foo/c'
15733 tar: foo/b: Directory has been renamed from \`foo/a'
15734 tar: foo/c: Directory has been renamed from \`foo/b'
15735 " | $at_diff - "$at_stderr" || at_failed=:
15736 echo >>"$at_stdout"; echo "First dump
15737 foo/
15738 foo/a/
15739 foo/b/
15740 foo/c/
15741 foo/file1
15742 foo/file2
15743 foo/a/filea
15744 foo/b/fileb
15745 foo/c/filec
15746 Second dump
15747 foo/
15748 foo/a/
15749 foo/b/
15750 foo/c/
15751 Begin directory listing 1
15752 foo
15753 foo/a
15754 foo/a/filea
15755 foo/b
15756 foo/b/fileb
15757 foo/c
15758 foo/c/filec
15759 foo/file1
15760 foo/file2
15761 End directory listing 1
15762 foo/
15763 foo/a/
15764 foo/b/
15765 foo/c/
15766 Begin directory listing 2
15767 foo
15768 foo/a
15769 foo/a/filec
15770 foo/b
15771 foo/b/filea
15772 foo/c
15773 foo/c/fileb
15774 foo/file1
15775 foo/file2
15776 End directory listing 2
15777 " | $at_diff - "$at_stdout" || at_failed=:
15778 case $at_status in
15779    77) echo 77 > "$at_status_file"; exit 77;;
15780    0) ;;
15781    *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0"
15782       at_failed=:;;
15783 esac
15784 if $at_failed; then
15785
15786
15787   echo 1 > "$at_status_file"
15788   exit 1
15789 fi
15790
15791 $at_traceon
15792 $at_traceoff
15793 echo "$at_srcdir/rename03.at:26:
15794 mkdir posix
15795 (cd posix
15796 TEST_TAR_FORMAT=posix
15797 export TEST_TAR_FORMAT
15798 TAR_OPTIONS=\"-H posix\"
15799 export TAR_OPTIONS
15800 rm -rf *
15801
15802
15803 test -z "`sort < /dev/null 2>&1`" || exit 77
15804
15805
15806 mkdir foo
15807 genfile --file foo/file1
15808 genfile --file foo/file2
15809
15810 mkdir foo/a
15811 genfile --file foo/a/filea
15812
15813 mkdir foo/b
15814 genfile --file foo/b/fileb
15815
15816 mkdir foo/c
15817 genfile --file foo/c/filec
15818
15819 sleep 1
15820
15821 echo \"First dump\"
15822 echo \"First dump\">&2
15823 tar -g incr -cf arch.1 -v foo 2>tmperr
15824 sort tmperr >&2
15825
15826 # Shuffle directories:
15827 (cd foo
15828 mv a \$\$
15829 mv c a
15830 mv b c
15831 mv \$\$ b)
15832
15833 echo \"Second dump\"
15834 echo \"Second dump\" >&2
15835 tar -g incr -cf arch.2 -v foo 2>tmperr
15836 sort tmperr >&2
15837
15838 tar xfg arch.1 /dev/null
15839
15840 echo \"Begin directory listing 1\"
15841 find foo | sort
15842 echo \"End directory listing 1\"
15843
15844 tar xfgv arch.2 /dev/null
15845 echo Begin directory listing 2
15846 find foo | sort
15847 echo End directory listing 2
15848 )"
15849 echo rename03.at:26 >"$at_check_line_file"
15850
15851 at_trace_this=
15852 if test -n "$at_traceon"; then
15853     echo 'Not enabling shell tracing (command contains an embedded newline)'
15854 fi
15855
15856 if test -n "$at_trace_this"; then
15857     ( $at_traceon;
15858 mkdir posix
15859 (cd posix
15860 TEST_TAR_FORMAT=posix
15861 export TEST_TAR_FORMAT
15862 TAR_OPTIONS="-H posix"
15863 export TAR_OPTIONS
15864 rm -rf *
15865
15866
15867 test -z "`sort < /dev/null 2>&1`" || exit 77
15868
15869
15870 mkdir foo
15871 genfile --file foo/file1
15872 genfile --file foo/file2
15873
15874 mkdir foo/a
15875 genfile --file foo/a/filea
15876
15877 mkdir foo/b
15878 genfile --file foo/b/fileb
15879
15880 mkdir foo/c
15881 genfile --file foo/c/filec
15882
15883 sleep 1
15884
15885 echo "First dump"
15886 echo "First dump">&2
15887 tar -g incr -cf arch.1 -v foo 2>tmperr
15888 sort tmperr >&2
15889
15890 # Shuffle directories:
15891 (cd foo
15892 mv a $$
15893 mv c a
15894 mv b c
15895 mv $$ b)
15896
15897 echo "Second dump"
15898 echo "Second dump" >&2
15899 tar -g incr -cf arch.2 -v foo 2>tmperr
15900 sort tmperr >&2
15901
15902 tar xfg arch.1 /dev/null
15903
15904 echo "Begin directory listing 1"
15905 find foo | sort
15906 echo "End directory listing 1"
15907
15908 tar xfgv arch.2 /dev/null
15909 echo Begin directory listing 2
15910 find foo | sort
15911 echo End directory listing 2
15912 ) ) >"$at_stdout" 2>"$at_stder1"
15913     at_status=$?
15914     grep '^ *+' "$at_stder1" >&2
15915     grep -v '^ *+' "$at_stder1" >"$at_stderr"
15916 else
15917     ( :;
15918 mkdir posix
15919 (cd posix
15920 TEST_TAR_FORMAT=posix
15921 export TEST_TAR_FORMAT
15922 TAR_OPTIONS="-H posix"
15923 export TAR_OPTIONS
15924 rm -rf *
15925
15926
15927 test -z "`sort < /dev/null 2>&1`" || exit 77
15928
15929
15930 mkdir foo
15931 genfile --file foo/file1
15932 genfile --file foo/file2
15933
15934 mkdir foo/a
15935 genfile --file foo/a/filea
15936
15937 mkdir foo/b
15938 genfile --file foo/b/fileb
15939
15940 mkdir foo/c
15941 genfile --file foo/c/filec
15942
15943 sleep 1
15944
15945 echo "First dump"
15946 echo "First dump">&2
15947 tar -g incr -cf arch.1 -v foo 2>tmperr
15948 sort tmperr >&2
15949
15950 # Shuffle directories:
15951 (cd foo
15952 mv a $$
15953 mv c a
15954 mv b c
15955 mv $$ b)
15956
15957 echo "Second dump"
15958 echo "Second dump" >&2
15959 tar -g incr -cf arch.2 -v foo 2>tmperr
15960 sort tmperr >&2
15961
15962 tar xfg arch.1 /dev/null
15963
15964 echo "Begin directory listing 1"
15965 find foo | sort
15966 echo "End directory listing 1"
15967
15968 tar xfgv arch.2 /dev/null
15969 echo Begin directory listing 2
15970 find foo | sort
15971 echo End directory listing 2
15972 ) ) >"$at_stdout" 2>"$at_stderr"
15973     at_status=$?
15974 fi
15975
15976 at_failed=false
15977 echo >>"$at_stderr"; echo "First dump
15978 tar: foo/a: Directory is new
15979 tar: foo/b: Directory is new
15980 tar: foo/c: Directory is new
15981 Second dump
15982 tar: foo/a: Directory has been renamed from \`foo/c'
15983 tar: foo/b: Directory has been renamed from \`foo/a'
15984 tar: foo/c: Directory has been renamed from \`foo/b'
15985 " | $at_diff - "$at_stderr" || at_failed=:
15986 echo >>"$at_stdout"; echo "First dump
15987 foo/
15988 foo/a/
15989 foo/b/
15990 foo/c/
15991 foo/file1
15992 foo/file2
15993 foo/a/filea
15994 foo/b/fileb
15995 foo/c/filec
15996 Second dump
15997 foo/
15998 foo/a/
15999 foo/b/
16000 foo/c/
16001 Begin directory listing 1
16002 foo
16003 foo/a
16004 foo/a/filea
16005 foo/b
16006 foo/b/fileb
16007 foo/c
16008 foo/c/filec
16009 foo/file1
16010 foo/file2
16011 End directory listing 1
16012 foo/
16013 foo/a/
16014 foo/b/
16015 foo/c/
16016 Begin directory listing 2
16017 foo
16018 foo/a
16019 foo/a/filec
16020 foo/b
16021 foo/b/filea
16022 foo/c
16023 foo/c/fileb
16024 foo/file1
16025 foo/file2
16026 End directory listing 2
16027 " | $at_diff - "$at_stdout" || at_failed=:
16028 case $at_status in
16029    77) echo 77 > "$at_status_file"; exit 77;;
16030    0) ;;
16031    *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0"
16032       at_failed=:;;
16033 esac
16034 if $at_failed; then
16035
16036
16037   echo 1 > "$at_status_file"
16038   exit 1
16039 fi
16040
16041 $at_traceon
16042
16043
16044
16045       $at_traceoff
16046       $at_times_p && times >"$at_times_file"
16047     ) 5>&1 2>&1 | eval $at_tee_pipe
16048     at_status=`cat "$at_status_file"`
16049     ;;
16050
16051   36 ) # 36. chtype.at:27: changed file types in incrementals
16052     at_setup_line='chtype.at:27'
16053     at_desc="changed file types in incrementals"
16054     $at_quiet $ECHO_N " 36: changed file types in incrementals             $ECHO_C"
16055     at_xfail=no
16056       test -f $XFAILFILE && at_xfail=yes
16057     echo "#                             -*- compilation -*-" >> "$at_group_log"
16058     (
16059       echo "36. chtype.at:27: testing ..."
16060       $at_traceon
16061
16062
16063
16064
16065
16066   $at_traceoff
16067 echo "$at_srcdir/chtype.at:30:
16068 mkdir gnu
16069 (cd gnu
16070 TEST_TAR_FORMAT=gnu
16071 export TEST_TAR_FORMAT
16072 TAR_OPTIONS=\"-H gnu\"
16073 export TAR_OPTIONS
16074 rm -rf *
16075
16076
16077 test -z "`sort < /dev/null 2>&1`" || exit 77
16078
16079
16080 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
16081 mkdir directory/a
16082 genfile --file directory/a/a
16083
16084 echo First backup
16085 tar --create --file=archive.1 --listed-incremental=db.1 directory
16086
16087 sleep 2
16088
16089 # Remove directory b and create a file with this name.
16090 # Previous versions were not able to restore over this file.
16091 rm -r directory/b
16092 genfile --file directory/b
16093 genfile --file directory/a/b
16094
16095 echo Second backup
16096 tar --create --file=archive.2 --listed-incremental=db.2 directory
16097
16098 # Delete a
16099 rm -r directory
16100
16101 echo Restore archive.1
16102 tar -xf archive.1 --listed-incremental=/dev/null
16103 echo Restore archive.2
16104 tar -xf archive.2 --listed-incremental=/dev/null
16105 find directory | sort
16106 )"
16107 echo chtype.at:30 >"$at_check_line_file"
16108
16109 at_trace_this=
16110 if test -n "$at_traceon"; then
16111     echo 'Not enabling shell tracing (command contains an embedded newline)'
16112 fi
16113
16114 if test -n "$at_trace_this"; then
16115     ( $at_traceon;
16116 mkdir gnu
16117 (cd gnu
16118 TEST_TAR_FORMAT=gnu
16119 export TEST_TAR_FORMAT
16120 TAR_OPTIONS="-H gnu"
16121 export TAR_OPTIONS
16122 rm -rf *
16123
16124
16125 test -z "`sort < /dev/null 2>&1`" || exit 77
16126
16127
16128 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
16129 mkdir directory/a
16130 genfile --file directory/a/a
16131
16132 echo First backup
16133 tar --create --file=archive.1 --listed-incremental=db.1 directory
16134
16135 sleep 2
16136
16137 # Remove directory b and create a file with this name.
16138 # Previous versions were not able to restore over this file.
16139 rm -r directory/b
16140 genfile --file directory/b
16141 genfile --file directory/a/b
16142
16143 echo Second backup
16144 tar --create --file=archive.2 --listed-incremental=db.2 directory
16145
16146 # Delete a
16147 rm -r directory
16148
16149 echo Restore archive.1
16150 tar -xf archive.1 --listed-incremental=/dev/null
16151 echo Restore archive.2
16152 tar -xf archive.2 --listed-incremental=/dev/null
16153 find directory | sort
16154 ) ) >"$at_stdout" 2>"$at_stder1"
16155     at_status=$?
16156     grep '^ *+' "$at_stder1" >&2
16157     grep -v '^ *+' "$at_stder1" >"$at_stderr"
16158 else
16159     ( :;
16160 mkdir gnu
16161 (cd gnu
16162 TEST_TAR_FORMAT=gnu
16163 export TEST_TAR_FORMAT
16164 TAR_OPTIONS="-H gnu"
16165 export TAR_OPTIONS
16166 rm -rf *
16167
16168
16169 test -z "`sort < /dev/null 2>&1`" || exit 77
16170
16171
16172 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
16173 mkdir directory/a
16174 genfile --file directory/a/a
16175
16176 echo First backup
16177 tar --create --file=archive.1 --listed-incremental=db.1 directory
16178
16179 sleep 2
16180
16181 # Remove directory b and create a file with this name.
16182 # Previous versions were not able to restore over this file.
16183 rm -r directory/b
16184 genfile --file directory/b
16185 genfile --file directory/a/b
16186
16187 echo Second backup
16188 tar --create --file=archive.2 --listed-incremental=db.2 directory
16189
16190 # Delete a
16191 rm -r directory
16192
16193 echo Restore archive.1
16194 tar -xf archive.1 --listed-incremental=/dev/null
16195 echo Restore archive.2
16196 tar -xf archive.2 --listed-incremental=/dev/null
16197 find directory | sort
16198 ) ) >"$at_stdout" 2>"$at_stderr"
16199     at_status=$?
16200 fi
16201
16202 at_failed=false
16203 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
16204 echo >>"$at_stdout"; echo "First backup
16205 Second backup
16206 Restore archive.1
16207 Restore archive.2
16208 directory
16209 directory/a
16210 directory/a/a
16211 directory/a/b
16212 directory/b
16213 " | $at_diff - "$at_stdout" || at_failed=:
16214 case $at_status in
16215    77) echo 77 > "$at_status_file"; exit 77;;
16216    0) ;;
16217    *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0"
16218       at_failed=:;;
16219 esac
16220 if $at_failed; then
16221
16222
16223   echo 1 > "$at_status_file"
16224   exit 1
16225 fi
16226
16227 $at_traceon
16228 $at_traceoff
16229 echo "$at_srcdir/chtype.at:30:
16230 mkdir oldgnu
16231 (cd oldgnu
16232 TEST_TAR_FORMAT=oldgnu
16233 export TEST_TAR_FORMAT
16234 TAR_OPTIONS=\"-H oldgnu\"
16235 export TAR_OPTIONS
16236 rm -rf *
16237
16238
16239 test -z "`sort < /dev/null 2>&1`" || exit 77
16240
16241
16242 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
16243 mkdir directory/a
16244 genfile --file directory/a/a
16245
16246 echo First backup
16247 tar --create --file=archive.1 --listed-incremental=db.1 directory
16248
16249 sleep 2
16250
16251 # Remove directory b and create a file with this name.
16252 # Previous versions were not able to restore over this file.
16253 rm -r directory/b
16254 genfile --file directory/b
16255 genfile --file directory/a/b
16256
16257 echo Second backup
16258 tar --create --file=archive.2 --listed-incremental=db.2 directory
16259
16260 # Delete a
16261 rm -r directory
16262
16263 echo Restore archive.1
16264 tar -xf archive.1 --listed-incremental=/dev/null
16265 echo Restore archive.2
16266 tar -xf archive.2 --listed-incremental=/dev/null
16267 find directory | sort
16268 )"
16269 echo chtype.at:30 >"$at_check_line_file"
16270
16271 at_trace_this=
16272 if test -n "$at_traceon"; then
16273     echo 'Not enabling shell tracing (command contains an embedded newline)'
16274 fi
16275
16276 if test -n "$at_trace_this"; then
16277     ( $at_traceon;
16278 mkdir oldgnu
16279 (cd oldgnu
16280 TEST_TAR_FORMAT=oldgnu
16281 export TEST_TAR_FORMAT
16282 TAR_OPTIONS="-H oldgnu"
16283 export TAR_OPTIONS
16284 rm -rf *
16285
16286
16287 test -z "`sort < /dev/null 2>&1`" || exit 77
16288
16289
16290 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
16291 mkdir directory/a
16292 genfile --file directory/a/a
16293
16294 echo First backup
16295 tar --create --file=archive.1 --listed-incremental=db.1 directory
16296
16297 sleep 2
16298
16299 # Remove directory b and create a file with this name.
16300 # Previous versions were not able to restore over this file.
16301 rm -r directory/b
16302 genfile --file directory/b
16303 genfile --file directory/a/b
16304
16305 echo Second backup
16306 tar --create --file=archive.2 --listed-incremental=db.2 directory
16307
16308 # Delete a
16309 rm -r directory
16310
16311 echo Restore archive.1
16312 tar -xf archive.1 --listed-incremental=/dev/null
16313 echo Restore archive.2
16314 tar -xf archive.2 --listed-incremental=/dev/null
16315 find directory | sort
16316 ) ) >"$at_stdout" 2>"$at_stder1"
16317     at_status=$?
16318     grep '^ *+' "$at_stder1" >&2
16319     grep -v '^ *+' "$at_stder1" >"$at_stderr"
16320 else
16321     ( :;
16322 mkdir oldgnu
16323 (cd oldgnu
16324 TEST_TAR_FORMAT=oldgnu
16325 export TEST_TAR_FORMAT
16326 TAR_OPTIONS="-H oldgnu"
16327 export TAR_OPTIONS
16328 rm -rf *
16329
16330
16331 test -z "`sort < /dev/null 2>&1`" || exit 77
16332
16333
16334 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
16335 mkdir directory/a
16336 genfile --file directory/a/a
16337
16338 echo First backup
16339 tar --create --file=archive.1 --listed-incremental=db.1 directory
16340
16341 sleep 2
16342
16343 # Remove directory b and create a file with this name.
16344 # Previous versions were not able to restore over this file.
16345 rm -r directory/b
16346 genfile --file directory/b
16347 genfile --file directory/a/b
16348
16349 echo Second backup
16350 tar --create --file=archive.2 --listed-incremental=db.2 directory
16351
16352 # Delete a
16353 rm -r directory
16354
16355 echo Restore archive.1
16356 tar -xf archive.1 --listed-incremental=/dev/null
16357 echo Restore archive.2
16358 tar -xf archive.2 --listed-incremental=/dev/null
16359 find directory | sort
16360 ) ) >"$at_stdout" 2>"$at_stderr"
16361     at_status=$?
16362 fi
16363
16364 at_failed=false
16365 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
16366 echo >>"$at_stdout"; echo "First backup
16367 Second backup
16368 Restore archive.1
16369 Restore archive.2
16370 directory
16371 directory/a
16372 directory/a/a
16373 directory/a/b
16374 directory/b
16375 " | $at_diff - "$at_stdout" || at_failed=:
16376 case $at_status in
16377    77) echo 77 > "$at_status_file"; exit 77;;
16378    0) ;;
16379    *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0"
16380       at_failed=:;;
16381 esac
16382 if $at_failed; then
16383
16384
16385   echo 1 > "$at_status_file"
16386   exit 1
16387 fi
16388
16389 $at_traceon
16390 $at_traceoff
16391 echo "$at_srcdir/chtype.at:30:
16392 mkdir posix
16393 (cd posix
16394 TEST_TAR_FORMAT=posix
16395 export TEST_TAR_FORMAT
16396 TAR_OPTIONS=\"-H posix\"
16397 export TAR_OPTIONS
16398 rm -rf *
16399
16400
16401 test -z "`sort < /dev/null 2>&1`" || exit 77
16402
16403
16404 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
16405 mkdir directory/a
16406 genfile --file directory/a/a
16407
16408 echo First backup
16409 tar --create --file=archive.1 --listed-incremental=db.1 directory
16410
16411 sleep 2
16412
16413 # Remove directory b and create a file with this name.
16414 # Previous versions were not able to restore over this file.
16415 rm -r directory/b
16416 genfile --file directory/b
16417 genfile --file directory/a/b
16418
16419 echo Second backup
16420 tar --create --file=archive.2 --listed-incremental=db.2 directory
16421
16422 # Delete a
16423 rm -r directory
16424
16425 echo Restore archive.1
16426 tar -xf archive.1 --listed-incremental=/dev/null
16427 echo Restore archive.2
16428 tar -xf archive.2 --listed-incremental=/dev/null
16429 find directory | sort
16430 )"
16431 echo chtype.at:30 >"$at_check_line_file"
16432
16433 at_trace_this=
16434 if test -n "$at_traceon"; then
16435     echo 'Not enabling shell tracing (command contains an embedded newline)'
16436 fi
16437
16438 if test -n "$at_trace_this"; then
16439     ( $at_traceon;
16440 mkdir posix
16441 (cd posix
16442 TEST_TAR_FORMAT=posix
16443 export TEST_TAR_FORMAT
16444 TAR_OPTIONS="-H posix"
16445 export TAR_OPTIONS
16446 rm -rf *
16447
16448
16449 test -z "`sort < /dev/null 2>&1`" || exit 77
16450
16451
16452 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
16453 mkdir directory/a
16454 genfile --file directory/a/a
16455
16456 echo First backup
16457 tar --create --file=archive.1 --listed-incremental=db.1 directory
16458
16459 sleep 2
16460
16461 # Remove directory b and create a file with this name.
16462 # Previous versions were not able to restore over this file.
16463 rm -r directory/b
16464 genfile --file directory/b
16465 genfile --file directory/a/b
16466
16467 echo Second backup
16468 tar --create --file=archive.2 --listed-incremental=db.2 directory
16469
16470 # Delete a
16471 rm -r directory
16472
16473 echo Restore archive.1
16474 tar -xf archive.1 --listed-incremental=/dev/null
16475 echo Restore archive.2
16476 tar -xf archive.2 --listed-incremental=/dev/null
16477 find directory | sort
16478 ) ) >"$at_stdout" 2>"$at_stder1"
16479     at_status=$?
16480     grep '^ *+' "$at_stder1" >&2
16481     grep -v '^ *+' "$at_stder1" >"$at_stderr"
16482 else
16483     ( :;
16484 mkdir posix
16485 (cd posix
16486 TEST_TAR_FORMAT=posix
16487 export TEST_TAR_FORMAT
16488 TAR_OPTIONS="-H posix"
16489 export TAR_OPTIONS
16490 rm -rf *
16491
16492
16493 test -z "`sort < /dev/null 2>&1`" || exit 77
16494
16495
16496 install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77
16497 mkdir directory/a
16498 genfile --file directory/a/a
16499
16500 echo First backup
16501 tar --create --file=archive.1 --listed-incremental=db.1 directory
16502
16503 sleep 2
16504
16505 # Remove directory b and create a file with this name.
16506 # Previous versions were not able to restore over this file.
16507 rm -r directory/b
16508 genfile --file directory/b
16509 genfile --file directory/a/b
16510
16511 echo Second backup
16512 tar --create --file=archive.2 --listed-incremental=db.2 directory
16513
16514 # Delete a
16515 rm -r directory
16516
16517 echo Restore archive.1
16518 tar -xf archive.1 --listed-incremental=/dev/null
16519 echo Restore archive.2
16520 tar -xf archive.2 --listed-incremental=/dev/null
16521 find directory | sort
16522 ) ) >"$at_stdout" 2>"$at_stderr"
16523     at_status=$?
16524 fi
16525
16526 at_failed=false
16527 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
16528 echo >>"$at_stdout"; echo "First backup
16529 Second backup
16530 Restore archive.1
16531 Restore archive.2
16532 directory
16533 directory/a
16534 directory/a/a
16535 directory/a/b
16536 directory/b
16537 " | $at_diff - "$at_stdout" || at_failed=:
16538 case $at_status in
16539    77) echo 77 > "$at_status_file"; exit 77;;
16540    0) ;;
16541    *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0"
16542       at_failed=:;;
16543 esac
16544 if $at_failed; then
16545
16546
16547   echo 1 > "$at_status_file"
16548   exit 1
16549 fi
16550
16551 $at_traceon
16552
16553
16554
16555       $at_traceoff
16556       $at_times_p && times >"$at_times_file"
16557     ) 5>&1 2>&1 | eval $at_tee_pipe
16558     at_status=`cat "$at_status_file"`
16559     ;;
16560
16561   37 ) # 37. ignfail.at:23: ignfail
16562     at_setup_line='ignfail.at:23'
16563     at_desc="ignfail"
16564     $at_quiet $ECHO_N " 37: ignfail                                        $ECHO_C"
16565     at_xfail=no
16566       test -f $XFAILFILE && at_xfail=yes
16567     echo "#                             -*- compilation -*-" >> "$at_group_log"
16568     (
16569       echo "37. ignfail.at:23: testing ..."
16570       $at_traceon
16571
16572
16573
16574
16575
16576   $at_traceoff
16577 echo "$at_srcdir/ignfail.at:26:
16578 mkdir v7
16579 (cd v7
16580 TEST_TAR_FORMAT=v7
16581 export TEST_TAR_FORMAT
16582 TAR_OPTIONS=\"-H v7\"
16583 export TAR_OPTIONS
16584 rm -rf *
16585
16586 # The test is meaningless for super-user.
16587
16588 echo "test" > $$
16589 chmod 0 $$
16590 cat $$ > /dev/null 2>&1
16591 result=$?
16592 rm -f $$
16593 test $result -eq 0 && exit 77
16594
16595
16596 touch file
16597 mkdir directory
16598 touch directory/file
16599
16600 echo 1>&2 -----
16601 chmod 000 file
16602 tar cf archive file
16603 status=\$?
16604 chmod 600 file
16605 test \$status = 2 || exit 1
16606
16607 echo 1>&2 -----
16608 chmod 000 file
16609 tar cf archive --ignore-failed-read file || exit 1
16610 status=\$?
16611 chmod 600 file
16612 test \$status = 0 || exit 1
16613
16614 echo 1>&2 -----
16615 chmod 000 directory
16616 tar cf archive directory
16617 status=\$?
16618 chmod 700 directory
16619 test \$status = 2 || exit 1
16620
16621 echo 1>&2 -----
16622 chmod 000 directory
16623 tar cf archive --ignore-failed-read directory || exit 1
16624 status=\$?
16625 chmod 700 directory
16626 test \$status = 0
16627 )"
16628 echo ignfail.at:26 >"$at_check_line_file"
16629
16630 at_trace_this=
16631 if test -n "$at_traceon"; then
16632     echo 'Not enabling shell tracing (command contains an embedded newline)'
16633 fi
16634
16635 if test -n "$at_trace_this"; then
16636     ( $at_traceon;
16637 mkdir v7
16638 (cd v7
16639 TEST_TAR_FORMAT=v7
16640 export TEST_TAR_FORMAT
16641 TAR_OPTIONS="-H v7"
16642 export TAR_OPTIONS
16643 rm -rf *
16644
16645 # The test is meaningless for super-user.
16646
16647 echo "test" > $$
16648 chmod 0 $$
16649 cat $$ > /dev/null 2>&1
16650 result=$?
16651 rm -f $$
16652 test $result -eq 0 && exit 77
16653
16654
16655 touch file
16656 mkdir directory
16657 touch directory/file
16658
16659 echo 1>&2 -----
16660 chmod 000 file
16661 tar cf archive file
16662 status=$?
16663 chmod 600 file
16664 test $status = 2 || exit 1
16665
16666 echo 1>&2 -----
16667 chmod 000 file
16668 tar cf archive --ignore-failed-read file || exit 1
16669 status=$?
16670 chmod 600 file
16671 test $status = 0 || exit 1
16672
16673 echo 1>&2 -----
16674 chmod 000 directory
16675 tar cf archive directory
16676 status=$?
16677 chmod 700 directory
16678 test $status = 2 || exit 1
16679
16680 echo 1>&2 -----
16681 chmod 000 directory
16682 tar cf archive --ignore-failed-read directory || exit 1
16683 status=$?
16684 chmod 700 directory
16685 test $status = 0
16686 ) ) >"$at_stdout" 2>"$at_stder1"
16687     at_status=$?
16688     grep '^ *+' "$at_stder1" >&2
16689     grep -v '^ *+' "$at_stder1" >"$at_stderr"
16690 else
16691     ( :;
16692 mkdir v7
16693 (cd v7
16694 TEST_TAR_FORMAT=v7
16695 export TEST_TAR_FORMAT
16696 TAR_OPTIONS="-H v7"
16697 export TAR_OPTIONS
16698 rm -rf *
16699
16700 # The test is meaningless for super-user.
16701
16702 echo "test" > $$
16703 chmod 0 $$
16704 cat $$ > /dev/null 2>&1
16705 result=$?
16706 rm -f $$
16707 test $result -eq 0 && exit 77
16708
16709
16710 touch file
16711 mkdir directory
16712 touch directory/file
16713
16714 echo 1>&2 -----
16715 chmod 000 file
16716 tar cf archive file
16717 status=$?
16718 chmod 600 file
16719 test $status = 2 || exit 1
16720
16721 echo 1>&2 -----
16722 chmod 000 file
16723 tar cf archive --ignore-failed-read file || exit 1
16724 status=$?
16725 chmod 600 file
16726 test $status = 0 || exit 1
16727
16728 echo 1>&2 -----
16729 chmod 000 directory
16730 tar cf archive directory
16731 status=$?
16732 chmod 700 directory
16733 test $status = 2 || exit 1
16734
16735 echo 1>&2 -----
16736 chmod 000 directory
16737 tar cf archive --ignore-failed-read directory || exit 1
16738 status=$?
16739 chmod 700 directory
16740 test $status = 0
16741 ) ) >"$at_stdout" 2>"$at_stderr"
16742     at_status=$?
16743 fi
16744
16745 at_failed=false
16746 echo >>"$at_stderr"; echo "-----
16747 tar: file: Cannot open: Permission denied
16748 tar: Error exit delayed from previous errors
16749 -----
16750 tar: file: Warning: Cannot open: Permission denied
16751 -----
16752 tar: directory: Cannot open: Permission denied
16753 tar: Error exit delayed from previous errors
16754 -----
16755 tar: directory: Warning: Cannot open: Permission denied
16756 " | $at_diff - "$at_stderr" || at_failed=:
16757 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
16758 case $at_status in
16759    77) echo 77 > "$at_status_file"; exit 77;;
16760    0) ;;
16761    *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
16762       at_failed=:;;
16763 esac
16764 if $at_failed; then
16765
16766
16767   echo 1 > "$at_status_file"
16768   exit 1
16769 fi
16770
16771 $at_traceon
16772 $at_traceoff
16773 echo "$at_srcdir/ignfail.at:26:
16774 mkdir oldgnu
16775 (cd oldgnu
16776 TEST_TAR_FORMAT=oldgnu
16777 export TEST_TAR_FORMAT
16778 TAR_OPTIONS=\"-H oldgnu\"
16779 export TAR_OPTIONS
16780 rm -rf *
16781
16782 # The test is meaningless for super-user.
16783
16784 echo "test" > $$
16785 chmod 0 $$
16786 cat $$ > /dev/null 2>&1
16787 result=$?
16788 rm -f $$
16789 test $result -eq 0 && exit 77
16790
16791
16792 touch file
16793 mkdir directory
16794 touch directory/file
16795
16796 echo 1>&2 -----
16797 chmod 000 file
16798 tar cf archive file
16799 status=\$?
16800 chmod 600 file
16801 test \$status = 2 || exit 1
16802
16803 echo 1>&2 -----
16804 chmod 000 file
16805 tar cf archive --ignore-failed-read file || exit 1
16806 status=\$?
16807 chmod 600 file
16808 test \$status = 0 || exit 1
16809
16810 echo 1>&2 -----
16811 chmod 000 directory
16812 tar cf archive directory
16813 status=\$?
16814 chmod 700 directory
16815 test \$status = 2 || exit 1
16816
16817 echo 1>&2 -----
16818 chmod 000 directory
16819 tar cf archive --ignore-failed-read directory || exit 1
16820 status=\$?
16821 chmod 700 directory
16822 test \$status = 0
16823 )"
16824 echo ignfail.at:26 >"$at_check_line_file"
16825
16826 at_trace_this=
16827 if test -n "$at_traceon"; then
16828     echo 'Not enabling shell tracing (command contains an embedded newline)'
16829 fi
16830
16831 if test -n "$at_trace_this"; then
16832     ( $at_traceon;
16833 mkdir oldgnu
16834 (cd oldgnu
16835 TEST_TAR_FORMAT=oldgnu
16836 export TEST_TAR_FORMAT
16837 TAR_OPTIONS="-H oldgnu"
16838 export TAR_OPTIONS
16839 rm -rf *
16840
16841 # The test is meaningless for super-user.
16842
16843 echo "test" > $$
16844 chmod 0 $$
16845 cat $$ > /dev/null 2>&1
16846 result=$?
16847 rm -f $$
16848 test $result -eq 0 && exit 77
16849
16850
16851 touch file
16852 mkdir directory
16853 touch directory/file
16854
16855 echo 1>&2 -----
16856 chmod 000 file
16857 tar cf archive file
16858 status=$?
16859 chmod 600 file
16860 test $status = 2 || exit 1
16861
16862 echo 1>&2 -----
16863 chmod 000 file
16864 tar cf archive --ignore-failed-read file || exit 1
16865 status=$?
16866 chmod 600 file
16867 test $status = 0 || exit 1
16868
16869 echo 1>&2 -----
16870 chmod 000 directory
16871 tar cf archive directory
16872 status=$?
16873 chmod 700 directory
16874 test $status = 2 || exit 1
16875
16876 echo 1>&2 -----
16877 chmod 000 directory
16878 tar cf archive --ignore-failed-read directory || exit 1
16879 status=$?
16880 chmod 700 directory
16881 test $status = 0
16882 ) ) >"$at_stdout" 2>"$at_stder1"
16883     at_status=$?
16884     grep '^ *+' "$at_stder1" >&2
16885     grep -v '^ *+' "$at_stder1" >"$at_stderr"
16886 else
16887     ( :;
16888 mkdir oldgnu
16889 (cd oldgnu
16890 TEST_TAR_FORMAT=oldgnu
16891 export TEST_TAR_FORMAT
16892 TAR_OPTIONS="-H oldgnu"
16893 export TAR_OPTIONS
16894 rm -rf *
16895
16896 # The test is meaningless for super-user.
16897
16898 echo "test" > $$
16899 chmod 0 $$
16900 cat $$ > /dev/null 2>&1
16901 result=$?
16902 rm -f $$
16903 test $result -eq 0 && exit 77
16904
16905
16906 touch file
16907 mkdir directory
16908 touch directory/file
16909
16910 echo 1>&2 -----
16911 chmod 000 file
16912 tar cf archive file
16913 status=$?
16914 chmod 600 file
16915 test $status = 2 || exit 1
16916
16917 echo 1>&2 -----
16918 chmod 000 file
16919 tar cf archive --ignore-failed-read file || exit 1
16920 status=$?
16921 chmod 600 file
16922 test $status = 0 || exit 1
16923
16924 echo 1>&2 -----
16925 chmod 000 directory
16926 tar cf archive directory
16927 status=$?
16928 chmod 700 directory
16929 test $status = 2 || exit 1
16930
16931 echo 1>&2 -----
16932 chmod 000 directory
16933 tar cf archive --ignore-failed-read directory || exit 1
16934 status=$?
16935 chmod 700 directory
16936 test $status = 0
16937 ) ) >"$at_stdout" 2>"$at_stderr"
16938     at_status=$?
16939 fi
16940
16941 at_failed=false
16942 echo >>"$at_stderr"; echo "-----
16943 tar: file: Cannot open: Permission denied
16944 tar: Error exit delayed from previous errors
16945 -----
16946 tar: file: Warning: Cannot open: Permission denied
16947 -----
16948 tar: directory: Cannot open: Permission denied
16949 tar: Error exit delayed from previous errors
16950 -----
16951 tar: directory: Warning: Cannot open: Permission denied
16952 " | $at_diff - "$at_stderr" || at_failed=:
16953 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
16954 case $at_status in
16955    77) echo 77 > "$at_status_file"; exit 77;;
16956    0) ;;
16957    *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
16958       at_failed=:;;
16959 esac
16960 if $at_failed; then
16961
16962
16963   echo 1 > "$at_status_file"
16964   exit 1
16965 fi
16966
16967 $at_traceon
16968 $at_traceoff
16969 echo "$at_srcdir/ignfail.at:26:
16970 mkdir ustar
16971 (cd ustar
16972 TEST_TAR_FORMAT=ustar
16973 export TEST_TAR_FORMAT
16974 TAR_OPTIONS=\"-H ustar\"
16975 export TAR_OPTIONS
16976 rm -rf *
16977
16978 # The test is meaningless for super-user.
16979
16980 echo "test" > $$
16981 chmod 0 $$
16982 cat $$ > /dev/null 2>&1
16983 result=$?
16984 rm -f $$
16985 test $result -eq 0 && exit 77
16986
16987
16988 touch file
16989 mkdir directory
16990 touch directory/file
16991
16992 echo 1>&2 -----
16993 chmod 000 file
16994 tar cf archive file
16995 status=\$?
16996 chmod 600 file
16997 test \$status = 2 || exit 1
16998
16999 echo 1>&2 -----
17000 chmod 000 file
17001 tar cf archive --ignore-failed-read file || exit 1
17002 status=\$?
17003 chmod 600 file
17004 test \$status = 0 || exit 1
17005
17006 echo 1>&2 -----
17007 chmod 000 directory
17008 tar cf archive directory
17009 status=\$?
17010 chmod 700 directory
17011 test \$status = 2 || exit 1
17012
17013 echo 1>&2 -----
17014 chmod 000 directory
17015 tar cf archive --ignore-failed-read directory || exit 1
17016 status=\$?
17017 chmod 700 directory
17018 test \$status = 0
17019 )"
17020 echo ignfail.at:26 >"$at_check_line_file"
17021
17022 at_trace_this=
17023 if test -n "$at_traceon"; then
17024     echo 'Not enabling shell tracing (command contains an embedded newline)'
17025 fi
17026
17027 if test -n "$at_trace_this"; then
17028     ( $at_traceon;
17029 mkdir ustar
17030 (cd ustar
17031 TEST_TAR_FORMAT=ustar
17032 export TEST_TAR_FORMAT
17033 TAR_OPTIONS="-H ustar"
17034 export TAR_OPTIONS
17035 rm -rf *
17036
17037 # The test is meaningless for super-user.
17038
17039 echo "test" > $$
17040 chmod 0 $$
17041 cat $$ > /dev/null 2>&1
17042 result=$?
17043 rm -f $$
17044 test $result -eq 0 && exit 77
17045
17046
17047 touch file
17048 mkdir directory
17049 touch directory/file
17050
17051 echo 1>&2 -----
17052 chmod 000 file
17053 tar cf archive file
17054 status=$?
17055 chmod 600 file
17056 test $status = 2 || exit 1
17057
17058 echo 1>&2 -----
17059 chmod 000 file
17060 tar cf archive --ignore-failed-read file || exit 1
17061 status=$?
17062 chmod 600 file
17063 test $status = 0 || exit 1
17064
17065 echo 1>&2 -----
17066 chmod 000 directory
17067 tar cf archive directory
17068 status=$?
17069 chmod 700 directory
17070 test $status = 2 || exit 1
17071
17072 echo 1>&2 -----
17073 chmod 000 directory
17074 tar cf archive --ignore-failed-read directory || exit 1
17075 status=$?
17076 chmod 700 directory
17077 test $status = 0
17078 ) ) >"$at_stdout" 2>"$at_stder1"
17079     at_status=$?
17080     grep '^ *+' "$at_stder1" >&2
17081     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17082 else
17083     ( :;
17084 mkdir ustar
17085 (cd ustar
17086 TEST_TAR_FORMAT=ustar
17087 export TEST_TAR_FORMAT
17088 TAR_OPTIONS="-H ustar"
17089 export TAR_OPTIONS
17090 rm -rf *
17091
17092 # The test is meaningless for super-user.
17093
17094 echo "test" > $$
17095 chmod 0 $$
17096 cat $$ > /dev/null 2>&1
17097 result=$?
17098 rm -f $$
17099 test $result -eq 0 && exit 77
17100
17101
17102 touch file
17103 mkdir directory
17104 touch directory/file
17105
17106 echo 1>&2 -----
17107 chmod 000 file
17108 tar cf archive file
17109 status=$?
17110 chmod 600 file
17111 test $status = 2 || exit 1
17112
17113 echo 1>&2 -----
17114 chmod 000 file
17115 tar cf archive --ignore-failed-read file || exit 1
17116 status=$?
17117 chmod 600 file
17118 test $status = 0 || exit 1
17119
17120 echo 1>&2 -----
17121 chmod 000 directory
17122 tar cf archive directory
17123 status=$?
17124 chmod 700 directory
17125 test $status = 2 || exit 1
17126
17127 echo 1>&2 -----
17128 chmod 000 directory
17129 tar cf archive --ignore-failed-read directory || exit 1
17130 status=$?
17131 chmod 700 directory
17132 test $status = 0
17133 ) ) >"$at_stdout" 2>"$at_stderr"
17134     at_status=$?
17135 fi
17136
17137 at_failed=false
17138 echo >>"$at_stderr"; echo "-----
17139 tar: file: Cannot open: Permission denied
17140 tar: Error exit delayed from previous errors
17141 -----
17142 tar: file: Warning: Cannot open: Permission denied
17143 -----
17144 tar: directory: Cannot open: Permission denied
17145 tar: Error exit delayed from previous errors
17146 -----
17147 tar: directory: Warning: Cannot open: Permission denied
17148 " | $at_diff - "$at_stderr" || at_failed=:
17149 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
17150 case $at_status in
17151    77) echo 77 > "$at_status_file"; exit 77;;
17152    0) ;;
17153    *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
17154       at_failed=:;;
17155 esac
17156 if $at_failed; then
17157
17158
17159   echo 1 > "$at_status_file"
17160   exit 1
17161 fi
17162
17163 $at_traceon
17164 $at_traceoff
17165 echo "$at_srcdir/ignfail.at:26:
17166 mkdir posix
17167 (cd posix
17168 TEST_TAR_FORMAT=posix
17169 export TEST_TAR_FORMAT
17170 TAR_OPTIONS=\"-H posix\"
17171 export TAR_OPTIONS
17172 rm -rf *
17173
17174 # The test is meaningless for super-user.
17175
17176 echo "test" > $$
17177 chmod 0 $$
17178 cat $$ > /dev/null 2>&1
17179 result=$?
17180 rm -f $$
17181 test $result -eq 0 && exit 77
17182
17183
17184 touch file
17185 mkdir directory
17186 touch directory/file
17187
17188 echo 1>&2 -----
17189 chmod 000 file
17190 tar cf archive file
17191 status=\$?
17192 chmod 600 file
17193 test \$status = 2 || exit 1
17194
17195 echo 1>&2 -----
17196 chmod 000 file
17197 tar cf archive --ignore-failed-read file || exit 1
17198 status=\$?
17199 chmod 600 file
17200 test \$status = 0 || exit 1
17201
17202 echo 1>&2 -----
17203 chmod 000 directory
17204 tar cf archive directory
17205 status=\$?
17206 chmod 700 directory
17207 test \$status = 2 || exit 1
17208
17209 echo 1>&2 -----
17210 chmod 000 directory
17211 tar cf archive --ignore-failed-read directory || exit 1
17212 status=\$?
17213 chmod 700 directory
17214 test \$status = 0
17215 )"
17216 echo ignfail.at:26 >"$at_check_line_file"
17217
17218 at_trace_this=
17219 if test -n "$at_traceon"; then
17220     echo 'Not enabling shell tracing (command contains an embedded newline)'
17221 fi
17222
17223 if test -n "$at_trace_this"; then
17224     ( $at_traceon;
17225 mkdir posix
17226 (cd posix
17227 TEST_TAR_FORMAT=posix
17228 export TEST_TAR_FORMAT
17229 TAR_OPTIONS="-H posix"
17230 export TAR_OPTIONS
17231 rm -rf *
17232
17233 # The test is meaningless for super-user.
17234
17235 echo "test" > $$
17236 chmod 0 $$
17237 cat $$ > /dev/null 2>&1
17238 result=$?
17239 rm -f $$
17240 test $result -eq 0 && exit 77
17241
17242
17243 touch file
17244 mkdir directory
17245 touch directory/file
17246
17247 echo 1>&2 -----
17248 chmod 000 file
17249 tar cf archive file
17250 status=$?
17251 chmod 600 file
17252 test $status = 2 || exit 1
17253
17254 echo 1>&2 -----
17255 chmod 000 file
17256 tar cf archive --ignore-failed-read file || exit 1
17257 status=$?
17258 chmod 600 file
17259 test $status = 0 || exit 1
17260
17261 echo 1>&2 -----
17262 chmod 000 directory
17263 tar cf archive directory
17264 status=$?
17265 chmod 700 directory
17266 test $status = 2 || exit 1
17267
17268 echo 1>&2 -----
17269 chmod 000 directory
17270 tar cf archive --ignore-failed-read directory || exit 1
17271 status=$?
17272 chmod 700 directory
17273 test $status = 0
17274 ) ) >"$at_stdout" 2>"$at_stder1"
17275     at_status=$?
17276     grep '^ *+' "$at_stder1" >&2
17277     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17278 else
17279     ( :;
17280 mkdir posix
17281 (cd posix
17282 TEST_TAR_FORMAT=posix
17283 export TEST_TAR_FORMAT
17284 TAR_OPTIONS="-H posix"
17285 export TAR_OPTIONS
17286 rm -rf *
17287
17288 # The test is meaningless for super-user.
17289
17290 echo "test" > $$
17291 chmod 0 $$
17292 cat $$ > /dev/null 2>&1
17293 result=$?
17294 rm -f $$
17295 test $result -eq 0 && exit 77
17296
17297
17298 touch file
17299 mkdir directory
17300 touch directory/file
17301
17302 echo 1>&2 -----
17303 chmod 000 file
17304 tar cf archive file
17305 status=$?
17306 chmod 600 file
17307 test $status = 2 || exit 1
17308
17309 echo 1>&2 -----
17310 chmod 000 file
17311 tar cf archive --ignore-failed-read file || exit 1
17312 status=$?
17313 chmod 600 file
17314 test $status = 0 || exit 1
17315
17316 echo 1>&2 -----
17317 chmod 000 directory
17318 tar cf archive directory
17319 status=$?
17320 chmod 700 directory
17321 test $status = 2 || exit 1
17322
17323 echo 1>&2 -----
17324 chmod 000 directory
17325 tar cf archive --ignore-failed-read directory || exit 1
17326 status=$?
17327 chmod 700 directory
17328 test $status = 0
17329 ) ) >"$at_stdout" 2>"$at_stderr"
17330     at_status=$?
17331 fi
17332
17333 at_failed=false
17334 echo >>"$at_stderr"; echo "-----
17335 tar: file: Cannot open: Permission denied
17336 tar: Error exit delayed from previous errors
17337 -----
17338 tar: file: Warning: Cannot open: Permission denied
17339 -----
17340 tar: directory: Cannot open: Permission denied
17341 tar: Error exit delayed from previous errors
17342 -----
17343 tar: directory: Warning: Cannot open: Permission denied
17344 " | $at_diff - "$at_stderr" || at_failed=:
17345 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
17346 case $at_status in
17347    77) echo 77 > "$at_status_file"; exit 77;;
17348    0) ;;
17349    *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
17350       at_failed=:;;
17351 esac
17352 if $at_failed; then
17353
17354
17355   echo 1 > "$at_status_file"
17356   exit 1
17357 fi
17358
17359 $at_traceon
17360 $at_traceoff
17361 echo "$at_srcdir/ignfail.at:26:
17362 mkdir gnu
17363 (cd gnu
17364 TEST_TAR_FORMAT=gnu
17365 export TEST_TAR_FORMAT
17366 TAR_OPTIONS=\"-H gnu\"
17367 export TAR_OPTIONS
17368 rm -rf *
17369
17370 # The test is meaningless for super-user.
17371
17372 echo "test" > $$
17373 chmod 0 $$
17374 cat $$ > /dev/null 2>&1
17375 result=$?
17376 rm -f $$
17377 test $result -eq 0 && exit 77
17378
17379
17380 touch file
17381 mkdir directory
17382 touch directory/file
17383
17384 echo 1>&2 -----
17385 chmod 000 file
17386 tar cf archive file
17387 status=\$?
17388 chmod 600 file
17389 test \$status = 2 || exit 1
17390
17391 echo 1>&2 -----
17392 chmod 000 file
17393 tar cf archive --ignore-failed-read file || exit 1
17394 status=\$?
17395 chmod 600 file
17396 test \$status = 0 || exit 1
17397
17398 echo 1>&2 -----
17399 chmod 000 directory
17400 tar cf archive directory
17401 status=\$?
17402 chmod 700 directory
17403 test \$status = 2 || exit 1
17404
17405 echo 1>&2 -----
17406 chmod 000 directory
17407 tar cf archive --ignore-failed-read directory || exit 1
17408 status=\$?
17409 chmod 700 directory
17410 test \$status = 0
17411 )"
17412 echo ignfail.at:26 >"$at_check_line_file"
17413
17414 at_trace_this=
17415 if test -n "$at_traceon"; then
17416     echo 'Not enabling shell tracing (command contains an embedded newline)'
17417 fi
17418
17419 if test -n "$at_trace_this"; then
17420     ( $at_traceon;
17421 mkdir gnu
17422 (cd gnu
17423 TEST_TAR_FORMAT=gnu
17424 export TEST_TAR_FORMAT
17425 TAR_OPTIONS="-H gnu"
17426 export TAR_OPTIONS
17427 rm -rf *
17428
17429 # The test is meaningless for super-user.
17430
17431 echo "test" > $$
17432 chmod 0 $$
17433 cat $$ > /dev/null 2>&1
17434 result=$?
17435 rm -f $$
17436 test $result -eq 0 && exit 77
17437
17438
17439 touch file
17440 mkdir directory
17441 touch directory/file
17442
17443 echo 1>&2 -----
17444 chmod 000 file
17445 tar cf archive file
17446 status=$?
17447 chmod 600 file
17448 test $status = 2 || exit 1
17449
17450 echo 1>&2 -----
17451 chmod 000 file
17452 tar cf archive --ignore-failed-read file || exit 1
17453 status=$?
17454 chmod 600 file
17455 test $status = 0 || exit 1
17456
17457 echo 1>&2 -----
17458 chmod 000 directory
17459 tar cf archive directory
17460 status=$?
17461 chmod 700 directory
17462 test $status = 2 || exit 1
17463
17464 echo 1>&2 -----
17465 chmod 000 directory
17466 tar cf archive --ignore-failed-read directory || exit 1
17467 status=$?
17468 chmod 700 directory
17469 test $status = 0
17470 ) ) >"$at_stdout" 2>"$at_stder1"
17471     at_status=$?
17472     grep '^ *+' "$at_stder1" >&2
17473     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17474 else
17475     ( :;
17476 mkdir gnu
17477 (cd gnu
17478 TEST_TAR_FORMAT=gnu
17479 export TEST_TAR_FORMAT
17480 TAR_OPTIONS="-H gnu"
17481 export TAR_OPTIONS
17482 rm -rf *
17483
17484 # The test is meaningless for super-user.
17485
17486 echo "test" > $$
17487 chmod 0 $$
17488 cat $$ > /dev/null 2>&1
17489 result=$?
17490 rm -f $$
17491 test $result -eq 0 && exit 77
17492
17493
17494 touch file
17495 mkdir directory
17496 touch directory/file
17497
17498 echo 1>&2 -----
17499 chmod 000 file
17500 tar cf archive file
17501 status=$?
17502 chmod 600 file
17503 test $status = 2 || exit 1
17504
17505 echo 1>&2 -----
17506 chmod 000 file
17507 tar cf archive --ignore-failed-read file || exit 1
17508 status=$?
17509 chmod 600 file
17510 test $status = 0 || exit 1
17511
17512 echo 1>&2 -----
17513 chmod 000 directory
17514 tar cf archive directory
17515 status=$?
17516 chmod 700 directory
17517 test $status = 2 || exit 1
17518
17519 echo 1>&2 -----
17520 chmod 000 directory
17521 tar cf archive --ignore-failed-read directory || exit 1
17522 status=$?
17523 chmod 700 directory
17524 test $status = 0
17525 ) ) >"$at_stdout" 2>"$at_stderr"
17526     at_status=$?
17527 fi
17528
17529 at_failed=false
17530 echo >>"$at_stderr"; echo "-----
17531 tar: file: Cannot open: Permission denied
17532 tar: Error exit delayed from previous errors
17533 -----
17534 tar: file: Warning: Cannot open: Permission denied
17535 -----
17536 tar: directory: Cannot open: Permission denied
17537 tar: Error exit delayed from previous errors
17538 -----
17539 tar: directory: Warning: Cannot open: Permission denied
17540 " | $at_diff - "$at_stderr" || at_failed=:
17541 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
17542 case $at_status in
17543    77) echo 77 > "$at_status_file"; exit 77;;
17544    0) ;;
17545    *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0"
17546       at_failed=:;;
17547 esac
17548 if $at_failed; then
17549
17550
17551   echo 1 > "$at_status_file"
17552   exit 1
17553 fi
17554
17555 $at_traceon
17556
17557
17558
17559       $at_traceoff
17560       $at_times_p && times >"$at_times_file"
17561     ) 5>&1 2>&1 | eval $at_tee_pipe
17562     at_status=`cat "$at_status_file"`
17563     ;;
17564
17565   38 ) # 38. link01.at:33: link count gt 2
17566     at_setup_line='link01.at:33'
17567     at_desc="link count gt 2"
17568     $at_quiet $ECHO_N " 38: link count gt 2                                $ECHO_C"
17569     at_xfail=no
17570       test -f $XFAILFILE && at_xfail=yes
17571     echo "#                             -*- compilation -*-" >> "$at_group_log"
17572     (
17573       echo "38. link01.at:33: testing ..."
17574       $at_traceon
17575
17576
17577
17578
17579
17580   $at_traceoff
17581 echo "$at_srcdir/link01.at:36:
17582 mkdir v7
17583 (cd v7
17584 TEST_TAR_FORMAT=v7
17585 export TEST_TAR_FORMAT
17586 TAR_OPTIONS=\"-H v7\"
17587 export TAR_OPTIONS
17588 rm -rf *
17589
17590 mkdir directory
17591 mkdir directory/test1
17592 mkdir directory/test2
17593
17594 echo TEST > directory/test1/test.txt
17595 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17596
17597 tar cf archive directory/test1/test.txt directory/test1/test.txt
17598
17599 rm -r directory
17600 tar xf archive
17601
17602 ls directory/test1
17603 )"
17604 echo link01.at:36 >"$at_check_line_file"
17605
17606 at_trace_this=
17607 if test -n "$at_traceon"; then
17608     echo 'Not enabling shell tracing (command contains an embedded newline)'
17609 fi
17610
17611 if test -n "$at_trace_this"; then
17612     ( $at_traceon;
17613 mkdir v7
17614 (cd v7
17615 TEST_TAR_FORMAT=v7
17616 export TEST_TAR_FORMAT
17617 TAR_OPTIONS="-H v7"
17618 export TAR_OPTIONS
17619 rm -rf *
17620
17621 mkdir directory
17622 mkdir directory/test1
17623 mkdir directory/test2
17624
17625 echo TEST > directory/test1/test.txt
17626 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17627
17628 tar cf archive directory/test1/test.txt directory/test1/test.txt
17629
17630 rm -r directory
17631 tar xf archive
17632
17633 ls directory/test1
17634 ) ) >"$at_stdout" 2>"$at_stder1"
17635     at_status=$?
17636     grep '^ *+' "$at_stder1" >&2
17637     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17638 else
17639     ( :;
17640 mkdir v7
17641 (cd v7
17642 TEST_TAR_FORMAT=v7
17643 export TEST_TAR_FORMAT
17644 TAR_OPTIONS="-H v7"
17645 export TAR_OPTIONS
17646 rm -rf *
17647
17648 mkdir directory
17649 mkdir directory/test1
17650 mkdir directory/test2
17651
17652 echo TEST > directory/test1/test.txt
17653 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17654
17655 tar cf archive directory/test1/test.txt directory/test1/test.txt
17656
17657 rm -r directory
17658 tar xf archive
17659
17660 ls directory/test1
17661 ) ) >"$at_stdout" 2>"$at_stderr"
17662     at_status=$?
17663 fi
17664
17665 at_failed=false
17666 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
17667 echo >>"$at_stdout"; echo "test.txt
17668 " | $at_diff - "$at_stdout" || at_failed=:
17669 case $at_status in
17670    77) echo 77 > "$at_status_file"; exit 77;;
17671    0) ;;
17672    *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
17673       at_failed=:;;
17674 esac
17675 if $at_failed; then
17676
17677
17678   echo 1 > "$at_status_file"
17679   exit 1
17680 fi
17681
17682 $at_traceon
17683 $at_traceoff
17684 echo "$at_srcdir/link01.at:36:
17685 mkdir oldgnu
17686 (cd oldgnu
17687 TEST_TAR_FORMAT=oldgnu
17688 export TEST_TAR_FORMAT
17689 TAR_OPTIONS=\"-H oldgnu\"
17690 export TAR_OPTIONS
17691 rm -rf *
17692
17693 mkdir directory
17694 mkdir directory/test1
17695 mkdir directory/test2
17696
17697 echo TEST > directory/test1/test.txt
17698 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17699
17700 tar cf archive directory/test1/test.txt directory/test1/test.txt
17701
17702 rm -r directory
17703 tar xf archive
17704
17705 ls directory/test1
17706 )"
17707 echo link01.at:36 >"$at_check_line_file"
17708
17709 at_trace_this=
17710 if test -n "$at_traceon"; then
17711     echo 'Not enabling shell tracing (command contains an embedded newline)'
17712 fi
17713
17714 if test -n "$at_trace_this"; then
17715     ( $at_traceon;
17716 mkdir oldgnu
17717 (cd oldgnu
17718 TEST_TAR_FORMAT=oldgnu
17719 export TEST_TAR_FORMAT
17720 TAR_OPTIONS="-H oldgnu"
17721 export TAR_OPTIONS
17722 rm -rf *
17723
17724 mkdir directory
17725 mkdir directory/test1
17726 mkdir directory/test2
17727
17728 echo TEST > directory/test1/test.txt
17729 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17730
17731 tar cf archive directory/test1/test.txt directory/test1/test.txt
17732
17733 rm -r directory
17734 tar xf archive
17735
17736 ls directory/test1
17737 ) ) >"$at_stdout" 2>"$at_stder1"
17738     at_status=$?
17739     grep '^ *+' "$at_stder1" >&2
17740     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17741 else
17742     ( :;
17743 mkdir oldgnu
17744 (cd oldgnu
17745 TEST_TAR_FORMAT=oldgnu
17746 export TEST_TAR_FORMAT
17747 TAR_OPTIONS="-H oldgnu"
17748 export TAR_OPTIONS
17749 rm -rf *
17750
17751 mkdir directory
17752 mkdir directory/test1
17753 mkdir directory/test2
17754
17755 echo TEST > directory/test1/test.txt
17756 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17757
17758 tar cf archive directory/test1/test.txt directory/test1/test.txt
17759
17760 rm -r directory
17761 tar xf archive
17762
17763 ls directory/test1
17764 ) ) >"$at_stdout" 2>"$at_stderr"
17765     at_status=$?
17766 fi
17767
17768 at_failed=false
17769 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
17770 echo >>"$at_stdout"; echo "test.txt
17771 " | $at_diff - "$at_stdout" || at_failed=:
17772 case $at_status in
17773    77) echo 77 > "$at_status_file"; exit 77;;
17774    0) ;;
17775    *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
17776       at_failed=:;;
17777 esac
17778 if $at_failed; then
17779
17780
17781   echo 1 > "$at_status_file"
17782   exit 1
17783 fi
17784
17785 $at_traceon
17786 $at_traceoff
17787 echo "$at_srcdir/link01.at:36:
17788 mkdir ustar
17789 (cd ustar
17790 TEST_TAR_FORMAT=ustar
17791 export TEST_TAR_FORMAT
17792 TAR_OPTIONS=\"-H ustar\"
17793 export TAR_OPTIONS
17794 rm -rf *
17795
17796 mkdir directory
17797 mkdir directory/test1
17798 mkdir directory/test2
17799
17800 echo TEST > directory/test1/test.txt
17801 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17802
17803 tar cf archive directory/test1/test.txt directory/test1/test.txt
17804
17805 rm -r directory
17806 tar xf archive
17807
17808 ls directory/test1
17809 )"
17810 echo link01.at:36 >"$at_check_line_file"
17811
17812 at_trace_this=
17813 if test -n "$at_traceon"; then
17814     echo 'Not enabling shell tracing (command contains an embedded newline)'
17815 fi
17816
17817 if test -n "$at_trace_this"; then
17818     ( $at_traceon;
17819 mkdir ustar
17820 (cd ustar
17821 TEST_TAR_FORMAT=ustar
17822 export TEST_TAR_FORMAT
17823 TAR_OPTIONS="-H ustar"
17824 export TAR_OPTIONS
17825 rm -rf *
17826
17827 mkdir directory
17828 mkdir directory/test1
17829 mkdir directory/test2
17830
17831 echo TEST > directory/test1/test.txt
17832 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17833
17834 tar cf archive directory/test1/test.txt directory/test1/test.txt
17835
17836 rm -r directory
17837 tar xf archive
17838
17839 ls directory/test1
17840 ) ) >"$at_stdout" 2>"$at_stder1"
17841     at_status=$?
17842     grep '^ *+' "$at_stder1" >&2
17843     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17844 else
17845     ( :;
17846 mkdir ustar
17847 (cd ustar
17848 TEST_TAR_FORMAT=ustar
17849 export TEST_TAR_FORMAT
17850 TAR_OPTIONS="-H ustar"
17851 export TAR_OPTIONS
17852 rm -rf *
17853
17854 mkdir directory
17855 mkdir directory/test1
17856 mkdir directory/test2
17857
17858 echo TEST > directory/test1/test.txt
17859 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17860
17861 tar cf archive directory/test1/test.txt directory/test1/test.txt
17862
17863 rm -r directory
17864 tar xf archive
17865
17866 ls directory/test1
17867 ) ) >"$at_stdout" 2>"$at_stderr"
17868     at_status=$?
17869 fi
17870
17871 at_failed=false
17872 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
17873 echo >>"$at_stdout"; echo "test.txt
17874 " | $at_diff - "$at_stdout" || at_failed=:
17875 case $at_status in
17876    77) echo 77 > "$at_status_file"; exit 77;;
17877    0) ;;
17878    *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
17879       at_failed=:;;
17880 esac
17881 if $at_failed; then
17882
17883
17884   echo 1 > "$at_status_file"
17885   exit 1
17886 fi
17887
17888 $at_traceon
17889 $at_traceoff
17890 echo "$at_srcdir/link01.at:36:
17891 mkdir posix
17892 (cd posix
17893 TEST_TAR_FORMAT=posix
17894 export TEST_TAR_FORMAT
17895 TAR_OPTIONS=\"-H posix\"
17896 export TAR_OPTIONS
17897 rm -rf *
17898
17899 mkdir directory
17900 mkdir directory/test1
17901 mkdir directory/test2
17902
17903 echo TEST > directory/test1/test.txt
17904 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17905
17906 tar cf archive directory/test1/test.txt directory/test1/test.txt
17907
17908 rm -r directory
17909 tar xf archive
17910
17911 ls directory/test1
17912 )"
17913 echo link01.at:36 >"$at_check_line_file"
17914
17915 at_trace_this=
17916 if test -n "$at_traceon"; then
17917     echo 'Not enabling shell tracing (command contains an embedded newline)'
17918 fi
17919
17920 if test -n "$at_trace_this"; then
17921     ( $at_traceon;
17922 mkdir posix
17923 (cd posix
17924 TEST_TAR_FORMAT=posix
17925 export TEST_TAR_FORMAT
17926 TAR_OPTIONS="-H posix"
17927 export TAR_OPTIONS
17928 rm -rf *
17929
17930 mkdir directory
17931 mkdir directory/test1
17932 mkdir directory/test2
17933
17934 echo TEST > directory/test1/test.txt
17935 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17936
17937 tar cf archive directory/test1/test.txt directory/test1/test.txt
17938
17939 rm -r directory
17940 tar xf archive
17941
17942 ls directory/test1
17943 ) ) >"$at_stdout" 2>"$at_stder1"
17944     at_status=$?
17945     grep '^ *+' "$at_stder1" >&2
17946     grep -v '^ *+' "$at_stder1" >"$at_stderr"
17947 else
17948     ( :;
17949 mkdir posix
17950 (cd posix
17951 TEST_TAR_FORMAT=posix
17952 export TEST_TAR_FORMAT
17953 TAR_OPTIONS="-H posix"
17954 export TAR_OPTIONS
17955 rm -rf *
17956
17957 mkdir directory
17958 mkdir directory/test1
17959 mkdir directory/test2
17960
17961 echo TEST > directory/test1/test.txt
17962 ln directory/test1/test.txt directory/test2/test.txt || exit 77
17963
17964 tar cf archive directory/test1/test.txt directory/test1/test.txt
17965
17966 rm -r directory
17967 tar xf archive
17968
17969 ls directory/test1
17970 ) ) >"$at_stdout" 2>"$at_stderr"
17971     at_status=$?
17972 fi
17973
17974 at_failed=false
17975 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
17976 echo >>"$at_stdout"; echo "test.txt
17977 " | $at_diff - "$at_stdout" || at_failed=:
17978 case $at_status in
17979    77) echo 77 > "$at_status_file"; exit 77;;
17980    0) ;;
17981    *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
17982       at_failed=:;;
17983 esac
17984 if $at_failed; then
17985
17986
17987   echo 1 > "$at_status_file"
17988   exit 1
17989 fi
17990
17991 $at_traceon
17992 $at_traceoff
17993 echo "$at_srcdir/link01.at:36:
17994 mkdir gnu
17995 (cd gnu
17996 TEST_TAR_FORMAT=gnu
17997 export TEST_TAR_FORMAT
17998 TAR_OPTIONS=\"-H gnu\"
17999 export TAR_OPTIONS
18000 rm -rf *
18001
18002 mkdir directory
18003 mkdir directory/test1
18004 mkdir directory/test2
18005
18006 echo TEST > directory/test1/test.txt
18007 ln directory/test1/test.txt directory/test2/test.txt || exit 77
18008
18009 tar cf archive directory/test1/test.txt directory/test1/test.txt
18010
18011 rm -r directory
18012 tar xf archive
18013
18014 ls directory/test1
18015 )"
18016 echo link01.at:36 >"$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 gnu
18026 (cd gnu
18027 TEST_TAR_FORMAT=gnu
18028 export TEST_TAR_FORMAT
18029 TAR_OPTIONS="-H gnu"
18030 export TAR_OPTIONS
18031 rm -rf *
18032
18033 mkdir directory
18034 mkdir directory/test1
18035 mkdir directory/test2
18036
18037 echo TEST > directory/test1/test.txt
18038 ln directory/test1/test.txt directory/test2/test.txt || exit 77
18039
18040 tar cf archive directory/test1/test.txt directory/test1/test.txt
18041
18042 rm -r directory
18043 tar xf archive
18044
18045 ls directory/test1
18046 ) ) >"$at_stdout" 2>"$at_stder1"
18047     at_status=$?
18048     grep '^ *+' "$at_stder1" >&2
18049     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18050 else
18051     ( :;
18052 mkdir gnu
18053 (cd gnu
18054 TEST_TAR_FORMAT=gnu
18055 export TEST_TAR_FORMAT
18056 TAR_OPTIONS="-H gnu"
18057 export TAR_OPTIONS
18058 rm -rf *
18059
18060 mkdir directory
18061 mkdir directory/test1
18062 mkdir directory/test2
18063
18064 echo TEST > directory/test1/test.txt
18065 ln directory/test1/test.txt directory/test2/test.txt || exit 77
18066
18067 tar cf archive directory/test1/test.txt directory/test1/test.txt
18068
18069 rm -r directory
18070 tar xf archive
18071
18072 ls directory/test1
18073 ) ) >"$at_stdout" 2>"$at_stderr"
18074     at_status=$?
18075 fi
18076
18077 at_failed=false
18078 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
18079 echo >>"$at_stdout"; echo "test.txt
18080 " | $at_diff - "$at_stdout" || at_failed=:
18081 case $at_status in
18082    77) echo 77 > "$at_status_file"; exit 77;;
18083    0) ;;
18084    *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0"
18085       at_failed=:;;
18086 esac
18087 if $at_failed; then
18088
18089
18090   echo 1 > "$at_status_file"
18091   exit 1
18092 fi
18093
18094 $at_traceon
18095
18096
18097
18098       $at_traceoff
18099       $at_times_p && times >"$at_times_file"
18100     ) 5>&1 2>&1 | eval $at_tee_pipe
18101     at_status=`cat "$at_status_file"`
18102     ;;
18103
18104   39 ) # 39. longv7.at:24: long names in V7 archives
18105     at_setup_line='longv7.at:24'
18106     at_desc="long names in V7 archives"
18107     $at_quiet $ECHO_N " 39: long names in V7 archives                      $ECHO_C"
18108     at_xfail=no
18109       test -f $XFAILFILE && at_xfail=yes
18110     echo "#                             -*- compilation -*-" >> "$at_group_log"
18111     (
18112       echo "39. longv7.at:24: testing ..."
18113       $at_traceon
18114
18115
18116
18117
18118
18119
18120
18121
18122   $at_traceoff
18123 echo "$at_srcdir/longv7.at:30:
18124 mkdir v7
18125 (cd v7
18126 TEST_TAR_FORMAT=v7
18127 export TEST_TAR_FORMAT
18128 TAR_OPTIONS=\"-H v7\"
18129 export TAR_OPTIONS
18130 rm -rf *
18131
18132 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
18133 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
18134
18135 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
18136 echo separator
18137 tar tf archive
18138 )"
18139 echo longv7.at:30 >"$at_check_line_file"
18140
18141 at_trace_this=
18142 if test -n "$at_traceon"; then
18143     echo 'Not enabling shell tracing (command contains an embedded newline)'
18144 fi
18145
18146 if test -n "$at_trace_this"; then
18147     ( $at_traceon;
18148 mkdir v7
18149 (cd v7
18150 TEST_TAR_FORMAT=v7
18151 export TEST_TAR_FORMAT
18152 TAR_OPTIONS="-H v7"
18153 export TAR_OPTIONS
18154 rm -rf *
18155
18156 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
18157 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
18158
18159 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
18160 echo separator
18161 tar tf archive
18162 ) ) >"$at_stdout" 2>"$at_stder1"
18163     at_status=$?
18164     grep '^ *+' "$at_stder1" >&2
18165     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18166 else
18167     ( :;
18168 mkdir v7
18169 (cd v7
18170 TEST_TAR_FORMAT=v7
18171 export TEST_TAR_FORMAT
18172 TAR_OPTIONS="-H v7"
18173 export TAR_OPTIONS
18174 rm -rf *
18175
18176 mkdir this_is_a_very_long_name_for_a_directory_which_causes_problems
18177 touch this_is_a_very_long_name_for_a_directory_which_causes_problems/this_is_a_very_long_file_name_which_raises_issues.c
18178
18179 tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems
18180 echo separator
18181 tar tf archive
18182 ) ) >"$at_stdout" 2>"$at_stderr"
18183     at_status=$?
18184 fi
18185
18186 at_failed=false
18187 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
18188 tar: Error exit delayed from previous errors
18189 " | $at_diff - "$at_stderr" || at_failed=:
18190 echo >>"$at_stdout"; echo "separator
18191 this_is_a_very_long_name_for_a_directory_which_causes_problems/
18192 " | $at_diff - "$at_stdout" || at_failed=:
18193 case $at_status in
18194    77) echo 77 > "$at_status_file"; exit 77;;
18195    0) ;;
18196    *) echo "$at_srcdir/longv7.at:30: exit code was $at_status, expected 0"
18197       at_failed=:;;
18198 esac
18199 if $at_failed; then
18200
18201
18202   echo 1 > "$at_status_file"
18203   exit 1
18204 fi
18205
18206 $at_traceon
18207
18208
18209
18210       $at_traceoff
18211       $at_times_p && times >"$at_times_file"
18212     ) 5>&1 2>&1 | eval $at_tee_pipe
18213     at_status=`cat "$at_status_file"`
18214     ;;
18215
18216   40 ) # 40. long01.at:28: long file names divisible by block size
18217     at_setup_line='long01.at:28'
18218     at_desc="long file names divisible by block size"
18219     $at_quiet $ECHO_N " 40: long file names divisible by block size        $ECHO_C"
18220     at_xfail=no
18221       test -f $XFAILFILE && at_xfail=yes
18222     echo "#                             -*- compilation -*-" >> "$at_group_log"
18223     (
18224       echo "40. long01.at:28: testing ..."
18225       $at_traceon
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235   $at_traceoff
18236 echo "$at_srcdir/long01.at:36:
18237 mkdir gnu
18238 (cd gnu
18239 TEST_TAR_FORMAT=gnu
18240 export TEST_TAR_FORMAT
18241 TAR_OPTIONS=\"-H gnu\"
18242 export TAR_OPTIONS
18243 rm -rf *
18244
18245
18246 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
18247 echo test > endfile
18248
18249 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
18250 tar tf archive)"
18251 echo long01.at:36 >"$at_check_line_file"
18252
18253 at_trace_this=
18254 if test -n "$at_traceon"; then
18255     echo 'Not enabling shell tracing (command contains an embedded newline)'
18256 fi
18257
18258 if test -n "$at_trace_this"; then
18259     ( $at_traceon;
18260 mkdir gnu
18261 (cd gnu
18262 TEST_TAR_FORMAT=gnu
18263 export TEST_TAR_FORMAT
18264 TAR_OPTIONS="-H gnu"
18265 export TAR_OPTIONS
18266 rm -rf *
18267
18268
18269 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
18270 echo test > endfile
18271
18272 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
18273 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
18274     at_status=$?
18275     grep '^ *+' "$at_stder1" >&2
18276     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18277 else
18278     ( :;
18279 mkdir gnu
18280 (cd gnu
18281 TEST_TAR_FORMAT=gnu
18282 export TEST_TAR_FORMAT
18283 TAR_OPTIONS="-H gnu"
18284 export TAR_OPTIONS
18285 rm -rf *
18286
18287
18288 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
18289 echo test > endfile
18290
18291 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
18292 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
18293     at_status=$?
18294 fi
18295
18296 at_failed=false
18297 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
18298 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
18299 endfile
18300 " | $at_diff - "$at_stdout" || at_failed=:
18301 case $at_status in
18302    77) echo 77 > "$at_status_file"; exit 77;;
18303    0) ;;
18304    *) echo "$at_srcdir/long01.at:36: exit code was $at_status, expected 0"
18305       at_failed=:;;
18306 esac
18307 if $at_failed; then
18308
18309
18310   echo 1 > "$at_status_file"
18311   exit 1
18312 fi
18313
18314 $at_traceon
18315 $at_traceoff
18316 echo "$at_srcdir/long01.at:36:
18317 mkdir oldgnu
18318 (cd oldgnu
18319 TEST_TAR_FORMAT=oldgnu
18320 export TEST_TAR_FORMAT
18321 TAR_OPTIONS=\"-H oldgnu\"
18322 export TAR_OPTIONS
18323 rm -rf *
18324
18325
18326 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
18327 echo test > endfile
18328
18329 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
18330 tar tf archive)"
18331 echo long01.at:36 >"$at_check_line_file"
18332
18333 at_trace_this=
18334 if test -n "$at_traceon"; then
18335     echo 'Not enabling shell tracing (command contains an embedded newline)'
18336 fi
18337
18338 if test -n "$at_trace_this"; then
18339     ( $at_traceon;
18340 mkdir oldgnu
18341 (cd oldgnu
18342 TEST_TAR_FORMAT=oldgnu
18343 export TEST_TAR_FORMAT
18344 TAR_OPTIONS="-H oldgnu"
18345 export TAR_OPTIONS
18346 rm -rf *
18347
18348
18349 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
18350 echo test > endfile
18351
18352 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
18353 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
18354     at_status=$?
18355     grep '^ *+' "$at_stder1" >&2
18356     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18357 else
18358     ( :;
18359 mkdir oldgnu
18360 (cd oldgnu
18361 TEST_TAR_FORMAT=oldgnu
18362 export TEST_TAR_FORMAT
18363 TAR_OPTIONS="-H oldgnu"
18364 export TAR_OPTIONS
18365 rm -rf *
18366
18367
18368 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
18369 echo test > endfile
18370
18371 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
18372 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
18373     at_status=$?
18374 fi
18375
18376 at_failed=false
18377 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
18378 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
18379 endfile
18380 " | $at_diff - "$at_stdout" || at_failed=:
18381 case $at_status in
18382    77) echo 77 > "$at_status_file"; exit 77;;
18383    0) ;;
18384    *) echo "$at_srcdir/long01.at:36: exit code was $at_status, expected 0"
18385       at_failed=:;;
18386 esac
18387 if $at_failed; then
18388
18389
18390   echo 1 > "$at_status_file"
18391   exit 1
18392 fi
18393
18394 $at_traceon
18395
18396
18397
18398       $at_traceoff
18399       $at_times_p && times >"$at_times_file"
18400     ) 5>&1 2>&1 | eval $at_tee_pipe
18401     at_status=`cat "$at_status_file"`
18402     ;;
18403
18404   41 ) # 41. lustar01.at:21: ustar: unsplittable file name
18405     at_setup_line='lustar01.at:21'
18406     at_desc="ustar: unsplittable file name"
18407     $at_quiet $ECHO_N " 41: ustar: unsplittable file name                  $ECHO_C"
18408     at_xfail=no
18409       test -f $XFAILFILE && at_xfail=yes
18410     echo "#                             -*- compilation -*-" >> "$at_group_log"
18411     (
18412       echo "41. lustar01.at:21: testing ..."
18413       $at_traceon
18414
18415
18416
18417
18418
18419
18420
18421   $at_traceoff
18422 echo "$at_srcdir/lustar01.at:27:
18423 mkdir ustar
18424 (cd ustar
18425 TEST_TAR_FORMAT=ustar
18426 export TEST_TAR_FORMAT
18427 TAR_OPTIONS=\"-H ustar\"
18428 export TAR_OPTIONS
18429 rm -rf *
18430
18431 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
18432 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
18433 )"
18434 echo lustar01.at:27 >"$at_check_line_file"
18435
18436 at_trace_this=
18437 if test -n "$at_traceon"; then
18438     echo 'Not enabling shell tracing (command contains an embedded newline)'
18439 fi
18440
18441 if test -n "$at_trace_this"; then
18442     ( $at_traceon;
18443 mkdir ustar
18444 (cd ustar
18445 TEST_TAR_FORMAT=ustar
18446 export TEST_TAR_FORMAT
18447 TAR_OPTIONS="-H ustar"
18448 export TAR_OPTIONS
18449 rm -rf *
18450
18451 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
18452 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
18453 ) ) >"$at_stdout" 2>"$at_stder1"
18454     at_status=$?
18455     grep '^ *+' "$at_stder1" >&2
18456     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18457 else
18458     ( :;
18459 mkdir ustar
18460 (cd ustar
18461 TEST_TAR_FORMAT=ustar
18462 export TEST_TAR_FORMAT
18463 TAR_OPTIONS="-H ustar"
18464 export TAR_OPTIONS
18465 rm -rf *
18466
18467 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
18468 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
18469 ) ) >"$at_stdout" 2>"$at_stderr"
18470     at_status=$?
18471 fi
18472
18473 at_failed=false
18474 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
18475 tar: Error exit delayed from previous errors
18476 " | $at_diff - "$at_stderr" || at_failed=:
18477 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
18478 case $at_status in
18479    77) echo 77 > "$at_status_file"; exit 77;;
18480    2) ;;
18481    *) echo "$at_srcdir/lustar01.at:27: exit code was $at_status, expected 2"
18482       at_failed=:;;
18483 esac
18484 if $at_failed; then
18485
18486
18487   echo 1 > "$at_status_file"
18488   exit 1
18489 fi
18490
18491 $at_traceon
18492
18493
18494
18495       $at_traceoff
18496       $at_times_p && times >"$at_times_file"
18497     ) 5>&1 2>&1 | eval $at_tee_pipe
18498     at_status=`cat "$at_status_file"`
18499     ;;
18500
18501   42 ) # 42. lustar02.at:21: ustar: unsplittable path name
18502     at_setup_line='lustar02.at:21'
18503     at_desc="ustar: unsplittable path name"
18504     $at_quiet $ECHO_N " 42: ustar: unsplittable path name                  $ECHO_C"
18505     at_xfail=no
18506       test -f $XFAILFILE && at_xfail=yes
18507     echo "#                             -*- compilation -*-" >> "$at_group_log"
18508     (
18509       echo "42. lustar02.at:21: testing ..."
18510       $at_traceon
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522   $at_traceoff
18523 echo "$at_srcdir/lustar02.at:32:
18524 mkdir ustar
18525 (cd ustar
18526 TEST_TAR_FORMAT=ustar
18527 export TEST_TAR_FORMAT
18528 TAR_OPTIONS=\"-H ustar\"
18529 export TAR_OPTIONS
18530 rm -rf *
18531
18532
18533 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
18534 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
18535 )"
18536 echo lustar02.at:32 >"$at_check_line_file"
18537
18538 at_trace_this=
18539 if test -n "$at_traceon"; then
18540     echo 'Not enabling shell tracing (command contains an embedded newline)'
18541 fi
18542
18543 if test -n "$at_trace_this"; then
18544     ( $at_traceon;
18545 mkdir ustar
18546 (cd ustar
18547 TEST_TAR_FORMAT=ustar
18548 export TEST_TAR_FORMAT
18549 TAR_OPTIONS="-H ustar"
18550 export TAR_OPTIONS
18551 rm -rf *
18552
18553
18554 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
18555 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
18556 ) ) >"$at_stdout" 2>"$at_stder1"
18557     at_status=$?
18558     grep '^ *+' "$at_stder1" >&2
18559     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18560 else
18561     ( :;
18562 mkdir ustar
18563 (cd ustar
18564 TEST_TAR_FORMAT=ustar
18565 export TEST_TAR_FORMAT
18566 TAR_OPTIONS="-H ustar"
18567 export TAR_OPTIONS
18568 rm -rf *
18569
18570
18571 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
18572 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
18573 ) ) >"$at_stdout" 2>"$at_stderr"
18574     at_status=$?
18575 fi
18576
18577 at_failed=false
18578 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
18579 tar: Error exit delayed from previous errors
18580 " | $at_diff - "$at_stderr" || at_failed=:
18581 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
18582 case $at_status in
18583    77) echo 77 > "$at_status_file"; exit 77;;
18584    2) ;;
18585    *) echo "$at_srcdir/lustar02.at:32: exit code was $at_status, expected 2"
18586       at_failed=:;;
18587 esac
18588 if $at_failed; then
18589
18590
18591   echo 1 > "$at_status_file"
18592   exit 1
18593 fi
18594
18595 $at_traceon
18596
18597
18598
18599       $at_traceoff
18600       $at_times_p && times >"$at_times_file"
18601     ) 5>&1 2>&1 | eval $at_tee_pipe
18602     at_status=`cat "$at_status_file"`
18603     ;;
18604
18605   43 ) # 43. lustar03.at:21: ustar: splitting long names
18606     at_setup_line='lustar03.at:21'
18607     at_desc="ustar: splitting long names"
18608     $at_quiet $ECHO_N " 43: ustar: splitting long names                    $ECHO_C"
18609     at_xfail=no
18610       test -f $XFAILFILE && at_xfail=yes
18611     echo "#                             -*- compilation -*-" >> "$at_group_log"
18612     (
18613       echo "43. lustar03.at:21: testing ..."
18614       $at_traceon
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624   $at_traceoff
18625 echo "$at_srcdir/lustar03.at:29:
18626 mkdir ustar
18627 (cd ustar
18628 TEST_TAR_FORMAT=ustar
18629 export TEST_TAR_FORMAT
18630 TAR_OPTIONS=\"-H ustar\"
18631 export TAR_OPTIONS
18632 rm -rf *
18633
18634
18635 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
18636 echo \"Create archive\"
18637 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
18638 echo \"List archive\"
18639 tar tf archive)"
18640 echo lustar03.at:29 >"$at_check_line_file"
18641
18642 at_trace_this=
18643 if test -n "$at_traceon"; then
18644     echo 'Not enabling shell tracing (command contains an embedded newline)'
18645 fi
18646
18647 if test -n "$at_trace_this"; then
18648     ( $at_traceon;
18649 mkdir ustar
18650 (cd ustar
18651 TEST_TAR_FORMAT=ustar
18652 export TEST_TAR_FORMAT
18653 TAR_OPTIONS="-H ustar"
18654 export TAR_OPTIONS
18655 rm -rf *
18656
18657
18658 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
18659 echo "Create archive"
18660 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
18661 echo "List archive"
18662 tar tf archive) ) >"$at_stdout" 2>"$at_stder1"
18663     at_status=$?
18664     grep '^ *+' "$at_stder1" >&2
18665     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18666 else
18667     ( :;
18668 mkdir ustar
18669 (cd ustar
18670 TEST_TAR_FORMAT=ustar
18671 export TEST_TAR_FORMAT
18672 TAR_OPTIONS="-H ustar"
18673 export TAR_OPTIONS
18674 rm -rf *
18675
18676
18677 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
18678 echo "Create archive"
18679 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
18680 echo "List archive"
18681 tar tf archive) ) >"$at_stdout" 2>"$at_stderr"
18682     at_status=$?
18683 fi
18684
18685 at_failed=false
18686 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
18687 echo >>"$at_stdout"; echo "Create archive
18688 List archive
18689 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/
18690 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
18691 " | $at_diff - "$at_stdout" || at_failed=:
18692 case $at_status in
18693    77) echo 77 > "$at_status_file"; exit 77;;
18694    0) ;;
18695    *) echo "$at_srcdir/lustar03.at:29: exit code was $at_status, expected 0"
18696       at_failed=:;;
18697 esac
18698 if $at_failed; then
18699
18700
18701   echo 1 > "$at_status_file"
18702   exit 1
18703 fi
18704
18705 $at_traceon
18706
18707
18708
18709       $at_traceoff
18710       $at_times_p && times >"$at_times_file"
18711     ) 5>&1 2>&1 | eval $at_tee_pipe
18712     at_status=`cat "$at_status_file"`
18713     ;;
18714
18715   44 ) # 44. multiv01.at:23: multivolume dumps from pipes
18716     at_setup_line='multiv01.at:23'
18717     at_desc="multivolume dumps from pipes"
18718     $at_quiet $ECHO_N " 44: multivolume dumps from pipes                   $ECHO_C"
18719     at_xfail=no
18720       test -f $XFAILFILE && at_xfail=yes
18721     echo "#                             -*- compilation -*-" >> "$at_group_log"
18722     (
18723       echo "44. multiv01.at:23: testing ..."
18724       $at_traceon
18725
18726
18727
18728 # Fixme: should be configurable
18729 #  TRUSS=truss -o /tmp/tr
18730 #  TRUSS=strace
18731
18732
18733
18734   $at_traceoff
18735 echo "$at_srcdir/multiv01.at:30:
18736 mkdir gnu
18737 (cd gnu
18738 TEST_TAR_FORMAT=gnu
18739 export TEST_TAR_FORMAT
18740 TAR_OPTIONS=\"-H gnu\"
18741 export TAR_OPTIONS
18742 rm -rf *
18743
18744 exec <&-
18745 genfile --length 7168 --file file1
18746
18747 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
18748               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
18749   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
18750   for count in 2 3 4 5 6 7 8 ; do
18751     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
18752   done
18753 done >file2
18754
18755 if test \$TEST_TAR_FORMAT = pax; then
18756   TAPE_LENGTH=11
18757 else
18758   TAPE_LENGTH=10
18759 fi
18760
18761 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
18762   --listed-incremental=t.snar \\
18763   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
18764
18765 mkdir extract-dir-pipe
18766 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
18767 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
18768       -C extract-dir-pipe -x --multi-volume \\
18769       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
18770
18771 cmp file1 extract-dir-pipe/file1
18772 cmp file2 extract-dir-pipe/file2
18773 )"
18774 echo multiv01.at:30 >"$at_check_line_file"
18775
18776 at_trace_this=
18777 if test -n "$at_traceon"; then
18778     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
18779 fi
18780
18781 if test -n "$at_trace_this"; then
18782     ( $at_traceon;
18783 mkdir gnu
18784 (cd gnu
18785 TEST_TAR_FORMAT=gnu
18786 export TEST_TAR_FORMAT
18787 TAR_OPTIONS="-H gnu"
18788 export TAR_OPTIONS
18789 rm -rf *
18790
18791 exec <&-
18792 genfile --length 7168 --file file1
18793
18794 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
18795               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
18796   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
18797   for count in 2 3 4 5 6 7 8 ; do
18798     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
18799   done
18800 done >file2
18801
18802 if test $TEST_TAR_FORMAT = pax; then
18803   TAPE_LENGTH=11
18804 else
18805   TAPE_LENGTH=10
18806 fi
18807
18808 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
18809   --listed-incremental=t.snar \
18810   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
18811
18812 mkdir extract-dir-pipe
18813 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
18814 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
18815       -C extract-dir-pipe -x --multi-volume \
18816       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
18817
18818 cmp file1 extract-dir-pipe/file1
18819 cmp file2 extract-dir-pipe/file2
18820 ) ) >"$at_stdout" 2>"$at_stder1"
18821     at_status=$?
18822     grep '^ *+' "$at_stder1" >&2
18823     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18824 else
18825     ( :;
18826 mkdir gnu
18827 (cd gnu
18828 TEST_TAR_FORMAT=gnu
18829 export TEST_TAR_FORMAT
18830 TAR_OPTIONS="-H gnu"
18831 export TAR_OPTIONS
18832 rm -rf *
18833
18834 exec <&-
18835 genfile --length 7168 --file file1
18836
18837 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
18838               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
18839   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
18840   for count in 2 3 4 5 6 7 8 ; do
18841     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
18842   done
18843 done >file2
18844
18845 if test $TEST_TAR_FORMAT = pax; then
18846   TAPE_LENGTH=11
18847 else
18848   TAPE_LENGTH=10
18849 fi
18850
18851 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
18852   --listed-incremental=t.snar \
18853   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
18854
18855 mkdir extract-dir-pipe
18856 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
18857 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
18858       -C extract-dir-pipe -x --multi-volume \
18859       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
18860
18861 cmp file1 extract-dir-pipe/file1
18862 cmp file2 extract-dir-pipe/file2
18863 ) ) >"$at_stdout" 2>"$at_stderr"
18864     at_status=$?
18865 fi
18866
18867 at_failed=false
18868 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
18869 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
18870 case $at_status in
18871    77) echo 77 > "$at_status_file"; exit 77;;
18872    0) ;;
18873    *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0"
18874       at_failed=:;;
18875 esac
18876 if $at_failed; then
18877
18878
18879   echo 1 > "$at_status_file"
18880   exit 1
18881 fi
18882
18883 $at_traceon
18884 $at_traceoff
18885 echo "$at_srcdir/multiv01.at:30:
18886 mkdir oldgnu
18887 (cd oldgnu
18888 TEST_TAR_FORMAT=oldgnu
18889 export TEST_TAR_FORMAT
18890 TAR_OPTIONS=\"-H oldgnu\"
18891 export TAR_OPTIONS
18892 rm -rf *
18893
18894 exec <&-
18895 genfile --length 7168 --file file1
18896
18897 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
18898               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
18899   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
18900   for count in 2 3 4 5 6 7 8 ; do
18901     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
18902   done
18903 done >file2
18904
18905 if test \$TEST_TAR_FORMAT = pax; then
18906   TAPE_LENGTH=11
18907 else
18908   TAPE_LENGTH=10
18909 fi
18910
18911 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
18912   --listed-incremental=t.snar \\
18913   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
18914
18915 mkdir extract-dir-pipe
18916 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
18917 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
18918       -C extract-dir-pipe -x --multi-volume \\
18919       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
18920
18921 cmp file1 extract-dir-pipe/file1
18922 cmp file2 extract-dir-pipe/file2
18923 )"
18924 echo multiv01.at:30 >"$at_check_line_file"
18925
18926 at_trace_this=
18927 if test -n "$at_traceon"; then
18928     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
18929 fi
18930
18931 if test -n "$at_trace_this"; then
18932     ( $at_traceon;
18933 mkdir oldgnu
18934 (cd oldgnu
18935 TEST_TAR_FORMAT=oldgnu
18936 export TEST_TAR_FORMAT
18937 TAR_OPTIONS="-H oldgnu"
18938 export TAR_OPTIONS
18939 rm -rf *
18940
18941 exec <&-
18942 genfile --length 7168 --file file1
18943
18944 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
18945               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
18946   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
18947   for count in 2 3 4 5 6 7 8 ; do
18948     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
18949   done
18950 done >file2
18951
18952 if test $TEST_TAR_FORMAT = pax; then
18953   TAPE_LENGTH=11
18954 else
18955   TAPE_LENGTH=10
18956 fi
18957
18958 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
18959   --listed-incremental=t.snar \
18960   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
18961
18962 mkdir extract-dir-pipe
18963 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
18964 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
18965       -C extract-dir-pipe -x --multi-volume \
18966       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
18967
18968 cmp file1 extract-dir-pipe/file1
18969 cmp file2 extract-dir-pipe/file2
18970 ) ) >"$at_stdout" 2>"$at_stder1"
18971     at_status=$?
18972     grep '^ *+' "$at_stder1" >&2
18973     grep -v '^ *+' "$at_stder1" >"$at_stderr"
18974 else
18975     ( :;
18976 mkdir oldgnu
18977 (cd oldgnu
18978 TEST_TAR_FORMAT=oldgnu
18979 export TEST_TAR_FORMAT
18980 TAR_OPTIONS="-H oldgnu"
18981 export TAR_OPTIONS
18982 rm -rf *
18983
18984 exec <&-
18985 genfile --length 7168 --file file1
18986
18987 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
18988               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
18989   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
18990   for count in 2 3 4 5 6 7 8 ; do
18991     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
18992   done
18993 done >file2
18994
18995 if test $TEST_TAR_FORMAT = pax; then
18996   TAPE_LENGTH=11
18997 else
18998   TAPE_LENGTH=10
18999 fi
19000
19001 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
19002   --listed-incremental=t.snar \
19003   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
19004
19005 mkdir extract-dir-pipe
19006 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
19007 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
19008       -C extract-dir-pipe -x --multi-volume \
19009       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
19010
19011 cmp file1 extract-dir-pipe/file1
19012 cmp file2 extract-dir-pipe/file2
19013 ) ) >"$at_stdout" 2>"$at_stderr"
19014     at_status=$?
19015 fi
19016
19017 at_failed=false
19018 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19019 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
19020 case $at_status in
19021    77) echo 77 > "$at_status_file"; exit 77;;
19022    0) ;;
19023    *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0"
19024       at_failed=:;;
19025 esac
19026 if $at_failed; then
19027
19028
19029   echo 1 > "$at_status_file"
19030   exit 1
19031 fi
19032
19033 $at_traceon
19034 $at_traceoff
19035 echo "$at_srcdir/multiv01.at:30:
19036 mkdir pax
19037 (cd pax
19038 TEST_TAR_FORMAT=pax
19039 export TEST_TAR_FORMAT
19040 TAR_OPTIONS=\"-H pax\"
19041 export TAR_OPTIONS
19042 rm -rf *
19043
19044 exec <&-
19045 genfile --length 7168 --file file1
19046
19047 for block in \" 1\" \" 2\" \" 3\" \" 4\" \" 5\" \" 6\" \" 7\" \" 8\" \\
19048               \" 9\" \"10\" \"11\" \"12\" \"13\" \"14\" \"15\" \"16\" ; do \\
19049   echo \"file2  block \${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
19050   for count in 2 3 4 5 6 7 8 ; do
19051     echo \"bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla\"
19052   done
19053 done >file2
19054
19055 if test \$TEST_TAR_FORMAT = pax; then
19056   TAPE_LENGTH=11
19057 else
19058   TAPE_LENGTH=10
19059 fi
19060
19061 tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\
19062   --listed-incremental=t.snar \\
19063   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
19064
19065 mkdir extract-dir-pipe
19066 dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
19067 PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\
19068       -C extract-dir-pipe -x --multi-volume \\
19069       --tape-length=\$TAPE_LENGTH --read-full-records || exit 1
19070
19071 cmp file1 extract-dir-pipe/file1
19072 cmp file2 extract-dir-pipe/file2
19073 )"
19074 echo multiv01.at:30 >"$at_check_line_file"
19075
19076 at_trace_this=
19077 if test -n "$at_traceon"; then
19078     echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)'
19079 fi
19080
19081 if test -n "$at_trace_this"; then
19082     ( $at_traceon;
19083 mkdir pax
19084 (cd pax
19085 TEST_TAR_FORMAT=pax
19086 export TEST_TAR_FORMAT
19087 TAR_OPTIONS="-H pax"
19088 export TAR_OPTIONS
19089 rm -rf *
19090
19091 exec <&-
19092 genfile --length 7168 --file file1
19093
19094 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
19095               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
19096   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
19097   for count in 2 3 4 5 6 7 8 ; do
19098     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
19099   done
19100 done >file2
19101
19102 if test $TEST_TAR_FORMAT = pax; then
19103   TAPE_LENGTH=11
19104 else
19105   TAPE_LENGTH=10
19106 fi
19107
19108 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
19109   --listed-incremental=t.snar \
19110   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
19111
19112 mkdir extract-dir-pipe
19113 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
19114 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
19115       -C extract-dir-pipe -x --multi-volume \
19116       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
19117
19118 cmp file1 extract-dir-pipe/file1
19119 cmp file2 extract-dir-pipe/file2
19120 ) ) >"$at_stdout" 2>"$at_stder1"
19121     at_status=$?
19122     grep '^ *+' "$at_stder1" >&2
19123     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19124 else
19125     ( :;
19126 mkdir pax
19127 (cd pax
19128 TEST_TAR_FORMAT=pax
19129 export TEST_TAR_FORMAT
19130 TAR_OPTIONS="-H pax"
19131 export TAR_OPTIONS
19132 rm -rf *
19133
19134 exec <&-
19135 genfile --length 7168 --file file1
19136
19137 for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
19138               " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
19139   echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
19140   for count in 2 3 4 5 6 7 8 ; do
19141     echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
19142   done
19143 done >file2
19144
19145 if test $TEST_TAR_FORMAT = pax; then
19146   TAPE_LENGTH=11
19147 else
19148   TAPE_LENGTH=10
19149 fi
19150
19151 tar -c --multi-volume --tape-length=$TAPE_LENGTH \
19152   --listed-incremental=t.snar \
19153   -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
19154
19155 mkdir extract-dir-pipe
19156 dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null |
19157 PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
19158       -C extract-dir-pipe -x --multi-volume \
19159       --tape-length=$TAPE_LENGTH --read-full-records || exit 1
19160
19161 cmp file1 extract-dir-pipe/file1
19162 cmp file2 extract-dir-pipe/file2
19163 ) ) >"$at_stdout" 2>"$at_stderr"
19164     at_status=$?
19165 fi
19166
19167 at_failed=false
19168 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19169 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
19170 case $at_status in
19171    77) echo 77 > "$at_status_file"; exit 77;;
19172    0) ;;
19173    *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0"
19174       at_failed=:;;
19175 esac
19176 if $at_failed; then
19177
19178
19179   echo 1 > "$at_status_file"
19180   exit 1
19181 fi
19182
19183 $at_traceon
19184
19185
19186
19187       $at_traceoff
19188       $at_times_p && times >"$at_times_file"
19189     ) 5>&1 2>&1 | eval $at_tee_pipe
19190     at_status=`cat "$at_status_file"`
19191     ;;
19192
19193   45 ) # 45. multiv02.at:28: skipping a straddling member
19194     at_setup_line='multiv02.at:28'
19195     at_desc="skipping a straddling member"
19196     $at_quiet $ECHO_N " 45: skipping a straddling member                   $ECHO_C"
19197     at_xfail=no
19198       test -f $XFAILFILE && at_xfail=yes
19199     echo "#                             -*- compilation -*-" >> "$at_group_log"
19200     (
19201       echo "45. multiv02.at:28: testing ..."
19202       $at_traceon
19203
19204
19205
19206
19207
19208   $at_traceoff
19209 echo "$at_srcdir/multiv02.at:31:
19210 mkdir gnu
19211 (cd gnu
19212 TEST_TAR_FORMAT=gnu
19213 export TEST_TAR_FORMAT
19214 TAR_OPTIONS=\"-H gnu\"
19215 export TAR_OPTIONS
19216 rm -rf *
19217
19218 genfile --length 10240 --file en
19219 genfile --length 20000 --file to
19220 genfile --length 20000 --file tre
19221 genfile --length 10240 --file fire
19222
19223 exec <&-
19224
19225 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
19226 echo separator
19227 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
19228 )"
19229 echo multiv02.at:31 >"$at_check_line_file"
19230
19231 at_trace_this=
19232 if test -n "$at_traceon"; then
19233     echo 'Not enabling shell tracing (command contains an embedded newline)'
19234 fi
19235
19236 if test -n "$at_trace_this"; then
19237     ( $at_traceon;
19238 mkdir gnu
19239 (cd gnu
19240 TEST_TAR_FORMAT=gnu
19241 export TEST_TAR_FORMAT
19242 TAR_OPTIONS="-H gnu"
19243 export TAR_OPTIONS
19244 rm -rf *
19245
19246 genfile --length 10240 --file en
19247 genfile --length 20000 --file to
19248 genfile --length 20000 --file tre
19249 genfile --length 10240 --file fire
19250
19251 exec <&-
19252
19253 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
19254 echo separator
19255 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
19256 ) ) >"$at_stdout" 2>"$at_stder1"
19257     at_status=$?
19258     grep '^ *+' "$at_stder1" >&2
19259     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19260 else
19261     ( :;
19262 mkdir gnu
19263 (cd gnu
19264 TEST_TAR_FORMAT=gnu
19265 export TEST_TAR_FORMAT
19266 TAR_OPTIONS="-H gnu"
19267 export TAR_OPTIONS
19268 rm -rf *
19269
19270 genfile --length 10240 --file en
19271 genfile --length 20000 --file to
19272 genfile --length 20000 --file tre
19273 genfile --length 10240 --file fire
19274
19275 exec <&-
19276
19277 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
19278 echo separator
19279 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
19280 ) ) >"$at_stdout" 2>"$at_stderr"
19281     at_status=$?
19282 fi
19283
19284 at_failed=false
19285 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19286 echo >>"$at_stdout"; echo "separator
19287 en
19288 " | $at_diff - "$at_stdout" || at_failed=:
19289 case $at_status in
19290    77) echo 77 > "$at_status_file"; exit 77;;
19291    0) ;;
19292    *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0"
19293       at_failed=:;;
19294 esac
19295 if $at_failed; then
19296
19297
19298   echo 1 > "$at_status_file"
19299   exit 1
19300 fi
19301
19302 $at_traceon
19303 $at_traceoff
19304 echo "$at_srcdir/multiv02.at:31:
19305 mkdir oldgnu
19306 (cd oldgnu
19307 TEST_TAR_FORMAT=oldgnu
19308 export TEST_TAR_FORMAT
19309 TAR_OPTIONS=\"-H oldgnu\"
19310 export TAR_OPTIONS
19311 rm -rf *
19312
19313 genfile --length 10240 --file en
19314 genfile --length 20000 --file to
19315 genfile --length 20000 --file tre
19316 genfile --length 10240 --file fire
19317
19318 exec <&-
19319
19320 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
19321 echo separator
19322 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
19323 )"
19324 echo multiv02.at:31 >"$at_check_line_file"
19325
19326 at_trace_this=
19327 if test -n "$at_traceon"; then
19328     echo 'Not enabling shell tracing (command contains an embedded newline)'
19329 fi
19330
19331 if test -n "$at_trace_this"; then
19332     ( $at_traceon;
19333 mkdir oldgnu
19334 (cd oldgnu
19335 TEST_TAR_FORMAT=oldgnu
19336 export TEST_TAR_FORMAT
19337 TAR_OPTIONS="-H oldgnu"
19338 export TAR_OPTIONS
19339 rm -rf *
19340
19341 genfile --length 10240 --file en
19342 genfile --length 20000 --file to
19343 genfile --length 20000 --file tre
19344 genfile --length 10240 --file fire
19345
19346 exec <&-
19347
19348 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
19349 echo separator
19350 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
19351 ) ) >"$at_stdout" 2>"$at_stder1"
19352     at_status=$?
19353     grep '^ *+' "$at_stder1" >&2
19354     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19355 else
19356     ( :;
19357 mkdir oldgnu
19358 (cd oldgnu
19359 TEST_TAR_FORMAT=oldgnu
19360 export TEST_TAR_FORMAT
19361 TAR_OPTIONS="-H oldgnu"
19362 export TAR_OPTIONS
19363 rm -rf *
19364
19365 genfile --length 10240 --file en
19366 genfile --length 20000 --file to
19367 genfile --length 20000 --file tre
19368 genfile --length 10240 --file fire
19369
19370 exec <&-
19371
19372 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
19373 echo separator
19374 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
19375 ) ) >"$at_stdout" 2>"$at_stderr"
19376     at_status=$?
19377 fi
19378
19379 at_failed=false
19380 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19381 echo >>"$at_stdout"; echo "separator
19382 en
19383 " | $at_diff - "$at_stdout" || at_failed=:
19384 case $at_status in
19385    77) echo 77 > "$at_status_file"; exit 77;;
19386    0) ;;
19387    *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0"
19388       at_failed=:;;
19389 esac
19390 if $at_failed; then
19391
19392
19393   echo 1 > "$at_status_file"
19394   exit 1
19395 fi
19396
19397 $at_traceon
19398 $at_traceoff
19399 echo "$at_srcdir/multiv02.at:31:
19400 mkdir pax
19401 (cd pax
19402 TEST_TAR_FORMAT=pax
19403 export TEST_TAR_FORMAT
19404 TAR_OPTIONS=\"-H pax\"
19405 export TAR_OPTIONS
19406 rm -rf *
19407
19408 genfile --length 10240 --file en
19409 genfile --length 20000 --file to
19410 genfile --length 20000 --file tre
19411 genfile --length 10240 --file fire
19412
19413 exec <&-
19414
19415 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
19416 echo separator
19417 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
19418 )"
19419 echo multiv02.at:31 >"$at_check_line_file"
19420
19421 at_trace_this=
19422 if test -n "$at_traceon"; then
19423     echo 'Not enabling shell tracing (command contains an embedded newline)'
19424 fi
19425
19426 if test -n "$at_trace_this"; then
19427     ( $at_traceon;
19428 mkdir pax
19429 (cd pax
19430 TEST_TAR_FORMAT=pax
19431 export TEST_TAR_FORMAT
19432 TAR_OPTIONS="-H pax"
19433 export TAR_OPTIONS
19434 rm -rf *
19435
19436 genfile --length 10240 --file en
19437 genfile --length 20000 --file to
19438 genfile --length 20000 --file tre
19439 genfile --length 10240 --file fire
19440
19441 exec <&-
19442
19443 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
19444 echo separator
19445 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
19446 ) ) >"$at_stdout" 2>"$at_stder1"
19447     at_status=$?
19448     grep '^ *+' "$at_stder1" >&2
19449     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19450 else
19451     ( :;
19452 mkdir pax
19453 (cd pax
19454 TEST_TAR_FORMAT=pax
19455 export TEST_TAR_FORMAT
19456 TAR_OPTIONS="-H pax"
19457 export TAR_OPTIONS
19458 rm -rf *
19459
19460 genfile --length 10240 --file en
19461 genfile --length 20000 --file to
19462 genfile --length 20000 --file tre
19463 genfile --length 10240 --file fire
19464
19465 exec <&-
19466
19467 tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1
19468 echo separator
19469 tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
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 "separator
19477 en
19478 " | $at_diff - "$at_stdout" || at_failed=:
19479 case $at_status in
19480    77) echo 77 > "$at_status_file"; exit 77;;
19481    0) ;;
19482    *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0"
19483       at_failed=:;;
19484 esac
19485 if $at_failed; then
19486
19487
19488   echo 1 > "$at_status_file"
19489   exit 1
19490 fi
19491
19492 $at_traceon
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   46 ) # 46. multiv03.at:30: MV archive & long filenames
19503     at_setup_line='multiv03.at:30'
19504     at_desc="MV archive & long filenames"
19505     $at_quiet $ECHO_N " 46: MV archive & long filenames                    $ECHO_C"
19506     at_xfail=no
19507       test -f $XFAILFILE && at_xfail=yes
19508     echo "#                             -*- compilation -*-" >> "$at_group_log"
19509     (
19510       echo "46. multiv03.at:30: testing ..."
19511       $at_traceon
19512
19513
19514
19515
19516
19517   $at_traceoff
19518 echo "$at_srcdir/multiv03.at:33:
19519 mkdir gnu
19520 (cd gnu
19521 TEST_TAR_FORMAT=gnu
19522 export TEST_TAR_FORMAT
19523 TAR_OPTIONS=\"-H gnu\"
19524 export TAR_OPTIONS
19525 rm -rf *
19526
19527 AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
19528 BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
19529
19530 cat > ../experr <<EOF
19531 tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
19532 tar: \\\`\$BFILE' is possibly continued on this volume: header contains truncated name
19533 EOF
19534
19535 cat > ../expout <<EOF
19536 \$AFILE
19537 separator-1
19538 separator-2
19539 EOF
19540
19541 genfile --length 15360 --file \$AFILE
19542
19543 exec <&-
19544
19545 tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
19546 tar -tM -f arch.1 -f arch.2 || exit 1
19547
19548 echo separator-1
19549
19550 genfile --length 15360 --file \$BFILE
19551 tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
19552
19553 echo separator-2
19554 mv \$BFILE bfile
19555 tar -M -x -f arch.1 -f arch.2 || exit 1
19556 cmp \$BFILE bfile
19557 )"
19558 echo multiv03.at:33 >"$at_check_line_file"
19559
19560 at_trace_this=
19561 if test -n "$at_traceon"; then
19562     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
19563 fi
19564
19565 if test -n "$at_trace_this"; then
19566     ( $at_traceon;
19567 mkdir gnu
19568 (cd gnu
19569 TEST_TAR_FORMAT=gnu
19570 export TEST_TAR_FORMAT
19571 TAR_OPTIONS="-H gnu"
19572 export TAR_OPTIONS
19573 rm -rf *
19574
19575 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
19576 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
19577
19578 cat > ../experr <<EOF
19579 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
19580 tar: \`$BFILE' is possibly continued on this volume: header contains truncated name
19581 EOF
19582
19583 cat > ../expout <<EOF
19584 $AFILE
19585 separator-1
19586 separator-2
19587 EOF
19588
19589 genfile --length 15360 --file $AFILE
19590
19591 exec <&-
19592
19593 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
19594 tar -tM -f arch.1 -f arch.2 || exit 1
19595
19596 echo separator-1
19597
19598 genfile --length 15360 --file $BFILE
19599 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
19600
19601 echo separator-2
19602 mv $BFILE bfile
19603 tar -M -x -f arch.1 -f arch.2 || exit 1
19604 cmp $BFILE bfile
19605 ) ) >"$at_stdout" 2>"$at_stder1"
19606     at_status=$?
19607     grep '^ *+' "$at_stder1" >&2
19608     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19609 else
19610     ( :;
19611 mkdir gnu
19612 (cd gnu
19613 TEST_TAR_FORMAT=gnu
19614 export TEST_TAR_FORMAT
19615 TAR_OPTIONS="-H gnu"
19616 export TAR_OPTIONS
19617 rm -rf *
19618
19619 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
19620 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
19621
19622 cat > ../experr <<EOF
19623 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
19624 tar: \`$BFILE' is possibly continued on this volume: header contains truncated name
19625 EOF
19626
19627 cat > ../expout <<EOF
19628 $AFILE
19629 separator-1
19630 separator-2
19631 EOF
19632
19633 genfile --length 15360 --file $AFILE
19634
19635 exec <&-
19636
19637 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
19638 tar -tM -f arch.1 -f arch.2 || exit 1
19639
19640 echo separator-1
19641
19642 genfile --length 15360 --file $BFILE
19643 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
19644
19645 echo separator-2
19646 mv $BFILE bfile
19647 tar -M -x -f arch.1 -f arch.2 || exit 1
19648 cmp $BFILE bfile
19649 ) ) >"$at_stdout" 2>"$at_stderr"
19650     at_status=$?
19651 fi
19652
19653 at_failed=false
19654 $at_diff experr "$at_stderr" || at_failed=:
19655 $at_diff expout "$at_stdout" || at_failed=:
19656 case $at_status in
19657    77) echo 77 > "$at_status_file"; exit 77;;
19658    0) ;;
19659    *) echo "$at_srcdir/multiv03.at:33: exit code was $at_status, expected 0"
19660       at_failed=:;;
19661 esac
19662 if $at_failed; then
19663
19664
19665   echo 1 > "$at_status_file"
19666   exit 1
19667 fi
19668
19669 $at_traceon
19670 $at_traceoff
19671 echo "$at_srcdir/multiv03.at:33:
19672 mkdir oldgnu
19673 (cd oldgnu
19674 TEST_TAR_FORMAT=oldgnu
19675 export TEST_TAR_FORMAT
19676 TAR_OPTIONS=\"-H oldgnu\"
19677 export TAR_OPTIONS
19678 rm -rf *
19679
19680 AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\`
19681 BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\`
19682
19683 cat > ../experr <<EOF
19684 tar: \$BFILE: file name too long to be stored in a GNU multivolume header, truncated
19685 tar: \\\`\$BFILE' is possibly continued on this volume: header contains truncated name
19686 EOF
19687
19688 cat > ../expout <<EOF
19689 \$AFILE
19690 separator-1
19691 separator-2
19692 EOF
19693
19694 genfile --length 15360 --file \$AFILE
19695
19696 exec <&-
19697
19698 tar -M -L 10 -c -f arch.1 -f arch.2 \$AFILE || exit 1
19699 tar -tM -f arch.1 -f arch.2 || exit 1
19700
19701 echo separator-1
19702
19703 genfile --length 15360 --file \$BFILE
19704 tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1
19705
19706 echo separator-2
19707 mv \$BFILE bfile
19708 tar -M -x -f arch.1 -f arch.2 || exit 1
19709 cmp \$BFILE bfile
19710 )"
19711 echo multiv03.at:33 >"$at_check_line_file"
19712
19713 at_trace_this=
19714 if test -n "$at_traceon"; then
19715     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
19716 fi
19717
19718 if test -n "$at_trace_this"; then
19719     ( $at_traceon;
19720 mkdir oldgnu
19721 (cd oldgnu
19722 TEST_TAR_FORMAT=oldgnu
19723 export TEST_TAR_FORMAT
19724 TAR_OPTIONS="-H oldgnu"
19725 export TAR_OPTIONS
19726 rm -rf *
19727
19728 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
19729 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
19730
19731 cat > ../experr <<EOF
19732 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
19733 tar: \`$BFILE' is possibly continued on this volume: header contains truncated name
19734 EOF
19735
19736 cat > ../expout <<EOF
19737 $AFILE
19738 separator-1
19739 separator-2
19740 EOF
19741
19742 genfile --length 15360 --file $AFILE
19743
19744 exec <&-
19745
19746 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
19747 tar -tM -f arch.1 -f arch.2 || exit 1
19748
19749 echo separator-1
19750
19751 genfile --length 15360 --file $BFILE
19752 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
19753
19754 echo separator-2
19755 mv $BFILE bfile
19756 tar -M -x -f arch.1 -f arch.2 || exit 1
19757 cmp $BFILE bfile
19758 ) ) >"$at_stdout" 2>"$at_stder1"
19759     at_status=$?
19760     grep '^ *+' "$at_stder1" >&2
19761     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19762 else
19763     ( :;
19764 mkdir oldgnu
19765 (cd oldgnu
19766 TEST_TAR_FORMAT=oldgnu
19767 export TEST_TAR_FORMAT
19768 TAR_OPTIONS="-H oldgnu"
19769 export TAR_OPTIONS
19770 rm -rf *
19771
19772 AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
19773 BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
19774
19775 cat > ../experr <<EOF
19776 tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
19777 tar: \`$BFILE' is possibly continued on this volume: header contains truncated name
19778 EOF
19779
19780 cat > ../expout <<EOF
19781 $AFILE
19782 separator-1
19783 separator-2
19784 EOF
19785
19786 genfile --length 15360 --file $AFILE
19787
19788 exec <&-
19789
19790 tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
19791 tar -tM -f arch.1 -f arch.2 || exit 1
19792
19793 echo separator-1
19794
19795 genfile --length 15360 --file $BFILE
19796 tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1
19797
19798 echo separator-2
19799 mv $BFILE bfile
19800 tar -M -x -f arch.1 -f arch.2 || exit 1
19801 cmp $BFILE bfile
19802 ) ) >"$at_stdout" 2>"$at_stderr"
19803     at_status=$?
19804 fi
19805
19806 at_failed=false
19807 $at_diff experr "$at_stderr" || at_failed=:
19808 $at_diff expout "$at_stdout" || at_failed=:
19809 case $at_status in
19810    77) echo 77 > "$at_status_file"; exit 77;;
19811    0) ;;
19812    *) echo "$at_srcdir/multiv03.at:33: exit code was $at_status, expected 0"
19813       at_failed=:;;
19814 esac
19815 if $at_failed; then
19816
19817
19818   echo 1 > "$at_status_file"
19819   exit 1
19820 fi
19821
19822 $at_traceon
19823
19824
19825
19826       $at_traceoff
19827       $at_times_p && times >"$at_times_file"
19828     ) 5>&1 2>&1 | eval $at_tee_pipe
19829     at_status=`cat "$at_status_file"`
19830     ;;
19831
19832   47 ) # 47. multiv04.at:36: split directory members in a MV archive
19833     at_setup_line='multiv04.at:36'
19834     at_desc="split directory members in a MV archive"
19835     $at_quiet $ECHO_N " 47: split directory members in a MV archive        $ECHO_C"
19836     at_xfail=no
19837       test -f $XFAILFILE && at_xfail=yes
19838     echo "#                             -*- compilation -*-" >> "$at_group_log"
19839     (
19840       echo "47. multiv04.at:36: testing ..."
19841       $at_traceon
19842
19843
19844
19845
19846
19847   $at_traceoff
19848 echo "$at_srcdir/multiv04.at:39:
19849 mkdir gnu
19850 (cd gnu
19851 TEST_TAR_FORMAT=gnu
19852 export TEST_TAR_FORMAT
19853 TAR_OPTIONS=\"-H gnu\"
19854 export TAR_OPTIONS
19855 rm -rf *
19856
19857
19858 mkdir directory
19859 awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
19860
19861 exec <&-
19862
19863 sleep 2
19864
19865 tar --listed-incremental=list -c -f archive.a directory
19866
19867 sleep 2
19868
19869 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
19870
19871 echo separator
19872
19873 tar -MRt -f arc.1 -f arc.2)"
19874 echo multiv04.at:39 >"$at_check_line_file"
19875
19876 at_trace_this=
19877 if test -n "$at_traceon"; then
19878     echo 'Not enabling shell tracing (command contains an embedded newline)'
19879 fi
19880
19881 if test -n "$at_trace_this"; then
19882     ( $at_traceon;
19883 mkdir gnu
19884 (cd gnu
19885 TEST_TAR_FORMAT=gnu
19886 export TEST_TAR_FORMAT
19887 TAR_OPTIONS="-H gnu"
19888 export TAR_OPTIONS
19889 rm -rf *
19890
19891
19892 mkdir directory
19893 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
19894
19895 exec <&-
19896
19897 sleep 2
19898
19899 tar --listed-incremental=list -c -f archive.a directory
19900
19901 sleep 2
19902
19903 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
19904
19905 echo separator
19906
19907 tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stder1"
19908     at_status=$?
19909     grep '^ *+' "$at_stder1" >&2
19910     grep -v '^ *+' "$at_stder1" >"$at_stderr"
19911 else
19912     ( :;
19913 mkdir gnu
19914 (cd gnu
19915 TEST_TAR_FORMAT=gnu
19916 export TEST_TAR_FORMAT
19917 TAR_OPTIONS="-H gnu"
19918 export TAR_OPTIONS
19919 rm -rf *
19920
19921
19922 mkdir directory
19923 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
19924
19925 exec <&-
19926
19927 sleep 2
19928
19929 tar --listed-incremental=list -c -f archive.a directory
19930
19931 sleep 2
19932
19933 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
19934
19935 echo separator
19936
19937 tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stderr"
19938     at_status=$?
19939 fi
19940
19941 at_failed=false
19942 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
19943 echo >>"$at_stdout"; echo "directory/
19944 separator
19945 block 0: directory/
19946 block 35: ** Block of NULs **
19947 " | $at_diff - "$at_stdout" || at_failed=:
19948 case $at_status in
19949    77) echo 77 > "$at_status_file"; exit 77;;
19950    0) ;;
19951    *) echo "$at_srcdir/multiv04.at:39: exit code was $at_status, expected 0"
19952       at_failed=:;;
19953 esac
19954 if $at_failed; then
19955
19956
19957   echo 1 > "$at_status_file"
19958   exit 1
19959 fi
19960
19961 $at_traceon
19962 $at_traceoff
19963 echo "$at_srcdir/multiv04.at:39:
19964 mkdir oldgnu
19965 (cd oldgnu
19966 TEST_TAR_FORMAT=oldgnu
19967 export TEST_TAR_FORMAT
19968 TAR_OPTIONS=\"-H oldgnu\"
19969 export TAR_OPTIONS
19970 rm -rf *
19971
19972
19973 mkdir directory
19974 awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' </dev/null | genfile --files-from -
19975
19976 exec <&-
19977
19978 sleep 2
19979
19980 tar --listed-incremental=list -c -f archive.a directory
19981
19982 sleep 2
19983
19984 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
19985
19986 echo separator
19987
19988 tar -MRt -f arc.1 -f arc.2)"
19989 echo multiv04.at:39 >"$at_check_line_file"
19990
19991 at_trace_this=
19992 if test -n "$at_traceon"; then
19993     echo 'Not enabling shell tracing (command contains an embedded newline)'
19994 fi
19995
19996 if test -n "$at_trace_this"; then
19997     ( $at_traceon;
19998 mkdir oldgnu
19999 (cd oldgnu
20000 TEST_TAR_FORMAT=oldgnu
20001 export TEST_TAR_FORMAT
20002 TAR_OPTIONS="-H oldgnu"
20003 export TAR_OPTIONS
20004 rm -rf *
20005
20006
20007 mkdir directory
20008 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
20009
20010 exec <&-
20011
20012 sleep 2
20013
20014 tar --listed-incremental=list -c -f archive.a directory
20015
20016 sleep 2
20017
20018 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
20019
20020 echo separator
20021
20022 tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stder1"
20023     at_status=$?
20024     grep '^ *+' "$at_stder1" >&2
20025     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20026 else
20027     ( :;
20028 mkdir oldgnu
20029 (cd oldgnu
20030 TEST_TAR_FORMAT=oldgnu
20031 export TEST_TAR_FORMAT
20032 TAR_OPTIONS="-H oldgnu"
20033 export TAR_OPTIONS
20034 rm -rf *
20035
20036
20037 mkdir directory
20038 awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
20039
20040 exec <&-
20041
20042 sleep 2
20043
20044 tar --listed-incremental=list -c -f archive.a directory
20045
20046 sleep 2
20047
20048 tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
20049
20050 echo separator
20051
20052 tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stderr"
20053     at_status=$?
20054 fi
20055
20056 at_failed=false
20057 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20058 echo >>"$at_stdout"; echo "directory/
20059 separator
20060 block 0: directory/
20061 block 35: ** Block of NULs **
20062 " | $at_diff - "$at_stdout" || at_failed=:
20063 case $at_status in
20064    77) echo 77 > "$at_status_file"; exit 77;;
20065    0) ;;
20066    *) echo "$at_srcdir/multiv04.at:39: exit code was $at_status, expected 0"
20067       at_failed=:;;
20068 esac
20069 if $at_failed; then
20070
20071
20072   echo 1 > "$at_status_file"
20073   exit 1
20074 fi
20075
20076 $at_traceon
20077
20078
20079
20080       $at_traceoff
20081       $at_times_p && times >"$at_times_file"
20082     ) 5>&1 2>&1 | eval $at_tee_pipe
20083     at_status=`cat "$at_status_file"`
20084     ;;
20085
20086   48 ) # 48. multiv05.at:26: Restoring after an out of sync folume
20087     at_setup_line='multiv05.at:26'
20088     at_desc="Restoring after an out of sync folume"
20089     $at_quiet $ECHO_N " 48: Restoring after an out of sync folume          $ECHO_C"
20090     at_xfail=no
20091       test -f $XFAILFILE && at_xfail=yes
20092     echo "#                             -*- compilation -*-" >> "$at_group_log"
20093     (
20094       echo "48. multiv05.at:26: testing ..."
20095       $at_traceon
20096
20097
20098
20099
20100
20101
20102   $at_traceoff
20103 echo "$at_srcdir/multiv05.at:30:
20104 mkdir gnu
20105 (cd gnu
20106 TEST_TAR_FORMAT=gnu
20107 export TEST_TAR_FORMAT
20108 TAR_OPTIONS=\"-H gnu\"
20109 export TAR_OPTIONS
20110 rm -rf *
20111
20112 exec <&-
20113
20114 genfile --length 250k --file jeden
20115 genfile --length 250k --file dwa
20116 genfile --length 250k --file trzy
20117 genfile --length 250k --file cztery
20118 genfile --length 250k --file piec
20119 genfile --length 250k --file szesc
20120
20121
20122 echo Creating archive
20123 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
20124 echo separator
20125 mkdir bak
20126 mv jeden dwa trzy cztery piec szesc bak
20127 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
20128 echo Diffing jeden
20129    cmp bak/jeden jeden || exit 1
20130 echo Diffing dwa
20131    cmp bak/dwa dwa || exit 1
20132 echo Diffing trzy
20133    cmp bak/trzy trzy || exit 1
20134 echo Diffing cztery
20135    cmp bak/cztery cztery || exit 1
20136 echo Diffing piec
20137    cmp bak/piec piec || exit 1
20138 echo Diffing szesc
20139    cmp bak/szesc szesc || exit 1
20140 )"
20141 echo multiv05.at:30 >"$at_check_line_file"
20142
20143 at_trace_this=
20144 if test -n "$at_traceon"; then
20145     echo 'Not enabling shell tracing (command contains an embedded newline)'
20146 fi
20147
20148 if test -n "$at_trace_this"; then
20149     ( $at_traceon;
20150 mkdir gnu
20151 (cd gnu
20152 TEST_TAR_FORMAT=gnu
20153 export TEST_TAR_FORMAT
20154 TAR_OPTIONS="-H gnu"
20155 export TAR_OPTIONS
20156 rm -rf *
20157
20158 exec <&-
20159
20160 genfile --length 250k --file jeden
20161 genfile --length 250k --file dwa
20162 genfile --length 250k --file trzy
20163 genfile --length 250k --file cztery
20164 genfile --length 250k --file piec
20165 genfile --length 250k --file szesc
20166
20167
20168 echo Creating archive
20169 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
20170 echo separator
20171 mkdir bak
20172 mv jeden dwa trzy cztery piec szesc bak
20173 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
20174 echo Diffing jeden
20175    cmp bak/jeden jeden || exit 1
20176 echo Diffing dwa
20177    cmp bak/dwa dwa || exit 1
20178 echo Diffing trzy
20179    cmp bak/trzy trzy || exit 1
20180 echo Diffing cztery
20181    cmp bak/cztery cztery || exit 1
20182 echo Diffing piec
20183    cmp bak/piec piec || exit 1
20184 echo Diffing szesc
20185    cmp bak/szesc szesc || exit 1
20186 ) ) >"$at_stdout" 2>"$at_stder1"
20187     at_status=$?
20188     grep '^ *+' "$at_stder1" >&2
20189     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20190 else
20191     ( :;
20192 mkdir gnu
20193 (cd gnu
20194 TEST_TAR_FORMAT=gnu
20195 export TEST_TAR_FORMAT
20196 TAR_OPTIONS="-H gnu"
20197 export TAR_OPTIONS
20198 rm -rf *
20199
20200 exec <&-
20201
20202 genfile --length 250k --file jeden
20203 genfile --length 250k --file dwa
20204 genfile --length 250k --file trzy
20205 genfile --length 250k --file cztery
20206 genfile --length 250k --file piec
20207 genfile --length 250k --file szesc
20208
20209
20210 echo Creating archive
20211 tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc
20212 echo separator
20213 mkdir bak
20214 mv jeden dwa trzy cztery piec szesc bak
20215 tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
20216 echo Diffing jeden
20217    cmp bak/jeden jeden || exit 1
20218 echo Diffing dwa
20219    cmp bak/dwa dwa || exit 1
20220 echo Diffing trzy
20221    cmp bak/trzy trzy || exit 1
20222 echo Diffing cztery
20223    cmp bak/cztery cztery || exit 1
20224 echo Diffing piec
20225    cmp bak/piec piec || exit 1
20226 echo Diffing szesc
20227    cmp bak/szesc szesc || exit 1
20228 ) ) >"$at_stdout" 2>"$at_stderr"
20229     at_status=$?
20230 fi
20231
20232 at_failed=false
20233 echo >>"$at_stderr"; echo "tar: \`trzy' is not continued on this volume
20234 " | $at_diff - "$at_stderr" || at_failed=:
20235 echo >>"$at_stdout"; echo "Creating archive
20236 separator
20237 jeden
20238 dwa
20239 trzy
20240 cztery
20241 piec
20242 szesc
20243 Diffing jeden
20244 Diffing dwa
20245 Diffing trzy
20246 Diffing cztery
20247 Diffing piec
20248 Diffing szesc
20249 " | $at_diff - "$at_stdout" || at_failed=:
20250 case $at_status in
20251    77) echo 77 > "$at_status_file"; exit 77;;
20252    0) ;;
20253    *) echo "$at_srcdir/multiv05.at:30: exit code was $at_status, expected 0"
20254       at_failed=:;;
20255 esac
20256 if $at_failed; then
20257
20258
20259   echo 1 > "$at_status_file"
20260   exit 1
20261 fi
20262
20263 $at_traceon
20264
20265
20266
20267       $at_traceoff
20268       $at_times_p && times >"$at_times_file"
20269     ) 5>&1 2>&1 | eval $at_tee_pipe
20270     at_status=`cat "$at_status_file"`
20271     ;;
20272
20273   49 ) # 49. old.at:23: old archives
20274     at_setup_line='old.at:23'
20275     at_desc="old archives"
20276     $at_quiet $ECHO_N " 49: old archives                                   $ECHO_C"
20277     at_xfail=no
20278     echo "#                             -*- compilation -*-" >> "$at_group_log"
20279     (
20280       echo "49. old.at:23: testing ..."
20281       $at_traceon
20282
20283
20284
20285 unset TAR_OPTIONS
20286 $at_traceoff
20287 echo "$at_srcdir/old.at:27:
20288 mkdir directory
20289 tar cfvo archive directory || exit 1
20290 tar tf archive
20291 "
20292 echo old.at:27 >"$at_check_line_file"
20293
20294 at_trace_this=
20295 if test -n "$at_traceon"; then
20296     echo 'Not enabling shell tracing (command contains an embedded newline)'
20297 fi
20298
20299 if test -n "$at_trace_this"; then
20300     ( $at_traceon;
20301 mkdir directory
20302 tar cfvo archive directory || exit 1
20303 tar tf archive
20304  ) >"$at_stdout" 2>"$at_stder1"
20305     at_status=$?
20306     grep '^ *+' "$at_stder1" >&2
20307     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20308 else
20309     ( :;
20310 mkdir directory
20311 tar cfvo archive directory || exit 1
20312 tar tf archive
20313  ) >"$at_stdout" 2>"$at_stderr"
20314     at_status=$?
20315 fi
20316
20317 at_failed=false
20318 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20319 echo >>"$at_stdout"; echo "directory/
20320 directory/
20321 " | $at_diff - "$at_stdout" || at_failed=:
20322 case $at_status in
20323    77) echo 77 > "$at_status_file"; exit 77;;
20324    0) ;;
20325    *) echo "$at_srcdir/old.at:27: exit code was $at_status, expected 0"
20326       at_failed=:;;
20327 esac
20328 if $at_failed; then
20329
20330
20331   echo 1 > "$at_status_file"
20332   exit 1
20333 fi
20334
20335 $at_traceon
20336
20337
20338       $at_traceoff
20339       $at_times_p && times >"$at_times_file"
20340     ) 5>&1 2>&1 | eval $at_tee_pipe
20341     at_status=`cat "$at_status_file"`
20342     ;;
20343
20344   50 ) # 50. recurse.at:21: recurse
20345     at_setup_line='recurse.at:21'
20346     at_desc="recurse"
20347     $at_quiet $ECHO_N " 50: recurse                                        $ECHO_C"
20348     at_xfail=no
20349       test -f $XFAILFILE && at_xfail=yes
20350     echo "#                             -*- compilation -*-" >> "$at_group_log"
20351     (
20352       echo "50. recurse.at:21: testing ..."
20353       $at_traceon
20354
20355
20356
20357
20358
20359   $at_traceoff
20360 echo "$at_srcdir/recurse.at:24:
20361 mkdir v7
20362 (cd v7
20363 TEST_TAR_FORMAT=v7
20364 export TEST_TAR_FORMAT
20365 TAR_OPTIONS=\"-H v7\"
20366 export TAR_OPTIONS
20367 rm -rf *
20368
20369 mkdir directory
20370 touch directory/file
20371 tar --create --file archive --no-recursion directory || exit 1
20372 tar tf archive
20373 )"
20374 echo recurse.at:24 >"$at_check_line_file"
20375
20376 at_trace_this=
20377 if test -n "$at_traceon"; then
20378     echo 'Not enabling shell tracing (command contains an embedded newline)'
20379 fi
20380
20381 if test -n "$at_trace_this"; then
20382     ( $at_traceon;
20383 mkdir v7
20384 (cd v7
20385 TEST_TAR_FORMAT=v7
20386 export TEST_TAR_FORMAT
20387 TAR_OPTIONS="-H v7"
20388 export TAR_OPTIONS
20389 rm -rf *
20390
20391 mkdir directory
20392 touch directory/file
20393 tar --create --file archive --no-recursion directory || exit 1
20394 tar tf archive
20395 ) ) >"$at_stdout" 2>"$at_stder1"
20396     at_status=$?
20397     grep '^ *+' "$at_stder1" >&2
20398     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20399 else
20400     ( :;
20401 mkdir v7
20402 (cd v7
20403 TEST_TAR_FORMAT=v7
20404 export TEST_TAR_FORMAT
20405 TAR_OPTIONS="-H v7"
20406 export TAR_OPTIONS
20407 rm -rf *
20408
20409 mkdir directory
20410 touch directory/file
20411 tar --create --file archive --no-recursion directory || exit 1
20412 tar tf archive
20413 ) ) >"$at_stdout" 2>"$at_stderr"
20414     at_status=$?
20415 fi
20416
20417 at_failed=false
20418 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20419 echo >>"$at_stdout"; echo "directory/
20420 " | $at_diff - "$at_stdout" || at_failed=:
20421 case $at_status in
20422    77) echo 77 > "$at_status_file"; exit 77;;
20423    0) ;;
20424    *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
20425       at_failed=:;;
20426 esac
20427 if $at_failed; then
20428
20429
20430   echo 1 > "$at_status_file"
20431   exit 1
20432 fi
20433
20434 $at_traceon
20435 $at_traceoff
20436 echo "$at_srcdir/recurse.at:24:
20437 mkdir oldgnu
20438 (cd oldgnu
20439 TEST_TAR_FORMAT=oldgnu
20440 export TEST_TAR_FORMAT
20441 TAR_OPTIONS=\"-H oldgnu\"
20442 export TAR_OPTIONS
20443 rm -rf *
20444
20445 mkdir directory
20446 touch directory/file
20447 tar --create --file archive --no-recursion directory || exit 1
20448 tar tf archive
20449 )"
20450 echo recurse.at:24 >"$at_check_line_file"
20451
20452 at_trace_this=
20453 if test -n "$at_traceon"; then
20454     echo 'Not enabling shell tracing (command contains an embedded newline)'
20455 fi
20456
20457 if test -n "$at_trace_this"; then
20458     ( $at_traceon;
20459 mkdir oldgnu
20460 (cd oldgnu
20461 TEST_TAR_FORMAT=oldgnu
20462 export TEST_TAR_FORMAT
20463 TAR_OPTIONS="-H oldgnu"
20464 export TAR_OPTIONS
20465 rm -rf *
20466
20467 mkdir directory
20468 touch directory/file
20469 tar --create --file archive --no-recursion directory || exit 1
20470 tar tf archive
20471 ) ) >"$at_stdout" 2>"$at_stder1"
20472     at_status=$?
20473     grep '^ *+' "$at_stder1" >&2
20474     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20475 else
20476     ( :;
20477 mkdir oldgnu
20478 (cd oldgnu
20479 TEST_TAR_FORMAT=oldgnu
20480 export TEST_TAR_FORMAT
20481 TAR_OPTIONS="-H oldgnu"
20482 export TAR_OPTIONS
20483 rm -rf *
20484
20485 mkdir directory
20486 touch directory/file
20487 tar --create --file archive --no-recursion directory || exit 1
20488 tar tf archive
20489 ) ) >"$at_stdout" 2>"$at_stderr"
20490     at_status=$?
20491 fi
20492
20493 at_failed=false
20494 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20495 echo >>"$at_stdout"; echo "directory/
20496 " | $at_diff - "$at_stdout" || at_failed=:
20497 case $at_status in
20498    77) echo 77 > "$at_status_file"; exit 77;;
20499    0) ;;
20500    *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
20501       at_failed=:;;
20502 esac
20503 if $at_failed; then
20504
20505
20506   echo 1 > "$at_status_file"
20507   exit 1
20508 fi
20509
20510 $at_traceon
20511 $at_traceoff
20512 echo "$at_srcdir/recurse.at:24:
20513 mkdir ustar
20514 (cd ustar
20515 TEST_TAR_FORMAT=ustar
20516 export TEST_TAR_FORMAT
20517 TAR_OPTIONS=\"-H ustar\"
20518 export TAR_OPTIONS
20519 rm -rf *
20520
20521 mkdir directory
20522 touch directory/file
20523 tar --create --file archive --no-recursion directory || exit 1
20524 tar tf archive
20525 )"
20526 echo recurse.at:24 >"$at_check_line_file"
20527
20528 at_trace_this=
20529 if test -n "$at_traceon"; then
20530     echo 'Not enabling shell tracing (command contains an embedded newline)'
20531 fi
20532
20533 if test -n "$at_trace_this"; then
20534     ( $at_traceon;
20535 mkdir ustar
20536 (cd ustar
20537 TEST_TAR_FORMAT=ustar
20538 export TEST_TAR_FORMAT
20539 TAR_OPTIONS="-H ustar"
20540 export TAR_OPTIONS
20541 rm -rf *
20542
20543 mkdir directory
20544 touch directory/file
20545 tar --create --file archive --no-recursion directory || exit 1
20546 tar tf archive
20547 ) ) >"$at_stdout" 2>"$at_stder1"
20548     at_status=$?
20549     grep '^ *+' "$at_stder1" >&2
20550     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20551 else
20552     ( :;
20553 mkdir ustar
20554 (cd ustar
20555 TEST_TAR_FORMAT=ustar
20556 export TEST_TAR_FORMAT
20557 TAR_OPTIONS="-H ustar"
20558 export TAR_OPTIONS
20559 rm -rf *
20560
20561 mkdir directory
20562 touch directory/file
20563 tar --create --file archive --no-recursion directory || exit 1
20564 tar tf archive
20565 ) ) >"$at_stdout" 2>"$at_stderr"
20566     at_status=$?
20567 fi
20568
20569 at_failed=false
20570 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20571 echo >>"$at_stdout"; echo "directory/
20572 " | $at_diff - "$at_stdout" || at_failed=:
20573 case $at_status in
20574    77) echo 77 > "$at_status_file"; exit 77;;
20575    0) ;;
20576    *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
20577       at_failed=:;;
20578 esac
20579 if $at_failed; then
20580
20581
20582   echo 1 > "$at_status_file"
20583   exit 1
20584 fi
20585
20586 $at_traceon
20587 $at_traceoff
20588 echo "$at_srcdir/recurse.at:24:
20589 mkdir posix
20590 (cd posix
20591 TEST_TAR_FORMAT=posix
20592 export TEST_TAR_FORMAT
20593 TAR_OPTIONS=\"-H posix\"
20594 export TAR_OPTIONS
20595 rm -rf *
20596
20597 mkdir directory
20598 touch directory/file
20599 tar --create --file archive --no-recursion directory || exit 1
20600 tar tf archive
20601 )"
20602 echo recurse.at:24 >"$at_check_line_file"
20603
20604 at_trace_this=
20605 if test -n "$at_traceon"; then
20606     echo 'Not enabling shell tracing (command contains an embedded newline)'
20607 fi
20608
20609 if test -n "$at_trace_this"; then
20610     ( $at_traceon;
20611 mkdir posix
20612 (cd posix
20613 TEST_TAR_FORMAT=posix
20614 export TEST_TAR_FORMAT
20615 TAR_OPTIONS="-H posix"
20616 export TAR_OPTIONS
20617 rm -rf *
20618
20619 mkdir directory
20620 touch directory/file
20621 tar --create --file archive --no-recursion directory || exit 1
20622 tar tf archive
20623 ) ) >"$at_stdout" 2>"$at_stder1"
20624     at_status=$?
20625     grep '^ *+' "$at_stder1" >&2
20626     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20627 else
20628     ( :;
20629 mkdir posix
20630 (cd posix
20631 TEST_TAR_FORMAT=posix
20632 export TEST_TAR_FORMAT
20633 TAR_OPTIONS="-H posix"
20634 export TAR_OPTIONS
20635 rm -rf *
20636
20637 mkdir directory
20638 touch directory/file
20639 tar --create --file archive --no-recursion directory || exit 1
20640 tar tf archive
20641 ) ) >"$at_stdout" 2>"$at_stderr"
20642     at_status=$?
20643 fi
20644
20645 at_failed=false
20646 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20647 echo >>"$at_stdout"; echo "directory/
20648 " | $at_diff - "$at_stdout" || at_failed=:
20649 case $at_status in
20650    77) echo 77 > "$at_status_file"; exit 77;;
20651    0) ;;
20652    *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
20653       at_failed=:;;
20654 esac
20655 if $at_failed; then
20656
20657
20658   echo 1 > "$at_status_file"
20659   exit 1
20660 fi
20661
20662 $at_traceon
20663 $at_traceoff
20664 echo "$at_srcdir/recurse.at:24:
20665 mkdir gnu
20666 (cd gnu
20667 TEST_TAR_FORMAT=gnu
20668 export TEST_TAR_FORMAT
20669 TAR_OPTIONS=\"-H gnu\"
20670 export TAR_OPTIONS
20671 rm -rf *
20672
20673 mkdir directory
20674 touch directory/file
20675 tar --create --file archive --no-recursion directory || exit 1
20676 tar tf archive
20677 )"
20678 echo recurse.at:24 >"$at_check_line_file"
20679
20680 at_trace_this=
20681 if test -n "$at_traceon"; then
20682     echo 'Not enabling shell tracing (command contains an embedded newline)'
20683 fi
20684
20685 if test -n "$at_trace_this"; then
20686     ( $at_traceon;
20687 mkdir gnu
20688 (cd gnu
20689 TEST_TAR_FORMAT=gnu
20690 export TEST_TAR_FORMAT
20691 TAR_OPTIONS="-H gnu"
20692 export TAR_OPTIONS
20693 rm -rf *
20694
20695 mkdir directory
20696 touch directory/file
20697 tar --create --file archive --no-recursion directory || exit 1
20698 tar tf archive
20699 ) ) >"$at_stdout" 2>"$at_stder1"
20700     at_status=$?
20701     grep '^ *+' "$at_stder1" >&2
20702     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20703 else
20704     ( :;
20705 mkdir gnu
20706 (cd gnu
20707 TEST_TAR_FORMAT=gnu
20708 export TEST_TAR_FORMAT
20709 TAR_OPTIONS="-H gnu"
20710 export TAR_OPTIONS
20711 rm -rf *
20712
20713 mkdir directory
20714 touch directory/file
20715 tar --create --file archive --no-recursion directory || exit 1
20716 tar tf archive
20717 ) ) >"$at_stdout" 2>"$at_stderr"
20718     at_status=$?
20719 fi
20720
20721 at_failed=false
20722 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20723 echo >>"$at_stdout"; echo "directory/
20724 " | $at_diff - "$at_stdout" || at_failed=:
20725 case $at_status in
20726    77) echo 77 > "$at_status_file"; exit 77;;
20727    0) ;;
20728    *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0"
20729       at_failed=:;;
20730 esac
20731 if $at_failed; then
20732
20733
20734   echo 1 > "$at_status_file"
20735   exit 1
20736 fi
20737
20738 $at_traceon
20739
20740
20741
20742       $at_traceoff
20743       $at_times_p && times >"$at_times_file"
20744     ) 5>&1 2>&1 | eval $at_tee_pipe
20745     at_status=`cat "$at_status_file"`
20746     ;;
20747
20748   51 ) # 51. same-order01.at:26: working -C with --same-order
20749     at_setup_line='same-order01.at:26'
20750     at_desc="working -C with --same-order"
20751     $at_quiet $ECHO_N " 51: working -C with --same-order                   $ECHO_C"
20752     at_xfail=no
20753       test -f $XFAILFILE && at_xfail=yes
20754     echo "#                             -*- compilation -*-" >> "$at_group_log"
20755     (
20756       echo "51. same-order01.at:26: testing ..."
20757       $at_traceon
20758
20759
20760
20761
20762
20763   $at_traceoff
20764 echo "$at_srcdir/same-order01.at:29:
20765 mkdir v7
20766 (cd v7
20767 TEST_TAR_FORMAT=v7
20768 export TEST_TAR_FORMAT
20769 TAR_OPTIONS=\"-H v7\"
20770 export TAR_OPTIONS
20771 rm -rf *
20772
20773
20774 test -z "`sort < /dev/null 2>&1`" || exit 77
20775
20776
20777 genfile -l 1024 -f file1
20778 genfile -l 1024 -f file2
20779 tar cf archive file1 file2
20780
20781 mkdir directory
20782 tar -xf archive --same-order -C directory || exit 1
20783
20784 ls directory|sort
20785 )"
20786 echo same-order01.at:29 >"$at_check_line_file"
20787
20788 at_trace_this=
20789 if test -n "$at_traceon"; then
20790     echo 'Not enabling shell tracing (command contains an embedded newline)'
20791 fi
20792
20793 if test -n "$at_trace_this"; then
20794     ( $at_traceon;
20795 mkdir v7
20796 (cd v7
20797 TEST_TAR_FORMAT=v7
20798 export TEST_TAR_FORMAT
20799 TAR_OPTIONS="-H v7"
20800 export TAR_OPTIONS
20801 rm -rf *
20802
20803
20804 test -z "`sort < /dev/null 2>&1`" || exit 77
20805
20806
20807 genfile -l 1024 -f file1
20808 genfile -l 1024 -f file2
20809 tar cf archive file1 file2
20810
20811 mkdir directory
20812 tar -xf archive --same-order -C directory || exit 1
20813
20814 ls directory|sort
20815 ) ) >"$at_stdout" 2>"$at_stder1"
20816     at_status=$?
20817     grep '^ *+' "$at_stder1" >&2
20818     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20819 else
20820     ( :;
20821 mkdir v7
20822 (cd v7
20823 TEST_TAR_FORMAT=v7
20824 export TEST_TAR_FORMAT
20825 TAR_OPTIONS="-H v7"
20826 export TAR_OPTIONS
20827 rm -rf *
20828
20829
20830 test -z "`sort < /dev/null 2>&1`" || exit 77
20831
20832
20833 genfile -l 1024 -f file1
20834 genfile -l 1024 -f file2
20835 tar cf archive file1 file2
20836
20837 mkdir directory
20838 tar -xf archive --same-order -C directory || exit 1
20839
20840 ls directory|sort
20841 ) ) >"$at_stdout" 2>"$at_stderr"
20842     at_status=$?
20843 fi
20844
20845 at_failed=false
20846 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20847 echo >>"$at_stdout"; echo "file1
20848 file2
20849 " | $at_diff - "$at_stdout" || at_failed=:
20850 case $at_status in
20851    77) echo 77 > "$at_status_file"; exit 77;;
20852    0) ;;
20853    *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
20854       at_failed=:;;
20855 esac
20856 if $at_failed; then
20857
20858
20859   echo 1 > "$at_status_file"
20860   exit 1
20861 fi
20862
20863 $at_traceon
20864 $at_traceoff
20865 echo "$at_srcdir/same-order01.at:29:
20866 mkdir oldgnu
20867 (cd oldgnu
20868 TEST_TAR_FORMAT=oldgnu
20869 export TEST_TAR_FORMAT
20870 TAR_OPTIONS=\"-H oldgnu\"
20871 export TAR_OPTIONS
20872 rm -rf *
20873
20874
20875 test -z "`sort < /dev/null 2>&1`" || exit 77
20876
20877
20878 genfile -l 1024 -f file1
20879 genfile -l 1024 -f file2
20880 tar cf archive file1 file2
20881
20882 mkdir directory
20883 tar -xf archive --same-order -C directory || exit 1
20884
20885 ls directory|sort
20886 )"
20887 echo same-order01.at:29 >"$at_check_line_file"
20888
20889 at_trace_this=
20890 if test -n "$at_traceon"; then
20891     echo 'Not enabling shell tracing (command contains an embedded newline)'
20892 fi
20893
20894 if test -n "$at_trace_this"; then
20895     ( $at_traceon;
20896 mkdir oldgnu
20897 (cd oldgnu
20898 TEST_TAR_FORMAT=oldgnu
20899 export TEST_TAR_FORMAT
20900 TAR_OPTIONS="-H oldgnu"
20901 export TAR_OPTIONS
20902 rm -rf *
20903
20904
20905 test -z "`sort < /dev/null 2>&1`" || exit 77
20906
20907
20908 genfile -l 1024 -f file1
20909 genfile -l 1024 -f file2
20910 tar cf archive file1 file2
20911
20912 mkdir directory
20913 tar -xf archive --same-order -C directory || exit 1
20914
20915 ls directory|sort
20916 ) ) >"$at_stdout" 2>"$at_stder1"
20917     at_status=$?
20918     grep '^ *+' "$at_stder1" >&2
20919     grep -v '^ *+' "$at_stder1" >"$at_stderr"
20920 else
20921     ( :;
20922 mkdir oldgnu
20923 (cd oldgnu
20924 TEST_TAR_FORMAT=oldgnu
20925 export TEST_TAR_FORMAT
20926 TAR_OPTIONS="-H oldgnu"
20927 export TAR_OPTIONS
20928 rm -rf *
20929
20930
20931 test -z "`sort < /dev/null 2>&1`" || exit 77
20932
20933
20934 genfile -l 1024 -f file1
20935 genfile -l 1024 -f file2
20936 tar cf archive file1 file2
20937
20938 mkdir directory
20939 tar -xf archive --same-order -C directory || exit 1
20940
20941 ls directory|sort
20942 ) ) >"$at_stdout" 2>"$at_stderr"
20943     at_status=$?
20944 fi
20945
20946 at_failed=false
20947 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
20948 echo >>"$at_stdout"; echo "file1
20949 file2
20950 " | $at_diff - "$at_stdout" || at_failed=:
20951 case $at_status in
20952    77) echo 77 > "$at_status_file"; exit 77;;
20953    0) ;;
20954    *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
20955       at_failed=:;;
20956 esac
20957 if $at_failed; then
20958
20959
20960   echo 1 > "$at_status_file"
20961   exit 1
20962 fi
20963
20964 $at_traceon
20965 $at_traceoff
20966 echo "$at_srcdir/same-order01.at:29:
20967 mkdir ustar
20968 (cd ustar
20969 TEST_TAR_FORMAT=ustar
20970 export TEST_TAR_FORMAT
20971 TAR_OPTIONS=\"-H ustar\"
20972 export TAR_OPTIONS
20973 rm -rf *
20974
20975
20976 test -z "`sort < /dev/null 2>&1`" || exit 77
20977
20978
20979 genfile -l 1024 -f file1
20980 genfile -l 1024 -f file2
20981 tar cf archive file1 file2
20982
20983 mkdir directory
20984 tar -xf archive --same-order -C directory || exit 1
20985
20986 ls directory|sort
20987 )"
20988 echo same-order01.at:29 >"$at_check_line_file"
20989
20990 at_trace_this=
20991 if test -n "$at_traceon"; then
20992     echo 'Not enabling shell tracing (command contains an embedded newline)'
20993 fi
20994
20995 if test -n "$at_trace_this"; then
20996     ( $at_traceon;
20997 mkdir ustar
20998 (cd ustar
20999 TEST_TAR_FORMAT=ustar
21000 export TEST_TAR_FORMAT
21001 TAR_OPTIONS="-H ustar"
21002 export TAR_OPTIONS
21003 rm -rf *
21004
21005
21006 test -z "`sort < /dev/null 2>&1`" || exit 77
21007
21008
21009 genfile -l 1024 -f file1
21010 genfile -l 1024 -f file2
21011 tar cf archive file1 file2
21012
21013 mkdir directory
21014 tar -xf archive --same-order -C directory || exit 1
21015
21016 ls directory|sort
21017 ) ) >"$at_stdout" 2>"$at_stder1"
21018     at_status=$?
21019     grep '^ *+' "$at_stder1" >&2
21020     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21021 else
21022     ( :;
21023 mkdir ustar
21024 (cd ustar
21025 TEST_TAR_FORMAT=ustar
21026 export TEST_TAR_FORMAT
21027 TAR_OPTIONS="-H ustar"
21028 export TAR_OPTIONS
21029 rm -rf *
21030
21031
21032 test -z "`sort < /dev/null 2>&1`" || exit 77
21033
21034
21035 genfile -l 1024 -f file1
21036 genfile -l 1024 -f file2
21037 tar cf archive file1 file2
21038
21039 mkdir directory
21040 tar -xf archive --same-order -C directory || exit 1
21041
21042 ls directory|sort
21043 ) ) >"$at_stdout" 2>"$at_stderr"
21044     at_status=$?
21045 fi
21046
21047 at_failed=false
21048 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21049 echo >>"$at_stdout"; echo "file1
21050 file2
21051 " | $at_diff - "$at_stdout" || at_failed=:
21052 case $at_status in
21053    77) echo 77 > "$at_status_file"; exit 77;;
21054    0) ;;
21055    *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
21056       at_failed=:;;
21057 esac
21058 if $at_failed; then
21059
21060
21061   echo 1 > "$at_status_file"
21062   exit 1
21063 fi
21064
21065 $at_traceon
21066 $at_traceoff
21067 echo "$at_srcdir/same-order01.at:29:
21068 mkdir posix
21069 (cd posix
21070 TEST_TAR_FORMAT=posix
21071 export TEST_TAR_FORMAT
21072 TAR_OPTIONS=\"-H posix\"
21073 export TAR_OPTIONS
21074 rm -rf *
21075
21076
21077 test -z "`sort < /dev/null 2>&1`" || exit 77
21078
21079
21080 genfile -l 1024 -f file1
21081 genfile -l 1024 -f file2
21082 tar cf archive file1 file2
21083
21084 mkdir directory
21085 tar -xf archive --same-order -C directory || exit 1
21086
21087 ls directory|sort
21088 )"
21089 echo same-order01.at:29 >"$at_check_line_file"
21090
21091 at_trace_this=
21092 if test -n "$at_traceon"; then
21093     echo 'Not enabling shell tracing (command contains an embedded newline)'
21094 fi
21095
21096 if test -n "$at_trace_this"; then
21097     ( $at_traceon;
21098 mkdir posix
21099 (cd posix
21100 TEST_TAR_FORMAT=posix
21101 export TEST_TAR_FORMAT
21102 TAR_OPTIONS="-H posix"
21103 export TAR_OPTIONS
21104 rm -rf *
21105
21106
21107 test -z "`sort < /dev/null 2>&1`" || exit 77
21108
21109
21110 genfile -l 1024 -f file1
21111 genfile -l 1024 -f file2
21112 tar cf archive file1 file2
21113
21114 mkdir directory
21115 tar -xf archive --same-order -C directory || exit 1
21116
21117 ls directory|sort
21118 ) ) >"$at_stdout" 2>"$at_stder1"
21119     at_status=$?
21120     grep '^ *+' "$at_stder1" >&2
21121     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21122 else
21123     ( :;
21124 mkdir posix
21125 (cd posix
21126 TEST_TAR_FORMAT=posix
21127 export TEST_TAR_FORMAT
21128 TAR_OPTIONS="-H posix"
21129 export TAR_OPTIONS
21130 rm -rf *
21131
21132
21133 test -z "`sort < /dev/null 2>&1`" || exit 77
21134
21135
21136 genfile -l 1024 -f file1
21137 genfile -l 1024 -f file2
21138 tar cf archive file1 file2
21139
21140 mkdir directory
21141 tar -xf archive --same-order -C directory || exit 1
21142
21143 ls directory|sort
21144 ) ) >"$at_stdout" 2>"$at_stderr"
21145     at_status=$?
21146 fi
21147
21148 at_failed=false
21149 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21150 echo >>"$at_stdout"; echo "file1
21151 file2
21152 " | $at_diff - "$at_stdout" || at_failed=:
21153 case $at_status in
21154    77) echo 77 > "$at_status_file"; exit 77;;
21155    0) ;;
21156    *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
21157       at_failed=:;;
21158 esac
21159 if $at_failed; then
21160
21161
21162   echo 1 > "$at_status_file"
21163   exit 1
21164 fi
21165
21166 $at_traceon
21167 $at_traceoff
21168 echo "$at_srcdir/same-order01.at:29:
21169 mkdir gnu
21170 (cd gnu
21171 TEST_TAR_FORMAT=gnu
21172 export TEST_TAR_FORMAT
21173 TAR_OPTIONS=\"-H gnu\"
21174 export TAR_OPTIONS
21175 rm -rf *
21176
21177
21178 test -z "`sort < /dev/null 2>&1`" || exit 77
21179
21180
21181 genfile -l 1024 -f file1
21182 genfile -l 1024 -f file2
21183 tar cf archive file1 file2
21184
21185 mkdir directory
21186 tar -xf archive --same-order -C directory || exit 1
21187
21188 ls directory|sort
21189 )"
21190 echo same-order01.at:29 >"$at_check_line_file"
21191
21192 at_trace_this=
21193 if test -n "$at_traceon"; then
21194     echo 'Not enabling shell tracing (command contains an embedded newline)'
21195 fi
21196
21197 if test -n "$at_trace_this"; then
21198     ( $at_traceon;
21199 mkdir gnu
21200 (cd gnu
21201 TEST_TAR_FORMAT=gnu
21202 export TEST_TAR_FORMAT
21203 TAR_OPTIONS="-H gnu"
21204 export TAR_OPTIONS
21205 rm -rf *
21206
21207
21208 test -z "`sort < /dev/null 2>&1`" || exit 77
21209
21210
21211 genfile -l 1024 -f file1
21212 genfile -l 1024 -f file2
21213 tar cf archive file1 file2
21214
21215 mkdir directory
21216 tar -xf archive --same-order -C directory || exit 1
21217
21218 ls directory|sort
21219 ) ) >"$at_stdout" 2>"$at_stder1"
21220     at_status=$?
21221     grep '^ *+' "$at_stder1" >&2
21222     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21223 else
21224     ( :;
21225 mkdir gnu
21226 (cd gnu
21227 TEST_TAR_FORMAT=gnu
21228 export TEST_TAR_FORMAT
21229 TAR_OPTIONS="-H gnu"
21230 export TAR_OPTIONS
21231 rm -rf *
21232
21233
21234 test -z "`sort < /dev/null 2>&1`" || exit 77
21235
21236
21237 genfile -l 1024 -f file1
21238 genfile -l 1024 -f file2
21239 tar cf archive file1 file2
21240
21241 mkdir directory
21242 tar -xf archive --same-order -C directory || exit 1
21243
21244 ls directory|sort
21245 ) ) >"$at_stdout" 2>"$at_stderr"
21246     at_status=$?
21247 fi
21248
21249 at_failed=false
21250 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21251 echo >>"$at_stdout"; echo "file1
21252 file2
21253 " | $at_diff - "$at_stdout" || at_failed=:
21254 case $at_status in
21255    77) echo 77 > "$at_status_file"; exit 77;;
21256    0) ;;
21257    *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0"
21258       at_failed=:;;
21259 esac
21260 if $at_failed; then
21261
21262
21263   echo 1 > "$at_status_file"
21264   exit 1
21265 fi
21266
21267 $at_traceon
21268
21269
21270
21271       $at_traceoff
21272       $at_times_p && times >"$at_times_file"
21273     ) 5>&1 2>&1 | eval $at_tee_pipe
21274     at_status=`cat "$at_status_file"`
21275     ;;
21276
21277   52 ) # 52. same-order02.at:25: multiple -C options
21278     at_setup_line='same-order02.at:25'
21279     at_desc="multiple -C options"
21280     $at_quiet $ECHO_N " 52: multiple -C options                            $ECHO_C"
21281     at_xfail=no
21282       test -f $XFAILFILE && at_xfail=yes
21283     echo "#                             -*- compilation -*-" >> "$at_group_log"
21284     (
21285       echo "52. same-order02.at:25: testing ..."
21286       $at_traceon
21287
21288
21289
21290
21291
21292   $at_traceoff
21293 echo "$at_srcdir/same-order02.at:28:
21294 mkdir v7
21295 (cd v7
21296 TEST_TAR_FORMAT=v7
21297 export TEST_TAR_FORMAT
21298 TAR_OPTIONS=\"-H v7\"
21299 export TAR_OPTIONS
21300 rm -rf *
21301
21302 genfile -l 1024 -f file1
21303 genfile -l 1024 -f file2
21304 tar cf archive file1 file2
21305
21306 mkdir en
21307 mkdir to
21308
21309 HERE=\`pwd\`
21310 tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
21311
21312 ls en
21313 echo separator
21314 ls to
21315 )"
21316 echo same-order02.at:28 >"$at_check_line_file"
21317
21318 at_trace_this=
21319 if test -n "$at_traceon"; then
21320     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
21321 fi
21322
21323 if test -n "$at_trace_this"; then
21324     ( $at_traceon;
21325 mkdir v7
21326 (cd v7
21327 TEST_TAR_FORMAT=v7
21328 export TEST_TAR_FORMAT
21329 TAR_OPTIONS="-H v7"
21330 export TAR_OPTIONS
21331 rm -rf *
21332
21333 genfile -l 1024 -f file1
21334 genfile -l 1024 -f file2
21335 tar cf archive file1 file2
21336
21337 mkdir en
21338 mkdir to
21339
21340 HERE=`pwd`
21341 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
21342
21343 ls en
21344 echo separator
21345 ls to
21346 ) ) >"$at_stdout" 2>"$at_stder1"
21347     at_status=$?
21348     grep '^ *+' "$at_stder1" >&2
21349     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21350 else
21351     ( :;
21352 mkdir v7
21353 (cd v7
21354 TEST_TAR_FORMAT=v7
21355 export TEST_TAR_FORMAT
21356 TAR_OPTIONS="-H v7"
21357 export TAR_OPTIONS
21358 rm -rf *
21359
21360 genfile -l 1024 -f file1
21361 genfile -l 1024 -f file2
21362 tar cf archive file1 file2
21363
21364 mkdir en
21365 mkdir to
21366
21367 HERE=`pwd`
21368 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
21369
21370 ls en
21371 echo separator
21372 ls to
21373 ) ) >"$at_stdout" 2>"$at_stderr"
21374     at_status=$?
21375 fi
21376
21377 at_failed=false
21378 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21379 echo >>"$at_stdout"; echo "file1
21380 separator
21381 file2
21382 " | $at_diff - "$at_stdout" || at_failed=:
21383 case $at_status in
21384    77) echo 77 > "$at_status_file"; exit 77;;
21385    0) ;;
21386    *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
21387       at_failed=:;;
21388 esac
21389 if $at_failed; then
21390
21391
21392   echo 1 > "$at_status_file"
21393   exit 1
21394 fi
21395
21396 $at_traceon
21397 $at_traceoff
21398 echo "$at_srcdir/same-order02.at:28:
21399 mkdir oldgnu
21400 (cd oldgnu
21401 TEST_TAR_FORMAT=oldgnu
21402 export TEST_TAR_FORMAT
21403 TAR_OPTIONS=\"-H oldgnu\"
21404 export TAR_OPTIONS
21405 rm -rf *
21406
21407 genfile -l 1024 -f file1
21408 genfile -l 1024 -f file2
21409 tar cf archive file1 file2
21410
21411 mkdir en
21412 mkdir to
21413
21414 HERE=\`pwd\`
21415 tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
21416
21417 ls en
21418 echo separator
21419 ls to
21420 )"
21421 echo same-order02.at:28 >"$at_check_line_file"
21422
21423 at_trace_this=
21424 if test -n "$at_traceon"; then
21425     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
21426 fi
21427
21428 if test -n "$at_trace_this"; then
21429     ( $at_traceon;
21430 mkdir oldgnu
21431 (cd oldgnu
21432 TEST_TAR_FORMAT=oldgnu
21433 export TEST_TAR_FORMAT
21434 TAR_OPTIONS="-H oldgnu"
21435 export TAR_OPTIONS
21436 rm -rf *
21437
21438 genfile -l 1024 -f file1
21439 genfile -l 1024 -f file2
21440 tar cf archive file1 file2
21441
21442 mkdir en
21443 mkdir to
21444
21445 HERE=`pwd`
21446 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
21447
21448 ls en
21449 echo separator
21450 ls to
21451 ) ) >"$at_stdout" 2>"$at_stder1"
21452     at_status=$?
21453     grep '^ *+' "$at_stder1" >&2
21454     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21455 else
21456     ( :;
21457 mkdir oldgnu
21458 (cd oldgnu
21459 TEST_TAR_FORMAT=oldgnu
21460 export TEST_TAR_FORMAT
21461 TAR_OPTIONS="-H oldgnu"
21462 export TAR_OPTIONS
21463 rm -rf *
21464
21465 genfile -l 1024 -f file1
21466 genfile -l 1024 -f file2
21467 tar cf archive file1 file2
21468
21469 mkdir en
21470 mkdir to
21471
21472 HERE=`pwd`
21473 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
21474
21475 ls en
21476 echo separator
21477 ls to
21478 ) ) >"$at_stdout" 2>"$at_stderr"
21479     at_status=$?
21480 fi
21481
21482 at_failed=false
21483 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21484 echo >>"$at_stdout"; echo "file1
21485 separator
21486 file2
21487 " | $at_diff - "$at_stdout" || at_failed=:
21488 case $at_status in
21489    77) echo 77 > "$at_status_file"; exit 77;;
21490    0) ;;
21491    *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
21492       at_failed=:;;
21493 esac
21494 if $at_failed; then
21495
21496
21497   echo 1 > "$at_status_file"
21498   exit 1
21499 fi
21500
21501 $at_traceon
21502 $at_traceoff
21503 echo "$at_srcdir/same-order02.at:28:
21504 mkdir ustar
21505 (cd ustar
21506 TEST_TAR_FORMAT=ustar
21507 export TEST_TAR_FORMAT
21508 TAR_OPTIONS=\"-H ustar\"
21509 export TAR_OPTIONS
21510 rm -rf *
21511
21512 genfile -l 1024 -f file1
21513 genfile -l 1024 -f file2
21514 tar cf archive file1 file2
21515
21516 mkdir en
21517 mkdir to
21518
21519 HERE=\`pwd\`
21520 tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
21521
21522 ls en
21523 echo separator
21524 ls to
21525 )"
21526 echo same-order02.at:28 >"$at_check_line_file"
21527
21528 at_trace_this=
21529 if test -n "$at_traceon"; then
21530     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
21531 fi
21532
21533 if test -n "$at_trace_this"; then
21534     ( $at_traceon;
21535 mkdir ustar
21536 (cd ustar
21537 TEST_TAR_FORMAT=ustar
21538 export TEST_TAR_FORMAT
21539 TAR_OPTIONS="-H ustar"
21540 export TAR_OPTIONS
21541 rm -rf *
21542
21543 genfile -l 1024 -f file1
21544 genfile -l 1024 -f file2
21545 tar cf archive file1 file2
21546
21547 mkdir en
21548 mkdir to
21549
21550 HERE=`pwd`
21551 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
21552
21553 ls en
21554 echo separator
21555 ls to
21556 ) ) >"$at_stdout" 2>"$at_stder1"
21557     at_status=$?
21558     grep '^ *+' "$at_stder1" >&2
21559     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21560 else
21561     ( :;
21562 mkdir ustar
21563 (cd ustar
21564 TEST_TAR_FORMAT=ustar
21565 export TEST_TAR_FORMAT
21566 TAR_OPTIONS="-H ustar"
21567 export TAR_OPTIONS
21568 rm -rf *
21569
21570 genfile -l 1024 -f file1
21571 genfile -l 1024 -f file2
21572 tar cf archive file1 file2
21573
21574 mkdir en
21575 mkdir to
21576
21577 HERE=`pwd`
21578 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
21579
21580 ls en
21581 echo separator
21582 ls to
21583 ) ) >"$at_stdout" 2>"$at_stderr"
21584     at_status=$?
21585 fi
21586
21587 at_failed=false
21588 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21589 echo >>"$at_stdout"; echo "file1
21590 separator
21591 file2
21592 " | $at_diff - "$at_stdout" || at_failed=:
21593 case $at_status in
21594    77) echo 77 > "$at_status_file"; exit 77;;
21595    0) ;;
21596    *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
21597       at_failed=:;;
21598 esac
21599 if $at_failed; then
21600
21601
21602   echo 1 > "$at_status_file"
21603   exit 1
21604 fi
21605
21606 $at_traceon
21607 $at_traceoff
21608 echo "$at_srcdir/same-order02.at:28:
21609 mkdir posix
21610 (cd posix
21611 TEST_TAR_FORMAT=posix
21612 export TEST_TAR_FORMAT
21613 TAR_OPTIONS=\"-H posix\"
21614 export TAR_OPTIONS
21615 rm -rf *
21616
21617 genfile -l 1024 -f file1
21618 genfile -l 1024 -f file2
21619 tar cf archive file1 file2
21620
21621 mkdir en
21622 mkdir to
21623
21624 HERE=\`pwd\`
21625 tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
21626
21627 ls en
21628 echo separator
21629 ls to
21630 )"
21631 echo same-order02.at:28 >"$at_check_line_file"
21632
21633 at_trace_this=
21634 if test -n "$at_traceon"; then
21635     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
21636 fi
21637
21638 if test -n "$at_trace_this"; then
21639     ( $at_traceon;
21640 mkdir posix
21641 (cd posix
21642 TEST_TAR_FORMAT=posix
21643 export TEST_TAR_FORMAT
21644 TAR_OPTIONS="-H posix"
21645 export TAR_OPTIONS
21646 rm -rf *
21647
21648 genfile -l 1024 -f file1
21649 genfile -l 1024 -f file2
21650 tar cf archive file1 file2
21651
21652 mkdir en
21653 mkdir to
21654
21655 HERE=`pwd`
21656 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
21657
21658 ls en
21659 echo separator
21660 ls to
21661 ) ) >"$at_stdout" 2>"$at_stder1"
21662     at_status=$?
21663     grep '^ *+' "$at_stder1" >&2
21664     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21665 else
21666     ( :;
21667 mkdir posix
21668 (cd posix
21669 TEST_TAR_FORMAT=posix
21670 export TEST_TAR_FORMAT
21671 TAR_OPTIONS="-H posix"
21672 export TAR_OPTIONS
21673 rm -rf *
21674
21675 genfile -l 1024 -f file1
21676 genfile -l 1024 -f file2
21677 tar cf archive file1 file2
21678
21679 mkdir en
21680 mkdir to
21681
21682 HERE=`pwd`
21683 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
21684
21685 ls en
21686 echo separator
21687 ls to
21688 ) ) >"$at_stdout" 2>"$at_stderr"
21689     at_status=$?
21690 fi
21691
21692 at_failed=false
21693 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21694 echo >>"$at_stdout"; echo "file1
21695 separator
21696 file2
21697 " | $at_diff - "$at_stdout" || at_failed=:
21698 case $at_status in
21699    77) echo 77 > "$at_status_file"; exit 77;;
21700    0) ;;
21701    *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
21702       at_failed=:;;
21703 esac
21704 if $at_failed; then
21705
21706
21707   echo 1 > "$at_status_file"
21708   exit 1
21709 fi
21710
21711 $at_traceon
21712 $at_traceoff
21713 echo "$at_srcdir/same-order02.at:28:
21714 mkdir gnu
21715 (cd gnu
21716 TEST_TAR_FORMAT=gnu
21717 export TEST_TAR_FORMAT
21718 TAR_OPTIONS=\"-H gnu\"
21719 export TAR_OPTIONS
21720 rm -rf *
21721
21722 genfile -l 1024 -f file1
21723 genfile -l 1024 -f file2
21724 tar cf archive file1 file2
21725
21726 mkdir en
21727 mkdir to
21728
21729 HERE=\`pwd\`
21730 tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1
21731
21732 ls en
21733 echo separator
21734 ls to
21735 )"
21736 echo same-order02.at:28 >"$at_check_line_file"
21737
21738 at_trace_this=
21739 if test -n "$at_traceon"; then
21740     echo 'Not enabling shell tracing (command contains a `...` command substitution)'
21741 fi
21742
21743 if test -n "$at_trace_this"; then
21744     ( $at_traceon;
21745 mkdir gnu
21746 (cd gnu
21747 TEST_TAR_FORMAT=gnu
21748 export TEST_TAR_FORMAT
21749 TAR_OPTIONS="-H gnu"
21750 export TAR_OPTIONS
21751 rm -rf *
21752
21753 genfile -l 1024 -f file1
21754 genfile -l 1024 -f file2
21755 tar cf archive file1 file2
21756
21757 mkdir en
21758 mkdir to
21759
21760 HERE=`pwd`
21761 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
21762
21763 ls en
21764 echo separator
21765 ls to
21766 ) ) >"$at_stdout" 2>"$at_stder1"
21767     at_status=$?
21768     grep '^ *+' "$at_stder1" >&2
21769     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21770 else
21771     ( :;
21772 mkdir gnu
21773 (cd gnu
21774 TEST_TAR_FORMAT=gnu
21775 export TEST_TAR_FORMAT
21776 TAR_OPTIONS="-H gnu"
21777 export TAR_OPTIONS
21778 rm -rf *
21779
21780 genfile -l 1024 -f file1
21781 genfile -l 1024 -f file2
21782 tar cf archive file1 file2
21783
21784 mkdir en
21785 mkdir to
21786
21787 HERE=`pwd`
21788 tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
21789
21790 ls en
21791 echo separator
21792 ls to
21793 ) ) >"$at_stdout" 2>"$at_stderr"
21794     at_status=$?
21795 fi
21796
21797 at_failed=false
21798 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21799 echo >>"$at_stdout"; echo "file1
21800 separator
21801 file2
21802 " | $at_diff - "$at_stdout" || at_failed=:
21803 case $at_status in
21804    77) echo 77 > "$at_status_file"; exit 77;;
21805    0) ;;
21806    *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0"
21807       at_failed=:;;
21808 esac
21809 if $at_failed; then
21810
21811
21812   echo 1 > "$at_status_file"
21813   exit 1
21814 fi
21815
21816 $at_traceon
21817
21818
21819
21820       $at_traceoff
21821       $at_times_p && times >"$at_times_file"
21822     ) 5>&1 2>&1 | eval $at_tee_pipe
21823     at_status=`cat "$at_status_file"`
21824     ;;
21825
21826   53 ) # 53. shortrec.at:25: short records
21827     at_setup_line='shortrec.at:25'
21828     at_desc="short records"
21829     $at_quiet $ECHO_N " 53: short records                                  $ECHO_C"
21830     at_xfail=no
21831       test -f $XFAILFILE && at_xfail=yes
21832     echo "#                             -*- compilation -*-" >> "$at_group_log"
21833     (
21834       echo "53. shortrec.at:25: testing ..."
21835       $at_traceon
21836
21837
21838
21839
21840
21841   $at_traceoff
21842 echo "$at_srcdir/shortrec.at:28:
21843 mkdir v7
21844 (cd v7
21845 TEST_TAR_FORMAT=v7
21846 export TEST_TAR_FORMAT
21847 TAR_OPTIONS=\"-H v7\"
21848 export TAR_OPTIONS
21849 rm -rf *
21850
21851 mkdir directory
21852 (cd directory && touch a b c d e f g h i j k l m n o p q r)
21853 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
21854 tar -c -b 1 -f archive directory
21855 tar -t -f archive >/dev/null
21856 tar -t -f - < archive >/dev/null
21857
21858 rm -r directory
21859 )"
21860 echo shortrec.at:28 >"$at_check_line_file"
21861
21862 at_trace_this=
21863 if test -n "$at_traceon"; then
21864     echo 'Not enabling shell tracing (command contains an embedded newline)'
21865 fi
21866
21867 if test -n "$at_trace_this"; then
21868     ( $at_traceon;
21869 mkdir v7
21870 (cd v7
21871 TEST_TAR_FORMAT=v7
21872 export TEST_TAR_FORMAT
21873 TAR_OPTIONS="-H v7"
21874 export TAR_OPTIONS
21875 rm -rf *
21876
21877 mkdir directory
21878 (cd directory && touch a b c d e f g h i j k l m n o p q r)
21879 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
21880 tar -c -b 1 -f archive directory
21881 tar -t -f archive >/dev/null
21882 tar -t -f - < archive >/dev/null
21883
21884 rm -r directory
21885 ) ) >"$at_stdout" 2>"$at_stder1"
21886     at_status=$?
21887     grep '^ *+' "$at_stder1" >&2
21888     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21889 else
21890     ( :;
21891 mkdir v7
21892 (cd v7
21893 TEST_TAR_FORMAT=v7
21894 export TEST_TAR_FORMAT
21895 TAR_OPTIONS="-H v7"
21896 export TAR_OPTIONS
21897 rm -rf *
21898
21899 mkdir directory
21900 (cd directory && touch a b c d e f g h i j k l m n o p q r)
21901 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
21902 tar -c -b 1 -f archive directory
21903 tar -t -f archive >/dev/null
21904 tar -t -f - < archive >/dev/null
21905
21906 rm -r directory
21907 ) ) >"$at_stdout" 2>"$at_stderr"
21908     at_status=$?
21909 fi
21910
21911 at_failed=false
21912 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
21913 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
21914 case $at_status in
21915    77) echo 77 > "$at_status_file"; exit 77;;
21916    0) ;;
21917    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
21918       at_failed=:;;
21919 esac
21920 if $at_failed; then
21921
21922
21923   echo 1 > "$at_status_file"
21924   exit 1
21925 fi
21926
21927 $at_traceon
21928 $at_traceoff
21929 echo "$at_srcdir/shortrec.at:28:
21930 mkdir oldgnu
21931 (cd oldgnu
21932 TEST_TAR_FORMAT=oldgnu
21933 export TEST_TAR_FORMAT
21934 TAR_OPTIONS=\"-H oldgnu\"
21935 export TAR_OPTIONS
21936 rm -rf *
21937
21938 mkdir directory
21939 (cd directory && touch a b c d e f g h i j k l m n o p q r)
21940 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
21941 tar -c -b 1 -f archive directory
21942 tar -t -f archive >/dev/null
21943 tar -t -f - < archive >/dev/null
21944
21945 rm -r directory
21946 )"
21947 echo shortrec.at:28 >"$at_check_line_file"
21948
21949 at_trace_this=
21950 if test -n "$at_traceon"; then
21951     echo 'Not enabling shell tracing (command contains an embedded newline)'
21952 fi
21953
21954 if test -n "$at_trace_this"; then
21955     ( $at_traceon;
21956 mkdir oldgnu
21957 (cd oldgnu
21958 TEST_TAR_FORMAT=oldgnu
21959 export TEST_TAR_FORMAT
21960 TAR_OPTIONS="-H oldgnu"
21961 export TAR_OPTIONS
21962 rm -rf *
21963
21964 mkdir directory
21965 (cd directory && touch a b c d e f g h i j k l m n o p q r)
21966 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
21967 tar -c -b 1 -f archive directory
21968 tar -t -f archive >/dev/null
21969 tar -t -f - < archive >/dev/null
21970
21971 rm -r directory
21972 ) ) >"$at_stdout" 2>"$at_stder1"
21973     at_status=$?
21974     grep '^ *+' "$at_stder1" >&2
21975     grep -v '^ *+' "$at_stder1" >"$at_stderr"
21976 else
21977     ( :;
21978 mkdir oldgnu
21979 (cd oldgnu
21980 TEST_TAR_FORMAT=oldgnu
21981 export TEST_TAR_FORMAT
21982 TAR_OPTIONS="-H oldgnu"
21983 export TAR_OPTIONS
21984 rm -rf *
21985
21986 mkdir directory
21987 (cd directory && touch a b c d e f g h i j k l m n o p q r)
21988 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
21989 tar -c -b 1 -f archive directory
21990 tar -t -f archive >/dev/null
21991 tar -t -f - < archive >/dev/null
21992
21993 rm -r directory
21994 ) ) >"$at_stdout" 2>"$at_stderr"
21995     at_status=$?
21996 fi
21997
21998 at_failed=false
21999 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22000 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
22001 case $at_status in
22002    77) echo 77 > "$at_status_file"; exit 77;;
22003    0) ;;
22004    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
22005       at_failed=:;;
22006 esac
22007 if $at_failed; then
22008
22009
22010   echo 1 > "$at_status_file"
22011   exit 1
22012 fi
22013
22014 $at_traceon
22015 $at_traceoff
22016 echo "$at_srcdir/shortrec.at:28:
22017 mkdir ustar
22018 (cd ustar
22019 TEST_TAR_FORMAT=ustar
22020 export TEST_TAR_FORMAT
22021 TAR_OPTIONS=\"-H ustar\"
22022 export TAR_OPTIONS
22023 rm -rf *
22024
22025 mkdir directory
22026 (cd directory && touch a b c d e f g h i j k l m n o p q r)
22027 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
22028 tar -c -b 1 -f archive directory
22029 tar -t -f archive >/dev/null
22030 tar -t -f - < archive >/dev/null
22031
22032 rm -r directory
22033 )"
22034 echo shortrec.at:28 >"$at_check_line_file"
22035
22036 at_trace_this=
22037 if test -n "$at_traceon"; then
22038     echo 'Not enabling shell tracing (command contains an embedded newline)'
22039 fi
22040
22041 if test -n "$at_trace_this"; then
22042     ( $at_traceon;
22043 mkdir ustar
22044 (cd ustar
22045 TEST_TAR_FORMAT=ustar
22046 export TEST_TAR_FORMAT
22047 TAR_OPTIONS="-H ustar"
22048 export TAR_OPTIONS
22049 rm -rf *
22050
22051 mkdir directory
22052 (cd directory && touch a b c d e f g h i j k l m n o p q r)
22053 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
22054 tar -c -b 1 -f archive directory
22055 tar -t -f archive >/dev/null
22056 tar -t -f - < archive >/dev/null
22057
22058 rm -r directory
22059 ) ) >"$at_stdout" 2>"$at_stder1"
22060     at_status=$?
22061     grep '^ *+' "$at_stder1" >&2
22062     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22063 else
22064     ( :;
22065 mkdir ustar
22066 (cd ustar
22067 TEST_TAR_FORMAT=ustar
22068 export TEST_TAR_FORMAT
22069 TAR_OPTIONS="-H ustar"
22070 export TAR_OPTIONS
22071 rm -rf *
22072
22073 mkdir directory
22074 (cd directory && touch a b c d e f g h i j k l m n o p q r)
22075 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
22076 tar -c -b 1 -f archive directory
22077 tar -t -f archive >/dev/null
22078 tar -t -f - < archive >/dev/null
22079
22080 rm -r directory
22081 ) ) >"$at_stdout" 2>"$at_stderr"
22082     at_status=$?
22083 fi
22084
22085 at_failed=false
22086 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22087 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
22088 case $at_status in
22089    77) echo 77 > "$at_status_file"; exit 77;;
22090    0) ;;
22091    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
22092       at_failed=:;;
22093 esac
22094 if $at_failed; then
22095
22096
22097   echo 1 > "$at_status_file"
22098   exit 1
22099 fi
22100
22101 $at_traceon
22102 $at_traceoff
22103 echo "$at_srcdir/shortrec.at:28:
22104 mkdir posix
22105 (cd posix
22106 TEST_TAR_FORMAT=posix
22107 export TEST_TAR_FORMAT
22108 TAR_OPTIONS=\"-H posix\"
22109 export TAR_OPTIONS
22110 rm -rf *
22111
22112 mkdir directory
22113 (cd directory && touch a b c d e f g h i j k l m n o p q r)
22114 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
22115 tar -c -b 1 -f archive directory
22116 tar -t -f archive >/dev/null
22117 tar -t -f - < archive >/dev/null
22118
22119 rm -r directory
22120 )"
22121 echo shortrec.at:28 >"$at_check_line_file"
22122
22123 at_trace_this=
22124 if test -n "$at_traceon"; then
22125     echo 'Not enabling shell tracing (command contains an embedded newline)'
22126 fi
22127
22128 if test -n "$at_trace_this"; then
22129     ( $at_traceon;
22130 mkdir posix
22131 (cd posix
22132 TEST_TAR_FORMAT=posix
22133 export TEST_TAR_FORMAT
22134 TAR_OPTIONS="-H posix"
22135 export TAR_OPTIONS
22136 rm -rf *
22137
22138 mkdir directory
22139 (cd directory && touch a b c d e f g h i j k l m n o p q r)
22140 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
22141 tar -c -b 1 -f archive directory
22142 tar -t -f archive >/dev/null
22143 tar -t -f - < archive >/dev/null
22144
22145 rm -r directory
22146 ) ) >"$at_stdout" 2>"$at_stder1"
22147     at_status=$?
22148     grep '^ *+' "$at_stder1" >&2
22149     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22150 else
22151     ( :;
22152 mkdir posix
22153 (cd posix
22154 TEST_TAR_FORMAT=posix
22155 export TEST_TAR_FORMAT
22156 TAR_OPTIONS="-H posix"
22157 export TAR_OPTIONS
22158 rm -rf *
22159
22160 mkdir directory
22161 (cd directory && touch a b c d e f g h i j k l m n o p q r)
22162 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
22163 tar -c -b 1 -f archive directory
22164 tar -t -f archive >/dev/null
22165 tar -t -f - < archive >/dev/null
22166
22167 rm -r directory
22168 ) ) >"$at_stdout" 2>"$at_stderr"
22169     at_status=$?
22170 fi
22171
22172 at_failed=false
22173 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22174 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
22175 case $at_status in
22176    77) echo 77 > "$at_status_file"; exit 77;;
22177    0) ;;
22178    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
22179       at_failed=:;;
22180 esac
22181 if $at_failed; then
22182
22183
22184   echo 1 > "$at_status_file"
22185   exit 1
22186 fi
22187
22188 $at_traceon
22189 $at_traceoff
22190 echo "$at_srcdir/shortrec.at:28:
22191 mkdir gnu
22192 (cd gnu
22193 TEST_TAR_FORMAT=gnu
22194 export TEST_TAR_FORMAT
22195 TAR_OPTIONS=\"-H gnu\"
22196 export TAR_OPTIONS
22197 rm -rf *
22198
22199 mkdir directory
22200 (cd directory && touch a b c d e f g h i j k l m n o p q r)
22201 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
22202 tar -c -b 1 -f archive directory
22203 tar -t -f archive >/dev/null
22204 tar -t -f - < archive >/dev/null
22205
22206 rm -r directory
22207 )"
22208 echo shortrec.at:28 >"$at_check_line_file"
22209
22210 at_trace_this=
22211 if test -n "$at_traceon"; then
22212     echo 'Not enabling shell tracing (command contains an embedded newline)'
22213 fi
22214
22215 if test -n "$at_trace_this"; then
22216     ( $at_traceon;
22217 mkdir gnu
22218 (cd gnu
22219 TEST_TAR_FORMAT=gnu
22220 export TEST_TAR_FORMAT
22221 TAR_OPTIONS="-H gnu"
22222 export TAR_OPTIONS
22223 rm -rf *
22224
22225 mkdir directory
22226 (cd directory && touch a b c d e f g h i j k l m n o p q r)
22227 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
22228 tar -c -b 1 -f archive directory
22229 tar -t -f archive >/dev/null
22230 tar -t -f - < archive >/dev/null
22231
22232 rm -r directory
22233 ) ) >"$at_stdout" 2>"$at_stder1"
22234     at_status=$?
22235     grep '^ *+' "$at_stder1" >&2
22236     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22237 else
22238     ( :;
22239 mkdir gnu
22240 (cd gnu
22241 TEST_TAR_FORMAT=gnu
22242 export TEST_TAR_FORMAT
22243 TAR_OPTIONS="-H gnu"
22244 export TAR_OPTIONS
22245 rm -rf *
22246
22247 mkdir directory
22248 (cd directory && touch a b c d e f g h i j k l m n o p q r)
22249 tar -c -b 1 -f - directory | tar -t -f - >/dev/null
22250 tar -c -b 1 -f archive directory
22251 tar -t -f archive >/dev/null
22252 tar -t -f - < archive >/dev/null
22253
22254 rm -r directory
22255 ) ) >"$at_stdout" 2>"$at_stderr"
22256     at_status=$?
22257 fi
22258
22259 at_failed=false
22260 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22261 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
22262 case $at_status in
22263    77) echo 77 > "$at_status_file"; exit 77;;
22264    0) ;;
22265    *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0"
22266       at_failed=:;;
22267 esac
22268 if $at_failed; then
22269
22270
22271   echo 1 > "$at_status_file"
22272   exit 1
22273 fi
22274
22275 $at_traceon
22276
22277
22278
22279       $at_traceoff
22280       $at_times_p && times >"$at_times_file"
22281     ) 5>&1 2>&1 | eval $at_tee_pipe
22282     at_status=`cat "$at_status_file"`
22283     ;;
22284
22285   54 ) # 54. sparse01.at:21: sparse files
22286     at_setup_line='sparse01.at:21'
22287     at_desc="sparse files"
22288     $at_quiet $ECHO_N " 54: sparse files                                   $ECHO_C"
22289     at_xfail=no
22290       test -f $XFAILFILE && at_xfail=yes
22291     echo "#                             -*- compilation -*-" >> "$at_group_log"
22292     (
22293       echo "54. sparse01.at:21: testing ..."
22294       $at_traceon
22295
22296
22297
22298
22299
22300   $at_traceoff
22301 echo "$at_srcdir/sparse01.at:24:
22302 mkdir posix
22303 (cd posix
22304 TEST_TAR_FORMAT=posix
22305 export TEST_TAR_FORMAT
22306 TAR_OPTIONS=\"-H posix\"
22307 export TAR_OPTIONS
22308 rm -rf *
22309
22310 genfile --length 1000 -f begin
22311 genfile --length 1000 -f end
22312 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22313 tar -c -f archive --sparse begin sparsefile end || exit 1
22314 echo separator
22315
22316 tar tfv archive
22317 echo separator
22318 mkdir directory
22319 tar Cxf directory archive
22320 genfile --stat=name,size sparsefile
22321 cmp sparsefile directory/sparsefile
22322 )"
22323 echo sparse01.at:24 >"$at_check_line_file"
22324
22325 at_trace_this=
22326 if test -n "$at_traceon"; then
22327     echo 'Not enabling shell tracing (command contains an embedded newline)'
22328 fi
22329
22330 if test -n "$at_trace_this"; then
22331     ( $at_traceon;
22332 mkdir posix
22333 (cd posix
22334 TEST_TAR_FORMAT=posix
22335 export TEST_TAR_FORMAT
22336 TAR_OPTIONS="-H posix"
22337 export TAR_OPTIONS
22338 rm -rf *
22339
22340 genfile --length 1000 -f begin
22341 genfile --length 1000 -f end
22342 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22343 tar -c -f archive --sparse begin sparsefile end || exit 1
22344 echo separator
22345
22346 tar tfv archive
22347 echo separator
22348 mkdir directory
22349 tar Cxf directory archive
22350 genfile --stat=name,size sparsefile
22351 cmp sparsefile directory/sparsefile
22352 ) ) >"$at_stdout" 2>"$at_stder1"
22353     at_status=$?
22354     grep '^ *+' "$at_stder1" >&2
22355     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22356 else
22357     ( :;
22358 mkdir posix
22359 (cd posix
22360 TEST_TAR_FORMAT=posix
22361 export TEST_TAR_FORMAT
22362 TAR_OPTIONS="-H posix"
22363 export TAR_OPTIONS
22364 rm -rf *
22365
22366 genfile --length 1000 -f begin
22367 genfile --length 1000 -f end
22368 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22369 tar -c -f archive --sparse begin sparsefile end || exit 1
22370 echo separator
22371
22372 tar tfv archive
22373 echo separator
22374 mkdir directory
22375 tar Cxf directory archive
22376 genfile --stat=name,size sparsefile
22377 cmp sparsefile directory/sparsefile
22378 ) ) >"$at_stdout" 2>"$at_stderr"
22379     at_status=$?
22380 fi
22381
22382 at_failed=false
22383 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22384 echo stdout:; tee stdout <"$at_stdout"
22385 case $at_status in
22386    77) echo 77 > "$at_status_file"; exit 77;;
22387    0) ;;
22388    *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0"
22389       at_failed=:;;
22390 esac
22391 if $at_failed; then
22392
22393
22394   echo 1 > "$at_status_file"
22395   exit 1
22396 fi
22397
22398 $at_traceon
22399 $at_traceoff
22400 echo "$at_srcdir/sparse01.at:24:
22401 mkdir gnu
22402 (cd gnu
22403 TEST_TAR_FORMAT=gnu
22404 export TEST_TAR_FORMAT
22405 TAR_OPTIONS=\"-H gnu\"
22406 export TAR_OPTIONS
22407 rm -rf *
22408
22409 genfile --length 1000 -f begin
22410 genfile --length 1000 -f end
22411 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22412 tar -c -f archive --sparse begin sparsefile end || exit 1
22413 echo separator
22414
22415 tar tfv archive
22416 echo separator
22417 mkdir directory
22418 tar Cxf directory archive
22419 genfile --stat=name,size sparsefile
22420 cmp sparsefile directory/sparsefile
22421 )"
22422 echo sparse01.at:24 >"$at_check_line_file"
22423
22424 at_trace_this=
22425 if test -n "$at_traceon"; then
22426     echo 'Not enabling shell tracing (command contains an embedded newline)'
22427 fi
22428
22429 if test -n "$at_trace_this"; then
22430     ( $at_traceon;
22431 mkdir gnu
22432 (cd gnu
22433 TEST_TAR_FORMAT=gnu
22434 export TEST_TAR_FORMAT
22435 TAR_OPTIONS="-H gnu"
22436 export TAR_OPTIONS
22437 rm -rf *
22438
22439 genfile --length 1000 -f begin
22440 genfile --length 1000 -f end
22441 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22442 tar -c -f archive --sparse begin sparsefile end || exit 1
22443 echo separator
22444
22445 tar tfv archive
22446 echo separator
22447 mkdir directory
22448 tar Cxf directory archive
22449 genfile --stat=name,size sparsefile
22450 cmp sparsefile directory/sparsefile
22451 ) ) >"$at_stdout" 2>"$at_stder1"
22452     at_status=$?
22453     grep '^ *+' "$at_stder1" >&2
22454     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22455 else
22456     ( :;
22457 mkdir gnu
22458 (cd gnu
22459 TEST_TAR_FORMAT=gnu
22460 export TEST_TAR_FORMAT
22461 TAR_OPTIONS="-H gnu"
22462 export TAR_OPTIONS
22463 rm -rf *
22464
22465 genfile --length 1000 -f begin
22466 genfile --length 1000 -f end
22467 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22468 tar -c -f archive --sparse begin sparsefile end || exit 1
22469 echo separator
22470
22471 tar tfv archive
22472 echo separator
22473 mkdir directory
22474 tar Cxf directory archive
22475 genfile --stat=name,size sparsefile
22476 cmp sparsefile directory/sparsefile
22477 ) ) >"$at_stdout" 2>"$at_stderr"
22478     at_status=$?
22479 fi
22480
22481 at_failed=false
22482 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22483 echo stdout:; tee stdout <"$at_stdout"
22484 case $at_status in
22485    77) echo 77 > "$at_status_file"; exit 77;;
22486    0) ;;
22487    *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0"
22488       at_failed=:;;
22489 esac
22490 if $at_failed; then
22491
22492
22493   echo 1 > "$at_status_file"
22494   exit 1
22495 fi
22496
22497 $at_traceon
22498 $at_traceoff
22499 echo "$at_srcdir/sparse01.at:24:
22500 mkdir oldgnu
22501 (cd oldgnu
22502 TEST_TAR_FORMAT=oldgnu
22503 export TEST_TAR_FORMAT
22504 TAR_OPTIONS=\"-H oldgnu\"
22505 export TAR_OPTIONS
22506 rm -rf *
22507
22508 genfile --length 1000 -f begin
22509 genfile --length 1000 -f end
22510 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22511 tar -c -f archive --sparse begin sparsefile end || exit 1
22512 echo separator
22513
22514 tar tfv archive
22515 echo separator
22516 mkdir directory
22517 tar Cxf directory archive
22518 genfile --stat=name,size sparsefile
22519 cmp sparsefile directory/sparsefile
22520 )"
22521 echo sparse01.at:24 >"$at_check_line_file"
22522
22523 at_trace_this=
22524 if test -n "$at_traceon"; then
22525     echo 'Not enabling shell tracing (command contains an embedded newline)'
22526 fi
22527
22528 if test -n "$at_trace_this"; then
22529     ( $at_traceon;
22530 mkdir oldgnu
22531 (cd oldgnu
22532 TEST_TAR_FORMAT=oldgnu
22533 export TEST_TAR_FORMAT
22534 TAR_OPTIONS="-H oldgnu"
22535 export TAR_OPTIONS
22536 rm -rf *
22537
22538 genfile --length 1000 -f begin
22539 genfile --length 1000 -f end
22540 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22541 tar -c -f archive --sparse begin sparsefile end || exit 1
22542 echo separator
22543
22544 tar tfv archive
22545 echo separator
22546 mkdir directory
22547 tar Cxf directory archive
22548 genfile --stat=name,size sparsefile
22549 cmp sparsefile directory/sparsefile
22550 ) ) >"$at_stdout" 2>"$at_stder1"
22551     at_status=$?
22552     grep '^ *+' "$at_stder1" >&2
22553     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22554 else
22555     ( :;
22556 mkdir oldgnu
22557 (cd oldgnu
22558 TEST_TAR_FORMAT=oldgnu
22559 export TEST_TAR_FORMAT
22560 TAR_OPTIONS="-H oldgnu"
22561 export TAR_OPTIONS
22562 rm -rf *
22563
22564 genfile --length 1000 -f begin
22565 genfile --length 1000 -f end
22566 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22567 tar -c -f archive --sparse begin sparsefile end || exit 1
22568 echo separator
22569
22570 tar tfv archive
22571 echo separator
22572 mkdir directory
22573 tar Cxf directory archive
22574 genfile --stat=name,size sparsefile
22575 cmp sparsefile directory/sparsefile
22576 ) ) >"$at_stdout" 2>"$at_stderr"
22577     at_status=$?
22578 fi
22579
22580 at_failed=false
22581 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22582 echo stdout:; tee stdout <"$at_stdout"
22583 case $at_status in
22584    77) echo 77 > "$at_status_file"; exit 77;;
22585    0) ;;
22586    *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0"
22587       at_failed=:;;
22588 esac
22589 if $at_failed; then
22590
22591
22592   echo 1 > "$at_status_file"
22593   exit 1
22594 fi
22595
22596 $at_traceon
22597
22598
22599
22600
22601 cat >stdout.re <<'_ATEOF'
22602 separator
22603 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
22604 -rw-r--r-- ^ ^ *  *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
22605 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
22606 separator
22607 sparsefile 10344448
22608 _ATEOF
22609
22610 awk '{print NR " " $0}' stdout > $$.1
22611 awk '{print NR " " $0}' stdout.re | join - $$.1 |
22612 while read NUM RE LINE
22613 do
22614   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
22615 done
22616
22617
22618       $at_traceoff
22619       $at_times_p && times >"$at_times_file"
22620     ) 5>&1 2>&1 | eval $at_tee_pipe
22621     at_status=`cat "$at_status_file"`
22622     ;;
22623
22624   55 ) # 55. sparse02.at:21: extracting sparse file over a pipe
22625     at_setup_line='sparse02.at:21'
22626     at_desc="extracting sparse file over a pipe"
22627     $at_quiet $ECHO_N " 55: extracting sparse file over a pipe             $ECHO_C"
22628     at_xfail=no
22629       test -f $XFAILFILE && at_xfail=yes
22630     echo "#                             -*- compilation -*-" >> "$at_group_log"
22631     (
22632       echo "55. sparse02.at:21: testing ..."
22633       $at_traceon
22634
22635
22636
22637 # Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe.
22638 # References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us>
22639 # http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html
22640
22641
22642
22643   $at_traceoff
22644 echo "$at_srcdir/sparse02.at:28:
22645 mkdir posix
22646 (cd posix
22647 TEST_TAR_FORMAT=posix
22648 export TEST_TAR_FORMAT
22649 TAR_OPTIONS=\"-H posix\"
22650 export TAR_OPTIONS
22651 rm -rf *
22652
22653 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22654 tar -c -f archive --sparse sparsefile || exit 1
22655 echo separator
22656
22657 tar xfO archive | cat - > sparsecopy || exit 1
22658 cmp sparsefile sparsecopy
22659 )"
22660 echo sparse02.at:28 >"$at_check_line_file"
22661
22662 at_trace_this=
22663 if test -n "$at_traceon"; then
22664     echo 'Not enabling shell tracing (command contains an embedded newline)'
22665 fi
22666
22667 if test -n "$at_trace_this"; then
22668     ( $at_traceon;
22669 mkdir posix
22670 (cd posix
22671 TEST_TAR_FORMAT=posix
22672 export TEST_TAR_FORMAT
22673 TAR_OPTIONS="-H posix"
22674 export TAR_OPTIONS
22675 rm -rf *
22676
22677 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22678 tar -c -f archive --sparse sparsefile || exit 1
22679 echo separator
22680
22681 tar xfO archive | cat - > sparsecopy || exit 1
22682 cmp sparsefile sparsecopy
22683 ) ) >"$at_stdout" 2>"$at_stder1"
22684     at_status=$?
22685     grep '^ *+' "$at_stder1" >&2
22686     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22687 else
22688     ( :;
22689 mkdir posix
22690 (cd posix
22691 TEST_TAR_FORMAT=posix
22692 export TEST_TAR_FORMAT
22693 TAR_OPTIONS="-H posix"
22694 export TAR_OPTIONS
22695 rm -rf *
22696
22697 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22698 tar -c -f archive --sparse sparsefile || exit 1
22699 echo separator
22700
22701 tar xfO archive | cat - > sparsecopy || exit 1
22702 cmp sparsefile sparsecopy
22703 ) ) >"$at_stdout" 2>"$at_stderr"
22704     at_status=$?
22705 fi
22706
22707 at_failed=false
22708 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22709 echo >>"$at_stdout"; echo "separator
22710 " | $at_diff - "$at_stdout" || at_failed=:
22711 case $at_status in
22712    77) echo 77 > "$at_status_file"; exit 77;;
22713    0) ;;
22714    *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0"
22715       at_failed=:;;
22716 esac
22717 if $at_failed; then
22718
22719
22720   echo 1 > "$at_status_file"
22721   exit 1
22722 fi
22723
22724 $at_traceon
22725 $at_traceoff
22726 echo "$at_srcdir/sparse02.at:28:
22727 mkdir gnu
22728 (cd gnu
22729 TEST_TAR_FORMAT=gnu
22730 export TEST_TAR_FORMAT
22731 TAR_OPTIONS=\"-H gnu\"
22732 export TAR_OPTIONS
22733 rm -rf *
22734
22735 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22736 tar -c -f archive --sparse sparsefile || exit 1
22737 echo separator
22738
22739 tar xfO archive | cat - > sparsecopy || exit 1
22740 cmp sparsefile sparsecopy
22741 )"
22742 echo sparse02.at:28 >"$at_check_line_file"
22743
22744 at_trace_this=
22745 if test -n "$at_traceon"; then
22746     echo 'Not enabling shell tracing (command contains an embedded newline)'
22747 fi
22748
22749 if test -n "$at_trace_this"; then
22750     ( $at_traceon;
22751 mkdir gnu
22752 (cd gnu
22753 TEST_TAR_FORMAT=gnu
22754 export TEST_TAR_FORMAT
22755 TAR_OPTIONS="-H gnu"
22756 export TAR_OPTIONS
22757 rm -rf *
22758
22759 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22760 tar -c -f archive --sparse sparsefile || exit 1
22761 echo separator
22762
22763 tar xfO archive | cat - > sparsecopy || exit 1
22764 cmp sparsefile sparsecopy
22765 ) ) >"$at_stdout" 2>"$at_stder1"
22766     at_status=$?
22767     grep '^ *+' "$at_stder1" >&2
22768     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22769 else
22770     ( :;
22771 mkdir gnu
22772 (cd gnu
22773 TEST_TAR_FORMAT=gnu
22774 export TEST_TAR_FORMAT
22775 TAR_OPTIONS="-H gnu"
22776 export TAR_OPTIONS
22777 rm -rf *
22778
22779 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22780 tar -c -f archive --sparse sparsefile || exit 1
22781 echo separator
22782
22783 tar xfO archive | cat - > sparsecopy || exit 1
22784 cmp sparsefile sparsecopy
22785 ) ) >"$at_stdout" 2>"$at_stderr"
22786     at_status=$?
22787 fi
22788
22789 at_failed=false
22790 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22791 echo >>"$at_stdout"; echo "separator
22792 " | $at_diff - "$at_stdout" || at_failed=:
22793 case $at_status in
22794    77) echo 77 > "$at_status_file"; exit 77;;
22795    0) ;;
22796    *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0"
22797       at_failed=:;;
22798 esac
22799 if $at_failed; then
22800
22801
22802   echo 1 > "$at_status_file"
22803   exit 1
22804 fi
22805
22806 $at_traceon
22807 $at_traceoff
22808 echo "$at_srcdir/sparse02.at:28:
22809 mkdir oldgnu
22810 (cd oldgnu
22811 TEST_TAR_FORMAT=oldgnu
22812 export TEST_TAR_FORMAT
22813 TAR_OPTIONS=\"-H oldgnu\"
22814 export TAR_OPTIONS
22815 rm -rf *
22816
22817 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22818 tar -c -f archive --sparse sparsefile || exit 1
22819 echo separator
22820
22821 tar xfO archive | cat - > sparsecopy || exit 1
22822 cmp sparsefile sparsecopy
22823 )"
22824 echo sparse02.at:28 >"$at_check_line_file"
22825
22826 at_trace_this=
22827 if test -n "$at_traceon"; then
22828     echo 'Not enabling shell tracing (command contains an embedded newline)'
22829 fi
22830
22831 if test -n "$at_trace_this"; then
22832     ( $at_traceon;
22833 mkdir oldgnu
22834 (cd oldgnu
22835 TEST_TAR_FORMAT=oldgnu
22836 export TEST_TAR_FORMAT
22837 TAR_OPTIONS="-H oldgnu"
22838 export TAR_OPTIONS
22839 rm -rf *
22840
22841 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22842 tar -c -f archive --sparse sparsefile || exit 1
22843 echo separator
22844
22845 tar xfO archive | cat - > sparsecopy || exit 1
22846 cmp sparsefile sparsecopy
22847 ) ) >"$at_stdout" 2>"$at_stder1"
22848     at_status=$?
22849     grep '^ *+' "$at_stder1" >&2
22850     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22851 else
22852     ( :;
22853 mkdir oldgnu
22854 (cd oldgnu
22855 TEST_TAR_FORMAT=oldgnu
22856 export TEST_TAR_FORMAT
22857 TAR_OPTIONS="-H oldgnu"
22858 export TAR_OPTIONS
22859 rm -rf *
22860
22861 genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77
22862 tar -c -f archive --sparse sparsefile || exit 1
22863 echo separator
22864
22865 tar xfO archive | cat - > sparsecopy || exit 1
22866 cmp sparsefile sparsecopy
22867 ) ) >"$at_stdout" 2>"$at_stderr"
22868     at_status=$?
22869 fi
22870
22871 at_failed=false
22872 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
22873 echo >>"$at_stdout"; echo "separator
22874 " | $at_diff - "$at_stdout" || at_failed=:
22875 case $at_status in
22876    77) echo 77 > "$at_status_file"; exit 77;;
22877    0) ;;
22878    *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0"
22879       at_failed=:;;
22880 esac
22881 if $at_failed; then
22882
22883
22884   echo 1 > "$at_status_file"
22885   exit 1
22886 fi
22887
22888 $at_traceon
22889
22890
22891
22892       $at_traceoff
22893       $at_times_p && times >"$at_times_file"
22894     ) 5>&1 2>&1 | eval $at_tee_pipe
22895     at_status=`cat "$at_status_file"`
22896     ;;
22897
22898   56 ) # 56. sparse03.at:21: storing sparse files > 8G
22899     at_setup_line='sparse03.at:21'
22900     at_desc="storing sparse files > 8G"
22901     $at_quiet $ECHO_N " 56: storing sparse files > 8G                      $ECHO_C"
22902     at_xfail=no
22903       test -f $XFAILFILE && at_xfail=yes
22904     echo "#                             -*- compilation -*-" >> "$at_group_log"
22905     (
22906       echo "56. sparse03.at:21: testing ..."
22907       $at_traceon
22908
22909
22910
22911 # Tar 1.15.1 incorrectly computed sparse member size if the extended
22912 # PAX header contained size keyword.
22913 # References: <87vf46nb36.fsf@penguin.cs.ucla.edu>
22914 # http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
22915
22916
22917
22918   $at_traceoff
22919 echo "$at_srcdir/sparse03.at:29:
22920 mkdir posix
22921 (cd posix
22922 TEST_TAR_FORMAT=posix
22923 export TEST_TAR_FORMAT
22924 TAR_OPTIONS=\"-H posix\"
22925 export TAR_OPTIONS
22926 rm -rf *
22927
22928 genfile --length 1000 --file begin
22929 genfile --length 1000 --file end
22930 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
22931 tar -c -f archive --sparse begin sparsefile end || exit 1
22932 echo separator
22933
22934 tar tfv archive
22935 echo separator
22936 mkdir directory
22937 tar Cxf directory archive
22938 genfile --stat=name,size sparsefile
22939 cmp sparsefile directory/sparsefile
22940 )"
22941 echo sparse03.at:29 >"$at_check_line_file"
22942
22943 at_trace_this=
22944 if test -n "$at_traceon"; then
22945     echo 'Not enabling shell tracing (command contains an embedded newline)'
22946 fi
22947
22948 if test -n "$at_trace_this"; then
22949     ( $at_traceon;
22950 mkdir posix
22951 (cd posix
22952 TEST_TAR_FORMAT=posix
22953 export TEST_TAR_FORMAT
22954 TAR_OPTIONS="-H posix"
22955 export TAR_OPTIONS
22956 rm -rf *
22957
22958 genfile --length 1000 --file begin
22959 genfile --length 1000 --file end
22960 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
22961 tar -c -f archive --sparse begin sparsefile end || exit 1
22962 echo separator
22963
22964 tar tfv archive
22965 echo separator
22966 mkdir directory
22967 tar Cxf directory archive
22968 genfile --stat=name,size sparsefile
22969 cmp sparsefile directory/sparsefile
22970 ) ) >"$at_stdout" 2>"$at_stder1"
22971     at_status=$?
22972     grep '^ *+' "$at_stder1" >&2
22973     grep -v '^ *+' "$at_stder1" >"$at_stderr"
22974 else
22975     ( :;
22976 mkdir posix
22977 (cd posix
22978 TEST_TAR_FORMAT=posix
22979 export TEST_TAR_FORMAT
22980 TAR_OPTIONS="-H posix"
22981 export TAR_OPTIONS
22982 rm -rf *
22983
22984 genfile --length 1000 --file begin
22985 genfile --length 1000 --file end
22986 genfile --sparse --file sparsefile --block-size 512 8G A || exit 77
22987 tar -c -f archive --sparse begin sparsefile end || exit 1
22988 echo separator
22989
22990 tar tfv archive
22991 echo separator
22992 mkdir directory
22993 tar Cxf directory archive
22994 genfile --stat=name,size sparsefile
22995 cmp sparsefile directory/sparsefile
22996 ) ) >"$at_stdout" 2>"$at_stderr"
22997     at_status=$?
22998 fi
22999
23000 at_failed=false
23001 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23002 echo stdout:; tee stdout <"$at_stdout"
23003 case $at_status in
23004    77) echo 77 > "$at_status_file"; exit 77;;
23005    0) ;;
23006    *) echo "$at_srcdir/sparse03.at:29: exit code was $at_status, expected 0"
23007       at_failed=:;;
23008 esac
23009 if $at_failed; then
23010
23011
23012   echo 1 > "$at_status_file"
23013   exit 1
23014 fi
23015
23016 $at_traceon
23017
23018
23019
23020
23021 cat >stdout.re <<'_ATEOF'
23022 separator
23023 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin
23024 -rw-r--r-- ^ ^ *  *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile
23025 -rw-r--r-- ^ ^ *  *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end
23026 separator
23027 sparsefile 8589935104
23028 _ATEOF
23029
23030 awk '{print NR " " $0}' stdout > $$.1
23031 awk '{print NR " " $0}' stdout.re | join - $$.1 |
23032 while read NUM RE LINE
23033 do
23034   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
23035 done
23036
23037
23038       $at_traceoff
23039       $at_times_p && times >"$at_times_file"
23040     ) 5>&1 2>&1 | eval $at_tee_pipe
23041     at_status=`cat "$at_status_file"`
23042     ;;
23043
23044   57 ) # 57. sparsemv.at:21: sparse files in MV archives
23045     at_setup_line='sparsemv.at:21'
23046     at_desc="sparse files in MV archives"
23047     $at_quiet $ECHO_N " 57: sparse files in MV archives                    $ECHO_C"
23048     at_xfail=no
23049       test -f $XFAILFILE && at_xfail=yes
23050     echo "#                             -*- compilation -*-" >> "$at_group_log"
23051     (
23052       echo "57. sparsemv.at:21: testing ..."
23053       $at_traceon
23054
23055
23056
23057 # Check if sparse files are correctly split between GNU multi-volume
23058 # archives.
23059 # There are two cases: the file can be split within an empty (null) block,
23060 # or within a data block. Since null blocks are not archived, the first
23061 # case means the file is split between two consecutive data blocks.
23062 #
23063
23064
23065
23066   $at_traceoff
23067 echo "$at_srcdir/sparsemv.at:31:
23068 mkdir gnu
23069 (cd gnu
23070 TEST_TAR_FORMAT=gnu
23071 export TEST_TAR_FORMAT
23072 TAR_OPTIONS=\"-H gnu\"
23073 export TAR_OPTIONS
23074 rm -rf *
23075
23076 exec <&-
23077 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
23078 echo \"Pass 1: Split between data blocks\"
23079 echo \"Create archive\"
23080 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23081 echo \"Test archive\"
23082 tar -t -M -f arc.1 -f arc.2
23083 echo \"Compare archive\"
23084 tar -d -M -f arc.1 -f arc.2
23085
23086 echo \"Pass 2: Split within a data block\"
23087 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
23088 echo \"Create archive\"
23089 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23090 echo \"Test archive\"
23091 tar -t -M -f arc.1 -f arc.2
23092 echo \"Compare archive\"
23093 tar -d -M -f arc.1 -f arc.2
23094 )"
23095 echo sparsemv.at:31 >"$at_check_line_file"
23096
23097 at_trace_this=
23098 if test -n "$at_traceon"; then
23099     echo 'Not enabling shell tracing (command contains an embedded newline)'
23100 fi
23101
23102 if test -n "$at_trace_this"; then
23103     ( $at_traceon;
23104 mkdir gnu
23105 (cd gnu
23106 TEST_TAR_FORMAT=gnu
23107 export TEST_TAR_FORMAT
23108 TAR_OPTIONS="-H gnu"
23109 export TAR_OPTIONS
23110 rm -rf *
23111
23112 exec <&-
23113 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
23114 echo "Pass 1: Split between data blocks"
23115 echo "Create archive"
23116 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23117 echo "Test archive"
23118 tar -t -M -f arc.1 -f arc.2
23119 echo "Compare archive"
23120 tar -d -M -f arc.1 -f arc.2
23121
23122 echo "Pass 2: Split within a data block"
23123 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
23124 echo "Create archive"
23125 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23126 echo "Test archive"
23127 tar -t -M -f arc.1 -f arc.2
23128 echo "Compare archive"
23129 tar -d -M -f arc.1 -f arc.2
23130 ) ) >"$at_stdout" 2>"$at_stder1"
23131     at_status=$?
23132     grep '^ *+' "$at_stder1" >&2
23133     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23134 else
23135     ( :;
23136 mkdir gnu
23137 (cd gnu
23138 TEST_TAR_FORMAT=gnu
23139 export TEST_TAR_FORMAT
23140 TAR_OPTIONS="-H gnu"
23141 export TAR_OPTIONS
23142 rm -rf *
23143
23144 exec <&-
23145 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
23146 echo "Pass 1: Split between data blocks"
23147 echo "Create archive"
23148 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23149 echo "Test archive"
23150 tar -t -M -f arc.1 -f arc.2
23151 echo "Compare archive"
23152 tar -d -M -f arc.1 -f arc.2
23153
23154 echo "Pass 2: Split within a data block"
23155 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
23156 echo "Create archive"
23157 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23158 echo "Test archive"
23159 tar -t -M -f arc.1 -f arc.2
23160 echo "Compare archive"
23161 tar -d -M -f arc.1 -f arc.2
23162 ) ) >"$at_stdout" 2>"$at_stderr"
23163     at_status=$?
23164 fi
23165
23166 at_failed=false
23167 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23168 echo >>"$at_stdout"; echo "Pass 1: Split between data blocks
23169 Create archive
23170 Test archive
23171 sparsefile
23172 Compare archive
23173 Pass 2: Split within a data block
23174 Create archive
23175 Test archive
23176 sparsefile
23177 Compare archive
23178 " | $at_diff - "$at_stdout" || at_failed=:
23179 case $at_status in
23180    77) echo 77 > "$at_status_file"; exit 77;;
23181    0) ;;
23182    *) echo "$at_srcdir/sparsemv.at:31: exit code was $at_status, expected 0"
23183       at_failed=:;;
23184 esac
23185 if $at_failed; then
23186
23187
23188   echo 1 > "$at_status_file"
23189   exit 1
23190 fi
23191
23192 $at_traceon
23193 $at_traceoff
23194 echo "$at_srcdir/sparsemv.at:31:
23195 mkdir oldgnu
23196 (cd oldgnu
23197 TEST_TAR_FORMAT=oldgnu
23198 export TEST_TAR_FORMAT
23199 TAR_OPTIONS=\"-H oldgnu\"
23200 export TAR_OPTIONS
23201 rm -rf *
23202
23203 exec <&-
23204 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
23205 echo \"Pass 1: Split between data blocks\"
23206 echo \"Create archive\"
23207 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23208 echo \"Test archive\"
23209 tar -t -M -f arc.1 -f arc.2
23210 echo \"Compare archive\"
23211 tar -d -M -f arc.1 -f arc.2
23212
23213 echo \"Pass 2: Split within a data block\"
23214 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
23215 echo \"Create archive\"
23216 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23217 echo \"Test archive\"
23218 tar -t -M -f arc.1 -f arc.2
23219 echo \"Compare archive\"
23220 tar -d -M -f arc.1 -f arc.2
23221 )"
23222 echo sparsemv.at:31 >"$at_check_line_file"
23223
23224 at_trace_this=
23225 if test -n "$at_traceon"; then
23226     echo 'Not enabling shell tracing (command contains an embedded newline)'
23227 fi
23228
23229 if test -n "$at_trace_this"; then
23230     ( $at_traceon;
23231 mkdir oldgnu
23232 (cd oldgnu
23233 TEST_TAR_FORMAT=oldgnu
23234 export TEST_TAR_FORMAT
23235 TAR_OPTIONS="-H oldgnu"
23236 export TAR_OPTIONS
23237 rm -rf *
23238
23239 exec <&-
23240 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
23241 echo "Pass 1: Split between data blocks"
23242 echo "Create archive"
23243 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23244 echo "Test archive"
23245 tar -t -M -f arc.1 -f arc.2
23246 echo "Compare archive"
23247 tar -d -M -f arc.1 -f arc.2
23248
23249 echo "Pass 2: Split within a data block"
23250 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
23251 echo "Create archive"
23252 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23253 echo "Test archive"
23254 tar -t -M -f arc.1 -f arc.2
23255 echo "Compare archive"
23256 tar -d -M -f arc.1 -f arc.2
23257 ) ) >"$at_stdout" 2>"$at_stder1"
23258     at_status=$?
23259     grep '^ *+' "$at_stder1" >&2
23260     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23261 else
23262     ( :;
23263 mkdir oldgnu
23264 (cd oldgnu
23265 TEST_TAR_FORMAT=oldgnu
23266 export TEST_TAR_FORMAT
23267 TAR_OPTIONS="-H oldgnu"
23268 export TAR_OPTIONS
23269 rm -rf *
23270
23271 exec <&-
23272 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
23273 echo "Pass 1: Split between data blocks"
23274 echo "Create archive"
23275 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23276 echo "Test archive"
23277 tar -t -M -f arc.1 -f arc.2
23278 echo "Compare archive"
23279 tar -d -M -f arc.1 -f arc.2
23280
23281 echo "Pass 2: Split within a data block"
23282 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
23283 echo "Create archive"
23284 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
23285 echo "Test archive"
23286 tar -t -M -f arc.1 -f arc.2
23287 echo "Compare archive"
23288 tar -d -M -f arc.1 -f arc.2
23289 ) ) >"$at_stdout" 2>"$at_stderr"
23290     at_status=$?
23291 fi
23292
23293 at_failed=false
23294 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23295 echo >>"$at_stdout"; echo "Pass 1: Split between data blocks
23296 Create archive
23297 Test archive
23298 sparsefile
23299 Compare archive
23300 Pass 2: Split within a data block
23301 Create archive
23302 Test archive
23303 sparsefile
23304 Compare archive
23305 " | $at_diff - "$at_stdout" || at_failed=:
23306 case $at_status in
23307    77) echo 77 > "$at_status_file"; exit 77;;
23308    0) ;;
23309    *) echo "$at_srcdir/sparsemv.at:31: exit code was $at_status, expected 0"
23310       at_failed=:;;
23311 esac
23312 if $at_failed; then
23313
23314
23315   echo 1 > "$at_status_file"
23316   exit 1
23317 fi
23318
23319 $at_traceon
23320
23321
23322
23323       $at_traceoff
23324       $at_times_p && times >"$at_times_file"
23325     ) 5>&1 2>&1 | eval $at_tee_pipe
23326     at_status=`cat "$at_status_file"`
23327     ;;
23328
23329   58 ) # 58. spmvp00.at:21: sparse files in PAX MV archives, v.0.0
23330     at_setup_line='spmvp00.at:21'
23331     at_desc="sparse files in PAX MV archives, v.0.0"
23332     $at_quiet $ECHO_N " 58: sparse files in PAX MV archives, v.0.0         $ECHO_C"
23333     at_xfail=no
23334       test -f $XFAILFILE && at_xfail=yes
23335     echo "#                             -*- compilation -*-" >> "$at_group_log"
23336     (
23337       echo "58. spmvp00.at:21: testing ..."
23338       $at_traceon
23339
23340
23341
23342
23343
23344
23345   $at_traceoff
23346 echo "$at_srcdir/spmvp00.at:24:
23347 mkdir pax
23348 (cd pax
23349 TEST_TAR_FORMAT=pax
23350 export TEST_TAR_FORMAT
23351 TAR_OPTIONS=\"-H pax\"
23352 export TAR_OPTIONS
23353 rm -rf *
23354
23355 exec <&-
23356 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
23357 echo \"Pass 1: Split between data blocks\"
23358 echo \"Create archive\"
23359 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23360 echo \"Test archive\"
23361 tar -t -M -f arc.1 -f arc.2 -f arc.3
23362 echo \"Compare archive\"
23363 tar -d -M -f arc.1 -f arc.2 -f arc.3
23364
23365 echo \"Pass 2: Split within a data block\"
23366 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
23367 echo \"Create archive\"
23368 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23369 echo \"Test archive\"
23370 tar -t -M -f arc.1 -f arc.2 -f arc.3
23371 echo \"Compare archive\"
23372 tar -d -M -f arc.1 -f arc.2 -f arc.3
23373 )"
23374 echo spmvp00.at:24 >"$at_check_line_file"
23375
23376 at_trace_this=
23377 if test -n "$at_traceon"; then
23378     echo 'Not enabling shell tracing (command contains an embedded newline)'
23379 fi
23380
23381 if test -n "$at_trace_this"; then
23382     ( $at_traceon;
23383 mkdir pax
23384 (cd pax
23385 TEST_TAR_FORMAT=pax
23386 export TEST_TAR_FORMAT
23387 TAR_OPTIONS="-H pax"
23388 export TAR_OPTIONS
23389 rm -rf *
23390
23391 exec <&-
23392 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
23393 echo "Pass 1: Split between data blocks"
23394 echo "Create archive"
23395 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23396 echo "Test archive"
23397 tar -t -M -f arc.1 -f arc.2 -f arc.3
23398 echo "Compare archive"
23399 tar -d -M -f arc.1 -f arc.2 -f arc.3
23400
23401 echo "Pass 2: Split within a data block"
23402 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
23403 echo "Create archive"
23404 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23405 echo "Test archive"
23406 tar -t -M -f arc.1 -f arc.2 -f arc.3
23407 echo "Compare archive"
23408 tar -d -M -f arc.1 -f arc.2 -f arc.3
23409 ) ) >"$at_stdout" 2>"$at_stder1"
23410     at_status=$?
23411     grep '^ *+' "$at_stder1" >&2
23412     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23413 else
23414     ( :;
23415 mkdir pax
23416 (cd pax
23417 TEST_TAR_FORMAT=pax
23418 export TEST_TAR_FORMAT
23419 TAR_OPTIONS="-H pax"
23420 export TAR_OPTIONS
23421 rm -rf *
23422
23423 exec <&-
23424 genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77
23425 echo "Pass 1: Split between data blocks"
23426 echo "Create archive"
23427 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23428 echo "Test archive"
23429 tar -t -M -f arc.1 -f arc.2 -f arc.3
23430 echo "Compare archive"
23431 tar -d -M -f arc.1 -f arc.2 -f arc.3
23432
23433 echo "Pass 2: Split within a data block"
23434 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
23435 echo "Create archive"
23436 tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23437 echo "Test archive"
23438 tar -t -M -f arc.1 -f arc.2 -f arc.3
23439 echo "Compare archive"
23440 tar -d -M -f arc.1 -f arc.2 -f arc.3
23441 ) ) >"$at_stdout" 2>"$at_stderr"
23442     at_status=$?
23443 fi
23444
23445 at_failed=false
23446 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23447 echo >>"$at_stdout"; echo "Pass 1: Split between data blocks
23448 Create archive
23449 Test archive
23450 sparsefile
23451 Compare archive
23452 Pass 2: Split within a data block
23453 Create archive
23454 Test archive
23455 sparsefile
23456 Compare archive
23457 " | $at_diff - "$at_stdout" || at_failed=:
23458 case $at_status in
23459    77) echo 77 > "$at_status_file"; exit 77;;
23460    0) ;;
23461    *) echo "$at_srcdir/spmvp00.at:24: exit code was $at_status, expected 0"
23462       at_failed=:;;
23463 esac
23464 if $at_failed; then
23465
23466
23467   echo 1 > "$at_status_file"
23468   exit 1
23469 fi
23470
23471 $at_traceon
23472
23473
23474
23475       $at_traceoff
23476       $at_times_p && times >"$at_times_file"
23477     ) 5>&1 2>&1 | eval $at_tee_pipe
23478     at_status=`cat "$at_status_file"`
23479     ;;
23480
23481   59 ) # 59. spmvp01.at:21: sparse files in PAX MV archives, v.0.1
23482     at_setup_line='spmvp01.at:21'
23483     at_desc="sparse files in PAX MV archives, v.0.1"
23484     $at_quiet $ECHO_N " 59: sparse files in PAX MV archives, v.0.1         $ECHO_C"
23485     at_xfail=no
23486       test -f $XFAILFILE && at_xfail=yes
23487     echo "#                             -*- compilation -*-" >> "$at_group_log"
23488     (
23489       echo "59. spmvp01.at:21: testing ..."
23490       $at_traceon
23491
23492
23493
23494
23495
23496
23497   $at_traceoff
23498 echo "$at_srcdir/spmvp01.at:24:
23499 mkdir pax
23500 (cd pax
23501 TEST_TAR_FORMAT=pax
23502 export TEST_TAR_FORMAT
23503 TAR_OPTIONS=\"-H pax\"
23504 export TAR_OPTIONS
23505 rm -rf *
23506
23507 exec <&-
23508 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
23509 echo \"Pass 1: Split between data blocks\"
23510 echo \"Create archive\"
23511 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23512 echo \"Test archive\"
23513 tar -t -M -f arc.1 -f arc.2 -f arc.3
23514 echo \"Compare archive\"
23515 tar -d -M -f arc.1 -f arc.2 -f arc.3
23516
23517 echo \"Pass 2: Split within a data block\"
23518 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
23519 echo \"Create archive\"
23520 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23521 echo \"Test archive\"
23522 tar -t -M -f arc.1 -f arc.2 -f arc.3
23523 echo \"Compare archive\"
23524 tar -d -M -f arc.1 -f arc.2 -f arc.3
23525 )"
23526 echo spmvp01.at:24 >"$at_check_line_file"
23527
23528 at_trace_this=
23529 if test -n "$at_traceon"; then
23530     echo 'Not enabling shell tracing (command contains an embedded newline)'
23531 fi
23532
23533 if test -n "$at_trace_this"; then
23534     ( $at_traceon;
23535 mkdir pax
23536 (cd pax
23537 TEST_TAR_FORMAT=pax
23538 export TEST_TAR_FORMAT
23539 TAR_OPTIONS="-H pax"
23540 export TAR_OPTIONS
23541 rm -rf *
23542
23543 exec <&-
23544 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
23545 echo "Pass 1: Split between data blocks"
23546 echo "Create archive"
23547 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23548 echo "Test archive"
23549 tar -t -M -f arc.1 -f arc.2 -f arc.3
23550 echo "Compare archive"
23551 tar -d -M -f arc.1 -f arc.2 -f arc.3
23552
23553 echo "Pass 2: Split within a data block"
23554 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
23555 echo "Create archive"
23556 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23557 echo "Test archive"
23558 tar -t -M -f arc.1 -f arc.2 -f arc.3
23559 echo "Compare archive"
23560 tar -d -M -f arc.1 -f arc.2 -f arc.3
23561 ) ) >"$at_stdout" 2>"$at_stder1"
23562     at_status=$?
23563     grep '^ *+' "$at_stder1" >&2
23564     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23565 else
23566     ( :;
23567 mkdir pax
23568 (cd pax
23569 TEST_TAR_FORMAT=pax
23570 export TEST_TAR_FORMAT
23571 TAR_OPTIONS="-H pax"
23572 export TAR_OPTIONS
23573 rm -rf *
23574
23575 exec <&-
23576 genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77
23577 echo "Pass 1: Split between data blocks"
23578 echo "Create archive"
23579 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23580 echo "Test archive"
23581 tar -t -M -f arc.1 -f arc.2 -f arc.3
23582 echo "Compare archive"
23583 tar -d -M -f arc.1 -f arc.2 -f arc.3
23584
23585 echo "Pass 2: Split within a data block"
23586 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77
23587 echo "Create archive"
23588 tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23589 echo "Test archive"
23590 tar -t -M -f arc.1 -f arc.2 -f arc.3
23591 echo "Compare archive"
23592 tar -d -M -f arc.1 -f arc.2 -f arc.3
23593 ) ) >"$at_stdout" 2>"$at_stderr"
23594     at_status=$?
23595 fi
23596
23597 at_failed=false
23598 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23599 echo >>"$at_stdout"; echo "Pass 1: Split between data blocks
23600 Create archive
23601 Test archive
23602 sparsefile
23603 Compare archive
23604 Pass 2: Split within a data block
23605 Create archive
23606 Test archive
23607 sparsefile
23608 Compare archive
23609 " | $at_diff - "$at_stdout" || at_failed=:
23610 case $at_status in
23611    77) echo 77 > "$at_status_file"; exit 77;;
23612    0) ;;
23613    *) echo "$at_srcdir/spmvp01.at:24: exit code was $at_status, expected 0"
23614       at_failed=:;;
23615 esac
23616 if $at_failed; then
23617
23618
23619   echo 1 > "$at_status_file"
23620   exit 1
23621 fi
23622
23623 $at_traceon
23624
23625
23626
23627       $at_traceoff
23628       $at_times_p && times >"$at_times_file"
23629     ) 5>&1 2>&1 | eval $at_tee_pipe
23630     at_status=`cat "$at_status_file"`
23631     ;;
23632
23633   60 ) # 60. spmvp10.at:21: sparse files in PAX MV archives, v.1.0
23634     at_setup_line='spmvp10.at:21'
23635     at_desc="sparse files in PAX MV archives, v.1.0"
23636     $at_quiet $ECHO_N " 60: sparse files in PAX MV archives, v.1.0         $ECHO_C"
23637     at_xfail=no
23638       test -f $XFAILFILE && at_xfail=yes
23639     echo "#                             -*- compilation -*-" >> "$at_group_log"
23640     (
23641       echo "60. spmvp10.at:21: testing ..."
23642       $at_traceon
23643
23644
23645
23646
23647
23648
23649   $at_traceoff
23650 echo "$at_srcdir/spmvp10.at:24:
23651 mkdir pax
23652 (cd pax
23653 TEST_TAR_FORMAT=pax
23654 export TEST_TAR_FORMAT
23655 TAR_OPTIONS=\"-H pax\"
23656 export TAR_OPTIONS
23657 rm -rf *
23658
23659 exec <&-
23660 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
23661 echo \"Pass 1: Split between data blocks\"
23662 echo \"Create archive\"
23663 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23664 echo \"Test archive\"
23665 tar -t -M -f arc.1 -f arc.2 -f arc.3
23666 echo \"Compare archive\"
23667 tar -d -M -f arc.1 -f arc.2 -f arc.3
23668
23669 echo \"Pass 2: Split within a data block\"
23670 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
23671 echo \"Create archive\"
23672 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23673 echo \"Test archive\"
23674 tar -t -M -f arc.1 -f arc.2 -f arc.3
23675 echo \"Compare archive\"
23676 tar -d -M -f arc.1 -f arc.2 -f arc.3
23677 )"
23678 echo spmvp10.at:24 >"$at_check_line_file"
23679
23680 at_trace_this=
23681 if test -n "$at_traceon"; then
23682     echo 'Not enabling shell tracing (command contains an embedded newline)'
23683 fi
23684
23685 if test -n "$at_trace_this"; then
23686     ( $at_traceon;
23687 mkdir pax
23688 (cd pax
23689 TEST_TAR_FORMAT=pax
23690 export TEST_TAR_FORMAT
23691 TAR_OPTIONS="-H pax"
23692 export TAR_OPTIONS
23693 rm -rf *
23694
23695 exec <&-
23696 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
23697 echo "Pass 1: Split between data blocks"
23698 echo "Create archive"
23699 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23700 echo "Test archive"
23701 tar -t -M -f arc.1 -f arc.2 -f arc.3
23702 echo "Compare archive"
23703 tar -d -M -f arc.1 -f arc.2 -f arc.3
23704
23705 echo "Pass 2: Split within a data block"
23706 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
23707 echo "Create archive"
23708 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23709 echo "Test archive"
23710 tar -t -M -f arc.1 -f arc.2 -f arc.3
23711 echo "Compare archive"
23712 tar -d -M -f arc.1 -f arc.2 -f arc.3
23713 ) ) >"$at_stdout" 2>"$at_stder1"
23714     at_status=$?
23715     grep '^ *+' "$at_stder1" >&2
23716     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23717 else
23718     ( :;
23719 mkdir pax
23720 (cd pax
23721 TEST_TAR_FORMAT=pax
23722 export TEST_TAR_FORMAT
23723 TAR_OPTIONS="-H pax"
23724 export TAR_OPTIONS
23725 rm -rf *
23726
23727 exec <&-
23728 genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77
23729 echo "Pass 1: Split between data blocks"
23730 echo "Create archive"
23731 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23732 echo "Test archive"
23733 tar -t -M -f arc.1 -f arc.2 -f arc.3
23734 echo "Compare archive"
23735 tar -d -M -f arc.1 -f arc.2 -f arc.3
23736
23737 echo "Pass 2: Split within a data block"
23738 genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77
23739 echo "Create archive"
23740 tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
23741 echo "Test archive"
23742 tar -t -M -f arc.1 -f arc.2 -f arc.3
23743 echo "Compare archive"
23744 tar -d -M -f arc.1 -f arc.2 -f arc.3
23745 ) ) >"$at_stdout" 2>"$at_stderr"
23746     at_status=$?
23747 fi
23748
23749 at_failed=false
23750 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23751 echo >>"$at_stdout"; echo "Pass 1: Split between data blocks
23752 Create archive
23753 Test archive
23754 sparsefile
23755 Compare archive
23756 Pass 2: Split within a data block
23757 Create archive
23758 Test archive
23759 sparsefile
23760 Compare archive
23761 " | $at_diff - "$at_stdout" || at_failed=:
23762 case $at_status in
23763    77) echo 77 > "$at_status_file"; exit 77;;
23764    0) ;;
23765    *) echo "$at_srcdir/spmvp10.at:24: exit code was $at_status, expected 0"
23766       at_failed=:;;
23767 esac
23768 if $at_failed; then
23769
23770
23771   echo 1 > "$at_status_file"
23772   exit 1
23773 fi
23774
23775 $at_traceon
23776
23777
23778
23779       $at_traceoff
23780       $at_times_p && times >"$at_times_file"
23781     ) 5>&1 2>&1 | eval $at_tee_pipe
23782     at_status=`cat "$at_status_file"`
23783     ;;
23784
23785   61 ) # 61. update.at:27: update unchanged directories
23786     at_setup_line='update.at:27'
23787     at_desc="update unchanged directories"
23788     $at_quiet $ECHO_N " 61: update unchanged directories                   $ECHO_C"
23789     at_xfail=no
23790       test -f $XFAILFILE && at_xfail=yes
23791     echo "#                             -*- compilation -*-" >> "$at_group_log"
23792     (
23793       echo "61. update.at:27: testing ..."
23794       $at_traceon
23795
23796
23797
23798
23799
23800   $at_traceoff
23801 echo "$at_srcdir/update.at:30:
23802 mkdir v7
23803 (cd v7
23804 TEST_TAR_FORMAT=v7
23805 export TEST_TAR_FORMAT
23806 TAR_OPTIONS=\"-H v7\"
23807 export TAR_OPTIONS
23808 rm -rf *
23809
23810
23811 test -z "`sort < /dev/null 2>&1`" || exit 77
23812
23813 mkdir directory
23814 genfile --length 10240 --pattern zeros --file directory/file1
23815 genfile --length 10240 --pattern default --file directory/file2
23816
23817 tar cf archive directory || exit 1
23818 echo separator
23819 tar uf archive directory || exit 1
23820 echo separator
23821 tar tf archive | sort || exit 1
23822 )"
23823 echo update.at:30 >"$at_check_line_file"
23824
23825 at_trace_this=
23826 if test -n "$at_traceon"; then
23827     echo 'Not enabling shell tracing (command contains an embedded newline)'
23828 fi
23829
23830 if test -n "$at_trace_this"; then
23831     ( $at_traceon;
23832 mkdir v7
23833 (cd v7
23834 TEST_TAR_FORMAT=v7
23835 export TEST_TAR_FORMAT
23836 TAR_OPTIONS="-H v7"
23837 export TAR_OPTIONS
23838 rm -rf *
23839
23840
23841 test -z "`sort < /dev/null 2>&1`" || exit 77
23842
23843 mkdir directory
23844 genfile --length 10240 --pattern zeros --file directory/file1
23845 genfile --length 10240 --pattern default --file directory/file2
23846
23847 tar cf archive directory || exit 1
23848 echo separator
23849 tar uf archive directory || exit 1
23850 echo separator
23851 tar tf archive | sort || exit 1
23852 ) ) >"$at_stdout" 2>"$at_stder1"
23853     at_status=$?
23854     grep '^ *+' "$at_stder1" >&2
23855     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23856 else
23857     ( :;
23858 mkdir v7
23859 (cd v7
23860 TEST_TAR_FORMAT=v7
23861 export TEST_TAR_FORMAT
23862 TAR_OPTIONS="-H v7"
23863 export TAR_OPTIONS
23864 rm -rf *
23865
23866
23867 test -z "`sort < /dev/null 2>&1`" || exit 77
23868
23869 mkdir directory
23870 genfile --length 10240 --pattern zeros --file directory/file1
23871 genfile --length 10240 --pattern default --file directory/file2
23872
23873 tar cf archive directory || exit 1
23874 echo separator
23875 tar uf archive directory || exit 1
23876 echo separator
23877 tar tf archive | sort || exit 1
23878 ) ) >"$at_stdout" 2>"$at_stderr"
23879     at_status=$?
23880 fi
23881
23882 at_failed=false
23883 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23884 echo >>"$at_stdout"; echo "separator
23885 separator
23886 directory/
23887 directory/file1
23888 directory/file2
23889 " | $at_diff - "$at_stdout" || at_failed=:
23890 case $at_status in
23891    77) echo 77 > "$at_status_file"; exit 77;;
23892    0) ;;
23893    *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
23894       at_failed=:;;
23895 esac
23896 if $at_failed; then
23897
23898
23899   echo 1 > "$at_status_file"
23900   exit 1
23901 fi
23902
23903 $at_traceon
23904 $at_traceoff
23905 echo "$at_srcdir/update.at:30:
23906 mkdir oldgnu
23907 (cd oldgnu
23908 TEST_TAR_FORMAT=oldgnu
23909 export TEST_TAR_FORMAT
23910 TAR_OPTIONS=\"-H oldgnu\"
23911 export TAR_OPTIONS
23912 rm -rf *
23913
23914
23915 test -z "`sort < /dev/null 2>&1`" || exit 77
23916
23917 mkdir directory
23918 genfile --length 10240 --pattern zeros --file directory/file1
23919 genfile --length 10240 --pattern default --file directory/file2
23920
23921 tar cf archive directory || exit 1
23922 echo separator
23923 tar uf archive directory || exit 1
23924 echo separator
23925 tar tf archive | sort || exit 1
23926 )"
23927 echo update.at:30 >"$at_check_line_file"
23928
23929 at_trace_this=
23930 if test -n "$at_traceon"; then
23931     echo 'Not enabling shell tracing (command contains an embedded newline)'
23932 fi
23933
23934 if test -n "$at_trace_this"; then
23935     ( $at_traceon;
23936 mkdir oldgnu
23937 (cd oldgnu
23938 TEST_TAR_FORMAT=oldgnu
23939 export TEST_TAR_FORMAT
23940 TAR_OPTIONS="-H oldgnu"
23941 export TAR_OPTIONS
23942 rm -rf *
23943
23944
23945 test -z "`sort < /dev/null 2>&1`" || exit 77
23946
23947 mkdir directory
23948 genfile --length 10240 --pattern zeros --file directory/file1
23949 genfile --length 10240 --pattern default --file directory/file2
23950
23951 tar cf archive directory || exit 1
23952 echo separator
23953 tar uf archive directory || exit 1
23954 echo separator
23955 tar tf archive | sort || exit 1
23956 ) ) >"$at_stdout" 2>"$at_stder1"
23957     at_status=$?
23958     grep '^ *+' "$at_stder1" >&2
23959     grep -v '^ *+' "$at_stder1" >"$at_stderr"
23960 else
23961     ( :;
23962 mkdir oldgnu
23963 (cd oldgnu
23964 TEST_TAR_FORMAT=oldgnu
23965 export TEST_TAR_FORMAT
23966 TAR_OPTIONS="-H oldgnu"
23967 export TAR_OPTIONS
23968 rm -rf *
23969
23970
23971 test -z "`sort < /dev/null 2>&1`" || exit 77
23972
23973 mkdir directory
23974 genfile --length 10240 --pattern zeros --file directory/file1
23975 genfile --length 10240 --pattern default --file directory/file2
23976
23977 tar cf archive directory || exit 1
23978 echo separator
23979 tar uf archive directory || exit 1
23980 echo separator
23981 tar tf archive | sort || exit 1
23982 ) ) >"$at_stdout" 2>"$at_stderr"
23983     at_status=$?
23984 fi
23985
23986 at_failed=false
23987 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
23988 echo >>"$at_stdout"; echo "separator
23989 separator
23990 directory/
23991 directory/file1
23992 directory/file2
23993 " | $at_diff - "$at_stdout" || at_failed=:
23994 case $at_status in
23995    77) echo 77 > "$at_status_file"; exit 77;;
23996    0) ;;
23997    *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
23998       at_failed=:;;
23999 esac
24000 if $at_failed; then
24001
24002
24003   echo 1 > "$at_status_file"
24004   exit 1
24005 fi
24006
24007 $at_traceon
24008 $at_traceoff
24009 echo "$at_srcdir/update.at:30:
24010 mkdir ustar
24011 (cd ustar
24012 TEST_TAR_FORMAT=ustar
24013 export TEST_TAR_FORMAT
24014 TAR_OPTIONS=\"-H ustar\"
24015 export TAR_OPTIONS
24016 rm -rf *
24017
24018
24019 test -z "`sort < /dev/null 2>&1`" || exit 77
24020
24021 mkdir directory
24022 genfile --length 10240 --pattern zeros --file directory/file1
24023 genfile --length 10240 --pattern default --file directory/file2
24024
24025 tar cf archive directory || exit 1
24026 echo separator
24027 tar uf archive directory || exit 1
24028 echo separator
24029 tar tf archive | sort || exit 1
24030 )"
24031 echo update.at:30 >"$at_check_line_file"
24032
24033 at_trace_this=
24034 if test -n "$at_traceon"; then
24035     echo 'Not enabling shell tracing (command contains an embedded newline)'
24036 fi
24037
24038 if test -n "$at_trace_this"; then
24039     ( $at_traceon;
24040 mkdir ustar
24041 (cd ustar
24042 TEST_TAR_FORMAT=ustar
24043 export TEST_TAR_FORMAT
24044 TAR_OPTIONS="-H ustar"
24045 export TAR_OPTIONS
24046 rm -rf *
24047
24048
24049 test -z "`sort < /dev/null 2>&1`" || exit 77
24050
24051 mkdir directory
24052 genfile --length 10240 --pattern zeros --file directory/file1
24053 genfile --length 10240 --pattern default --file directory/file2
24054
24055 tar cf archive directory || exit 1
24056 echo separator
24057 tar uf archive directory || exit 1
24058 echo separator
24059 tar tf archive | sort || exit 1
24060 ) ) >"$at_stdout" 2>"$at_stder1"
24061     at_status=$?
24062     grep '^ *+' "$at_stder1" >&2
24063     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24064 else
24065     ( :;
24066 mkdir ustar
24067 (cd ustar
24068 TEST_TAR_FORMAT=ustar
24069 export TEST_TAR_FORMAT
24070 TAR_OPTIONS="-H ustar"
24071 export TAR_OPTIONS
24072 rm -rf *
24073
24074
24075 test -z "`sort < /dev/null 2>&1`" || exit 77
24076
24077 mkdir directory
24078 genfile --length 10240 --pattern zeros --file directory/file1
24079 genfile --length 10240 --pattern default --file directory/file2
24080
24081 tar cf archive directory || exit 1
24082 echo separator
24083 tar uf archive directory || exit 1
24084 echo separator
24085 tar tf archive | sort || exit 1
24086 ) ) >"$at_stdout" 2>"$at_stderr"
24087     at_status=$?
24088 fi
24089
24090 at_failed=false
24091 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24092 echo >>"$at_stdout"; echo "separator
24093 separator
24094 directory/
24095 directory/file1
24096 directory/file2
24097 " | $at_diff - "$at_stdout" || at_failed=:
24098 case $at_status in
24099    77) echo 77 > "$at_status_file"; exit 77;;
24100    0) ;;
24101    *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
24102       at_failed=:;;
24103 esac
24104 if $at_failed; then
24105
24106
24107   echo 1 > "$at_status_file"
24108   exit 1
24109 fi
24110
24111 $at_traceon
24112 $at_traceoff
24113 echo "$at_srcdir/update.at:30:
24114 mkdir posix
24115 (cd posix
24116 TEST_TAR_FORMAT=posix
24117 export TEST_TAR_FORMAT
24118 TAR_OPTIONS=\"-H posix\"
24119 export TAR_OPTIONS
24120 rm -rf *
24121
24122
24123 test -z "`sort < /dev/null 2>&1`" || exit 77
24124
24125 mkdir directory
24126 genfile --length 10240 --pattern zeros --file directory/file1
24127 genfile --length 10240 --pattern default --file directory/file2
24128
24129 tar cf archive directory || exit 1
24130 echo separator
24131 tar uf archive directory || exit 1
24132 echo separator
24133 tar tf archive | sort || exit 1
24134 )"
24135 echo update.at:30 >"$at_check_line_file"
24136
24137 at_trace_this=
24138 if test -n "$at_traceon"; then
24139     echo 'Not enabling shell tracing (command contains an embedded newline)'
24140 fi
24141
24142 if test -n "$at_trace_this"; then
24143     ( $at_traceon;
24144 mkdir posix
24145 (cd posix
24146 TEST_TAR_FORMAT=posix
24147 export TEST_TAR_FORMAT
24148 TAR_OPTIONS="-H posix"
24149 export TAR_OPTIONS
24150 rm -rf *
24151
24152
24153 test -z "`sort < /dev/null 2>&1`" || exit 77
24154
24155 mkdir directory
24156 genfile --length 10240 --pattern zeros --file directory/file1
24157 genfile --length 10240 --pattern default --file directory/file2
24158
24159 tar cf archive directory || exit 1
24160 echo separator
24161 tar uf archive directory || exit 1
24162 echo separator
24163 tar tf archive | sort || exit 1
24164 ) ) >"$at_stdout" 2>"$at_stder1"
24165     at_status=$?
24166     grep '^ *+' "$at_stder1" >&2
24167     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24168 else
24169     ( :;
24170 mkdir posix
24171 (cd posix
24172 TEST_TAR_FORMAT=posix
24173 export TEST_TAR_FORMAT
24174 TAR_OPTIONS="-H posix"
24175 export TAR_OPTIONS
24176 rm -rf *
24177
24178
24179 test -z "`sort < /dev/null 2>&1`" || exit 77
24180
24181 mkdir directory
24182 genfile --length 10240 --pattern zeros --file directory/file1
24183 genfile --length 10240 --pattern default --file directory/file2
24184
24185 tar cf archive directory || exit 1
24186 echo separator
24187 tar uf archive directory || exit 1
24188 echo separator
24189 tar tf archive | sort || exit 1
24190 ) ) >"$at_stdout" 2>"$at_stderr"
24191     at_status=$?
24192 fi
24193
24194 at_failed=false
24195 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24196 echo >>"$at_stdout"; echo "separator
24197 separator
24198 directory/
24199 directory/file1
24200 directory/file2
24201 " | $at_diff - "$at_stdout" || at_failed=:
24202 case $at_status in
24203    77) echo 77 > "$at_status_file"; exit 77;;
24204    0) ;;
24205    *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
24206       at_failed=:;;
24207 esac
24208 if $at_failed; then
24209
24210
24211   echo 1 > "$at_status_file"
24212   exit 1
24213 fi
24214
24215 $at_traceon
24216 $at_traceoff
24217 echo "$at_srcdir/update.at:30:
24218 mkdir gnu
24219 (cd gnu
24220 TEST_TAR_FORMAT=gnu
24221 export TEST_TAR_FORMAT
24222 TAR_OPTIONS=\"-H gnu\"
24223 export TAR_OPTIONS
24224 rm -rf *
24225
24226
24227 test -z "`sort < /dev/null 2>&1`" || exit 77
24228
24229 mkdir directory
24230 genfile --length 10240 --pattern zeros --file directory/file1
24231 genfile --length 10240 --pattern default --file directory/file2
24232
24233 tar cf archive directory || exit 1
24234 echo separator
24235 tar uf archive directory || exit 1
24236 echo separator
24237 tar tf archive | sort || exit 1
24238 )"
24239 echo update.at:30 >"$at_check_line_file"
24240
24241 at_trace_this=
24242 if test -n "$at_traceon"; then
24243     echo 'Not enabling shell tracing (command contains an embedded newline)'
24244 fi
24245
24246 if test -n "$at_trace_this"; then
24247     ( $at_traceon;
24248 mkdir gnu
24249 (cd gnu
24250 TEST_TAR_FORMAT=gnu
24251 export TEST_TAR_FORMAT
24252 TAR_OPTIONS="-H gnu"
24253 export TAR_OPTIONS
24254 rm -rf *
24255
24256
24257 test -z "`sort < /dev/null 2>&1`" || exit 77
24258
24259 mkdir directory
24260 genfile --length 10240 --pattern zeros --file directory/file1
24261 genfile --length 10240 --pattern default --file directory/file2
24262
24263 tar cf archive directory || exit 1
24264 echo separator
24265 tar uf archive directory || exit 1
24266 echo separator
24267 tar tf archive | sort || exit 1
24268 ) ) >"$at_stdout" 2>"$at_stder1"
24269     at_status=$?
24270     grep '^ *+' "$at_stder1" >&2
24271     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24272 else
24273     ( :;
24274 mkdir gnu
24275 (cd gnu
24276 TEST_TAR_FORMAT=gnu
24277 export TEST_TAR_FORMAT
24278 TAR_OPTIONS="-H gnu"
24279 export TAR_OPTIONS
24280 rm -rf *
24281
24282
24283 test -z "`sort < /dev/null 2>&1`" || exit 77
24284
24285 mkdir directory
24286 genfile --length 10240 --pattern zeros --file directory/file1
24287 genfile --length 10240 --pattern default --file directory/file2
24288
24289 tar cf archive directory || exit 1
24290 echo separator
24291 tar uf archive directory || exit 1
24292 echo separator
24293 tar tf archive | sort || exit 1
24294 ) ) >"$at_stdout" 2>"$at_stderr"
24295     at_status=$?
24296 fi
24297
24298 at_failed=false
24299 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24300 echo >>"$at_stdout"; echo "separator
24301 separator
24302 directory/
24303 directory/file1
24304 directory/file2
24305 " | $at_diff - "$at_stdout" || at_failed=:
24306 case $at_status in
24307    77) echo 77 > "$at_status_file"; exit 77;;
24308    0) ;;
24309    *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0"
24310       at_failed=:;;
24311 esac
24312 if $at_failed; then
24313
24314
24315   echo 1 > "$at_status_file"
24316   exit 1
24317 fi
24318
24319 $at_traceon
24320
24321
24322
24323       $at_traceoff
24324       $at_times_p && times >"$at_times_file"
24325     ) 5>&1 2>&1 | eval $at_tee_pipe
24326     at_status=`cat "$at_status_file"`
24327     ;;
24328
24329   62 ) # 62. volume.at:23: volume
24330     at_setup_line='volume.at:23'
24331     at_desc="volume"
24332     $at_quiet $ECHO_N " 62: volume                                         $ECHO_C"
24333     at_xfail=no
24334       test -f $XFAILFILE && at_xfail=yes
24335     echo "#                             -*- compilation -*-" >> "$at_group_log"
24336     (
24337       echo "62. volume.at:23: testing ..."
24338       $at_traceon
24339
24340
24341
24342
24343
24344   $at_traceoff
24345 echo "$at_srcdir/volume.at:26:
24346 mkdir gnu
24347 (cd gnu
24348 TEST_TAR_FORMAT=gnu
24349 export TEST_TAR_FORMAT
24350 TAR_OPTIONS=\"-H gnu\"
24351 export TAR_OPTIONS
24352 rm -rf *
24353
24354 tar -cf archive -V label -T /dev/null || exit 1
24355
24356 tar xfV archive label || exit 1
24357 tar xfV archive 'la?el' || exit 1
24358 tar xfV archive 'l*l' || exit 1
24359
24360 echo 1>&2 -----
24361 tar xfV archive lab
24362 test \$? = 2 || exit 1
24363 echo 1>&2 -----
24364 tar xfV archive bel
24365 test \$? = 2 || exit 1
24366 echo 1>&2 -----
24367 tar xfV archive babel
24368 test \$? = 2
24369 )"
24370 echo volume.at:26 >"$at_check_line_file"
24371
24372 at_trace_this=
24373 if test -n "$at_traceon"; then
24374     echo 'Not enabling shell tracing (command contains an embedded newline)'
24375 fi
24376
24377 if test -n "$at_trace_this"; then
24378     ( $at_traceon;
24379 mkdir gnu
24380 (cd gnu
24381 TEST_TAR_FORMAT=gnu
24382 export TEST_TAR_FORMAT
24383 TAR_OPTIONS="-H gnu"
24384 export TAR_OPTIONS
24385 rm -rf *
24386
24387 tar -cf archive -V label -T /dev/null || exit 1
24388
24389 tar xfV archive label || exit 1
24390 tar xfV archive 'la?el' || exit 1
24391 tar xfV archive 'l*l' || exit 1
24392
24393 echo 1>&2 -----
24394 tar xfV archive lab
24395 test $? = 2 || exit 1
24396 echo 1>&2 -----
24397 tar xfV archive bel
24398 test $? = 2 || exit 1
24399 echo 1>&2 -----
24400 tar xfV archive babel
24401 test $? = 2
24402 ) ) >"$at_stdout" 2>"$at_stder1"
24403     at_status=$?
24404     grep '^ *+' "$at_stder1" >&2
24405     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24406 else
24407     ( :;
24408 mkdir gnu
24409 (cd gnu
24410 TEST_TAR_FORMAT=gnu
24411 export TEST_TAR_FORMAT
24412 TAR_OPTIONS="-H gnu"
24413 export TAR_OPTIONS
24414 rm -rf *
24415
24416 tar -cf archive -V label -T /dev/null || exit 1
24417
24418 tar xfV archive label || exit 1
24419 tar xfV archive 'la?el' || exit 1
24420 tar xfV archive 'l*l' || exit 1
24421
24422 echo 1>&2 -----
24423 tar xfV archive lab
24424 test $? = 2 || exit 1
24425 echo 1>&2 -----
24426 tar xfV archive bel
24427 test $? = 2 || exit 1
24428 echo 1>&2 -----
24429 tar xfV archive babel
24430 test $? = 2
24431 ) ) >"$at_stdout" 2>"$at_stderr"
24432     at_status=$?
24433 fi
24434
24435 at_failed=false
24436 echo >>"$at_stderr"; echo "-----
24437 tar: Volume \`label' does not match \`lab'
24438 tar: Error is not recoverable: exiting now
24439 -----
24440 tar: Volume \`label' does not match \`bel'
24441 tar: Error is not recoverable: exiting now
24442 -----
24443 tar: Volume \`label' does not match \`babel'
24444 tar: Error is not recoverable: exiting now
24445 " | $at_diff - "$at_stderr" || at_failed=:
24446 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
24447 case $at_status in
24448    77) echo 77 > "$at_status_file"; exit 77;;
24449    0) ;;
24450    *) echo "$at_srcdir/volume.at:26: exit code was $at_status, expected 0"
24451       at_failed=:;;
24452 esac
24453 if $at_failed; then
24454
24455
24456   echo 1 > "$at_status_file"
24457   exit 1
24458 fi
24459
24460 $at_traceon
24461 $at_traceoff
24462 echo "$at_srcdir/volume.at:26:
24463 mkdir oldgnu
24464 (cd oldgnu
24465 TEST_TAR_FORMAT=oldgnu
24466 export TEST_TAR_FORMAT
24467 TAR_OPTIONS=\"-H oldgnu\"
24468 export TAR_OPTIONS
24469 rm -rf *
24470
24471 tar -cf archive -V label -T /dev/null || exit 1
24472
24473 tar xfV archive label || exit 1
24474 tar xfV archive 'la?el' || exit 1
24475 tar xfV archive 'l*l' || exit 1
24476
24477 echo 1>&2 -----
24478 tar xfV archive lab
24479 test \$? = 2 || exit 1
24480 echo 1>&2 -----
24481 tar xfV archive bel
24482 test \$? = 2 || exit 1
24483 echo 1>&2 -----
24484 tar xfV archive babel
24485 test \$? = 2
24486 )"
24487 echo volume.at:26 >"$at_check_line_file"
24488
24489 at_trace_this=
24490 if test -n "$at_traceon"; then
24491     echo 'Not enabling shell tracing (command contains an embedded newline)'
24492 fi
24493
24494 if test -n "$at_trace_this"; then
24495     ( $at_traceon;
24496 mkdir oldgnu
24497 (cd oldgnu
24498 TEST_TAR_FORMAT=oldgnu
24499 export TEST_TAR_FORMAT
24500 TAR_OPTIONS="-H oldgnu"
24501 export TAR_OPTIONS
24502 rm -rf *
24503
24504 tar -cf archive -V label -T /dev/null || exit 1
24505
24506 tar xfV archive label || exit 1
24507 tar xfV archive 'la?el' || exit 1
24508 tar xfV archive 'l*l' || exit 1
24509
24510 echo 1>&2 -----
24511 tar xfV archive lab
24512 test $? = 2 || exit 1
24513 echo 1>&2 -----
24514 tar xfV archive bel
24515 test $? = 2 || exit 1
24516 echo 1>&2 -----
24517 tar xfV archive babel
24518 test $? = 2
24519 ) ) >"$at_stdout" 2>"$at_stder1"
24520     at_status=$?
24521     grep '^ *+' "$at_stder1" >&2
24522     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24523 else
24524     ( :;
24525 mkdir oldgnu
24526 (cd oldgnu
24527 TEST_TAR_FORMAT=oldgnu
24528 export TEST_TAR_FORMAT
24529 TAR_OPTIONS="-H oldgnu"
24530 export TAR_OPTIONS
24531 rm -rf *
24532
24533 tar -cf archive -V label -T /dev/null || exit 1
24534
24535 tar xfV archive label || exit 1
24536 tar xfV archive 'la?el' || exit 1
24537 tar xfV archive 'l*l' || exit 1
24538
24539 echo 1>&2 -----
24540 tar xfV archive lab
24541 test $? = 2 || exit 1
24542 echo 1>&2 -----
24543 tar xfV archive bel
24544 test $? = 2 || exit 1
24545 echo 1>&2 -----
24546 tar xfV archive babel
24547 test $? = 2
24548 ) ) >"$at_stdout" 2>"$at_stderr"
24549     at_status=$?
24550 fi
24551
24552 at_failed=false
24553 echo >>"$at_stderr"; echo "-----
24554 tar: Volume \`label' does not match \`lab'
24555 tar: Error is not recoverable: exiting now
24556 -----
24557 tar: Volume \`label' does not match \`bel'
24558 tar: Error is not recoverable: exiting now
24559 -----
24560 tar: Volume \`label' does not match \`babel'
24561 tar: Error is not recoverable: exiting now
24562 " | $at_diff - "$at_stderr" || at_failed=:
24563 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
24564 case $at_status in
24565    77) echo 77 > "$at_status_file"; exit 77;;
24566    0) ;;
24567    *) echo "$at_srcdir/volume.at:26: exit code was $at_status, expected 0"
24568       at_failed=:;;
24569 esac
24570 if $at_failed; then
24571
24572
24573   echo 1 > "$at_status_file"
24574   exit 1
24575 fi
24576
24577 $at_traceon
24578
24579
24580
24581       $at_traceoff
24582       $at_times_p && times >"$at_times_file"
24583     ) 5>&1 2>&1 | eval $at_tee_pipe
24584     at_status=`cat "$at_status_file"`
24585     ;;
24586
24587   63 ) # 63. volsize.at:29: volume header size
24588     at_setup_line='volsize.at:29'
24589     at_desc="volume header size"
24590     $at_quiet $ECHO_N " 63: volume header size                             $ECHO_C"
24591     at_xfail=no
24592       test -f $XFAILFILE && at_xfail=yes
24593     echo "#                             -*- compilation -*-" >> "$at_group_log"
24594     (
24595       echo "63. volsize.at:29: testing ..."
24596       $at_traceon
24597
24598
24599
24600
24601
24602   $at_traceoff
24603 echo "$at_srcdir/volsize.at:32:
24604 mkdir v7
24605 (cd v7
24606 TEST_TAR_FORMAT=v7
24607 export TEST_TAR_FORMAT
24608 TAR_OPTIONS=\"-H v7\"
24609 export TAR_OPTIONS
24610 rm -rf *
24611
24612
24613 test -z "`sort < /dev/null 2>&1`" || exit 77
24614
24615
24616 test -z "$TEST_DATA_DIR" && exit 77
24617 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24618
24619 echo Short Listing
24620 tar tf \$TEST_DATA_DIR/abc.tar
24621 echo Verbose Listing
24622 tar tfv \$TEST_DATA_DIR/abc.tar
24623 echo Extracted directory
24624 tar xf \$TEST_DATA_DIR/abc.tar
24625 find abc|sort
24626 )"
24627 echo volsize.at:32 >"$at_check_line_file"
24628
24629 at_trace_this=
24630 if test -n "$at_traceon"; then
24631     echo 'Not enabling shell tracing (command contains an embedded newline)'
24632 fi
24633
24634 if test -n "$at_trace_this"; then
24635     ( $at_traceon;
24636 mkdir v7
24637 (cd v7
24638 TEST_TAR_FORMAT=v7
24639 export TEST_TAR_FORMAT
24640 TAR_OPTIONS="-H v7"
24641 export TAR_OPTIONS
24642 rm -rf *
24643
24644
24645 test -z "`sort < /dev/null 2>&1`" || exit 77
24646
24647
24648 test -z "$TEST_DATA_DIR" && exit 77
24649 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24650
24651 echo Short Listing
24652 tar tf $TEST_DATA_DIR/abc.tar
24653 echo Verbose Listing
24654 tar tfv $TEST_DATA_DIR/abc.tar
24655 echo Extracted directory
24656 tar xf $TEST_DATA_DIR/abc.tar
24657 find abc|sort
24658 ) ) >"$at_stdout" 2>"$at_stder1"
24659     at_status=$?
24660     grep '^ *+' "$at_stder1" >&2
24661     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24662 else
24663     ( :;
24664 mkdir v7
24665 (cd v7
24666 TEST_TAR_FORMAT=v7
24667 export TEST_TAR_FORMAT
24668 TAR_OPTIONS="-H v7"
24669 export TAR_OPTIONS
24670 rm -rf *
24671
24672
24673 test -z "`sort < /dev/null 2>&1`" || exit 77
24674
24675
24676 test -z "$TEST_DATA_DIR" && exit 77
24677 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24678
24679 echo Short Listing
24680 tar tf $TEST_DATA_DIR/abc.tar
24681 echo Verbose Listing
24682 tar tfv $TEST_DATA_DIR/abc.tar
24683 echo Extracted directory
24684 tar xf $TEST_DATA_DIR/abc.tar
24685 find abc|sort
24686 ) ) >"$at_stdout" 2>"$at_stderr"
24687     at_status=$?
24688 fi
24689
24690 at_failed=false
24691 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24692 echo >>"$at_stdout"; echo "Short Listing
24693 abc/not-a-file.gif
24694 abc/CCC
24695 Verbose Listing
24696 V--------- 0/0            1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header--
24697 -rw-r--r-- tom/users         0 2006-04-22 22:52 abc/CCC
24698 Extracted directory
24699 abc
24700 abc/CCC
24701 " | $at_diff - "$at_stdout" || at_failed=:
24702 case $at_status in
24703    77) echo 77 > "$at_status_file"; exit 77;;
24704    0) ;;
24705    *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
24706       at_failed=:;;
24707 esac
24708 if $at_failed; then
24709
24710
24711   echo 1 > "$at_status_file"
24712   exit 1
24713 fi
24714
24715 $at_traceon
24716 $at_traceoff
24717 echo "$at_srcdir/volsize.at:32:
24718 mkdir oldgnu
24719 (cd oldgnu
24720 TEST_TAR_FORMAT=oldgnu
24721 export TEST_TAR_FORMAT
24722 TAR_OPTIONS=\"-H oldgnu\"
24723 export TAR_OPTIONS
24724 rm -rf *
24725
24726
24727 test -z "`sort < /dev/null 2>&1`" || exit 77
24728
24729
24730 test -z "$TEST_DATA_DIR" && exit 77
24731 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24732
24733 echo Short Listing
24734 tar tf \$TEST_DATA_DIR/abc.tar
24735 echo Verbose Listing
24736 tar tfv \$TEST_DATA_DIR/abc.tar
24737 echo Extracted directory
24738 tar xf \$TEST_DATA_DIR/abc.tar
24739 find abc|sort
24740 )"
24741 echo volsize.at:32 >"$at_check_line_file"
24742
24743 at_trace_this=
24744 if test -n "$at_traceon"; then
24745     echo 'Not enabling shell tracing (command contains an embedded newline)'
24746 fi
24747
24748 if test -n "$at_trace_this"; then
24749     ( $at_traceon;
24750 mkdir oldgnu
24751 (cd oldgnu
24752 TEST_TAR_FORMAT=oldgnu
24753 export TEST_TAR_FORMAT
24754 TAR_OPTIONS="-H oldgnu"
24755 export TAR_OPTIONS
24756 rm -rf *
24757
24758
24759 test -z "`sort < /dev/null 2>&1`" || exit 77
24760
24761
24762 test -z "$TEST_DATA_DIR" && exit 77
24763 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24764
24765 echo Short Listing
24766 tar tf $TEST_DATA_DIR/abc.tar
24767 echo Verbose Listing
24768 tar tfv $TEST_DATA_DIR/abc.tar
24769 echo Extracted directory
24770 tar xf $TEST_DATA_DIR/abc.tar
24771 find abc|sort
24772 ) ) >"$at_stdout" 2>"$at_stder1"
24773     at_status=$?
24774     grep '^ *+' "$at_stder1" >&2
24775     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24776 else
24777     ( :;
24778 mkdir oldgnu
24779 (cd oldgnu
24780 TEST_TAR_FORMAT=oldgnu
24781 export TEST_TAR_FORMAT
24782 TAR_OPTIONS="-H oldgnu"
24783 export TAR_OPTIONS
24784 rm -rf *
24785
24786
24787 test -z "`sort < /dev/null 2>&1`" || exit 77
24788
24789
24790 test -z "$TEST_DATA_DIR" && exit 77
24791 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24792
24793 echo Short Listing
24794 tar tf $TEST_DATA_DIR/abc.tar
24795 echo Verbose Listing
24796 tar tfv $TEST_DATA_DIR/abc.tar
24797 echo Extracted directory
24798 tar xf $TEST_DATA_DIR/abc.tar
24799 find abc|sort
24800 ) ) >"$at_stdout" 2>"$at_stderr"
24801     at_status=$?
24802 fi
24803
24804 at_failed=false
24805 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24806 echo >>"$at_stdout"; echo "Short Listing
24807 abc/not-a-file.gif
24808 abc/CCC
24809 Verbose Listing
24810 V--------- 0/0            1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header--
24811 -rw-r--r-- tom/users         0 2006-04-22 22:52 abc/CCC
24812 Extracted directory
24813 abc
24814 abc/CCC
24815 " | $at_diff - "$at_stdout" || at_failed=:
24816 case $at_status in
24817    77) echo 77 > "$at_status_file"; exit 77;;
24818    0) ;;
24819    *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
24820       at_failed=:;;
24821 esac
24822 if $at_failed; then
24823
24824
24825   echo 1 > "$at_status_file"
24826   exit 1
24827 fi
24828
24829 $at_traceon
24830 $at_traceoff
24831 echo "$at_srcdir/volsize.at:32:
24832 mkdir ustar
24833 (cd ustar
24834 TEST_TAR_FORMAT=ustar
24835 export TEST_TAR_FORMAT
24836 TAR_OPTIONS=\"-H ustar\"
24837 export TAR_OPTIONS
24838 rm -rf *
24839
24840
24841 test -z "`sort < /dev/null 2>&1`" || exit 77
24842
24843
24844 test -z "$TEST_DATA_DIR" && exit 77
24845 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24846
24847 echo Short Listing
24848 tar tf \$TEST_DATA_DIR/abc.tar
24849 echo Verbose Listing
24850 tar tfv \$TEST_DATA_DIR/abc.tar
24851 echo Extracted directory
24852 tar xf \$TEST_DATA_DIR/abc.tar
24853 find abc|sort
24854 )"
24855 echo volsize.at:32 >"$at_check_line_file"
24856
24857 at_trace_this=
24858 if test -n "$at_traceon"; then
24859     echo 'Not enabling shell tracing (command contains an embedded newline)'
24860 fi
24861
24862 if test -n "$at_trace_this"; then
24863     ( $at_traceon;
24864 mkdir ustar
24865 (cd ustar
24866 TEST_TAR_FORMAT=ustar
24867 export TEST_TAR_FORMAT
24868 TAR_OPTIONS="-H ustar"
24869 export TAR_OPTIONS
24870 rm -rf *
24871
24872
24873 test -z "`sort < /dev/null 2>&1`" || exit 77
24874
24875
24876 test -z "$TEST_DATA_DIR" && exit 77
24877 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24878
24879 echo Short Listing
24880 tar tf $TEST_DATA_DIR/abc.tar
24881 echo Verbose Listing
24882 tar tfv $TEST_DATA_DIR/abc.tar
24883 echo Extracted directory
24884 tar xf $TEST_DATA_DIR/abc.tar
24885 find abc|sort
24886 ) ) >"$at_stdout" 2>"$at_stder1"
24887     at_status=$?
24888     grep '^ *+' "$at_stder1" >&2
24889     grep -v '^ *+' "$at_stder1" >"$at_stderr"
24890 else
24891     ( :;
24892 mkdir ustar
24893 (cd ustar
24894 TEST_TAR_FORMAT=ustar
24895 export TEST_TAR_FORMAT
24896 TAR_OPTIONS="-H ustar"
24897 export TAR_OPTIONS
24898 rm -rf *
24899
24900
24901 test -z "`sort < /dev/null 2>&1`" || exit 77
24902
24903
24904 test -z "$TEST_DATA_DIR" && exit 77
24905 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24906
24907 echo Short Listing
24908 tar tf $TEST_DATA_DIR/abc.tar
24909 echo Verbose Listing
24910 tar tfv $TEST_DATA_DIR/abc.tar
24911 echo Extracted directory
24912 tar xf $TEST_DATA_DIR/abc.tar
24913 find abc|sort
24914 ) ) >"$at_stdout" 2>"$at_stderr"
24915     at_status=$?
24916 fi
24917
24918 at_failed=false
24919 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
24920 echo >>"$at_stdout"; echo "Short Listing
24921 abc/not-a-file.gif
24922 abc/CCC
24923 Verbose Listing
24924 V--------- 0/0            1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header--
24925 -rw-r--r-- tom/users         0 2006-04-22 22:52 abc/CCC
24926 Extracted directory
24927 abc
24928 abc/CCC
24929 " | $at_diff - "$at_stdout" || at_failed=:
24930 case $at_status in
24931    77) echo 77 > "$at_status_file"; exit 77;;
24932    0) ;;
24933    *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
24934       at_failed=:;;
24935 esac
24936 if $at_failed; then
24937
24938
24939   echo 1 > "$at_status_file"
24940   exit 1
24941 fi
24942
24943 $at_traceon
24944 $at_traceoff
24945 echo "$at_srcdir/volsize.at:32:
24946 mkdir posix
24947 (cd posix
24948 TEST_TAR_FORMAT=posix
24949 export TEST_TAR_FORMAT
24950 TAR_OPTIONS=\"-H posix\"
24951 export TAR_OPTIONS
24952 rm -rf *
24953
24954
24955 test -z "`sort < /dev/null 2>&1`" || exit 77
24956
24957
24958 test -z "$TEST_DATA_DIR" && exit 77
24959 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24960
24961 echo Short Listing
24962 tar tf \$TEST_DATA_DIR/abc.tar
24963 echo Verbose Listing
24964 tar tfv \$TEST_DATA_DIR/abc.tar
24965 echo Extracted directory
24966 tar xf \$TEST_DATA_DIR/abc.tar
24967 find abc|sort
24968 )"
24969 echo volsize.at:32 >"$at_check_line_file"
24970
24971 at_trace_this=
24972 if test -n "$at_traceon"; then
24973     echo 'Not enabling shell tracing (command contains an embedded newline)'
24974 fi
24975
24976 if test -n "$at_trace_this"; then
24977     ( $at_traceon;
24978 mkdir posix
24979 (cd posix
24980 TEST_TAR_FORMAT=posix
24981 export TEST_TAR_FORMAT
24982 TAR_OPTIONS="-H posix"
24983 export TAR_OPTIONS
24984 rm -rf *
24985
24986
24987 test -z "`sort < /dev/null 2>&1`" || exit 77
24988
24989
24990 test -z "$TEST_DATA_DIR" && exit 77
24991 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
24992
24993 echo Short Listing
24994 tar tf $TEST_DATA_DIR/abc.tar
24995 echo Verbose Listing
24996 tar tfv $TEST_DATA_DIR/abc.tar
24997 echo Extracted directory
24998 tar xf $TEST_DATA_DIR/abc.tar
24999 find abc|sort
25000 ) ) >"$at_stdout" 2>"$at_stder1"
25001     at_status=$?
25002     grep '^ *+' "$at_stder1" >&2
25003     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25004 else
25005     ( :;
25006 mkdir posix
25007 (cd posix
25008 TEST_TAR_FORMAT=posix
25009 export TEST_TAR_FORMAT
25010 TAR_OPTIONS="-H posix"
25011 export TAR_OPTIONS
25012 rm -rf *
25013
25014
25015 test -z "`sort < /dev/null 2>&1`" || exit 77
25016
25017
25018 test -z "$TEST_DATA_DIR" && exit 77
25019 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
25020
25021 echo Short Listing
25022 tar tf $TEST_DATA_DIR/abc.tar
25023 echo Verbose Listing
25024 tar tfv $TEST_DATA_DIR/abc.tar
25025 echo Extracted directory
25026 tar xf $TEST_DATA_DIR/abc.tar
25027 find abc|sort
25028 ) ) >"$at_stdout" 2>"$at_stderr"
25029     at_status=$?
25030 fi
25031
25032 at_failed=false
25033 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25034 echo >>"$at_stdout"; echo "Short Listing
25035 abc/not-a-file.gif
25036 abc/CCC
25037 Verbose Listing
25038 V--------- 0/0            1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header--
25039 -rw-r--r-- tom/users         0 2006-04-22 22:52 abc/CCC
25040 Extracted directory
25041 abc
25042 abc/CCC
25043 " | $at_diff - "$at_stdout" || at_failed=:
25044 case $at_status in
25045    77) echo 77 > "$at_status_file"; exit 77;;
25046    0) ;;
25047    *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
25048       at_failed=:;;
25049 esac
25050 if $at_failed; then
25051
25052
25053   echo 1 > "$at_status_file"
25054   exit 1
25055 fi
25056
25057 $at_traceon
25058 $at_traceoff
25059 echo "$at_srcdir/volsize.at:32:
25060 mkdir gnu
25061 (cd gnu
25062 TEST_TAR_FORMAT=gnu
25063 export TEST_TAR_FORMAT
25064 TAR_OPTIONS=\"-H gnu\"
25065 export TAR_OPTIONS
25066 rm -rf *
25067
25068
25069 test -z "`sort < /dev/null 2>&1`" || exit 77
25070
25071
25072 test -z "$TEST_DATA_DIR" && exit 77
25073 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
25074
25075 echo Short Listing
25076 tar tf \$TEST_DATA_DIR/abc.tar
25077 echo Verbose Listing
25078 tar tfv \$TEST_DATA_DIR/abc.tar
25079 echo Extracted directory
25080 tar xf \$TEST_DATA_DIR/abc.tar
25081 find abc|sort
25082 )"
25083 echo volsize.at:32 >"$at_check_line_file"
25084
25085 at_trace_this=
25086 if test -n "$at_traceon"; then
25087     echo 'Not enabling shell tracing (command contains an embedded newline)'
25088 fi
25089
25090 if test -n "$at_trace_this"; then
25091     ( $at_traceon;
25092 mkdir gnu
25093 (cd gnu
25094 TEST_TAR_FORMAT=gnu
25095 export TEST_TAR_FORMAT
25096 TAR_OPTIONS="-H gnu"
25097 export TAR_OPTIONS
25098 rm -rf *
25099
25100
25101 test -z "`sort < /dev/null 2>&1`" || exit 77
25102
25103
25104 test -z "$TEST_DATA_DIR" && exit 77
25105 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
25106
25107 echo Short Listing
25108 tar tf $TEST_DATA_DIR/abc.tar
25109 echo Verbose Listing
25110 tar tfv $TEST_DATA_DIR/abc.tar
25111 echo Extracted directory
25112 tar xf $TEST_DATA_DIR/abc.tar
25113 find abc|sort
25114 ) ) >"$at_stdout" 2>"$at_stder1"
25115     at_status=$?
25116     grep '^ *+' "$at_stder1" >&2
25117     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25118 else
25119     ( :;
25120 mkdir gnu
25121 (cd gnu
25122 TEST_TAR_FORMAT=gnu
25123 export TEST_TAR_FORMAT
25124 TAR_OPTIONS="-H gnu"
25125 export TAR_OPTIONS
25126 rm -rf *
25127
25128
25129 test -z "`sort < /dev/null 2>&1`" || exit 77
25130
25131
25132 test -z "$TEST_DATA_DIR" && exit 77
25133 tarball_prereq abc.tar 540f196ceddcad9e7bd2f2d7533d0474 $TEST_DATA_DIR $TEST_DATA_URL || exit 77
25134
25135 echo Short Listing
25136 tar tf $TEST_DATA_DIR/abc.tar
25137 echo Verbose Listing
25138 tar tfv $TEST_DATA_DIR/abc.tar
25139 echo Extracted directory
25140 tar xf $TEST_DATA_DIR/abc.tar
25141 find abc|sort
25142 ) ) >"$at_stdout" 2>"$at_stderr"
25143     at_status=$?
25144 fi
25145
25146 at_failed=false
25147 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25148 echo >>"$at_stdout"; echo "Short Listing
25149 abc/not-a-file.gif
25150 abc/CCC
25151 Verbose Listing
25152 V--------- 0/0            1536 2006-05-09 01:07 abc/not-a-file.gif--Volume Header--
25153 -rw-r--r-- tom/users         0 2006-04-22 22:52 abc/CCC
25154 Extracted directory
25155 abc
25156 abc/CCC
25157 " | $at_diff - "$at_stdout" || at_failed=:
25158 case $at_status in
25159    77) echo 77 > "$at_status_file"; exit 77;;
25160    0) ;;
25161    *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0"
25162       at_failed=:;;
25163 esac
25164 if $at_failed; then
25165
25166
25167   echo 1 > "$at_status_file"
25168   exit 1
25169 fi
25170
25171 $at_traceon
25172
25173
25174
25175       $at_traceoff
25176       $at_times_p && times >"$at_times_file"
25177     ) 5>&1 2>&1 | eval $at_tee_pipe
25178     at_status=`cat "$at_status_file"`
25179     ;;
25180
25181   64 ) # 64. comprec.at:21: compressed format recognition
25182     at_setup_line='comprec.at:21'
25183     at_desc="compressed format recognition"
25184     $at_quiet $ECHO_N " 64: compressed format recognition                  $ECHO_C"
25185     at_xfail=no
25186       test -f $XFAILFILE && at_xfail=yes
25187     echo "#                             -*- compilation -*-" >> "$at_group_log"
25188     (
25189       echo "64. comprec.at:21: testing ..."
25190       $at_traceon
25191
25192
25193
25194
25195
25196
25197   $at_traceoff
25198 echo "$at_srcdir/comprec.at:25:
25199 mkdir v7
25200 (cd v7
25201 TEST_TAR_FORMAT=v7
25202 export TEST_TAR_FORMAT
25203 TAR_OPTIONS=\"-H v7\"
25204 export TAR_OPTIONS
25205 rm -rf *
25206
25207
25208 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25209
25210 genfile --length 10240 --file file1
25211 echo \"separator\"
25212 tar cfz archive file1
25213 echo \"separator\"
25214 mv file1 orig
25215 tar xfv archive
25216 cmp orig file1
25217 )"
25218 echo comprec.at:25 >"$at_check_line_file"
25219
25220 at_trace_this=
25221 if test -n "$at_traceon"; then
25222     echo 'Not enabling shell tracing (command contains an embedded newline)'
25223 fi
25224
25225 if test -n "$at_trace_this"; then
25226     ( $at_traceon;
25227 mkdir v7
25228 (cd v7
25229 TEST_TAR_FORMAT=v7
25230 export TEST_TAR_FORMAT
25231 TAR_OPTIONS="-H v7"
25232 export TAR_OPTIONS
25233 rm -rf *
25234
25235
25236 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25237
25238 genfile --length 10240 --file file1
25239 echo "separator"
25240 tar cfz archive file1
25241 echo "separator"
25242 mv file1 orig
25243 tar xfv archive
25244 cmp orig file1
25245 ) ) >"$at_stdout" 2>"$at_stder1"
25246     at_status=$?
25247     grep '^ *+' "$at_stder1" >&2
25248     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25249 else
25250     ( :;
25251 mkdir v7
25252 (cd v7
25253 TEST_TAR_FORMAT=v7
25254 export TEST_TAR_FORMAT
25255 TAR_OPTIONS="-H v7"
25256 export TAR_OPTIONS
25257 rm -rf *
25258
25259
25260 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25261
25262 genfile --length 10240 --file file1
25263 echo "separator"
25264 tar cfz archive file1
25265 echo "separator"
25266 mv file1 orig
25267 tar xfv archive
25268 cmp orig file1
25269 ) ) >"$at_stdout" 2>"$at_stderr"
25270     at_status=$?
25271 fi
25272
25273 at_failed=false
25274 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25275 echo >>"$at_stdout"; echo "separator
25276 separator
25277 file1
25278 " | $at_diff - "$at_stdout" || at_failed=:
25279 case $at_status in
25280    77) echo 77 > "$at_status_file"; exit 77;;
25281    0) ;;
25282    *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
25283       at_failed=:;;
25284 esac
25285 if $at_failed; then
25286
25287
25288   echo 1 > "$at_status_file"
25289   exit 1
25290 fi
25291
25292 $at_traceon
25293 $at_traceoff
25294 echo "$at_srcdir/comprec.at:25:
25295 mkdir oldgnu
25296 (cd oldgnu
25297 TEST_TAR_FORMAT=oldgnu
25298 export TEST_TAR_FORMAT
25299 TAR_OPTIONS=\"-H oldgnu\"
25300 export TAR_OPTIONS
25301 rm -rf *
25302
25303
25304 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25305
25306 genfile --length 10240 --file file1
25307 echo \"separator\"
25308 tar cfz archive file1
25309 echo \"separator\"
25310 mv file1 orig
25311 tar xfv archive
25312 cmp orig file1
25313 )"
25314 echo comprec.at:25 >"$at_check_line_file"
25315
25316 at_trace_this=
25317 if test -n "$at_traceon"; then
25318     echo 'Not enabling shell tracing (command contains an embedded newline)'
25319 fi
25320
25321 if test -n "$at_trace_this"; then
25322     ( $at_traceon;
25323 mkdir oldgnu
25324 (cd oldgnu
25325 TEST_TAR_FORMAT=oldgnu
25326 export TEST_TAR_FORMAT
25327 TAR_OPTIONS="-H oldgnu"
25328 export TAR_OPTIONS
25329 rm -rf *
25330
25331
25332 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25333
25334 genfile --length 10240 --file file1
25335 echo "separator"
25336 tar cfz archive file1
25337 echo "separator"
25338 mv file1 orig
25339 tar xfv archive
25340 cmp orig file1
25341 ) ) >"$at_stdout" 2>"$at_stder1"
25342     at_status=$?
25343     grep '^ *+' "$at_stder1" >&2
25344     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25345 else
25346     ( :;
25347 mkdir oldgnu
25348 (cd oldgnu
25349 TEST_TAR_FORMAT=oldgnu
25350 export TEST_TAR_FORMAT
25351 TAR_OPTIONS="-H oldgnu"
25352 export TAR_OPTIONS
25353 rm -rf *
25354
25355
25356 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25357
25358 genfile --length 10240 --file file1
25359 echo "separator"
25360 tar cfz archive file1
25361 echo "separator"
25362 mv file1 orig
25363 tar xfv archive
25364 cmp orig file1
25365 ) ) >"$at_stdout" 2>"$at_stderr"
25366     at_status=$?
25367 fi
25368
25369 at_failed=false
25370 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25371 echo >>"$at_stdout"; echo "separator
25372 separator
25373 file1
25374 " | $at_diff - "$at_stdout" || at_failed=:
25375 case $at_status in
25376    77) echo 77 > "$at_status_file"; exit 77;;
25377    0) ;;
25378    *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
25379       at_failed=:;;
25380 esac
25381 if $at_failed; then
25382
25383
25384   echo 1 > "$at_status_file"
25385   exit 1
25386 fi
25387
25388 $at_traceon
25389 $at_traceoff
25390 echo "$at_srcdir/comprec.at:25:
25391 mkdir ustar
25392 (cd ustar
25393 TEST_TAR_FORMAT=ustar
25394 export TEST_TAR_FORMAT
25395 TAR_OPTIONS=\"-H ustar\"
25396 export TAR_OPTIONS
25397 rm -rf *
25398
25399
25400 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25401
25402 genfile --length 10240 --file file1
25403 echo \"separator\"
25404 tar cfz archive file1
25405 echo \"separator\"
25406 mv file1 orig
25407 tar xfv archive
25408 cmp orig file1
25409 )"
25410 echo comprec.at:25 >"$at_check_line_file"
25411
25412 at_trace_this=
25413 if test -n "$at_traceon"; then
25414     echo 'Not enabling shell tracing (command contains an embedded newline)'
25415 fi
25416
25417 if test -n "$at_trace_this"; then
25418     ( $at_traceon;
25419 mkdir ustar
25420 (cd ustar
25421 TEST_TAR_FORMAT=ustar
25422 export TEST_TAR_FORMAT
25423 TAR_OPTIONS="-H ustar"
25424 export TAR_OPTIONS
25425 rm -rf *
25426
25427
25428 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25429
25430 genfile --length 10240 --file file1
25431 echo "separator"
25432 tar cfz archive file1
25433 echo "separator"
25434 mv file1 orig
25435 tar xfv archive
25436 cmp orig file1
25437 ) ) >"$at_stdout" 2>"$at_stder1"
25438     at_status=$?
25439     grep '^ *+' "$at_stder1" >&2
25440     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25441 else
25442     ( :;
25443 mkdir ustar
25444 (cd ustar
25445 TEST_TAR_FORMAT=ustar
25446 export TEST_TAR_FORMAT
25447 TAR_OPTIONS="-H ustar"
25448 export TAR_OPTIONS
25449 rm -rf *
25450
25451
25452 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25453
25454 genfile --length 10240 --file file1
25455 echo "separator"
25456 tar cfz archive file1
25457 echo "separator"
25458 mv file1 orig
25459 tar xfv archive
25460 cmp orig file1
25461 ) ) >"$at_stdout" 2>"$at_stderr"
25462     at_status=$?
25463 fi
25464
25465 at_failed=false
25466 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25467 echo >>"$at_stdout"; echo "separator
25468 separator
25469 file1
25470 " | $at_diff - "$at_stdout" || at_failed=:
25471 case $at_status in
25472    77) echo 77 > "$at_status_file"; exit 77;;
25473    0) ;;
25474    *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
25475       at_failed=:;;
25476 esac
25477 if $at_failed; then
25478
25479
25480   echo 1 > "$at_status_file"
25481   exit 1
25482 fi
25483
25484 $at_traceon
25485 $at_traceoff
25486 echo "$at_srcdir/comprec.at:25:
25487 mkdir posix
25488 (cd posix
25489 TEST_TAR_FORMAT=posix
25490 export TEST_TAR_FORMAT
25491 TAR_OPTIONS=\"-H posix\"
25492 export TAR_OPTIONS
25493 rm -rf *
25494
25495
25496 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25497
25498 genfile --length 10240 --file file1
25499 echo \"separator\"
25500 tar cfz archive file1
25501 echo \"separator\"
25502 mv file1 orig
25503 tar xfv archive
25504 cmp orig file1
25505 )"
25506 echo comprec.at:25 >"$at_check_line_file"
25507
25508 at_trace_this=
25509 if test -n "$at_traceon"; then
25510     echo 'Not enabling shell tracing (command contains an embedded newline)'
25511 fi
25512
25513 if test -n "$at_trace_this"; then
25514     ( $at_traceon;
25515 mkdir posix
25516 (cd posix
25517 TEST_TAR_FORMAT=posix
25518 export TEST_TAR_FORMAT
25519 TAR_OPTIONS="-H posix"
25520 export TAR_OPTIONS
25521 rm -rf *
25522
25523
25524 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25525
25526 genfile --length 10240 --file file1
25527 echo "separator"
25528 tar cfz archive file1
25529 echo "separator"
25530 mv file1 orig
25531 tar xfv archive
25532 cmp orig file1
25533 ) ) >"$at_stdout" 2>"$at_stder1"
25534     at_status=$?
25535     grep '^ *+' "$at_stder1" >&2
25536     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25537 else
25538     ( :;
25539 mkdir posix
25540 (cd posix
25541 TEST_TAR_FORMAT=posix
25542 export TEST_TAR_FORMAT
25543 TAR_OPTIONS="-H posix"
25544 export TAR_OPTIONS
25545 rm -rf *
25546
25547
25548 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25549
25550 genfile --length 10240 --file file1
25551 echo "separator"
25552 tar cfz archive file1
25553 echo "separator"
25554 mv file1 orig
25555 tar xfv archive
25556 cmp orig file1
25557 ) ) >"$at_stdout" 2>"$at_stderr"
25558     at_status=$?
25559 fi
25560
25561 at_failed=false
25562 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25563 echo >>"$at_stdout"; echo "separator
25564 separator
25565 file1
25566 " | $at_diff - "$at_stdout" || at_failed=:
25567 case $at_status in
25568    77) echo 77 > "$at_status_file"; exit 77;;
25569    0) ;;
25570    *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
25571       at_failed=:;;
25572 esac
25573 if $at_failed; then
25574
25575
25576   echo 1 > "$at_status_file"
25577   exit 1
25578 fi
25579
25580 $at_traceon
25581 $at_traceoff
25582 echo "$at_srcdir/comprec.at:25:
25583 mkdir gnu
25584 (cd gnu
25585 TEST_TAR_FORMAT=gnu
25586 export TEST_TAR_FORMAT
25587 TAR_OPTIONS=\"-H gnu\"
25588 export TAR_OPTIONS
25589 rm -rf *
25590
25591
25592 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25593
25594 genfile --length 10240 --file file1
25595 echo \"separator\"
25596 tar cfz archive file1
25597 echo \"separator\"
25598 mv file1 orig
25599 tar xfv archive
25600 cmp orig file1
25601 )"
25602 echo comprec.at:25 >"$at_check_line_file"
25603
25604 at_trace_this=
25605 if test -n "$at_traceon"; then
25606     echo 'Not enabling shell tracing (command contains an embedded newline)'
25607 fi
25608
25609 if test -n "$at_trace_this"; then
25610     ( $at_traceon;
25611 mkdir gnu
25612 (cd gnu
25613 TEST_TAR_FORMAT=gnu
25614 export TEST_TAR_FORMAT
25615 TAR_OPTIONS="-H gnu"
25616 export TAR_OPTIONS
25617 rm -rf *
25618
25619
25620 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25621
25622 genfile --length 10240 --file file1
25623 echo "separator"
25624 tar cfz archive file1
25625 echo "separator"
25626 mv file1 orig
25627 tar xfv archive
25628 cmp orig file1
25629 ) ) >"$at_stdout" 2>"$at_stder1"
25630     at_status=$?
25631     grep '^ *+' "$at_stder1" >&2
25632     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25633 else
25634     ( :;
25635 mkdir gnu
25636 (cd gnu
25637 TEST_TAR_FORMAT=gnu
25638 export TEST_TAR_FORMAT
25639 TAR_OPTIONS="-H gnu"
25640 export TAR_OPTIONS
25641 rm -rf *
25642
25643
25644 cat /dev/null | gzip - > /dev/null 2>&1 || exit 77
25645
25646 genfile --length 10240 --file file1
25647 echo "separator"
25648 tar cfz archive file1
25649 echo "separator"
25650 mv file1 orig
25651 tar xfv archive
25652 cmp orig file1
25653 ) ) >"$at_stdout" 2>"$at_stderr"
25654     at_status=$?
25655 fi
25656
25657 at_failed=false
25658 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25659 echo >>"$at_stdout"; echo "separator
25660 separator
25661 file1
25662 " | $at_diff - "$at_stdout" || at_failed=:
25663 case $at_status in
25664    77) echo 77 > "$at_status_file"; exit 77;;
25665    0) ;;
25666    *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0"
25667       at_failed=:;;
25668 esac
25669 if $at_failed; then
25670
25671
25672   echo 1 > "$at_status_file"
25673   exit 1
25674 fi
25675
25676 $at_traceon
25677
25678
25679
25680       $at_traceoff
25681       $at_times_p && times >"$at_times_file"
25682     ) 5>&1 2>&1 | eval $at_tee_pipe
25683     at_status=`cat "$at_status_file"`
25684     ;;
25685
25686   65 ) # 65. shortfile.at:26: short input files
25687     at_setup_line='shortfile.at:26'
25688     at_desc="short input files"
25689     $at_quiet $ECHO_N " 65: short input files                              $ECHO_C"
25690     at_xfail=no
25691       test -f $XFAILFILE && at_xfail=yes
25692     echo "#                             -*- compilation -*-" >> "$at_group_log"
25693     (
25694       echo "65. shortfile.at:26: testing ..."
25695       $at_traceon
25696
25697
25698
25699
25700
25701   $at_traceoff
25702 echo "$at_srcdir/shortfile.at:29:
25703 mkdir gnu
25704 (cd gnu
25705 TEST_TAR_FORMAT=gnu
25706 export TEST_TAR_FORMAT
25707 TAR_OPTIONS=\"-H gnu\"
25708 export TAR_OPTIONS
25709 rm -rf *
25710
25711 genfile --length 511 --file foo || exit 5
25712 tar tf foo
25713 )"
25714 echo shortfile.at:29 >"$at_check_line_file"
25715
25716 at_trace_this=
25717 if test -n "$at_traceon"; then
25718     echo 'Not enabling shell tracing (command contains an embedded newline)'
25719 fi
25720
25721 if test -n "$at_trace_this"; then
25722     ( $at_traceon;
25723 mkdir gnu
25724 (cd gnu
25725 TEST_TAR_FORMAT=gnu
25726 export TEST_TAR_FORMAT
25727 TAR_OPTIONS="-H gnu"
25728 export TAR_OPTIONS
25729 rm -rf *
25730
25731 genfile --length 511 --file foo || exit 5
25732 tar tf foo
25733 ) ) >"$at_stdout" 2>"$at_stder1"
25734     at_status=$?
25735     grep '^ *+' "$at_stder1" >&2
25736     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25737 else
25738     ( :;
25739 mkdir gnu
25740 (cd gnu
25741 TEST_TAR_FORMAT=gnu
25742 export TEST_TAR_FORMAT
25743 TAR_OPTIONS="-H gnu"
25744 export TAR_OPTIONS
25745 rm -rf *
25746
25747 genfile --length 511 --file foo || exit 5
25748 tar tf foo
25749 ) ) >"$at_stdout" 2>"$at_stderr"
25750     at_status=$?
25751 fi
25752
25753 at_failed=false
25754 echo >>"$at_stderr"; echo "tar: This does not look like a tar archive
25755 tar: Error exit delayed from previous errors
25756 " | $at_diff - "$at_stderr" || at_failed=:
25757 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
25758 case $at_status in
25759    77) echo 77 > "$at_status_file"; exit 77;;
25760    2) ;;
25761    *) echo "$at_srcdir/shortfile.at:29: exit code was $at_status, expected 2"
25762       at_failed=:;;
25763 esac
25764 if $at_failed; then
25765
25766
25767   echo 1 > "$at_status_file"
25768   exit 1
25769 fi
25770
25771 $at_traceon
25772
25773
25774
25775       $at_traceoff
25776       $at_times_p && times >"$at_times_file"
25777     ) 5>&1 2>&1 | eval $at_tee_pipe
25778     at_status=`cat "$at_status_file"`
25779     ;;
25780
25781   66 ) # 66. shortupd.at:29: updating short archives
25782     at_setup_line='shortupd.at:29'
25783     at_desc="updating short archives"
25784     $at_quiet $ECHO_N " 66: updating short archives                        $ECHO_C"
25785     at_xfail=no
25786       test -f $XFAILFILE && at_xfail=yes
25787     echo "#                             -*- compilation -*-" >> "$at_group_log"
25788     (
25789       echo "66. shortupd.at:29: testing ..."
25790       $at_traceon
25791
25792
25793
25794
25795
25796   $at_traceoff
25797 echo "$at_srcdir/shortupd.at:32:
25798 mkdir v7
25799 (cd v7
25800 TEST_TAR_FORMAT=v7
25801 export TEST_TAR_FORMAT
25802 TAR_OPTIONS=\"-H v7\"
25803 export TAR_OPTIONS
25804 rm -rf *
25805
25806 touch foo
25807 tar uf archive foo
25808 )"
25809 echo shortupd.at:32 >"$at_check_line_file"
25810
25811 at_trace_this=
25812 if test -n "$at_traceon"; then
25813     echo 'Not enabling shell tracing (command contains an embedded newline)'
25814 fi
25815
25816 if test -n "$at_trace_this"; then
25817     ( $at_traceon;
25818 mkdir v7
25819 (cd v7
25820 TEST_TAR_FORMAT=v7
25821 export TEST_TAR_FORMAT
25822 TAR_OPTIONS="-H v7"
25823 export TAR_OPTIONS
25824 rm -rf *
25825
25826 touch foo
25827 tar uf archive foo
25828 ) ) >"$at_stdout" 2>"$at_stder1"
25829     at_status=$?
25830     grep '^ *+' "$at_stder1" >&2
25831     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25832 else
25833     ( :;
25834 mkdir v7
25835 (cd v7
25836 TEST_TAR_FORMAT=v7
25837 export TEST_TAR_FORMAT
25838 TAR_OPTIONS="-H v7"
25839 export TAR_OPTIONS
25840 rm -rf *
25841
25842 touch foo
25843 tar uf archive foo
25844 ) ) >"$at_stdout" 2>"$at_stderr"
25845     at_status=$?
25846 fi
25847
25848 at_failed=false
25849 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25850 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
25851 case $at_status in
25852    77) echo 77 > "$at_status_file"; exit 77;;
25853    0) ;;
25854    *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0"
25855       at_failed=:;;
25856 esac
25857 if $at_failed; then
25858
25859
25860   echo 1 > "$at_status_file"
25861   exit 1
25862 fi
25863
25864 $at_traceon
25865 $at_traceoff
25866 echo "$at_srcdir/shortupd.at:32:
25867 mkdir oldgnu
25868 (cd oldgnu
25869 TEST_TAR_FORMAT=oldgnu
25870 export TEST_TAR_FORMAT
25871 TAR_OPTIONS=\"-H oldgnu\"
25872 export TAR_OPTIONS
25873 rm -rf *
25874
25875 touch foo
25876 tar uf archive foo
25877 )"
25878 echo shortupd.at:32 >"$at_check_line_file"
25879
25880 at_trace_this=
25881 if test -n "$at_traceon"; then
25882     echo 'Not enabling shell tracing (command contains an embedded newline)'
25883 fi
25884
25885 if test -n "$at_trace_this"; then
25886     ( $at_traceon;
25887 mkdir oldgnu
25888 (cd oldgnu
25889 TEST_TAR_FORMAT=oldgnu
25890 export TEST_TAR_FORMAT
25891 TAR_OPTIONS="-H oldgnu"
25892 export TAR_OPTIONS
25893 rm -rf *
25894
25895 touch foo
25896 tar uf archive foo
25897 ) ) >"$at_stdout" 2>"$at_stder1"
25898     at_status=$?
25899     grep '^ *+' "$at_stder1" >&2
25900     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25901 else
25902     ( :;
25903 mkdir oldgnu
25904 (cd oldgnu
25905 TEST_TAR_FORMAT=oldgnu
25906 export TEST_TAR_FORMAT
25907 TAR_OPTIONS="-H oldgnu"
25908 export TAR_OPTIONS
25909 rm -rf *
25910
25911 touch foo
25912 tar uf archive foo
25913 ) ) >"$at_stdout" 2>"$at_stderr"
25914     at_status=$?
25915 fi
25916
25917 at_failed=false
25918 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25919 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
25920 case $at_status in
25921    77) echo 77 > "$at_status_file"; exit 77;;
25922    0) ;;
25923    *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0"
25924       at_failed=:;;
25925 esac
25926 if $at_failed; then
25927
25928
25929   echo 1 > "$at_status_file"
25930   exit 1
25931 fi
25932
25933 $at_traceon
25934 $at_traceoff
25935 echo "$at_srcdir/shortupd.at:32:
25936 mkdir ustar
25937 (cd ustar
25938 TEST_TAR_FORMAT=ustar
25939 export TEST_TAR_FORMAT
25940 TAR_OPTIONS=\"-H ustar\"
25941 export TAR_OPTIONS
25942 rm -rf *
25943
25944 touch foo
25945 tar uf archive foo
25946 )"
25947 echo shortupd.at:32 >"$at_check_line_file"
25948
25949 at_trace_this=
25950 if test -n "$at_traceon"; then
25951     echo 'Not enabling shell tracing (command contains an embedded newline)'
25952 fi
25953
25954 if test -n "$at_trace_this"; then
25955     ( $at_traceon;
25956 mkdir ustar
25957 (cd ustar
25958 TEST_TAR_FORMAT=ustar
25959 export TEST_TAR_FORMAT
25960 TAR_OPTIONS="-H ustar"
25961 export TAR_OPTIONS
25962 rm -rf *
25963
25964 touch foo
25965 tar uf archive foo
25966 ) ) >"$at_stdout" 2>"$at_stder1"
25967     at_status=$?
25968     grep '^ *+' "$at_stder1" >&2
25969     grep -v '^ *+' "$at_stder1" >"$at_stderr"
25970 else
25971     ( :;
25972 mkdir ustar
25973 (cd ustar
25974 TEST_TAR_FORMAT=ustar
25975 export TEST_TAR_FORMAT
25976 TAR_OPTIONS="-H ustar"
25977 export TAR_OPTIONS
25978 rm -rf *
25979
25980 touch foo
25981 tar uf archive foo
25982 ) ) >"$at_stdout" 2>"$at_stderr"
25983     at_status=$?
25984 fi
25985
25986 at_failed=false
25987 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
25988 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
25989 case $at_status in
25990    77) echo 77 > "$at_status_file"; exit 77;;
25991    0) ;;
25992    *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0"
25993       at_failed=:;;
25994 esac
25995 if $at_failed; then
25996
25997
25998   echo 1 > "$at_status_file"
25999   exit 1
26000 fi
26001
26002 $at_traceon
26003 $at_traceoff
26004 echo "$at_srcdir/shortupd.at:32:
26005 mkdir posix
26006 (cd posix
26007 TEST_TAR_FORMAT=posix
26008 export TEST_TAR_FORMAT
26009 TAR_OPTIONS=\"-H posix\"
26010 export TAR_OPTIONS
26011 rm -rf *
26012
26013 touch foo
26014 tar uf archive foo
26015 )"
26016 echo shortupd.at:32 >"$at_check_line_file"
26017
26018 at_trace_this=
26019 if test -n "$at_traceon"; then
26020     echo 'Not enabling shell tracing (command contains an embedded newline)'
26021 fi
26022
26023 if test -n "$at_trace_this"; then
26024     ( $at_traceon;
26025 mkdir posix
26026 (cd posix
26027 TEST_TAR_FORMAT=posix
26028 export TEST_TAR_FORMAT
26029 TAR_OPTIONS="-H posix"
26030 export TAR_OPTIONS
26031 rm -rf *
26032
26033 touch foo
26034 tar uf archive foo
26035 ) ) >"$at_stdout" 2>"$at_stder1"
26036     at_status=$?
26037     grep '^ *+' "$at_stder1" >&2
26038     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26039 else
26040     ( :;
26041 mkdir posix
26042 (cd posix
26043 TEST_TAR_FORMAT=posix
26044 export TEST_TAR_FORMAT
26045 TAR_OPTIONS="-H posix"
26046 export TAR_OPTIONS
26047 rm -rf *
26048
26049 touch foo
26050 tar uf archive foo
26051 ) ) >"$at_stdout" 2>"$at_stderr"
26052     at_status=$?
26053 fi
26054
26055 at_failed=false
26056 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
26057 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
26058 case $at_status in
26059    77) echo 77 > "$at_status_file"; exit 77;;
26060    0) ;;
26061    *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0"
26062       at_failed=:;;
26063 esac
26064 if $at_failed; then
26065
26066
26067   echo 1 > "$at_status_file"
26068   exit 1
26069 fi
26070
26071 $at_traceon
26072 $at_traceoff
26073 echo "$at_srcdir/shortupd.at:32:
26074 mkdir gnu
26075 (cd gnu
26076 TEST_TAR_FORMAT=gnu
26077 export TEST_TAR_FORMAT
26078 TAR_OPTIONS=\"-H gnu\"
26079 export TAR_OPTIONS
26080 rm -rf *
26081
26082 touch foo
26083 tar uf archive foo
26084 )"
26085 echo shortupd.at:32 >"$at_check_line_file"
26086
26087 at_trace_this=
26088 if test -n "$at_traceon"; then
26089     echo 'Not enabling shell tracing (command contains an embedded newline)'
26090 fi
26091
26092 if test -n "$at_trace_this"; then
26093     ( $at_traceon;
26094 mkdir gnu
26095 (cd gnu
26096 TEST_TAR_FORMAT=gnu
26097 export TEST_TAR_FORMAT
26098 TAR_OPTIONS="-H gnu"
26099 export TAR_OPTIONS
26100 rm -rf *
26101
26102 touch foo
26103 tar uf archive foo
26104 ) ) >"$at_stdout" 2>"$at_stder1"
26105     at_status=$?
26106     grep '^ *+' "$at_stder1" >&2
26107     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26108 else
26109     ( :;
26110 mkdir gnu
26111 (cd gnu
26112 TEST_TAR_FORMAT=gnu
26113 export TEST_TAR_FORMAT
26114 TAR_OPTIONS="-H gnu"
26115 export TAR_OPTIONS
26116 rm -rf *
26117
26118 touch foo
26119 tar uf archive foo
26120 ) ) >"$at_stdout" 2>"$at_stderr"
26121     at_status=$?
26122 fi
26123
26124 at_failed=false
26125 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
26126 $at_diff "$at_devnull" "$at_stdout" || at_failed=:
26127 case $at_status in
26128    77) echo 77 > "$at_status_file"; exit 77;;
26129    0) ;;
26130    *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0"
26131       at_failed=:;;
26132 esac
26133 if $at_failed; then
26134
26135
26136   echo 1 > "$at_status_file"
26137   exit 1
26138 fi
26139
26140 $at_traceon
26141
26142
26143
26144       $at_traceoff
26145       $at_times_p && times >"$at_times_file"
26146     ) 5>&1 2>&1 | eval $at_tee_pipe
26147     at_status=`cat "$at_status_file"`
26148     ;;
26149
26150   67 ) # 67. truncate.at:29: truncate
26151     at_setup_line='truncate.at:29'
26152     at_desc="truncate"
26153     $at_quiet $ECHO_N " 67: truncate                                       $ECHO_C"
26154     at_xfail=no
26155       test -f $XFAILFILE && at_xfail=yes
26156     echo "#                             -*- compilation -*-" >> "$at_group_log"
26157     (
26158       echo "67. truncate.at:29: testing ..."
26159       $at_traceon
26160
26161
26162
26163
26164
26165   $at_traceoff
26166 echo "$at_srcdir/truncate.at:32:
26167 mkdir v7
26168 (cd v7
26169 TEST_TAR_FORMAT=v7
26170 export TEST_TAR_FORMAT
26171 TAR_OPTIONS=\"-H v7\"
26172 export TAR_OPTIONS
26173 rm -rf *
26174
26175 genfile --file foo --length 50000k
26176 genfile --file baz
26177 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26178 echo Exit status: \$?
26179 echo separator
26180 sleep 1
26181 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26182 tar dvf bar)"
26183 echo truncate.at:32 >"$at_check_line_file"
26184
26185 at_trace_this=
26186 if test -n "$at_traceon"; then
26187     echo 'Not enabling shell tracing (command contains an embedded newline)'
26188 fi
26189
26190 if test -n "$at_trace_this"; then
26191     ( $at_traceon;
26192 mkdir v7
26193 (cd v7
26194 TEST_TAR_FORMAT=v7
26195 export TEST_TAR_FORMAT
26196 TAR_OPTIONS="-H v7"
26197 export TAR_OPTIONS
26198 rm -rf *
26199
26200 genfile --file foo --length 50000k
26201 genfile --file baz
26202 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26203 echo Exit status: $?
26204 echo separator
26205 sleep 1
26206 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26207 tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
26208     at_status=$?
26209     grep '^ *+' "$at_stder1" >&2
26210     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26211 else
26212     ( :;
26213 mkdir v7
26214 (cd v7
26215 TEST_TAR_FORMAT=v7
26216 export TEST_TAR_FORMAT
26217 TAR_OPTIONS="-H v7"
26218 export TAR_OPTIONS
26219 rm -rf *
26220
26221 genfile --file foo --length 50000k
26222 genfile --file baz
26223 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26224 echo Exit status: $?
26225 echo separator
26226 sleep 1
26227 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26228 tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
26229     at_status=$?
26230 fi
26231
26232 at_failed=false
26233 echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
26234 " | $at_diff - "$at_stderr" || at_failed=:
26235 echo >>"$at_stdout"; echo "foo
26236 baz
26237 Exit status: 1
26238 separator
26239 foo
26240 foo: Mod time differs
26241 baz
26242 " | $at_diff - "$at_stdout" || at_failed=:
26243 case $at_status in
26244    77) echo 77 > "$at_status_file"; exit 77;;
26245    1) ;;
26246    *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
26247       at_failed=:;;
26248 esac
26249 if $at_failed; then
26250
26251
26252   echo 1 > "$at_status_file"
26253   exit 1
26254 fi
26255
26256 $at_traceon
26257 $at_traceoff
26258 echo "$at_srcdir/truncate.at:32:
26259 mkdir oldgnu
26260 (cd oldgnu
26261 TEST_TAR_FORMAT=oldgnu
26262 export TEST_TAR_FORMAT
26263 TAR_OPTIONS=\"-H oldgnu\"
26264 export TAR_OPTIONS
26265 rm -rf *
26266
26267 genfile --file foo --length 50000k
26268 genfile --file baz
26269 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26270 echo Exit status: \$?
26271 echo separator
26272 sleep 1
26273 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26274 tar dvf bar)"
26275 echo truncate.at:32 >"$at_check_line_file"
26276
26277 at_trace_this=
26278 if test -n "$at_traceon"; then
26279     echo 'Not enabling shell tracing (command contains an embedded newline)'
26280 fi
26281
26282 if test -n "$at_trace_this"; then
26283     ( $at_traceon;
26284 mkdir oldgnu
26285 (cd oldgnu
26286 TEST_TAR_FORMAT=oldgnu
26287 export TEST_TAR_FORMAT
26288 TAR_OPTIONS="-H oldgnu"
26289 export TAR_OPTIONS
26290 rm -rf *
26291
26292 genfile --file foo --length 50000k
26293 genfile --file baz
26294 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26295 echo Exit status: $?
26296 echo separator
26297 sleep 1
26298 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26299 tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
26300     at_status=$?
26301     grep '^ *+' "$at_stder1" >&2
26302     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26303 else
26304     ( :;
26305 mkdir oldgnu
26306 (cd oldgnu
26307 TEST_TAR_FORMAT=oldgnu
26308 export TEST_TAR_FORMAT
26309 TAR_OPTIONS="-H oldgnu"
26310 export TAR_OPTIONS
26311 rm -rf *
26312
26313 genfile --file foo --length 50000k
26314 genfile --file baz
26315 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26316 echo Exit status: $?
26317 echo separator
26318 sleep 1
26319 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26320 tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
26321     at_status=$?
26322 fi
26323
26324 at_failed=false
26325 echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
26326 " | $at_diff - "$at_stderr" || at_failed=:
26327 echo >>"$at_stdout"; echo "foo
26328 baz
26329 Exit status: 1
26330 separator
26331 foo
26332 foo: Mod time differs
26333 baz
26334 " | $at_diff - "$at_stdout" || at_failed=:
26335 case $at_status in
26336    77) echo 77 > "$at_status_file"; exit 77;;
26337    1) ;;
26338    *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
26339       at_failed=:;;
26340 esac
26341 if $at_failed; then
26342
26343
26344   echo 1 > "$at_status_file"
26345   exit 1
26346 fi
26347
26348 $at_traceon
26349 $at_traceoff
26350 echo "$at_srcdir/truncate.at:32:
26351 mkdir ustar
26352 (cd ustar
26353 TEST_TAR_FORMAT=ustar
26354 export TEST_TAR_FORMAT
26355 TAR_OPTIONS=\"-H ustar\"
26356 export TAR_OPTIONS
26357 rm -rf *
26358
26359 genfile --file foo --length 50000k
26360 genfile --file baz
26361 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26362 echo Exit status: \$?
26363 echo separator
26364 sleep 1
26365 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26366 tar dvf bar)"
26367 echo truncate.at:32 >"$at_check_line_file"
26368
26369 at_trace_this=
26370 if test -n "$at_traceon"; then
26371     echo 'Not enabling shell tracing (command contains an embedded newline)'
26372 fi
26373
26374 if test -n "$at_trace_this"; then
26375     ( $at_traceon;
26376 mkdir ustar
26377 (cd ustar
26378 TEST_TAR_FORMAT=ustar
26379 export TEST_TAR_FORMAT
26380 TAR_OPTIONS="-H ustar"
26381 export TAR_OPTIONS
26382 rm -rf *
26383
26384 genfile --file foo --length 50000k
26385 genfile --file baz
26386 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26387 echo Exit status: $?
26388 echo separator
26389 sleep 1
26390 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26391 tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
26392     at_status=$?
26393     grep '^ *+' "$at_stder1" >&2
26394     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26395 else
26396     ( :;
26397 mkdir ustar
26398 (cd ustar
26399 TEST_TAR_FORMAT=ustar
26400 export TEST_TAR_FORMAT
26401 TAR_OPTIONS="-H ustar"
26402 export TAR_OPTIONS
26403 rm -rf *
26404
26405 genfile --file foo --length 50000k
26406 genfile --file baz
26407 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26408 echo Exit status: $?
26409 echo separator
26410 sleep 1
26411 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26412 tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
26413     at_status=$?
26414 fi
26415
26416 at_failed=false
26417 echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
26418 " | $at_diff - "$at_stderr" || at_failed=:
26419 echo >>"$at_stdout"; echo "foo
26420 baz
26421 Exit status: 1
26422 separator
26423 foo
26424 foo: Mod time differs
26425 baz
26426 " | $at_diff - "$at_stdout" || at_failed=:
26427 case $at_status in
26428    77) echo 77 > "$at_status_file"; exit 77;;
26429    1) ;;
26430    *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
26431       at_failed=:;;
26432 esac
26433 if $at_failed; then
26434
26435
26436   echo 1 > "$at_status_file"
26437   exit 1
26438 fi
26439
26440 $at_traceon
26441 $at_traceoff
26442 echo "$at_srcdir/truncate.at:32:
26443 mkdir posix
26444 (cd posix
26445 TEST_TAR_FORMAT=posix
26446 export TEST_TAR_FORMAT
26447 TAR_OPTIONS=\"-H posix\"
26448 export TAR_OPTIONS
26449 rm -rf *
26450
26451 genfile --file foo --length 50000k
26452 genfile --file baz
26453 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26454 echo Exit status: \$?
26455 echo separator
26456 sleep 1
26457 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26458 tar dvf bar)"
26459 echo truncate.at:32 >"$at_check_line_file"
26460
26461 at_trace_this=
26462 if test -n "$at_traceon"; then
26463     echo 'Not enabling shell tracing (command contains an embedded newline)'
26464 fi
26465
26466 if test -n "$at_trace_this"; then
26467     ( $at_traceon;
26468 mkdir posix
26469 (cd posix
26470 TEST_TAR_FORMAT=posix
26471 export TEST_TAR_FORMAT
26472 TAR_OPTIONS="-H posix"
26473 export TAR_OPTIONS
26474 rm -rf *
26475
26476 genfile --file foo --length 50000k
26477 genfile --file baz
26478 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26479 echo Exit status: $?
26480 echo separator
26481 sleep 1
26482 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26483 tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
26484     at_status=$?
26485     grep '^ *+' "$at_stder1" >&2
26486     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26487 else
26488     ( :;
26489 mkdir posix
26490 (cd posix
26491 TEST_TAR_FORMAT=posix
26492 export TEST_TAR_FORMAT
26493 TAR_OPTIONS="-H posix"
26494 export TAR_OPTIONS
26495 rm -rf *
26496
26497 genfile --file foo --length 50000k
26498 genfile --file baz
26499 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26500 echo Exit status: $?
26501 echo separator
26502 sleep 1
26503 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26504 tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
26505     at_status=$?
26506 fi
26507
26508 at_failed=false
26509 echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
26510 " | $at_diff - "$at_stderr" || at_failed=:
26511 echo >>"$at_stdout"; echo "foo
26512 baz
26513 Exit status: 1
26514 separator
26515 foo
26516 foo: Mod time differs
26517 baz
26518 " | $at_diff - "$at_stdout" || at_failed=:
26519 case $at_status in
26520    77) echo 77 > "$at_status_file"; exit 77;;
26521    1) ;;
26522    *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
26523       at_failed=:;;
26524 esac
26525 if $at_failed; then
26526
26527
26528   echo 1 > "$at_status_file"
26529   exit 1
26530 fi
26531
26532 $at_traceon
26533 $at_traceoff
26534 echo "$at_srcdir/truncate.at:32:
26535 mkdir gnu
26536 (cd gnu
26537 TEST_TAR_FORMAT=gnu
26538 export TEST_TAR_FORMAT
26539 TAR_OPTIONS=\"-H gnu\"
26540 export TAR_OPTIONS
26541 rm -rf *
26542
26543 genfile --file foo --length 50000k
26544 genfile --file baz
26545 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26546 echo Exit status: \$?
26547 echo separator
26548 sleep 1
26549 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26550 tar dvf bar)"
26551 echo truncate.at:32 >"$at_check_line_file"
26552
26553 at_trace_this=
26554 if test -n "$at_traceon"; then
26555     echo 'Not enabling shell tracing (command contains an embedded newline)'
26556 fi
26557
26558 if test -n "$at_trace_this"; then
26559     ( $at_traceon;
26560 mkdir gnu
26561 (cd gnu
26562 TEST_TAR_FORMAT=gnu
26563 export TEST_TAR_FORMAT
26564 TAR_OPTIONS="-H gnu"
26565 export TAR_OPTIONS
26566 rm -rf *
26567
26568 genfile --file foo --length 50000k
26569 genfile --file baz
26570 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26571 echo Exit status: $?
26572 echo separator
26573 sleep 1
26574 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26575 tar dvf bar) ) >"$at_stdout" 2>"$at_stder1"
26576     at_status=$?
26577     grep '^ *+' "$at_stder1" >&2
26578     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26579 else
26580     ( :;
26581 mkdir gnu
26582 (cd gnu
26583 TEST_TAR_FORMAT=gnu
26584 export TEST_TAR_FORMAT
26585 TAR_OPTIONS="-H gnu"
26586 export TAR_OPTIONS
26587 rm -rf *
26588
26589 genfile --file foo --length 50000k
26590 genfile --file baz
26591 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo
26592 echo Exit status: $?
26593 echo separator
26594 sleep 1
26595 genfile --file foo --seek 49995k --length 5k --pattern=zeros
26596 tar dvf bar) ) >"$at_stdout" 2>"$at_stderr"
26597     at_status=$?
26598 fi
26599
26600 at_failed=false
26601 echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros
26602 " | $at_diff - "$at_stderr" || at_failed=:
26603 echo >>"$at_stdout"; echo "foo
26604 baz
26605 Exit status: 1
26606 separator
26607 foo
26608 foo: Mod time differs
26609 baz
26610 " | $at_diff - "$at_stdout" || at_failed=:
26611 case $at_status in
26612    77) echo 77 > "$at_status_file"; exit 77;;
26613    1) ;;
26614    *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1"
26615       at_failed=:;;
26616 esac
26617 if $at_failed; then
26618
26619
26620   echo 1 > "$at_status_file"
26621   exit 1
26622 fi
26623
26624 $at_traceon
26625
26626
26627
26628       $at_traceoff
26629       $at_times_p && times >"$at_times_file"
26630     ) 5>&1 2>&1 | eval $at_tee_pipe
26631     at_status=`cat "$at_status_file"`
26632     ;;
26633
26634   68 ) # 68. grow.at:24: grow
26635     at_setup_line='grow.at:24'
26636     at_desc="grow"
26637     $at_quiet $ECHO_N " 68: grow                                           $ECHO_C"
26638     at_xfail=no
26639       test -f $XFAILFILE && at_xfail=yes
26640     echo "#                             -*- compilation -*-" >> "$at_group_log"
26641     (
26642       echo "68. grow.at:24: testing ..."
26643       $at_traceon
26644
26645
26646
26647
26648
26649   $at_traceoff
26650 echo "$at_srcdir/grow.at:27:
26651 mkdir v7
26652 (cd v7
26653 TEST_TAR_FORMAT=v7
26654 export TEST_TAR_FORMAT
26655 TAR_OPTIONS=\"-H v7\"
26656 export TAR_OPTIONS
26657 rm -rf *
26658
26659 genfile --file foo --length 50000k
26660 genfile --file baz
26661 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
26662         --append foo
26663 )"
26664 echo grow.at:27 >"$at_check_line_file"
26665
26666 at_trace_this=
26667 if test -n "$at_traceon"; then
26668     echo 'Not enabling shell tracing (command contains an embedded newline)'
26669 fi
26670
26671 if test -n "$at_trace_this"; then
26672     ( $at_traceon;
26673 mkdir v7
26674 (cd v7
26675 TEST_TAR_FORMAT=v7
26676 export TEST_TAR_FORMAT
26677 TAR_OPTIONS="-H v7"
26678 export TAR_OPTIONS
26679 rm -rf *
26680
26681 genfile --file foo --length 50000k
26682 genfile --file baz
26683 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
26684         --append foo
26685 ) ) >"$at_stdout" 2>"$at_stder1"
26686     at_status=$?
26687     grep '^ *+' "$at_stder1" >&2
26688     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26689 else
26690     ( :;
26691 mkdir v7
26692 (cd v7
26693 TEST_TAR_FORMAT=v7
26694 export TEST_TAR_FORMAT
26695 TAR_OPTIONS="-H v7"
26696 export TAR_OPTIONS
26697 rm -rf *
26698
26699 genfile --file foo --length 50000k
26700 genfile --file baz
26701 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
26702         --append foo
26703 ) ) >"$at_stdout" 2>"$at_stderr"
26704     at_status=$?
26705 fi
26706
26707 at_failed=false
26708 echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
26709 " | $at_diff - "$at_stderr" || at_failed=:
26710 echo >>"$at_stdout"; echo "foo
26711 baz
26712 " | $at_diff - "$at_stdout" || at_failed=:
26713 case $at_status in
26714    77) echo 77 > "$at_status_file"; exit 77;;
26715    1) ;;
26716    *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
26717       at_failed=:;;
26718 esac
26719 if $at_failed; then
26720
26721
26722   echo 1 > "$at_status_file"
26723   exit 1
26724 fi
26725
26726 $at_traceon
26727 $at_traceoff
26728 echo "$at_srcdir/grow.at:27:
26729 mkdir oldgnu
26730 (cd oldgnu
26731 TEST_TAR_FORMAT=oldgnu
26732 export TEST_TAR_FORMAT
26733 TAR_OPTIONS=\"-H oldgnu\"
26734 export TAR_OPTIONS
26735 rm -rf *
26736
26737 genfile --file foo --length 50000k
26738 genfile --file baz
26739 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
26740         --append foo
26741 )"
26742 echo grow.at:27 >"$at_check_line_file"
26743
26744 at_trace_this=
26745 if test -n "$at_traceon"; then
26746     echo 'Not enabling shell tracing (command contains an embedded newline)'
26747 fi
26748
26749 if test -n "$at_trace_this"; then
26750     ( $at_traceon;
26751 mkdir oldgnu
26752 (cd oldgnu
26753 TEST_TAR_FORMAT=oldgnu
26754 export TEST_TAR_FORMAT
26755 TAR_OPTIONS="-H oldgnu"
26756 export TAR_OPTIONS
26757 rm -rf *
26758
26759 genfile --file foo --length 50000k
26760 genfile --file baz
26761 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
26762         --append foo
26763 ) ) >"$at_stdout" 2>"$at_stder1"
26764     at_status=$?
26765     grep '^ *+' "$at_stder1" >&2
26766     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26767 else
26768     ( :;
26769 mkdir oldgnu
26770 (cd oldgnu
26771 TEST_TAR_FORMAT=oldgnu
26772 export TEST_TAR_FORMAT
26773 TAR_OPTIONS="-H oldgnu"
26774 export TAR_OPTIONS
26775 rm -rf *
26776
26777 genfile --file foo --length 50000k
26778 genfile --file baz
26779 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
26780         --append foo
26781 ) ) >"$at_stdout" 2>"$at_stderr"
26782     at_status=$?
26783 fi
26784
26785 at_failed=false
26786 echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
26787 " | $at_diff - "$at_stderr" || at_failed=:
26788 echo >>"$at_stdout"; echo "foo
26789 baz
26790 " | $at_diff - "$at_stdout" || at_failed=:
26791 case $at_status in
26792    77) echo 77 > "$at_status_file"; exit 77;;
26793    1) ;;
26794    *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
26795       at_failed=:;;
26796 esac
26797 if $at_failed; then
26798
26799
26800   echo 1 > "$at_status_file"
26801   exit 1
26802 fi
26803
26804 $at_traceon
26805 $at_traceoff
26806 echo "$at_srcdir/grow.at:27:
26807 mkdir ustar
26808 (cd ustar
26809 TEST_TAR_FORMAT=ustar
26810 export TEST_TAR_FORMAT
26811 TAR_OPTIONS=\"-H ustar\"
26812 export TAR_OPTIONS
26813 rm -rf *
26814
26815 genfile --file foo --length 50000k
26816 genfile --file baz
26817 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
26818         --append foo
26819 )"
26820 echo grow.at:27 >"$at_check_line_file"
26821
26822 at_trace_this=
26823 if test -n "$at_traceon"; then
26824     echo 'Not enabling shell tracing (command contains an embedded newline)'
26825 fi
26826
26827 if test -n "$at_trace_this"; then
26828     ( $at_traceon;
26829 mkdir ustar
26830 (cd ustar
26831 TEST_TAR_FORMAT=ustar
26832 export TEST_TAR_FORMAT
26833 TAR_OPTIONS="-H ustar"
26834 export TAR_OPTIONS
26835 rm -rf *
26836
26837 genfile --file foo --length 50000k
26838 genfile --file baz
26839 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
26840         --append foo
26841 ) ) >"$at_stdout" 2>"$at_stder1"
26842     at_status=$?
26843     grep '^ *+' "$at_stder1" >&2
26844     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26845 else
26846     ( :;
26847 mkdir ustar
26848 (cd ustar
26849 TEST_TAR_FORMAT=ustar
26850 export TEST_TAR_FORMAT
26851 TAR_OPTIONS="-H ustar"
26852 export TAR_OPTIONS
26853 rm -rf *
26854
26855 genfile --file foo --length 50000k
26856 genfile --file baz
26857 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
26858         --append foo
26859 ) ) >"$at_stdout" 2>"$at_stderr"
26860     at_status=$?
26861 fi
26862
26863 at_failed=false
26864 echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
26865 " | $at_diff - "$at_stderr" || at_failed=:
26866 echo >>"$at_stdout"; echo "foo
26867 baz
26868 " | $at_diff - "$at_stdout" || at_failed=:
26869 case $at_status in
26870    77) echo 77 > "$at_status_file"; exit 77;;
26871    1) ;;
26872    *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
26873       at_failed=:;;
26874 esac
26875 if $at_failed; then
26876
26877
26878   echo 1 > "$at_status_file"
26879   exit 1
26880 fi
26881
26882 $at_traceon
26883 $at_traceoff
26884 echo "$at_srcdir/grow.at:27:
26885 mkdir posix
26886 (cd posix
26887 TEST_TAR_FORMAT=posix
26888 export TEST_TAR_FORMAT
26889 TAR_OPTIONS=\"-H posix\"
26890 export TAR_OPTIONS
26891 rm -rf *
26892
26893 genfile --file foo --length 50000k
26894 genfile --file baz
26895 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
26896         --append foo
26897 )"
26898 echo grow.at:27 >"$at_check_line_file"
26899
26900 at_trace_this=
26901 if test -n "$at_traceon"; then
26902     echo 'Not enabling shell tracing (command contains an embedded newline)'
26903 fi
26904
26905 if test -n "$at_trace_this"; then
26906     ( $at_traceon;
26907 mkdir posix
26908 (cd posix
26909 TEST_TAR_FORMAT=posix
26910 export TEST_TAR_FORMAT
26911 TAR_OPTIONS="-H posix"
26912 export TAR_OPTIONS
26913 rm -rf *
26914
26915 genfile --file foo --length 50000k
26916 genfile --file baz
26917 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
26918         --append foo
26919 ) ) >"$at_stdout" 2>"$at_stder1"
26920     at_status=$?
26921     grep '^ *+' "$at_stder1" >&2
26922     grep -v '^ *+' "$at_stder1" >"$at_stderr"
26923 else
26924     ( :;
26925 mkdir posix
26926 (cd posix
26927 TEST_TAR_FORMAT=posix
26928 export TEST_TAR_FORMAT
26929 TAR_OPTIONS="-H posix"
26930 export TAR_OPTIONS
26931 rm -rf *
26932
26933 genfile --file foo --length 50000k
26934 genfile --file baz
26935 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
26936         --append foo
26937 ) ) >"$at_stdout" 2>"$at_stderr"
26938     at_status=$?
26939 fi
26940
26941 at_failed=false
26942 echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
26943 " | $at_diff - "$at_stderr" || at_failed=:
26944 echo >>"$at_stdout"; echo "foo
26945 baz
26946 " | $at_diff - "$at_stdout" || at_failed=:
26947 case $at_status in
26948    77) echo 77 > "$at_status_file"; exit 77;;
26949    1) ;;
26950    *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
26951       at_failed=:;;
26952 esac
26953 if $at_failed; then
26954
26955
26956   echo 1 > "$at_status_file"
26957   exit 1
26958 fi
26959
26960 $at_traceon
26961 $at_traceoff
26962 echo "$at_srcdir/grow.at:27:
26963 mkdir gnu
26964 (cd gnu
26965 TEST_TAR_FORMAT=gnu
26966 export TEST_TAR_FORMAT
26967 TAR_OPTIONS=\"-H gnu\"
26968 export TAR_OPTIONS
26969 rm -rf *
26970
26971 genfile --file foo --length 50000k
26972 genfile --file baz
26973 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\
26974         --append foo
26975 )"
26976 echo grow.at:27 >"$at_check_line_file"
26977
26978 at_trace_this=
26979 if test -n "$at_traceon"; then
26980     echo 'Not enabling shell tracing (command contains an embedded newline)'
26981 fi
26982
26983 if test -n "$at_trace_this"; then
26984     ( $at_traceon;
26985 mkdir gnu
26986 (cd gnu
26987 TEST_TAR_FORMAT=gnu
26988 export TEST_TAR_FORMAT
26989 TAR_OPTIONS="-H gnu"
26990 export TAR_OPTIONS
26991 rm -rf *
26992
26993 genfile --file foo --length 50000k
26994 genfile --file baz
26995 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
26996         --append foo
26997 ) ) >"$at_stdout" 2>"$at_stder1"
26998     at_status=$?
26999     grep '^ *+' "$at_stder1" >&2
27000     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27001 else
27002     ( :;
27003 mkdir gnu
27004 (cd gnu
27005 TEST_TAR_FORMAT=gnu
27006 export TEST_TAR_FORMAT
27007 TAR_OPTIONS="-H gnu"
27008 export TAR_OPTIONS
27009 rm -rf *
27010
27011 genfile --file foo --length 50000k
27012 genfile --file baz
27013 genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \
27014         --append foo
27015 ) ) >"$at_stdout" 2>"$at_stderr"
27016     at_status=$?
27017 fi
27018
27019 at_failed=false
27020 echo >>"$at_stderr"; echo "tar: foo: file changed as we read it
27021 " | $at_diff - "$at_stderr" || at_failed=:
27022 echo >>"$at_stdout"; echo "foo
27023 baz
27024 " | $at_diff - "$at_stdout" || at_failed=:
27025 case $at_status in
27026    77) echo 77 > "$at_status_file"; exit 77;;
27027    1) ;;
27028    *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1"
27029       at_failed=:;;
27030 esac
27031 if $at_failed; then
27032
27033
27034   echo 1 > "$at_status_file"
27035   exit 1
27036 fi
27037
27038 $at_traceon
27039
27040
27041
27042       $at_traceoff
27043       $at_times_p && times >"$at_times_file"
27044     ) 5>&1 2>&1 | eval $at_tee_pipe
27045     at_status=`cat "$at_status_file"`
27046     ;;
27047
27048   69 ) # 69. gtarfail.at:21: gtarfail
27049     at_setup_line='gtarfail.at:21'
27050     at_desc="gtarfail"
27051     $at_quiet $ECHO_N " 69: gtarfail                                       $ECHO_C"
27052     at_xfail=no
27053     echo "#                             -*- compilation -*-" >> "$at_group_log"
27054     (
27055       echo "69. gtarfail.at:21: testing ..."
27056       $at_traceon
27057
27058
27059
27060 unset TAR_OPTIONS
27061
27062 $at_traceoff
27063 echo "$at_srcdir/gtarfail.at:26:
27064
27065 test -z "$STAR_TESTSCRIPTS" && exit 77
27066 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27067
27068
27069 tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail.tar
27070 "
27071 echo gtarfail.at:26 >"$at_check_line_file"
27072
27073 at_trace_this=
27074 if test -n "$at_traceon"; then
27075     echo 'Not enabling shell tracing (command contains an embedded newline)'
27076 fi
27077
27078 if test -n "$at_trace_this"; then
27079     ( $at_traceon;
27080
27081 test -z "$STAR_TESTSCRIPTS" && exit 77
27082 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27083
27084
27085 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
27086  ) >"$at_stdout" 2>"$at_stder1"
27087     at_status=$?
27088     grep '^ *+' "$at_stder1" >&2
27089     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27090 else
27091     ( :;
27092
27093 test -z "$STAR_TESTSCRIPTS" && exit 77
27094 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27095
27096
27097 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
27098  ) >"$at_stdout" 2>"$at_stderr"
27099     at_status=$?
27100 fi
27101
27102 at_failed=false
27103 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27104 echo >>"$at_stdout"; echo "-rw-r--r-- jes/glone       518 2001-05-25 14:41 vedpowered.gif
27105 -rw-r--r-- jes/glone      6825 1997-04-29 00:19 cd.gif
27106 -rw-r--r-- jes/glone     33354 1999-06-22 12:17 DSCN0049c.JPG
27107 -rw-r--r-- jes/glone     86159 2001-06-05 18:16 Window1.jpg
27108 -rw-r--r-- jes/glone      1310 2001-05-25 13:05 vipower.gif
27109 -rw-rw-rw- jes/glone    148753 1998-09-15 13:08 billyboy.jpg
27110 " | $at_diff - "$at_stdout" || at_failed=:
27111 case $at_status in
27112    77) echo 77 > "$at_status_file"; exit 77;;
27113    0) ;;
27114    *) echo "$at_srcdir/gtarfail.at:26: exit code was $at_status, expected 0"
27115       at_failed=:;;
27116 esac
27117 if $at_failed; then
27118
27119
27120   echo 1 > "$at_status_file"
27121   exit 1
27122 fi
27123
27124 $at_traceon
27125
27126
27127       $at_traceoff
27128       $at_times_p && times >"$at_times_file"
27129     ) 5>&1 2>&1 | eval $at_tee_pipe
27130     at_status=`cat "$at_status_file"`
27131     ;;
27132
27133   70 ) # 70. gtarfail2.at:21: gtarfail2
27134     at_setup_line='gtarfail2.at:21'
27135     at_desc="gtarfail2"
27136     $at_quiet $ECHO_N " 70: gtarfail2                                      $ECHO_C"
27137     at_xfail=no
27138     echo "#                             -*- compilation -*-" >> "$at_group_log"
27139     (
27140       echo "70. gtarfail2.at:21: testing ..."
27141       $at_traceon
27142
27143
27144
27145 unset TAR_OPTIONS
27146
27147 $at_traceoff
27148 echo "$at_srcdir/gtarfail2.at:26:
27149
27150 test -z "$STAR_TESTSCRIPTS" && exit 77
27151 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27152
27153 tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail2.tar
27154 "
27155 echo gtarfail2.at:26 >"$at_check_line_file"
27156
27157 at_trace_this=
27158 if test -n "$at_traceon"; then
27159     echo 'Not enabling shell tracing (command contains an embedded newline)'
27160 fi
27161
27162 if test -n "$at_trace_this"; then
27163     ( $at_traceon;
27164
27165 test -z "$STAR_TESTSCRIPTS" && exit 77
27166 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27167
27168 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
27169  ) >"$at_stdout" 2>"$at_stder1"
27170     at_status=$?
27171     grep '^ *+' "$at_stder1" >&2
27172     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27173 else
27174     ( :;
27175
27176 test -z "$STAR_TESTSCRIPTS" && exit 77
27177 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27178
27179 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
27180  ) >"$at_stdout" 2>"$at_stderr"
27181     at_status=$?
27182 fi
27183
27184 at_failed=false
27185 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27186 echo >>"$at_stdout"; echo "-rwxr-xr-x jes/glone       214 2001-09-21 14:08 .clean
27187 lrwxrwxrwx jes/cats          0 1998-05-07 12:39 RULES -> makefiles/RULES
27188 drwxr-sr-x jes/glone         0 2001-12-10 00:00 build/
27189 -rw-r--r-- jes/glone    312019 2001-12-10 00:00 build/smake-1.2.tar.gz
27190 drwxr-sr-x jes/glone         0 2001-11-09 18:20 build/psmake/
27191 -rwxr-xr-x jes/glone       259 2000-01-09 16:36 build/psmake/MAKE
27192 -rwxr-xr-x jes/glone      4820 2001-02-25 22:45 build/psmake/MAKE.sh
27193 -rw-r--r-- jes/glone       647 2001-02-25 23:50 build/psmake/Makefile
27194 lrwxrwxrwx jes/glone         0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c
27195 lrwxrwxrwx jes/glone         0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c
27196 " | $at_diff - "$at_stdout" || at_failed=:
27197 case $at_status in
27198    77) echo 77 > "$at_status_file"; exit 77;;
27199    0) ;;
27200    *) echo "$at_srcdir/gtarfail2.at:26: exit code was $at_status, expected 0"
27201       at_failed=:;;
27202 esac
27203 if $at_failed; then
27204
27205
27206   echo 1 > "$at_status_file"
27207   exit 1
27208 fi
27209
27210 $at_traceon
27211
27212
27213       $at_traceoff
27214       $at_times_p && times >"$at_times_file"
27215     ) 5>&1 2>&1 | eval $at_tee_pipe
27216     at_status=`cat "$at_status_file"`
27217     ;;
27218
27219   71 ) # 71. multi-fail.at:21: multi-fail
27220     at_setup_line='multi-fail.at:21'
27221     at_desc="multi-fail"
27222     $at_quiet $ECHO_N " 71: multi-fail                                     $ECHO_C"
27223     at_xfail=no
27224     echo "#                             -*- compilation -*-" >> "$at_group_log"
27225     (
27226       echo "71. multi-fail.at:21: testing ..."
27227       $at_traceon
27228
27229
27230
27231 unset TAR_OPTIONS
27232
27233 $at_traceoff
27234 echo "$at_srcdir/multi-fail.at:26:
27235
27236 test -z "$STAR_TESTSCRIPTS" && exit 77
27237 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27238
27239
27240 test -z "$STAR_TESTSCRIPTS" && exit 77
27241 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27242
27243
27244 tar --utc -tvM -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \\
27245                -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
27246 "
27247 echo multi-fail.at:26 >"$at_check_line_file"
27248
27249 at_trace_this=
27250 if test -n "$at_traceon"; then
27251     echo 'Not enabling shell tracing (command contains an embedded newline)'
27252 fi
27253
27254 if test -n "$at_trace_this"; then
27255     ( $at_traceon;
27256
27257 test -z "$STAR_TESTSCRIPTS" && exit 77
27258 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27259
27260
27261 test -z "$STAR_TESTSCRIPTS" && exit 77
27262 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27263
27264
27265 tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
27266                -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
27267  ) >"$at_stdout" 2>"$at_stder1"
27268     at_status=$?
27269     grep '^ *+' "$at_stder1" >&2
27270     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27271 else
27272     ( :;
27273
27274 test -z "$STAR_TESTSCRIPTS" && exit 77
27275 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27276
27277
27278 test -z "$STAR_TESTSCRIPTS" && exit 77
27279 tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27280
27281
27282 tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
27283                -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&-
27284  ) >"$at_stdout" 2>"$at_stderr"
27285     at_status=$?
27286 fi
27287
27288 at_failed=false
27289 $at_diff "$at_devnull" "$at_stderr" || at_failed=:
27290 echo >>"$at_stdout"; echo "drwxrwsr-x joerg/bs          0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/
27291 -rw-r--r-- joerg/bs          1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull
27292 -rw-r--r-- joerg/bs       1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d
27293 -rw-r--r-- joerg/bs       1460 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.d
27294 -rw-r--r-- joerg/bs       1540 2003-10-10 18:06 OBJ/i386-sunos5-gcc/cpiohdr.d
27295 -rw-r--r-- joerg/bs       2245 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xheader.d
27296 -rw-r--r-- joerg/bs       1254 2003-10-10 18:06 OBJ/i386-sunos5-gcc/xattr.d
27297 -rw-r--r-- joerg/bs       1330 2003-10-10 18:06 OBJ/i386-sunos5-gcc/list.d
27298 -rw-r--r-- joerg/bs       1745 2003-10-10 18:06 OBJ/i386-sunos5-gcc/extract.d
27299 -rw-r--r-- joerg/bs       1518 2003-10-10 18:06 OBJ/i386-sunos5-gcc/create.d
27300 -rw-r--r-- joerg/bs       1235 2003-10-10 18:06 OBJ/i386-sunos5-gcc/append.d
27301 -rw-r--r-- joerg/bs       1368 2003-10-10 18:06 OBJ/i386-sunos5-gcc/diff.d
27302 -rw-r--r-- joerg/bs       1423 2003-10-10 18:06 OBJ/i386-sunos5-gcc/remove.d
27303 -rw-r--r-- joerg/bs       1493 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.d
27304 -rw-r--r-- joerg/bs       1572 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.d
27305 -rw-r--r-- joerg/bs       1453 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.d
27306 -rw-r--r-- joerg/bs       2257 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.d
27307 -rw-r--r-- joerg/bs        969 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.d
27308 -rw-r--r-- joerg/bs       1308 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.d
27309 -rw-r--r-- joerg/bs       1287 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.d
27310 -rw-r--r-- joerg/bs       1105 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.d
27311 -rw-r--r-- joerg/bs       1230 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.d
27312 -rw-r--r-- joerg/bs       1091 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.d
27313 -rw-r--r-- joerg/bs        961 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.d
27314 -rw-r--r-- joerg/bs       1113 2003-10-10 18:07 OBJ/i386-sunos5-gcc/props.d
27315 -rw-r--r-- joerg/bs       2146 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fetchdir.d
27316 -rw-r--r-- joerg/bs       1093 2003-10-10 18:07 OBJ/i386-sunos5-gcc/unicode.d
27317 -rw-r--r-- joerg/bs       1211 2003-10-10 18:07 OBJ/i386-sunos5-gcc/subst.d
27318 -rw-r--r-- joerg/bs       2076 2003-10-11 11:53 OBJ/i386-sunos5-gcc/volhdr.d
27319 -rw-r--r-- joerg/bs       1480 2003-10-10 18:07 OBJ/i386-sunos5-gcc/chdir.d
27320 -rw-r--r-- joerg/bs      42460 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star.o
27321 -rw-r--r-- joerg/bs      22564 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.o
27322 -rw-r--r-- joerg/bs       7880 2003-10-10 18:07 OBJ/i386-sunos5-gcc/cpiohdr.o
27323 -rw-r--r-- joerg/bs      14624 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xheader.o
27324 -rw-r--r-- joerg/bs        924 2003-10-10 18:07 OBJ/i386-sunos5-gcc/xattr.o
27325 -rw-r--r-- joerg/bs       6120 2003-10-10 18:07 OBJ/i386-sunos5-gcc/list.o
27326 -rw-r--r-- joerg/bs      12764 2003-10-10 18:07 OBJ/i386-sunos5-gcc/extract.o
27327 -rw-r--r-- joerg/bs      14668 2003-10-10 18:07 OBJ/i386-sunos5-gcc/create.o
27328 -rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/append.o
27329 -rw-r--r-- joerg/bs       7636 2003-10-10 18:07 OBJ/i386-sunos5-gcc/diff.o
27330 -rw-r--r-- joerg/bs       3072 2003-10-10 18:07 OBJ/i386-sunos5-gcc/remove.o
27331 -rw-r--r-- joerg/bs       5612 2003-10-10 18:07 OBJ/i386-sunos5-gcc/star_unix.o
27332 -rw-r--r-- joerg/bs       6220 2003-10-10 18:07 OBJ/i386-sunos5-gcc/acl_unix.o
27333 -rw-r--r-- joerg/bs       1092 2003-10-10 18:07 OBJ/i386-sunos5-gcc/fflags.o
27334 -rw-r--r-- joerg/bs      20996 2003-10-11 14:32 OBJ/i386-sunos5-gcc/buffer.o
27335 -rw-r--r-- joerg/bs       2060 2003-10-07 17:53 OBJ/i386-sunos5-gcc/dirtime.o
27336 -rw-r--r-- joerg/bs       1664 2003-10-10 18:07 OBJ/i386-sunos5-gcc/lhash.o
27337 -rw-r--r-- joerg/bs      10564 2003-10-10 18:07 OBJ/i386-sunos5-gcc/hole.o
27338 -rw-r--r-- joerg/bs       3864 2003-10-10 18:07 OBJ/i386-sunos5-gcc/longnames.o
27339 -rw-r--r-- joerg/bs       2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.o
27340 -rw-r--r-- joerg/bs        952 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.o
27341 -rw-r--r-- joerg/bs       2756 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.o
27342 " | $at_diff - "$at_stdout" || at_failed=:
27343 case $at_status in
27344    77) echo 77 > "$at_status_file"; exit 77;;
27345    0) ;;
27346    *) echo "$at_srcdir/multi-fail.at:26: exit code was $at_status, expected 0"
27347       at_failed=:;;
27348 esac
27349 if $at_failed; then
27350
27351
27352   echo 1 > "$at_status_file"
27353   exit 1
27354 fi
27355
27356 $at_traceon
27357
27358
27359       $at_traceoff
27360       $at_times_p && times >"$at_times_file"
27361     ) 5>&1 2>&1 | eval $at_tee_pipe
27362     at_status=`cat "$at_status_file"`
27363     ;;
27364
27365   72 ) # 72. ustar-big-2g.at:21: ustar-big-2g
27366     at_setup_line='ustar-big-2g.at:21'
27367     at_desc="ustar-big-2g"
27368     $at_quiet $ECHO_N " 72: ustar-big-2g                                   $ECHO_C"
27369     at_xfail=no
27370     echo "#                             -*- compilation -*-" >> "$at_group_log"
27371     (
27372       echo "72. ustar-big-2g.at:21: testing ..."
27373       $at_traceon
27374
27375
27376
27377 unset TAR_OPTIONS
27378
27379 $at_traceoff
27380 echo "$at_srcdir/ustar-big-2g.at:26:
27381
27382 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
27383
27384
27385 test -z "$STAR_TESTSCRIPTS" && exit 77
27386 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27387
27388
27389 tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
27390 "
27391 echo ustar-big-2g.at:26 >"$at_check_line_file"
27392
27393 at_trace_this=
27394 if test -n "$at_traceon"; then
27395     echo 'Not enabling shell tracing (command contains an embedded newline)'
27396 fi
27397
27398 if test -n "$at_trace_this"; then
27399     ( $at_traceon;
27400
27401 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
27402
27403
27404 test -z "$STAR_TESTSCRIPTS" && exit 77
27405 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27406
27407
27408 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
27409  ) >"$at_stdout" 2>"$at_stder1"
27410     at_status=$?
27411     grep '^ *+' "$at_stder1" >&2
27412     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27413 else
27414     ( :;
27415
27416 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
27417
27418
27419 test -z "$STAR_TESTSCRIPTS" && exit 77
27420 tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27421
27422
27423 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
27424  ) >"$at_stdout" 2>"$at_stderr"
27425     at_status=$?
27426 fi
27427
27428 at_failed=false
27429 echo stderr:; tee stderr <"$at_stderr"
27430 echo >>"$at_stdout"; echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big
27431 -rw-r--r-- jes/glone          0 2002-06-15 14:53 file
27432 " | $at_diff - "$at_stdout" || at_failed=:
27433 case $at_status in
27434    77) echo 77 > "$at_status_file"; exit 77;;
27435    0) ;;
27436    *) echo "$at_srcdir/ustar-big-2g.at:26: exit code was $at_status, expected 0"
27437       at_failed=:;;
27438 esac
27439 if $at_failed; then
27440
27441
27442   echo 1 > "$at_status_file"
27443   exit 1
27444 fi
27445
27446 $at_traceon
27447
27448
27449
27450 cat >stderr.re <<'_ATEOF'
27451 tar: Record size = .*
27452 _ATEOF
27453
27454 awk '{print NR " " $0}' stderr > $$.1
27455 awk '{print NR " " $0}' stderr.re | join - $$.1 |
27456 while read NUM RE LINE
27457 do
27458   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
27459 done
27460
27461
27462       $at_traceoff
27463       $at_times_p && times >"$at_times_file"
27464     ) 5>&1 2>&1 | eval $at_tee_pipe
27465     at_status=`cat "$at_status_file"`
27466     ;;
27467
27468   73 ) # 73. ustar-big-8g.at:21: ustar-big-8g
27469     at_setup_line='ustar-big-8g.at:21'
27470     at_desc="ustar-big-8g"
27471     $at_quiet $ECHO_N " 73: ustar-big-8g                                   $ECHO_C"
27472     at_xfail=no
27473     echo "#                             -*- compilation -*-" >> "$at_group_log"
27474     (
27475       echo "73. ustar-big-8g.at:21: testing ..."
27476       $at_traceon
27477
27478
27479
27480 unset TAR_OPTIONS
27481
27482 $at_traceoff
27483 echo "$at_srcdir/ustar-big-8g.at:26:
27484
27485 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
27486
27487
27488 test -z "$STAR_TESTSCRIPTS" && exit 77
27489 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27490
27491
27492 tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
27493 "
27494 echo ustar-big-8g.at:26 >"$at_check_line_file"
27495
27496 at_trace_this=
27497 if test -n "$at_traceon"; then
27498     echo 'Not enabling shell tracing (command contains an embedded newline)'
27499 fi
27500
27501 if test -n "$at_trace_this"; then
27502     ( $at_traceon;
27503
27504 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
27505
27506
27507 test -z "$STAR_TESTSCRIPTS" && exit 77
27508 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27509
27510
27511 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
27512  ) >"$at_stdout" 2>"$at_stder1"
27513     at_status=$?
27514     grep '^ *+' "$at_stder1" >&2
27515     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27516 else
27517     ( :;
27518
27519 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
27520
27521
27522 test -z "$STAR_TESTSCRIPTS" && exit 77
27523 tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27524
27525
27526 tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
27527  ) >"$at_stdout" 2>"$at_stderr"
27528     at_status=$?
27529 fi
27530
27531 at_failed=false
27532 echo stderr:; tee stderr <"$at_stderr"
27533 echo >>"$at_stdout"; echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1
27534 -rw-r--r-- jes/glone          0 2002-06-15 14:53 file
27535 " | $at_diff - "$at_stdout" || at_failed=:
27536 case $at_status in
27537    77) echo 77 > "$at_status_file"; exit 77;;
27538    0) ;;
27539    *) echo "$at_srcdir/ustar-big-8g.at:26: exit code was $at_status, expected 0"
27540       at_failed=:;;
27541 esac
27542 if $at_failed; then
27543
27544
27545   echo 1 > "$at_status_file"
27546   exit 1
27547 fi
27548
27549 $at_traceon
27550
27551
27552
27553 cat >stderr.re <<'_ATEOF'
27554 tar: Record size = .*
27555 _ATEOF
27556
27557 awk '{print NR " " $0}' stderr > $$.1
27558 awk '{print NR " " $0}' stderr.re | join - $$.1 |
27559 while read NUM RE LINE
27560 do
27561   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
27562 done
27563
27564
27565       $at_traceoff
27566       $at_times_p && times >"$at_times_file"
27567     ) 5>&1 2>&1 | eval $at_tee_pipe
27568     at_status=`cat "$at_status_file"`
27569     ;;
27570
27571   74 ) # 74. pax-big-10g.at:21: pax-big-10g
27572     at_setup_line='pax-big-10g.at:21'
27573     at_desc="pax-big-10g"
27574     $at_quiet $ECHO_N " 74: pax-big-10g                                    $ECHO_C"
27575     at_xfail=no
27576     echo "#                             -*- compilation -*-" >> "$at_group_log"
27577     (
27578       echo "74. pax-big-10g.at:21: testing ..."
27579       $at_traceon
27580
27581
27582
27583 unset TAR_OPTIONS
27584
27585 $at_traceoff
27586 echo "$at_srcdir/pax-big-10g.at:26:
27587
27588 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
27589
27590
27591 test -z "$STAR_TESTSCRIPTS" && exit 77
27592 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27593
27594
27595 tar --utc -tvjf \$STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
27596 "
27597 echo pax-big-10g.at:26 >"$at_check_line_file"
27598
27599 at_trace_this=
27600 if test -n "$at_traceon"; then
27601     echo 'Not enabling shell tracing (command contains an embedded newline)'
27602 fi
27603
27604 if test -n "$at_trace_this"; then
27605     ( $at_traceon;
27606
27607 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
27608
27609
27610 test -z "$STAR_TESTSCRIPTS" && exit 77
27611 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27612
27613
27614 tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
27615  ) >"$at_stdout" 2>"$at_stder1"
27616     at_status=$?
27617     grep '^ *+' "$at_stder1" >&2
27618     grep -v '^ *+' "$at_stder1" >"$at_stderr"
27619 else
27620     ( :;
27621
27622 cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77
27623
27624
27625 test -z "$STAR_TESTSCRIPTS" && exit 77
27626 tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77
27627
27628
27629 tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
27630  ) >"$at_stdout" 2>"$at_stderr"
27631     at_status=$?
27632 fi
27633
27634 at_failed=false
27635 echo stderr:; tee stderr <"$at_stderr"
27636 echo >>"$at_stdout"; echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g
27637 -rw-r--r-- jes/glone           0 2002-06-15 14:53 file
27638 " | $at_diff - "$at_stdout" || at_failed=:
27639 case $at_status in
27640    77) echo 77 > "$at_status_file"; exit 77;;
27641    0) ;;
27642    *) echo "$at_srcdir/pax-big-10g.at:26: exit code was $at_status, expected 0"
27643       at_failed=:;;
27644 esac
27645 if $at_failed; then
27646
27647
27648   echo 1 > "$at_status_file"
27649   exit 1
27650 fi
27651
27652 $at_traceon
27653
27654
27655
27656 cat >stderr.re <<'_ATEOF'
27657 tar: Record size = .*
27658 _ATEOF
27659
27660 awk '{print NR " " $0}' stderr > $$.1
27661 awk '{print NR " " $0}' stderr.re | join - $$.1 |
27662 while read NUM RE LINE
27663 do
27664   echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
27665 done
27666
27667
27668       $at_traceoff
27669       $at_times_p && times >"$at_times_file"
27670     ) 5>&1 2>&1 | eval $at_tee_pipe
27671     at_status=`cat "$at_status_file"`
27672     ;;
27673
27674
27675   * )
27676     echo "$as_me: no such test group: $at_group" >&2
27677     continue
27678     ;;
27679   esac
27680
27681   # Be sure to come back to the suite directory, in particular
27682   # since below we might `rm' the group directory we are in currently.
27683   cd "$at_suite_dir"
27684
27685   case $at_group in
27686     banner-*) ;;
27687     *)
27688       if test ! -f "$at_check_line_file"; then
27689         sed "s/^ */$as_me: warning: /" <<_ATEOF
27690         A failure happened in a test group before any test could be
27691         run. This means that test suite is improperly designed.  Please
27692         report this failure to <bug-tar@gnu.org>.
27693 _ATEOF
27694         echo "$at_setup_line" >"$at_check_line_file"
27695       fi
27696       at_group_count=`expr 1 + $at_group_count`
27697       $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
27698       echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> "$at_group_log"
27699       case $at_xfail:$at_status in
27700         yes:0)
27701             at_msg="UNEXPECTED PASS"
27702             at_xpass_list="$at_xpass_list $at_group"
27703             at_errexit=$at_errexit_p
27704             ;;
27705         no:0)
27706             at_msg="ok"
27707             at_pass_list="$at_pass_list $at_group"
27708             at_errexit=false
27709             ;;
27710         *:77)
27711             at_msg='skipped ('`cat "$at_check_line_file"`')'
27712             at_skip_list="$at_skip_list $at_group"
27713             at_errexit=false
27714             ;;
27715         yes:*)
27716             at_msg='expected failure ('`cat "$at_check_line_file"`')'
27717             at_xfail_list="$at_xfail_list $at_group"
27718             at_errexit=false
27719             ;;
27720         no:*)
27721             at_msg='FAILED ('`cat "$at_check_line_file"`')'
27722             at_fail_list="$at_fail_list $at_group"
27723             at_errexit=$at_errexit_p
27724             ;;
27725       esac
27726       # Make sure there is a separator even with long titles.
27727       echo " $at_msg"
27728       at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
27729       case $at_status in
27730         0|77)
27731           # $at_times_file is only available if the group succeeded.
27732           # We're not including the group log, so the success message
27733           # is written in the global log separately.  But we also
27734           # write to the group log in case they're using -d.
27735           if test -f "$at_times_file"; then
27736             at_log_msg="$at_log_msg     ("`sed 1d "$at_times_file"`')'
27737             rm -f "$at_times_file"
27738           fi
27739           echo "$at_log_msg" >> "$at_group_log"
27740           echo "$at_log_msg" >&5
27741
27742           # Cleanup the group directory, unless the user wants the files.
27743           if $at_debug_p ; then
27744                   {
27745             echo "#! /bin/sh"
27746             echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
27747             echo "cd '$at_dir'"
27748             echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
27749                  '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
27750             echo 'exit 1'
27751           } >$at_group_dir/run
27752           chmod +x $at_group_dir/run
27753
27754           elif test -d "$at_group_dir"; then
27755             find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
27756             rm -fr "$at_group_dir"
27757           fi
27758           ;;
27759         *)
27760           # Upon failure, include the log into the testsuite's global
27761           # log.  The failure message is written in the group log.  It
27762           # is later included in the global log.
27763           echo "$at_log_msg" >> "$at_group_log"
27764
27765           # Upon failure, keep the group directory for autopsy, and
27766           # create the debugging script.
27767                   {
27768             echo "#! /bin/sh"
27769             echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\'''
27770             echo "cd '$at_dir'"
27771             echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \
27772                  '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}'
27773             echo 'exit 1'
27774           } >$at_group_dir/run
27775           chmod +x $at_group_dir/run
27776
27777           $at_errexit && break
27778           ;;
27779       esac
27780       ;;
27781   esac
27782 done
27783
27784 # Back to the top directory.
27785 cd "$at_dir"
27786
27787 # Compute the duration of the suite.
27788 at_stop_date=`date`
27789 at_stop_time=`date +%s 2>/dev/null`
27790 echo "$as_me: ending at: $at_stop_date" >&5
27791 case $at_start_time,$at_stop_time in
27792   [0-9]*,[0-9]*)
27793     at_duration_s=`expr $at_stop_time - $at_start_time`
27794     at_duration_m=`expr $at_duration_s / 60`
27795     at_duration_h=`expr $at_duration_m / 60`
27796     at_duration_s=`expr $at_duration_s % 60`
27797     at_duration_m=`expr $at_duration_m % 60`
27798     at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
27799     echo "$as_me: test suite duration: $at_duration" >&5
27800     ;;
27801 esac
27802
27803 # Wrap up the test suite with summary statistics.
27804 at_skip_count=`set dummy $at_skip_list; shift; echo $#`
27805 at_fail_count=`set dummy $at_fail_list; shift; echo $#`
27806 at_xpass_count=`set dummy $at_xpass_list; shift; echo $#`
27807 at_xfail_count=`set dummy $at_xfail_list; shift; echo $#`
27808
27809 at_run_count=`expr $at_group_count - $at_skip_count`
27810 at_unexpected_count=`expr $at_xpass_count + $at_fail_count`
27811 at_total_fail_count=`expr $at_xfail_count + $at_fail_count`
27812
27813 echo
27814 cat <<\_ASBOX
27815 ## ------------- ##
27816 ## Test results. ##
27817 ## ------------- ##
27818 _ASBOX
27819 echo
27820 {
27821   echo
27822   cat <<\_ASBOX
27823 ## ------------- ##
27824 ## Test results. ##
27825 ## ------------- ##
27826 _ASBOX
27827   echo
27828 } >&5
27829
27830 if test $at_run_count = 1; then
27831   at_result="1 test"
27832   at_were=was
27833 else
27834   at_result="$at_run_count tests"
27835   at_were=were
27836 fi
27837 if $at_errexit_p && test $at_unexpected_count != 0; then
27838   if test $at_xpass_count = 1; then
27839     at_result="$at_result $at_were run, one passed"
27840   else
27841     at_result="$at_result $at_were run, one failed"
27842   fi
27843   at_result="$at_result unexpectedly and inhibited subsequent tests."
27844 else
27845   # Don't you just love exponential explosion of the number of cases?
27846   case $at_xpass_count:$at_fail_count:$at_xfail_count in
27847     # So far, so good.
27848     0:0:0) at_result="$at_result $at_were successful." ;;
27849     0:0:*) at_result="$at_result behaved as expected." ;;
27850
27851     # Some unexpected failures
27852     0:*:0) at_result="$at_result $at_were run,
27853 $at_fail_count failed unexpectedly." ;;
27854
27855     # Some failures, both expected and unexpected
27856     0:*:1) at_result="$at_result $at_were run,
27857 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
27858     0:*:*) at_result="$at_result $at_were run,
27859 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
27860
27861     # No unexpected failures, but some xpasses
27862     *:0:*) at_result="$at_result $at_were run,
27863 $at_xpass_count passed unexpectedly." ;;
27864
27865     # No expected failures, but failures and xpasses
27866     *:1:0) at_result="$at_result $at_were run,
27867 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;;
27868     *:*:0) at_result="$at_result $at_were run,
27869 $at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;;
27870
27871     # All of them.
27872     *:*:1) at_result="$at_result $at_were run,
27873 $at_xpass_count passed unexpectedly,
27874 $at_total_fail_count failed ($at_xfail_count expected failure)." ;;
27875     *:*:*) at_result="$at_result $at_were run,
27876 $at_xpass_count passed unexpectedly,
27877 $at_total_fail_count failed ($at_xfail_count expected failures)." ;;
27878   esac
27879
27880   if test $at_skip_count = 0 && test $at_run_count -gt 1; then
27881     at_result="All $at_result"
27882   fi
27883 fi
27884
27885 # Now put skips in the mix.
27886 case $at_skip_count in
27887   0) ;;
27888   1) at_result="$at_result
27889 1 test was skipped." ;;
27890   *) at_result="$at_result
27891 $at_skip_count tests were skipped." ;;
27892 esac
27893
27894 if test $at_unexpected_count = 0; then
27895   echo "$at_result"
27896   echo "$at_result" >&5
27897 else
27898   echo "ERROR: $at_result" >&2
27899   echo "ERROR: $at_result" >&5
27900   {
27901     echo
27902     cat <<\_ASBOX
27903 ## ------------------------ ##
27904 ## Summary of the failures. ##
27905 ## ------------------------ ##
27906 _ASBOX
27907
27908     # Summary of failed and skipped tests.
27909     if test $at_fail_count != 0; then
27910       echo "Failed tests:"
27911       $SHELL "$0" $at_fail_list --list
27912       echo
27913     fi
27914     if test $at_skip_count != 0; then
27915       echo "Skipped tests:"
27916       $SHELL "$0" $at_skip_list --list
27917       echo
27918     fi
27919     if test $at_xpass_count != 0; then
27920       echo "Unexpected passes:"
27921       $SHELL "$0" $at_xpass_list --list
27922       echo
27923     fi
27924     if test $at_fail_count != 0; then
27925       cat <<\_ASBOX
27926 ## ---------------------- ##
27927 ## Detailed failed tests. ##
27928 ## ---------------------- ##
27929 _ASBOX
27930       echo
27931       for at_group in $at_fail_list
27932       do
27933         at_group_normalized=$at_group
27934
27935   while :; do
27936     case $at_group_normalized in #(
27937     $at_format*) break;;
27938     esac
27939     at_group_normalized=0$at_group_normalized
27940   done
27941
27942         cat "$at_suite_dir/$at_group_normalized/$as_me.log"
27943         echo
27944       done
27945       echo
27946     fi
27947     if test -n "$at_top_srcdir"; then
27948       sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27949 ## ${at_top_build_prefix}config.log ##
27950 _ASBOX
27951       sed 's/^/| /' ${at_top_build_prefix}config.log
27952       echo
27953     fi
27954   } >&5
27955
27956   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27957 ## $as_me.log was created. ##
27958 _ASBOX
27959
27960   echo
27961   echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:"
27962   echo
27963   echo "   To: <bug-tar@gnu.org>"
27964   echo "   Subject: [GNU tar 1.20] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}"
27965   echo
27966   if test $at_debug_p = false; then
27967     echo
27968     echo 'You may investigate any problem if you feel able to do so, in which'
27969     echo 'case the test suite provides a good starting point.  Its output may'
27970     echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'."
27971     echo
27972   fi
27973     exit 1
27974 fi
27975
27976 exit 0
27977
27978
27979