X-Git-Url: https://git.cworth.org/git?p=tar;a=blobdiff_plain;f=tests%2Ftestsuite;h=c2242601658387ef7e666de2a1d5c9af64c54037;hp=a9b869c38cf562e2658907f5574d1f703289ed88;hb=HEAD;hpb=785cdec4450a1459fdbb90df1344b69be34e0059 diff --git a/tests/testsuite b/tests/testsuite index a9b869c..c224260 100755 --- a/tests/testsuite +++ b/tests/testsuite @@ -1,7 +1,8 @@ #! /bin/sh +# Generated from testsuite.at by GNU Autoconf 2.63. # -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. # This test suite is free software; the Free Software Foundation gives # unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -13,7 +14,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -35,17 +36,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -61,8 +90,6 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -85,7 +112,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -98,17 +125,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -130,7 +150,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -156,7 +176,7 @@ else as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -238,7 +258,7 @@ IFS=$as_save_IFS if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -259,7 +279,7 @@ _ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -339,10 +359,10 @@ fi if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -411,9 +431,10 @@ fi test \$exitcode = 0") || { echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. } @@ -449,7 +470,8 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { { $as_echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +$as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -477,7 +499,6 @@ case `echo -n x` in *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -490,19 +511,22 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -527,10 +551,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -547,32 +571,13 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + SHELL=${CONFIG_SHELL-/bin/sh} # How were we run? at_cli_args="$@" -# Load the config file. -for at_file in atconfig atlocal -do - test -r $at_file || continue - . ./$at_file || { echo "$as_me: error: invalid content: $at_file" >&2 - { (exit 1); exit 1; }; } -done - -# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: -: ${at_top_build_prefix=$at_top_builddir} - -# atconfig delivers names relative to the directory the test suite is -# in, but the groups themselves are run in testsuite-dir/group-dir. -if test -n "$at_top_srcdir"; then - builddir=../.. - for at_dir in srcdir top_srcdir top_build_prefix - do - at_val=`eval echo '${'at_$at_dir'}'` - eval "$at_dir=\$at_val/../.." - done -fi # Not all shells have the 'times' builtin; the subshell is needed to make # sure we discard the 'times: not found' message from the shell. @@ -583,9 +588,9 @@ at_times_p=false at_debug_args= # -e sets to true at_errexit_p=false -# Shall we be verbose? +# Shall we be verbose? ':' means no, empty means yes. at_verbose=: -at_quiet=echo +at_quiet= # Shall we keep the debug scripts? Must be `:' when the suite is # run by a debug script, so that the script doesn't remove itself. @@ -596,115 +601,173 @@ at_help_p=false at_version_p=false # List test groups? at_list_p=false +# --clean +at_clean=false # Test groups to run at_groups= +# Whether a write failure occurred +at_write_fail=0 -# The directory we are in. +# The directory we run the suite in. Default to . if no -C option. at_dir=`pwd` -# The directory the whole suite works in. -# Should be absolutely to let the user `cd' at will. -at_suite_dir=$at_dir/$as_me.dir -# The file containing the suite. -at_suite_log=$at_dir/$as_me.log -# The file containing the location of the last AT_CHECK. -at_check_line_file=$at_suite_dir/at-check-line -# The file containing the exit status of the last command. -at_status_file=$at_suite_dir/at-status -# The files containing the output of the tested commands. -at_stdout=$at_suite_dir/at-stdout -at_stder1=$at_suite_dir/at-stder1 -at_stderr=$at_suite_dir/at-stderr -# The file containing dates. -at_times_file=$at_suite_dir/at-times +# An absolute reference to this testsuite script. +case $as_myself in + [\\/]* | ?:[\\/]* ) at_myself=$as_myself ;; + * ) at_myself=$at_dir/$as_myself ;; +esac +# Whether -C is in effect. +at_change_dir=false # List of the tested programs. at_tested='tar' # List of the all the test groups. -at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77' +at_groups_all=' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115' # As many question marks as there are digits in the last test group number. # Used to normalize the test group numbers so that `ls' lists them in # numerical order. -at_format='??' +at_format='???' # Description of all the test groups. at_help_all="1;version.at:19;tar version;; -2;pipe.at:29;decompressing from stdin;pipe; +2;pipe.at:30;decompressing from stdin;pipe; 3;options.at:24;mixing options;options options00; 4;options02.at:26;interspersed options;options options02; 5;T-empty.at:26;files-from: empty entries;files-from empty; -6;T-null.at:21;files-from: 0-separated file without -0;files-from null T-null; -7;indexfile.at:26;tar --index-file=this_is_a_very_long_file_name_which_raises_issues.c --file=-;stdout indexfile; +6;T-null.at:21;files-from: 0-separated file without -0;files-from null t-null; +7;indexfile.at:26;tar --index-file=FILE --file=-;stdout indexfile; 8;verbose.at:26;tar cvf -;stdout verbose; 9;append.at:21;append;append append00; 10;append01.at:29;appending files with long names;append append01; -11;append02.at:40;append vs. create;append append02 append-gnu; -12;exclude.at:23;exclude;exclude; -13;delete01.at:23;deleting a member after a big one;delete delete01; -14;delete02.at:23;deleting a member from stdin archive;delete delete02; -15;delete03.at:21;deleting members with long names;delete delete03; -16;delete04.at:23;deleting a large last member;delete delete04; -17;delete05.at:27;deleting non-existing member;delete delete05; -18;extrac01.at:23;extract over an existing directory;extract extract01; -19;extrac02.at:23;extracting symlinks over an existing file;extract extract02 symlink; -20;extrac03.at:23;extraction loops;extract extract03; -21;extrac04.at:23;extract + fnmatch;extract extract04 fnmatch; -22;extrac05.at:30;extracting selected members from pax;extract extract05; -23;extrac06.at:33;mode of extracted directories;extract extract06 directory mode; -24;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink; -25;gzip.at:23;gzip;gzip; -26;incremental.at:23;incremental;incremental incr00; -27;incr01.at:27;restore broken symlinks from incremental;incremental incr01; -28;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02; -29;listed01.at:26;--listed for individual files;listed incremental listed01; -30;listed02.at:28;working --listed;listed incremental listed02; -31;incr03.at:28;renamed files in incrementals;incremental incr03 rename; -32;incr04.at:29;proper icontents initialization;incremental incr04 icontents; -33;rename01.at:24;renamed dirs in incrementals;incremental rename rename01; -34;rename02.at:24;move between hierarchies;incremental rename rename02; -35;rename03.at:23;cyclic renames;incremental rename rename03 cyclic-rename; -36;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename; -37;rename05.at:24;renamed subdirectories;incremental rename05 rename; -38;chtype.at:27;changed file types in incrementals;incremental chtype; -39;ignfail.at:23;ignfail;ignfail; -40;link01.at:33;link count gt 2;link01; -41;longv7.at:24;long names in V7 archives;longname longv7; -42;long01.at:28;long file names divisible by block size;longname long512; -43;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01; -44;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02; -45;lustar03.at:21;ustar: splitting long names;longname ustar lustar03; -46;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01; -47;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02; -48;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03; -49;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental multiv04; -50;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync; -51;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06; -52;old.at:23;old archives;old; -53;recurse.at:21;recurse;recurse; -54;same-order01.at:26;working -C with --same-order;same-order same-order01; -55;same-order02.at:25;multiple -C options;same-order same-order02; -56;shortrec.at:25;short records;shortrec; -57;sparse01.at:21;sparse files;sparse sparse01; -58;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02; -59;sparse03.at:21;storing sparse files > 8G;sparse sparse03; -60;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv; -61;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multiv sparsemvp sparsemvp00; -62;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01; -63;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multiv sparsemvp sparsemvp10; -64;update.at:27;update unchanged directories;update; -65;volume.at:23;volume;volume volcheck; -66;volsize.at:29;volume header size;volume volsize; -67;comprec.at:21;compressed format recognition;comprec; -68;shortfile.at:26;short input files;shortfile shortfile0; -69;shortupd.at:29;updating short archives;shortfile shortfile1 shortupd; -70;truncate.at:29;truncate;truncate filechange; -71;grow.at:24;grow;grow filechange; -72;gtarfail.at:21;gtarfail;star gtarfail; -73;gtarfail2.at:21;gtarfail2;star gtarfail2; -74;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail; -75;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g; -76;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g; -77;pax-big-10g.at:21;pax-big-10g;star pax-big-10g; +11;append02.at:54;append vs. create;append append02 append-gnu; +12;xform-h.at:30;transforming hard links on create;transform xform xform-h; +13;xform01.at:26;transformations and GNU volume labels;transform xform xform01 volume; +14;exclude.at:23;exclude;exclude; +15;exclude01.at:17;exclude wildcards;exclude exclude01; +16;exclude02.at:17;exclude: anchoring;exclude exclude02; +17;exclude03.at:17;exclude: wildcards match slash;exclude exclude03; +18;exclude04.at:17;exclude: case insensitive;exclude exclude04; +19;exclude05.at:19;exclude: lots of excludes;exclude exclude05; +20;exclude06.at:24;exclude: long files in pax archives;exclude exclude06; +21;delete01.at:23;deleting a member after a big one;delete delete01; +22;delete02.at:23;deleting a member from stdin archive;delete delete02; +23;delete03.at:21;deleting members with long names;delete delete03; +24;delete04.at:23;deleting a large last member;delete delete04; +25;delete05.at:27;deleting non-existing member;delete delete05; +26;extrac01.at:23;extract over an existing directory;extract extract01; +27;extrac02.at:23;extracting symlinks over an existing file;extract extract02 symlink; +28;extrac03.at:23;extraction loops;extract extract03; +29;extrac04.at:23;extract + fnmatch;extract extract04 fnmatch; +30;extrac05.at:30;extracting selected members from pax;extract extract05; +31;extrac06.at:33;mode of extracted directories;extract extract06 directory mode; +32;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink; +33;extrac08.at:33;restoring mode on existing directory;extract extrac08; +34;extrac09.at:22;no need to save dir with unreadable . and ..;extract extrac09; +35;extrac10.at:27;-C and delayed setting of metadata;extract extrac10; +36;extrac11.at:23;scarce file descriptors;extract extrac11; +37;extrac12.at:23;extract dot permissions;extract extrac12; +38;extrac13.at:24;extract over symlinks;extract extrac13; +39;extrac14.at:23;extract -C symlink;extract extrac14; +40;extrac15.at:23;extract parent mkdir failure;extract extrac15; +41;label01.at:19;single-volume label;label label01; +42;label02.at:19;multi-volume label;label label02 multi-label multivolume multiv; +43;label03.at:25;test-label option;label label03 test-label; +44;label04.at:25;label with non-create option;label label04; +45;label05.at:22;label with non-create option;label label05; +46;backup01.at:33;extracting existing dir with --backup;extract backup backup01; +47;gzip.at:23;gzip;gzip; +48;incremental.at:23;incremental;incremental incr00; +49;incr01.at:27;restore broken symlinks from incremental;incremental incr01; +50;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02; +51;listed01.at:26;--listed for individual files;listed incremental listed01; +52;listed02.at:28;working --listed;listed incremental listed02; +53;listed03.at:22;incremental dump when the parent directory is unreadable;listed incremental listed03; +54;incr03.at:28;renamed files in incrementals;incremental incr03 rename; +55;incr04.at:29;proper icontents initialization;incremental incr04 icontents; +56;incr05.at:19;incremental dumps with -C;incremental incr05; +57;incr06.at:19;incremental dumps of nested directories;incremental incr06; +58;filerem01.at:34;file removed as we read it (ca. 22 seconds);create incremental filechange filerem filerem01; +59;filerem02.at:24;toplevel file removed (ca. 24 seconds);create incremental filechange filerem filerem02; +60;rename01.at:24;renamed dirs in incrementals;incremental rename rename01; +61;rename02.at:24;move between hierarchies;incremental rename rename02; +62;rename03.at:23;cyclic renames;incremental rename rename03 cyclic-rename; +63;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename; +64;rename05.at:24;renamed subdirectories;incremental rename05 rename; +65;chtype.at:27;changed file types in incrementals;incremental chtype; +66;ignfail.at:23;ignfail;ignfail; +67;link01.at:33;link count gt 2;hardlinks link01; +68;link02.at:32;preserve hard links with --remove-files;hardlinks link02; +69;link03.at:24;working -l with --remove-files;hardlinks link03; +70;link04.at:29;link count is 1 but multiple occurrences;hardlinks link04; +71;longv7.at:24;long names in V7 archives;longname longv7; +72;long01.at:28;long file names divisible by block size;longname long512; +73;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01; +74;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02; +75;lustar03.at:21;ustar: splitting long names;longname ustar lustar03; +76;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01; +77;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02; +78;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03; +79;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental multiv04; +80;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync; +81;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06; +82;multiv07.at:26;volumes split at an extended header;multivolume multiv multiv07 xsplit; +83;multiv08.at:23;multivolume header creation;multivolume multiv multiv08; +84;old.at:23;old archives;old; +85;recurse.at:21;recurse;recurse; +86;same-order01.at:26;working -C with --same-order;same-order same-order01; +87;same-order02.at:25;multiple -C options;same-order same-order02; +88;shortrec.at:25;short records;shortrec; +89;sparse01.at:21;sparse files;sparse sparse01; +90;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02; +91;sparse03.at:21;storing sparse files > 8G;sparse sparse03; +92;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv; +93;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multivolume multiv sparsemvp sparsemvp00; +94;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01; +95;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multivolume multiv sparsemvp sparsemvp10; +96;update.at:28;update unchanged directories;update update00; +97;update01.at:29;update directories;update update01; +98;update02.at:26;update changed files;update update02; +99;volume.at:23;volume;volume volcheck; +100;volsize.at:29;volume header size;volume volsize; +101;comprec.at:21;compressed format recognition;comprec; +102;shortfile.at:26;short input files;shortfile shortfile0; +103;shortupd.at:29;updating short archives;shortfile shortfile1 shortupd; +104;truncate.at:29;truncate;truncate filechange; +105;grow.at:24;grow;grow filechange; +106;remfiles01.at:28;remove-files with compression;create remove-files remfiles01 gzip; +107;remfiles02.at:28;remove-files with compression: grand-child;create remove-files remfiles02 gzip; +108;remfiles03.at:28;remove-files with symbolic links;create remove-files remfiles03; +109;sigpipe.at:19;sigpipe handling;sigpipe; +110;gtarfail.at:21;gtarfail;star gtarfail; +111;gtarfail2.at:21;gtarfail2;star gtarfail2; +112;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail; +113;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g; +114;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g; +115;pax-big-10g.at:21;pax-big-10g;star pax-big-10g; " +# at_func_validate_ranges [NAME...] +# --------------------------------- +# Validate and normalize the test group number contained in each +# variable NAME. Leading zeroes are treated as decimal. +at_func_validate_ranges () +{ + for at_grp + do + eval at_value=\$$at_grp + if test $at_value -lt 1 || test $at_value -gt 115; then + $as_echo "invalid test group: $at_value" >&2 + exit 1 + fi + case $at_value in + 0*) # We want to treat leading 0 as decimal, like expr and test, but + # at_func_arith treats it as octal if it uses $(( )). + # With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the + # expr fork, but it is not worth the effort to determine if the + # shell supports XSI when the user can just avoid leading 0. + eval $at_grp='`expr $at_value + 0`' ;; + esac + done +} + at_prev= for at_option do @@ -735,10 +798,7 @@ do ;; --clean | -c ) - test -d "$at_suite_dir" && - find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; - rm -f -r "$at_suite_dir" "$at_suite_log" - exit 0 + at_clean=: ;; --debug | -d ) @@ -751,7 +811,7 @@ do ;; --verbose | -v ) - at_verbose=echo; at_quiet=: + at_verbose=; at_quiet=: ;; --trace | -x ) @@ -759,20 +819,23 @@ do ;; [0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]) + at_func_validate_ranges at_option at_groups="$at_groups$at_option " ;; # Ranges [0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-) at_range_start=`echo $at_option |tr -d X-` - at_range=`echo " $at_groups_all " | \ + at_func_validate_ranges at_range_start + at_range=`$as_echo " $at_groups_all " | \ sed -e 's/^.* \('$at_range_start' \)/\1/'` at_groups="$at_groups$at_range " ;; -[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]) at_range_end=`echo $at_option |tr -d X-` - at_range=`echo " $at_groups_all " | \ + at_func_validate_ranges at_range_end + at_range=`$as_echo " $at_groups_all " | \ sed -e 's/\( '$at_range_end'\) .*$/\1/'` at_groups="$at_groups$at_range " ;; @@ -790,12 +853,22 @@ do at_range_end=$at_range_start at_range_start=$at_tmp fi - at_range=`echo " $at_groups_all " | \ + at_func_validate_ranges at_range_start at_range_end + at_range=`$as_echo " $at_groups_all " | \ sed -e 's/^.*\( '$at_range_start' \)/\1/' \ -e 's/\( '$at_range_end'\) .*$/\1/'` at_groups="$at_groups$at_range " ;; + # Directory selection. + --directory | -C ) + at_prev=--directory + ;; + --directory=* ) + at_change_dir=: + at_dir=$at_optarg + ;; + # Keywords. --keywords | -k ) at_prev=--keywords @@ -817,68 +890,57 @@ do ;; esac # It is on purpose that we match the test group titles too. - at_groups_selected=`echo "$at_groups_selected" | + at_groups_selected=`$as_echo "$at_groups_selected" | grep -i $at_invert "^[1-9][^;]*;.*[; ]$at_keyword[ ;]"` done - at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'` # Smash the newlines. - at_groups="$at_groups`echo $at_groups_selected` " + at_groups_selected=`$as_echo "$at_groups_selected" | sed 's/;.*//' | + tr "$as_nl" ' ' + ` + at_groups="$at_groups$at_groups_selected " ;; *=*) at_envvar=`expr "x$at_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$at_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $at_envvar" >&2 - { (exit 1); exit 1; }; } - at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$at_envvar='$at_value'" + case $at_envvar in + '' | [0-9]* | *[!_$as_cr_alnum]* ) + { { $as_echo "$as_me:$LINENO: error: invalid variable name: $at_envvar" >&5 +$as_echo "$as_me: error: invalid variable name: $at_envvar" >&2;} + { (exit 1); exit 1; }; } ;; + esac + at_value=`$as_echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"` + # Export now, but save eval for later and for debug scripts. export $at_envvar - # Propagate to debug scripts. at_debug_args="$at_debug_args $at_envvar='$at_value'" ;; - *) echo "$as_me: invalid option: $at_option" >&2 - echo "Try \`$0 --help' for more information." >&2 + *) $as_echo "$as_me: invalid option: $at_option" >&2 + $as_echo "Try \`$0 --help' for more information." >&2 exit 1 ;; esac done +# Verify our last option didn't require an argument +if test -n "$at_prev"; then + { { $as_echo "$as_me:$LINENO: error: \`$at_prev' requires an argument." >&5 +$as_echo "$as_me: error: \`$at_prev' requires an argument." >&2;} + { (exit 1); exit 1; }; } +fi + + # Selected test groups. if test -z "$at_groups"; then at_groups=$at_groups_all else - # Sort the tests, removing duplicates: - at_groups=`echo $at_groups | tr ' ' "$as_nl" | sort -nu` - # and add banners. (Passing at_groups_all is tricky--see the comment - # starting with "Passing at_groups is tricky.") - at_groups=`echo "$at_groups$as_nl $at_groups_all" | - awk 'BEGIN { FS = "@" } # Effectively switch off field splitting. - /^$/ { next } # Ignore the empty line. - !/ / { groups++; selected[$ 0] = 1; next } - # The last line, containing at_groups_all. - { - n = split($ 0, a, " ") - # If there are several tests, select their banners: - if (groups > 1) { - for (i = 1; i <= n; i++) { - if (a[i] ~ /^banner-/) - banner = a[i] - else if (banner != "" && selected[a[i]] == 1) - selected[banner] = 1 - } - } - for (i = 1; i <= n; i++) - if (selected[a[i]] == 1) - list = list " " a[i] - print list - }'` + # Sort the tests, removing duplicates. + at_groups=`$as_echo "$at_groups" | tr ' ' "$as_nl" | sort -nu` fi # Help message. if $at_help_p; then - cat <<_ATEOF + cat <<_ATEOF || at_write_fail=1 Usage: $0 [OPTION]... [VARIABLE=VALUE]... [TESTS] Run all the tests, or the selected TESTS, given by numeric ranges, and @@ -895,7 +957,7 @@ possibly amounts into PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH _ATEOF -cat <<_ATEOF +cat <<_ATEOF || at_write_fail=1 Operation modes: -h, --help print the help message, then exit @@ -903,30 +965,32 @@ Operation modes: -c, --clean remove all the files this test suite might create and exit -l, --list describes all the tests, or the selected TESTS _ATEOF -cat <<_ATEOF +cat <<_ATEOF || at_write_fail=1 Execution tuning: + -C, --directory=DIR + change to directory DIR before starting -k, --keywords=KEYWORDS - select the tests matching all the comma-separated KEYWORDS - multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD + select the tests matching all the comma-separated KEYWORDS + multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD -e, --errexit abort as soon as a test fails; implies --debug -v, --verbose force more detailed output - default for debugging scripts + default for debugging scripts -d, --debug inhibit clean up and top-level logging - default for debugging scripts + default for debugging scripts -x, --trace enable tests shell tracing _ATEOF -cat <<_ATEOF +cat <<_ATEOF || at_write_fail=1 Report bugs to . _ATEOF - exit 0 + exit $at_write_fail fi # List of tests. if $at_list_p; then - cat <<_ATEOF -GNU tar 1.22 test suite test groups: + cat <<_ATEOF || at_write_fail=1 +GNU tar 1.24 test suite test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS @@ -935,7 +999,12 @@ _ATEOF # Passing at_groups is tricky. We cannot use it to form a literal string # or regexp because of the limitation of AIX awk. And Solaris' awk # doesn't grok more than 99 fields in a record, so we have to use `split'. - echo "$at_groups$as_nl$at_help_all" | + # at_groups needs to be space-separated for this script to work. + case $at_groups in + *"$as_nl"* ) + at_groups=`$as_echo "$at_groups" | tr "$as_nl" ' '` ;; + esac + $as_echo "$at_groups$as_nl$at_help_all" | awk 'BEGIN { FS = ";" } NR == 1 { for (n = split($ 0, a, " "); n; n--) selected[a[n]] = 1 @@ -946,29 +1015,129 @@ _ATEOF printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3 if ($ 4) printf " %s\n", $ 4 } - }' - exit 0 + }' || at_write_fail=1 + exit $at_write_fail fi if $at_version_p; then - echo "$as_me (GNU tar 1.22)" - cat <<\_ACEOF + $as_echo "$as_me (GNU tar 1.24)" && + cat <<\_ACEOF || at_write_fail=1 -Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software -Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +Free Software Foundation, Inc. This test suite is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit $at_write_fail +fi + +# Should we print banners? at_groups is space-separated for entire test, +# newline-separated if only a subset of the testsuite is run. +case $at_groups in + *' '*' '* | *"$as_nl"*"$as_nl"* ) + at_print_banners=: ;; + * ) at_print_banners=false ;; +esac +# Text for banner N, set to empty once printed. + +# Take any -C into account. +if $at_change_dir ; then + if test x- = "x$at_dir" ; then + at_dir=./- + fi + test x != "x$at_dir" && cd "$at_dir" \ + || { { $as_echo "$as_me:$LINENO: error: unable to change directory" >&5 +$as_echo "$as_me: error: unable to change directory" >&2;} + { (exit 1); exit 1; }; } + at_dir=`pwd` +fi + +# Load the config files for any default variable assignments. +for at_file in atconfig atlocal +do + test -r $at_file || continue + . ./$at_file || { { $as_echo "$as_me:$LINENO: error: invalid content: $at_file" >&5 +$as_echo "$as_me: error: invalid content: $at_file" >&2;} + { (exit 1); exit 1; }; } +done + +# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix: +: ${at_top_build_prefix=$at_top_builddir} + +# Perform any assignments requested during argument parsing. +eval "$at_debug_args" + +# atconfig delivers names relative to the directory the test suite is +# in, but the groups themselves are run in testsuite-dir/group-dir. +if test -n "$at_top_srcdir"; then + builddir=../.. + for at_dir_var in srcdir top_srcdir top_build_prefix + do + at_val=`eval 'as_val=${'at_$at_dir_var'} + $as_echo "$as_val"'` + case $at_val in + [\\/$]* | ?:[\\/]* ) at_prefix= ;; + *) at_prefix=../../ ;; + esac + eval "$at_dir_var=\$at_prefix\$at_val" + done +fi + +## ------------------- ## +## Directory structure ## +## ------------------- ## + +# This is the set of directories and files used by this script +# (non-literals are capitalized): +# +# TESTSUITE - the testsuite +# TESTSUITE.log - summarizes the complete testsuite run +# TESTSUITE.dir/ - created during a run, remains after -d or failed test +# + at-groups/ - during a run: status of all groups in run +# | + NNN/ - during a run: meta-data about test group NNN +# | | + check-line - location (source file and line) of current AT_CHECK +# | | + status - exit status of current AT_CHECK +# | | + stdout - stdout of current AT_CHECK +# | | + stder1 - stderr, including trace +# | | + stderr - stderr, with trace filtered out +# | | + test-source - portion of testsuite that defines group +# | | + times - timestamps for computing duration +# | | + pass - created if group passed +# | | + xpass - created if group xpassed +# | | + fail - created if group failed +# | | + xfail - created if group xfailed +# | | + skip - created if group skipped +# + at-stop - during a run: end the run if this file exists +# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction +# + 0..NNN/ - created for each group NNN, remains after -d or failed test +# | + TESTSUITE.log - summarizes the group results +# | + ... - files created during the group + +# The directory the whole suite works in. +# Should be absolute to let the user `cd' at will. +at_suite_dir=$at_dir/$as_me.dir +# The file containing the suite. +at_suite_log=$at_dir/$as_me.log +# The directory containing helper files per test group. +at_helper_dir=$at_suite_dir/at-groups +# Stop file: if it exists, do not start new jobs. +at_stop_file=$at_suite_dir/at-stop + +if $at_clean; then + test -d "$at_suite_dir" && + find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; + rm -f -r "$at_suite_dir" "$at_suite_log" + exit $? fi # Don't take risks: use only absolute directories in PATH. # -# For stand-alone test suites, AUTOTEST_PATH is relative to `.'. +# For stand-alone test suites (ie. atconfig was not found), +# AUTOTEST_PATH is relative to `.'. # # For embedded test suites, AUTOTEST_PATH is relative to the top level # of the package. Then expand it into build/src parts, since users # may create executables in both places. -AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s&:&$PATH_SEPARATOR&g"` +AUTOTEST_PATH=`$as_echo "$AUTOTEST_PATH" | sed "s|:|$PATH_SEPARATOR|g"` at_path= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $AUTOTEST_PATH $PATH @@ -999,31 +1168,30 @@ IFS=$as_save_IFS # # There might be directories that don't exist, but don't redirect # builtins' (eg., cd) stderr directly: Ultrix's sh hates that. -PATH= +at_new_path= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $at_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` -test -d "$as_dir" || continue -case $PATH in - $as_dir | \ - $as_dir$PATH_SEPARATOR* | \ - *$PATH_SEPARATOR$as_dir | \ - *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;; - - '') PATH=$as_dir ;; - *) PATH=$PATH$PATH_SEPARATOR$as_dir ;; + test -d "$as_dir" || continue +case $as_dir in + [\\/]* | ?:[\\/]* ) ;; + * ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;; +esac +case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in + *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; + $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; + *) at_new_path=$at_new_path$PATH_SEPARATOR$as_dir ;; esac done IFS=$as_save_IFS +PATH=$at_new_path export PATH # Setting up the FDs. # 5 is the log file. Not to be overwritten if `-d'. - if $at_debug_p; then at_suite_log=/dev/null else @@ -1034,25 +1202,27 @@ exec 5>>"$at_suite_log" # Banners and logs. cat <<\_ASBOX ## ------------------------ ## -## GNU tar 1.22 test suite. ## +## GNU tar 1.24 test suite. ## ## ------------------------ ## _ASBOX { cat <<\_ASBOX ## ------------------------ ## -## GNU tar 1.22 test suite. ## +## GNU tar 1.24 test suite. ## ## ------------------------ ## _ASBOX echo - echo "$as_me: command line was:" - echo " $ $0 $at_cli_args" + $as_echo "$as_me: command line was:" + $as_echo " \$ $0 $at_cli_args" echo # Try to find a few ChangeLogs in case it might help determining the # exact version. Use the relative dir: if the top dir is a symlink, # find will not follow it (and options to follow the links are not - # portable), which would result in no output here. + # portable), which would result in no output here. Prune directories + # matching the package tarname, since they tend to be leftovers from + # `make dist' or `make distcheck' and contain redundant or stale logs. if test -n "$at_top_srcdir"; then cat <<\_ASBOX ## ----------- ## @@ -1060,14 +1230,16 @@ _ASBOX ## ----------- ## _ASBOX echo - for at_file in `find "$at_top_srcdir" -name ChangeLog -print` + for at_file in `find "$at_top_srcdir" -name "tar-*" -prune -o -name ChangeLog -print` do - echo "$as_me: $at_file:" + $as_echo "$as_me: $at_file:" sed 's/^/| /;10q' $at_file echo done - { + fi + + { cat <<_ASUNAME ## --------- ## ## Platform. ## @@ -1097,23 +1269,162 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } - echo - fi + echo # Contents of the config files. for at_file in atconfig atlocal do test -r $at_file || continue - echo "$as_me: $at_file:" + $as_echo "$as_me: $at_file:" sed 's/^/| /' $at_file echo done +} >&5 + + +## --------------- ## +## Shell functions ## +## --------------- ## + +# at_func_banner NUMBER +# --------------------- +# Output banner NUMBER, provided the testsuite is running multiple groups +# and this particular banner has not yet been printed. +at_func_banner () +{ + $at_print_banners || return 0 + eval at_banner_text=\$at_banner_text_$1 + test "x$at_banner_text" = x && return 0 + eval at_banner_text_$1= + $as_echo "$as_nl$at_banner_text$as_nl" +} # at_func_banner + +# at_func_check_newline COMMAND +# ----------------------------- +# Test if COMMAND includes a newline and, if so, print a message and return +# exit code 1 +at_func_check_newline () +{ + case "$1" in + *' +'*) echo 'Not enabling shell tracing (command contains an embedded newline)' + return 1 ;; + *) return 0 ;; + esac +} + +# at_func_filter_trace EXIT-CODE +# ------------------------------ +# Split the contents of file "$at_stder1" into the "set -x" trace (on stderr) +# and the other lines (on file "$at_stderr"). Return the exit code EXIT-CODE. +at_func_filter_trace () +{ + grep '^ *+' "$at_stder1" >&2 + grep -v '^ *+' "$at_stder1" >"$at_stderr" + return $1 +} + +# at_func_log_failure FILE-LIST +# ----------------------------- +# Copy the files in the list on stdout with a "> " prefix, and exit the shell +# with a failure exit code. +at_func_log_failure () +{ + for file + do $as_echo "$file:"; sed 's/^/> /' "$file"; done + echo 1 > "$at_status_file" + exit 1 +} + +# at_func_check_skip EXIT-CODE +# ---------------------------- +# Check whether EXIT-CODE is the special exit code 77, and if so exit the shell +# with that same exit code. +at_func_check_skip () +{ + case $1 in + 77) echo 77 > "$at_status_file"; exit 77;; + esac +} + +# at_func_check_status EXPECTED EXIT-CODE LINE +# -------------------------------------------- +# Check whether EXIT-CODE is the expected exit code, and if so do nothing. +# Otherwise, if it is 77 exit the shell with that same exit code; if it is +# anything else print an error message and fail the test. +at_func_check_status () +{ + case $2 in + $1 ) ;; + 77) echo 77 > "$at_status_file"; exit 77;; + *) $as_echo "$3: exit code was $2, expected $1" + at_failed=:;; + esac +} + +# at_func_diff_devnull FILE +# ------------------------- +# Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless +# diff invocations. +at_func_diff_devnull () +{ + test -s "$1" || return 0 + $at_diff "$at_devnull" "$1" +} + +# at_func_test NUMBER +# ------------------- +# Parse out test NUMBER from the tail of this file. +at_func_test () +{ + eval at_sed=\$at_sed$1 + sed "$at_sed" "$at_myself" > "$at_test_source" +} + +# at_func_create_debugging_script +# ------------------------------- +# Create the debugging script $at_group_dir/run which will reproduce the +# current test group. +at_func_create_debugging_script () +{ + { + echo "#! /bin/sh" && + echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' && + $as_echo "cd '$at_dir'" && + $as_echo "exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d $at_debug_args $at_group \${1+\"\$@\"}" && + echo 'exit 1' + } >"$at_group_dir/run" && + chmod +x "$at_group_dir/run" +} + +# at_func_arith +# ------------- +# Arithmetic evaluation, avoids expr if the shell is sane. The +# interpretation of leading zeroes is unspecified. +# +# subshell and eval are needed to keep Solaris sh from bailing out: +if ( eval 'test $(( 1 + 1 )) = 2' ) 2>/dev/null; then + # With "$@", bash does not split positional parameters: + eval 'at_func_arith () + { + at_func_arith_result=$(( $* )) + }' +else + at_func_arith () + { + at_func_arith_result=`expr "$@"` + } +fi +## ---------------------- ## +## End of shell functions ## +## ---------------------- ## +{ cat <<\_ASBOX ## ---------------- ## ## Tested programs. ## @@ -1137,13 +1448,13 @@ IFS=$as_save_IFS if test -f "$as_dir/$at_program"; then { - echo "$at_srcdir/testsuite.at:104: $as_dir/$at_program --version" - "$as_dir/$at_program" --version + $as_echo "$at_srcdir/testsuite.at:104: $as_dir/$at_program --version" + "$as_dir/$at_program" --version &5 2>&1 else - { { echo "$as_me:$LINENO: error: cannot find $at_program" >&5 -echo "$as_me: error: cannot find $at_program" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find $at_program" >&5 +$as_echo "$as_me: error: cannot find $at_program" >&2;} { (exit 1); exit 1; }; } fi done @@ -1158,19 +1469,13 @@ _ASBOX at_start_date=`date` at_start_time=`date +%s 2>/dev/null` -echo "$as_me: starting at: $at_start_date" >&5 -at_xpass_list= -at_xfail_list= -at_pass_list= -at_fail_list= -at_skip_list= -at_group_count=0 +$as_echo "$as_me: starting at: $at_start_date" >&5 # Create the master directory if it doesn't already exist. test -d "$at_suite_dir" || mkdir "$at_suite_dir" || - { { echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5 -echo "$as_me: error: cannot create '$at_suite_dir'" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot create '$at_suite_dir'" >&5 +$as_echo "$as_me: error: cannot create '$at_suite_dir'" >&2;} { (exit 1); exit 1; }; } # Can we diff with `/dev/null'? DU 5.0 refuses. @@ -1189,37 +1494,87 @@ else at_diff=diff fi +# Get the last needed group. +for at_group in : $at_groups; do :; done + +# Extract the start and end lines of each test group at the tail +# of this file +awk ' +BEGIN { FS="" } +/^#AT_START_/ { + start = NR +} +/^#AT_STOP_/ { + test = substr ($ 0, 10) + print "at_sed" test "=\"1," start "d;" (NR-1) "q\"" + if (test == "'"$at_group"'") exit +}' "$at_myself" > "$at_suite_dir/at-source-lines" && +. "$at_suite_dir/at-source-lines" || + { { $as_echo "$as_me:$LINENO: error: cannot create test line number cache" >&5 +$as_echo "$as_me: error: cannot create test line number cache" >&2;} + { (exit 1); exit 1; }; } +rm -f "$at_suite_dir/at-source-lines" + +# Set up helper dirs. +rm -rf "$at_helper_dir" && +mkdir "$at_helper_dir" && +cd "$at_helper_dir" && +{ test -z "$at_groups" || mkdir $at_groups; } || +{ { $as_echo "$as_me:$LINENO: error: testsuite directory setup failed" >&5 +$as_echo "$as_me: error: testsuite directory setup failed" >&2;} + { (exit 1); exit 1; }; } + +# Functions for running a test group. We leave the actual +# test group execution outside of a shell function in order +# to avoid hitting zsh 4.x exit status bugs. + +# at_func_group_prepare +# --------------------- +# Prepare running a test group +at_func_group_prepare () +{ + # The directory for additional per-group helper files. + at_job_dir=$at_helper_dir/$at_group + # The file containing the location of the last AT_CHECK. + at_check_line_file=$at_job_dir/check-line + # The file containing the exit status of the last command. + at_status_file=$at_job_dir/status + # The files containing the output of the tested commands. + at_stdout=$at_job_dir/stdout + at_stder1=$at_job_dir/stder1 + at_stderr=$at_job_dir/stderr + # The file containing the code for a test group. + at_test_source=$at_job_dir/test-source + # The file containing dates. + at_times_file=$at_job_dir/times -for at_group in $at_groups -do # Be sure to come back to the top test directory. cd "$at_suite_dir" - case $at_group in - banner-*) - at_group_log=$at_suite_log - ;; + # Clearly separate the test groups when verbose. + $at_first || $at_verbose echo - *) - at_group_normalized=$at_group + at_group_normalized=$at_group - while :; do + eval 'while :; do case $at_group_normalized in #( - $at_format*) break;; + '"$at_format"'*) break;; esac at_group_normalized=0$at_group_normalized - done + done' - # Create a fresh directory for the next test group, and enter. - at_group_dir=$at_suite_dir/$at_group_normalized - at_group_log=$at_group_dir/$as_me.log - if test -d "$at_group_dir"; then - find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; - rm -fr "$at_group_dir" - fi - # Be tolerant if the above `rm' was not able to remove the directory. - { as_dir=$at_group_dir + # Create a fresh directory for the next test group, and enter. + at_group_dir=$at_suite_dir/$at_group_normalized + at_group_log=$at_group_dir/$as_me.log + if test -d "$at_group_dir"; then + find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; + rm -fr "$at_group_dir" || + { $as_echo "$as_me:$LINENO: WARNING: test directory for $at_group_normalized could not be cleaned." >&5 +$as_echo "$as_me: WARNING: test directory for $at_group_normalized could not be cleaned." >&2;} + fi + # Be tolerant if the above `rm' was not able to remove the directory. + { as_dir="$at_group_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac @@ -1227,7 +1582,7 @@ do as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -1236,7 +1591,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1257,142 +1612,447 @@ echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - cd $at_group_dir - ;; - esac echo 0 > "$at_status_file" - # Clearly separate the test groups when verbose. - test $at_group_count != 0 && $at_verbose - # In verbose mode, append to the log file *and* show on - # the standard output; in quiet mode only write to the log - if test $at_verbose = echo; then + # the standard output; in quiet mode only write to the log. + if test -z "$at_verbose"; then at_tee_pipe='tee -a "$at_group_log"' else at_tee_pipe='cat >> "$at_group_log"' fi +} - case $at_group in - 1 ) # 1. version.at:19: tar version - at_setup_line='version.at:19' - at_desc="tar version" - $at_quiet $ECHO_N " 1: tar version $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "1. version.at:19: testing ..." - $at_traceon - - -$at_traceoff -echo "$at_srcdir/version.at:21: tar --version | sed 1q" -echo version.at:21 >"$at_check_line_file" +# at_func_group_postprocess +# ------------------------- +at_func_group_postprocess () +{ + # Be sure to come back to the suite directory, in particular + # since below we might `rm' the group directory we are in currently. + cd "$at_suite_dir" -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi + if test ! -f "$at_check_line_file"; then + sed "s/^ */$as_me: WARNING: /" <<_ATEOF + A failure happened in a test group before any test could be + run. This means that test suite is improperly designed. Please + report this failure to . +_ATEOF + $as_echo "$at_setup_line" >"$at_check_line_file" + fi + $at_verbose $as_echo_n "$at_group. $at_setup_line: " + $as_echo_n "$at_group. $at_setup_line: " >> "$at_group_log" + case $at_xfail:$at_status in + yes:0) + at_msg="UNEXPECTED PASS" + at_res=xpass + at_errexit=$at_errexit_p + ;; + no:0) + at_msg="ok" + at_res=pass + at_errexit=false + ;; + *:77) + at_msg='skipped ('`cat "$at_check_line_file"`')' + at_res=skip + at_errexit=false + ;; + yes:*) + at_msg='expected failure ('`cat "$at_check_line_file"`')' + at_res=xfail + at_errexit=false + ;; + no:*) + at_msg='FAILED ('`cat "$at_check_line_file"`')' + at_res=fail + at_errexit=$at_errexit_p + ;; + esac + echo "$at_res" > "$at_job_dir/$at_res" + # Make sure there is a separator even with long titles. + $as_echo " $at_msg" + at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" + case $at_status in + 0|77) + # $at_times_file is only available if the group succeeded. + # We're not including the group log, so the success message + # is written in the global log separately. But we also + # write to the group log in case they're using -d. + if test -f "$at_times_file"; then + at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' + rm -f "$at_times_file" + fi + $as_echo "$at_log_msg" >> "$at_group_log" + $as_echo "$at_log_msg" >&5 -if test -n "$at_trace_this"; then - ( $at_traceon; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi + # Cleanup the group directory, unless the user wants the files. + if $at_debug_p; then + at_func_create_debugging_script + else + if test -d "$at_group_dir"; then + find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; + rm -fr "$at_group_dir" + fi + rm -f "$at_test_source" + fi + ;; + *) + # Upon failure, include the log into the testsuite's global + # log. The failure message is written in the group log. It + # is later included in the global log. + $as_echo "$at_log_msg" >> "$at_group_log" + + # Upon failure, keep the group directory for autopsy, and create + # the debugging script. With -e, do not start any further tests. + at_func_create_debugging_script + if $at_errexit; then + echo stop > "$at_stop_file" + fi + ;; + esac +} -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "tar (GNU tar) 1.22 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/version.at:21: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - cat >$XFAILFILE <<'_EOT' -============================================================== -WARNING: Not using the proper version, *all* checks dubious... -============================================================== -_EOT +## ------------ ## +## Driver loop. ## +## ------------ ## +rm -f "$at_stop_file" +at_first=: - echo 1 > "$at_status_file" - exit 1 -else - rm -f $XFAILFILE -fi +for at_group in $at_groups; do + at_func_group_prepare + if cd "$at_group_dir" && + at_func_test $at_group && + . "$at_test_source"; then :; else + { $as_echo "$as_me:$LINENO: WARNING: unable to parse test group: $at_group" >&5 +$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;} + at_failed=: + fi + at_func_group_postprocess + test -f "$at_stop_file" && break + at_first=false +done -$at_traceon +# Wrap up the test suite with summary statistics. +cd "$at_helper_dir" + +# Use ?..???? when the list must remain sorted, the faster * otherwise. +at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'` +at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'` +at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'` +at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do + echo $f; done | sed '/?/d; s,/xpass,,'` +at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do + echo $f; done | sed '/?/d; s,/fail,,'` + +set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list +shift; at_group_count=$# +set X $at_xpass_list; shift; at_xpass_count=$#; at_xpass_list=$* +set X $at_xfail_list; shift; at_xfail_count=$# +set X $at_fail_list; shift; at_fail_count=$#; at_fail_list=$* +set X $at_skip_list; shift; at_skip_count=$# + +at_func_arith $at_group_count - $at_skip_count +at_run_count=$at_func_arith_result +at_func_arith $at_xpass_count + $at_fail_count +at_unexpected_count=$at_func_arith_result +at_func_arith $at_xfail_count + $at_fail_count +at_total_fail_count=$at_func_arith_result +# Back to the top directory. +cd "$at_dir" +rm -rf "$at_helper_dir" - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` +# Compute the duration of the suite. +at_stop_date=`date` +at_stop_time=`date +%s 2>/dev/null` +$as_echo "$as_me: ending at: $at_stop_date" >&5 +case $at_start_time,$at_stop_time in + [0-9]*,[0-9]*) + at_func_arith $at_stop_time - $at_start_time + at_duration_s=$at_func_arith_result + at_func_arith $at_duration_s / 60 + at_duration_m=$at_func_arith_result + at_func_arith $at_duration_m / 60 + at_duration_h=$at_func_arith_result + at_func_arith $at_duration_s % 60 + at_duration_s=$at_func_arith_result + at_func_arith $at_duration_m % 60 + at_duration_m=$at_func_arith_result + at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" + $as_echo "$as_me: test suite duration: $at_duration" >&5 ;; +esac - 2 ) # 2. pipe.at:29: decompressing from stdin - at_setup_line='pipe.at:29' - at_desc="decompressing from stdin" - $at_quiet $ECHO_N " 2: decompressing from stdin $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "2. pipe.at:29: testing ..." - $at_traceon - - - - - - - - - $at_traceoff -echo "$at_srcdir/pipe.at:33: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo +cat <<\_ASBOX +## ------------- ## +## Test results. ## +## ------------- ## +_ASBOX +echo +{ + echo + cat <<\_ASBOX +## ------------- ## +## Test results. ## +## ------------- ## +_ASBOX + echo +} >&5 + +if test $at_run_count = 1; then + at_result="1 test" + at_were=was +else + at_result="$at_run_count tests" + at_were=were +fi +if $at_errexit_p && test $at_unexpected_count != 0; then + if test $at_xpass_count = 1; then + at_result="$at_result $at_were run, one passed" + else + at_result="$at_result $at_were run, one failed" + fi + at_result="$at_result unexpectedly and inhibited subsequent tests." +else + # Don't you just love exponential explosion of the number of cases? + case $at_xpass_count:$at_fail_count:$at_xfail_count in + # So far, so good. + 0:0:0) at_result="$at_result $at_were successful." ;; + 0:0:*) at_result="$at_result behaved as expected." ;; + + # Some unexpected failures + 0:*:0) at_result="$at_result $at_were run, +$at_fail_count failed unexpectedly." ;; + + # Some failures, both expected and unexpected + 0:*:1) at_result="$at_result $at_were run, +$at_total_fail_count failed ($at_xfail_count expected failure)." ;; + 0:*:*) at_result="$at_result $at_were run, +$at_total_fail_count failed ($at_xfail_count expected failures)." ;; + + # No unexpected failures, but some xpasses + *:0:*) at_result="$at_result $at_were run, +$at_xpass_count passed unexpectedly." ;; + + # No expected failures, but failures and xpasses + *:1:0) at_result="$at_result $at_were run, +$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;; + *:*:0) at_result="$at_result $at_were run, +$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;; + + # All of them. + *:*:1) at_result="$at_result $at_were run, +$at_xpass_count passed unexpectedly, +$at_total_fail_count failed ($at_xfail_count expected failure)." ;; + *:*:*) at_result="$at_result $at_were run, +$at_xpass_count passed unexpectedly, +$at_total_fail_count failed ($at_xfail_count expected failures)." ;; + esac + + if test $at_skip_count = 0 && test $at_run_count -gt 1; then + at_result="All $at_result" + fi +fi + +# Now put skips in the mix. +case $at_skip_count in + 0) ;; + 1) at_result="$at_result +1 test was skipped." ;; + *) at_result="$at_result +$at_skip_count tests were skipped." ;; +esac + +if test $at_unexpected_count = 0; then + echo "$at_result" + echo "$at_result" >&5 +else + echo "ERROR: $at_result" >&2 + echo "ERROR: $at_result" >&5 + { + echo + cat <<\_ASBOX +## ------------------------ ## +## Summary of the failures. ## +## ------------------------ ## +_ASBOX + + # Summary of failed and skipped tests. + if test $at_fail_count != 0; then + echo "Failed tests:" + $SHELL "$at_myself" $at_fail_list --list + echo + fi + if test $at_skip_count != 0; then + echo "Skipped tests:" + $SHELL "$at_myself" $at_skip_list --list + echo + fi + if test $at_xpass_count != 0; then + echo "Unexpected passes:" + $SHELL "$at_myself" $at_xpass_list --list + echo + fi + if test $at_fail_count != 0; then + cat <<\_ASBOX +## ---------------------- ## +## Detailed failed tests. ## +## ---------------------- ## +_ASBOX + echo + for at_group in $at_fail_list + do + at_group_normalized=$at_group + + eval 'while :; do + case $at_group_normalized in #( + '"$at_format"'*) break;; + esac + at_group_normalized=0$at_group_normalized + done' + + cat "$at_suite_dir/$at_group_normalized/$as_me.log" + echo + done + echo + fi + if test -n "$at_top_srcdir"; then + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## ${at_top_build_prefix}config.log ## +_ASBOX + sed 's/^/| /' ${at_top_build_prefix}config.log + echo + fi + } >&5 + + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## $as_me.log was created. ## +_ASBOX + + echo + $as_echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help: + + To: + Subject: [GNU tar 1.24] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} +" + if test $at_debug_p = false; then + echo + echo 'You may investigate any problem if you feel able to do so, in which' + echo 'case the test suite provides a good starting point. Its output may' + $as_echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'." + echo + fi + exit 1 +fi + +exit 0 + +## ------------- ## +## Actual tests. ## +## ------------- ## +#AT_START_1 +# 1. version.at:19: tar version +at_setup_line='version.at:19' +at_desc="tar version" +$at_quiet $as_echo_n " 1: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "1. version.at:19: testing ..." + $at_traceon + + +{ $at_traceoff +$as_echo "$at_srcdir/version.at:21: tar --version | sed 1q" +echo version.at:21 >"$at_check_line_file" + +if test -n "$at_traceon"; then + ( $at_traceon; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; tar --version | sed 1q ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.24 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/version.at:21" +if $at_failed; then + cat >$XFAILFILE <<'_EOT' + +============================================================== +WARNING: Not using the proper version, *all* checks dubious... +============================================================== +_EOT + +else + rm -f $XFAILFILE +fi + +$at_failed && at_func_log_failure +$at_traceon; } + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_1 +#AT_START_2 +# 2. pipe.at:30: decompressing from stdin +at_setup_line='pipe.at:30' +at_desc="decompressing from stdin" +$at_quiet $as_echo_n " 2: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "2. pipe.at:30: testing ..." + $at_traceon + + + + + + + { $at_traceoff +$as_echo "$at_srcdir/pipe.at:34: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo \"separator\" cmp orig/file1 directory/file1 echo \"separator\" cmp orig/file2 directory/file2)" -echo pipe.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo pipe.at:34 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -1408,18 +2068,16 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -1435,79 +2093,31 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "directory/ +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file1 directory/file2 separator separator -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/pipe.at:34" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff -echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo pipe.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceoff -echo "$at_srcdir/pipe.at:33: + { $at_traceoff +$as_echo "$at_srcdir/pipe.at:34: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -1523,22 +2133,18 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo \"separator\" cmp orig/file1 directory/file1 echo \"separator\" cmp orig/file2 directory/file2)" -echo pipe.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo pipe.at:34 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -1554,18 +2160,16 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -1581,79 +2185,31 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "directory/ +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file1 directory/file2 separator separator -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff -echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo pipe.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/pipe.at:34" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceoff -echo "$at_srcdir/pipe.at:33: + { $at_traceoff +$as_echo "$at_srcdir/pipe.at:34: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -1669,22 +2225,18 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo \"separator\" cmp orig/file1 directory/file1 echo \"separator\" cmp orig/file2 directory/file2)" -echo pipe.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo pipe.at:34 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -1700,18 +2252,16 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -1727,79 +2277,31 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "directory/ +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file1 directory/file2 separator separator -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff -echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo pipe.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/pipe.at:34" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceoff -echo "$at_srcdir/pipe.at:33: + { $at_traceoff +$as_echo "$at_srcdir/pipe.at:34: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -1815,22 +2317,18 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo \"separator\" cmp orig/file1 directory/file1 echo \"separator\" cmp orig/file2 directory/file2)" -echo pipe.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo pipe.at:34 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -1846,18 +2344,16 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -1873,79 +2369,31 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "directory/ +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file1 directory/file2 separator separator -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - $at_traceoff -echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo pipe.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/pipe.at:34" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceoff -echo "$at_srcdir/pipe.at:33: + { $at_traceoff +$as_echo "$at_srcdir/pipe.at:34: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -1961,22 +2409,18 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo \"separator\" cmp orig/file1 directory/file1 echo \"separator\" cmp orig/file2 directory/file2)" -echo pipe.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo pipe.at:34 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -1992,18 +2436,16 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -2019,236 +2461,154 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir directory genfile --length 10240 --pattern zeros --file directory/file1 genfile --length 13 --file directory/file2 -tar cf archive directory|sort +tar cf archive directory mv directory orig -cat archive | tar xfv - | sort +cat archive | tar xfv - --warning=no-timestamp | sort echo "separator" cmp orig/file1 directory/file1 echo "separator" cmp orig/file2 directory/file2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "directory/ +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file1 directory/file2 separator separator -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/pipe.at:34" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon $at_traceoff -echo "$at_srcdir/pipe.at:33: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo pipe.at:33 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pipe.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - - - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 3 ) # 3. options.at:24: mixing options - at_setup_line='options.at:24' - at_desc="mixing options" - $at_quiet $ECHO_N " 3: mixing options $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "3. options.at:24: testing ..." - $at_traceon + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_2 +#AT_START_3 +# 3. options.at:24: mixing options +at_setup_line='options.at:24' +at_desc="mixing options" +$at_quiet $as_echo_n " 3: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "3. options.at:24: testing ..." + $at_traceon -$at_traceoff -echo "$at_srcdir/options.at:27: +{ $at_traceoff +$as_echo "$at_srcdir/options.at:27: echo > file1 TAR_OPTIONS=--numeric-owner tar chof archive file1 tar tf archive " echo options.at:27 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; echo > file1 TAR_OPTIONS=--numeric-owner tar chof archive file1 tar tf archive ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; echo > file1 TAR_OPTIONS=--numeric-owner tar chof archive file1 tar tf archive ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/options.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/options.at:27" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 4 ) # 4. options02.at:26: interspersed options - at_setup_line='options02.at:26' - at_desc="interspersed options" - $at_quiet $ECHO_N " 4: interspersed options $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "4. options02.at:26: testing ..." - $at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_3 +#AT_START_4 +# 4. options02.at:26: interspersed options +at_setup_line='options02.at:26' +at_desc="interspersed options" +$at_quiet $as_echo_n " 4: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "4. options02.at:26: testing ..." + $at_traceon -$at_traceoff -echo "$at_srcdir/options02.at:29: +{ $at_traceoff +$as_echo "$at_srcdir/options02.at:29: echo > file1 tar c file1 -f archive tar tf archive " echo options02.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; echo > file1 tar c file1 -f archive tar tf archive ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; echo > file1 tar c file1 -f archive tar tf archive ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/options02.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/options02.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 5 ) # 5. T-empty.at:26: files-from: empty entries - at_setup_line='T-empty.at:26' - at_desc="files-from: empty entries" - $at_quiet $ECHO_N " 5: files-from: empty entries $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_4 +#AT_START_5 +# 5. T-empty.at:26: files-from: empty entries +at_setup_line='T-empty.at:26' +at_desc="files-from: empty entries" +$at_quiet $as_echo_n " 5: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "5. T-empty.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "5. T-empty.at:26: testing ..." + $at_traceon @@ -2262,8 +2622,8 @@ _ATEOF - $at_traceoff -echo "$at_srcdir/T-empty.at:36: + { $at_traceoff +$as_echo "$at_srcdir/T-empty.at:36: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2284,13 +2644,9 @@ tar cfvT archive ../file-list | sort )" echo T-empty.at:36 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2309,11 +2665,9 @@ genfile --file trzy tar cfvT archive ../file-list | sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2332,49 +2686,39 @@ genfile --file trzy tar cfvT archive ../file-list | sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "dwa +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dwa jeden trzy -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/T-empty.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/T-empty.at:36" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } # Testing one format is enough - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 6 ) # 6. T-null.at:21: files-from: 0-separated file without -0 - at_setup_line='T-null.at:21' - at_desc="files-from: 0-separated file without -0" - $at_quiet $ECHO_N " 6: files-from: 0-separated file without -0 $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_5 +#AT_START_6 +# 6. T-null.at:21: files-from: 0-separated file without -0 +at_setup_line='T-null.at:21' +at_desc="files-from: 0-separated file without -0" +$at_quiet $as_echo_n " 6: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "6. T-null.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "6. T-null.at:21: testing ..." + $at_traceon @@ -2386,8 +2730,8 @@ _ATEOF - $at_traceoff -echo "$at_srcdir/T-null.at:28: + { $at_traceoff +$as_echo "$at_srcdir/T-null.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2414,13 +2758,9 @@ tar cfTv archive file-list | sort )" echo T-null.at:28 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2445,11 +2785,9 @@ genfile -f trzy tar cfTv archive file-list | sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2474,54 +2812,44 @@ genfile -f trzy tar cfTv archive file-list | sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: file-list: file name read contains nul character -" | $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stderr"; $as_echo "tar: file-list: file name read contains nul character +" | \ + $at_diff - "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/T-null.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_check_status 0 $at_status "$at_srcdir/T-null.at:28" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } # Testing one format is enough - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 7 ) # 7. indexfile.at:26: tar --index-file=FILE --file=- - at_setup_line='indexfile.at:26' - at_desc="tar --index-file=FILE --file=-" - $at_quiet $ECHO_N " 7: tar --index-file=FILE --file=- $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_6 +#AT_START_7 +# 7. indexfile.at:26: tar --index-file=FILE --file=- +at_setup_line='indexfile.at:26' +at_desc="tar --index-file=FILE --file=-" +$at_quiet $as_echo_n " 7: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "7. indexfile.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "7. indexfile.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/indexfile.at:29: + { $at_traceoff +$as_echo "$at_srcdir/indexfile.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -2542,13 +2870,9 @@ tar -tf archive )" echo indexfile.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -2567,11 +2891,9 @@ tar -c -v -f - --index-file=idx directory > archive echo "Testing the archive" tar -tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -2590,33 +2912,23 @@ tar -c -v -f - --index-file=idx directory > archive echo "Testing the archive" tar -tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating the archive +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive directory/ directory/a -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/indexfile.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/indexfile.at:29: + { $at_traceoff +$as_echo "$at_srcdir/indexfile.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -2637,13 +2949,9 @@ tar -tf archive )" echo indexfile.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -2662,11 +2970,9 @@ tar -c -v -f - --index-file=idx directory > archive echo "Testing the archive" tar -tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -2685,33 +2991,23 @@ tar -c -v -f - --index-file=idx directory > archive echo "Testing the archive" tar -tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating the archive +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive directory/ directory/a -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/indexfile.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/indexfile.at:29: + { $at_traceoff +$as_echo "$at_srcdir/indexfile.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2732,13 +3028,9 @@ tar -tf archive )" echo indexfile.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2757,11 +3049,9 @@ tar -c -v -f - --index-file=idx directory > archive echo "Testing the archive" tar -tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -2780,33 +3070,23 @@ tar -c -v -f - --index-file=idx directory > archive echo "Testing the archive" tar -tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating the archive +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive directory/ directory/a -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/indexfile.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/indexfile.at:29: + { $at_traceoff +$as_echo "$at_srcdir/indexfile.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -2827,13 +3107,9 @@ tar -tf archive )" echo indexfile.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -2852,11 +3128,9 @@ tar -c -v -f - --index-file=idx directory > archive echo "Testing the archive" tar -tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -2875,33 +3149,23 @@ tar -c -v -f - --index-file=idx directory > archive echo "Testing the archive" tar -tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating the archive +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive directory/ directory/a -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/indexfile.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/indexfile.at:29: + { $at_traceoff +$as_echo "$at_srcdir/indexfile.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -2922,13 +3186,9 @@ tar -tf archive )" echo indexfile.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -2947,11 +3207,9 @@ tar -c -v -f - --index-file=idx directory > archive echo "Testing the archive" tar -tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -2970,57 +3228,47 @@ tar -c -v -f - --index-file=idx directory > archive echo "Testing the archive" tar -tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating the archive +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive directory/ directory/a -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/indexfile.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/indexfile.at:29" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 8 ) # 8. verbose.at:26: tar cvf - - at_setup_line='verbose.at:26' - at_desc="tar cvf -" - $at_quiet $ECHO_N " 8: tar cvf - $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_7 +#AT_START_8 +# 8. verbose.at:26: tar cvf - +at_setup_line='verbose.at:26' +at_desc="tar cvf -" +$at_quiet $as_echo_n " 8: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "8. verbose.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "8. verbose.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/verbose.at:29: + { $at_traceoff +$as_echo "$at_srcdir/verbose.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3037,13 +3285,9 @@ tar tf archive )" echo verbose.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3058,11 +3302,9 @@ tar cvf - file > archive echo Testing the archive tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3077,33 +3319,24 @@ tar cvf - file > archive echo Testing the archive tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "file -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating the archive +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/verbose.at:29" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/verbose.at:29: + { $at_traceoff +$as_echo "$at_srcdir/verbose.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3120,13 +3353,9 @@ tar tf archive )" echo verbose.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3141,11 +3370,9 @@ tar cvf - file > archive echo Testing the archive tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3160,33 +3387,24 @@ tar cvf - file > archive echo Testing the archive tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "file -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating the archive +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/verbose.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/verbose.at:29: + { $at_traceoff +$as_echo "$at_srcdir/verbose.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3203,13 +3421,9 @@ tar tf archive )" echo verbose.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3224,11 +3438,9 @@ tar cvf - file > archive echo Testing the archive tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3243,33 +3455,24 @@ tar cvf - file > archive echo Testing the archive tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "file -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating the archive +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/verbose.at:29" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/verbose.at:29: + { $at_traceoff +$as_echo "$at_srcdir/verbose.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3286,13 +3489,9 @@ tar tf archive )" echo verbose.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3307,11 +3506,9 @@ tar cvf - file > archive echo Testing the archive tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3326,33 +3523,24 @@ tar cvf - file > archive echo Testing the archive tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "file -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating the archive +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/verbose.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/verbose.at:29: + { $at_traceoff +$as_echo "$at_srcdir/verbose.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3369,13 +3557,9 @@ tar tf archive )" echo verbose.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3390,11 +3574,9 @@ tar cvf - file > archive echo Testing the archive tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3409,57 +3591,48 @@ tar cvf - file > archive echo Testing the archive tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "file -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating the archive +echo >>"$at_stderr"; $as_echo "file +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating the archive Testing the archive file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/verbose.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/verbose.at:29" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 9 ) # 9. append.at:21: append - at_setup_line='append.at:21' - at_desc="append" - $at_quiet $ECHO_N " 9: append $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_8 +#AT_START_9 +# 9. append.at:21: append +at_setup_line='append.at:21' +at_desc="append" +$at_quiet $as_echo_n " 9: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "9. append.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "9. append.at:21: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/append.at:24: + { $at_traceoff +$as_echo "$at_srcdir/append.at:24: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3474,13 +3647,9 @@ touch file1 tar tf archive)" echo append.at:24 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3493,11 +3662,9 @@ touch file1 tar cf archive file1 tar rf archive file2 tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -3510,31 +3677,21 @@ touch file1 tar cf archive file1 tar rf archive file2 tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append.at:24" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/append.at:24: + { $at_traceoff +$as_echo "$at_srcdir/append.at:24: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3549,13 +3706,9 @@ touch file1 tar tf archive)" echo append.at:24 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3568,11 +3721,9 @@ touch file1 tar cf archive file1 tar rf archive file2 tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3585,31 +3736,21 @@ touch file1 tar cf archive file1 tar rf archive file2 tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append.at:24" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append.at:24: + { $at_traceoff +$as_echo "$at_srcdir/append.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3624,13 +3765,9 @@ touch file1 tar tf archive)" echo append.at:24 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3643,11 +3780,9 @@ touch file1 tar cf archive file1 tar rf archive file2 tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3660,31 +3795,21 @@ touch file1 tar cf archive file1 tar rf archive file2 tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append.at:24" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/append.at:24: + { $at_traceoff +$as_echo "$at_srcdir/append.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3699,13 +3824,9 @@ touch file1 tar tf archive)" echo append.at:24 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3718,11 +3839,9 @@ touch file1 tar cf archive file1 tar rf archive file2 tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -3735,31 +3854,21 @@ touch file1 tar cf archive file1 tar rf archive file2 tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append.at:24" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append.at:24: + { $at_traceoff +$as_echo "$at_srcdir/append.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3774,13 +3883,9 @@ touch file1 tar tf archive)" echo append.at:24 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3793,11 +3898,9 @@ touch file1 tar cf archive file1 tar rf archive file2 tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -3810,48 +3913,38 @@ touch file1 tar cf archive file1 tar rf archive file2 tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append.at:24" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 10 ) # 10. append01.at:29: appending files with long names - at_setup_line='append01.at:29' - at_desc="appending files with long names" - $at_quiet $ECHO_N " 10: appending files with long names $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_9 +#AT_START_10 +# 10. append01.at:29: appending files with long names +at_setup_line='append01.at:29' +at_desc="appending files with long names" +$at_quiet $as_echo_n " 10: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "10. append01.at:29: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "10. append01.at:29: testing ..." + $at_traceon @@ -3859,8 +3952,8 @@ $at_traceon - $at_traceoff -echo "$at_srcdir/append01.at:34: + { $at_traceoff +$as_echo "$at_srcdir/append01.at:34: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3877,13 +3970,9 @@ tar tf archive )" echo append01.at:34 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3898,11 +3987,9 @@ tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_pr 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 tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -3917,31 +4004,21 @@ tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_pr 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 tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -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 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 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 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append01.at:34" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append01.at:34: + { $at_traceoff +$as_echo "$at_srcdir/append01.at:34: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3958,13 +4035,9 @@ tar tf archive )" echo append01.at:34 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3979,11 +4052,9 @@ tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_pr 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 tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -3998,31 +4069,21 @@ tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_pr 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 tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -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 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 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 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append01.at:34" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append01.at:34: + { $at_traceoff +$as_echo "$at_srcdir/append01.at:34: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4039,13 +4100,9 @@ tar tf archive )" echo append01.at:34 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4060,11 +4117,9 @@ tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_pr 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 tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4079,31 +4134,21 @@ tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_pr 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 tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -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 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 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 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append01.at:34" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append01.at:34: + { $at_traceoff +$as_echo "$at_srcdir/append01.at:34: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4120,13 +4165,9 @@ tar tf archive )" echo append01.at:34 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4141,11 +4182,9 @@ tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_pr 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 tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4160,55 +4199,45 @@ tar cf archive This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_pr 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 tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -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 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 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 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append01.at:34: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append01.at:34" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 11 ) # 11. append02.at:40: append vs. create - at_setup_line='append02.at:40' - at_desc="append vs. create" - $at_quiet $ECHO_N " 11: append vs. create $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_10 +#AT_START_11 +# 11. append02.at:54: append vs. create +at_setup_line='append02.at:54' +at_desc="append vs. create" +$at_quiet $as_echo_n " 11: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "11. append02.at:40: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "11. append02.at:54: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/append02.at:43: + { $at_traceoff +$as_echo "$at_srcdir/append02.at:57: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4240,15 +4269,11 @@ tar \$MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 )" -echo append02.at:43 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo append02.at:57 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4280,11 +4305,9 @@ tar $MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -4316,32 +4339,22 @@ tar $MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating archive.1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 Creating archive.2 Comparing archives -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append02.at:57" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append02.at:43: + { $at_traceoff +$as_echo "$at_srcdir/append02.at:57: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4373,15 +4386,11 @@ tar \$MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 )" -echo append02.at:43 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo append02.at:57 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4413,11 +4422,9 @@ tar $MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -4449,32 +4456,22 @@ tar $MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating archive.1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 Creating archive.2 Comparing archives -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append02.at:57" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append02.at:43: + { $at_traceoff +$as_echo "$at_srcdir/append02.at:57: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -4506,15 +4503,11 @@ tar \$MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 )" -echo append02.at:43 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo append02.at:57 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -4546,11 +4539,9 @@ tar $MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -4582,32 +4573,22 @@ tar $MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating archive.1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 Creating archive.2 Comparing archives -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append02.at:57" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append02.at:43: + { $at_traceoff +$as_echo "$at_srcdir/append02.at:57: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4639,15 +4620,11 @@ tar \$MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 )" -echo append02.at:43 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo append02.at:57 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4679,11 +4656,9 @@ tar $MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -4715,32 +4690,22 @@ tar $MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating archive.1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 Creating archive.2 Comparing archives -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append02.at:57" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/append02.at:43: + { $at_traceoff +$as_echo "$at_srcdir/append02.at:57: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4772,15 +4737,11 @@ tar \$MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 )" -echo append02.at:43 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo append02.at:57 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4812,11 +4773,9 @@ tar $MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -4848,515 +4807,303 @@ tar $MTIME -rf archive.2 file2 echo Comparing archives cmp archive.1 archive.2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating archive.1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive.1 Creating archive.2 Comparing archives -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/append02.at:43: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/append02.at:57" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_11 +#AT_START_12 +# 12. xform-h.at:30: transforming hard links on create +at_setup_line='xform-h.at:30' +at_desc="transforming hard links on create" +$at_quiet $as_echo_n " 12: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "12. xform-h.at:30: testing ..." + $at_traceon - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 12 ) # 12. exclude.at:23: exclude - at_setup_line='exclude.at:23' - at_desc="exclude" - $at_quiet $ECHO_N " 12: exclude $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "12. exclude.at:23: testing ..." - $at_traceon - $at_traceoff -echo "$at_srcdir/exclude.at:26: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + { $at_traceoff +$as_echo "$at_srcdir/xform-h.at:39: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +mkdir basedir +echo \"hello\" > basedir/test +ln basedir/test basedir/test_link -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -mkdir dir -echo blues > dir/blues -echo jazz > dir/jazz -mkdir dir/folk -echo tagfile > dir/folk/tagfile -echo sanjuan > dir/folk/sanjuan -mkdir dir/rock -echo \"Signature: 8a477f597d28d172789f06886806bc55\" > dir/rock/CACHEDIR.TAG -echo \"test\" > dir/rock/file -for option in exclude-caches exclude-caches-under exclude-caches-all -do - echo OPTION \$option - tar -cf archive.tar --\$option -v dir 2>err | sort - cat err - echo ARCHIVE - tar tf archive.tar | sort -done +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -for option in exclude-tag exclude-tag-under exclude-tag-all -do - echo OPTION \$option - tar -cf archive.tar --\${option}=tagfile -v dir 2>err | sort - cat err - echo ARCHIVE - tar tf archive.tar | sort -done -)" -echo exclude.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +)" +echo xform-h.at:39 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -mkdir dir -echo blues > dir/blues -echo jazz > dir/jazz -mkdir dir/folk -echo tagfile > dir/folk/tagfile -echo sanjuan > dir/folk/sanjuan -mkdir dir/rock -echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG -echo "test" > dir/rock/file -for option in exclude-caches exclude-caches-under exclude-caches-all -do - echo OPTION $option - tar -cf archive.tar --$option -v dir 2>err | sort - cat err - echo ARCHIVE - tar tf archive.tar | sort -done +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -for option in exclude-tag exclude-tag-under exclude-tag-all -do - echo OPTION $option - tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort - cat err - echo ARCHIVE - tar tf archive.tar | sort -done ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -mkdir dir -echo blues > dir/blues -echo jazz > dir/jazz -mkdir dir/folk -echo tagfile > dir/folk/tagfile -echo sanjuan > dir/folk/sanjuan -mkdir dir/rock -echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG -echo "test" > dir/rock/file -for option in exclude-caches exclude-caches-under exclude-caches-all -do - echo OPTION $option - tar -cf archive.tar --$option -v dir 2>err | sort - cat err - echo ARCHIVE - tar tf archive.tar | sort -done +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -for option in exclude-tag exclude-tag-under exclude-tag-all -do - echo OPTION $option - tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort - cat err - echo ARCHIVE - tar tf archive.tar | sort -done ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "OPTION exclude-caches -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped -ARCHIVE -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -OPTION exclude-caches-under -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -dir/rock/ -tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped -ARCHIVE -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -dir/rock/ -OPTION exclude-caches-all -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped -ARCHIVE -dir/ -dir/blues -dir/folk/ -dir/folk/sanjuan -dir/folk/tagfile -dir/jazz -OPTION exclude-tag -dir/ -dir/blues -dir/folk/ -dir/folk/tagfile -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped -ARCHIVE -dir/ -dir/blues -dir/folk/ -dir/folk/tagfile -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -OPTION exclude-tag-under -dir/ -dir/blues -dir/folk/ -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped -ARCHIVE -dir/ -dir/blues -dir/folk/ -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -OPTION exclude-tag-all -dir/ -dir/blues -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped -ARCHIVE -dir/ -dir/blues -dir/jazz -dir/rock/ -dir/rock/CACHEDIR.TAG -dir/rock/file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/exclude.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Default transform scope +test +Transforming hard links +test +Not transforming hard links +basedir/test +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/xform-h.at:39" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/xform-h.at:39: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * +mkdir basedir +echo \"hello\" > basedir/test +ln basedir/test basedir/test_link - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' - 13 ) # 13. delete01.at:23: deleting a member after a big one - at_setup_line='delete01.at:23' - at_desc="deleting a member after a big one" - $at_quiet $ECHO_N " 13: deleting a member after a big one $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "13. delete01.at:23: testing ..." - $at_traceon +)" +echo xform-h.at:39 >"$at_check_line_file" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' - $at_traceoff -echo "$at_srcdir/delete01.at:26: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive)" -echo delete01.at:26 >"$at_check_line_file" +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' - $at_traceoff -echo "$at_srcdir/delete01.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive)" -echo delete01.at:26 >"$at_check_line_file" +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' +) ) >"$at_stdout" 2>"$at_stderr" fi - -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * - -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Default transform scope +test +Transforming hard links +test +Not transforming hard links +basedir/test +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/xform-h.at:39" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/xform-h.at:39: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +mkdir basedir +echo \"hello\" > basedir/test +ln basedir/test basedir/test_link -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' - $at_traceoff -echo "$at_srcdir/delete01.at:26: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" -export TAR_OPTIONS -rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive)" -echo delete01.at:26 >"$at_check_line_file" +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +)" +echo xform-h.at:39 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5365,16 +5112,29 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link + + +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5383,35 +5143,45 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + - $at_traceoff -echo "$at_srcdir/delete01.at:26: +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Default transform scope +test +Transforming hard links +test +Not transforming hard links +basedir/test +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/xform-h.at:39" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/xform-h.at:39: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5420,20 +5190,31 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive)" -echo delete01.at:26 >"$at_check_line_file" +mkdir basedir +echo \"hello\" > basedir/test +ln basedir/test basedir/test_link -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + +)" +echo xform-h.at:39 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5442,16 +5223,29 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link + + +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -5460,35 +5254,45 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + - $at_traceoff -echo "$at_srcdir/delete01.at:26: +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Default transform scope +test +Transforming hard links +test +Not transforming hard links +basedir/test +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/xform-h.at:39" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/xform-h.at:39: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5497,20 +5301,31 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive)" -echo delete01.at:26 >"$at_check_line_file" +mkdir basedir +echo \"hello\" > basedir/test +ln basedir/test basedir/test_link -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + +)" +echo xform-h.at:39 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5519,16 +5334,29 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link + + +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -5537,241 +5365,154 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 50000 --file file1 -genfile -l 1024 --file file2 -tar cf archive file1 file2 -tar f archive --delete file2 -tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +mkdir basedir +echo "hello" > basedir/test +ln basedir/test basedir/test_link -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete01.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo "Default transform scope" +tar cf archive --transform="s,^basedir/,," basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' - echo 1 > "$at_status_file" - exit 1 + +echo "Transforming hard links" +tar cf archive --transform="s,^basedir/,,h" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + + +echo "Not transforming hard links" +tar cf archive --transform="s,^basedir/,,H" basedir/test basedir/test_link +tar tvf archive | sed -n 's/.*test_link link to //p' + +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Default transform scope +test +Transforming hard links +test +Not transforming hard links +basedir/test +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/xform-h.at:39" + +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceon - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 14 ) # 14. delete02.at:23: deleting a member from stdin archive - at_setup_line='delete02.at:23' - at_desc="deleting a member from stdin archive" - $at_quiet $ECHO_N " 14: deleting a member from stdin archive $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_12 +#AT_START_13 +# 13. xform01.at:26: transformations and GNU volume labels +at_setup_line='xform01.at:26' +at_desc="transformations and GNU volume labels" +$at_quiet $as_echo_n " 13: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "14. delete02.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "13. xform01.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/delete02.at:26: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + { $at_traceoff +$as_echo "$at_srcdir/xform01.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2)" -echo delete02.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +genfile --file file +tar -cf archive.tar -V /label/ file +tar tf archive.tar +)" +echo xform01.at:29 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +genfile --file file +tar -cf archive.tar -V /label/ file +tar tf archive.tar +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile --file file +tar -cf archive.tar -V /label/ file +tar tf archive.tar +) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "1 -2 -3 -separator -1 -3 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete02.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "/label/ +file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/xform01.at:29" -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2)" -echo delete02.at:26 >"$at_check_line_file" +$at_failed && at_func_log_failure +$at_traceon; } -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" -export TAR_OPTIONS -rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_13 +#AT_START_14 +# 14. exclude.at:23: exclude +at_setup_line='exclude.at:23' +at_desc="exclude" +$at_quiet $as_echo_n " 14: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "14. exclude.at:23: testing ..." + $at_traceon -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "1 -2 -3 -separator -1 -3 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon - $at_traceoff -echo "$at_srcdir/delete02.at:26: + { $at_traceoff +$as_echo "$at_srcdir/exclude.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5780,23 +5521,43 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2)" -echo delete02.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -if test -n "$at_trace_this"; then - ( $at_traceon; + +mkdir dir +echo blues > dir/blues +echo jazz > dir/jazz +mkdir dir/folk +echo tagfile > dir/folk/tagfile +echo sanjuan > dir/folk/sanjuan +mkdir dir/rock +echo \"Signature: 8a477f597d28d172789f06886806bc55\" > dir/rock/CACHEDIR.TAG +echo \"test\" > dir/rock/file + +for option in exclude-caches exclude-caches-under exclude-caches-all +do + echo OPTION \$option + tar -cf archive.tar --\$option -v dir 2>err | sort + cat err + echo ARCHIVE + tar tf archive.tar | sort +done + +for option in exclude-tag exclude-tag-under exclude-tag-all +do + echo OPTION \$option + tar -cf archive.tar --\${option}=tagfile -v dir 2>err | sort + cat err + echo ARCHIVE + tar tf archive.tar | sort +done +)" +echo exclude.at:26 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5805,19 +5566,41 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir dir +echo blues > dir/blues +echo jazz > dir/jazz +mkdir dir/folk +echo tagfile > dir/folk/tagfile +echo sanjuan > dir/folk/sanjuan +mkdir dir/rock +echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG +echo "test" > dir/rock/file + +for option in exclude-caches exclude-caches-under exclude-caches-all +do + echo OPTION $option + tar -cf archive.tar --$option -v dir 2>err | sort + cat err + echo ARCHIVE + tar tf archive.tar | sort +done + +for option in exclude-tag exclude-tag-under exclude-tag-all +do + echo OPTION $option + tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort + cat err + echo ARCHIVE + tar tf archive.tar | sort +done +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -5826,572 +5609,1011 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "1 -2 -3 -separator -1 -3 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - echo 1 > "$at_status_file" - exit 1 -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -$at_traceon - $at_traceoff -echo "$at_srcdir/delete02.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * +mkdir dir +echo blues > dir/blues +echo jazz > dir/jazz +mkdir dir/folk +echo tagfile > dir/folk/tagfile +echo sanjuan > dir/folk/sanjuan +mkdir dir/rock +echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG +echo "test" > dir/rock/file -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2)" -echo delete02.at:26 >"$at_check_line_file" +for option in exclude-caches exclude-caches-under exclude-caches-all +do + echo OPTION $option + tar -cf archive.tar --$option -v dir 2>err | sort + cat err + echo ARCHIVE + tar tf archive.tar | sort +done -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' +for option in exclude-tag exclude-tag-under exclude-tag-all +do + echo OPTION $option + tar -cf archive.tar --${option}=tagfile -v dir 2>err | sort + cat err + echo ARCHIVE + tar tf archive.tar | sort +done +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "OPTION exclude-caches +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped +ARCHIVE +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +OPTION exclude-caches-under +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +dir/rock/ +tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped +ARCHIVE +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +dir/rock/ +OPTION exclude-caches-all +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped +ARCHIVE +dir/ +dir/blues +dir/folk/ +dir/folk/sanjuan +dir/folk/tagfile +dir/jazz +OPTION exclude-tag +dir/ +dir/blues +dir/folk/ +dir/folk/tagfile +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped +ARCHIVE +dir/ +dir/blues +dir/folk/ +dir/folk/tagfile +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +OPTION exclude-tag-under +dir/ +dir/blues +dir/folk/ +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped +ARCHIVE +dir/ +dir/blues +dir/folk/ +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +OPTION exclude-tag-all +dir/ +dir/blues +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped +ARCHIVE +dir/ +dir/blues +dir/jazz +dir/rock/ +dir/rock/CACHEDIR.TAG +dir/rock/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude.at:26" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * - -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +$at_failed && at_func_log_failure +$at_traceon; } -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "1 -2 -3 -separator -1 -3 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_14 +#AT_START_15 +# 15. exclude01.at:17: exclude wildcards +at_setup_line='exclude01.at:17' +at_desc="exclude wildcards" +$at_quiet $as_echo_n " 15: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "15. exclude01.at:17: testing ..." + $at_traceon + - $at_traceoff -echo "$at_srcdir/delete02.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + + + + { $at_traceoff +$as_echo "$at_srcdir/exclude01.at:20: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2)" -echo delete02.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude=testdir/dir1/\\* \\ + --no-wildcards \\ + --exclude=testdir/dir2/\\* \\ + --wildcards \\ + --exclude=testdir/dir3/\\* \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir/dir1 +tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards \"testdir/dir1/*\" -f archive | sort + +rm -rf testdir +)" +echo exclude01.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 3073 -p zeros --file 1 -cp 1 2 -cp 2 3 -tar cf archive 1 2 3 -tar tf archive -cat archive | tar f - --delete 2 > archive2 -echo separator -tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "1 -2 -3 -separator -1 -3 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete02.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir2/ +testdir/dir2/file2 +testdir/dir3/ +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude01.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude01.at:20: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -$at_traceon +test -z "`sort < /dev/null 2>&1`" || exit 77 +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude=testdir/dir1/\\* \\ + --no-wildcards \\ + --exclude=testdir/dir2/\\* \\ + --wildcards \\ + --exclude=testdir/dir3/\\* \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir/dir1 +tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards \"testdir/dir1/*\" -f archive | sort + +rm -rf testdir +)" +echo exclude01.at:20 >"$at_check_line_file" - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * - 15 ) # 15. delete03.at:21: deleting members with long names - at_setup_line='delete03.at:21' - at_desc="deleting members with long names" - $at_quiet $ECHO_N " 15: deleting members with long names $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "15. delete03.at:21: testing ..." - $at_traceon +test -z "`sort < /dev/null 2>&1`" || exit 77 +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * +test -z "`sort < /dev/null 2>&1`" || exit 77 - $at_traceoff -echo "$at_srcdir/delete03.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir2/ +testdir/dir2/file2 +testdir/dir3/ +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude01.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude01.at:20: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -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 -rm -f \$prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch \$prefix\$i -done -tar -cf archive ./\$prefix* && - tar --delete -f archive ./\${prefix}5 && - tar -tf archive -)" -echo delete03.at:26 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude=testdir/dir1/\\* \\ + --no-wildcards \\ + --exclude=testdir/dir2/\\* \\ + --wildcards \\ + --exclude=testdir/dir3/\\* \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir/dir1 +tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards \"testdir/dir1/*\" -f archive | sort + +rm -rf testdir +)" +echo exclude01.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -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 -rm -f $prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch $prefix$i -done -tar -cf archive ./$prefix* && - tar --delete -f archive ./${prefix}5 && - tar -tf archive +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -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 -rm -f $prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch $prefix$i -done -tar -cf archive ./$prefix* && - tar --delete -f archive ./${prefix}5 && - tar -tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -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 -./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 -./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 -./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 -./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 -./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 -./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 -./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 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) ) >"$at_stdout" 2>"$at_stderr" fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete03.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir2/ +testdir/dir2/file2 +testdir/dir3/ +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude01.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude01.at:20: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -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 -rm -f \$prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch \$prefix\$i -done -tar -cf archive ./\$prefix* && - tar --delete -f archive ./\${prefix}5 && - tar -tf archive -)" -echo delete03.at:26 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude=testdir/dir1/\\* \\ + --no-wildcards \\ + --exclude=testdir/dir2/\\* \\ + --wildcards \\ + --exclude=testdir/dir3/\\* \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir/dir1 +tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards \"testdir/dir1/*\" -f archive | sort + +rm -rf testdir +)" +echo exclude01.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -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 -rm -f $prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch $prefix$i -done -tar -cf archive ./$prefix* && - tar --delete -f archive ./${prefix}5 && - tar -tf archive +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -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 -rm -f $prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch $prefix$i -done -tar -cf archive ./$prefix* && - tar --delete -f archive ./${prefix}5 && - tar -tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -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 -./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 -./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 -./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 -./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 -./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 -./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 -./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 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) ) >"$at_stdout" 2>"$at_stderr" fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/delete03.at:26: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir2/ +testdir/dir2/file2 +testdir/dir3/ +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude01.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude01.at:20: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -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 -rm -f \$prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch \$prefix\$i -done -tar -cf archive ./\$prefix* && - tar --delete -f archive ./\${prefix}5 && - tar -tf archive -)" -echo delete03.at:26 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude=testdir/dir1/\\* \\ + --no-wildcards \\ + --exclude=testdir/dir2/\\* \\ + --wildcards \\ + --exclude=testdir/dir3/\\* \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir/dir1 +tar t --no-wildcards \"testdir/dir1/*\" -f archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards \"testdir/dir1/*\" -f archive | sort + +rm -rf testdir +)" +echo exclude01.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -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 -rm -f $prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch $prefix$i -done -tar -cf archive ./$prefix* && - tar --delete -f archive ./${prefix}5 && - tar -tf archive +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -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 -rm -f $prefix* -for i in 1 2 3 4 5 6 7 8 9 -do touch $prefix$i -done -tar -cf archive ./$prefix* && - tar --delete -f archive ./${prefix}5 && - tar -tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -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 -./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 -./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 -./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 -./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 -./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 -./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 -./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 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude=testdir/dir1/\* \ + --no-wildcards \ + --exclude=testdir/dir2/\* \ + --wildcards \ + --exclude=testdir/dir3/\* \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir/dir1 +tar t --no-wildcards "testdir/dir1/*" -f archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards "testdir/dir1/*" -f archive | sort + +rm -rf testdir +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir2/ +testdir/dir2/file2 +testdir/dir3/ +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +NEXT +testdir/dir1/* +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude01.at:20" -$at_traceon - +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 16 ) # 16. delete04.at:23: deleting a large last member - at_setup_line='delete04.at:23' - at_desc="deleting a large last member" - $at_quiet $ECHO_N " 16: deleting a large last member $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_15 +#AT_START_16 +# 16. exclude02.at:17: exclude: anchoring +at_setup_line='exclude02.at:17' +at_desc="exclude: anchoring" +$at_quiet $as_echo_n " 16: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "16. delete04.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "16. exclude02.at:17: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/delete04.at:26: + { $at_traceoff +$as_echo "$at_srcdir/exclude02.at:20: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -6400,29 +6622,50 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -)" -echo delete04.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive --no-anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 2\" +tar cf archive --anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort -if test -n "$at_trace_this"; then - ( $at_traceon; +echo \"SUB 3\" +tar cf archive testdir file1.txt +tar t \"file1.txt\" -f archive | sort + +echo \"SUB 4\" +tar t --no-anchored \"file1.txt\" -f archive | sort + +echo \"SUB 5\" +tar t --anchored \"file1.txt\" -f archive | sort + +rm -rf testdir file1.txt + +)" +echo exclude02.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -6431,25 +6674,48 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -6458,52 +6724,74 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -file2 -file3 -file4 -file5 -file6 -file7 -file8 -file9 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort -$at_traceon +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort - $at_traceoff -echo "$at_srcdir/delete04.at:26: +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file2 +SUB 1 +testdir/ +testdir/file2 +SUB 2 +testdir/ +testdir/file1.txt +testdir/file2 +SUB 3 +file1.txt +SUB 4 +file1.txt +testdir/file1.txt +SUB 5 +file1.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude02.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude02.at:20: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -6512,29 +6800,50 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -)" -echo delete04.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive --no-anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 2\" +tar cf archive --anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 3\" +tar cf archive testdir file1.txt +tar t \"file1.txt\" -f archive | sort + +echo \"SUB 4\" +tar t --no-anchored \"file1.txt\" -f archive | sort -if test -n "$at_trace_this"; then - ( $at_traceon; +echo \"SUB 5\" +tar t --anchored \"file1.txt\" -f archive | sort + +rm -rf testdir file1.txt + +)" +echo exclude02.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -6543,25 +6852,48 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -6570,52 +6902,74 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -file2 -file3 -file4 -file5 -file6 -file7 -file8 -file9 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort -$at_traceon +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort - $at_traceoff -echo "$at_srcdir/delete04.at:26: +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file2 +SUB 1 +testdir/ +testdir/file2 +SUB 2 +testdir/ +testdir/file1.txt +testdir/file2 +SUB 3 +file1.txt +SUB 4 +file1.txt +testdir/file1.txt +SUB 5 +file1.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude02.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude02.at:20: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -6624,29 +6978,50 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -)" -echo delete04.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + -if test -n "$at_trace_this"; then - ( $at_traceon; +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive --no-anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 2\" +tar cf archive --anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 3\" +tar cf archive testdir file1.txt +tar t \"file1.txt\" -f archive | sort + +echo \"SUB 4\" +tar t --no-anchored \"file1.txt\" -f archive | sort + +echo \"SUB 5\" +tar t --anchored \"file1.txt\" -f archive | sort + +rm -rf testdir file1.txt + +)" +echo exclude02.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -6655,25 +7030,48 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -6682,52 +7080,74 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -file2 -file3 -file4 -file5 -file6 -file7 -file8 -file9 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort -$at_traceon +rm -rf testdir file1.txt - $at_traceoff -echo "$at_srcdir/delete04.at:26: +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file2 +SUB 1 +testdir/ +testdir/file2 +SUB 2 +testdir/ +testdir/file1.txt +testdir/file2 +SUB 3 +file1.txt +SUB 4 +file1.txt +testdir/file1.txt +SUB 5 +file1.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude02.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude02.at:20: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -6736,29 +7156,50 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -)" -echo delete04.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort -if test -n "$at_trace_this"; then - ( $at_traceon; +echo \"SUB 1\" +tar cf archive --no-anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 2\" +tar cf archive --anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 3\" +tar cf archive testdir file1.txt +tar t \"file1.txt\" -f archive | sort + +echo \"SUB 4\" +tar t --no-anchored \"file1.txt\" -f archive | sort + +echo \"SUB 5\" +tar t --anchored \"file1.txt\" -f archive | sort + +rm -rf testdir file1.txt + +)" +echo exclude02.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -6767,25 +7208,48 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -6794,52 +7258,74 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -file2 -file3 -file4 -file5 -file6 -file7 -file8 -file9 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 -$at_traceon +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort - $at_traceoff -echo "$at_srcdir/delete04.at:26: +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file2 +SUB 1 +testdir/ +testdir/file2 +SUB 2 +testdir/ +testdir/file1.txt +testdir/file2 +SUB 3 +file1.txt +SUB 4 +file1.txt +testdir/file1.txt +SUB 5 +file1.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude02.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude02.at:20: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -6848,29 +7334,50 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -)" -echo delete04.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive --no-anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort + +echo \"SUB 2\" +tar cf archive --anchored \\ + --exclude=\"file1.txt\" \\ + testdir +tar tf archive | sort -if test -n "$at_trace_this"; then - ( $at_traceon; +echo \"SUB 3\" +tar cf archive testdir file1.txt +tar t \"file1.txt\" -f archive | sort + +echo \"SUB 4\" +tar t --no-anchored \"file1.txt\" -f archive | sort + +echo \"SUB 5\" +tar t --anchored \"file1.txt\" -f archive | sort + +rm -rf testdir file1.txt + +)" +echo exclude02.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -6879,25 +7386,48 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 + +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort + +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort + +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort + +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort + +rm -rf testdir file1.txt + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -6906,76 +7436,98 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 3 -f file1 -genfile -l 5 -f file2 -genfile -l 3 -f file3 -genfile -l 6 -f file4 -genfile -l 24 -f file5 -genfile -l 13 -f file6 -genfile -l 1385 -f file7 -genfile -l 30 -f file8 -genfile -l 10 -f file9 -genfile -l 256000 -f file10 -tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 -tar f archive --delete file10 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -file2 -file3 -file4 -file5 -file6 -file7 -file8 -file9 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete04.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir +mkdir -p testdir +touch file1.txt +touch testdir/file1.txt +touch testdir/file2 -$at_traceon +tar cf archive --exclude="file1.txt" \ + testdir +tar tf archive | sort +echo "SUB 1" +tar cf archive --no-anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort +echo "SUB 2" +tar cf archive --anchored \ + --exclude="file1.txt" \ + testdir +tar tf archive | sort +echo "SUB 3" +tar cf archive testdir file1.txt +tar t "file1.txt" -f archive | sort - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +echo "SUB 4" +tar t --no-anchored "file1.txt" -f archive | sort - 17 ) # 17. delete05.at:27: deleting non-existing member - at_setup_line='delete05.at:27' - at_desc="deleting non-existing member" - $at_quiet $ECHO_N " 17: deleting non-existing member $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "17. delete05.at:27: testing ..." - $at_traceon +echo "SUB 5" +tar t --anchored "file1.txt" -f archive | sort +rm -rf testdir file1.txt + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file2 +SUB 1 +testdir/ +testdir/file2 +SUB 2 +testdir/ +testdir/file1.txt +testdir/file2 +SUB 3 +file1.txt +SUB 4 +file1.txt +testdir/file1.txt +SUB 5 +file1.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude02.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } $at_traceoff -echo "$at_srcdir/delete05.at:30: + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_16 +#AT_START_17 +# 17. exclude03.at:17: exclude: wildcards match slash +at_setup_line='exclude03.at:17' +at_desc="exclude: wildcards match slash" +$at_quiet $as_echo_n " 17: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "17. exclude03.at:17: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/exclude03.at:20: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -6984,24 +7536,46 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -)" -echo delete05.at:30 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\\*f\\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude='testdir*f*1' \\ + --no-wildcards-match-slash \\ + --exclude='testdir*f*2' \\ + --wildcards-match-slash \\ + --exclude='testdir*f*3' \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +)" +echo exclude03.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7010,20 +7584,44 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7032,42 +7630,70 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_failed=false -echo >>"$at_stderr"; echo "tar: tre: Not found in archive -tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "en -to -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* - echo 1 > "$at_status_file" - exit 1 -fi +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort -$at_traceon +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort - $at_traceoff -echo "$at_srcdir/delete05.at:30: +rm -rf testdir + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir1/* +testdir/dir2/ +testdir/dir2/* +testdir/dir2/file2 +testdir/dir3/ +testdir/dir3/* +NEXT +testdir/*f*1 +testdir/dir1/file1 +NEXT +testdir/*f*1 +NEXT +testdir/*f*1 +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude03.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude03.at:20: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7076,24 +7702,46 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -)" -echo delete05.at:30 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\\*f\\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude='testdir*f*1' \\ + --no-wildcards-match-slash \\ + --exclude='testdir*f*2' \\ + --wildcards-match-slash \\ + --exclude='testdir*f*3' \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +)" +echo exclude03.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7102,20 +7750,44 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7124,42 +7796,70 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_failed=false -echo >>"$at_stderr"; echo "tar: tre: Not found in archive -tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "en -to -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* - echo 1 > "$at_status_file" - exit 1 -fi +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort -$at_traceon +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort - $at_traceoff -echo "$at_srcdir/delete05.at:30: +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir1/* +testdir/dir2/ +testdir/dir2/* +testdir/dir2/file2 +testdir/dir3/ +testdir/dir3/* +NEXT +testdir/*f*1 +testdir/dir1/file1 +NEXT +testdir/*f*1 +NEXT +testdir/*f*1 +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude03.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude03.at:20: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7168,24 +7868,46 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -)" -echo delete05.at:30 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\\*f\\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude='testdir*f*1' \\ + --no-wildcards-match-slash \\ + --exclude='testdir*f*2' \\ + --wildcards-match-slash \\ + --exclude='testdir*f*3' \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +)" +echo exclude03.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7194,20 +7916,44 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7216,42 +7962,70 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_failed=false -echo >>"$at_stderr"; echo "tar: tre: Not found in archive -tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "en -to -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* - echo 1 > "$at_status_file" - exit 1 -fi +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort -$at_traceon +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort - $at_traceoff -echo "$at_srcdir/delete05.at:30: +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir1/* +testdir/dir2/ +testdir/dir2/* +testdir/dir2/file2 +testdir/dir3/ +testdir/dir3/* +NEXT +testdir/*f*1 +testdir/dir1/file1 +NEXT +testdir/*f*1 +NEXT +testdir/*f*1 +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude03.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude03.at:20: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7260,24 +8034,46 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -)" -echo delete05.at:30 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\\*f\\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude='testdir*f*1' \\ + --no-wildcards-match-slash \\ + --exclude='testdir*f*2' \\ + --wildcards-match-slash \\ + --exclude='testdir*f*3' \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +)" +echo exclude03.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7286,20 +8082,44 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7308,42 +8128,70 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_failed=false -echo >>"$at_stderr"; echo "tar: tre: Not found in archive -tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "en -to -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* - echo 1 > "$at_status_file" - exit 1 -fi +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort -$at_traceon +rm -rf testdir - $at_traceoff -echo "$at_srcdir/delete05.at:30: +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir1/* +testdir/dir2/ +testdir/dir2/* +testdir/dir2/file2 +testdir/dir3/ +testdir/dir3/* +NEXT +testdir/*f*1 +testdir/dir1/file1 +NEXT +testdir/*f*1 +NEXT +testdir/*f*1 +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude03.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude03.at:20: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7352,24 +8200,46 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -)" -echo delete05.at:30 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\\*f\\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\\* +touch testdir/dir2/file2 +touch testdir/dir2/\\* +touch testdir/dir3/file3 +touch testdir/dir3/\\* + +tar cf archive --exclude='testdir*f*1' \\ + --no-wildcards-match-slash \\ + --exclude='testdir*f*2' \\ + --wildcards-match-slash \\ + --exclude='testdir*f*3' \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo \"NEXT\" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +)" +echo exclude03.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7378,20 +8248,44 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* + +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort + +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7400,66 +8294,94 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f en -genfile -l 1024 -f to -tar cf archive en to -# Make sure we don't use bogus blocking factor. -# GNU tar up to and including 1.14.91 produced an empty archive this way: -tar --file archive --blocking-factor=20 --delete tre -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_failed=false -echo >>"$at_stderr"; echo "tar: tre: Not found in archive -tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "en -to -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/delete05.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +rm -rf testdir +mkdir -p testdir/dir1 testdir/dir2 testdir/dir3 +touch testdir/\*f\*1 +touch testdir/dir1/file1 +touch testdir/dir1/\* +touch testdir/dir2/file2 +touch testdir/dir2/\* +touch testdir/dir3/file3 +touch testdir/dir3/\* - echo 1 > "$at_status_file" - exit 1 -fi +tar cf archive --exclude='testdir*f*1' \ + --no-wildcards-match-slash \ + --exclude='testdir*f*2' \ + --wildcards-match-slash \ + --exclude='testdir*f*3' \ + testdir +tar tf archive | sort -$at_traceon +echo "NEXT" +tar cf archive testdir +tar t --wildcards 'testdir/*f*1' -f archive | sort +echo "NEXT" +tar t --wildcards --no-wildcards-match-slash 'testdir/*f*1' -f archive | sort +echo "NEXT" +tar t --wildcards --wildcards-match-slash 'testdir/*f*1' -f archive | sort + +rm -rf testdir + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir1/ +testdir/dir1/* +testdir/dir2/ +testdir/dir2/* +testdir/dir2/file2 +testdir/dir3/ +testdir/dir3/* +NEXT +testdir/*f*1 +testdir/dir1/file1 +NEXT +testdir/*f*1 +NEXT +testdir/*f*1 +testdir/dir1/file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude03.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 18 ) # 18. extrac01.at:23: extract over an existing directory - at_setup_line='extrac01.at:23' - at_desc="extract over an existing directory" - $at_quiet $ECHO_N " 18: extract over an existing directory $ECHO_C" - at_xfail=no + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_17 +#AT_START_18 +# 18. exclude04.at:17: exclude: case insensitive +at_setup_line='exclude04.at:17' +at_desc="exclude: case insensitive" +$at_quiet $as_echo_n " 18: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "18. extrac01.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "18. exclude04.at:17: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/extrac01.at:26: + { $at_traceoff +$as_echo "$at_srcdir/exclude04.at:20: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7468,38 +8390,98 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 -)" -echo extrac01.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \\ + --exclude=file1 \\ + --ignore-case \\ + --exclude=file3 \\ + --no-ignore-case \\ + --exclude=FILE2 \\ + --exclude=file4 \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo \"SUB 2\" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo \"SUB 3\" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +)" +echo exclude04.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7508,34 +8490,70 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort -$at_traceon +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort - $at_traceoff -echo "$at_srcdir/extrac01.at:26: +rm -rf testdir + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir/ +testdir/dir/File1 +testdir/dir/File2 +testdir/dir/File4 +testdir/file2 +SUB 1 +testdir/dir/File2 +SUB 2 +testdir/dir/File2 +testdir/file2 +SUB 3 +testdir/dir/File2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude04.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude04.at:20: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7544,20 +8562,49 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 -)" -echo extrac01.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \\ + --exclude=file1 \\ + --ignore-case \\ + --exclude=file3 \\ + --no-ignore-case \\ + --exclude=FILE2 \\ + --exclude=file4 \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo \"SUB 2\" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo \"SUB 3\" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +)" +echo exclude04.at:20 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7566,16 +8613,47 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7584,34 +8662,70 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort -$at_traceon +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort - $at_traceoff -echo "$at_srcdir/extrac01.at:26: +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir/ +testdir/dir/File1 +testdir/dir/File2 +testdir/dir/File4 +testdir/file2 +SUB 1 +testdir/dir/File2 +SUB 2 +testdir/dir/File2 +testdir/file2 +SUB 3 +testdir/dir/File2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude04.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude04.at:20: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7620,20 +8734,49 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 -)" -echo extrac01.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \\ + --exclude=file1 \\ + --ignore-case \\ + --exclude=file3 \\ + --no-ignore-case \\ + --exclude=FILE2 \\ + --exclude=file4 \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo \"SUB 2\" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo \"SUB 3\" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort -if test -n "$at_trace_this"; then - ( $at_traceon; +rm -rf testdir + +)" +echo exclude04.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7642,16 +8785,47 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -7660,34 +8834,70 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort -$at_traceon +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort - $at_traceoff -echo "$at_srcdir/extrac01.at:26: +rm -rf testdir + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir/ +testdir/dir/File1 +testdir/dir/File2 +testdir/dir/File4 +testdir/file2 +SUB 1 +testdir/dir/File2 +SUB 2 +testdir/dir/File2 +testdir/file2 +SUB 3 +testdir/dir/File2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude04.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude04.at:20: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7696,20 +8906,49 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 -)" -echo extrac01.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \\ + --exclude=file1 \\ + --ignore-case \\ + --exclude=file3 \\ + --no-ignore-case \\ + --exclude=FILE2 \\ + --exclude=file4 \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort -if test -n "$at_trace_this"; then - ( $at_traceon; +echo \"SUB 2\" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo \"SUB 3\" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +)" +echo exclude04.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7718,16 +8957,47 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -7736,34 +9006,70 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort -$at_traceon +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort - $at_traceoff -echo "$at_srcdir/extrac01.at:26: +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir/ +testdir/dir/File1 +testdir/dir/File2 +testdir/dir/File4 +testdir/file2 +SUB 1 +testdir/dir/File2 +SUB 2 +testdir/dir/File2 +testdir/file2 +SUB 3 +testdir/dir/File2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude04.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude04.at:20: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7772,20 +9078,49 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 -)" -echo extrac01.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 -if test -n "$at_trace_this"; then - ( $at_traceon; +tar cf archive --exclude=FILE2 \\ + --exclude=file1 \\ + --ignore-case \\ + --exclude=file3 \\ + --no-ignore-case \\ + --exclude=FILE2 \\ + --exclude=file4 \\ + testdir +tar tf archive | sort + +echo \"SUB 1\" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo \"SUB 2\" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo \"SUB 3\" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + +)" +echo exclude04.at:20 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7794,16 +9129,47 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 + +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort + +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort + +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort + +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort + +rm -rf testdir + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -7812,60 +9178,94 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar cf archive directory || exit 1 -tar xf archive || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac01.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir +mkdir -p testdir/dir +touch testdir/file1 +touch testdir/file2 +touch testdir/file3 +touch testdir/file4 +touch testdir/dir/File1 +touch testdir/dir/File2 +touch testdir/dir/File3 +touch testdir/dir/File4 -$at_traceon +tar cf archive --exclude=FILE2 \ + --exclude=file1 \ + --ignore-case \ + --exclude=file3 \ + --no-ignore-case \ + --exclude=FILE2 \ + --exclude=file4 \ + testdir +tar tf archive | sort +echo "SUB 1" +tar cf archive testdir +tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort +echo "SUB 2" +tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort +echo "SUB 3" +tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +rm -rf testdir - 19 ) # 19. extrac02.at:23: extracting symlinks over an existing file - at_setup_line='extrac02.at:23' - at_desc="extracting symlinks over an existing file" - $at_quiet $ECHO_N " 19: extracting symlinks over an existing file $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "19. extrac02.at:23: testing ..." - $at_traceon +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/dir/ +testdir/dir/File1 +testdir/dir/File2 +testdir/dir/File4 +testdir/file2 +SUB 1 +testdir/dir/File2 +SUB 2 +testdir/dir/File2 +testdir/file2 +SUB 3 +testdir/dir/File2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude04.at:20" + +$at_failed && at_func_log_failure +$at_traceon; } -# FIXME: Skip if symlinks are not supported on the system + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_18 +#AT_START_19 +# 19. exclude05.at:19: exclude: lots of excludes +at_setup_line='exclude05.at:19' +at_desc="exclude: lots of excludes" +$at_quiet $as_echo_n " 19: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "19. exclude05.at:19: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/extrac02.at:28: + + + { $at_traceoff +$as_echo "$at_srcdir/exclude05.at:22: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7874,22 +9274,37 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -)" -echo extrac02.at:28 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ + while read name + do + genfile --file \$name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +)" +echo exclude05.at:22 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7898,18 +9313,35 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -7918,36 +9350,54 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done -$at_traceon +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile - $at_traceoff -echo "$at_srcdir/extrac02.at:28: +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +NEXT +testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude05.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude05.at:22: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7956,22 +9406,37 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -)" -echo extrac02.at:28 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ + while read name + do + genfile --file \$name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +)" +echo exclude05.at:22 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -7980,18 +9445,35 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8000,36 +9482,54 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done -$at_traceon +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile - $at_traceoff -echo "$at_srcdir/extrac02.at:28: +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +NEXT +testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude05.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude05.at:22: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8038,22 +9538,37 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -)" -echo extrac02.at:28 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ + while read name + do + genfile --file \$name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +)" +echo exclude05.at:22 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8062,18 +9577,35 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8082,36 +9614,54 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done -$at_traceon +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile - $at_traceoff -echo "$at_srcdir/extrac02.at:28: +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +NEXT +testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude05.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude05.at:22: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8120,22 +9670,37 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -)" -echo extrac02.at:28 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ + while read name + do + genfile --file \$name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +)" +echo exclude05.at:22 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8144,18 +9709,35 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8164,36 +9746,54 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done -$at_traceon +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile - $at_traceoff -echo "$at_srcdir/extrac02.at:28: +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +NEXT +testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude05.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/exclude05.at:22: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8202,22 +9802,37 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive -)" -echo extrac02.at:28 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print \"testdir/file\" i; }}' < /dev/null | \\ + while read name + do + genfile --file \$name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print \"testdir/file\" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +echo \"NEXT\" +tar cf archive --exclude-from=exclfile \\ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + +)" +echo exclude05.at:22 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8226,18 +9841,35 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8246,60 +9878,180 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -touch file -ln -s file link 2> /dev/null || ln file link -tar cf archive link -rm link -touch link -tar xf archive + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +rm -rf testdir exclfile +mkdir -p testdir +awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \ + while read name + do + genfile --file $name + done + +awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile + +tar cf archive --anchored --exclude-from=exclfile \ + testdir +tar tf archive | sort + +echo "NEXT" +tar cf archive --exclude-from=exclfile \ + testdir +tar tf archive | sort + +rm -rf testdir exclfile + ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +NEXT +testdir/ +testdir/file10 +testdir/file11 +testdir/file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude05.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_19 +#AT_START_20 +# 20. exclude06.at:24: exclude: long files in pax archives +at_setup_line='exclude06.at:24' +at_desc="exclude: long files in pax archives" +$at_quiet $as_echo_n " 20: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "20. exclude06.at:24: testing ..." + $at_traceon - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 20 ) # 20. extrac03.at:23: extraction loops - at_setup_line='extrac03.at:23' - at_desc="extraction loops" - $at_quiet $ECHO_N " 20: extraction loops $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "20. extrac03.at:23: testing ..." - $at_traceon + { $at_traceoff +$as_echo "$at_srcdir/exclude06.at:29: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H pax\" +export TAR_OPTIONS +rm -rf * + + +install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null || exit 77 +genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt +genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c + +tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen +mkdir out +tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp +find out -type f +)" +echo exclude06.at:29 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS="-H pax" +export TAR_OPTIONS +rm -rf * + + +install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null || exit 77 +genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt +genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c + +tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen +mkdir out +tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp +find out -type f +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax +export TEST_TAR_FORMAT +TAR_OPTIONS="-H pax" +export TAR_OPTIONS +rm -rf * + + +install-sh -d one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen >/dev/null || exit 77 +genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.txt +genfile --length 20 -f one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c + +tar cf archive.tar one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen +mkdir out +tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp +find out -type f +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "out/one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen/1.c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/exclude06.at:29" + +$at_failed && at_func_log_failure +$at_traceon; } + $at_traceoff -echo "$at_srcdir/extrac03.at:26: + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_20 +#AT_START_21 +# 21. delete01.at:23: deleting a member after a big one +at_setup_line='delete01.at:23' +at_desc="deleting a member after a big one" +$at_quiet $as_echo_n " 21: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "21. delete01.at:23: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/delete01.at:26: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8308,19 +10060,16 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive)" -echo extrac03.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive)" +echo delete01.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8329,15 +10078,14 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8346,36 +10094,25 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/../directory/ -separator -directory/../directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete01.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac03.at:26: + { $at_traceoff +$as_echo "$at_srcdir/delete01.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8384,19 +10121,16 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive)" -echo extrac03.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive)" +echo delete01.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8405,15 +10139,14 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8422,36 +10155,25 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/../directory/ -separator -directory/../directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete01.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac03.at:26: + { $at_traceoff +$as_echo "$at_srcdir/delete01.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8460,19 +10182,16 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive)" -echo extrac03.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive)" +echo delete01.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8481,15 +10200,14 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8498,36 +10216,25 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/../directory/ -separator -directory/../directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete01.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac03.at:26: + { $at_traceoff +$as_echo "$at_srcdir/delete01.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8536,19 +10243,16 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive)" -echo extrac03.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive)" +echo delete01.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8557,15 +10261,14 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -8574,36 +10277,25 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/../directory/ -separator -directory/../directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete01.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac03.at:26: + { $at_traceoff +$as_echo "$at_srcdir/delete01.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8612,19 +10304,16 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive)" -echo extrac03.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive)" +echo delete01.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -8633,16 +10322,15 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; -mkdir gnu +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT @@ -8650,60 +10338,49 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -tar -cPvf archive directory/../directory -echo separator -tar -xPvf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile -l 50000 --file file1 +genfile -l 1024 --file file2 +tar cf archive file1 file2 +tar f archive --delete file2 +tar tf archive) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/../directory/ -separator -directory/../directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete01.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 21 ) # 21. extrac04.at:23: extract + fnmatch - at_setup_line='extrac04.at:23' - at_desc="extract + fnmatch" - $at_quiet $ECHO_N " 21: extract + fnmatch $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_21 +#AT_START_22 +# 22. delete02.at:23: deleting a member from stdin archive +at_setup_line='delete02.at:23' +at_desc="deleting a member from stdin archive" +$at_quiet $as_echo_n " 22: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "21. extrac04.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "22. delete02.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/extrac04.at:26: + { $at_traceoff +$as_echo "$at_srcdir/delete02.at:26: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8712,31 +10389,19 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2)" +echo delete02.at:26 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \\ - --exclude='./*1' \\ - --exclude='d*/*1' \\ - --exclude='d*/s*/*2' | sort -)" -echo extrac04.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8745,27 +10410,17 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -8774,48 +10429,33 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -directory/file2 -directory/subdirectory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 +2 +3 +separator +1 +3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete02.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac04.at:26: + { $at_traceoff +$as_echo "$at_srcdir/delete02.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8824,31 +10464,19 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2)" +echo delete02.at:26 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \\ - --exclude='./*1' \\ - --exclude='d*/*1' \\ - --exclude='d*/s*/*2' | sort -)" -echo extrac04.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8857,27 +10485,17 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -8886,48 +10504,33 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -directory/file2 -directory/subdirectory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 +2 +3 +separator +1 +3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete02.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac04.at:26: + { $at_traceoff +$as_echo "$at_srcdir/delete02.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8936,31 +10539,19 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2)" +echo delete02.at:26 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \\ - --exclude='./*1' \\ - --exclude='d*/*1' \\ - --exclude='d*/s*/*2' | sort -)" -echo extrac04.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8969,27 +10560,17 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -8998,48 +10579,33 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -directory/file2 -directory/subdirectory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 +2 +3 +separator +1 +3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete02.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac04.at:26: + { $at_traceoff +$as_echo "$at_srcdir/delete02.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9048,31 +10614,19 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2)" +echo delete02.at:26 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \\ - --exclude='./*1' \\ - --exclude='d*/*1' \\ - --exclude='d*/s*/*2' | sort -)" -echo extrac04.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9081,27 +10635,17 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9110,48 +10654,33 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -directory/file2 -directory/subdirectory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 +2 +3 +separator +1 +3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete02.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac04.at:26: + { $at_traceoff +$as_echo "$at_srcdir/delete02.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -9160,31 +10689,19 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2)" +echo delete02.at:26 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \\ - --exclude='./*1' \\ - --exclude='d*/*1' \\ - --exclude='d*/s*/*2' | sort -)" -echo extrac04.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -9193,27 +10710,17 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -9222,138 +10729,269 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - -touch file1 -mkdir directory -mkdir directory/subdirectory -touch directory/file1 -touch directory/file2 -touch directory/subdirectory/file1 -touch directory/subdirectory/file2 -tar -cf archive ./file1 directory -tar -tf archive \ - --exclude='./*1' \ - --exclude='d*/*1' \ - --exclude='d*/s*/*2' | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +genfile -l 3073 -p zeros --file 1 +cp 1 2 +cp 2 3 +tar cf archive 1 2 3 +tar tf archive +cat archive | tar f - --delete 2 > archive2 +echo separator +tar tf archive2) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -directory/file2 -directory/subdirectory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac04.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "1 +2 +3 +separator +1 +3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete02.at:26" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 22 ) # 22. extrac05.at:30: extracting selected members from pax - at_setup_line='extrac05.at:30' - at_desc="extracting selected members from pax" - $at_quiet $ECHO_N " 22: extracting selected members from pax $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_22 +#AT_START_23 +# 23. delete03.at:21: deleting members with long names +at_setup_line='delete03.at:21' +at_desc="deleting members with long names" +$at_quiet $as_echo_n " 23: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "22. extrac05.at:30: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "23. delete03.at:21: testing ..." + $at_traceon -cat >list <<'_ATEOF' -jeden -cztery -_ATEOF - $at_traceoff -echo "$at_srcdir/extrac05.at:38: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { $at_traceoff +$as_echo "$at_srcdir/delete03.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile --length 118 --file jeden -genfile --length 223 --file dwa -genfile --length 517 --file trzy -genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL -genfile --length 110 --file cztery -tar cf archive jeden dwa trzy cztery || exit 1 +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 +rm -f \$prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch \$prefix\$i +done +tar -cf archive ./\$prefix* && + tar --delete -f archive ./\${prefix}5 && + tar -tf archive +)" +echo delete03.at:26 >"$at_check_line_file" -mkdir dir -cd dir +if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -tar xvfT ../archive ../../list || exit 1 -cd .. +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 +rm -f $prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch $prefix$i +done +tar -cf archive ./$prefix* && + tar --delete -f archive ./${prefix}5 && + tar -tf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +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 +rm -f $prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch $prefix$i +done +tar -cf archive ./$prefix* && + tar --delete -f archive ./${prefix}5 && + tar -tf archive +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 +./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 +./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 +./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 +./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 +./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 +./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 +./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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete03.at:26" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/delete03.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +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 +rm -f \$prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch \$prefix\$i +done +tar -cf archive ./\$prefix* && + tar --delete -f archive ./\${prefix}5 && + tar -tf archive )" -echo extrac05.at:38 >"$at_check_line_file" +echo delete03.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' +if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +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 +rm -f $prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch $prefix$i +done +tar -cf archive ./$prefix* && + tar --delete -f archive ./${prefix}5 && + tar -tf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +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 +rm -f $prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch $prefix$i +done +tar -cf archive ./$prefix* && + tar --delete -f archive ./${prefix}5 && + tar -tf archive +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 +./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 +./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 +./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 +./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 +./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 +./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 +./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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete03.at:26" -if test -n "$at_trace_this"; then - ( $at_traceon; +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/delete03.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile --length 118 --file jeden -genfile --length 223 --file dwa -genfile --length 517 --file trzy -genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL -genfile --length 110 --file cztery -tar cf archive jeden dwa trzy cztery || exit 1 +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 +rm -f \$prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch \$prefix\$i +done +tar -cf archive ./\$prefix* && + tar --delete -f archive ./\${prefix}5 && + tar -tf archive +)" +echo delete03.at:26 >"$at_check_line_file" -mkdir dir -cd dir +if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -tar xvfT ../archive ../../list || exit 1 -cd .. +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 +rm -f $prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch $prefix$i +done +tar -cf archive ./$prefix* && + tar --delete -f archive ./${prefix}5 && + tar -tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9362,70 +11000,61 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile --length 118 --file jeden -genfile --length 223 --file dwa -genfile --length 517 --file trzy -genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL -genfile --length 110 --file cztery - -tar cf archive jeden dwa trzy cztery || exit 1 - -mkdir dir -cd dir - -tar xvfT ../archive ../../list || exit 1 -cd .. +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 +rm -f $prefix* +for i in 1 2 3 4 5 6 7 8 9 +do touch $prefix$i +done +tar -cf archive ./$prefix* && + tar --delete -f archive ./${prefix}5 && + tar -tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "jeden -cztery -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac05.at:38: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 +./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 +./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 +./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 +./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 +./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 +./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 +./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 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete03.at:26" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 23 ) # 23. extrac06.at:33: mode of extracted directories - at_setup_line='extrac06.at:33' - at_desc="mode of extracted directories" - $at_quiet $ECHO_N " 23: mode of extracted directories $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_23 +#AT_START_24 +# 24. delete04.at:23: deleting a large last member +at_setup_line='delete04.at:23' +at_desc="deleting a large last member" +$at_quiet $as_echo_n " 24: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "23. extrac06.at:33: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "24. delete04.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/extrac06.at:36: + { $at_traceoff +$as_echo "$at_srcdir/delete04.at:26: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -9434,43 +11063,25 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive )" -echo extrac06.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo delete04.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -9479,39 +11090,23 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -9520,61 +11115,42 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "777 -755 -755 -755 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 +file5 +file6 +file7 +file8 +file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete04.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac06.at:36: + { $at_traceoff +$as_echo "$at_srcdir/delete04.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -9583,43 +11159,25 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive )" -echo extrac06.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo delete04.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -9628,39 +11186,23 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -9669,61 +11211,42 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "777 -755 -755 -755 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 +file5 +file6 +file7 +file8 +file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete04.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac06.at:36: + { $at_traceoff +$as_echo "$at_srcdir/delete04.at:26: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -9732,84 +11255,50 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive +)" +echo delete04.at:26 >"$at_check_line_file" -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 -)" -echo extrac06.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -9818,61 +11307,42 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "777 -755 -755 -755 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 +file5 +file6 +file7 +file8 +file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete04.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac06.at:36: + { $at_traceoff +$as_echo "$at_srcdir/delete04.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9881,43 +11351,25 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive )" -echo extrac06.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo delete04.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9926,39 +11378,23 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -9967,61 +11403,42 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "777 -755 -755 -755 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 +file5 +file6 +file7 +file8 +file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete04.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac06.at:36: + { $at_traceoff +$as_echo "$at_srcdir/delete04.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10030,43 +11447,25 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive )" -echo extrac06.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo delete04.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10075,39 +11474,23 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10116,85 +11499,66 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -# Force umask -umask 022 - -# Make sure user's umask is honored, even if we are superuser -TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - -# Create a directory -mkdir directory -chmod 777 directory -genfile --stat=mode:777 directory - -# Archive it -tar cf arc directory - -# Change its permissions ... -chmod 755 directory -genfile --stat=mode:777 directory - -# ... and attempt to restore it twice -tar xf arc directory -genfile --stat=mode:777 directory - -tar xf arc directory -genfile --stat=mode:777 directory - -# After both restores, the directory mode should be 755 +genfile -l 3 -f file1 +genfile -l 5 -f file2 +genfile -l 3 -f file3 +genfile -l 6 -f file4 +genfile -l 24 -f file5 +genfile -l 13 -f file6 +genfile -l 1385 -f file7 +genfile -l 30 -f file8 +genfile -l 10 -f file9 +genfile -l 256000 -f file10 +tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 +tar f archive --delete file10 +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "777 -755 -755 -755 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac06.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +file3 +file4 +file5 +file6 +file7 +file8 +file9 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete04.at:26" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 24 ) # 24. extrac07.at:27: extracting symlinks to a read-only dir - at_setup_line='extrac07.at:27' - at_desc="extracting symlinks to a read-only dir" - $at_quiet $ECHO_N " 24: extracting symlinks to a read-only dir $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_24 +#AT_START_25 +# 25. delete05.at:27: deleting non-existing member +at_setup_line='delete05.at:27' +at_desc="deleting non-existing member" +$at_quiet $as_echo_n " 25: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "24. extrac07.at:27: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "25. delete05.at:27: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/extrac07.at:30: + { $at_traceoff +$as_echo "$at_srcdir/delete05.at:30: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -10203,32 +11567,20 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive )" -echo extrac07.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo delete05.at:30 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -10237,28 +11589,18 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -10267,53 +11609,33 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Prepare the directory -Create the archive -Extract -dir/ -dir/foo -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -else - ustar -fi +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete05.at:30" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac07.at:30: + { $at_traceoff +$as_echo "$at_srcdir/delete05.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -10322,32 +11644,20 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Create the archive -tar cf archive dir || exit 1 +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive +)" +echo delete05.at:30 >"$at_check_line_file" -chmod +w dir - -echo Extract -mkdir out -tar -C out -xvf archive -)" -echo extrac07.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -10356,28 +11666,18 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -10386,53 +11686,33 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Prepare the directory -Create the archive -Extract -dir/ -dir/foo -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -else - ustar -fi +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete05.at:30" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac07.at:30: + { $at_traceoff +$as_echo "$at_srcdir/delete05.at:30: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -10441,32 +11721,20 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive )" -echo extrac07.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo delete05.at:30 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -10475,28 +11743,18 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -10505,53 +11763,33 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Prepare the directory -Create the archive -Extract -dir/ -dir/foo -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -else - ustar -fi +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete05.at:30" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac07.at:30: + { $at_traceoff +$as_echo "$at_srcdir/delete05.at:30: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -10560,32 +11798,20 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive )" -echo extrac07.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo delete05.at:30 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -10594,28 +11820,18 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -10624,53 +11840,33 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Prepare the directory -Create the archive -Extract -dir/ -dir/foo -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -else - ustar -fi +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete05.at:30" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/extrac07.at:30: + { $at_traceoff +$as_echo "$at_srcdir/delete05.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10679,32 +11875,20 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 +genfile -l 1024 -f en +genfile -l 1024 -f to -chmod +w dir +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive +)" +echo delete05.at:30 >"$at_check_line_file" -echo Extract -mkdir out -tar -C out -xvf archive -)" -echo extrac07.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10713,28 +11897,18 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -10743,303 +11917,116 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -echo Prepare the directory -mkdir dir -genfile -f foo -cd dir -ln -s ../foo . -cd .. -chmod -w dir - -echo Create the archive -tar cf archive dir || exit 1 - -chmod +w dir +genfile -l 1024 -f en +genfile -l 1024 -f to -echo Extract -mkdir out -tar -C out -xvf archive +tar cf archive en to +# Make sure we don't use bogus blocking factor. +# GNU tar up to and including 1.14.91 produced an empty archive this way: +tar --file archive --blocking-factor=20 --delete tre +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Prepare the directory -Create the archive -Extract -dir/ -dir/foo -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/extrac07.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -else - ustar -fi - -$at_traceon - - - # Testing one format is enough - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 25 ) # 25. gzip.at:23: gzip - at_setup_line='gzip.at:23' - at_desc="gzip" - $at_quiet $ECHO_N " 25: gzip $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "25. gzip.at:23: testing ..." - $at_traceon - - - -unset TAR_OPTIONS - -$at_traceoff -echo "$at_srcdir/gzip.at:28: - -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 - -tar xfvz /dev/null -test \$? = 2 || exit 1 -" -echo gzip.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; - -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 - -tar xfvz /dev/null -test $? = 2 || exit 1 - ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; - -cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 - -tar xfvz /dev/null -test $? = 2 || exit 1 - ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo " -gzip: stdin: unexpected end of file -tar: Child returned status 1 +echo >>"$at_stderr"; $as_echo "tar: tre: Not found in archive tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/gzip.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "en +to +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/delete05.at:30" - echo 1 > "$at_status_file" - exit 1 -fi +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceon - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 26 ) # 26. incremental.at:23: incremental - at_setup_line='incremental.at:23' - at_desc="incremental" - $at_quiet $ECHO_N " 26: incremental $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_25 +#AT_START_26 +# 26. extrac01.at:23: extract over an existing directory +at_setup_line='extrac01.at:23' +at_desc="extract over an existing directory" +$at_quiet $as_echo_n " 26: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "26. incremental.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "26. extrac01.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/incremental.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { $at_traceoff +$as_echo "$at_srcdir/extrac01.at:26: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file - -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null - -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created \`on or after' the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 - -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 )" -echo incremental.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo extrac01.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file - -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null - -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created `on or after' the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 - -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file - -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null - -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created `on or after' the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 - -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "structure/ -separator -structure/ -structure/file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac01.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/incremental.at:26: + { $at_traceoff +$as_echo "$at_srcdir/extrac01.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11048,42 +12035,16 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file - -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +)" +echo extrac01.at:26 >"$at_check_line_file" -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created \`on or after' the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 - -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure -)" -echo incremental.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11092,38 +12053,14 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file - -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null - -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created `on or after' the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 - -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11132,60 +12069,82 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac01.at:26" -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null +$at_failed && at_func_log_failure +$at_traceon; } -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created `on or after' the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 + { $at_traceoff +$as_echo "$at_srcdir/extrac01.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +)" +echo extrac01.at:26 >"$at_check_line_file" -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "structure/ -separator -structure/ -structure/file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * - echo 1 > "$at_status_file" - exit 1 +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac01.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/incremental.at:26: + { $at_traceoff +$as_echo "$at_srcdir/extrac01.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11194,42 +12153,16 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file - -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null - -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created \`on or after' the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 - -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 )" -echo incremental.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo extrac01.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11238,38 +12171,14 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file - -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null - -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created `on or after' the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 - -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11278,84 +12187,23 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir structure -echo x >structure/file - -# On Nextstep (and perhaps other 4.3BSD systems), -# a newly created file's ctime isn't updated -# until the next sync or stat operation on the file. -ls -l structure/file >/dev/null - -# If the time of an initial backup and the creation time of a file contained -# in that backup are the same, the file will be backed up again when an -# incremental backup is done, because the incremental backup backs up -# files created `on or after' the initial backup time. Without the sleep -# command, behaviour of tar becomes variable, depending whether the system -# clock ticked over to the next second between creating the file and -# backing it up. -sleep 1 - -tar cf archive --listed=list structure -tar cfv archive --listed=list structure -echo separator -# ReiserFS often offsets the timestamps of newly created files -# 1 second to the past. Try to compensate for it, until a better -# solution is found. -sleep 2 -echo y >structure/file -tar cfv archive --listed=list structure +mkdir directory +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "structure/ -separator -structure/ -structure/file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incremental.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 27 ) # 27. incr01.at:27: restore broken symlinks from incremental - at_setup_line='incr01.at:27' - at_desc="restore broken symlinks from incremental" - $at_quiet $ECHO_N " 27: restore broken symlinks from incremental $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "27. incr01.at:27: testing ..." - $at_traceon - - +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac01.at:26" +$at_failed && at_func_log_failure +$at_traceon; } - - $at_traceoff -echo "$at_srcdir/incr01.at:30: + { $at_traceoff +$as_echo "$at_srcdir/extrac01.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11365,27 +12213,15 @@ export TAR_OPTIONS rm -rf * mkdir directory -\$as_ln_s foo directory/bar - -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory - -mv directory orig - -tar xvfg archive.0 /dev/null -echo separator -tar xvfg archive.1 /dev/null +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 )" -echo incr01.at:30 >"$at_check_line_file" +echo extrac01.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11395,23 +12231,13 @@ export TAR_OPTIONS rm -rf * mkdir directory -$as_ln_s foo directory/bar - -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory - -mv directory orig - -tar xvfg archive.0 /dev/null -echo separator -tar xvfg archive.1 /dev/null +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11421,46 +12247,113 @@ export TAR_OPTIONS rm -rf * mkdir directory -$as_ln_s foo directory/bar +touch directory/file +tar cf archive directory || exit 1 +tar xf archive --warning=no-timestamp || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac01.at:26" -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory +$at_failed && at_func_log_failure +$at_traceon; } -mv directory orig -tar xvfg archive.0 /dev/null -echo separator -tar xvfg archive.1 /dev/null -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -directory/bar -separator -directory/ -tar: Deleting \`directory/bar' -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_26 +#AT_START_27 +# 27. extrac02.at:23: extracting symlinks over an existing file +at_setup_line='extrac02.at:23' +at_desc="extracting symlinks over an existing file" +$at_quiet $as_echo_n " 27: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "27. extrac02.at:23: testing ..." + $at_traceon - echo 1 > "$at_status_file" - exit 1 + +# FIXME: Skip if symlinks are not supported on the system + + + + { $at_traceoff +$as_echo "$at_srcdir/extrac02.at:28: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +)" +echo extrac02.at:28 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac02.at:28" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/incr01.at:30: + { $at_traceoff +$as_echo "$at_srcdir/extrac02.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11469,28 +12362,18 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -\$as_ln_s foo directory/bar - -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory - -mv directory orig - -tar xvfg archive.0 /dev/null -echo separator -tar xvfg archive.1 /dev/null +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive )" -echo incr01.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo extrac02.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11499,24 +12382,16 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -$as_ln_s foo directory/bar - -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory - -mv directory orig - -tar xvfg archive.0 /dev/null -echo separator -tar xvfg archive.1 /dev/null +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11525,47 +12400,90 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -$as_ln_s foo directory/bar +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac02.at:28" -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory +$at_failed && at_func_log_failure +$at_traceon; } -mv directory orig + { $at_traceoff +$as_echo "$at_srcdir/extrac02.at:28: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -tar xvfg archive.0 /dev/null -echo separator -tar xvfg archive.1 /dev/null -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +)" +echo extrac02.at:28 >"$at_check_line_file" -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -directory/bar -separator -directory/ -tar: Deleting \`directory/bar' -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * - echo 1 > "$at_status_file" - exit 1 +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac02.at:28" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/incr01.at:30: + { $at_traceoff +$as_echo "$at_srcdir/extrac02.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11574,28 +12492,18 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir directory -\$as_ln_s foo directory/bar - -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory - -mv directory orig - -tar xvfg archive.0 /dev/null -echo separator -tar xvfg archive.1 /dev/null +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive )" -echo incr01.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo extrac02.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11604,24 +12512,16 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -$as_ln_s foo directory/bar - -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory - -mv directory orig - -tar xvfg archive.0 /dev/null -echo separator -tar xvfg archive.1 /dev/null +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -11630,71 +12530,25 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -$as_ln_s foo directory/bar +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac02.at:28" -tar -cf archive.0 -g db directory -rm directory/bar -tar -cf archive.1 -g db directory +$at_failed && at_func_log_failure +$at_traceon; } -mv directory orig - -tar xvfg archive.0 /dev/null -echo separator -tar xvfg archive.1 /dev/null -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -directory/bar -separator -directory/ -tar: Deleting \`directory/bar' -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr01.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 28 ) # 28. incr02.at:32: restoring timestamps from incremental - at_setup_line='incr02.at:32' - at_desc="restoring timestamps from incremental" - $at_quiet $ECHO_N " 28: restoring timestamps from incremental $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "28. incr02.at:32: testing ..." - $at_traceon - - - - - - $at_traceoff -echo "$at_srcdir/incr02.at:35: + { $at_traceoff +$as_echo "$at_srcdir/extrac02.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11703,51 +12557,18 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file - -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts - -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, \`dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. - -tar -cf archive -g db dir - -# Move away the directory -mv dir orig - -# Wait enough time for timestamps to differ in case of failure. -sleep 5 - -# Restore the directory -tar -xf archive dir - -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive )" -echo incr02.at:35 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a `...` command substitution)' -fi +echo extrac02.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11756,47 +12577,16 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file - -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts - -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, `dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. - -tar -cf archive -g db dir - -# Move away the directory -mv dir orig - -# Wait enough time for timestamps to differ in case of failure. -sleep 5 - -# Restore the directory -tar -xf archive dir - -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -11805,65 +12595,109 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file +touch file +ln -s file link 2> /dev/null || ln file link +tar cf archive link +rm link +touch link +tar xf archive +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac02.at:28" -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts +$at_failed && at_func_log_failure +$at_traceon; } -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, `dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. -tar -cf archive -g db dir -# Move away the directory -mv dir orig -# Wait enough time for timestamps to differ in case of failure. -sleep 5 + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_27 +#AT_START_28 +# 28. extrac03.at:23: extraction loops +at_setup_line='extrac03.at:23' +at_desc="extraction loops" +$at_quiet $as_echo_n " 28: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "28. extrac03.at:23: testing ..." + $at_traceon -# Restore the directory -tar -xf archive dir -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - echo 1 > "$at_status_file" - exit 1 + { $at_traceoff +$as_echo "$at_srcdir/extrac03.at:26: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp)" +echo extrac03.at:26 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac03.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/incr02.at:35: + { $at_traceoff +$as_echo "$at_srcdir/extrac03.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11872,51 +12706,15 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file - -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts - -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, \`dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. - -tar -cf archive -g db dir - -# Move away the directory -mv dir orig - -# Wait enough time for timestamps to differ in case of failure. -sleep 5 - -# Restore the directory -tar -xf archive dir - -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -)" -echo incr02.at:35 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a `...` command substitution)' -fi +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp)" +echo extrac03.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11925,47 +12723,13 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file - -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts - -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, `dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. - -tar -cf archive -g db dir - -# Move away the directory -mv dir orig - -# Wait enough time for timestamps to differ in case of failure. -sleep 5 - -# Restore the directory -tar -xf archive dir - -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -11974,65 +12738,86 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file - -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac03.at:26" -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, `dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. +$at_failed && at_func_log_failure +$at_traceon; } -tar -cf archive -g db dir + { $at_traceoff +$as_echo "$at_srcdir/extrac03.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -# Move away the directory -mv dir orig +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp)" +echo extrac03.at:26 >"$at_check_line_file" -# Wait enough time for timestamps to differ in case of failure. -sleep 5 +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -# Restore the directory -tar -xf archive dir +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac03.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/incr02.at:35: + { $at_traceoff +$as_echo "$at_srcdir/extrac03.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12041,51 +12826,15 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file - -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts - -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, \`dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. - -tar -cf archive -g db dir - -# Move away the directory -mv dir orig - -# Wait enough time for timestamps to differ in case of failure. -sleep 5 - -# Restore the directory -tar -xf archive dir - -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -)" -echo incr02.at:35 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a `...` command substitution)' -fi +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp)" +echo extrac03.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12094,47 +12843,13 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file - -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts - -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, `dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. - -tar -cf archive -g db dir - -# Move away the directory -mv dir orig - -# Wait enough time for timestamps to differ in case of failure. -sleep 5 - -# Restore the directory -tar -xf archive dir - -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -12143,131 +12858,58 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -# Create directory structure -mkdir dir -mkdir dir/subdir1 -mkdir dir/subdir2 -genfile --length 10 --file dir/subdir1/file - -# Save mtime for later comparison -genfile --stat=mtime dir/subdir1 > ts - -# Create an archive. Using incremental mode makes sure the -# archive will have a directory-first member ordering, -# i.e.: -# dir/ -# dir/subdir1/ -# dir/subdir2/ -# dir/subdir1/foofile -# -# When restoring from this directory structure, `dir/subdir2/' used to -# trigger apply_nonancestor_delayed_set_stat() which restored stats for -# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the -# latter clobbered the directory timestamp. - -tar -cf archive -g db dir - -# Move away the directory -mv dir orig - -# Wait enough time for timestamps to differ in case of failure. -sleep 5 - -# Restore the directory -tar -xf archive dir - -# Check the timestamp -genfile --stat=mtime dir/subdir1 | diff ts - -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr02.at:35: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac03.at:26" - echo 1 > "$at_status_file" - exit 1 -fi +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceon + { $at_traceoff +$as_echo "$at_srcdir/extrac03.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * +mkdir directory +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp)" +echo extrac03.at:26 >"$at_check_line_file" - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 29 ) # 29. listed01.at:26: --listed for individual files - at_setup_line='listed01.at:26' - at_desc="--listed for individual files" - $at_quiet $ECHO_N " 29: --listed for individual files $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "29. listed01.at:26: testing ..." - $at_traceon - - - - - - $at_traceoff -echo "$at_srcdir/listed01.at:29: +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 - -tar --create \\ - --file=archive.1 \\ - --listed-incremental=listing \\ - directory/file* - -tar tf archive.1 || exit 1 - -sleep 2 - -genfile --length 10240 --pattern zeros --file directory/file2 - -echo \"separator\" - -tar --create \\ - --file=archive.2 \\ - --listed-incremental=listing \\ - directory/file* || exit 1 - -tar tf archive.2 || exit 1 -)" -echo listed01.at:29 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12277,94 +12919,145 @@ export TAR_OPTIONS rm -rf * mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 +tar -cPvf archive directory/../directory +echo separator +tar -xPvf archive --warning=no-timestamp) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/../directory/ +separator +directory/../directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac03.at:26" -tar --create \ - --file=archive.1 \ - --listed-incremental=listing \ - directory/file* +$at_failed && at_func_log_failure +$at_traceon; } -tar tf archive.1 || exit 1 -sleep 2 -genfile --length 10240 --pattern zeros --file directory/file2 -echo "separator" + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_28 +#AT_START_29 +# 29. extrac04.at:23: extract + fnmatch +at_setup_line='extrac04.at:23' +at_desc="extract + fnmatch" +$at_quiet $as_echo_n " 29: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "29. extrac04.at:23: testing ..." + $at_traceon -tar --create \ - --file=archive.2 \ - --listed-incremental=listing \ - directory/file* || exit 1 -tar tf archive.2 || exit 1 -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + + + + { $at_traceoff +$as_echo "$at_srcdir/extrac04.at:26: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +touch file1 mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \\ + --exclude='./*1' \\ + --exclude='d*/*1' \\ + --exclude='d*/s*/*2' | sort +)" +echo extrac04.at:26 >"$at_check_line_file" -tar --create \ - --file=archive.1 \ - --listed-incremental=listing \ - directory/file* +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -tar tf archive.1 || exit 1 -sleep 2 +test -z "`sort < /dev/null 2>&1`" || exit 77 -genfile --length 10240 --pattern zeros --file directory/file2 +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -echo "separator" -tar --create \ - --file=archive.2 \ - --listed-incremental=listing \ - directory/file* || exit 1 +test -z "`sort < /dev/null 2>&1`" || exit 77 -tar tf archive.2 || exit 1 +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/file1 -separator +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/listed01.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +directory/subdirectory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac04.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/listed01.at:29: + { $at_traceoff +$as_echo "$at_srcdir/extrac04.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12373,40 +13066,27 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 - -tar --create \\ - --file=archive.1 \\ - --listed-incremental=listing \\ - directory/file* - -tar tf archive.1 || exit 1 - -sleep 2 - -genfile --length 10240 --pattern zeros --file directory/file2 - -echo \"separator\" -tar --create \\ - --file=archive.2 \\ - --listed-incremental=listing \\ - directory/file* || exit 1 +test -z "`sort < /dev/null 2>&1`" || exit 77 -tar tf archive.2 || exit 1 +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \\ + --exclude='./*1' \\ + --exclude='d*/*1' \\ + --exclude='d*/s*/*2' | sort )" -echo listed01.at:29 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo extrac04.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12415,36 +13095,25 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 - -tar --create \ - --file=archive.1 \ - --listed-incremental=listing \ - directory/file* - -tar tf archive.1 || exit 1 - -sleep 2 - -genfile --length 10240 --pattern zeros --file directory/file2 - -echo "separator" -tar --create \ - --file=archive.2 \ - --listed-incremental=listing \ - directory/file* || exit 1 +test -z "`sort < /dev/null 2>&1`" || exit 77 -tar tf archive.2 || exit 1 +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -12453,154 +13122,259 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -# Let the things settle -sleep 1 - -tar --create \ - --file=archive.1 \ - --listed-incremental=listing \ - directory/file* -tar tf archive.1 || exit 1 - -sleep 2 +test -z "`sort < /dev/null 2>&1`" || exit 77 -genfile --length 10240 --pattern zeros --file directory/file2 - -echo "separator" - -tar --create \ - --file=archive.2 \ - --listed-incremental=listing \ - directory/file* || exit 1 - -tar tf archive.2 || exit 1 +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/file1 -separator +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/listed01.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +directory/subdirectory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac04.at:26" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi + { $at_traceoff +$as_echo "$at_srcdir/extrac04.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -$at_traceon +test -z "`sort < /dev/null 2>&1`" || exit 77 + +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \\ + --exclude='./*1' \\ + --exclude='d*/*1' \\ + --exclude='d*/s*/*2' | sort +)" +echo extrac04.at:26 >"$at_check_line_file" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +test -z "`sort < /dev/null 2>&1`" || exit 77 - 30 ) # 30. listed02.at:28: working --listed - at_setup_line='listed02.at:28' - at_desc="working --listed" - $at_quiet $ECHO_N " 30: working --listed $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "30. listed02.at:28: testing ..." - $at_traceon +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * +test -z "`sort < /dev/null 2>&1`" || exit 77 +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/file2 +directory/subdirectory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac04.at:26" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/listed02.at:31: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { $at_traceoff +$as_echo "$at_srcdir/extrac04.at:26: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -echo Create directories +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \\ + --exclude='./*1' \\ + --exclude='d*/*1' \\ + --exclude='d*/s*/*2' | sort +)" +echo extrac04.at:26 >"$at_check_line_file" -mkdir tart -sleep 1 -mkdir tart/c0 -sleep 1 -mkdir tart/c1 -sleep 1 +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 -do - echo File \$file > \$file - sleep 1 -done -sleep 1 -echo Creating main archive -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 +test -z "`sort < /dev/null 2>&1`" || exit 77 -# The above prints two lines to stderr announcing the new directories c0 and c1. -# Ensure that they appear in this script's stderr in sorted order. -sort err 1>&2; rm -f err +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -sleep 1 -echo Modifying filesystem -rm tart/a1 -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 +test -z "`sort < /dev/null 2>&1`" || exit 77 -echo Directory contents -find tart -print | sort 2>/dev/null +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/file2 +directory/subdirectory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac04.at:26" -sleep 1 -echo Creating incremental archive -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 +$at_failed && at_func_log_failure +$at_traceon; } -sleep 1 + { $at_traceoff +$as_echo "$at_srcdir/extrac04.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -rm -rf tart/* -echo Extracting main archive -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null -echo Final files: -find tart -print | sort 2>/dev/null -)" -echo listed02.at:31 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \\ + --exclude='./*1' \\ + --exclude='d*/*1' \\ + --exclude='d*/s*/*2' | sort +)" +echo extrac04.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12612,64 +13386,22 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -echo Create directories - -mkdir tart -sleep 1 -mkdir tart/c0 -sleep 1 -mkdir tart/c1 -sleep 1 - -for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 -do - echo File $file > $file - sleep 1 -done - -sleep 1 -echo Creating main archive -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 - -# The above prints two lines to stderr announcing the new directories c0 and c1. -# Ensure that they appear in this script's stderr in sorted order. -sort err 1>&2; rm -f err - -sleep 1 -echo Modifying filesystem -rm tart/a1 - -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 - -echo Directory contents -find tart -print | sort 2>/dev/null - -sleep 1 -echo Creating incremental archive -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 - -sleep 1 - -rm -rf tart/* -echo Extracting main archive -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null - -echo Final files: -find tart -print | sort 2>/dev/null +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -12681,1224 +13413,1097 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -echo Create directories +touch file1 +mkdir directory +mkdir directory/subdirectory +touch directory/file1 +touch directory/file2 +touch directory/subdirectory/file1 +touch directory/subdirectory/file2 +tar -cf archive ./file1 directory +tar -tf archive \ + --exclude='./*1' \ + --exclude='d*/*1' \ + --exclude='d*/s*/*2' | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/file2 +directory/subdirectory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac04.at:26" -mkdir tart -sleep 1 -mkdir tart/c0 -sleep 1 -mkdir tart/c1 -sleep 1 +$at_failed && at_func_log_failure +$at_traceon; } -for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 -do - echo File $file > $file - sleep 1 -done -sleep 1 -echo Creating main archive -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 -# The above prints two lines to stderr announcing the new directories c0 and c1. -# Ensure that they appear in this script's stderr in sorted order. -sort err 1>&2; rm -f err -sleep 1 -echo Modifying filesystem -rm tart/a1 + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_29 +#AT_START_30 +# 30. extrac05.at:30: extracting selected members from pax +at_setup_line='extrac05.at:30' +at_desc="extracting selected members from pax" +$at_quiet $as_echo_n " 30: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "30. extrac05.at:30: testing ..." + $at_traceon -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 -echo Directory contents -find tart -print | sort 2>/dev/null -sleep 1 -echo Creating incremental archive -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 +cat >list <<'_ATEOF' +jeden +cztery +_ATEOF -sleep 1 -rm -rf tart/* -echo Extracting main archive -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null -echo Final files: -find tart -print | sort 2>/dev/null -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -echo >>"$at_stderr"; echo "tar: tart/c0: Directory is new -tar: tart/c1: Directory is new -tar: tart/c2: Directory has been renamed from \`tart/c1' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Create directories -Creating main archive -tart/ -tart/c0/ -tart/c1/ -tart/a1 -tart/b1 -tart/c0/cq1 -tart/c0/cq2 -tart/c1/ca1 -tart/c1/ca2 -Modifying filesystem -Directory contents -tart -tart/b2 -tart/c0 -tart/c0/cq1 -tart/c0/cq2 -tart/c2 -tart/c2/ca1 -tart/c2/ca2 -tart/c2/ca3 -Creating incremental archive -tart/ -tart/c0/ -tart/c2/ -tart/b2 -tart/c2/ca3 -Extracting main archive -tart/ -tart/c0/ -tart/c1/ -tart/a1 -tart/b1 -tart/c0/cq1 -tart/c0/cq2 -tart/c1/ca1 -tart/c1/ca2 -Extracting incremental archive -tar: Deleting \`tart/a1' -tar: Deleting \`tart/b1' -tart/ -tart/b2 -tart/c0/ -tart/c2/ -tart/c2/ca3 -Final files: -tart -tart/b2 -tart/c0 -tart/c0/cq1 -tart/c0/cq2 -tart/c2 -tart/c2/ca1 -tart/c2/ca2 -tart/c2/ca3 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/listed02.at:31: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then + { $at_traceoff +$as_echo "$at_srcdir/extrac05.at:38: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77 +genfile --length 118 --file jeden +genfile --length 223 --file dwa +genfile --length 517 --file trzy +genfile --length 110 --file cztery +tar cf archive jeden dwa trzy cztery || exit 1 - echo 1 > "$at_status_file" - exit 1 -fi +mkdir dir +cd dir -$at_traceon +tar xvfT ../archive ../../list --warning=no-timestamp || exit 1 - $at_traceoff -echo "$at_srcdir/listed02.at:31: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +cd .. +)" +echo extrac05.at:38 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77 +genfile --length 118 --file jeden +genfile --length 223 --file dwa +genfile --length 517 --file trzy +genfile --length 110 --file cztery -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar cf archive jeden dwa trzy cztery || exit 1 -echo Create directories +mkdir dir +cd dir -mkdir tart -sleep 1 -mkdir tart/c0 -sleep 1 -mkdir tart/c1 -sleep 1 +tar xvfT ../archive ../../list --warning=no-timestamp || exit 1 -for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 -do - echo File \$file > \$file - sleep 1 -done +cd .. +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -sleep 1 -echo Creating main archive -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 +genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL || exit 77 +genfile --length 118 --file jeden +genfile --length 223 --file dwa +genfile --length 517 --file trzy +genfile --length 110 --file cztery -# The above prints two lines to stderr announcing the new directories c0 and c1. -# Ensure that they appear in this script's stderr in sorted order. -sort err 1>&2; rm -f err +tar cf archive jeden dwa trzy cztery || exit 1 -sleep 1 -echo Modifying filesystem -rm tart/a1 +mkdir dir +cd dir -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 +tar xvfT ../archive ../../list --warning=no-timestamp || exit 1 -echo Directory contents -find tart -print | sort 2>/dev/null +cd .. +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "jeden +cztery +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac05.at:38" -sleep 1 -echo Creating incremental archive -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 +$at_failed && at_func_log_failure +$at_traceon; } -sleep 1 -rm -rf tart/* -echo Extracting main archive -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null -echo Final files: -find tart -print | sort 2>/dev/null -)" -echo listed02.at:31 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_30 +#AT_START_31 +# 31. extrac06.at:33: mode of extracted directories +at_setup_line='extrac06.at:33' +at_desc="mode of extracted directories" +$at_quiet $as_echo_n " 31: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "31. extrac06.at:33: testing ..." + $at_traceon -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + + + + { $at_traceoff +$as_echo "$at_srcdir/extrac06.at:36: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +# Force umask +umask 022 -echo Create directories +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" -mkdir tart -sleep 1 -mkdir tart/c0 -sleep 1 -mkdir tart/c1 -sleep 1 +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 -do - echo File $file > $file - sleep 1 -done +# Archive it +tar cf arc directory -sleep 1 -echo Creating main archive -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -# The above prints two lines to stderr announcing the new directories c0 and c1. -# Ensure that they appear in this script's stderr in sorted order. -sort err 1>&2; rm -f err +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -sleep 1 -echo Modifying filesystem -rm tart/a1 +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 +# After both restores, the directory mode should be 755 +)" +echo extrac06.at:36 >"$at_check_line_file" -echo Directory contents -find tart -print | sort 2>/dev/null +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -sleep 1 -echo Creating incremental archive -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 -sleep 1 +# Force umask +umask 022 -rm -rf tart/* -echo Extracting main archive -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" -echo Final files: -find tart -print | sort 2>/dev/null +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + + +# Force umask +umask 022 + +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" + +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory + +# Archive it +tar cf arc directory + +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory + +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory + +# After both restores, the directory mode should be 755 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 +755 +755 +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac06.at:36" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/extrac06.at:36: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +# Force umask +umask 022 -echo Create directories +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" -mkdir tart -sleep 1 -mkdir tart/c0 -sleep 1 -mkdir tart/c1 -sleep 1 +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 -do - echo File $file > $file - sleep 1 -done +# Archive it +tar cf arc directory -sleep 1 -echo Creating main archive -tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -# The above prints two lines to stderr announcing the new directories c0 and c1. -# Ensure that they appear in this script's stderr in sorted order. -sort err 1>&2; rm -f err +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -sleep 1 -echo Modifying filesystem -rm tart/a1 +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -mv tart/b1 tart/b2 -mv tart/c1 tart/c2 -touch tart/c2/ca3 +# After both restores, the directory mode should be 755 +)" +echo extrac06.at:36 >"$at_check_line_file" -echo Directory contents -find tart -print | sort 2>/dev/null +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -sleep 1 -echo Creating incremental archive -cp -p tart.incr1 tart.incr2 -tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 -sleep 1 +# Force umask +umask 022 -rm -rf tart/* -echo Extracting main archive -tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 -echo Extracting incremental archive -# This command should produce three messages about deletion -# of the existing files, that may appear in any order. Piping -# to sort makes sure we don't depend on any particular ordering. -tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" -echo Final files: -find tart -print | sort 2>/dev/null -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -at_failed=false -echo >>"$at_stderr"; echo "tar: tart/c0: Directory is new -tar: tart/c1: Directory is new -tar: tart/c2: Directory has been renamed from \`tart/c1' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Create directories -Creating main archive -tart/ -tart/c0/ -tart/c1/ -tart/a1 -tart/b1 -tart/c0/cq1 -tart/c0/cq2 -tart/c1/ca1 -tart/c1/ca2 -Modifying filesystem -Directory contents -tart -tart/b2 -tart/c0 -tart/c0/cq1 -tart/c0/cq2 -tart/c2 -tart/c2/ca1 -tart/c2/ca2 -tart/c2/ca3 -Creating incremental archive -tart/ -tart/c0/ -tart/c2/ -tart/b2 -tart/c2/ca3 -Extracting main archive -tart/ -tart/c0/ -tart/c1/ -tart/a1 -tart/b1 -tart/c0/cq1 -tart/c0/cq2 -tart/c1/ca1 -tart/c1/ca2 -Extracting incremental archive -tar: Deleting \`tart/a1' -tar: Deleting \`tart/b1' -tart/ -tart/b2 -tart/c0/ -tart/c2/ -tart/c2/ca3 -Final files: -tart -tart/b2 -tart/c0 -tart/c0/cq1 -tart/c0/cq2 -tart/c2 -tart/c2/ca1 -tart/c2/ca2 -tart/c2/ca3 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/listed02.at:31: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +# Archive it +tar cf arc directory +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory - echo 1 > "$at_status_file" - exit 1 -fi +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -$at_traceon +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory +# After both restores, the directory mode should be 755 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * +# Force umask +umask 022 - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" - 31 ) # 31. incr03.at:28: renamed files in incrementals - at_setup_line='incr03.at:28' - at_desc="renamed files in incrementals" - $at_quiet $ECHO_N " 31: renamed files in incrementals $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "31. incr03.at:28: testing ..." - $at_traceon +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory +# Archive it +tar cf arc directory +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory - $at_traceoff -echo "$at_srcdir/incr03.at:31: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +# After both restores, the directory mode should be 755 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 +755 +755 +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac06.at:36" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/extrac06.at:36: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir directory -genfile --file=directory/x -genfile --file=directory/y +# Force umask +umask 022 -sleep 1 +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" -tar -cf archive.1 -g db directory +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -mv directory/x directory/z -tar -cf archive.2 -g db directory +# Archive it +tar cf arc directory -mv directory orig +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after first restore -tar -xf archive.1 -g db -find directory | sort +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after second restore -tar -xf archive.2 -g db -find directory | sort +# After both restores, the directory mode should be 755 )" -echo incr03.at:31 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo extrac06.at:36 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir directory -genfile --file=directory/x -genfile --file=directory/y +# Force umask +umask 022 -sleep 1 +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" -tar -cf archive.1 -g db directory +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -mv directory/x directory/z -tar -cf archive.2 -g db directory +# Archive it +tar cf arc directory -mv directory orig +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after first restore -tar -xf archive.1 -g db -find directory | sort +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after second restore -tar -xf archive.2 -g db -find directory | sort +# After both restores, the directory mode should be 755 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir directory -genfile --file=directory/x -genfile --file=directory/y +# Force umask +umask 022 -sleep 1 +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" -tar -cf archive.1 -g db directory +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -mv directory/x directory/z -tar -cf archive.2 -g db directory +# Archive it +tar cf arc directory -mv directory orig +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after first restore -tar -xf archive.1 -g db -find directory | sort +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after second restore -tar -xf archive.2 -g db -find directory | sort +# After both restores, the directory mode should be 755 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Listing of archive.1 -directory/ -directory/x -directory/y -Listing of archive.2 -directory/ -directory/z -Directory after first restore -directory -directory/x -directory/y -Directory after second restore -directory -directory/y -directory/z -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 +755 +755 +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac06.at:36" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/incr03.at:31: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { $at_traceoff +$as_echo "$at_srcdir/extrac06.at:36: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir directory -genfile --file=directory/x -genfile --file=directory/y +# Force umask +umask 022 -sleep 1 +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" -tar -cf archive.1 -g db directory +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -mv directory/x directory/z -tar -cf archive.2 -g db directory +# Archive it +tar cf arc directory -mv directory orig +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after first restore -tar -xf archive.1 -g db -find directory | sort +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after second restore -tar -xf archive.2 -g db -find directory | sort +# After both restores, the directory mode should be 755 )" -echo incr03.at:31 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo extrac06.at:36 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir directory -genfile --file=directory/x -genfile --file=directory/y +# Force umask +umask 022 -sleep 1 +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" -tar -cf archive.1 -g db directory +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -mv directory/x directory/z -tar -cf archive.2 -g db directory +# Archive it +tar cf arc directory -mv directory orig +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after first restore -tar -xf archive.1 -g db -find directory | sort +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after second restore -tar -xf archive.2 -g db -find directory | sort +# After both restores, the directory mode should be 755 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir directory -genfile --file=directory/x -genfile --file=directory/y +# Force umask +umask 022 -sleep 1 +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" -tar -cf archive.1 -g db directory +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -mv directory/x directory/z -tar -cf archive.2 -g db directory +# Archive it +tar cf arc directory -mv directory orig +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after first restore -tar -xf archive.1 -g db -find directory | sort +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after second restore -tar -xf archive.2 -g db -find directory | sort +# After both restores, the directory mode should be 755 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Listing of archive.1 -directory/ -directory/x -directory/y -Listing of archive.2 -directory/ -directory/z -Directory after first restore -directory -directory/x -directory/y -Directory after second restore -directory -directory/y -directory/z -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 +755 +755 +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac06.at:36" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/incr03.at:31: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { $at_traceoff +$as_echo "$at_srcdir/extrac06.at:36: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir directory -genfile --file=directory/x -genfile --file=directory/y +# Force umask +umask 022 -sleep 1 +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS=\"\$TAR_OPTIONS --no-same-permissions\" -tar -cf archive.1 -g db directory +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -mv directory/x directory/z -tar -cf archive.2 -g db directory +# Archive it +tar cf arc directory -mv directory orig +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after first restore -tar -xf archive.1 -g db -find directory | sort +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after second restore -tar -xf archive.2 -g db -find directory | sort +# After both restores, the directory mode should be 755 )" -echo incr03.at:31 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo extrac06.at:36 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +# Force umask +umask 022 -mkdir directory -genfile --file=directory/x -genfile --file=directory/y +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" -sleep 1 +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -tar -cf archive.1 -g db directory +# Archive it +tar cf arc directory -mv directory/x directory/z -tar -cf archive.2 -g db directory +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -mv directory orig +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after first restore -tar -xf archive.1 -g db -find directory | sort - -echo Directory after second restore -tar -xf archive.2 -g db -find directory | sort +# After both restores, the directory mode should be 755 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir directory -genfile --file=directory/x -genfile --file=directory/y +# Force umask +umask 022 -sleep 1 +# Make sure user's umask is honored, even if we are superuser +TAR_OPTIONS="$TAR_OPTIONS --no-same-permissions" -tar -cf archive.1 -g db directory +# Create a directory +mkdir directory +chmod 777 directory +genfile --stat=mode:777 directory -mv directory/x directory/z -tar -cf archive.2 -g db directory +# Archive it +tar cf arc directory -mv directory orig +# Change its permissions ... +chmod 755 directory +genfile --stat=mode:777 directory -echo Listing of archive.1 -tar -tf archive.1 | sort -echo Listing of archive.2 -tar -tf archive.2 | sort +# ... and attempt to restore it twice +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after first restore -tar -xf archive.1 -g db -find directory | sort +tar xf arc directory --warning=no-timestamp +genfile --stat=mode:777 directory -echo Directory after second restore -tar -xf archive.2 -g db -find directory | sort +# After both restores, the directory mode should be 755 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Listing of archive.1 -directory/ -directory/x -directory/y -Listing of archive.2 -directory/ -directory/z -Directory after first restore -directory -directory/x -directory/y -Directory after second restore -directory -directory/y -directory/z -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr03.at:31: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "777 +755 +755 +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac06.at:36" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_31 +#AT_START_32 +# 32. extrac07.at:27: extracting symlinks to a read-only dir +at_setup_line='extrac07.at:27' +at_desc="extracting symlinks to a read-only dir" +$at_quiet $as_echo_n " 32: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "32. extrac07.at:27: testing ..." + $at_traceon - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 32 ) # 32. incr04.at:29: proper icontents initialization - at_setup_line='incr04.at:29' - at_desc="proper icontents initialization" - $at_quiet $ECHO_N " 32: proper icontents initialization $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "32. incr04.at:29: testing ..." - $at_traceon + { $at_traceoff +$as_echo "$at_srcdir/extrac07.at:30: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 +echo Prepare the directory +mkdir dir +genfile -f foo +cd dir +ln -s ../foo . +cd .. +chmod a-w dir - $at_traceoff -echo "$at_srcdir/incr04.at:34: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +echo Create the archive +tar cf archive dir || exit 1 + +chmod +w dir + +echo Extract +mkdir out +tar -C out -xvf archive +)" +echo extrac07.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -install-sh -d a/b >/dev/null || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i); - }' < /dev/null | genfile --files-from - +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -sleep 1 -echo \"Initial dump\" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo \"Incremental dump\" -tar cvf a1.tar -g a.sna a -)" -echo incr04.at:34 >"$at_check_line_file" +echo Prepare the directory +mkdir dir +genfile -f foo +cd dir +ln -s ../foo . +cd .. +chmod a-w dir -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo Create the archive +tar cf archive dir || exit 1 -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +chmod +w dir + +echo Extract +mkdir out +tar -C out -xvf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -install-sh -d a/b >/dev/null || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf("a/b/one_31_chars_long_file_name_%03d\n", i); - }' < /dev/null | genfile --files-from - +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -sleep 1 -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +echo Prepare the directory +mkdir dir +genfile -f foo +cd dir +ln -s ../foo . +cd .. +chmod a-w dir + +echo Create the archive +tar cf archive dir || exit 1 + +chmod +w dir + +echo Extract +mkdir out +tar -C out -xvf archive +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Prepare the directory +Create the archive +Extract +dir/ +dir/foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac07.at:30" + +$at_failed && at_func_log_failure +$at_traceon; } + + + # Testing one format is enough + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_32 +#AT_START_33 +# 33. extrac08.at:33: restoring mode on existing directory +at_setup_line='extrac08.at:33' +at_desc="restoring mode on existing directory" +$at_quiet $as_echo_n " 33: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "33. extrac08.at:33: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/extrac08.at:36: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +)" +echo extrac08.at:36 >"$at_check_line_file" -install-sh -d a/b >/dev/null || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf("a/b/one_31_chars_long_file_name_%03d\n", i); - }' < /dev/null | genfile --files-from - +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -sleep 1 +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: a/b: Directory is new -tar: a/c: Directory has been renamed from \`a/b' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Initial dump -a/ -a/b/ -a/b/one_31_chars_long_file_name_001 -a/b/one_31_chars_long_file_name_002 -a/b/one_31_chars_long_file_name_003 -a/b/one_31_chars_long_file_name_004 -a/b/one_31_chars_long_file_name_005 -a/b/one_31_chars_long_file_name_006 -a/b/one_31_chars_long_file_name_007 -a/b/one_31_chars_long_file_name_008 -a/b/one_31_chars_long_file_name_009 -a/b/one_31_chars_long_file_name_010 -a/b/one_31_chars_long_file_name_011 -a/b/one_31_chars_long_file_name_012 -a/b/one_31_chars_long_file_name_013 -a/b/one_31_chars_long_file_name_014 -a/b/one_31_chars_long_file_name_015 -a/b/one_31_chars_long_file_name_016 -a/b/one_31_chars_long_file_name_017 -a/b/one_31_chars_long_file_name_018 -a/b/one_31_chars_long_file_name_019 -a/b/one_31_chars_long_file_name_020 -a/b/one_31_chars_long_file_name_021 -a/b/one_31_chars_long_file_name_022 -a/b/one_31_chars_long_file_name_023 -a/b/one_31_chars_long_file_name_024 -a/b/one_31_chars_long_file_name_025 -a/b/one_31_chars_long_file_name_026 -a/b/one_31_chars_long_file_name_027 -a/b/one_31_chars_long_file_name_028 -a/b/one_31_chars_long_file_name_029 -a/b/one_31_chars_long_file_name_030 -a/b/one_31_chars_long_file_name_031 -a/b/one_31_chars_long_file_name_032 -a/b/one_31_chars_long_file_name_033 -a/b/one_31_chars_long_file_name_034 -a/b/one_31_chars_long_file_name_035 -a/b/one_31_chars_long_file_name_036 -a/b/one_31_chars_long_file_name_037 -a/b/one_31_chars_long_file_name_038 -a/b/one_31_chars_long_file_name_039 -a/b/one_31_chars_long_file_name_040 -a/b/one_31_chars_long_file_name_041 -a/b/one_31_chars_long_file_name_042 -a/b/one_31_chars_long_file_name_043 -a/b/one_31_chars_long_file_name_044 -a/b/one_31_chars_long_file_name_045 -a/b/one_31_chars_long_file_name_046 -a/b/one_31_chars_long_file_name_047 -a/b/one_31_chars_long_file_name_048 -a/b/one_31_chars_long_file_name_049 -a/b/one_31_chars_long_file_name_050 -a/b/one_31_chars_long_file_name_051 -a/b/one_31_chars_long_file_name_052 -a/b/one_31_chars_long_file_name_053 -a/b/one_31_chars_long_file_name_054 -a/b/one_31_chars_long_file_name_055 -a/b/one_31_chars_long_file_name_056 -a/b/one_31_chars_long_file_name_057 -a/b/one_31_chars_long_file_name_058 -a/b/one_31_chars_long_file_name_059 -a/b/one_31_chars_long_file_name_060 -a/b/one_31_chars_long_file_name_061 -a/b/one_31_chars_long_file_name_062 -a/b/one_31_chars_long_file_name_063 -a/b/one_31_chars_long_file_name_064 -a/b/one_31_chars_long_file_name_065 -a/b/one_31_chars_long_file_name_066 -a/b/one_31_chars_long_file_name_067 -a/b/one_31_chars_long_file_name_068 -a/b/one_31_chars_long_file_name_069 -a/b/one_31_chars_long_file_name_070 -a/b/one_31_chars_long_file_name_071 -a/b/one_31_chars_long_file_name_072 -a/b/one_31_chars_long_file_name_073 -a/b/one_31_chars_long_file_name_074 -a/b/one_31_chars_long_file_name_075 -a/b/one_31_chars_long_file_name_076 -a/b/one_31_chars_long_file_name_077 -a/b/one_31_chars_long_file_name_078 -a/b/one_31_chars_long_file_name_079 -a/b/one_31_chars_long_file_name_080 -a/b/one_31_chars_long_file_name_081 -a/b/one_31_chars_long_file_name_082 -a/b/one_31_chars_long_file_name_083 -a/b/one_31_chars_long_file_name_084 -a/b/one_31_chars_long_file_name_085 -a/b/one_31_chars_long_file_name_086 -a/b/one_31_chars_long_file_name_087 -a/b/one_31_chars_long_file_name_088 -a/b/one_31_chars_long_file_name_089 -a/b/one_31_chars_long_file_name_090 -a/b/one_31_chars_long_file_name_091 -a/b/one_31_chars_long_file_name_092 -a/b/one_31_chars_long_file_name_093 -a/b/one_31_chars_long_file_name_094 -a/b/one_31_chars_long_file_name_095 -a/b/one_31_chars_long_file_name_096 -a/b/one_31_chars_long_file_name_097 -a/b/one_31_chars_long_file_name_098 -a/b/one_31_chars_long_file_name_099 -a/b/one_31_chars_long_file_name_100 -a/b/one_31_chars_long_file_name_101 -a/b/one_31_chars_long_file_name_102 -a/b/one_31_chars_long_file_name_103 -a/b/one_31_chars_long_file_name_104 -a/b/one_31_chars_long_file_name_105 -a/b/one_31_chars_long_file_name_106 -a/b/one_31_chars_long_file_name_107 -a/b/one_31_chars_long_file_name_108 -a/b/one_31_chars_long_file_name_109 -a/b/one_31_chars_long_file_name_110 -a/b/one_31_chars_long_file_name_111 -a/b/one_31_chars_long_file_name_112 -a/b/one_31_chars_long_file_name_113 -a/b/one_31_chars_long_file_name_114 -a/b/one_31_chars_long_file_name_115 -a/b/one_31_chars_long_file_name_116 -a/b/one_31_chars_long_file_name_117 -a/b/one_31_chars_long_file_name_118 -a/b/one_31_chars_long_file_name_119 -a/b/one_31_chars_long_file_name_120 -a/b/one_31_chars_long_file_name_121 -a/b/one_31_chars_long_file_name_122 -a/b/one_31_chars_long_file_name_123 -a/b/one_31_chars_long_file_name_124 -a/b/one_31_chars_long_file_name_125 -a/b/one_31_chars_long_file_name_126 -a/b/one_31_chars_long_file_name_127 -a/b/one_31_chars_long_file_name_128 -a/b/one_31_chars_long_file_name_129 -a/b/one_31_chars_long_file_name_130 -a/b/one_31_chars_long_file_name_131 -a/b/one_31_chars_long_file_name_132 -a/b/one_31_chars_long_file_name_133 -a/b/one_31_chars_long_file_name_134 -a/b/one_31_chars_long_file_name_135 -a/b/one_31_chars_long_file_name_136 -a/b/one_31_chars_long_file_name_137 -a/b/one_31_chars_long_file_name_138 -a/b/one_31_chars_long_file_name_139 -a/b/one_31_chars_long_file_name_140 -a/b/one_31_chars_long_file_name_141 -a/b/one_31_chars_long_file_name_142 -Incremental dump -a/ -a/c/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac08.at:36" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/incr04.at:34: + { $at_traceoff +$as_echo "$at_srcdir/extrac08.at:36: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13907,30 +14512,20 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * - -install-sh -d a/b >/dev/null || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i); - }' < /dev/null | genfile --files-from - - -sleep 1 - -echo \"Initial dump\" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo \"Incremental dump\" -tar cvf a1.tar -g a.sna a +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir )" -echo incr04.at:34 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo extrac08.at:36 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13939,26 +14534,18 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * - -install-sh -d a/b >/dev/null || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf("a/b/one_31_chars_long_file_name_%03d\n", i); - }' < /dev/null | genfile --files-from - - -sleep 1 - -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -13967,194 +14554,106 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac08.at:36" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/extrac08.at:36: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +)" +echo extrac08.at:36 >"$at_check_line_file" -install-sh -d a/b >/dev/null || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf("a/b/one_31_chars_long_file_name_%03d\n", i); - }' < /dev/null | genfile --files-from - +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -sleep 1 +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: a/b: Directory is new -tar: a/c: Directory has been renamed from \`a/b' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Initial dump -a/ -a/b/ -a/b/one_31_chars_long_file_name_001 -a/b/one_31_chars_long_file_name_002 -a/b/one_31_chars_long_file_name_003 -a/b/one_31_chars_long_file_name_004 -a/b/one_31_chars_long_file_name_005 -a/b/one_31_chars_long_file_name_006 -a/b/one_31_chars_long_file_name_007 -a/b/one_31_chars_long_file_name_008 -a/b/one_31_chars_long_file_name_009 -a/b/one_31_chars_long_file_name_010 -a/b/one_31_chars_long_file_name_011 -a/b/one_31_chars_long_file_name_012 -a/b/one_31_chars_long_file_name_013 -a/b/one_31_chars_long_file_name_014 -a/b/one_31_chars_long_file_name_015 -a/b/one_31_chars_long_file_name_016 -a/b/one_31_chars_long_file_name_017 -a/b/one_31_chars_long_file_name_018 -a/b/one_31_chars_long_file_name_019 -a/b/one_31_chars_long_file_name_020 -a/b/one_31_chars_long_file_name_021 -a/b/one_31_chars_long_file_name_022 -a/b/one_31_chars_long_file_name_023 -a/b/one_31_chars_long_file_name_024 -a/b/one_31_chars_long_file_name_025 -a/b/one_31_chars_long_file_name_026 -a/b/one_31_chars_long_file_name_027 -a/b/one_31_chars_long_file_name_028 -a/b/one_31_chars_long_file_name_029 -a/b/one_31_chars_long_file_name_030 -a/b/one_31_chars_long_file_name_031 -a/b/one_31_chars_long_file_name_032 -a/b/one_31_chars_long_file_name_033 -a/b/one_31_chars_long_file_name_034 -a/b/one_31_chars_long_file_name_035 -a/b/one_31_chars_long_file_name_036 -a/b/one_31_chars_long_file_name_037 -a/b/one_31_chars_long_file_name_038 -a/b/one_31_chars_long_file_name_039 -a/b/one_31_chars_long_file_name_040 -a/b/one_31_chars_long_file_name_041 -a/b/one_31_chars_long_file_name_042 -a/b/one_31_chars_long_file_name_043 -a/b/one_31_chars_long_file_name_044 -a/b/one_31_chars_long_file_name_045 -a/b/one_31_chars_long_file_name_046 -a/b/one_31_chars_long_file_name_047 -a/b/one_31_chars_long_file_name_048 -a/b/one_31_chars_long_file_name_049 -a/b/one_31_chars_long_file_name_050 -a/b/one_31_chars_long_file_name_051 -a/b/one_31_chars_long_file_name_052 -a/b/one_31_chars_long_file_name_053 -a/b/one_31_chars_long_file_name_054 -a/b/one_31_chars_long_file_name_055 -a/b/one_31_chars_long_file_name_056 -a/b/one_31_chars_long_file_name_057 -a/b/one_31_chars_long_file_name_058 -a/b/one_31_chars_long_file_name_059 -a/b/one_31_chars_long_file_name_060 -a/b/one_31_chars_long_file_name_061 -a/b/one_31_chars_long_file_name_062 -a/b/one_31_chars_long_file_name_063 -a/b/one_31_chars_long_file_name_064 -a/b/one_31_chars_long_file_name_065 -a/b/one_31_chars_long_file_name_066 -a/b/one_31_chars_long_file_name_067 -a/b/one_31_chars_long_file_name_068 -a/b/one_31_chars_long_file_name_069 -a/b/one_31_chars_long_file_name_070 -a/b/one_31_chars_long_file_name_071 -a/b/one_31_chars_long_file_name_072 -a/b/one_31_chars_long_file_name_073 -a/b/one_31_chars_long_file_name_074 -a/b/one_31_chars_long_file_name_075 -a/b/one_31_chars_long_file_name_076 -a/b/one_31_chars_long_file_name_077 -a/b/one_31_chars_long_file_name_078 -a/b/one_31_chars_long_file_name_079 -a/b/one_31_chars_long_file_name_080 -a/b/one_31_chars_long_file_name_081 -a/b/one_31_chars_long_file_name_082 -a/b/one_31_chars_long_file_name_083 -a/b/one_31_chars_long_file_name_084 -a/b/one_31_chars_long_file_name_085 -a/b/one_31_chars_long_file_name_086 -a/b/one_31_chars_long_file_name_087 -a/b/one_31_chars_long_file_name_088 -a/b/one_31_chars_long_file_name_089 -a/b/one_31_chars_long_file_name_090 -a/b/one_31_chars_long_file_name_091 -a/b/one_31_chars_long_file_name_092 -a/b/one_31_chars_long_file_name_093 -a/b/one_31_chars_long_file_name_094 -a/b/one_31_chars_long_file_name_095 -a/b/one_31_chars_long_file_name_096 -a/b/one_31_chars_long_file_name_097 -a/b/one_31_chars_long_file_name_098 -a/b/one_31_chars_long_file_name_099 -a/b/one_31_chars_long_file_name_100 -a/b/one_31_chars_long_file_name_101 -a/b/one_31_chars_long_file_name_102 -a/b/one_31_chars_long_file_name_103 -a/b/one_31_chars_long_file_name_104 -a/b/one_31_chars_long_file_name_105 -a/b/one_31_chars_long_file_name_106 -a/b/one_31_chars_long_file_name_107 -a/b/one_31_chars_long_file_name_108 -a/b/one_31_chars_long_file_name_109 -a/b/one_31_chars_long_file_name_110 -a/b/one_31_chars_long_file_name_111 -a/b/one_31_chars_long_file_name_112 -a/b/one_31_chars_long_file_name_113 -a/b/one_31_chars_long_file_name_114 -a/b/one_31_chars_long_file_name_115 -a/b/one_31_chars_long_file_name_116 -a/b/one_31_chars_long_file_name_117 -a/b/one_31_chars_long_file_name_118 -a/b/one_31_chars_long_file_name_119 -a/b/one_31_chars_long_file_name_120 -a/b/one_31_chars_long_file_name_121 -a/b/one_31_chars_long_file_name_122 -a/b/one_31_chars_long_file_name_123 -a/b/one_31_chars_long_file_name_124 -a/b/one_31_chars_long_file_name_125 -a/b/one_31_chars_long_file_name_126 -a/b/one_31_chars_long_file_name_127 -a/b/one_31_chars_long_file_name_128 -a/b/one_31_chars_long_file_name_129 -a/b/one_31_chars_long_file_name_130 -a/b/one_31_chars_long_file_name_131 -a/b/one_31_chars_long_file_name_132 -a/b/one_31_chars_long_file_name_133 -a/b/one_31_chars_long_file_name_134 -a/b/one_31_chars_long_file_name_135 -a/b/one_31_chars_long_file_name_136 -a/b/one_31_chars_long_file_name_137 -a/b/one_31_chars_long_file_name_138 -a/b/one_31_chars_long_file_name_139 -a/b/one_31_chars_long_file_name_140 -a/b/one_31_chars_long_file_name_141 -a/b/one_31_chars_long_file_name_142 -Incremental dump -a/ -a/c/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac08.at:36" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/incr04.at:34: + { $at_traceoff +$as_echo "$at_srcdir/extrac08.at:36: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -14163,30 +14662,20 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * - -install-sh -d a/b >/dev/null || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i); - }' < /dev/null | genfile --files-from - - -sleep 1 - -echo \"Initial dump\" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo \"Incremental dump\" -tar cvf a1.tar -g a.sna a +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir )" -echo incr04.at:34 >"$at_check_line_file" +echo extrac08.at:36 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -14195,26 +14684,18 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * - -install-sh -d a/b >/dev/null || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf("a/b/one_31_chars_long_file_name_%03d\n", i); - }' < /dev/null | genfile --files-from - - -sleep 1 - -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -14223,218 +14704,130 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac08.at:36" -install-sh -d a/b >/dev/null || exit 77 -awk 'BEGIN { - for (i=1;i<=142;i++) - printf("a/b/one_31_chars_long_file_name_%03d\n", i); - }' < /dev/null | genfile --files-from - +$at_failed && at_func_log_failure +$at_traceon; } -sleep 1 + { $at_traceoff +$as_echo "$at_srcdir/extrac08.at:36: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -echo "Initial dump" -tar cvf a0.tar -g a.sna a -mv a/b a/c -echo "Incremental dump" -tar cvf a1.tar -g a.sna a +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +)" +echo extrac08.at:36 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +umask 000 +mkdir dir +chmod 755 dir +echo bla > dir/file +tar cf test.tar dir +chmod 700 dir +tar xfv test.tar --warning=no-timestamp +genfile --stat=mode.777 dir ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: a/b: Directory is new -tar: a/c: Directory has been renamed from \`a/b' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Initial dump -a/ -a/b/ -a/b/one_31_chars_long_file_name_001 -a/b/one_31_chars_long_file_name_002 -a/b/one_31_chars_long_file_name_003 -a/b/one_31_chars_long_file_name_004 -a/b/one_31_chars_long_file_name_005 -a/b/one_31_chars_long_file_name_006 -a/b/one_31_chars_long_file_name_007 -a/b/one_31_chars_long_file_name_008 -a/b/one_31_chars_long_file_name_009 -a/b/one_31_chars_long_file_name_010 -a/b/one_31_chars_long_file_name_011 -a/b/one_31_chars_long_file_name_012 -a/b/one_31_chars_long_file_name_013 -a/b/one_31_chars_long_file_name_014 -a/b/one_31_chars_long_file_name_015 -a/b/one_31_chars_long_file_name_016 -a/b/one_31_chars_long_file_name_017 -a/b/one_31_chars_long_file_name_018 -a/b/one_31_chars_long_file_name_019 -a/b/one_31_chars_long_file_name_020 -a/b/one_31_chars_long_file_name_021 -a/b/one_31_chars_long_file_name_022 -a/b/one_31_chars_long_file_name_023 -a/b/one_31_chars_long_file_name_024 -a/b/one_31_chars_long_file_name_025 -a/b/one_31_chars_long_file_name_026 -a/b/one_31_chars_long_file_name_027 -a/b/one_31_chars_long_file_name_028 -a/b/one_31_chars_long_file_name_029 -a/b/one_31_chars_long_file_name_030 -a/b/one_31_chars_long_file_name_031 -a/b/one_31_chars_long_file_name_032 -a/b/one_31_chars_long_file_name_033 -a/b/one_31_chars_long_file_name_034 -a/b/one_31_chars_long_file_name_035 -a/b/one_31_chars_long_file_name_036 -a/b/one_31_chars_long_file_name_037 -a/b/one_31_chars_long_file_name_038 -a/b/one_31_chars_long_file_name_039 -a/b/one_31_chars_long_file_name_040 -a/b/one_31_chars_long_file_name_041 -a/b/one_31_chars_long_file_name_042 -a/b/one_31_chars_long_file_name_043 -a/b/one_31_chars_long_file_name_044 -a/b/one_31_chars_long_file_name_045 -a/b/one_31_chars_long_file_name_046 -a/b/one_31_chars_long_file_name_047 -a/b/one_31_chars_long_file_name_048 -a/b/one_31_chars_long_file_name_049 -a/b/one_31_chars_long_file_name_050 -a/b/one_31_chars_long_file_name_051 -a/b/one_31_chars_long_file_name_052 -a/b/one_31_chars_long_file_name_053 -a/b/one_31_chars_long_file_name_054 -a/b/one_31_chars_long_file_name_055 -a/b/one_31_chars_long_file_name_056 -a/b/one_31_chars_long_file_name_057 -a/b/one_31_chars_long_file_name_058 -a/b/one_31_chars_long_file_name_059 -a/b/one_31_chars_long_file_name_060 -a/b/one_31_chars_long_file_name_061 -a/b/one_31_chars_long_file_name_062 -a/b/one_31_chars_long_file_name_063 -a/b/one_31_chars_long_file_name_064 -a/b/one_31_chars_long_file_name_065 -a/b/one_31_chars_long_file_name_066 -a/b/one_31_chars_long_file_name_067 -a/b/one_31_chars_long_file_name_068 -a/b/one_31_chars_long_file_name_069 -a/b/one_31_chars_long_file_name_070 -a/b/one_31_chars_long_file_name_071 -a/b/one_31_chars_long_file_name_072 -a/b/one_31_chars_long_file_name_073 -a/b/one_31_chars_long_file_name_074 -a/b/one_31_chars_long_file_name_075 -a/b/one_31_chars_long_file_name_076 -a/b/one_31_chars_long_file_name_077 -a/b/one_31_chars_long_file_name_078 -a/b/one_31_chars_long_file_name_079 -a/b/one_31_chars_long_file_name_080 -a/b/one_31_chars_long_file_name_081 -a/b/one_31_chars_long_file_name_082 -a/b/one_31_chars_long_file_name_083 -a/b/one_31_chars_long_file_name_084 -a/b/one_31_chars_long_file_name_085 -a/b/one_31_chars_long_file_name_086 -a/b/one_31_chars_long_file_name_087 -a/b/one_31_chars_long_file_name_088 -a/b/one_31_chars_long_file_name_089 -a/b/one_31_chars_long_file_name_090 -a/b/one_31_chars_long_file_name_091 -a/b/one_31_chars_long_file_name_092 -a/b/one_31_chars_long_file_name_093 -a/b/one_31_chars_long_file_name_094 -a/b/one_31_chars_long_file_name_095 -a/b/one_31_chars_long_file_name_096 -a/b/one_31_chars_long_file_name_097 -a/b/one_31_chars_long_file_name_098 -a/b/one_31_chars_long_file_name_099 -a/b/one_31_chars_long_file_name_100 -a/b/one_31_chars_long_file_name_101 -a/b/one_31_chars_long_file_name_102 -a/b/one_31_chars_long_file_name_103 -a/b/one_31_chars_long_file_name_104 -a/b/one_31_chars_long_file_name_105 -a/b/one_31_chars_long_file_name_106 -a/b/one_31_chars_long_file_name_107 -a/b/one_31_chars_long_file_name_108 -a/b/one_31_chars_long_file_name_109 -a/b/one_31_chars_long_file_name_110 -a/b/one_31_chars_long_file_name_111 -a/b/one_31_chars_long_file_name_112 -a/b/one_31_chars_long_file_name_113 -a/b/one_31_chars_long_file_name_114 -a/b/one_31_chars_long_file_name_115 -a/b/one_31_chars_long_file_name_116 -a/b/one_31_chars_long_file_name_117 -a/b/one_31_chars_long_file_name_118 -a/b/one_31_chars_long_file_name_119 -a/b/one_31_chars_long_file_name_120 -a/b/one_31_chars_long_file_name_121 -a/b/one_31_chars_long_file_name_122 -a/b/one_31_chars_long_file_name_123 -a/b/one_31_chars_long_file_name_124 -a/b/one_31_chars_long_file_name_125 -a/b/one_31_chars_long_file_name_126 -a/b/one_31_chars_long_file_name_127 -a/b/one_31_chars_long_file_name_128 -a/b/one_31_chars_long_file_name_129 -a/b/one_31_chars_long_file_name_130 -a/b/one_31_chars_long_file_name_131 -a/b/one_31_chars_long_file_name_132 -a/b/one_31_chars_long_file_name_133 -a/b/one_31_chars_long_file_name_134 -a/b/one_31_chars_long_file_name_135 -a/b/one_31_chars_long_file_name_136 -a/b/one_31_chars_long_file_name_137 -a/b/one_31_chars_long_file_name_138 -a/b/one_31_chars_long_file_name_139 -a/b/one_31_chars_long_file_name_140 -a/b/one_31_chars_long_file_name_141 -a/b/one_31_chars_long_file_name_142 -Incremental dump -a/ -a/c/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/incr04.at:34: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/file +755 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac08.at:36" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 33 ) # 33. rename01.at:24: renamed dirs in incrementals - at_setup_line='rename01.at:24' - at_desc="renamed dirs in incrementals" - $at_quiet $ECHO_N " 33: renamed dirs in incrementals $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_33 +#AT_START_34 +# 34. extrac09.at:22: no need to save dir with unreadable . and .. +at_setup_line='extrac09.at:22' +at_desc="no need to save dir with unreadable . and .." +$at_quiet $as_echo_n " 34: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "33. rename01.at:24: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "34. extrac09.at:22: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/rename01.at:27: + { $at_traceoff +$as_echo "$at_srcdir/extrac09.at:25: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -14444,45 +14837,69 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file +mkdir dir +mkdir dir/sub +mkdir dir/sub/extract +genfile --file dir/sub/f +cd dir/sub -echo \"Creating base archive\" -tar -g incr -cf arch.1 -v foo +tar -cf archive.tar f -mv foo/bar foo/baz +chmod a-r . .. +tar -xvf archive.tar -C extract f +status=\$? +chmod a+r . .. +cmp f extract/f || status=\$? +exit \$status +)" +echo extrac09.at:25 >"$at_check_line_file" -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -mv foo old -tar xfg arch.1 /dev/null +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -)" -echo rename01.at:27 >"$at_check_line_file" +mkdir dir +mkdir dir/sub +mkdir dir/sub/extract +genfile --file dir/sub/f +cd dir/sub -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +tar -cf archive.tar f -if test -n "$at_trace_this"; then - ( $at_traceon; +chmod a-r . .. +tar -xvf archive.tar -C extract f +status=$? +chmod a+r . .. +cmp f extract/f || status=$? +exit $status +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -14492,41 +14909,109 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file +mkdir dir +mkdir dir/sub +mkdir dir/sub/extract +genfile --file dir/sub/f +cd dir/sub -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo +tar -cf archive.tar f -mv foo/bar foo/baz +chmod a-r . .. +tar -xvf archive.tar -C extract f +status=$? +chmod a+r . .. +cmp f extract/f || status=$? +exit $status +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "f +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac09.at:25" -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo +$at_failed && at_func_log_failure +$at_traceon; } -mv foo old -tar xfg arch.1 /dev/null -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_34 +#AT_START_35 +# 35. extrac10.at:27: -C and delayed setting of metadata +at_setup_line='extrac10.at:27' +at_desc="-C and delayed setting of metadata" +$at_quiet $as_echo_n " 35: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "35. extrac10.at:27: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/extrac10.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir d x x/y +echo foo >d/d1 +echo bar >e + +tar -cf archive.tar d e && +tar -xf archive.tar -C x d -C y e && +diff -r d x/d && +diff e x/y/e +)" +echo extrac10.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir d x x/y +echo foo >d/d1 +echo bar >e + +tar -cf archive.tar d e && +tar -xf archive.tar -C x d -C y e && +diff -r d x/d && +diff e x/y/e ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -14535,467 +15020,587 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +mkdir d x x/y +echo foo >d/d1 +echo bar >e -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar -cf archive.tar d e && +tar -xf archive.tar -C x d -C y e && +diff -r d x/d && +diff e x/y/e +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac10.at:30" +$at_failed && at_func_log_failure +$at_traceon; } -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo -mv foo/bar foo/baz -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_35 +#AT_START_36 +# 36. extrac11.at:23: scarce file descriptors +at_setup_line='extrac11.at:23' +at_desc="scarce file descriptors" +$at_quiet $as_echo_n " 36: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "36. extrac11.at:23: testing ..." + $at_traceon -mv foo old -tar xfg arch.1 /dev/null -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating base archive -foo/ -foo/bar/ -foo/file1 -foo/file2 -foo/bar/file -Creating incremental archive -foo/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/file -foo/file1 -foo/file2 -End directory listing 1 -Begin directory listing 2 -foo -foo/baz -foo/baz/file -foo/file1 -foo/file2 -End directory listing 2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then + { $at_traceoff +$as_echo "$at_srcdir/extrac11.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * - echo 1 > "$at_status_file" - exit 1 -fi +dirs='a + a/b + a/b/c + a/b/c/d + a/b/c/d/e + a/b/c/d/e/f + a/b/c/d/e/f/g + a/b/c/d/e/f/g/h + a/b/c/d/e/f/g/h/i + a/b/c/d/e/f/g/h/i/j + a/b/c/d/e/f/g/h/i/j/k +' +files= +mkdir \$dirs dest1 dest2 dest3 || exit +for dir in \$dirs; do + for file in X Y Z; do + echo \$file >\$dir/\$file || exit + files=\"\$files \$file\" + done +done -$at_traceon +# Check that \"ulimit\" itself works. +((ulimit -n 100 && + tar -cf archive1.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + tar -xf archive1.tar -C dest1 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- + ) && + diff -r a dest1/a +) >/dev/null 2>&1 || + exit 77 + +# Another test that \"ulimit\" itself works: +# tar should fail when completely starved of file descriptors. +((ulimit -n 4 && + tar -cf archive2.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + tar -xf archive2.tar -C dest2 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- + ) && + diff -r a dest2/a +) >/dev/null 2>&1 && + exit 77 + +# Tar should work when there are few, but enough, file descriptors. +((ulimit -n 10 && + tar -cf archive3.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + tar -xf archive3.tar -C dest3 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- + ) && + diff -r a dest3/a >/dev/null 2>&1 +) || { diff -r a dest3/a; exit 1; } +)" +echo extrac11.at:26 >"$at_check_line_file" - $at_traceoff -echo "$at_srcdir/rename01.at:27: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +dirs='a + a/b + a/b/c + a/b/c/d + a/b/c/d/e + a/b/c/d/e/f + a/b/c/d/e/f/g + a/b/c/d/e/f/g/h + a/b/c/d/e/f/g/h/i + a/b/c/d/e/f/g/h/i/j + a/b/c/d/e/f/g/h/i/j/k +' +files= +mkdir $dirs dest1 dest2 dest3 || exit +for dir in $dirs; do + for file in X Y Z; do + echo $file >$dir/$file || exit + files="$files $file" + done +done -test -z "`sort < /dev/null 2>&1`" || exit 77 +# Check that "ulimit" itself works. +((ulimit -n 100 && + tar -cf archive1.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + tar -xf archive1.tar -C dest1 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- + ) && + diff -r a dest1/a +) >/dev/null 2>&1 || + exit 77 + +# Another test that "ulimit" itself works: +# tar should fail when completely starved of file descriptors. +((ulimit -n 4 && + tar -cf archive2.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + tar -xf archive2.tar -C dest2 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- + ) && + diff -r a dest2/a +) >/dev/null 2>&1 && + exit 77 + +# Tar should work when there are few, but enough, file descriptors. +((ulimit -n 10 && + tar -cf archive3.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + tar -xf archive3.tar -C dest3 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- + ) && + diff -r a dest3/a >/dev/null 2>&1 +) || { diff -r a dest3/a; exit 1; } +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * +dirs='a + a/b + a/b/c + a/b/c/d + a/b/c/d/e + a/b/c/d/e/f + a/b/c/d/e/f/g + a/b/c/d/e/f/g/h + a/b/c/d/e/f/g/h/i + a/b/c/d/e/f/g/h/i/j + a/b/c/d/e/f/g/h/i/j/k +' +files= +mkdir $dirs dest1 dest2 dest3 || exit +for dir in $dirs; do + for file in X Y Z; do + echo $file >$dir/$file || exit + files="$files $file" + done +done -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file +# Check that "ulimit" itself works. +((ulimit -n 100 && + tar -cf archive1.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + tar -xf archive1.tar -C dest1 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- + ) && + diff -r a dest1/a +) >/dev/null 2>&1 || + exit 77 + +# Another test that "ulimit" itself works: +# tar should fail when completely starved of file descriptors. +((ulimit -n 4 && + tar -cf archive2.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + tar -xf archive2.tar -C dest2 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- + ) && + diff -r a dest2/a +) >/dev/null 2>&1 && + exit 77 + +# Tar should work when there are few, but enough, file descriptors. +((ulimit -n 10 && + tar -cf archive3.tar a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- && + tar -xf archive3.tar -C dest3 a 3<&- 4<&- 5<&- 6<&- 7<&- 8<&- 9<&- + ) && + diff -r a dest3/a >/dev/null 2>&1 +) || { diff -r a dest3/a; exit 1; } +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac11.at:26" -echo \"Creating base archive\" -tar -g incr -cf arch.1 -v foo +$at_failed && at_func_log_failure +$at_traceon; } -mv foo/bar foo/baz -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo -mv foo old -tar xfg arch.1 /dev/null + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_36 +#AT_START_37 +# 37. extrac12.at:23: extract dot permissions +at_setup_line='extrac12.at:23' +at_desc="extract dot permissions" +$at_quiet $as_echo_n " 37: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "37. extrac12.at:23: testing ..." + $at_traceon -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -)" -echo rename01.at:27 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + { $at_traceoff +$as_echo "$at_srcdir/extrac12.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +mkdir src dst +echo file1 >src/file1 +echo file2 >src/file2 +chmod a-w src -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file - -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo - -mv foo/bar foo/baz - -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo - -mv foo old +tar --no-recursion -cf archive.tar -C src . ./file1 file2 && +tar -xf archive.tar -C dst && +cmp src/file1 dst/file1 && +cmp src/file2 dst/file2 +)" +echo extrac12.at:26 >"$at_check_line_file" -tar xfg arch.1 /dev/null +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +mkdir src dst +echo file1 >src/file1 +echo file2 >src/file2 +chmod a-w src -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +tar --no-recursion -cf archive.tar -C src . ./file1 file2 && +tar -xf archive.tar -C dst && +cmp src/file1 dst/file1 && +cmp src/file2 dst/file2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +mkdir src dst +echo file1 >src/file1 +echo file2 >src/file2 +chmod a-w src -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar --no-recursion -cf archive.tar -C src . ./file1 file2 && +tar -xf archive.tar -C dst && +cmp src/file1 dst/file1 && +cmp src/file2 dst/file2 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac12.at:26" +$at_failed && at_func_log_failure +$at_traceon; } -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo -mv foo/bar foo/baz -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_37 +#AT_START_38 +# 38. extrac13.at:24: extract over symlinks +at_setup_line='extrac13.at:24' +at_desc="extract over symlinks" +$at_quiet $as_echo_n " 38: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "38. extrac13.at:24: testing ..." + $at_traceon -mv foo old -tar xfg arch.1 /dev/null -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating base archive -foo/ -foo/bar/ -foo/file1 -foo/file2 -foo/bar/file -Creating incremental archive -foo/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/file -foo/file1 -foo/file2 -End directory listing 1 -Begin directory listing 2 -foo -foo/baz -foo/baz/file -foo/file1 -foo/file2 -End directory listing 2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then + { $at_traceoff +$as_echo "$at_srcdir/extrac13.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * +mkdir src dst1 dst2 dst3 +echo file1 >src/file1 +ln -s target1 dst1/file1 +echo target1 >dst1/target1 +echo target1 >target1 - echo 1 > "$at_status_file" - exit 1 -fi +tar -cf archive.tar -C src . && +tar -xf archive.tar -C dst1 --warning=no-timestamp && +diff -c src/file1 dst1/file1 && +diff -c target1 dst1/target1 -$at_traceon +ln -s target1 dst2/file1 +echo target1 >dst2/target1 +tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp && +diff -c src/file1 dst2/file1 && +diff -c target1 dst2/target1 - $at_traceoff -echo "$at_srcdir/rename01.at:27: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +ln -s target1 dst3/file1 +echo target1 >dst3/target1 +tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp && +diff -c src/file1 dst3/file1 && +diff -c src/file1 dst3/target1 +)" +echo extrac13.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +mkdir src dst1 dst2 dst3 +echo file1 >src/file1 +ln -s target1 dst1/file1 +echo target1 >dst1/target1 +echo target1 >target1 -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar -cf archive.tar -C src . && +tar -xf archive.tar -C dst1 --warning=no-timestamp && +diff -c src/file1 dst1/file1 && +diff -c target1 dst1/target1 +ln -s target1 dst2/file1 +echo target1 >dst2/target1 +tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp && +diff -c src/file1 dst2/file1 && +diff -c target1 dst2/target1 -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file +ln -s target1 dst3/file1 +echo target1 >dst3/target1 +tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp && +diff -c src/file1 dst3/file1 && +diff -c src/file1 dst3/target1 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -echo \"Creating base archive\" -tar -g incr -cf arch.1 -v foo +mkdir src dst1 dst2 dst3 +echo file1 >src/file1 +ln -s target1 dst1/file1 +echo target1 >dst1/target1 +echo target1 >target1 -mv foo/bar foo/baz +tar -cf archive.tar -C src . && +tar -xf archive.tar -C dst1 --warning=no-timestamp && +diff -c src/file1 dst1/file1 && +diff -c target1 dst1/target1 -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo +ln -s target1 dst2/file1 +echo target1 >dst2/target1 +tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp && +diff -c src/file1 dst2/file1 && +diff -c target1 dst2/target1 -mv foo old +ln -s target1 dst3/file1 +echo target1 >dst3/target1 +tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp && +diff -c src/file1 dst3/file1 && +diff -c src/file1 dst3/target1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac13.at:27" -tar xfg arch.1 /dev/null +$at_failed && at_func_log_failure +$at_traceon; } -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -)" -echo rename01.at:27 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_38 +#AT_START_39 +# 39. extrac14.at:23: extract -C symlink +at_setup_line='extrac14.at:23' +at_desc="extract -C symlink" +$at_quiet $as_echo_n " 39: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "39. extrac14.at:23: testing ..." + $at_traceon -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo -mv foo/bar foo/baz -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo -mv foo old + { $at_traceoff +$as_echo "$at_srcdir/extrac14.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null +mkdir dest +ln -s dest symlink +echo foo >foo +tar -cf archive.tar foo && +tar -xf archive.tar -C symlink --warning=no-timestamp && +cmp foo dest/foo +)" +echo extrac14.at:26 >"$at_check_line_file" -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +mkdir dest +ln -s dest symlink +echo foo >foo +tar -cf archive.tar foo && +tar -xf archive.tar -C symlink --warning=no-timestamp && +cmp foo dest/foo ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file - -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo - -mv foo/bar foo/baz - -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo - -mv foo old - -tar xfg arch.1 /dev/null - -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" - -tar xfg arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +mkdir dest +ln -s dest symlink +echo foo >foo +tar -cf archive.tar foo && +tar -xf archive.tar -C symlink --warning=no-timestamp && +cmp foo dest/foo ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating base archive -foo/ -foo/bar/ -foo/file1 -foo/file2 -foo/bar/file -Creating incremental archive -foo/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/file -foo/file1 -foo/file2 -End directory listing 1 -Begin directory listing 2 -foo -foo/baz -foo/baz/file -foo/file1 -foo/file2 -End directory listing 2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename01.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac14.at:26" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 34 ) # 34. rename02.at:24: move between hierarchies - at_setup_line='rename02.at:24' - at_desc="move between hierarchies" - $at_quiet $ECHO_N " 34: move between hierarchies $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_39 +#AT_START_40 +# 40. extrac15.at:23: extract parent mkdir failure +at_setup_line='extrac15.at:23' +at_desc="extract parent mkdir failure" +$at_quiet $as_echo_n " 40: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "34. rename02.at:24: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "40. extrac15.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/rename02.at:27: + { $at_traceoff +$as_echo "$at_srcdir/extrac15.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15005,49 +15610,59 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -sleep 1 -echo \"Creating base archive\" -tar -g incr -cf arch.1 -v foo +mkdir src src/a src/a/b dest dest/a +touch src/a/b/c +chmod a-w dest/a -mv foo/bar/baz foo +tar -cf archive.tar -C src a/b/c && +if tar -xf archive.tar -C dest a/b/c +then (exit 1) +else (exit 0) +fi +)" +echo extrac15.at:26 >"$at_check_line_file" -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -mv foo old -tar xfg arch.1 /dev/null 2>tmperr -sort tmperr >&2 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -)" -echo rename02.at:27 >"$at_check_line_file" +mkdir src src/a src/a/b dest dest/a +touch src/a/b/c +chmod a-w dest/a -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' +tar -cf archive.tar -C src a/b/c && +if tar -xf archive.tar -C dest a/b/c +then (exit 1) +else (exit 0) fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15057,45 +15672,98 @@ export TAR_OPTIONS rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z -sleep 1 +mkdir src src/a src/a/b dest dest/a +touch src/a/b/c +chmod a-w dest/a -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo +tar -cf archive.tar -C src a/b/c && +if tar -xf archive.tar -C dest a/b/c +then (exit 1) +else (exit 0) +fi +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: a/b: Cannot mkdir: Permission denied +tar: a/b/c: Cannot open: No such file or directory +tar: Exiting with failure status due to previous errors +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/extrac15.at:26" -mv foo/bar/baz foo +$at_failed && at_func_log_failure +$at_traceon; } -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo -mv foo old -tar xfg arch.1 /dev/null 2>tmperr -sort tmperr >&2 -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_40 +#AT_START_41 +# 41. label01.at:19: single-volume label +at_setup_line='label01.at:19' +at_desc="single-volume label" +$at_quiet $as_echo_n " 41: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "41. label01.at:19: testing ..." + $at_traceon -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 + + + + + { $at_traceoff +$as_echo "$at_srcdir/label01.at:22: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +)" +echo label01.at:22 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15104,200 +15772,285 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test +foo +bar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label01.at:22" -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z - -sleep 1 +$at_failed && at_func_log_failure +$at_traceon; } -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo - -mv foo/bar/baz foo - -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo + { $at_traceoff +$as_echo "$at_srcdir/label01.at:22: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -mv foo old +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +)" +echo label01.at:22 >"$at_check_line_file" -tar xfg arch.1 /dev/null 2>tmperr -sort tmperr >&2 +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new -tar: foo/bar/baz: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar/baz' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating base archive -foo/ -foo/bar/ -foo/bar/baz/ -foo/file1 -foo/file2 -foo/bar/file.r -foo/bar/baz/file.z -Creating incremental archive -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/baz -foo/bar/baz/file.z -foo/bar/file.r -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 2 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test foo -foo/bar -foo/bar/file.r -foo/baz -foo/baz/file.z -foo/file1 -foo/file2 -End directory listing 2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +bar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label01.at:22" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi + { $at_traceoff +$as_echo "$at_srcdir/label01.at:22: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -$at_traceon +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +)" +echo label01.at:22 >"$at_check_line_file" - $at_traceoff -echo "$at_srcdir/rename02.at:27: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z +genfile --file foo +genfile --file bar +tar -cf archive --label=Test foo bar +tar tf archive +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test +foo +bar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label01.at:22" -sleep 1 +$at_failed && at_func_log_failure +$at_traceon; } -echo \"Creating base archive\" -tar -g incr -cf arch.1 -v foo -mv foo/bar/baz foo -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo -mv foo old + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_41 +#AT_START_42 +# 42. label02.at:19: multi-volume label +at_setup_line='label02.at:19' +at_desc="multi-volume label" +$at_quiet $as_echo_n " 42: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "42. label02.at:19: testing ..." + $at_traceon -tar xfg arch.1 /dev/null 2>tmperr -sort tmperr >&2 -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -)" -echo rename02.at:27 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { $at_traceoff +$as_echo "$at_srcdir/label02.at:22: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +)" +echo label02.at:22 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z - -sleep 1 +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -mv foo/bar/baz foo +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test Volume 1 +foo +bar +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label02.at:22" -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo +$at_failed && at_func_log_failure +$at_traceon; } -mv foo old + { $at_traceoff +$as_echo "$at_srcdir/label02.at:22: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null 2>tmperr -sort tmperr >&2 +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +)" +echo label02.at:22 >"$at_check_line_file" -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -15306,200 +16059,486 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test Volume 1 +foo +bar +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label02.at:22" -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z - -sleep 1 - -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo +$at_failed && at_func_log_failure +$at_traceon; } -mv foo/bar/baz foo + { $at_traceoff +$as_echo "$at_srcdir/label02.at:22: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +)" +echo label02.at:22 >"$at_check_line_file" -mv foo old +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null 2>tmperr -sort tmperr >&2 - -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +exec <&- +genfile --length 0 --file foo +genfile --length 12288 --file bar +genfile --length 12288 --file baz +tar --label=Test -cM -L10 -f 1.tar -f 2.tar -f 3.tar -f 4.tar foo bar baz +tar -Mt -f 1.tar -f 2.tar -f 3.tar -f 4.tar ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new -tar: foo/bar/baz: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar/baz' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating base archive -foo/ -foo/bar/ -foo/bar/baz/ -foo/file1 -foo/file2 -foo/bar/file.r -foo/bar/baz/file.z -Creating incremental archive -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/baz -foo/bar/baz/file.z -foo/bar/file.r -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 2 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Test Volume 1 foo -foo/bar -foo/bar/file.r -foo/baz -foo/baz/file.z -foo/file1 -foo/file2 -End directory listing 2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +bar +baz +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label02.at:22" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon - $at_traceoff -echo "$at_srcdir/rename02.at:27: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" -export TAR_OPTIONS -rm -rf * + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_42 +#AT_START_43 +# 43. label03.at:25: test-label option +at_setup_line='label03.at:25' +at_desc="test-label option" +$at_quiet $as_echo_n " 43: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "43. label03.at:25: testing ..." + $at_traceon -test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z -sleep 1 -echo \"Creating base archive\" -tar -g incr -cf arch.1 -v foo -mv foo/bar/baz foo + { $at_traceoff +$as_echo "$at_srcdir/label03.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -echo \"Creating incremental archive\" -tar -g incr -cf arch.2 -v foo +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho \"# Display label\" +tar --test-label --file=iamanarchive; echo \$? +decho \"# Display label: unlabeled\" +tar --test-label --file=unlabeled.tar; echo \$? +decho \"# Test label: success\" +tar --test-label --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label: failure\" +tar --test-label --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: unlabeled\" +tar --test-label --file=unlabeled.tar 'amalabel'; echo \$? +decho \"# Test label, verbose: success\" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label, verbose: failure\" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: multiple arguments\" +tar --test-label --file=iamanarchive a iamalabel b; echo \$? +decho \"# Test label: wildcards\" +tar --test-label --file=iamanarchive --wildcards '*label'; echo \$? +)" +echo label03.at:28 >"$at_check_line_file" -mv foo old +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -tar xfg arch.1 /dev/null 2>tmperr -sort tmperr >&2 +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho "# Display label" +tar --test-label --file=iamanarchive; echo $? +decho "# Display label: unlabeled" +tar --test-label --file=unlabeled.tar; echo $? +decho "# Test label: success" +tar --test-label --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label: failure" +tar --test-label --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: unlabeled" +tar --test-label --file=unlabeled.tar 'amalabel'; echo $? +decho "# Test label, verbose: success" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label, verbose: failure" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: multiple arguments" +tar --test-label --file=iamanarchive a iamalabel b; echo $? +decho "# Test label: wildcards" +tar --test-label --file=iamanarchive --wildcards '*label'; echo $? +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho "# Display label" +tar --test-label --file=iamanarchive; echo $? +decho "# Display label: unlabeled" +tar --test-label --file=unlabeled.tar; echo $? +decho "# Test label: success" +tar --test-label --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label: failure" +tar --test-label --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: unlabeled" +tar --test-label --file=unlabeled.tar 'amalabel'; echo $? +decho "# Test label, verbose: success" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label, verbose: failure" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: multiple arguments" +tar --test-label --file=iamanarchive a iamalabel b; echo $? +decho "# Test label: wildcards" +tar --test-label --file=iamanarchive --wildcards '*label'; echo $? +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "# Display label +# Display label: unlabeled +# Test label: success +# Test label: failure +# Test label: unlabeled +# Test label, verbose: success +# Test label, verbose: failure +tar: Archive label mismatch +# Test label: multiple arguments +# Test label: wildcards +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Display label +iamalabel +0 +# Display label: unlabeled +0 +# Test label: success +0 +# Test label: failure +1 +# Test label: unlabeled +1 +# Test label, verbose: success +iamalabel +0 +# Test label, verbose: failure +iamalabel +1 +# Test label: multiple arguments +0 +# Test label: wildcards +0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label03.at:28" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/label03.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho \"# Display label\" +tar --test-label --file=iamanarchive; echo \$? +decho \"# Display label: unlabeled\" +tar --test-label --file=unlabeled.tar; echo \$? +decho \"# Test label: success\" +tar --test-label --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label: failure\" +tar --test-label --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: unlabeled\" +tar --test-label --file=unlabeled.tar 'amalabel'; echo \$? +decho \"# Test label, verbose: success\" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label, verbose: failure\" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: multiple arguments\" +tar --test-label --file=iamanarchive a iamalabel b; echo \$? +decho \"# Test label: wildcards\" +tar --test-label --file=iamanarchive --wildcards '*label'; echo \$? )" -echo rename02.at:27 >"$at_check_line_file" +echo label03.at:28 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho "# Display label" +tar --test-label --file=iamanarchive; echo $? +decho "# Display label: unlabeled" +tar --test-label --file=unlabeled.tar; echo $? +decho "# Test label: success" +tar --test-label --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label: failure" +tar --test-label --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: unlabeled" +tar --test-label --file=unlabeled.tar 'amalabel'; echo $? +decho "# Test label, verbose: success" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label, verbose: failure" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: multiple arguments" +tar --test-label --file=iamanarchive a iamalabel b; echo $? +decho "# Test label: wildcards" +tar --test-label --file=iamanarchive --wildcards '*label'; echo $? +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -if test -n "$at_trace_this"; then - ( $at_traceon; +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho "# Display label" +tar --test-label --file=iamanarchive; echo $? +decho "# Display label: unlabeled" +tar --test-label --file=unlabeled.tar; echo $? +decho "# Test label: success" +tar --test-label --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label: failure" +tar --test-label --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: unlabeled" +tar --test-label --file=unlabeled.tar 'amalabel'; echo $? +decho "# Test label, verbose: success" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label, verbose: failure" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: multiple arguments" +tar --test-label --file=iamanarchive a iamalabel b; echo $? +decho "# Test label: wildcards" +tar --test-label --file=iamanarchive --wildcards '*label'; echo $? +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "# Display label +# Display label: unlabeled +# Test label: success +# Test label: failure +# Test label: unlabeled +# Test label, verbose: success +# Test label, verbose: failure +tar: Archive label mismatch +# Test label: multiple arguments +# Test label: wildcards +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Display label +iamalabel +0 +# Display label: unlabeled +0 +# Test label: success +0 +# Test label: failure +1 +# Test label: unlabeled +1 +# Test label, verbose: success +iamalabel +0 +# Test label, verbose: failure +iamalabel +1 +# Test label: multiple arguments +0 +# Test label: wildcards +0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label03.at:28" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/label03.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho \"# Display label\" +tar --test-label --file=iamanarchive; echo \$? +decho \"# Display label: unlabeled\" +tar --test-label --file=unlabeled.tar; echo \$? +decho \"# Test label: success\" +tar --test-label --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label: failure\" +tar --test-label --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: unlabeled\" +tar --test-label --file=unlabeled.tar 'amalabel'; echo \$? +decho \"# Test label, verbose: success\" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo \$? +decho \"# Test label, verbose: failure\" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo \$? +decho \"# Test label: multiple arguments\" +tar --test-label --file=iamanarchive a iamalabel b; echo \$? +decho \"# Test label: wildcards\" +tar --test-label --file=iamanarchive --wildcards '*label'; echo \$? +)" +echo label03.at:28 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z - -sleep 1 - -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo - -mv foo/bar/baz foo - -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo - -mv foo old - -tar xfg arch.1 /dev/null 2>tmperr -sort tmperr >&2 - -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho "# Display label" +tar --test-label --file=iamanarchive; echo $? +decho "# Display label: unlabeled" +tar --test-label --file=unlabeled.tar; echo $? +decho "# Test label: success" +tar --test-label --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label: failure" +tar --test-label --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: unlabeled" +tar --test-label --file=unlabeled.tar 'amalabel'; echo $? +decho "# Test label, verbose: success" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label, verbose: failure" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: multiple arguments" +tar --test-label --file=iamanarchive a iamalabel b; echo $? +decho "# Test label: wildcards" +tar --test-label --file=iamanarchive --wildcards '*label'; echo $? ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -15508,188 +16547,390 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +exec <&- +genfile --file file +tar -c --label='iamalabel' --file iamanarchive file +tar -c --file unlabeled.tar file +decho "# Display label" +tar --test-label --file=iamanarchive; echo $? +decho "# Display label: unlabeled" +tar --test-label --file=unlabeled.tar; echo $? +decho "# Test label: success" +tar --test-label --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label: failure" +tar --test-label --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: unlabeled" +tar --test-label --file=unlabeled.tar 'amalabel'; echo $? +decho "# Test label, verbose: success" +tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $? +decho "# Test label, verbose: failure" +tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $? +decho "# Test label: multiple arguments" +tar --test-label --file=iamanarchive a iamalabel b; echo $? +decho "# Test label: wildcards" +tar --test-label --file=iamanarchive --wildcards '*label'; echo $? +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "# Display label +# Display label: unlabeled +# Test label: success +# Test label: failure +# Test label: unlabeled +# Test label, verbose: success +# Test label, verbose: failure +tar: Archive label mismatch +# Test label: multiple arguments +# Test label: wildcards +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Display label +iamalabel +0 +# Display label: unlabeled +0 +# Test label: success +0 +# Test label: failure +1 +# Test label: unlabeled +1 +# Test label, verbose: success +iamalabel +0 +# Test label, verbose: failure +iamalabel +1 +# Test label: multiple arguments +0 +# Test label: wildcards +0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label03.at:28" -test -z "`sort < /dev/null 2>&1`" || exit 77 +$at_failed && at_func_log_failure +$at_traceon; } -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 -mkdir foo/bar -genfile --file foo/bar/file.r -mkdir foo/bar/baz -genfile --file foo/bar/baz/file.z -sleep 1 -echo "Creating base archive" -tar -g incr -cf arch.1 -v foo -mv foo/bar/baz foo + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_43 +#AT_START_44 +# 44. label04.at:25: label with non-create option +at_setup_line='label04.at:25' +at_desc="label with non-create option" +$at_quiet $as_echo_n " 44: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "44. label04.at:25: testing ..." + $at_traceon -echo "Creating incremental archive" -tar -g incr -cf arch.2 -v foo -mv foo old -tar xfg arch.1 /dev/null 2>tmperr -sort tmperr >&2 -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi + { $at_traceoff +$as_echo "$at_srcdir/label04.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -at_failed=false -echo >>"$at_stderr"; echo "tar: foo/bar: Directory is new -tar: foo/bar/baz: Directory is new -tar: foo/baz: Directory has been renamed from \`foo/bar/baz' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating base archive -foo/ -foo/bar/ -foo/bar/baz/ -foo/file1 -foo/file2 -foo/bar/file.r -foo/bar/baz/file.z -Creating incremental archive -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 1 -foo -foo/bar -foo/bar/baz -foo/bar/baz/file.z -foo/bar/file.r -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/bar/ -foo/baz/ -Begin directory listing 2 -foo -foo/bar -foo/bar/file.r -foo/baz -foo/baz/file.z -foo/file1 -foo/file2 -End directory listing 2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename02.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive --label='New volume' file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive --label='New volume' file +)" +echo label04.at:28 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive --label='New volume' file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive --label='New volume' file +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * - echo 1 > "$at_status_file" - exit 1 +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive --label='New volume' file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive --label='New volume' file +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Volume \`New volume' does not match \`My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label04.at:28" -$at_traceon - +$at_failed && at_func_log_failure +$at_traceon; } + { $at_traceoff +$as_echo "$at_srcdir/label04.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive --label='New volume' file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive --label='New volume' file +)" +echo label04.at:28 >"$at_check_line_file" - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * - 35 ) # 35. rename03.at:23: cyclic renames - at_setup_line='rename03.at:23' - at_desc="cyclic renames" - $at_quiet $ECHO_N " 35: cyclic renames $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "35. rename03.at:23: testing ..." - $at_traceon +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive --label='New volume' file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive --label='New volume' file +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive --label='New volume' file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive --label='New volume' file +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Volume \`New volume' does not match \`My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label04.at:28" +$at_failed && at_func_log_failure +$at_traceon; } + { $at_traceoff +$as_echo "$at_srcdir/label04.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive --label='New volume' file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive --label='New volume' file +)" +echo label04.at:28 >"$at_check_line_file" - $at_traceoff -echo "$at_srcdir/rename03.at:26: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive --label='New volume' file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive --label='New volume' file +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive --label='New volume' file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive --label='New volume' file +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Volume \`New volume' does not match \`My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label04.at:28" -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 +$at_failed && at_func_log_failure +$at_traceon; } -mkdir foo/a -genfile --file foo/a/filea -mkdir foo/b -genfile --file foo/b/fileb -mkdir foo/c -genfile --file foo/c/filec -sleep 1 + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_44 +#AT_START_45 +# 45. label05.at:22: label with non-create option +at_setup_line='label05.at:22' +at_desc="label with non-create option" +$at_quiet $as_echo_n " 45: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "45. label05.at:22: testing ..." + $at_traceon -echo \"First dump\" -echo \"First dump\">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 -# Shuffle directories: -(cd foo -mv a \$\$ -mv c a -mv b c -mv \$\$ b) -echo \"Second dump\" -echo \"Second dump\" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 -tar xfg arch.1 /dev/null -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" + { $at_traceoff +$as_echo "$at_srcdir/label05.at:25: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive file )" -echo rename03.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo label05.at:25 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15698,58 +16939,18 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 - -mkdir foo/a -genfile --file foo/a/filea - -mkdir foo/b -genfile --file foo/b/fileb - -mkdir foo/c -genfile --file foo/c/filec - -sleep 1 - -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 - -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) - -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 - -tar xfg arch.1 /dev/null - -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" - -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive file ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15758,249 +16959,324 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive file +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Archive not labeled to match \`My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label05.at:25" -test -z "`sort < /dev/null 2>&1`" || exit 77 +$at_failed && at_func_log_failure +$at_traceon; } + { $at_traceoff +$as_echo "$at_srcdir/label05.at:25: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive file +)" +echo label05.at:25 >"$at_check_line_file" -mkdir foo/a -genfile --file foo/a/filea +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -mkdir foo/b -genfile --file foo/b/fileb +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive file +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -mkdir foo/c -genfile --file foo/c/filec - -sleep 1 - -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 - -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) - -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 - -tar xfg arch.1 /dev/null - -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" - -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive file ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "First dump -tar: foo/a: Directory is new -tar: foo/b: Directory is new -tar: foo/c: Directory is new -Second dump -tar: foo/a: Directory has been renamed from \`foo/c' -tar: foo/b: Directory has been renamed from \`foo/a' -tar: foo/c: Directory has been renamed from \`foo/b' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "First dump -foo/ -foo/a/ -foo/b/ -foo/c/ -foo/file1 -foo/file2 -foo/a/filea -foo/b/fileb -foo/c/filec -Second dump -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 1 -foo -foo/a -foo/a/filea -foo/b -foo/b/fileb -foo/c -foo/c/filec -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 2 -foo -foo/a -foo/a/filec -foo/b -foo/b/filea -foo/c -foo/c/fileb -foo/file1 -foo/file2 -End directory listing 2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Archive not labeled to match \`My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label05.at:25" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi + { $at_traceoff +$as_echo "$at_srcdir/label05.at:25: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * -$at_traceon +exec <&- +genfile --file file +decho \"# Create volume\" +tar -c -f archive file +decho \"# Update: wrong label\" +tar -rf archive --label='My volume' file; echo \$? +decho \"# Update: right label\" +tar -rf archive file +)" +echo label05.at:25 >"$at_check_line_file" - $at_traceoff -echo "$at_srcdir/rename03.at:26: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive file +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - +exec <&- +genfile --file file +decho "# Create volume" +tar -c -f archive file +decho "# Update: wrong label" +tar -rf archive --label='My volume' file; echo $? +decho "# Update: right label" +tar -rf archive file +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "# Create volume +# Update: wrong label +tar: Archive not labeled to match \`My volume' +tar: Error is not recoverable: exiting now +# Update: right label +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "# Create volume +# Update: wrong label +2 +# Update: right label +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/label05.at:25" -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 +$at_failed && at_func_log_failure +$at_traceon; } -mkdir foo/a -genfile --file foo/a/filea -mkdir foo/b -genfile --file foo/b/fileb -mkdir foo/c -genfile --file foo/c/filec -sleep 1 + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_45 +#AT_START_46 +# 46. backup01.at:33: extracting existing dir with --backup +at_setup_line='backup01.at:33' +at_desc="extracting existing dir with --backup" +$at_quiet $as_echo_n " 46: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "46. backup01.at:33: testing ..." + $at_traceon -echo \"First dump\" -echo \"First dump\">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 -# Shuffle directories: -(cd foo -mv a \$\$ -mv c a -mv b c -mv \$\$ b) -echo \"Second dump\" -echo \"Second dump\" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 -tar xfg arch.1 /dev/null -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" + { $at_traceoff +$as_echo "$at_srcdir/backup01.at:36: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp )" -echo rename03.at:26 >"$at_check_line_file" +echo backup01.at:36 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -if test -n "$at_trace_this"; then - ( $at_traceon; +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir1/ +dir1/file1 +Renaming \`dir1/file1' to \`dir1/file1~' +dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/backup01.at:36" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/backup01.at:36: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +)" +echo backup01.at:36 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 - -mkdir foo/a -genfile --file foo/a/filea - -mkdir foo/b -genfile --file foo/b/fileb - -mkdir foo/c -genfile --file foo/c/filec - -sleep 1 - -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 - -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) - -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 - -tar xfg arch.1 /dev/null - -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -16009,125 +17285,92 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir1/ +dir1/file1 +Renaming \`dir1/file1' to \`dir1/file1~' +dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/backup01.at:36" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/backup01.at:36: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 - +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +)" +echo backup01.at:36 >"$at_check_line_file" -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 - -mkdir foo/a -genfile --file foo/a/filea - -mkdir foo/b -genfile --file foo/b/fileb - -mkdir foo/c -genfile --file foo/c/filec - -sleep 1 - -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 - -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) - -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 - -tar xfg arch.1 /dev/null +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "First dump -tar: foo/a: Directory is new -tar: foo/b: Directory is new -tar: foo/c: Directory is new -Second dump -tar: foo/a: Directory has been renamed from \`foo/c' -tar: foo/b: Directory has been renamed from \`foo/a' -tar: foo/c: Directory has been renamed from \`foo/b' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "First dump -foo/ -foo/a/ -foo/b/ -foo/c/ -foo/file1 -foo/file2 -foo/a/filea -foo/b/fileb -foo/c/filec -Second dump -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 1 -foo -foo/a -foo/a/filea -foo/b -foo/b/fileb -foo/c -foo/c/filec -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 2 -foo -foo/a -foo/a/filec -foo/b -foo/b/filea -foo/c -foo/c/fileb -foo/file1 -foo/file2 -End directory listing 2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/rename03.at:26: +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir1/ +dir1/file1 +Renaming \`dir1/file1' to \`dir1/file1~' +dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/backup01.at:36" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/backup01.at:36: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16136,62 +17379,32 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 - -mkdir foo/a -genfile --file foo/a/filea - -mkdir foo/b -genfile --file foo/b/fileb - -mkdir foo/c -genfile --file foo/c/filec - -sleep 1 - -echo \"First dump\" -echo \"First dump\">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 - -# Shuffle directories: -(cd foo -mv a \$\$ -mv c a -mv b c -mv \$\$ b) - -echo \"Second dump\" -echo \"Second dump\" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 - -tar xfg arch.1 /dev/null - -echo \"Begin directory listing 1\" -find foo | sort -echo \"End directory listing 1\" - -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp )" -echo rename03.at:26 >"$at_check_line_file" +echo backup01.at:36 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -if test -n "$at_trace_this"; then - ( $at_traceon; +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16200,539 +17413,8550 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir1/ +dir1/file1 +Renaming \`dir1/file1' to \`dir1/file1~' +dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/backup01.at:36" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/backup01.at:36: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +)" +echo backup01.at:36 >"$at_check_line_file" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -mkdir foo/a -genfile --file foo/a/filea +mkdir dir1 dir2 +echo bla > dir1/file1 +tar cf test.tar dir1 dir2 +tar xfv test.tar --backup --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir1/ +dir1/file1 +Renaming \`dir1/file1' to \`dir1/file1~' +dir2/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/backup01.at:36" -mkdir foo/b -genfile --file foo/b/fileb +$at_failed && at_func_log_failure +$at_traceon; } -mkdir foo/c -genfile --file foo/c/filec -sleep 1 -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_46 +#AT_START_47 +# 47. gzip.at:23: gzip +at_setup_line='gzip.at:23' +at_desc="gzip" +$at_quiet $as_echo_n " 47: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "47. gzip.at:23: testing ..." + $at_traceon -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 -tar xfg arch.1 /dev/null -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" +unset TAR_OPTIONS -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * +{ $at_traceoff +$as_echo "$at_srcdir/gzip.at:28: +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar xfvz /dev/null 2>err +RC=\$? +sed -n '/^tar:/p' err >&2 +exit \$RC +" +echo gzip.at:28 >"$at_check_line_file" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; -mkdir foo -genfile --file foo/file1 -genfile --file foo/file2 +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -mkdir foo/a -genfile --file foo/a/filea +tar xfvz /dev/null 2>err +RC=$? +sed -n '/^tar:/p' err >&2 +exit $RC + ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; -mkdir foo/b -genfile --file foo/b/fileb +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 -mkdir foo/c -genfile --file foo/c/filec +tar xfvz /dev/null 2>err +RC=$? +sed -n '/^tar:/p' err >&2 +exit $RC + ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: Child returned status 1 +tar: Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 2 $at_status "$at_srcdir/gzip.at:28" -sleep 1 +$at_failed && at_func_log_failure +$at_traceon; } -echo "First dump" -echo "First dump">&2 -tar -g incr -cf arch.1 -v foo 2>tmperr -sort tmperr >&2 -# Shuffle directories: -(cd foo -mv a $$ -mv c a -mv b c -mv $$ b) + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_47 +#AT_START_48 +# 48. incremental.at:23: incremental +at_setup_line='incremental.at:23' +at_desc="incremental" +$at_quiet $as_echo_n " 48: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "48. incremental.at:23: testing ..." + $at_traceon -echo "Second dump" -echo "Second dump" >&2 -tar -g incr -cf arch.2 -v foo 2>tmperr -sort tmperr >&2 -tar xfg arch.1 /dev/null -echo "Begin directory listing 1" -find foo | sort -echo "End directory listing 1" -tar xfgv arch.2 /dev/null -echo Begin directory listing 2 -find foo | sort -echo End directory listing 2 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -echo >>"$at_stderr"; echo "First dump -tar: foo/a: Directory is new -tar: foo/b: Directory is new -tar: foo/c: Directory is new -Second dump -tar: foo/a: Directory has been renamed from \`foo/c' -tar: foo/b: Directory has been renamed from \`foo/a' -tar: foo/c: Directory has been renamed from \`foo/b' -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "First dump -foo/ -foo/a/ -foo/b/ -foo/c/ -foo/file1 -foo/file2 -foo/a/filea -foo/b/fileb -foo/c/filec -Second dump -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 1 -foo -foo/a -foo/a/filea -foo/b -foo/b/fileb -foo/c -foo/c/filec -foo/file1 -foo/file2 -End directory listing 1 -foo/ -foo/a/ -foo/b/ -foo/c/ -Begin directory listing 2 -foo -foo/a -foo/a/filec -foo/b -foo/b/filea -foo/c -foo/c/fileb -foo/file1 -foo/file2 -End directory listing 2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename03.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then + { $at_traceoff +$as_echo "$at_srcdir/incremental.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * +mkdir structure +echo x >structure/file - echo 1 > "$at_status_file" - exit 1 -fi +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created \`on or after' the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +)" +echo incremental.at:26 >"$at_check_line_file" -$at_traceon +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * +mkdir structure +echo x >structure/file +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created `on or after' the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * - 36 ) # 36. rename04.at:27: renamed directory containing subdirectories - at_setup_line='rename04.at:27' - at_desc="renamed directory containing subdirectories" - $at_quiet $ECHO_N " 36: renamed directory containing subdirectories $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "36. rename04.at:27: testing ..." - $at_traceon +mkdir structure +echo x >structure/file +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created `on or after' the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "structure/ +separator +structure/ +structure/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incremental.at:26" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/rename04.at:30: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { $at_traceoff +$as_echo "$at_srcdir/incremental.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +mkdir structure +echo x >structure/file -test -z "`sort < /dev/null 2>&1`" || exit 77 +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created \`on or after' the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +)" +echo incremental.at:26 >"$at_check_line_file" -decho Creating initial archive -tar -cf archive.1 -g db.1 directory +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -decho Renaming -mv directory dir +mkdir structure +echo x >structure/file -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created `on or after' the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir structure +echo x >structure/file + +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created `on or after' the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "structure/ +separator +structure/ +structure/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incremental.at:26" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incremental.at:26: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir structure +echo x >structure/file + +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created \`on or after' the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +)" +echo incremental.at:26 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir structure +echo x >structure/file + +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created `on or after' the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir structure +echo x >structure/file + +# On Nextstep (and perhaps other 4.3BSD systems), +# a newly created file's ctime isn't updated +# until the next sync or stat operation on the file. +ls -l structure/file >/dev/null + +# If the time of an initial backup and the creation time of a file contained +# in that backup are the same, the file will be backed up again when an +# incremental backup is done, because the incremental backup backs up +# files created `on or after' the initial backup time. Without the sleep +# command, behaviour of tar becomes variable, depending whether the system +# clock ticked over to the next second between creating the file and +# backing it up. +sleep 1 + +tar cf archive --listed=list structure +tar cfv archive --listed=list structure +echo separator +# ReiserFS often offsets the timestamps of newly created files +# 1 second to the past. Try to compensate for it, until a better +# solution is found. +sleep 2 +echo y >structure/file +tar cfv archive --listed=list structure +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "structure/ +separator +structure/ +structure/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incremental.at:26" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_48 +#AT_START_49 +# 49. incr01.at:27: restore broken symlinks from incremental +at_setup_line='incr01.at:27' +at_desc="restore broken symlinks from incremental" +$at_quiet $as_echo_n " 49: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "49. incr01.at:27: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/incr01.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +\$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +)" +echo incr01.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/bar +separator +directory/ +tar: Deleting \`directory/bar' +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr01.at:30" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr01.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +\$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +)" +echo incr01.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/bar +separator +directory/ +tar: Deleting \`directory/bar' +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr01.at:30" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr01.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +\$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +)" +echo incr01.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir directory +$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir directory +$as_ln_s foo directory/bar + +tar -cf archive.0 -g db directory +rm directory/bar +tar -cf archive.1 -g db directory + +mv directory orig + +tar xvfg archive.0 /dev/null --warning=no-timestamp +echo separator +tar xvfg archive.1 /dev/null --warning=no-timestamp +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/bar +separator +directory/ +tar: Deleting \`directory/bar' +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr01.at:30" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_49 +#AT_START_50 +# 50. incr02.at:32: restoring timestamps from incremental +at_setup_line='incr02.at:32' +at_desc="restoring timestamps from incremental" +$at_quiet $as_echo_n " 50: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "50. incr02.at:32: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/incr02.at:35: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, \`dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +)" +echo incr02.at:35 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, `dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, `dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr02.at:35" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr02.at:35: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, \`dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +)" +echo incr02.at:35 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, `dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, `dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr02.at:35" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr02.at:35: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, \`dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# \`subdir1' prior to restoring \`dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +)" +echo incr02.at:35 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, `dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +# Create directory structure +mkdir dir +mkdir dir/subdir1 +mkdir dir/subdir2 +genfile --length 10 --file dir/subdir1/file + +# Save mtime for later comparison +genfile --stat=mtime dir/subdir1 > ts + +# Create an archive. Using incremental mode makes sure the +# archive will have a directory-first member ordering, +# i.e.: +# dir/ +# dir/subdir1/ +# dir/subdir2/ +# dir/subdir1/foofile +# +# When restoring from this directory structure, `dir/subdir2/' used to +# trigger apply_nonancestor_delayed_set_stat() which restored stats for +# `subdir1' prior to restoring `dir/subdir1/foofile'. Then, restoring the +# latter clobbered the directory timestamp. + +tar -cf archive -g db dir + +# Move away the directory +mv dir orig + +# Wait enough time for timestamps to differ in case of failure. +sleep 5 + +# Restore the directory +tar -xf archive dir + +# Check the timestamp +genfile --stat=mtime dir/subdir1 | diff ts - +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr02.at:35" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_50 +#AT_START_51 +# 51. listed01.at:26: --listed for individual files +at_setup_line='listed01.at:26' +at_desc="--listed for individual files" +$at_quiet $as_echo_n " 51: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "51. listed01.at:26: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/listed01.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 + +tar --create \\ + --file=archive.1 \\ + --listed-incremental=listing \\ + directory/file* + +tar tf archive.1 || exit 1 + +sleep 2 + +genfile --length 10240 --pattern zeros --file directory/file2 + +echo \"separator\" +cp listing listing.old +tar --create \\ + --file=archive.2 \\ + --listed-incremental=listing \\ + directory/file* || exit 1 + +tar tf archive.2 || exit 1 +)" +echo listed01.at:29 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 + +tar --create \ + --file=archive.1 \ + --listed-incremental=listing \ + directory/file* + +tar tf archive.1 || exit 1 + +sleep 2 + +genfile --length 10240 --pattern zeros --file directory/file2 + +echo "separator" +cp listing listing.old +tar --create \ + --file=archive.2 \ + --listed-incremental=listing \ + directory/file* || exit 1 + +tar tf archive.2 || exit 1 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 + +tar --create \ + --file=archive.1 \ + --listed-incremental=listing \ + directory/file* + +tar tf archive.1 || exit 1 + +sleep 2 + +genfile --length 10240 --pattern zeros --file directory/file2 + +echo "separator" +cp listing listing.old +tar --create \ + --file=archive.2 \ + --listed-incremental=listing \ + directory/file* || exit 1 + +tar tf archive.2 || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/file1 +separator +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/listed01.at:29" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/listed01.at:29: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 + +tar --create \\ + --file=archive.1 \\ + --listed-incremental=listing \\ + directory/file* + +tar tf archive.1 || exit 1 + +sleep 2 + +genfile --length 10240 --pattern zeros --file directory/file2 + +echo \"separator\" +cp listing listing.old +tar --create \\ + --file=archive.2 \\ + --listed-incremental=listing \\ + directory/file* || exit 1 + +tar tf archive.2 || exit 1 +)" +echo listed01.at:29 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 + +tar --create \ + --file=archive.1 \ + --listed-incremental=listing \ + directory/file* + +tar tf archive.1 || exit 1 + +sleep 2 + +genfile --length 10240 --pattern zeros --file directory/file2 + +echo "separator" +cp listing listing.old +tar --create \ + --file=archive.2 \ + --listed-incremental=listing \ + directory/file* || exit 1 + +tar tf archive.2 || exit 1 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +# Let the things settle +sleep 1 + +tar --create \ + --file=archive.1 \ + --listed-incremental=listing \ + directory/file* + +tar tf archive.1 || exit 1 + +sleep 2 + +genfile --length 10240 --pattern zeros --file directory/file2 + +echo "separator" +cp listing listing.old +tar --create \ + --file=archive.2 \ + --listed-incremental=listing \ + directory/file* || exit 1 + +tar tf archive.2 || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/file1 +separator +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/listed01.at:29" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_51 +#AT_START_52 +# 52. listed02.at:28: working --listed +at_setup_line='listed02.at:28' +at_desc="working --listed" +$at_quiet $as_echo_n " 52: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "52. listed02.at:28: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/listed02.at:31: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File \$file > \$file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 \"Creating main archive\" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 \"Creating incremental archive\" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 \"Extracting main archive\" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +)" +echo listed02.at:31 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File $file > $file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 "Creating main archive" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 "Creating incremental archive" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 "Extracting main archive" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File $file > $file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 "Creating main archive" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 "Creating incremental archive" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 "Extracting main archive" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "Creating main archive +tar: tart/c0: Directory is new +tar: tart/c1: Directory is new +tar: tart: Directory is new +Creating incremental archive +tar: tart/c2: Directory has been renamed from \`tart/c1' +Extracting main archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Create directories +Creating main archive +tart/ +tart/c0/ +tart/c1/ +tart/a1 +tart/b1 +tart/c0/cq1 +tart/c0/cq2 +tart/c1/ca1 +tart/c1/ca2 +Modifying filesystem +Directory contents +tart +tart/b2 +tart/c0 +tart/c0/cq1 +tart/c0/cq2 +tart/c2 +tart/c2/ca1 +tart/c2/ca2 +tart/c2/ca3 +Creating incremental archive +tart/ +tart/c0/ +tart/c2/ +tart/b2 +tart/c2/ca3 +Extracting main archive +tart/ +tart/c0/ +tart/c1/ +tart/a1 +tart/b1 +tart/c0/cq1 +tart/c0/cq2 +tart/c1/ca1 +tart/c1/ca2 +Extracting incremental archive +tar: Deleting \`tart/a1' +tar: Deleting \`tart/b1' +tart/ +tart/b2 +tart/c0/ +tart/c2/ +tart/c2/ca3 +Final files: +tart +tart/b2 +tart/c0 +tart/c0/cq1 +tart/c0/cq2 +tart/c2 +tart/c2/ca1 +tart/c2/ca2 +tart/c2/ca3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/listed02.at:31" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/listed02.at:31: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File \$file > \$file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 \"Creating main archive\" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 \"Creating incremental archive\" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 \"Extracting main archive\" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +)" +echo listed02.at:31 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File $file > $file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 "Creating main archive" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 "Creating incremental archive" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 "Extracting main archive" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +echo Create directories + +mkdir tart +sleep 1 +mkdir tart/c0 +sleep 1 +mkdir tart/c1 +sleep 1 + +for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2 +do + echo File $file > $file + sleep 1 +done + +sleep 1 +echo Creating main archive +echo >&2 "Creating main archive" +tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart 2> err || exit 1 + +# The above prints two lines to stderr announcing the new directories c0 and c1. +# Ensure that they appear in this script's stderr in sorted order. +sort err 1>&2; rm -f err + +sleep 1 +echo Modifying filesystem +rm tart/a1 + +mv tart/b1 tart/b2 +mv tart/c1 tart/c2 +touch tart/c2/ca3 + +echo Directory contents +find tart -print | sort 2>/dev/null + +sleep 1 +echo Creating incremental archive +echo >&2 "Creating incremental archive" +cp -p tart.incr1 tart.incr2 +tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 + +sleep 1 + +rm -rf tart/* +echo Extracting main archive +echo >&2 "Extracting main archive" +tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1 +echo Extracting incremental archive +# This command should produce three messages about deletion +# of the existing files, that may appear in any order. Piping +# to sort makes sure we don't depend on any particular ordering. +tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 2>/dev/null + +echo Final files: +find tart -print | sort 2>/dev/null +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "Creating main archive +tar: tart/c0: Directory is new +tar: tart/c1: Directory is new +tar: tart: Directory is new +Creating incremental archive +tar: tart/c2: Directory has been renamed from \`tart/c1' +Extracting main archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Create directories +Creating main archive +tart/ +tart/c0/ +tart/c1/ +tart/a1 +tart/b1 +tart/c0/cq1 +tart/c0/cq2 +tart/c1/ca1 +tart/c1/ca2 +Modifying filesystem +Directory contents +tart +tart/b2 +tart/c0 +tart/c0/cq1 +tart/c0/cq2 +tart/c2 +tart/c2/ca1 +tart/c2/ca2 +tart/c2/ca3 +Creating incremental archive +tart/ +tart/c0/ +tart/c2/ +tart/b2 +tart/c2/ca3 +Extracting main archive +tart/ +tart/c0/ +tart/c1/ +tart/a1 +tart/b1 +tart/c0/cq1 +tart/c0/cq2 +tart/c1/ca1 +tart/c1/ca2 +Extracting incremental archive +tar: Deleting \`tart/a1' +tar: Deleting \`tart/b1' +tart/ +tart/b2 +tart/c0/ +tart/c2/ +tart/c2/ca3 +Final files: +tart +tart/b2 +tart/c0 +tart/c0/cq1 +tart/c0/cq2 +tart/c2 +tart/c2/ca1 +tart/c2/ca2 +tart/c2/ca3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/listed02.at:31" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_52 +#AT_START_53 +# 53. listed03.at:22: incremental dump when the parent directory is unreadable +at_setup_line='listed03.at:22' +at_desc="incremental dump when the parent directory is unreadable" +$at_quiet $as_echo_n " 53: $at_desc" +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "53. listed03.at:22: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/listed03.at:25: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +genfile --file dir/sub/a/file +cd dir/sub + +chmod a-r .. +tar -c -f archive.tar --listed-incremental=db.1 -v a +status=\$? +chmod a+r .. +exit \$status +)" +echo listed03.at:25 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +genfile --file dir/sub/a/file +cd dir/sub + +chmod a-r .. +tar -c -f archive.tar --listed-incremental=db.1 -v a +status=$? +chmod a+r .. +exit $status +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +genfile --file dir/sub/a/file +cd dir/sub + +chmod a-r .. +tar -c -f archive.tar --listed-incremental=db.1 -v a +status=$? +chmod a+r .. +exit $status +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: a: Directory is new +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/listed03.at:25" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_53 +#AT_START_54 +# 54. incr03.at:28: renamed files in incrementals +at_setup_line='incr03.at:28' +at_desc="renamed files in incrementals" +$at_quiet $as_echo_n " 54: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "54. incr03.at:28: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/incr03.at:31: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +)" +echo incr03.at:31 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Listing of archive.1 +directory/ +directory/x +directory/y +Listing of archive.2 +directory/ +directory/z +Directory after first restore +directory +directory/x +directory/y +Directory after second restore +directory +directory/y +directory/z +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr03.at:31" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr03.at:31: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +)" +echo incr03.at:31 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Listing of archive.1 +directory/ +directory/x +directory/y +Listing of archive.2 +directory/ +directory/z +Directory after first restore +directory +directory/x +directory/y +Directory after second restore +directory +directory/y +directory/z +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr03.at:31" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr03.at:31: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +)" +echo incr03.at:31 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --file=directory/x +genfile --file=directory/y + +sleep 1 + +tar -cf archive.1 -g db directory + +mv directory/x directory/z +cp db db.old +tar -cf archive.2 -g db directory + +mv directory orig + +echo Listing of archive.1 +tar -tf archive.1 | sort +echo Listing of archive.2 +tar -tf archive.2 | sort + +echo Directory after first restore +tar -xf archive.1 -g db --warning=no-timestamp +find directory | sort + +echo Directory after second restore +tar -xf archive.2 -g db --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Listing of archive.1 +directory/ +directory/x +directory/y +Listing of archive.2 +directory/ +directory/z +Directory after first restore +directory +directory/x +directory/y +Directory after second restore +directory +directory/y +directory/z +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr03.at:31" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_54 +#AT_START_55 +# 55. incr04.at:29: proper icontents initialization +at_setup_line='incr04.at:29' +at_desc="proper icontents initialization" +$at_quiet $as_echo_n " 55: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "55. incr04.at:29: testing ..." + $at_traceon + + + + + + + + { $at_traceoff +$as_echo "$at_srcdir/incr04.at:34: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo \"Initial dump\" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo \"Incremental dump\" +tar cvf a1.tar -g a.sna a +)" +echo incr04.at:34 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf("a/b/one_31_chars_long_file_name_%03d\n", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo "Initial dump" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo "Incremental dump" +tar cvf a1.tar -g a.sna a +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf("a/b/one_31_chars_long_file_name_%03d\n", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo "Initial dump" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo "Incremental dump" +tar cvf a1.tar -g a.sna a +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: a: Directory is new +tar: a/b: Directory is new +tar: a/c: Directory has been renamed from \`a/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Initial dump +a/ +a/b/ +a/b/one_31_chars_long_file_name_001 +a/b/one_31_chars_long_file_name_002 +a/b/one_31_chars_long_file_name_003 +a/b/one_31_chars_long_file_name_004 +a/b/one_31_chars_long_file_name_005 +a/b/one_31_chars_long_file_name_006 +a/b/one_31_chars_long_file_name_007 +a/b/one_31_chars_long_file_name_008 +a/b/one_31_chars_long_file_name_009 +a/b/one_31_chars_long_file_name_010 +a/b/one_31_chars_long_file_name_011 +a/b/one_31_chars_long_file_name_012 +a/b/one_31_chars_long_file_name_013 +a/b/one_31_chars_long_file_name_014 +a/b/one_31_chars_long_file_name_015 +a/b/one_31_chars_long_file_name_016 +a/b/one_31_chars_long_file_name_017 +a/b/one_31_chars_long_file_name_018 +a/b/one_31_chars_long_file_name_019 +a/b/one_31_chars_long_file_name_020 +a/b/one_31_chars_long_file_name_021 +a/b/one_31_chars_long_file_name_022 +a/b/one_31_chars_long_file_name_023 +a/b/one_31_chars_long_file_name_024 +a/b/one_31_chars_long_file_name_025 +a/b/one_31_chars_long_file_name_026 +a/b/one_31_chars_long_file_name_027 +a/b/one_31_chars_long_file_name_028 +a/b/one_31_chars_long_file_name_029 +a/b/one_31_chars_long_file_name_030 +a/b/one_31_chars_long_file_name_031 +a/b/one_31_chars_long_file_name_032 +a/b/one_31_chars_long_file_name_033 +a/b/one_31_chars_long_file_name_034 +a/b/one_31_chars_long_file_name_035 +a/b/one_31_chars_long_file_name_036 +a/b/one_31_chars_long_file_name_037 +a/b/one_31_chars_long_file_name_038 +a/b/one_31_chars_long_file_name_039 +a/b/one_31_chars_long_file_name_040 +a/b/one_31_chars_long_file_name_041 +a/b/one_31_chars_long_file_name_042 +a/b/one_31_chars_long_file_name_043 +a/b/one_31_chars_long_file_name_044 +a/b/one_31_chars_long_file_name_045 +a/b/one_31_chars_long_file_name_046 +a/b/one_31_chars_long_file_name_047 +a/b/one_31_chars_long_file_name_048 +a/b/one_31_chars_long_file_name_049 +a/b/one_31_chars_long_file_name_050 +a/b/one_31_chars_long_file_name_051 +a/b/one_31_chars_long_file_name_052 +a/b/one_31_chars_long_file_name_053 +a/b/one_31_chars_long_file_name_054 +a/b/one_31_chars_long_file_name_055 +a/b/one_31_chars_long_file_name_056 +a/b/one_31_chars_long_file_name_057 +a/b/one_31_chars_long_file_name_058 +a/b/one_31_chars_long_file_name_059 +a/b/one_31_chars_long_file_name_060 +a/b/one_31_chars_long_file_name_061 +a/b/one_31_chars_long_file_name_062 +a/b/one_31_chars_long_file_name_063 +a/b/one_31_chars_long_file_name_064 +a/b/one_31_chars_long_file_name_065 +a/b/one_31_chars_long_file_name_066 +a/b/one_31_chars_long_file_name_067 +a/b/one_31_chars_long_file_name_068 +a/b/one_31_chars_long_file_name_069 +a/b/one_31_chars_long_file_name_070 +a/b/one_31_chars_long_file_name_071 +a/b/one_31_chars_long_file_name_072 +a/b/one_31_chars_long_file_name_073 +a/b/one_31_chars_long_file_name_074 +a/b/one_31_chars_long_file_name_075 +a/b/one_31_chars_long_file_name_076 +a/b/one_31_chars_long_file_name_077 +a/b/one_31_chars_long_file_name_078 +a/b/one_31_chars_long_file_name_079 +a/b/one_31_chars_long_file_name_080 +a/b/one_31_chars_long_file_name_081 +a/b/one_31_chars_long_file_name_082 +a/b/one_31_chars_long_file_name_083 +a/b/one_31_chars_long_file_name_084 +a/b/one_31_chars_long_file_name_085 +a/b/one_31_chars_long_file_name_086 +a/b/one_31_chars_long_file_name_087 +a/b/one_31_chars_long_file_name_088 +a/b/one_31_chars_long_file_name_089 +a/b/one_31_chars_long_file_name_090 +a/b/one_31_chars_long_file_name_091 +a/b/one_31_chars_long_file_name_092 +a/b/one_31_chars_long_file_name_093 +a/b/one_31_chars_long_file_name_094 +a/b/one_31_chars_long_file_name_095 +a/b/one_31_chars_long_file_name_096 +a/b/one_31_chars_long_file_name_097 +a/b/one_31_chars_long_file_name_098 +a/b/one_31_chars_long_file_name_099 +a/b/one_31_chars_long_file_name_100 +a/b/one_31_chars_long_file_name_101 +a/b/one_31_chars_long_file_name_102 +a/b/one_31_chars_long_file_name_103 +a/b/one_31_chars_long_file_name_104 +a/b/one_31_chars_long_file_name_105 +a/b/one_31_chars_long_file_name_106 +a/b/one_31_chars_long_file_name_107 +a/b/one_31_chars_long_file_name_108 +a/b/one_31_chars_long_file_name_109 +a/b/one_31_chars_long_file_name_110 +a/b/one_31_chars_long_file_name_111 +a/b/one_31_chars_long_file_name_112 +a/b/one_31_chars_long_file_name_113 +a/b/one_31_chars_long_file_name_114 +a/b/one_31_chars_long_file_name_115 +a/b/one_31_chars_long_file_name_116 +a/b/one_31_chars_long_file_name_117 +a/b/one_31_chars_long_file_name_118 +a/b/one_31_chars_long_file_name_119 +a/b/one_31_chars_long_file_name_120 +a/b/one_31_chars_long_file_name_121 +a/b/one_31_chars_long_file_name_122 +a/b/one_31_chars_long_file_name_123 +a/b/one_31_chars_long_file_name_124 +a/b/one_31_chars_long_file_name_125 +a/b/one_31_chars_long_file_name_126 +a/b/one_31_chars_long_file_name_127 +a/b/one_31_chars_long_file_name_128 +a/b/one_31_chars_long_file_name_129 +a/b/one_31_chars_long_file_name_130 +a/b/one_31_chars_long_file_name_131 +a/b/one_31_chars_long_file_name_132 +a/b/one_31_chars_long_file_name_133 +a/b/one_31_chars_long_file_name_134 +a/b/one_31_chars_long_file_name_135 +a/b/one_31_chars_long_file_name_136 +a/b/one_31_chars_long_file_name_137 +a/b/one_31_chars_long_file_name_138 +a/b/one_31_chars_long_file_name_139 +a/b/one_31_chars_long_file_name_140 +a/b/one_31_chars_long_file_name_141 +a/b/one_31_chars_long_file_name_142 +Incremental dump +a/ +a/c/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr04.at:34" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr04.at:34: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo \"Initial dump\" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo \"Incremental dump\" +tar cvf a1.tar -g a.sna a +)" +echo incr04.at:34 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf("a/b/one_31_chars_long_file_name_%03d\n", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo "Initial dump" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo "Incremental dump" +tar cvf a1.tar -g a.sna a +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf("a/b/one_31_chars_long_file_name_%03d\n", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo "Initial dump" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo "Incremental dump" +tar cvf a1.tar -g a.sna a +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: a: Directory is new +tar: a/b: Directory is new +tar: a/c: Directory has been renamed from \`a/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Initial dump +a/ +a/b/ +a/b/one_31_chars_long_file_name_001 +a/b/one_31_chars_long_file_name_002 +a/b/one_31_chars_long_file_name_003 +a/b/one_31_chars_long_file_name_004 +a/b/one_31_chars_long_file_name_005 +a/b/one_31_chars_long_file_name_006 +a/b/one_31_chars_long_file_name_007 +a/b/one_31_chars_long_file_name_008 +a/b/one_31_chars_long_file_name_009 +a/b/one_31_chars_long_file_name_010 +a/b/one_31_chars_long_file_name_011 +a/b/one_31_chars_long_file_name_012 +a/b/one_31_chars_long_file_name_013 +a/b/one_31_chars_long_file_name_014 +a/b/one_31_chars_long_file_name_015 +a/b/one_31_chars_long_file_name_016 +a/b/one_31_chars_long_file_name_017 +a/b/one_31_chars_long_file_name_018 +a/b/one_31_chars_long_file_name_019 +a/b/one_31_chars_long_file_name_020 +a/b/one_31_chars_long_file_name_021 +a/b/one_31_chars_long_file_name_022 +a/b/one_31_chars_long_file_name_023 +a/b/one_31_chars_long_file_name_024 +a/b/one_31_chars_long_file_name_025 +a/b/one_31_chars_long_file_name_026 +a/b/one_31_chars_long_file_name_027 +a/b/one_31_chars_long_file_name_028 +a/b/one_31_chars_long_file_name_029 +a/b/one_31_chars_long_file_name_030 +a/b/one_31_chars_long_file_name_031 +a/b/one_31_chars_long_file_name_032 +a/b/one_31_chars_long_file_name_033 +a/b/one_31_chars_long_file_name_034 +a/b/one_31_chars_long_file_name_035 +a/b/one_31_chars_long_file_name_036 +a/b/one_31_chars_long_file_name_037 +a/b/one_31_chars_long_file_name_038 +a/b/one_31_chars_long_file_name_039 +a/b/one_31_chars_long_file_name_040 +a/b/one_31_chars_long_file_name_041 +a/b/one_31_chars_long_file_name_042 +a/b/one_31_chars_long_file_name_043 +a/b/one_31_chars_long_file_name_044 +a/b/one_31_chars_long_file_name_045 +a/b/one_31_chars_long_file_name_046 +a/b/one_31_chars_long_file_name_047 +a/b/one_31_chars_long_file_name_048 +a/b/one_31_chars_long_file_name_049 +a/b/one_31_chars_long_file_name_050 +a/b/one_31_chars_long_file_name_051 +a/b/one_31_chars_long_file_name_052 +a/b/one_31_chars_long_file_name_053 +a/b/one_31_chars_long_file_name_054 +a/b/one_31_chars_long_file_name_055 +a/b/one_31_chars_long_file_name_056 +a/b/one_31_chars_long_file_name_057 +a/b/one_31_chars_long_file_name_058 +a/b/one_31_chars_long_file_name_059 +a/b/one_31_chars_long_file_name_060 +a/b/one_31_chars_long_file_name_061 +a/b/one_31_chars_long_file_name_062 +a/b/one_31_chars_long_file_name_063 +a/b/one_31_chars_long_file_name_064 +a/b/one_31_chars_long_file_name_065 +a/b/one_31_chars_long_file_name_066 +a/b/one_31_chars_long_file_name_067 +a/b/one_31_chars_long_file_name_068 +a/b/one_31_chars_long_file_name_069 +a/b/one_31_chars_long_file_name_070 +a/b/one_31_chars_long_file_name_071 +a/b/one_31_chars_long_file_name_072 +a/b/one_31_chars_long_file_name_073 +a/b/one_31_chars_long_file_name_074 +a/b/one_31_chars_long_file_name_075 +a/b/one_31_chars_long_file_name_076 +a/b/one_31_chars_long_file_name_077 +a/b/one_31_chars_long_file_name_078 +a/b/one_31_chars_long_file_name_079 +a/b/one_31_chars_long_file_name_080 +a/b/one_31_chars_long_file_name_081 +a/b/one_31_chars_long_file_name_082 +a/b/one_31_chars_long_file_name_083 +a/b/one_31_chars_long_file_name_084 +a/b/one_31_chars_long_file_name_085 +a/b/one_31_chars_long_file_name_086 +a/b/one_31_chars_long_file_name_087 +a/b/one_31_chars_long_file_name_088 +a/b/one_31_chars_long_file_name_089 +a/b/one_31_chars_long_file_name_090 +a/b/one_31_chars_long_file_name_091 +a/b/one_31_chars_long_file_name_092 +a/b/one_31_chars_long_file_name_093 +a/b/one_31_chars_long_file_name_094 +a/b/one_31_chars_long_file_name_095 +a/b/one_31_chars_long_file_name_096 +a/b/one_31_chars_long_file_name_097 +a/b/one_31_chars_long_file_name_098 +a/b/one_31_chars_long_file_name_099 +a/b/one_31_chars_long_file_name_100 +a/b/one_31_chars_long_file_name_101 +a/b/one_31_chars_long_file_name_102 +a/b/one_31_chars_long_file_name_103 +a/b/one_31_chars_long_file_name_104 +a/b/one_31_chars_long_file_name_105 +a/b/one_31_chars_long_file_name_106 +a/b/one_31_chars_long_file_name_107 +a/b/one_31_chars_long_file_name_108 +a/b/one_31_chars_long_file_name_109 +a/b/one_31_chars_long_file_name_110 +a/b/one_31_chars_long_file_name_111 +a/b/one_31_chars_long_file_name_112 +a/b/one_31_chars_long_file_name_113 +a/b/one_31_chars_long_file_name_114 +a/b/one_31_chars_long_file_name_115 +a/b/one_31_chars_long_file_name_116 +a/b/one_31_chars_long_file_name_117 +a/b/one_31_chars_long_file_name_118 +a/b/one_31_chars_long_file_name_119 +a/b/one_31_chars_long_file_name_120 +a/b/one_31_chars_long_file_name_121 +a/b/one_31_chars_long_file_name_122 +a/b/one_31_chars_long_file_name_123 +a/b/one_31_chars_long_file_name_124 +a/b/one_31_chars_long_file_name_125 +a/b/one_31_chars_long_file_name_126 +a/b/one_31_chars_long_file_name_127 +a/b/one_31_chars_long_file_name_128 +a/b/one_31_chars_long_file_name_129 +a/b/one_31_chars_long_file_name_130 +a/b/one_31_chars_long_file_name_131 +a/b/one_31_chars_long_file_name_132 +a/b/one_31_chars_long_file_name_133 +a/b/one_31_chars_long_file_name_134 +a/b/one_31_chars_long_file_name_135 +a/b/one_31_chars_long_file_name_136 +a/b/one_31_chars_long_file_name_137 +a/b/one_31_chars_long_file_name_138 +a/b/one_31_chars_long_file_name_139 +a/b/one_31_chars_long_file_name_140 +a/b/one_31_chars_long_file_name_141 +a/b/one_31_chars_long_file_name_142 +Incremental dump +a/ +a/c/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr04.at:34" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr04.at:34: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf(\"a/b/one_31_chars_long_file_name_%03d\\n\", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo \"Initial dump\" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo \"Incremental dump\" +tar cvf a1.tar -g a.sna a +)" +echo incr04.at:34 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf("a/b/one_31_chars_long_file_name_%03d\n", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo "Initial dump" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo "Incremental dump" +tar cvf a1.tar -g a.sna a +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +install-sh -d a/b >/dev/null || exit 77 +awk 'BEGIN { + for (i=1;i<=142;i++) + printf("a/b/one_31_chars_long_file_name_%03d\n", i); + }' < /dev/null | genfile --files-from - + +sleep 1 + +echo "Initial dump" +tar cvf a0.tar -g a.sna a +mv a/b a/c +echo "Incremental dump" +tar cvf a1.tar -g a.sna a +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: a: Directory is new +tar: a/b: Directory is new +tar: a/c: Directory has been renamed from \`a/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Initial dump +a/ +a/b/ +a/b/one_31_chars_long_file_name_001 +a/b/one_31_chars_long_file_name_002 +a/b/one_31_chars_long_file_name_003 +a/b/one_31_chars_long_file_name_004 +a/b/one_31_chars_long_file_name_005 +a/b/one_31_chars_long_file_name_006 +a/b/one_31_chars_long_file_name_007 +a/b/one_31_chars_long_file_name_008 +a/b/one_31_chars_long_file_name_009 +a/b/one_31_chars_long_file_name_010 +a/b/one_31_chars_long_file_name_011 +a/b/one_31_chars_long_file_name_012 +a/b/one_31_chars_long_file_name_013 +a/b/one_31_chars_long_file_name_014 +a/b/one_31_chars_long_file_name_015 +a/b/one_31_chars_long_file_name_016 +a/b/one_31_chars_long_file_name_017 +a/b/one_31_chars_long_file_name_018 +a/b/one_31_chars_long_file_name_019 +a/b/one_31_chars_long_file_name_020 +a/b/one_31_chars_long_file_name_021 +a/b/one_31_chars_long_file_name_022 +a/b/one_31_chars_long_file_name_023 +a/b/one_31_chars_long_file_name_024 +a/b/one_31_chars_long_file_name_025 +a/b/one_31_chars_long_file_name_026 +a/b/one_31_chars_long_file_name_027 +a/b/one_31_chars_long_file_name_028 +a/b/one_31_chars_long_file_name_029 +a/b/one_31_chars_long_file_name_030 +a/b/one_31_chars_long_file_name_031 +a/b/one_31_chars_long_file_name_032 +a/b/one_31_chars_long_file_name_033 +a/b/one_31_chars_long_file_name_034 +a/b/one_31_chars_long_file_name_035 +a/b/one_31_chars_long_file_name_036 +a/b/one_31_chars_long_file_name_037 +a/b/one_31_chars_long_file_name_038 +a/b/one_31_chars_long_file_name_039 +a/b/one_31_chars_long_file_name_040 +a/b/one_31_chars_long_file_name_041 +a/b/one_31_chars_long_file_name_042 +a/b/one_31_chars_long_file_name_043 +a/b/one_31_chars_long_file_name_044 +a/b/one_31_chars_long_file_name_045 +a/b/one_31_chars_long_file_name_046 +a/b/one_31_chars_long_file_name_047 +a/b/one_31_chars_long_file_name_048 +a/b/one_31_chars_long_file_name_049 +a/b/one_31_chars_long_file_name_050 +a/b/one_31_chars_long_file_name_051 +a/b/one_31_chars_long_file_name_052 +a/b/one_31_chars_long_file_name_053 +a/b/one_31_chars_long_file_name_054 +a/b/one_31_chars_long_file_name_055 +a/b/one_31_chars_long_file_name_056 +a/b/one_31_chars_long_file_name_057 +a/b/one_31_chars_long_file_name_058 +a/b/one_31_chars_long_file_name_059 +a/b/one_31_chars_long_file_name_060 +a/b/one_31_chars_long_file_name_061 +a/b/one_31_chars_long_file_name_062 +a/b/one_31_chars_long_file_name_063 +a/b/one_31_chars_long_file_name_064 +a/b/one_31_chars_long_file_name_065 +a/b/one_31_chars_long_file_name_066 +a/b/one_31_chars_long_file_name_067 +a/b/one_31_chars_long_file_name_068 +a/b/one_31_chars_long_file_name_069 +a/b/one_31_chars_long_file_name_070 +a/b/one_31_chars_long_file_name_071 +a/b/one_31_chars_long_file_name_072 +a/b/one_31_chars_long_file_name_073 +a/b/one_31_chars_long_file_name_074 +a/b/one_31_chars_long_file_name_075 +a/b/one_31_chars_long_file_name_076 +a/b/one_31_chars_long_file_name_077 +a/b/one_31_chars_long_file_name_078 +a/b/one_31_chars_long_file_name_079 +a/b/one_31_chars_long_file_name_080 +a/b/one_31_chars_long_file_name_081 +a/b/one_31_chars_long_file_name_082 +a/b/one_31_chars_long_file_name_083 +a/b/one_31_chars_long_file_name_084 +a/b/one_31_chars_long_file_name_085 +a/b/one_31_chars_long_file_name_086 +a/b/one_31_chars_long_file_name_087 +a/b/one_31_chars_long_file_name_088 +a/b/one_31_chars_long_file_name_089 +a/b/one_31_chars_long_file_name_090 +a/b/one_31_chars_long_file_name_091 +a/b/one_31_chars_long_file_name_092 +a/b/one_31_chars_long_file_name_093 +a/b/one_31_chars_long_file_name_094 +a/b/one_31_chars_long_file_name_095 +a/b/one_31_chars_long_file_name_096 +a/b/one_31_chars_long_file_name_097 +a/b/one_31_chars_long_file_name_098 +a/b/one_31_chars_long_file_name_099 +a/b/one_31_chars_long_file_name_100 +a/b/one_31_chars_long_file_name_101 +a/b/one_31_chars_long_file_name_102 +a/b/one_31_chars_long_file_name_103 +a/b/one_31_chars_long_file_name_104 +a/b/one_31_chars_long_file_name_105 +a/b/one_31_chars_long_file_name_106 +a/b/one_31_chars_long_file_name_107 +a/b/one_31_chars_long_file_name_108 +a/b/one_31_chars_long_file_name_109 +a/b/one_31_chars_long_file_name_110 +a/b/one_31_chars_long_file_name_111 +a/b/one_31_chars_long_file_name_112 +a/b/one_31_chars_long_file_name_113 +a/b/one_31_chars_long_file_name_114 +a/b/one_31_chars_long_file_name_115 +a/b/one_31_chars_long_file_name_116 +a/b/one_31_chars_long_file_name_117 +a/b/one_31_chars_long_file_name_118 +a/b/one_31_chars_long_file_name_119 +a/b/one_31_chars_long_file_name_120 +a/b/one_31_chars_long_file_name_121 +a/b/one_31_chars_long_file_name_122 +a/b/one_31_chars_long_file_name_123 +a/b/one_31_chars_long_file_name_124 +a/b/one_31_chars_long_file_name_125 +a/b/one_31_chars_long_file_name_126 +a/b/one_31_chars_long_file_name_127 +a/b/one_31_chars_long_file_name_128 +a/b/one_31_chars_long_file_name_129 +a/b/one_31_chars_long_file_name_130 +a/b/one_31_chars_long_file_name_131 +a/b/one_31_chars_long_file_name_132 +a/b/one_31_chars_long_file_name_133 +a/b/one_31_chars_long_file_name_134 +a/b/one_31_chars_long_file_name_135 +a/b/one_31_chars_long_file_name_136 +a/b/one_31_chars_long_file_name_137 +a/b/one_31_chars_long_file_name_138 +a/b/one_31_chars_long_file_name_139 +a/b/one_31_chars_long_file_name_140 +a/b/one_31_chars_long_file_name_141 +a/b/one_31_chars_long_file_name_142 +Incremental dump +a/ +a/c/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr04.at:34" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_55 +#AT_START_56 +# 56. incr05.at:19: incremental dumps with -C +at_setup_line='incr05.at:19' +at_desc="incremental dumps with -C" +$at_quiet $as_echo_n " 56: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "56. incr05.at:19: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/incr05.at:22: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +)" +echo incr05.at:22 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 +./ +./sub/ +./file1 +./sub/file2 +Level 1 +./ +./sub/ +./file3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr05.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr05.at:22: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +)" +echo incr05.at:22 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 +./ +./sub/ +./file1 +./sub/file2 +Level 1 +./ +./sub/ +./file3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr05.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr05.at:22: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +)" +echo incr05.at:22 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +echo Level 0 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . + +genfile --file dir/file3 +echo Level 1 +tar -c -f archive.tar -g db -C dir -v --warning=no-new-dir . +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 +./ +./sub/ +./file1 +./sub/file2 +Level 1 +./ +./sub/ +./file3 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr05.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_56 +#AT_START_57 +# 57. incr06.at:19: incremental dumps of nested directories +at_setup_line='incr06.at:19' +at_desc="incremental dumps of nested directories" +$at_quiet $as_echo_n " 57: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "57. incr06.at:19: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/incr06.at:22: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +)" +echo incr06.at:22 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 . sub +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 0 sub . +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 1 . sub +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +Level 1 sub . +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr06.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr06.at:22: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +)" +echo incr06.at:22 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 . sub +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 0 sub . +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 1 . sub +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +Level 1 sub . +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr06.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/incr06.at:22: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +)" +echo incr06.at:22 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +mkdir dir/sub/a +mkdir dir/sub/b +genfile --file dir/file1 +genfile --file dir/sub/file2 +genfile --file dir/sub/a/file3 + +echo Level 0 . sub +tar -c -f archive-0.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 0 sub . +tar -c -f archive-0.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . + +mkdir dir/c +genfile --file dir/sub/b/file4 + +echo Level 1 . sub +tar -c -f archive-1.1.tar -g db.1 -C dir -v --warning=no-new-dir . sub +echo Level 1 sub . +tar -c -f archive-1.2.tar -g db.2 -C dir -v --warning=no-new-dir sub . +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Level 0 . sub +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 0 sub . +./ +sub/ +sub/a/ +sub/b/ +./file1 +sub/file2 +sub/a/file3 +Level 1 . sub +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +Level 1 sub . +./ +./c/ +sub/ +sub/a/ +sub/b/ +sub/b/file4 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/incr06.at:22" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_57 +#AT_START_58 +# 58. filerem01.at:34: file removed as we read it (ca. 22 seconds) +at_setup_line='filerem01.at:34' +at_desc="file removed as we read it (ca. 22 seconds)" +$at_quiet $as_echo_n " 58: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "58. filerem01.at:34: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/filerem01.at:37: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +genfile --run --checkpoint=3 --unlink dir/file1 -- \\ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ + --checkpoint-action='echo' -c -f archive.tar \\ + --listed-incremental db -v dir >/dev/null +)" +echo filerem01.at:37 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +genfile --run --checkpoint=3 --unlink dir/file1 -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v dir >/dev/null +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +genfile --run --checkpoint=3 --unlink dir/file1 -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v dir >/dev/null +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new +tar: dir/sub: Directory is new +tar: dir/file1: File removed before we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_func_check_status 1 $at_status "$at_srcdir/filerem01.at:37" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/filerem01.at:37: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +genfile --run --checkpoint=3 --unlink dir/file1 -- \\ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ + --checkpoint-action='echo' -c -f archive.tar \\ + --listed-incremental db -v dir >/dev/null +)" +echo filerem01.at:37 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +genfile --run --checkpoint=3 --unlink dir/file1 -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v dir >/dev/null +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 + +genfile --run --checkpoint=3 --unlink dir/file1 -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v dir >/dev/null +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: dir: Directory is new +tar: dir/sub: Directory is new +tar: dir/file1: File removed before we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo stdout:; cat "$at_stdout" +at_func_check_status 1 $at_status "$at_srcdir/filerem01.at:37" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + +# Timing information: +# +# For -Hgnu the above command line takes about 8 seconds to execute and +# produces: +# +# tar: dir: Directory is new +# tar: dir/sub: Directory is new +# dir/ +# tar: Write checkpoint 1 +# tar: Write checkpoint 2 +# dir/sub/ +# tar: Write checkpoint 3 +# tar: Write checkpoint 4 +# dir/file1 +# tar: Write checkpoint 5 +# dir/sub/file2 +# tar: Write checkpoint 6 +# tar: Write checkpoint 7 +# tar: Write checkpoint 8 +# +# For -Hposix the above command line takes about 14 seconds to execute and +# produces: +# +# ./tar: dir: Directory is new +# ./tar: dir/sub: Directory is new +# dir/ +# ./tar: Write checkpoint 1 +# ./tar: Write checkpoint 2 +# ./tar: Write checkpoint 3 +# dir/sub/ +# ./tar: Write checkpoint 4 +# ./tar: Write checkpoint 5 +# ./tar: Write checkpoint 6 +# dir/file1 +# ./tar: Write checkpoint 7 +# ./tar: Write checkpoint 8 +# ./tar: Write checkpoint 9 +# dir/sub/file2 +# ./tar: Write checkpoint 10 +# ./tar: Write checkpoint 11 +# ./tar: Write checkpoint 12 +# ./tar: Write checkpoint 13 +# ./tar: Write checkpoint 14 + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_58 +#AT_START_59 +# 59. filerem02.at:24: toplevel file removed (ca. 24 seconds) +at_setup_line='filerem02.at:24' +at_desc="toplevel file removed (ca. 24 seconds)" +$at_quiet $as_echo_n " 59: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "59. filerem02.at:24: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/filerem02.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 + +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ + --checkpoint-action='echo' -c -f archive.tar \\ + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null +)" +echo filerem02.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 + +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 + +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_func_check_status 2 $at_status "$at_srcdir/filerem02.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/filerem02.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 + +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \\ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \\ + --checkpoint-action='echo' -c -f archive.tar \\ + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null +)" +echo filerem02.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 + +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir dir +mkdir dir/sub +genfile --file dir/file1 +genfile --file dir/sub/file2 +mkdir dir2 +genfile --file dir2/file1 + +genfile --run --checkpoint=3 --exec 'rm -rf dir2' -- \ + tar --blocking-factor=1 --checkpoint=1 --checkpoint-action='sleep=1' \ + --checkpoint-action='echo' -c -f archive.tar \ + --listed-incremental db -v --warning=no-new-dir dir dir2 >/dev/null +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo stderr:; cat "$at_stderr" +echo stdout:; cat "$at_stdout" +at_func_check_status 2 $at_status "$at_srcdir/filerem02.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + +# Ignore stdout and stderr because their contents depend on +# the file system implementation. + +# Timing information: see filerem01.at + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_59 +#AT_START_60 +# 60. rename01.at:24: renamed dirs in incrementals +at_setup_line='rename01.at:24' +at_desc="renamed dirs in incrementals" +$at_quiet $as_echo_n " 60: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "60. rename01.at:24: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/rename01.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +echo rename01.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/baz: Directory has been renamed from \`foo/bar' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/file1 +foo/file2 +foo/bar/file +Creating incremental archive +foo/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/file +foo/file1 +foo/file2 +End directory listing 1 +Begin directory listing 2 +foo +foo/baz +foo/baz/file +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename01.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/rename01.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +echo rename01.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/baz: Directory has been renamed from \`foo/bar' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/file1 +foo/file2 +foo/bar/file +Creating incremental archive +foo/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/file +foo/file1 +foo/file2 +End directory listing 1 +Begin directory listing 2 +foo +foo/baz +foo/baz/file +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename01.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/rename01.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +echo rename01.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar foo/baz + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfg arch.2 /dev/null +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/baz: Directory has been renamed from \`foo/bar' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/file1 +foo/file2 +foo/bar/file +Creating incremental archive +foo/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/file +foo/file1 +foo/file2 +End directory listing 1 +Begin directory listing 2 +foo +foo/baz +foo/baz/file +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename01.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_60 +#AT_START_61 +# 61. rename02.at:24: move between hierarchies +at_setup_line='rename02.at:24' +at_desc="move between hierarchies" +$at_quiet $as_echo_n " 61: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "61. rename02.at:24: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/rename02.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +echo rename02.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/bar/baz: Directory is new +tar: foo/baz: Directory has been renamed from \`foo/bar/baz' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/bar/baz/ +foo/file1 +foo/file2 +foo/bar/file.r +foo/bar/baz/file.z +Creating incremental archive +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/baz +foo/bar/baz/file.z +foo/bar/file.r +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 2 +foo +foo/bar +foo/bar/file.r +foo/baz +foo/baz/file.z +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename02.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/rename02.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +echo rename02.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/bar/baz: Directory is new +tar: foo/baz: Directory has been renamed from \`foo/bar/baz' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/bar/baz/ +foo/file1 +foo/file2 +foo/bar/file.r +foo/bar/baz/file.z +Creating incremental archive +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/baz +foo/bar/baz/file.z +foo/bar/file.r +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 2 +foo +foo/bar +foo/bar/file.r +foo/baz +foo/baz/file.z +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename02.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/rename02.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo \"Creating base archive\" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo \"Creating incremental archive\" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +echo rename02.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 +mkdir foo/bar +genfile --file foo/bar/file.r +mkdir foo/bar/baz +genfile --file foo/bar/baz/file.z + +sleep 1 + +echo "Creating base archive" +tar -g incr -cf arch.1 -v foo + +mv foo/bar/baz foo + +echo "Creating incremental archive" +tar -g incr -cf arch.2 -v foo + +mv foo old + +tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr +sort tmperr >&2 + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: foo: Directory is new +tar: foo/bar: Directory is new +tar: foo/bar/baz: Directory is new +tar: foo/baz: Directory has been renamed from \`foo/bar/baz' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating base archive +foo/ +foo/bar/ +foo/bar/baz/ +foo/file1 +foo/file2 +foo/bar/file.r +foo/bar/baz/file.z +Creating incremental archive +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 1 +foo +foo/bar +foo/bar/baz +foo/bar/baz/file.z +foo/bar/file.r +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/bar/ +foo/baz/ +Begin directory listing 2 +foo +foo/bar +foo/bar/file.r +foo/baz +foo/baz/file.z +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename02.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_61 +#AT_START_62 +# 62. rename03.at:23: cyclic renames +at_setup_line='rename03.at:23' +at_desc="cyclic renames" +$at_quiet $as_echo_n " 62: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "62. rename03.at:23: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/rename03.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo \"First dump\" +echo \"First dump\">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a \$\$ +mv c a +mv b c +mv \$\$ b) + +echo \"Second dump\" +echo \"Second dump\" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +echo rename03.at:26 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo "First dump" +echo "First dump">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a $$ +mv c a +mv b c +mv $$ b) + +echo "Second dump" +echo "Second dump" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo "First dump" +echo "First dump">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a $$ +mv c a +mv b c +mv $$ b) + +echo "Second dump" +echo "Second dump" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "First dump +tar: foo/a: Directory is new +tar: foo/b: Directory is new +tar: foo/c: Directory is new +tar: foo: Directory is new +Second dump +tar: foo/a: Directory has been renamed from \`foo/c' +tar: foo/b: Directory has been renamed from \`foo/a' +tar: foo/c: Directory has been renamed from \`foo/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First dump +foo/ +foo/a/ +foo/b/ +foo/c/ +foo/file1 +foo/file2 +foo/a/filea +foo/b/fileb +foo/c/filec +Second dump +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 1 +foo +foo/a +foo/a/filea +foo/b +foo/b/fileb +foo/c +foo/c/filec +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 2 +foo +foo/a +foo/a/filec +foo/b +foo/b/filea +foo/c +foo/c/fileb +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename03.at:26" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/rename03.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo \"First dump\" +echo \"First dump\">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a \$\$ +mv c a +mv b c +mv \$\$ b) + +echo \"Second dump\" +echo \"Second dump\" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +echo rename03.at:26 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo "First dump" +echo "First dump">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a $$ +mv c a +mv b c +mv $$ b) + +echo "Second dump" +echo "Second dump" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo "First dump" +echo "First dump">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a $$ +mv c a +mv b c +mv $$ b) + +echo "Second dump" +echo "Second dump" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "First dump +tar: foo/a: Directory is new +tar: foo/b: Directory is new +tar: foo/c: Directory is new +tar: foo: Directory is new +Second dump +tar: foo/a: Directory has been renamed from \`foo/c' +tar: foo/b: Directory has been renamed from \`foo/a' +tar: foo/c: Directory has been renamed from \`foo/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First dump +foo/ +foo/a/ +foo/b/ +foo/c/ +foo/file1 +foo/file2 +foo/a/filea +foo/b/fileb +foo/c/filec +Second dump +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 1 +foo +foo/a +foo/a/filea +foo/b +foo/b/fileb +foo/c +foo/c/filec +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 2 +foo +foo/a +foo/a/filec +foo/b +foo/b/filea +foo/c +foo/c/fileb +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename03.at:26" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/rename03.at:26: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo \"First dump\" +echo \"First dump\">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a \$\$ +mv c a +mv b c +mv \$\$ b) + +echo \"Second dump\" +echo \"Second dump\" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo \"Begin directory listing 1\" +find foo | sort +echo \"End directory listing 1\" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +)" +echo rename03.at:26 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo "First dump" +echo "First dump">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a $$ +mv c a +mv b c +mv $$ b) + +echo "Second dump" +echo "Second dump" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir foo +genfile --file foo/file1 +genfile --file foo/file2 + +mkdir foo/a +genfile --file foo/a/filea + +mkdir foo/b +genfile --file foo/b/fileb + +mkdir foo/c +genfile --file foo/c/filec + +sleep 1 + +echo "First dump" +echo "First dump">&2 +tar -g incr -cf arch.1 -v foo 2>tmperr +sort tmperr >&2 + +# Shuffle directories: +(cd foo +mv a $$ +mv c a +mv b c +mv $$ b) + +echo "Second dump" +echo "Second dump" >&2 +tar -g incr -cf arch.2 -v foo 2>tmperr +sort tmperr >&2 + +tar xfg arch.1 /dev/null --warning=no-timestamp + +echo "Begin directory listing 1" +find foo | sort +echo "End directory listing 1" + +tar xfgv arch.2 /dev/null --warning=no-timestamp +echo Begin directory listing 2 +find foo | sort +echo End directory listing 2 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "First dump +tar: foo/a: Directory is new +tar: foo/b: Directory is new +tar: foo/c: Directory is new +tar: foo: Directory is new +Second dump +tar: foo/a: Directory has been renamed from \`foo/c' +tar: foo/b: Directory has been renamed from \`foo/a' +tar: foo/c: Directory has been renamed from \`foo/b' +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First dump +foo/ +foo/a/ +foo/b/ +foo/c/ +foo/file1 +foo/file2 +foo/a/filea +foo/b/fileb +foo/c/filec +Second dump +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 1 +foo +foo/a +foo/a/filea +foo/b +foo/b/fileb +foo/c +foo/c/filec +foo/file1 +foo/file2 +End directory listing 1 +foo/ +foo/a/ +foo/b/ +foo/c/ +Begin directory listing 2 +foo +foo/a +foo/a/filec +foo/b +foo/b/filea +foo/c +foo/c/fileb +foo/file1 +foo/file2 +End directory listing 2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename03.at:26" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_62 +#AT_START_63 +# 63. rename04.at:27: renamed directory containing subdirectories +at_setup_line='rename04.at:27' +at_desc="renamed directory containing subdirectories" +$at_quiet $as_echo_n " 63: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "63. rename04.at:27: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/rename04.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +)" +echo rename04.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename04.at:30" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/rename04.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +)" +echo rename04.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename04.at:30" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/rename04.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +)" +echo rename04.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 +find dir | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename04.at:30" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_63 +#AT_START_64 +# 64. rename05.at:24: renamed subdirectories +at_setup_line='rename05.at:24' +at_desc="renamed subdirectories" +$at_quiet $as_echo_n " 64: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "64. rename05.at:24: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/rename05.at:27: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +)" +echo rename05.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir.0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename05.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/rename05.at:27: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +)" +echo rename05.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir.0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename05.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/rename05.at:27: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +)" +echo rename05.at:27 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +decho Creating directory structure +mkdir directory +mkdir directory/subdir +genfile --file=directory/file + +decho Creating initial archive +tar -cf archive.1 -g db.1 directory + +decho Renaming +mv directory/subdir directory/subdir.0 +mv directory dir + +decho Creating incremental archive +cp db.1 db.2 +tar -cf archive.2 -g db.2 dir + +mv dir orig + +decho First restore +tar -xf archive.1 -g db.1 --warning=no-timestamp +find directory | sort + +decho Second restore +tar -xf archive.2 -g db.2 --warning=no-timestamp +find dir | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +Second restore +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating directory structure +Creating initial archive +Renaming +Creating incremental archive +First restore +directory +directory/file +directory/subdir +Second restore +dir +dir/subdir.0 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/rename05.at:27" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_64 +#AT_START_65 +# 65. chtype.at:27: changed file types in incrementals +at_setup_line='chtype.at:27' +at_desc="changed file types in incrementals" +$at_quiet $as_echo_n " 65: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "65. chtype.at:27: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/chtype.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +)" +echo chtype.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First backup +Second backup +Restore archive.1 +Restore archive.2 +directory +directory/a +directory/a/a +directory/a/b +directory/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/chtype.at:30" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/chtype.at:30: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +)" +echo chtype.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First backup +Second backup +Restore archive.1 +Restore archive.2 +directory +directory/a +directory/a/a +directory/a/b +directory/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/chtype.at:30" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/chtype.at:30: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +)" +echo chtype.at:30 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 +mkdir directory/a +genfile --file directory/a/a + +echo First backup +tar --create --file=archive.1 --listed-incremental=db.1 directory + +sleep 2 + +# Remove directory b and create a file with this name. +# Previous versions were not able to restore over this file. +rm -r directory/b +genfile --file directory/b +genfile --file directory/a/b + +echo Second backup +tar --create --file=archive.2 --listed-incremental=db.2 directory + +# Delete a +rm -r directory + +echo Restore archive.1 +tar -xf archive.1 --listed-incremental=/dev/null --warning=no-timestamp +echo Restore archive.2 +tar -xf archive.2 --listed-incremental=/dev/null --warning=no-timestamp +find directory | sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "First backup +Second backup +Restore archive.1 +Restore archive.2 +directory +directory/a +directory/a/a +directory/a/b +directory/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/chtype.at:30" + +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_65 +#AT_START_66 +# 66. ignfail.at:23: ignfail +at_setup_line='ignfail.at:23' +at_desc="ignfail" +$at_quiet $as_echo_n " 66: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "66. ignfail.at:23: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/ignfail.at:26: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 +)" +echo ignfail.at:26 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/ignfail.at:26" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/ignfail.at:26: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 -mv dir orig +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 )" -echo rename04.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo ignfail.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +# The test is meaningless for super-user. -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -decho Creating directory structure +touch file mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory dir +touch directory/file -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 -mv dir orig +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +# The test is meaningless for super-user. -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -decho Creating directory structure +touch file mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory dir +touch directory/file -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 -mv dir orig +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename04.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/ignfail.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/rename04.at:30: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { $at_traceoff +$as_echo "$at_srcdir/ignfail.at:26: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +# The test is meaningless for super-user. -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -decho Creating directory structure +touch file mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory dir +touch directory/file -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 -mv dir orig +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 )" -echo rename04.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo ignfail.at:26 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +# The test is meaningless for super-user. -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -decho Creating directory structure +touch file mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory dir +touch directory/file -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 -mv dir orig +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * +# The test is meaningless for super-user. -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -decho Creating directory structure +touch file mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory dir +touch directory/file -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 -mv dir orig +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename04.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/ignfail.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/rename04.at:30: + { $at_traceoff +$as_echo "$at_srcdir/ignfail.at:26: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16741,44 +25965,106 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * +# The test is meaningless for super-user. -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -decho Creating directory structure +touch file mkdir directory -mkdir directory/subdir -genfile --file=directory/file +touch directory/file -decho Creating initial archive -tar -cf archive.1 -g db.1 directory +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 -decho Renaming -mv directory dir +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 -mv dir orig +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 +)" +echo ignfail.at:26 >"$at_check_line_file" -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -)" -echo rename04.at:30 >"$at_check_line_file" +# The test is meaningless for super-user. + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -16787,309 +26073,364 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +# The test is meaningless for super-user. -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -decho Creating directory structure +touch file mkdir directory -mkdir directory/subdir -genfile --file=directory/file +touch directory/file -decho Creating initial archive -tar -cf archive.1 -g db.1 directory +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 -decho Renaming -mv directory dir +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 -mv dir orig +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/ignfail.at:26" -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +$at_failed && at_func_log_failure +$at_traceon; } -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { $at_traceoff +$as_echo "$at_srcdir/ignfail.at:26: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +# The test is meaningless for super-user. -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 -decho Creating directory structure +touch file mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory dir - -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir - -mv dir orig - -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort - -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename04.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +touch directory/file +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=\$? +chmod 600 file +test \$status = 2 || exit 1 - echo 1 > "$at_status_file" - exit 1 -fi +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=\$? +chmod 600 file +test \$status = 0 || exit 1 -$at_traceon +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=\$? +chmod 700 directory +test \$status = 2 || exit 1 +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=\$? +chmod 700 directory +test \$status = 0 +)" +echo ignfail.at:26 >"$at_check_line_file" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * +# The test is meaningless for super-user. - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 - 37 ) # 37. rename05.at:24: renamed subdirectories - at_setup_line='rename05.at:24' - at_desc="renamed subdirectories" - $at_quiet $ECHO_N " 37: renamed subdirectories $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "37. rename05.at:24: testing ..." - $at_traceon +touch file +mkdir directory +touch directory/file +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 - $at_traceoff -echo "$at_srcdir/rename05.at:27: +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +# The test is meaningless for super-user. -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +touch file +mkdir directory +touch directory/file + +echo 1>&2 ----- +chmod 000 file +tar cf archive file +status=$? +chmod 600 file +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 file +tar cf archive --ignore-failed-read file || exit 1 +status=$? +chmod 600 file +test $status = 0 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive directory +status=$? +chmod 700 directory +test $status = 2 || exit 1 + +echo 1>&2 ----- +chmod 000 directory +tar cf archive --ignore-failed-read directory || exit 1 +status=$? +chmod 700 directory +test $status = 0 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "----- +tar: file: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: file: Warning: Cannot open: Permission denied +----- +tar: directory: Cannot open: Permission denied +tar: Exiting with failure status due to previous errors +----- +tar: directory: Warning: Cannot open: Permission denied +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/ignfail.at:26" +$at_failed && at_func_log_failure +$at_traceon; } -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file -decho Creating initial archive -tar -cf archive.1 -g db.1 directory -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_66 +#AT_START_67 +# 67. link01.at:33: link count gt 2 +at_setup_line='link01.at:33' +at_desc="link count gt 2" +$at_quiet $as_echo_n " 67: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "67. link01.at:33: testing ..." + $at_traceon -mv dir orig -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -)" -echo rename05.at:27 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { $at_traceoff +$as_echo "$at_srcdir/link01.at:36: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +mkdir directory +mkdir directory/test1 +mkdir directory/test2 -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 +tar cf archive directory/test1/test.txt directory/test1/test.txt -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file +rm -r directory +tar xf archive --warning=no-timestamp -decho Creating initial archive -tar -cf archive.1 -g db.1 directory +ls directory/test1 +)" +echo link01.at:36 >"$at_check_line_file" -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +mkdir directory +mkdir directory/test1 +mkdir directory/test2 -mv dir orig +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +tar cf archive directory/test1/test.txt directory/test1/test.txt -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -decho Creating directory structure mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir +mkdir directory/test1 +mkdir directory/test2 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -mv dir orig +tar cf archive directory/test1/test.txt directory/test1/test.txt -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +rm -r directory +tar xf archive --warning=no-timestamp -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +ls directory/test1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir.0 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename05.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link01.at:36" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/rename05.at:27: + { $at_traceoff +$as_echo "$at_srcdir/link01.at:36: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -17098,45 +26439,50 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * +mkdir directory +mkdir directory/test1 +mkdir directory/test2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -decho Creating directory structure -mkdir directory -mkdir directory/subdir -genfile --file=directory/file +tar cf archive directory/test1/test.txt directory/test1/test.txt -decho Creating initial archive -tar -cf archive.1 -g db.1 directory +rm -r directory +tar xf archive --warning=no-timestamp -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir +ls directory/test1 +)" +echo link01.at:36 >"$at_check_line_file" -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -mv dir orig +mkdir directory +mkdir directory/test1 +mkdir directory/test2 -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort -)" -echo rename05.at:27 >"$at_check_line_file" +tar cf archive directory/test1/test.txt directory/test1/test.txt -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +rm -r directory +tar xf archive --warning=no-timestamp -if test -n "$at_trace_this"; then - ( $at_traceon; +ls directory/test1 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -17145,119 +26491,122 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -test -z "`sort < /dev/null 2>&1`" || exit 77 +tar cf archive directory/test1/test.txt directory/test1/test.txt +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link01.at:36" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/link01.at:36: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -decho Creating directory structure mkdir directory -mkdir directory/subdir -genfile --file=directory/file +mkdir directory/test1 +mkdir directory/test2 -decho Creating initial archive -tar -cf archive.1 -g db.1 directory +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir +tar cf archive directory/test1/test.txt directory/test1/test.txt -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +rm -r directory +tar xf archive --warning=no-timestamp + +ls directory/test1 +)" +echo link01.at:36 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir directory +mkdir directory/test1 +mkdir directory/test2 + +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -mv dir orig +tar cf archive directory/test1/test.txt directory/test1/test.txt -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +rm -r directory +tar xf archive --warning=no-timestamp -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +ls directory/test1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -decho Creating directory structure mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir +mkdir directory/test1 +mkdir directory/test2 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -mv dir orig +tar cf archive directory/test1/test.txt directory/test1/test.txt -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +rm -r directory +tar xf archive --warning=no-timestamp -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +ls directory/test1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir.0 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename05.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link01.at:36" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/rename05.at:27: + { $at_traceoff +$as_echo "$at_srcdir/link01.at:36: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17266,45 +26615,25 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -decho Creating directory structure mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir +mkdir directory/test1 +mkdir directory/test2 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -mv dir orig +tar cf archive directory/test1/test.txt directory/test1/test.txt -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +rm -r directory +tar xf archive --warning=no-timestamp -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +ls directory/test1 )" -echo rename05.at:27 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo link01.at:36 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17313,41 +26642,23 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -decho Creating directory structure mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir +mkdir directory/test1 +mkdir directory/test2 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -mv dir orig +tar cf archive directory/test1/test.txt directory/test1/test.txt -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +rm -r directory +tar xf archive --warning=no-timestamp -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +ls directory/test1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17356,100 +26667,34 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -decho Creating directory structure mkdir directory -mkdir directory/subdir -genfile --file=directory/file - -decho Creating initial archive -tar -cf archive.1 -g db.1 directory - -decho Renaming -mv directory/subdir directory/subdir.0 -mv directory dir +mkdir directory/test1 +mkdir directory/test2 -decho Creating incremental archive -cp db.1 db.2 -tar -cf archive.2 -g db.2 dir +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -mv dir orig +tar cf archive directory/test1/test.txt directory/test1/test.txt -decho First restore -tar -xf archive.1 -g db.1 -find directory | sort +rm -r directory +tar xf archive --warning=no-timestamp -decho Second restore -tar -xf archive.2 -g db.2 -find dir | sort +ls directory/test1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -Second restore -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating directory structure -Creating initial archive -Renaming -Creating incremental archive -First restore -directory -directory/file -directory/subdir -Second restore -dir -dir/subdir.0 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/rename05.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 38 ) # 38. chtype.at:27: changed file types in incrementals - at_setup_line='chtype.at:27' - at_desc="changed file types in incrementals" - $at_quiet $ECHO_N " 38: changed file types in incrementals $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "38. chtype.at:27: testing ..." - $at_traceon +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link01.at:36" +$at_failed && at_func_log_failure +$at_traceon; } - - - - $at_traceoff -echo "$at_srcdir/chtype.at:30: + { $at_traceoff +$as_echo "$at_srcdir/link01.at:36: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -17458,46 +26703,25 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +mkdir directory +mkdir directory/test1 +mkdir directory/test2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory +tar cf archive directory/test1/test.txt directory/test1/test.txt -# Delete a rm -r directory +tar xf archive --warning=no-timestamp -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null -find directory | sort +ls directory/test1 )" -echo chtype.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo link01.at:36 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -17506,42 +26730,23 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +mkdir directory +mkdir directory/test1 +mkdir directory/test2 -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory +tar cf archive directory/test1/test.txt directory/test1/test.txt -# Delete a rm -r directory +tar xf archive --warning=no-timestamp -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null -find directory | sort +ls directory/test1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -17550,117 +26755,147 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * +mkdir directory +mkdir directory/test1 +mkdir directory/test2 -test -z "`sort < /dev/null 2>&1`" || exit 77 +echo TEST > directory/test1/test.txt +ln directory/test1/test.txt directory/test2/test.txt || exit 77 +tar cf archive directory/test1/test.txt directory/test1/test.txt -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a +rm -r directory +tar xf archive --warning=no-timestamp -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory +ls directory/test1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "test.txt +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link01.at:36" -sleep 2 +$at_failed && at_func_log_failure +$at_traceon; } -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory -# Delete a -rm -r directory -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null -find directory | sort -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_67 +#AT_START_68 +# 68. link02.at:32: preserve hard links with --remove-files +at_setup_line='link02.at:32' +at_desc="preserve hard links with --remove-files" +$at_quiet $as_echo_n " 68: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "68. link02.at:32: testing ..." + $at_traceon -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "First backup -Second backup -Restore archive.1 -Restore archive.2 -directory -directory/a -directory/a/a -directory/a/b -directory/b -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon - $at_traceoff -echo "$at_srcdir/chtype.at:30: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { $at_traceoff +$as_echo "$at_srcdir/link02.at:35: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +echo link02.at:35 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -sleep 2 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link02.at:35" -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory +$at_failed && at_func_log_failure +$at_traceon; } -# Delete a -rm -r directory + { $at_traceoff +$as_echo "$at_srcdir/link02.at:35: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null -find directory | sort +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' )" -echo chtype.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo link02.at:35 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -17669,42 +26904,16 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b - -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory - -# Delete a -rm -r directory - -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null -find directory | sort +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -17713,161 +26922,136 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b - -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory - -# Delete a -rm -r directory - -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null -find directory | sort +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "First backup -Second backup -Restore archive.1 -Restore archive.2 -directory -directory/a -directory/a/a -directory/a/b -directory/b -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link02.at:35" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/chtype.at:30: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { $at_traceoff +$as_echo "$at_srcdir/link02.at:35: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +echo link02.at:35 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b - -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory - -# Delete a -rm -r directory +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null -find directory | sort -)" -echo chtype.at:30 >"$at_check_line_file" +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link02.at:35" + +$at_failed && at_func_log_failure +$at_traceon; } -if test -n "$at_trace_this"; then - ( $at_traceon; + { $at_traceoff +$as_echo "$at_srcdir/link02.at:35: mkdir posix (cd posix TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +echo link02.at:35 >"$at_check_line_file" -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory - -sleep 2 - -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b - -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory - -# Delete a -rm -r directory +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null -find directory | sort +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -17876,93 +27060,124 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link02.at:35" -test -z "`sort < /dev/null 2>&1`" || exit 77 - - -install-sh -d directory/b/c >/dev/null && genfile --file directory/b/c/x || exit 77 -mkdir directory/a -genfile --file directory/a/a - -echo First backup -tar --create --file=archive.1 --listed-incremental=db.1 directory +$at_failed && at_func_log_failure +$at_traceon; } -sleep 2 + { $at_traceoff +$as_echo "$at_srcdir/link02.at:35: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -# Remove directory b and create a file with this name. -# Previous versions were not able to restore over this file. -rm -r directory/b -genfile --file directory/b -genfile --file directory/a/b +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +)" +echo link02.at:35 >"$at_check_line_file" -echo Second backup -tar --create --file=archive.2 --listed-incremental=db.2 directory +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -# Delete a -rm -r directory +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -echo Restore archive.1 -tar -xf archive.1 --listed-incremental=/dev/null -echo Restore archive.2 -tar -xf archive.2 --listed-incremental=/dev/null -find directory | sort +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 +tar -c -f archive --remove-files file1 file2 file3 file4 +tar tfv archive | sed -n 's/.*file[2-4] link to //p' ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "First backup -Second backup -Restore archive.1 -Restore archive.2 -directory -directory/a -directory/a/a -directory/a/b -directory/b -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/chtype.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link02.at:35" - echo 1 > "$at_status_file" - exit 1 -fi +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_68 +#AT_START_69 +# 69. link03.at:24: working -l with --remove-files +at_setup_line='link03.at:24' +at_desc="working -l with --remove-files" +$at_quiet $as_echo_n " 69: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "69. link03.at:24: testing ..." + $at_traceon - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 39 ) # 39. ignfail.at:23: ignfail - at_setup_line='ignfail.at:23' - at_desc="ignfail" - $at_quiet $ECHO_N " 39: ignfail $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "39. ignfail.at:23: testing ..." - $at_traceon - $at_traceoff -echo "$at_srcdir/ignfail.at:26: + { $at_traceoff +$as_echo "$at_srcdir/link03.at:34: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -17971,57 +27186,30 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - -touch file -mkdir directory -touch directory/file - -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=\$? -chmod 600 file -test \$status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=\$? -chmod 600 file -test \$status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=\$? -chmod 700 directory -test \$status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=\$? -chmod 700 directory -test \$status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' )" -echo ignfail.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo link03.at:34 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -18030,136 +27218,75 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -touch file -mkdir directory -touch directory/file - -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 - -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT TAR_OPTIONS="-H v7" export TAR_OPTIONS -rm -rf * - -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file - -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 - -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 - -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 - -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -echo >>"$at_stderr"; echo "----- -tar: file: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: file: Warning: Cannot open: Permission denied ------ -tar: directory: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: directory: Warning: Cannot open: Permission denied -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +rm -rf * - echo 1 > "$at_status_file" - exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: Missing links to \`file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link03.at:34" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/ignfail.at:26: + { $at_traceoff +$as_echo "$at_srcdir/link03.at:34: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -18168,57 +27295,30 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=\$? -chmod 600 file -test \$status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=\$? -chmod 600 file -test \$status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=\$? -chmod 700 directory -test \$status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=\$? -chmod 700 directory -test \$status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' )" -echo ignfail.at:26 >"$at_check_line_file" +echo link03.at:34 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -18227,53 +27327,28 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -18282,81 +27357,45 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "----- -tar: file: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: file: Warning: Cannot open: Permission denied ------ -tar: directory: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: directory: Warning: Cannot open: Permission denied -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +echo >>"$at_stderr"; $as_echo "tar: Missing links to \`file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link03.at:34" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/ignfail.at:26: + { $at_traceoff +$as_echo "$at_srcdir/link03.at:34: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -18365,57 +27404,30 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=\$? -chmod 600 file -test \$status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=\$? -chmod 600 file -test \$status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=\$? -chmod 700 directory -test \$status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=\$? -chmod 700 directory -test \$status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' )" -echo ignfail.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo link03.at:34 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -18424,136 +27436,75 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar -TEST_TAR_FORMAT=ustar -export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" -export TAR_OPTIONS -rm -rf * - -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file - -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 - -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -at_failed=false -echo >>"$at_stderr"; echo "----- -tar: file: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: file: Warning: Cannot open: Permission denied ------ -tar: directory: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: directory: Warning: Cannot open: Permission denied -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 - echo 1 > "$at_status_file" - exit 1 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: Missing links to \`file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link03.at:34" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/ignfail.at:26: + { $at_traceoff +$as_echo "$at_srcdir/link03.at:34: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -18562,57 +27513,30 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=\$? -chmod 600 file -test \$status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=\$? -chmod 600 file -test \$status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=\$? -chmod 700 directory -test \$status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=\$? -chmod 700 directory -test \$status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' )" -echo ignfail.at:26 >"$at_check_line_file" +echo link03.at:34 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -18621,53 +27545,28 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - -touch file -mkdir directory -touch directory/file - -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -18676,81 +27575,45 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "----- -tar: file: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: file: Warning: Cannot open: Permission denied ------ -tar: directory: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: directory: Warning: Cannot open: Permission denied -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +echo >>"$at_stderr"; $as_echo "tar: Missing links to \`file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link03.at:34" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/ignfail.at:26: + { $at_traceoff +$as_echo "$at_srcdir/link03.at:34: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18759,57 +27622,30 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=\$? -chmod 600 file -test \$status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=\$? -chmod 600 file -test \$status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=\$? -chmod 700 directory -test \$status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=\$? -chmod 700 directory -test \$status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' )" -echo ignfail.at:26 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo link03.at:34 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18817,54 +27653,29 @@ export TEST_TAR_FORMAT TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file - -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 - -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 - -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 - -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 + + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 + +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 + +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -18873,105 +27684,69 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -# The test is meaningless for super-user. - -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 && exit 77 - - -touch file -mkdir directory -touch directory/file -echo 1>&2 ----- -chmod 000 file -tar cf archive file -status=$? -chmod 600 file -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 file -tar cf archive --ignore-failed-read file || exit 1 -status=$? -chmod 600 file -test $status = 0 || exit 1 +echo archive.1 +tar -c -f archive.1 -l --remove-files file1 file2 file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive directory -status=$? -chmod 700 directory -test $status = 2 || exit 1 +genfile -l 64 -f file1 +ln file1 file2 +ln file2 file3 +ln file3 file4 -echo 1>&2 ----- -chmod 000 directory -tar cf archive --ignore-failed-read directory || exit 1 -status=$? -chmod 700 directory -test $status = 0 +echo archive.2 +tar -c -f archive.2 -l --remove-files file1 file2 file3 +echo testing archive.2 +tar tfv archive.2 | sed -n 's/.*file[2-3] link to //p' ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "----- -tar: file: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: file: Warning: Cannot open: Permission denied ------ -tar: directory: Cannot open: Permission denied -tar: Exiting with failure status due to previous errors ------ -tar: directory: Warning: Cannot open: Permission denied -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/ignfail.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +echo >>"$at_stderr"; $as_echo "tar: Missing links to \`file1'. +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "archive.1 +archive.2 +testing archive.2 +file1 +file1 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link03.at:34" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 40 ) # 40. link01.at:33: link count gt 2 - at_setup_line='link01.at:33' - at_desc="link count gt 2" - $at_quiet $ECHO_N " 40: link count gt 2 $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_69 +#AT_START_70 +# 70. link04.at:29: link count is 1 but multiple occurrences +at_setup_line='link04.at:29' +at_desc="link count is 1 but multiple occurrences" +$at_quiet $as_echo_n " 70: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "40. link01.at:33: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "70. link04.at:29: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/link01.at:36: + { $at_traceoff +$as_echo "$at_srcdir/link04.at:32: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -18980,29 +27755,29 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort )" -echo link01.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo link04.at:32 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -19011,25 +27786,27 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -19038,44 +27815,47 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "test.txt -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/ +dir/file +dir/file link to dir/file +dir/symlink -> file +dir/symlink link to dir/symlink +== +dir/ +dir/FOO +dir/FOO link to dir/FOO +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link04.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/link01.at:36: + { $at_traceoff +$as_echo "$at_srcdir/link04.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19084,29 +27864,29 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort )" -echo link01.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo link04.at:32 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19115,25 +27895,27 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19142,44 +27924,47 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "test.txt -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/ +dir/file +dir/file link to dir/file +dir/symlink -> file +dir/symlink link to dir/symlink +== +dir/ +dir/FOO +dir/FOO link to dir/FOO +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link04.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/link01.at:36: + { $at_traceoff +$as_echo "$at_srcdir/link04.at:32: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19188,29 +27973,29 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort )" -echo link01.at:36 >"$at_check_line_file" +echo link04.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19219,25 +28004,27 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19246,44 +28033,47 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "test.txt -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/ +dir/file +dir/file link to dir/file +dir/symlink -> file +dir/symlink link to dir/symlink +== +dir/ +dir/FOO +dir/FOO link to dir/FOO +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link04.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/link01.at:36: + { $at_traceoff +$as_echo "$at_srcdir/link04.at:32: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -19292,29 +28082,29 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort )" -echo link01.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo link04.at:32 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -19323,25 +28113,27 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -19350,44 +28142,47 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "test.txt -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/ +dir/file +dir/file link to dir/file +dir/symlink -> file +dir/symlink link to dir/symlink +== +dir/ +dir/FOO +dir/FOO link to dir/FOO +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link04.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/link01.at:36: + { $at_traceoff +$as_echo "$at_srcdir/link04.at:32: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19396,29 +28191,29 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort )" -echo link01.at:36 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo link04.at:32 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19427,25 +28222,27 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19454,61 +28251,64 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -mkdir directory/test1 -mkdir directory/test2 - -echo TEST > directory/test1/test.txt -ln directory/test1/test.txt directory/test2/test.txt || exit 77 - -tar cf archive directory/test1/test.txt directory/test1/test.txt - -rm -r directory -tar xf archive - -ls directory/test1 +mkdir dir +echo TEST > dir/file +ln -s file dir/symlink || exit 77 + +tar cf archive dir dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, +' | sort + +echo == + +tar chf archive dir +tar tvf archive | sed ' + s,.*[0-9] dir/,dir/, + s,file,FOO,g + s,symlink,FOO,g +' | sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "test.txt -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/link01.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/ +dir/ +dir/file +dir/file link to dir/file +dir/symlink -> file +dir/symlink link to dir/symlink +== +dir/ +dir/FOO +dir/FOO link to dir/FOO +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/link04.at:32" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 41 ) # 41. longv7.at:24: long names in V7 archives - at_setup_line='longv7.at:24' - at_desc="long names in V7 archives" - $at_quiet $ECHO_N " 41: long names in V7 archives $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_70 +#AT_START_71 +# 71. longv7.at:24: long names in V7 archives +at_setup_line='longv7.at:24' +at_desc="long names in V7 archives" +$at_quiet $as_echo_n " 71: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "41. longv7.at:24: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "71. longv7.at:24: testing ..." + $at_traceon @@ -19517,8 +28317,8 @@ $at_traceon - $at_traceoff -echo "$at_srcdir/longv7.at:30: + { $at_traceoff +$as_echo "$at_srcdir/longv7.at:30: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -19536,13 +28336,9 @@ tar tf archive )" echo longv7.at:30 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -19558,11 +28354,9 @@ tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems echo separator tar tf archive ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -19578,50 +28372,41 @@ tar cf archive this_is_a_very_long_name_for_a_directory_which_causes_problems echo separator tar tf archive ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -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 +echo >>"$at_stderr"; $as_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 tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator this_is_a_very_long_name_for_a_directory_which_causes_problems/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/longv7.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/longv7.at:30" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 42 ) # 42. long01.at:28: long file names divisible by block size - at_setup_line='long01.at:28' - at_desc="long file names divisible by block size" - $at_quiet $ECHO_N " 42: long file names divisible by block size $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_71 +#AT_START_72 +# 72. long01.at:28: long file names divisible by block size +at_setup_line='long01.at:28' +at_desc="long file names divisible by block size" +$at_quiet $as_echo_n " 72: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "42. long01.at:28: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "72. long01.at:28: testing ..." + $at_traceon @@ -19631,8 +28416,8 @@ $at_traceon - $at_traceoff -echo "$at_srcdir/long01.at:36: + { $at_traceoff +$as_echo "$at_srcdir/long01.at:36: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19649,13 +28434,9 @@ tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0 tar tf archive)" echo long01.at:36 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19670,11 +28451,9 @@ echo test > endfile 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 tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -19689,31 +28468,21 @@ echo test > endfile 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 tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -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 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 endfile -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/long01.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/long01.at:36" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/long01.at:36: + { $at_traceoff +$as_echo "$at_srcdir/long01.at:36: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19730,13 +28499,9 @@ tar cf archive 0123456789abcde/0123456789abcde/0123456789abcde/0123456789abcde/0 tar tf archive)" echo long01.at:36 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19751,11 +28516,9 @@ echo test > endfile 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 tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -19770,48 +28533,38 @@ echo test > endfile 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 tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -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 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_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 endfile -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/long01.at:36: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/long01.at:36" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 43 ) # 43. lustar01.at:21: ustar: unsplittable file name - at_setup_line='lustar01.at:21' - at_desc="ustar: unsplittable file name" - $at_quiet $ECHO_N " 43: ustar: unsplittable file name $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_72 +#AT_START_73 +# 73. lustar01.at:21: ustar: unsplittable file name +at_setup_line='lustar01.at:21' +at_desc="ustar: unsplittable file name" +$at_quiet $as_echo_n " 73: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "43. lustar01.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "73. lustar01.at:21: testing ..." + $at_traceon @@ -19819,8 +28572,8 @@ $at_traceon - $at_traceoff -echo "$at_srcdir/lustar01.at:27: + { $at_traceoff +$as_echo "$at_srcdir/lustar01.at:27: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19834,13 +28587,9 @@ tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_o )" echo lustar01.at:27 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19852,11 +28601,9 @@ rm -rf * 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 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 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19868,48 +28615,38 @@ rm -rf * 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 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 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -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 +echo >>"$at_stderr"; $as_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 tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 2) ;; - *) echo "$at_srcdir/lustar01.at:27: exit code was $at_status, expected 2" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 2 $at_status "$at_srcdir/lustar01.at:27" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 44 ) # 44. lustar02.at:21: ustar: unsplittable path name - at_setup_line='lustar02.at:21' - at_desc="ustar: unsplittable path name" - $at_quiet $ECHO_N " 44: ustar: unsplittable path name $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_73 +#AT_START_74 +# 74. lustar02.at:21: ustar: unsplittable path name +at_setup_line='lustar02.at:21' +at_desc="ustar: unsplittable path name" +$at_quiet $as_echo_n " 74: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "44. lustar02.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "74. lustar02.at:21: testing ..." + $at_traceon @@ -19921,8 +28658,8 @@ $at_traceon - $at_traceoff -echo "$at_srcdir/lustar02.at:32: + { $at_traceoff +$as_echo "$at_srcdir/lustar02.at:32: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19937,13 +28674,9 @@ tar cf archive this_is_a_very_long_name_for_a_file_designed_to_test_generation_o )" echo lustar02.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19956,11 +28689,9 @@ rm -rf * 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 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 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -19973,48 +28704,38 @@ rm -rf * 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 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 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -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 +echo >>"$at_stderr"; $as_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 tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 2) ;; - *) echo "$at_srcdir/lustar02.at:32: exit code was $at_status, expected 2" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 2 $at_status "$at_srcdir/lustar02.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 45 ) # 45. lustar03.at:21: ustar: splitting long names - at_setup_line='lustar03.at:21' - at_desc="ustar: splitting long names" - $at_quiet $ECHO_N " 45: ustar: splitting long names $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_74 +#AT_START_75 +# 75. lustar03.at:21: ustar: splitting long names +at_setup_line='lustar03.at:21' +at_desc="ustar: splitting long names" +$at_quiet $as_echo_n " 75: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "45. lustar03.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "75. lustar03.at:21: testing ..." + $at_traceon @@ -20024,8 +28745,8 @@ $at_traceon - $at_traceoff -echo "$at_srcdir/lustar03.at:29: + { $at_traceoff +$as_echo "$at_srcdir/lustar03.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -20042,13 +28763,9 @@ echo \"List archive\" tar tf archive)" echo lustar03.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -20063,11 +28780,9 @@ echo "Create archive" 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 echo "List archive" tar tf archive) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -20082,50 +28797,40 @@ echo "Create archive" 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 echo "List archive" tar tf archive) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Create archive +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Create archive List 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/ 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 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/lustar03.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/lustar03.at:29" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 46 ) # 46. multiv01.at:23: multivolume dumps from pipes - at_setup_line='multiv01.at:23' - at_desc="multivolume dumps from pipes" - $at_quiet $ECHO_N " 46: multivolume dumps from pipes $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_75 +#AT_START_76 +# 76. multiv01.at:23: multivolume dumps from pipes +at_setup_line='multiv01.at:23' +at_desc="multivolume dumps from pipes" +$at_quiet $as_echo_n " 76: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "46. multiv01.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "76. multiv01.at:23: testing ..." + $at_traceon @@ -20135,8 +28840,8 @@ $at_traceon - $at_traceoff -echo "$at_srcdir/multiv01.at:30: + { $at_traceoff +$as_echo "$at_srcdir/multiv01.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20163,13 +28868,12 @@ else fi tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\ - --listed-incremental=t.snar \\ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 mkdir extract-dir-pipe dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ - -C extract-dir-pipe -x --multi-volume \\ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\ --tape-length=\$TAPE_LENGTH --read-full-records || exit 1 cmp file1 extract-dir-pipe/file1 @@ -20177,13 +28881,9 @@ cmp file2 extract-dir-pipe/file2 )" echo multiv01.at:30 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20210,23 +28910,20 @@ else fi tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - --listed-incremental=t.snar \ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 mkdir extract-dir-pipe dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume \ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ --tape-length=$TAPE_LENGTH --read-full-records || exit 1 cmp file1 extract-dir-pipe/file1 cmp file2 extract-dir-pipe/file2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20253,41 +28950,29 @@ else fi tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - --listed-incremental=t.snar \ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 mkdir extract-dir-pipe dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume \ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ --tape-length=$TAPE_LENGTH --read-full-records || exit 1 cmp file1 extract-dir-pipe/file1 cmp file2 extract-dir-pipe/file2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv01.at:30" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/multiv01.at:30: + { $at_traceoff +$as_echo "$at_srcdir/multiv01.at:30: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20314,13 +28999,12 @@ else fi tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\ - --listed-incremental=t.snar \\ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 mkdir extract-dir-pipe dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ - -C extract-dir-pipe -x --multi-volume \\ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\ --tape-length=\$TAPE_LENGTH --read-full-records || exit 1 cmp file1 extract-dir-pipe/file1 @@ -20328,13 +29012,9 @@ cmp file2 extract-dir-pipe/file2 )" echo multiv01.at:30 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20361,23 +29041,20 @@ else fi tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - --listed-incremental=t.snar \ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 mkdir extract-dir-pipe dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume \ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ --tape-length=$TAPE_LENGTH --read-full-records || exit 1 cmp file1 extract-dir-pipe/file1 cmp file2 extract-dir-pipe/file2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20404,41 +29081,29 @@ else fi tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - --listed-incremental=t.snar \ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 mkdir extract-dir-pipe dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume \ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ --tape-length=$TAPE_LENGTH --read-full-records || exit 1 cmp file1 extract-dir-pipe/file1 cmp file2 extract-dir-pipe/file2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv01.at:30" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/multiv01.at:30: + { $at_traceoff +$as_echo "$at_srcdir/multiv01.at:30: mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -20465,13 +29130,12 @@ else fi tar -c --multi-volume --tape-length=\$TAPE_LENGTH \\ - --listed-incremental=t.snar \\ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 mkdir extract-dir-pipe dd bs=4096 count=\$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ - -C extract-dir-pipe -x --multi-volume \\ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \\ --tape-length=\$TAPE_LENGTH --read-full-records || exit 1 cmp file1 extract-dir-pipe/file1 @@ -20479,13 +29143,9 @@ cmp file2 extract-dir-pipe/file2 )" echo multiv01.at:30 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains a ${...} parameter expansion)' + false; }; then + ( $at_traceon; mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -20512,23 +29172,20 @@ else fi tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - --listed-incremental=t.snar \ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 mkdir extract-dir-pipe dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume \ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ --tape-length=$TAPE_LENGTH --read-full-records || exit 1 cmp file1 extract-dir-pipe/file1 cmp file2 extract-dir-pipe/file2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -20555,65 +29212,53 @@ else fi tar -c --multi-volume --tape-length=$TAPE_LENGTH \ - --listed-incremental=t.snar \ -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1 mkdir extract-dir-pipe dd bs=4096 count=$TAPE_LENGTH if=t2-pipe.tar 2>/dev/null | PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \ - -C extract-dir-pipe -x --multi-volume \ + -C extract-dir-pipe -x --multi-volume --warning=no-timestamp \ --tape-length=$TAPE_LENGTH --read-full-records || exit 1 cmp file1 extract-dir-pipe/file1 cmp file2 extract-dir-pipe/file2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv01.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv01.at:30" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 47 ) # 47. multiv02.at:28: skipping a straddling member - at_setup_line='multiv02.at:28' - at_desc="skipping a straddling member" - $at_quiet $ECHO_N " 47: skipping a straddling member $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_76 +#AT_START_77 +# 77. multiv02.at:28: skipping a straddling member +at_setup_line='multiv02.at:28' +at_desc="skipping a straddling member" +$at_quiet $as_echo_n " 77: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "47. multiv02.at:28: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "77. multiv02.at:28: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/multiv02.at:31: + { $at_traceoff +$as_echo "$at_srcdir/multiv02.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20631,17 +29276,13 @@ exec <&- tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1 +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 )" echo multiv02.at:31 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20659,13 +29300,11 @@ exec <&- tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1 +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20681,35 +29320,25 @@ genfile --length 10240 --file fire exec <&- -tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 -echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator -en -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 +tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 +echo separator +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +en +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv02.at:31" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/multiv02.at:31: + { $at_traceoff +$as_echo "$at_srcdir/multiv02.at:31: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20727,17 +29356,13 @@ exec <&- tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1 +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 )" echo multiv02.at:31 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20755,13 +29380,11 @@ exec <&- tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1 +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -20779,33 +29402,23 @@ exec <&- tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1 +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator en -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv02.at:31" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/multiv02.at:31: + { $at_traceoff +$as_echo "$at_srcdir/multiv02.at:31: mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -20823,17 +29436,13 @@ exec <&- tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1 +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 )" echo multiv02.at:31 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -20851,13 +29460,11 @@ exec <&- tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1 +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -20875,57 +29482,47 @@ exec <&- tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire || exit 1 echo separator -tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1 +tar -v -x -f A.tar -f B.tar -f C.tar -M en --warning=no-timestamp || exit 1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator en -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv02.at:31: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv02.at:31" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 48 ) # 48. multiv03.at:30: MV archive & long filenames - at_setup_line='multiv03.at:30' - at_desc="MV archive & long filenames" - $at_quiet $ECHO_N " 48: MV archive & long filenames $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_77 +#AT_START_78 +# 78. multiv03.at:30: MV archive & long filenames +at_setup_line='multiv03.at:30' +at_desc="MV archive & long filenames" +$at_quiet $as_echo_n " 78: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "48. multiv03.at:30: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "78. multiv03.at:30: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/multiv03.at:33: + { $at_traceoff +$as_echo "$at_srcdir/multiv03.at:33: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -20962,18 +29559,14 @@ tar -M -L 10 -c -f arch.1 -f arch.2 \$BFILE || exit 1 echo separator-2 mv \$BFILE bfile -tar -M -x -f arch.1 -f arch.2 || exit 1 +tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 cmp \$BFILE bfile )" echo multiv03.at:33 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a `...` command substitution)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21010,14 +29603,12 @@ tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1 echo separator-2 mv $BFILE bfile -tar -M -x -f arch.1 -f arch.2 || exit 1 +tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 cmp $BFILE bfile ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21054,32 +29645,282 @@ tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE || exit 1 echo separator-2 mv $BFILE bfile -tar -M -x -f arch.1 -f arch.2 || exit 1 +tar -M -x -f arch.1 -f arch.2 --warning=no-timestamp || exit 1 cmp $BFILE bfile ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi +at_status=$? +at_failed=false +$at_diff experr "$at_stderr" || at_failed=: +$at_diff expout "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv03.at:33" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/multiv03.at:33: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\` +BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\` + +cat > ../experr < ../expout <"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'` +BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'` + +cat > ../experr < ../expout <"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * +AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'` +BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'` + +cat > ../experr < ../expout <"$at_stdout" 2>"$at_stderr" +fi +at_status=$? at_failed=false $at_diff experr "$at_stderr" || at_failed=: $at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv03.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_check_status 0 $at_status "$at_srcdir/multiv03.at:33" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_78 +#AT_START_79 +# 79. multiv04.at:36: split directory members in a MV archive +at_setup_line='multiv04.at:36' +at_desc="split directory members in a MV archive" +$at_quiet $as_echo_n " 79: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "79. multiv04.at:36: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/multiv04.at:39: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +mkdir directory +awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' "$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +mkdir directory +awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' "$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + +mkdir directory +awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' "$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +separator +block 0: directory/ +block 35: ** Block of NULs ** +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv04.at:39" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/multiv03.at:33: + { $at_traceoff +$as_echo "$at_srcdir/multiv04.at:39: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -21088,46 +29929,28 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -AFILE=\`awk 'BEGIN { for (i = 0; i < 100; i++) printf \"a\"; exit; }'\` -BFILE=\`awk 'BEGIN { for (i = 0; i < 101; i++) printf \"b\"; exit; }'\` - -cat > ../experr < ../expout <"$at_check_line_file" +tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a `...` command substitution)' -fi +echo separator + +tar -MRt -f arc.1 -f arc.2)" +echo multiv04.at:39 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -21136,42 +29959,26 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'` -BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'` -cat > ../experr < ../expout <"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -21180,84 +29987,65 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'` -BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'` - -cat > ../experr < ../expout <"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +sleep 2 -at_failed=false -$at_diff experr "$at_stderr" || at_failed=: -$at_diff expout "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv03.at:33: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory +echo separator - echo 1 > "$at_status_file" - exit 1 +tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +separator +block 0: directory/ +block 35: ** Block of NULs ** +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv04.at:39" -$at_traceon - +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 49 ) # 49. multiv04.at:36: split directory members in a MV archive - at_setup_line='multiv04.at:36' - at_desc="split directory members in a MV archive" - $at_quiet $ECHO_N " 49: split directory members in a MV archive $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_79 +#AT_START_80 +# 80. multiv05.at:26: Restoring after an out of sync volume +at_setup_line='multiv05.at:26' +at_desc="Restoring after an out of sync volume" +$at_quiet $as_echo_n " 80: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "49. multiv04.at:36: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "80. multiv05.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/multiv04.at:39: + + { $at_traceoff +$as_echo "$at_srcdir/multiv05.at:30: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21266,32 +30054,190 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * +exec <&- -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' "$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * exec <&- -sleep 2 +genfile --length 250k --file jeden +genfile --length 250k --file dwa +genfile --length 250k --file trzy +genfile --length 250k --file cztery +genfile --length 250k --file piec +genfile --length 250k --file szesc -tar --listed-incremental=list -c -f archive.a directory -sleep 2 +echo Creating archive +tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc +echo separator +mkdir bak +mv jeden dwa trzy cztery piec szesc bak +tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar +echo Diffing jeden + cmp bak/jeden jeden || exit 1 +echo Diffing dwa + cmp bak/dwa dwa || exit 1 +echo Diffing trzy + cmp bak/trzy trzy || exit 1 +echo Diffing cztery + cmp bak/cztery cztery || exit 1 +echo Diffing piec + cmp bak/piec piec || exit 1 +echo Diffing szesc + cmp bak/szesc szesc || exit 1 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +exec <&- + +genfile --length 250k --file jeden +genfile --length 250k --file dwa +genfile --length 250k --file trzy +genfile --length 250k --file cztery +genfile --length 250k --file piec +genfile --length 250k --file szesc -tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory +echo Creating archive +tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc echo separator +mkdir bak +mv jeden dwa trzy cztery piec szesc bak +tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar +echo Diffing jeden + cmp bak/jeden jeden || exit 1 +echo Diffing dwa + cmp bak/dwa dwa || exit 1 +echo Diffing trzy + cmp bak/trzy trzy || exit 1 +echo Diffing cztery + cmp bak/cztery cztery || exit 1 +echo Diffing piec + cmp bak/piec piec || exit 1 +echo Diffing szesc + cmp bak/szesc szesc || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar: \`trzy' is not continued on this volume +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating archive +separator +jeden +dwa +trzy +cztery +piec +szesc +Diffing jeden +Diffing dwa +Diffing trzy +Diffing cztery +Diffing piec +Diffing szesc +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv05.at:30" -tar -MRt -f arc.1 -f arc.2)" -echo multiv04.at:39 >"$at_check_line_file" +$at_failed && at_func_log_failure +$at_traceon; } + + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_80 +#AT_START_81 +# 81. multiv06.at:27: Multivolumes with L=record_size +at_setup_line='multiv06.at:27' +at_desc="Multivolumes with L=record_size" +$at_quiet $as_echo_n " 81: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "81. multiv06.at:27: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/multiv06.at:30: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +exec <&- +decho Creating file +genfile --length 20139 --file file +decho Creating archive +tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file +decho Testing archive +tar -t -M -farc.1 -farc.2 -farc.3)" +echo multiv06.at:30 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21300,28 +30246,16 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +decho Creating file +genfile --length 20139 --file file +decho Creating archive +tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file +decho Testing archive +tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21330,279 +30264,255 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' "$at_stdout" 2>"$at_stderr" - at_status=$? +decho Creating file +genfile --length 20139 --file file +decho Creating archive +tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file +decho Testing archive +tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -separator -block 0: directory/ -block 35: ** Block of NULs ** -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv04.at:39: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +echo >>"$at_stderr"; $as_echo "Creating file +Creating archive +Testing archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating file +Creating archive +Testing archive +file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv06.at:30" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/multiv04.at:39: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + { $at_traceoff +$as_echo "$at_srcdir/multiv06.at:30: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS=\"-H pax\" export TAR_OPTIONS rm -rf * - -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf(\"directory/%014x\\n\", i); }' "$at_check_line_file" -sleep 2 - -tar --listed-incremental=list -c -f archive.a directory - -sleep 2 - -tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory - -echo separator - -tar -MRt -f arc.1 -f arc.2)" -echo multiv04.at:39 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * - -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' "$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +decho Creating file +genfile --length 20139 --file file +decho Creating archive +tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file +decho Testing archive +tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + ( :; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * - -mkdir directory -awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' "$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "Creating file +Creating archive +Testing archive +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating file +Creating archive +Testing archive +file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv06.at:30" -sleep 2 +$at_failed && at_func_log_failure +$at_traceon; } -tar --listed-incremental=list -c -f archive.a directory -sleep 2 -tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory -echo separator + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_81 +#AT_START_82 +# 82. multiv07.at:26: volumes split at an extended header +at_setup_line='multiv07.at:26' +at_desc="volumes split at an extended header" +$at_quiet $as_echo_n " 82: $at_desc " +at_xfail=no + test -f \$XFAILFILE && at_xfail=yes + test -f $XFAILFILE && at_xfail=yes + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "82. multiv07.at:26: testing ..." + $at_traceon -tar -MRt -f arc.1 -f arc.2) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -separator -block 0: directory/ -block 35: ** Block of NULs ** -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv04.at:39: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +{ $at_traceoff +$as_echo "$at_srcdir/multiv07.at:29: - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 + +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 +exec <&- +cd \$TEST_DATA_DIR +tar -t -M -fxsplit-1.tar -fxsplit-2.tar +" +echo multiv07.at:29 >"$at_check_line_file" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 50 ) # 50. multiv05.at:26: Restoring after an out of sync volume - at_setup_line='multiv05.at:26' - at_desc="Restoring after an out of sync volume" - $at_quiet $ECHO_N " 50: Restoring after an out of sync volume $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "50. multiv05.at:26: testing ..." - $at_traceon +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 +exec <&- +cd $TEST_DATA_DIR +tar -t -M -fxsplit-1.tar -fxsplit-2.tar + ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq xsplit-1.tar 0e008c84c517e48fbf23ca6a7033cde6 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 - $at_traceoff -echo "$at_srcdir/multiv05.at:30: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * +test -z "$TEST_DATA_DIR" && exit 77 +tarball_prereq xsplit-2.tar 03150b9852d285458f43734e9e0b9a45 $TEST_DATA_DIR $TEST_DATA_URL || exit 77 exec <&- -genfile --length 250k --file jeden -genfile --length 250k --file dwa -genfile --length 250k --file trzy -genfile --length 250k --file cztery -genfile --length 250k --file piec -genfile --length 250k --file szesc +cd $TEST_DATA_DIR +tar -t -M -fxsplit-1.tar -fxsplit-2.tar + ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Archive volumes split at an extended header Volume 1 +foo +bar +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv07.at:29" + +$at_failed && at_func_log_failure +$at_traceon; } + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_82 +#AT_START_83 +# 83. multiv08.at:23: multivolume header creation +at_setup_line='multiv08.at:23' +at_desc="multivolume header creation" +$at_quiet $as_echo_n " 83: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "83. multiv08.at:23: testing ..." + $at_traceon -echo Creating archive -tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc -echo separator -mkdir bak -mv jeden dwa trzy cztery piec szesc bak -tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar -echo Diffing jeden - cmp bak/jeden jeden || exit 1 -echo Diffing dwa - cmp bak/dwa dwa || exit 1 -echo Diffing trzy - cmp bak/trzy trzy || exit 1 -echo Diffing cztery - cmp bak/cztery cztery || exit 1 -echo Diffing piec - cmp bak/piec piec || exit 1 -echo Diffing szesc - cmp bak/szesc szesc || exit 1 -)" -echo multiv05.at:30 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi -if test -n "$at_trace_this"; then - ( $at_traceon; + + { $at_traceoff +$as_echo "$at_srcdir/multiv08.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -exec <&- - -genfile --length 250k --file jeden -genfile --length 250k --file dwa -genfile --length 250k --file trzy -genfile --length 250k --file cztery -genfile --length 250k --file piec -genfile --length 250k --file szesc - +genfile --length 9472 --file a +genfile --length 9984 --file b +decho Creating +tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b +decho Testing +tar -tMR -f A.tar -f B.tar -f C.tar +)" +echo multiv08.at:26 >"$at_check_line_file" -echo Creating archive -tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc -echo separator -mkdir bak -mv jeden dwa trzy cztery piec szesc bak -tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar -echo Diffing jeden - cmp bak/jeden jeden || exit 1 -echo Diffing dwa - cmp bak/dwa dwa || exit 1 -echo Diffing trzy - cmp bak/trzy trzy || exit 1 -echo Diffing cztery - cmp bak/cztery cztery || exit 1 -echo Diffing piec - cmp bak/piec piec || exit 1 -echo Diffing szesc - cmp bak/szesc szesc || exit 1 +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +genfile --length 9472 --file a +genfile --length 9984 --file b +decho Creating +tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b +decho Testing +tar -tMR -f A.tar -f B.tar -f C.tar ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -21611,370 +30521,442 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -exec <&- +genfile --length 9472 --file a +genfile --length 9984 --file b +decho Creating +tar -c -M -L10 -f A.tar -f B.tar -f C.tar a b +decho Testing +tar -tMR -f A.tar -f B.tar -f C.tar +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "Creating +Testing +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Creating +Testing +block 0: a +block 21: b +block 43: ** Block of NULs ** +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multiv08.at:26" -genfile --length 250k --file jeden -genfile --length 250k --file dwa -genfile --length 250k --file trzy -genfile --length 250k --file cztery -genfile --length 250k --file piec -genfile --length 250k --file szesc +$at_failed && at_func_log_failure +$at_traceon; } -echo Creating archive -tar -c -M -L 502 -f a.tar -f b.tar -f c.tar jeden dwa trzy cztery piec szesc -echo separator -mkdir bak -mv jeden dwa trzy cztery piec szesc bak -tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar -echo Diffing jeden - cmp bak/jeden jeden || exit 1 -echo Diffing dwa - cmp bak/dwa dwa || exit 1 -echo Diffing trzy - cmp bak/trzy trzy || exit 1 -echo Diffing cztery - cmp bak/cztery cztery || exit 1 -echo Diffing piec - cmp bak/piec piec || exit 1 -echo Diffing szesc - cmp bak/szesc szesc || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -echo >>"$at_stderr"; echo "tar: \`trzy' is not continued on this volume -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating archive -separator -jeden -dwa -trzy -cztery -piec -szesc -Diffing jeden -Diffing dwa -Diffing trzy -Diffing cztery -Diffing piec -Diffing szesc -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv05.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_83 +#AT_START_84 +# 84. old.at:23: old archives +at_setup_line='old.at:23' +at_desc="old archives" +$at_quiet $as_echo_n " 84: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "84. old.at:23: testing ..." + $at_traceon - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon +unset TAR_OPTIONS +{ $at_traceoff +$as_echo "$at_srcdir/old.at:27: +mkdir directory +tar cfvo archive directory || exit 1 +tar tf archive +" +echo old.at:27 >"$at_check_line_file" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir directory +tar cfvo archive directory || exit 1 +tar tf archive + ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir directory +tar cfvo archive directory || exit 1 +tar tf archive + ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/old.at:27" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 51 ) # 51. multiv06.at:27: Multivolumes with L=record_size - at_setup_line='multiv06.at:27' - at_desc="Multivolumes with L=record_size" - $at_quiet $ECHO_N " 51: Multivolumes with L=record_size $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_84 +#AT_START_85 +# 85. recurse.at:21: recurse +at_setup_line='recurse.at:21' +at_desc="recurse" +$at_quiet $as_echo_n " 85: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "51. multiv06.at:27: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "85. recurse.at:21: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/multiv06.at:30: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { $at_traceoff +$as_echo "$at_srcdir/recurse.at:24: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3)" -echo multiv06.at:30 >"$at_check_line_file" +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +)" +echo recurse.at:24 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/recurse.at:24" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/recurse.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +)" +echo recurse.at:24 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "Creating file -Creating archive -Testing archive -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating file -Creating archive -Testing archive -file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv06.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 + { $at_traceoff +$as_echo "$at_srcdir/recurse.at:24: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +)" +echo recurse.at:24 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/recurse.at:24" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/multiv06.at:30: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax + { $at_traceoff +$as_echo "$at_srcdir/recurse.at:24: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3)" -echo multiv06.at:30 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +)" +echo recurse.at:24 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -exec <&- -decho Creating file -genfile --length 20139 --file file -decho Creating archive -tar -c -M -L10 -b20 -farc.1 -farc.2 -farc.3 file -decho Testing archive -tar -t -M -farc.1 -farc.2 -farc.3) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +mkdir directory +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 +tar tf archive +) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "Creating file -Creating archive -Testing archive -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Creating file -Creating archive -Testing archive -file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multiv06.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 52 ) # 52. old.at:23: old archives - at_setup_line='old.at:23' - at_desc="old archives" - $at_quiet $ECHO_N " 52: old archives $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "52. old.at:23: testing ..." - $at_traceon +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/recurse.at:24" +$at_failed && at_func_log_failure +$at_traceon; } + { $at_traceoff +$as_echo "$at_srcdir/recurse.at:24: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/old.at:27: mkdir directory -tar cfvo archive directory || exit 1 +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 tar tf archive -" -echo old.at:27 >"$at_check_line_file" +)" +echo recurse.at:24 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -if test -n "$at_trace_this"; then - ( $at_traceon; mkdir directory -tar cfvo archive directory || exit 1 +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 tar tf archive - ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + mkdir directory -tar cfvo archive directory || exit 1 +touch directory/file +tar --create --file archive --no-recursion directory || exit 1 tar tf archive - ) >"$at_stdout" 2>"$at_stderr" - at_status=$? +) ) >"$at_stdout" 2>"$at_stderr" fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/old.at:27: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory/ +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/recurse.at:24" - echo 1 > "$at_status_file" - exit 1 -fi +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceon - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 53 ) # 53. recurse.at:21: recurse - at_setup_line='recurse.at:21' - at_desc="recurse" - $at_quiet $ECHO_N " 53: recurse $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_85 +#AT_START_86 +# 86. same-order01.at:26: working -C with --same-order +at_setup_line='same-order01.at:26' +at_desc="working -C with --same-order" +$at_quiet $as_echo_n " 86: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "53. recurse.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "86. same-order01.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/recurse.at:24: + { $at_traceoff +$as_echo "$at_srcdir/same-order01.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -21983,20 +30965,24 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -)" -echo recurse.at:24 >"$at_check_line_file" +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +ls directory|sort +)" +echo same-order01.at:29 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22005,16 +30991,22 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22023,35 +31015,34 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/same-order01.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/recurse.at:24: + { $at_traceoff +$as_echo "$at_srcdir/same-order01.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -22060,20 +31051,24 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -)" -echo recurse.at:24 >"$at_check_line_file" +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +ls directory|sort +)" +echo same-order01.at:29 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -22082,16 +31077,22 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -22100,35 +31101,34 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/same-order01.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/recurse.at:24: + { $at_traceoff +$as_echo "$at_srcdir/same-order01.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -22137,20 +31137,24 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -)" -echo recurse.at:24 >"$at_check_line_file" +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +ls directory|sort +)" +echo same-order01.at:29 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -22159,16 +31163,22 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -22177,35 +31187,34 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/same-order01.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/recurse.at:24: + { $at_traceoff +$as_echo "$at_srcdir/same-order01.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22214,20 +31223,24 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -)" -echo recurse.at:24 >"$at_check_line_file" +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +ls directory|sort +)" +echo same-order01.at:29 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22236,16 +31249,22 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22254,35 +31273,34 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/same-order01.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/recurse.at:24: + { $at_traceoff +$as_echo "$at_srcdir/same-order01.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22291,20 +31309,24 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -)" -echo recurse.at:24 >"$at_check_line_file" +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +ls directory|sort +)" +echo same-order01.at:29 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22313,16 +31335,22 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 + +ls directory|sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22331,59 +31359,58 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -touch directory/file -tar --create --file archive --no-recursion directory || exit 1 -tar tf archive -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "directory/ -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/recurse.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 - echo 1 > "$at_status_file" - exit 1 -fi +genfile -l 1024 -f file1 +genfile -l 1024 -f file2 +tar cf archive file1 file2 + +mkdir directory +tar -xf archive --same-order -C directory --warning=no-timestamp || exit 1 -$at_traceon +ls directory|sort +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/same-order01.at:29" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 54 ) # 54. same-order01.at:26: working -C with --same-order - at_setup_line='same-order01.at:26' - at_desc="working -C with --same-order" - $at_quiet $ECHO_N " 54: working -C with --same-order $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_86 +#AT_START_87 +# 87. same-order02.at:25: multiple -C options +at_setup_line='same-order02.at:25' +at_desc="multiple -C options" +$at_quiet $as_echo_n " 87: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "54. same-order01.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "87. same-order02.at:25: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/same-order01.at:29: + { $at_traceoff +$as_echo "$at_srcdir/same-order02.at:28: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22392,28 +31419,27 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort -)" -echo same-order01.at:29 >"$at_check_line_file" +HERE=\`pwd\` +tar -xf archive --same-order --warning=no-timestamp \\ + -C \$HERE/en file1 \\ + -C \$HERE/to file2 || exit 1 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +ls en +echo separator +ls to +)" +echo same-order02.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22422,24 +31448,25 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22448,44 +31475,38 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/same-order02.at:28" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/same-order01.at:29: + { $at_traceoff +$as_echo "$at_srcdir/same-order02.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -22494,28 +31515,27 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort -)" -echo same-order01.at:29 >"$at_check_line_file" +HERE=\`pwd\` +tar -xf archive --same-order --warning=no-timestamp \\ + -C \$HERE/en file1 \\ + -C \$HERE/to file2 || exit 1 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +ls en +echo separator +ls to +)" +echo same-order02.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -22524,70 +31544,65 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS -rm -rf * - - -test -z "`sort < /dev/null 2>&1`" || exit 77 - +rm -rf * genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/same-order02.at:28" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/same-order01.at:29: + { $at_traceoff +$as_echo "$at_srcdir/same-order02.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -22596,28 +31611,27 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort -)" -echo same-order01.at:29 >"$at_check_line_file" +HERE=\`pwd\` +tar -xf archive --same-order --warning=no-timestamp \\ + -C \$HERE/en file1 \\ + -C \$HERE/to file2 || exit 1 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +ls en +echo separator +ls to +)" +echo same-order02.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -22626,24 +31640,25 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -22652,44 +31667,38 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/same-order02.at:28" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/same-order01.at:29: + { $at_traceoff +$as_echo "$at_srcdir/same-order02.at:28: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22698,28 +31707,27 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort -)" -echo same-order01.at:29 >"$at_check_line_file" +HERE=\`pwd\` +tar -xf archive --same-order --warning=no-timestamp \\ + -C \$HERE/en file1 \\ + -C \$HERE/to file2 || exit 1 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +ls en +echo separator +ls to +)" +echo same-order02.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22728,24 +31736,25 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -22754,44 +31763,38 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/same-order02.at:28" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/same-order01.at:29: + { $at_traceoff +$as_echo "$at_srcdir/same-order02.at:28: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22800,28 +31803,27 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort -)" -echo same-order01.at:29 >"$at_check_line_file" +HERE=\`pwd\` +tar -xf archive --same-order --warning=no-timestamp \\ + -C \$HERE/en file1 \\ + -C \$HERE/to file2 || exit 1 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +ls en +echo separator +ls to +)" +echo same-order02.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains a `...` command substitution)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22830,24 +31832,25 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -22856,68 +31859,62 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - - genfile -l 1024 -f file1 genfile -l 1024 -f file2 tar cf archive file1 file2 -mkdir directory -tar -xf archive --same-order -C directory || exit 1 +mkdir en +mkdir to -ls directory|sort +HERE=`pwd` +tar -xf archive --same-order --warning=no-timestamp \ + -C $HERE/en file1 \ + -C $HERE/to file2 || exit 1 + +ls en +echo separator +ls to ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "file1 +separator file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/same-order01.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/same-order02.at:28" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 55 ) # 55. same-order02.at:25: multiple -C options - at_setup_line='same-order02.at:25' - at_desc="multiple -C options" - $at_quiet $ECHO_N " 55: multiple -C options $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_87 +#AT_START_88 +# 88. shortrec.at:25: short records +at_setup_line='shortrec.at:25' +at_desc="short records" +$at_quiet $as_echo_n " 88: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "55. same-order02.at:25: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "88. shortrec.at:25: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/same-order02.at:28: + { $at_traceoff +$as_echo "$at_srcdir/shortrec.at:28: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22926,29 +31923,20 @@ TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=\`pwd\` -tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1 +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -ls en -echo separator -ls to +rm -r directory )" -echo same-order02.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a `...` command substitution)' -fi +echo shortrec.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22957,25 +31945,18 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=`pwd` -tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1 +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -ls en -echo separator -ls to +rm -r directory ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -22984,77 +31965,49 @@ TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=`pwd` -tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1 +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -ls en -echo separator -ls to +rm -r directory ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -separator -file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/shortrec.at:28" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/same-order02.at:28: + { $at_traceoff +$as_echo "$at_srcdir/shortrec.at:28: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS -rm -rf * - -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to +rm -rf * -HERE=\`pwd\` -tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1 +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -ls en -echo separator -ls to +rm -r directory )" -echo same-order02.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a `...` command substitution)' -fi +echo shortrec.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -23063,25 +32016,18 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=`pwd` -tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1 +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -ls en -echo separator -ls to +rm -r directory ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -23090,46 +32036,27 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=`pwd` -tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1 +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -ls en -echo separator -ls to +rm -r directory ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -separator -file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/shortrec.at:28" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/same-order02.at:28: + { $at_traceoff +$as_echo "$at_srcdir/shortrec.at:28: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -23138,29 +32065,20 @@ TAR_OPTIONS=\"-H ustar\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=\`pwd\` -tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1 +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -ls en -echo separator -ls to +rm -r directory )" -echo same-order02.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a `...` command substitution)' -fi +echo shortrec.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -23169,25 +32087,18 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=`pwd` -tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1 +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -ls en -echo separator -ls to +rm -r directory ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -23196,104 +32107,243 @@ TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=`pwd` -tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1 +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -ls en -echo separator -ls to +rm -r directory ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -separator -file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/shortrec.at:28" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi + { $at_traceoff +$as_echo "$at_srcdir/shortrec.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null + +rm -r directory +)" +echo shortrec.at:28 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -$at_traceon +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null - $at_traceoff -echo "$at_srcdir/same-order02.at:28: +rm -r directory +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null -mkdir en -mkdir to +rm -r directory +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/shortrec.at:28" -HERE=\`pwd\` -tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1 +$at_failed && at_func_log_failure +$at_traceon; } -ls en -echo separator -ls to + { $at_traceoff +$as_echo "$at_srcdir/shortrec.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null + +rm -r directory )" -echo same-order02.at:28 >"$at_check_line_file" +echo shortrec.at:28 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a `...` command substitution)' +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null + +rm -r directory +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory +(cd directory && touch a b c d e f g h i j k l m n o p q r) +tar -c -b 1 -f - directory | tar -t -f - > /dev/null +tar -c -b 1 -f archive directory +tar -t -f archive > /dev/null +tar -t -f - < archive > /dev/null + +rm -r directory +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/shortrec.at:28" + +$at_failed && at_func_log_failure +$at_traceon; } -if test -n "$at_trace_this"; then - ( $at_traceon; + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_88 +#AT_START_89 +# 89. sparse01.at:21: sparse files +at_setup_line='sparse01.at:21' +at_desc="sparse files" +$at_quiet $as_echo_n " 89: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "89. sparse01.at:21: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/sparse01.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -mkdir en -mkdir to +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile +)" +echo sparse01.at:24 >"$at_check_line_file" -HERE=`pwd` -tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1 +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * -ls en +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 echo separator -ls to + +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -23302,46 +32352,31 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=`pwd` -tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1 +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -ls en +tar tfv archive echo separator -ls to +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -separator -file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_func_check_status 0 $at_status "$at_srcdir/sparse01.at:24" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/same-order02.at:28: + { $at_traceoff +$as_echo "$at_srcdir/sparse01.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -23350,29 +32385,24 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=\`pwd\` -tar -xf archive --same-order -C \$HERE/en file1 -C \$HERE/to file2 || exit 1 +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -ls en +tar tfv archive echo separator -ls to +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile )" -echo same-order02.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains a `...` command substitution)' -fi +echo sparse01.at:24 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -23381,25 +32411,22 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=`pwd` -tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1 +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -ls en +tar tfv archive echo separator -ls to +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -23408,450 +32435,390 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile -l 1024 -f file1 -genfile -l 1024 -f file2 -tar cf archive file1 file2 - -mkdir en -mkdir to - -HERE=`pwd` -tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1 +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -ls en +tar tfv archive echo separator -ls to +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "file1 -separator -file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/same-order02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 56 ) # 56. shortrec.at:25: short records - at_setup_line='shortrec.at:25' - at_desc="short records" - $at_quiet $ECHO_N " 56: short records $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "56. shortrec.at:25: testing ..." - $at_traceon - - - - - +at_func_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_func_check_status 0 $at_status "$at_srcdir/sparse01.at:24" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/shortrec.at:28: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + { $at_traceoff +$as_echo "$at_srcdir/sparse01.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -rm -r directory +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile )" -echo shortrec.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo sparse01.at:24 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -rm -r directory +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --length 1000 -f begin +genfile --length 1000 -f end +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -rm -r directory +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive --warning=no-timestamp +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_func_check_status 0 $at_status "$at_srcdir/sparse01.at:24" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon - $at_traceoff -echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo shortrec.at:28 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi +cat >stdout.re <<'_ATEOF' +separator +-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin +-rw-r--r-- ^ ^ * *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile +-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end +separator +sparsefile 10344448 +_ATEOF -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +awk '{print NR " " $0}' stdout > $$.1 +awk '{print NR " " $0}' stdout.re | join - $$.1 | +while read NUM RE LINE +do + echo "$LINE" | grep -- "$RE" >/dev/null || exit 1 +done -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_89 +#AT_START_90 +# 90. sparse02.at:21: extracting sparse file over a pipe +at_setup_line='sparse02.at:21' +at_desc="extracting sparse file over a pipe" +$at_quiet $as_echo_n " 90: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "90. sparse02.at:21: testing ..." + $at_traceon - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon -$at_traceoff -echo "$at_srcdir/shortrec.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +# Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe. +# References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us> +# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html + + + + { $at_traceoff +$as_echo "$at_srcdir/sparse02.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive - -rm -r directory -)" -echo shortrec.at:28 >"$at_check_line_file" +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse sparsefile || exit 1 +echo separator -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy +)" +echo sparse02.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse sparsefile || exit 1 +echo separator -rm -r directory +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse sparsefile || exit 1 +echo separator -rm -r directory +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/sparse02.at:28" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi + { $at_traceoff +$as_echo "$at_srcdir/sparse02.at:28: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * -$at_traceon +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse sparsefile || exit 1 +echo separator +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy +)" +echo sparse02.at:28 >"$at_check_line_file" - $at_traceoff -echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo shortrec.at:28 >"$at_check_line_file" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse sparsefile || exit 1 +echo separator -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse sparsefile || exit 1 +echo separator - echo 1 > "$at_status_file" - exit 1 +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/sparse02.at:28" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceoff -echo "$at_srcdir/shortrec.at:28: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + { $at_traceoff +$as_echo "$at_srcdir/sparse02.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H ustar\" +TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse sparsefile || exit 1 +echo separator -rm -r directory +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy )" -echo shortrec.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo sparse02.at:28 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse sparsefile || exit 1 +echo separator -rm -r directory +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H ustar" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 +tar -c -f archive --sparse sparsefile || exit 1 +echo separator -rm -r directory +tar xfO archive | cat - > sparsecopy || exit 1 +cmp sparsefile sparsecopy ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/sparse02.at:28" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon $at_traceoff -echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo shortrec.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_90 +#AT_START_91 +# 91. sparse03.at:21: storing sparse files > 8G +at_setup_line='sparse03.at:21' +at_desc="storing sparse files > 8G" +$at_quiet $as_echo_n " 91: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "91. sparse03.at:21: testing ..." + $at_traceon -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +# Tar 1.15.1 incorrectly computed sparse member size if the extended +# PAX header contained size keyword. +# References: <87vf46nb36.fsf@penguin.cs.ucla.edu> +# http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon -$at_traceoff -echo "$at_srcdir/shortrec.at:28: + { $at_traceoff +$as_echo "$at_srcdir/sparse03.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -23860,24 +32827,24 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --length 1000 --file begin +genfile --length 1000 --file end +genfile --sparse --file sparsefile --block-size 512 8G A || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -rm -r directory +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile )" -echo shortrec.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo sparse03.at:29 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -23886,20 +32853,22 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --length 1000 --file begin +genfile --length 1000 --file end +genfile --sparse --file sparsefile --block-size 512 8G A || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -rm -r directory +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -23908,76 +32877,80 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +genfile --length 1000 --file begin +genfile --length 1000 --file end +genfile --sparse --file sparsefile --block-size 512 8G A || exit 77 +tar -c -f archive --sparse begin sparsefile end || exit 1 +echo separator -rm -r directory +tar tfv archive +echo separator +mkdir directory +tar Cxf directory archive +genfile --stat=name,size sparsefile +cmp sparsefile directory/sparsefile ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo stdout:; tee stdout <"$at_stdout" +at_func_check_status 0 $at_status "$at_srcdir/sparse03.at:29" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon + + + +cat >stdout.re <<'_ATEOF' +separator +-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin +-rw-r--r-- ^ ^ * *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile +-rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end +separator +sparsefile 8589935104 +_ATEOF + +awk '{print NR " " $0}' stdout > $$.1 +awk '{print NR " " $0}' stdout.re | join - $$.1 | +while read NUM RE LINE +do + echo "$LINE" | grep -- "$RE" >/dev/null || exit 1 +done $at_traceoff -echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo shortrec.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_91 +#AT_START_92 +# 92. sparsemv.at:21: sparse files in MV archives +at_setup_line='sparsemv.at:21' +at_desc="sparse files in MV archives" +$at_quiet $as_echo_n " 92: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "92. sparsemv.at:21: testing ..." + $at_traceon -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +# Check if sparse files are correctly split between GNU multi-volume +# archives. +# There are two cases: the file can be split within an empty (null) block, +# or within a data block. Since null blocks are not archived, the first +# case means the file is split between two consecutive data blocks. +# - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon -$at_traceoff -echo "$at_srcdir/shortrec.at:28: + { $at_traceoff +$as_echo "$at_srcdir/sparsemv.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -23986,24 +32959,30 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo \"Pass 1: Split between data blocks\" +echo \"Create archive\" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo \"Test archive\" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo \"Compare archive\" +tar --record-size=512 -d -M -f arc.1 -f arc.2 -rm -r directory +echo \"Pass 2: Split within a data block\" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo \"Create archive\" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo \"Test archive\" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo \"Compare archive\" +tar --record-size=512 -d -M -f arc.1 -f arc.2 )" -echo shortrec.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo sparsemv.at:31 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24012,20 +32991,28 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 -rm -r directory +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -24034,615 +33021,684 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir directory -(cd directory && touch a b c d e f g h i j k l m n o p q r) -tar -c -b 1 -f - directory | tar -t -f - -tar -c -b 1 -f archive directory -tar -t -f archive -tar -t -f - < archive +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 -rm -r directory +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo stderr:; tee stderr <"$at_stderr" -echo stdout:; cat "$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks +Create archive +Test archive +sparsefile +Compare archive +Pass 2: Split within a data block +Create archive +Test archive +sparsefile +Compare archive +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/sparsemv.at:31" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi + { $at_traceoff +$as_echo "$at_srcdir/sparsemv.at:31: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -$at_traceon +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo \"Pass 1: Split between data blocks\" +echo \"Create archive\" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo \"Test archive\" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo \"Compare archive\" +tar --record-size=512 -d -M -f arc.1 -f arc.2 +echo \"Pass 2: Split within a data block\" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo \"Create archive\" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo \"Test archive\" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo \"Compare archive\" +tar --record-size=512 -d -M -f arc.1 -f arc.2 +)" +echo sparsemv.at:31 >"$at_check_line_file" - $at_traceoff -echo "$at_srcdir/shortrec.at:28: grep -v '^.*tar: Record size = ' stderr; exit 0" -echo shortrec.at:28 >"$at_check_line_file" +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * -at_trace_this= -if test -n "$at_traceon"; then - at_trace_this=yes -fi +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 -if test -n "$at_trace_this"; then - ( $at_traceon; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? else - ( :; grep -v '^.*tar: Record size = ' stderr; exit 0 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi - -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortrec.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - - - - - - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 57 ) # 57. sparse01.at:21: sparse files - at_setup_line='sparse01.at:21' - at_desc="sparse files" - $at_quiet $ECHO_N " 57: sparse files $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "57. sparse01.at:21: testing ..." - $at_traceon - - - - - - $at_traceoff -echo "$at_srcdir/sparse01.at:24: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + ( :; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator - -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -)" -echo sparse01.at:24 >"$at_check_line_file" +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 +echo "Test archive" +tar --record-size=512 -t -M -f arc.1 -f arc.2 +echo "Compare archive" +tar --record-size=512 -d -M -f arc.1 -f arc.2 +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks +Create archive +Test archive +sparsefile +Compare archive +Pass 2: Split within a data block +Create archive +Test archive +sparsefile +Compare archive +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/sparsemv.at:31" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * +$at_failed && at_func_log_failure +$at_traceon; } -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" -else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix -export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" -export TAR_OPTIONS -rm -rf * -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_92 +#AT_START_93 +# 93. spmvp00.at:21: sparse files in PAX MV archives, v.0.0 +at_setup_line='spmvp00.at:21' +at_desc="sparse files in PAX MV archives, v.0.0" +$at_quiet $as_echo_n " 93: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "93. spmvp00.at:21: testing ..." + $at_traceon -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon - $at_traceoff -echo "$at_srcdir/sparse01.at:24: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + + { $at_traceoff +$as_echo "$at_srcdir/spmvp00.at:24: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H pax\" export TAR_OPTIONS rm -rf * -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77 +echo \"Pass 1: Split between data blocks\" +echo \"Create archive\" +tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile +echo \"Pass 2: Split within a data block\" +genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 +echo \"Create archive\" +tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 )" -echo sparse01.at:24 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo spmvp00.at:24 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + ( :; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks +Create archive +Test archive +sparsefile +Compare archive +Pass 2: Split within a data block +Create archive +Test archive +sparsefile +Compare archive +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/spmvp00.at:24" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon - $at_traceoff -echo "$at_srcdir/sparse01.at:24: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_93 +#AT_START_94 +# 94. spmvp01.at:21: sparse files in PAX MV archives, v.0.1 +at_setup_line='spmvp01.at:21' +at_desc="sparse files in PAX MV archives, v.0.1" +$at_quiet $as_echo_n " 94: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "94. spmvp01.at:21: testing ..." + $at_traceon + + + + + + + { $at_traceoff +$as_echo "$at_srcdir/spmvp01.at:24: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" +TAR_OPTIONS=\"-H pax\" export TAR_OPTIONS rm -rf * -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo \"Pass 1: Split between data blocks\" +echo \"Create archive\" +tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile +echo \"Pass 2: Split within a data block\" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo \"Create archive\" +tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 )" -echo sparse01.at:24 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo spmvp01.at:24 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu + ( :; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H oldgnu" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * -genfile --length 1000 -f begin -genfile --length 1000 -f end -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -tar tfv archive -echo separator -mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/sparse01.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - - - +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks +Create archive +Test archive +sparsefile +Compare archive +Pass 2: Split within a data block +Create archive +Test archive +sparsefile +Compare archive +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/spmvp01.at:24" -cat >stdout.re <<'_ATEOF' -separator --rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin --rw-r--r-- ^ ^ * *10344448 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile --rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end -separator -sparsefile 10344448 -_ATEOF +$at_failed && at_func_log_failure +$at_traceon; } -awk '{print NR " " $0}' stdout > $$.1 -awk '{print NR " " $0}' stdout.re | join - $$.1 | -while read NUM RE LINE -do - echo "$LINE" | grep -- "$RE" >/dev/null || exit 1 -done - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 58 ) # 58. sparse02.at:21: extracting sparse file over a pipe - at_setup_line='sparse02.at:21' - at_desc="extracting sparse file over a pipe" - $at_quiet $ECHO_N " 58: extracting sparse file over a pipe $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_94 +#AT_START_95 +# 95. spmvp10.at:21: sparse files in PAX MV archives, v.1.0 +at_setup_line='spmvp10.at:21' +at_desc="sparse files in PAX MV archives, v.1.0" +$at_quiet $as_echo_n " 95: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "58. sparse02.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "95. spmvp10.at:21: testing ..." + $at_traceon -# Tar 1.14 - 1.15.1 was unable to extract sparse files to a pipe. -# References: <16896.21739.460782.124775@jik.kamens.brookline.ma.us> -# http://lists.gnu.org/archive/html/bug-tar/2005-02/msg00003.html - $at_traceoff -echo "$at_srcdir/sparse02.at:28: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + { $at_traceoff +$as_echo "$at_srcdir/spmvp10.at:24: +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H posix\" +TAR_OPTIONS=\"-H pax\" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 +echo \"Pass 1: Split between data blocks\" +echo \"Create archive\" +tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy +echo \"Pass 2: Split within a data block\" +genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77 +echo \"Create archive\" +tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo \"Test archive\" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo \"Compare archive\" +tar -d -M -f arc.1 -f arc.2 -f arc.3 )" -echo sparse02.at:28 >"$at_check_line_file" - -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo spmvp10.at:24 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + ( :; +mkdir pax +(cd pax +TEST_TAR_FORMAT=pax export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H pax" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator +exec <&- +genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 +echo "Pass 1: Split between data blocks" +echo "Create archive" +tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy +echo "Pass 2: Split within a data block" +genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77 +echo "Create archive" +tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile +echo "Test archive" +tar -t -M -f arc.1 -f arc.2 -f arc.3 +echo "Compare archive" +tar -d -M -f arc.1 -f arc.2 -f arc.3 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Pass 1: Split between data blocks +Create archive +Test archive +sparsefile +Compare archive +Pass 2: Split within a data block +Create archive +Test archive +sparsefile +Compare archive +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/spmvp10.at:24" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon - $at_traceoff -echo "$at_srcdir/sparse02.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_95 +#AT_START_96 +# 96. update.at:28: update unchanged directories +at_setup_line='update.at:28' +at_desc="update unchanged directories" +$at_quiet $as_echo_n " 96: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "96. update.at:28: testing ..." + $at_traceon + + + + + + { $at_traceoff +$as_echo "$at_srcdir/update.at:31: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS=\"-H v7\" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy -)" -echo sparse02.at:28 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +)" +echo update.at:31 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator - -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 - echo 1 > "$at_status_file" - exit 1 +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +directory/ +directory/file1 +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update.at:31" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/sparse02.at:28: + { $at_traceoff +$as_echo "$at_srcdir/update.at:31: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -24651,22 +33707,24 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy -)" -echo sparse02.at:28 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +)" +echo update.at:31 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -24675,18 +33733,22 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -24695,66 +33757,126 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL || exit 77 -tar -c -f archive --sparse sparsefile || exit 1 -echo separator -tar xfO archive | cat - > sparsecopy || exit 1 -cmp sparsefile sparsecopy +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/sparse02.at:28: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +directory/ +directory/file1 +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update.at:31" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi + { $at_traceoff +$as_echo "$at_srcdir/update.at:31: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * -$at_traceon +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +)" +echo update.at:31 >"$at_check_line_file" - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * - 59 ) # 59. sparse03.at:21: storing sparse files > 8G - at_setup_line='sparse03.at:21' - at_desc="storing sparse files > 8G" - $at_quiet $ECHO_N " 59: storing sparse files > 8G $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "59. sparse03.at:21: testing ..." - $at_traceon +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * -# Tar 1.15.1 incorrectly computed sparse member size if the extended -# PAX header contained size keyword. -# References: <87vf46nb36.fsf@penguin.cs.ucla.edu> -# http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 - $at_traceoff -echo "$at_srcdir/sparse03.at:29: +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +directory/ +directory/file1 +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update.at:31" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/update.at:31: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -24763,275 +33885,302 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -genfile --length 1000 --file begin -genfile --length 1000 --file end -genfile --sparse --file sparsefile --block-size 512 8G A || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 echo separator +tar tf archive | sort || exit 1 +)" +echo update.at:31 >"$at_check_line_file" -tar tfv archive +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile -)" -echo sparse03.at:29 >"$at_check_line_file" +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +directory/ +directory/file1 +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update.at:31" + +$at_failed && at_func_log_failure +$at_traceon; } + + { $at_traceoff +$as_echo "$at_srcdir/update.at:31: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir directory +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 +)" +echo update.at:31 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile --length 1000 --file begin -genfile --length 1000 --file end -genfile --sparse --file sparsefile --block-size 512 8G A || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator -tar tfv archive -echo separator +test -z "`sort < /dev/null 2>&1`" || exit 77 + mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H posix" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -genfile --length 1000 --file begin -genfile --length 1000 --file end -genfile --sparse --file sparsefile --block-size 512 8G A || exit 77 -tar -c -f archive --sparse begin sparsefile end || exit 1 -echo separator -tar tfv archive -echo separator +test -z "`sort < /dev/null 2>&1`" || exit 77 + mkdir directory -tar Cxf directory archive -genfile --stat=name,size sparsefile -cmp sparsefile directory/sparsefile +genfile --length 10240 --pattern zeros --file directory/file1 +genfile --length 10240 --pattern default --file directory/file2 + +tar cf archive directory || exit 1 +echo separator +tar uf archive directory || exit 1 +echo separator +tar tf archive | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo stdout:; tee stdout <"$at_stdout" -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/sparse03.at:29: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +separator +directory/ +directory/file1 +directory/file2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update.at:31" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi -$at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_96 +#AT_START_97 +# 97. update01.at:29: update directories +at_setup_line='update01.at:29' +at_desc="update directories" +$at_quiet $as_echo_n " 97: $at_desc " +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "97. update01.at:29: testing ..." + $at_traceon -cat >stdout.re <<'_ATEOF' -separator --rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 begin --rw-r--r-- ^ ^ * *8589935104 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 sparsefile --rw-r--r-- ^ ^ * *1000 0-90-90-90-9-0-90-9-0-90-9 0-90-9:0-90-9 end -separator -sparsefile 8589935104 -_ATEOF -awk '{print NR " " $0}' stdout > $$.1 -awk '{print NR " " $0}' stdout.re | join - $$.1 | -while read NUM RE LINE -do - echo "$LINE" | grep -- "$RE" >/dev/null || exit 1 -done + { $at_traceoff +$as_echo "$at_srcdir/update01.at:32: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 60 ) # 60. sparsemv.at:21: sparse files in MV archives - at_setup_line='sparsemv.at:21' - at_desc="sparse files in MV archives" - $at_quiet $ECHO_N " 60: sparse files in MV archives $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "60. sparsemv.at:21: testing ..." - $at_traceon +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir a +genfile --file a/b +tar cf arc a -# Check if sparse files are correctly split between GNU multi-volume -# archives. -# There are two cases: the file can be split within an empty (null) block, -# or within a data block. Since null blocks are not archived, the first -# case means the file is split between two consecutive data blocks. -# +echo \"separator\" +sleep 2 +genfile --file a/c +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +echo update01.at:32 >"$at_check_line_file" - $at_traceoff -echo "$at_srcdir/sparsemv.at:31: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 -echo \"Pass 1: Split between data blocks\" -echo \"Create archive\" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo \"Test archive\" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo \"Compare archive\" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -echo \"Pass 2: Split within a data block\" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo \"Create archive\" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo \"Test archive\" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo \"Compare archive\" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -)" -echo sparsemv.at:31 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +mkdir a +genfile --file a/b -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" -export TAR_OPTIONS -rm -rf * +tar cf arc a -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 +echo "separator" -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + ( :; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 export TEST_TAR_FORMAT -TAR_OPTIONS="-H gnu" +TAR_OPTIONS="-H v7" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Pass 1: Split between data blocks -Create archive -Test archive -sparsefile -Compare archive -Pass 2: Split within a data block -Create archive -Test archive -sparsefile -Compare archive -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/sparsemv.at:31: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +mkdir a +genfile --file a/b +tar cf arc a - echo 1 > "$at_status_file" - exit 1 +echo "separator" + +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/c +separator +a/ +a/b +a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update01.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/sparsemv.at:31: + { $at_traceoff +$as_echo "$at_srcdir/update01.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -25040,34 +34189,28 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 -echo \"Pass 1: Split between data blocks\" -echo \"Create archive\" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo \"Test archive\" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo \"Compare archive\" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -echo \"Pass 2: Split within a data block\" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo \"Create archive\" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo \"Test archive\" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo \"Compare archive\" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -)" -echo sparsemv.at:31 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +mkdir a +genfile --file a/b + +tar cf arc a + +echo \"separator\" + +sleep 2 +genfile --file a/c + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +echo update01.at:32 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -25076,30 +34219,26 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 +test -z "`sort < /dev/null 2>&1`" || exit 77 + +mkdir a +genfile --file a/b + +tar cf arc a + +echo "separator" + +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -25108,547 +34247,372 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1 -echo "Test archive" -tar --record-size=512 -t -M -f arc.1 -f arc.2 -echo "Compare archive" -tar --record-size=512 -d -M -f arc.1 -f arc.2 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Pass 1: Split between data blocks -Create archive -Test archive -sparsefile -Compare archive -Pass 2: Split within a data block -Create archive -Test archive -sparsefile -Compare archive -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/sparsemv.at:31: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +mkdir a +genfile --file a/b +tar cf arc a - echo 1 > "$at_status_file" - exit 1 -fi +echo "separator" -$at_traceon +sleep 2 +genfile --file a/c +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/c +separator +a/ +a/b +a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update01.at:32" +$at_failed && at_func_log_failure +$at_traceon; } + { $at_traceoff +$as_echo "$at_srcdir/update01.at:32: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 61 ) # 61. spmvp00.at:21: sparse files in PAX MV archives, v.0.0 - at_setup_line='spmvp00.at:21' - at_desc="sparse files in PAX MV archives, v.0.0" - $at_quiet $ECHO_N " 61: sparse files in PAX MV archives, v.0.0 $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "61. spmvp00.at:21: testing ..." - $at_traceon +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir a +genfile --file a/b +tar cf arc a +echo \"separator\" +sleep 2 +genfile --file a/c +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +echo update01.at:32 >"$at_check_line_file" - $at_traceoff -echo "$at_srcdir/spmvp00.at:24: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77 -echo \"Pass 1: Split between data blocks\" -echo \"Create archive\" -tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo \"Test archive\" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo \"Compare archive\" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -echo \"Pass 2: Split within a data block\" -genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 -echo \"Create archive\" -tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo \"Test archive\" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo \"Compare archive\" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -)" -echo spmvp00.at:24 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +mkdir a +genfile --file a/b -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * +tar cf arc a -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 +echo "separator" -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax + ( :; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" +TAR_OPTIONS="-H ustar" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHI 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse --sparse-version=0.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 12 blocks -tar: Record size = 12 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Pass 1: Split between data blocks -Create archive -Test archive -sparsefile -Compare archive -Pass 2: Split within a data block -Create archive -Test archive -sparsefile -Compare archive -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/spmvp00.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +mkdir a +genfile --file a/b +tar cf arc a - echo 1 > "$at_status_file" - exit 1 -fi +echo "separator" -$at_traceon +sleep 2 +genfile --file a/c +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/c +separator +a/ +a/b +a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update01.at:32" +$at_failed && at_func_log_failure +$at_traceon; } + { $at_traceoff +$as_echo "$at_srcdir/update01.at:32: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 62 ) # 62. spmvp01.at:21: sparse files in PAX MV archives, v.0.1 - at_setup_line='spmvp01.at:21' - at_desc="sparse files in PAX MV archives, v.0.1" - $at_quiet $ECHO_N " 62: sparse files in PAX MV archives, v.0.1 $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "62. spmvp01.at:21: testing ..." - $at_traceon +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir a +genfile --file a/b +tar cf arc a +echo \"separator\" +sleep 2 +genfile --file a/c +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +echo update01.at:32 >"$at_check_line_file" - $at_traceoff -echo "$at_srcdir/spmvp01.at:24: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 -echo \"Pass 1: Split between data blocks\" -echo \"Create archive\" -tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo \"Test archive\" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo \"Compare archive\" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -echo \"Pass 2: Split within a data block\" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo \"Create archive\" -tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo \"Test archive\" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo \"Compare archive\" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -)" -echo spmvp01.at:24 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +mkdir a +genfile --file a/b -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * +tar cf arc a -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 +echo "separator" + +sleep 2 +genfile --file a/c -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax + ( :; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse --sparse-version=0.1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 12 blocks -tar: Record size = 12 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Pass 1: Split between data blocks -Create archive -Test archive -sparsefile -Compare archive -Pass 2: Split within a data block -Create archive -Test archive -sparsefile -Compare archive -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/spmvp01.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +mkdir a +genfile --file a/b +tar cf arc a - echo 1 > "$at_status_file" - exit 1 -fi +echo "separator" -$at_traceon +sleep 2 +genfile --file a/c +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/c +separator +a/ +a/b +a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update01.at:32" +$at_failed && at_func_log_failure +$at_traceon; } + { $at_traceoff +$as_echo "$at_srcdir/update01.at:32: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 63 ) # 63. spmvp10.at:21: sparse files in PAX MV archives, v.1.0 - at_setup_line='spmvp10.at:21' - at_desc="sparse files in PAX MV archives, v.1.0" - $at_quiet $ECHO_N " 63: sparse files in PAX MV archives, v.1.0 $ECHO_C" - at_xfail=no - test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "63. spmvp10.at:21: testing ..." - $at_traceon +test -z "`sort < /dev/null 2>&1`" || exit 77 +mkdir a +genfile --file a/b +tar cf arc a +echo \"separator\" +sleep 2 +genfile --file a/c +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +echo update01.at:32 >"$at_check_line_file" - $at_traceoff -echo "$at_srcdir/spmvp10.at:24: -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H pax\" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 -echo \"Pass 1: Split between data blocks\" -echo \"Create archive\" -tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo \"Test archive\" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo \"Compare archive\" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -echo \"Pass 2: Split within a data block\" -genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77 -echo \"Create archive\" -tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo \"Test archive\" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo \"Compare archive\" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -)" -echo spmvp10.at:24 >"$at_check_line_file" +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +mkdir a +genfile --file a/b -if test -n "$at_trace_this"; then - ( $at_traceon; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax -export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" -export TAR_OPTIONS -rm -rf * +tar cf arc a -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 +echo "separator" -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; -mkdir pax -(cd pax -TEST_TAR_FORMAT=pax + ( :; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu export TEST_TAR_FORMAT -TAR_OPTIONS="-H pax" +TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -exec <&- -genfile --sparse --file sparsefile 0 ABCDEFGH 1M ABCDEFGHI || exit 77 -echo "Pass 1: Split between data blocks" -echo "Create archive" -tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -echo "Pass 2: Split within a data block" -genfile --sparse --file sparsefile 0 ABCDEFG 1M ABCDEFGHI || exit 77 -echo "Create archive" -tar --sparse --sparse-version=1.0 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile -echo "Test archive" -tar -t -M -f arc.1 -f arc.2 -f arc.3 -echo "Compare archive" -tar -d -M -f arc.1 -f arc.2 -f arc.3 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +test -z "`sort < /dev/null 2>&1`" || exit 77 -at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 12 blocks -tar: Record size = 12 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Pass 1: Split between data blocks -Create archive -Test archive -sparsefile -Compare archive -Pass 2: Split within a data block -Create archive -Test archive -sparsefile -Compare archive -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/spmvp10.at:24: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +mkdir a +genfile --file a/b +tar cf arc a - echo 1 > "$at_status_file" - exit 1 -fi +echo "separator" -$at_traceon +sleep 2 +genfile --file a/c + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/c +separator +a/ +a/b +a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update01.at:32" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 64 ) # 64. update.at:27: update unchanged directories - at_setup_line='update.at:27' - at_desc="update unchanged directories" - $at_quiet $ECHO_N " 64: update unchanged directories $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_97 +#AT_START_98 +# 98. update02.at:26: update changed files +at_setup_line='update02.at:26' +at_desc="update changed files" +$at_quiet $as_echo_n " 98: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "64. update.at:27: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "98. update02.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/update.at:30: + { $at_traceoff +$as_echo "$at_srcdir/update02.at:29: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -25660,25 +34624,25 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -)" -echo update.at:30 >"$at_check_line_file" +tar cf arc a -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo \"separator\" + +sleep 2 +touch a/b + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +echo update02.at:29 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -25690,21 +34654,23 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 +tar cf arc a + +echo "separator" + +sleep 2 +touch a/b + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -25716,44 +34682,39 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +tar cf arc a -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator -separator -directory/ -directory/file1 -directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo "separator" +sleep 2 +touch a/b - echo 1 > "$at_status_file" - exit 1 +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/b +separator +a/ +a/b +a/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update02.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/update.at:30: + { $at_traceoff +$as_echo "$at_srcdir/update02.at:29: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -25765,25 +34726,25 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b + +tar cf arc a + +echo \"separator\" -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -)" -echo update.at:30 >"$at_check_line_file" +sleep 2 +touch a/b -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +echo update02.at:29 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -25795,21 +34756,23 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 +tar cf arc a + +echo "separator" + +sleep 2 +touch a/b + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -25821,44 +34784,39 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +tar cf arc a -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator -separator -directory/ -directory/file1 -directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo "separator" +sleep 2 +touch a/b - echo 1 > "$at_status_file" - exit 1 +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/b +separator +a/ +a/b +a/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update02.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/update.at:30: + { $at_traceoff +$as_echo "$at_srcdir/update02.at:29: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -25870,25 +34828,25 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -)" -echo update.at:30 >"$at_check_line_file" +tar cf arc a -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo \"separator\" -if test -n "$at_trace_this"; then - ( $at_traceon; +sleep 2 +touch a/b + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +echo update02.at:29 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -25900,21 +34858,23 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 +tar cf arc a + +echo "separator" + +sleep 2 +touch a/b + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -25926,44 +34886,39 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +tar cf arc a -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator -separator -directory/ -directory/file1 -directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo "separator" +sleep 2 +touch a/b - echo 1 > "$at_status_file" - exit 1 +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/b +separator +a/ +a/b +a/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update02.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/update.at:30: + { $at_traceoff +$as_echo "$at_srcdir/update02.at:29: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -25975,25 +34930,25 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -)" -echo update.at:30 >"$at_check_line_file" +tar cf arc a -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo \"separator\" + +sleep 2 +touch a/b -if test -n "$at_trace_this"; then - ( $at_traceon; +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +echo update02.at:29 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26005,21 +34960,23 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 +tar cf arc a + +echo "separator" + +sleep 2 +touch a/b + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26031,44 +34988,39 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +tar cf arc a -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator -separator -directory/ -directory/file1 -directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo "separator" +sleep 2 +touch a/b - echo 1 > "$at_status_file" - exit 1 +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/b +separator +a/ +a/b +a/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update02.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/update.at:30: + { $at_traceoff +$as_echo "$at_srcdir/update02.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26080,25 +35032,25 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -)" -echo update.at:30 >"$at_check_line_file" +tar cf arc a -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi +echo \"separator\" + +sleep 2 +touch a/b + +tar ufv arc a +echo \"separator\" +tar tf arc | sort || exit 1 +)" +echo update02.at:29 >"$at_check_line_file" -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26110,21 +35062,23 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 +tar cf arc a + +echo "separator" + +sleep 2 +touch a/b + +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26136,68 +35090,63 @@ rm -rf * test -z "`sort < /dev/null 2>&1`" || exit 77 -mkdir directory -genfile --length 10240 --pattern zeros --file directory/file1 -genfile --length 10240 --pattern default --file directory/file2 +mkdir a +genfile --file a/b -tar cf archive directory || exit 1 -echo separator -tar uf archive directory || exit 1 -echo separator -tar tf archive | sort || exit 1 -) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? -fi +tar cf arc a -at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator -separator -directory/ -directory/file1 -directory/file2 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/update.at:30: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +echo "separator" +sleep 2 +touch a/b - echo 1 > "$at_status_file" - exit 1 +tar ufv arc a +echo "separator" +tar tf arc | sort || exit 1 +) ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +a/b +separator +a/ +a/b +a/b +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/update02.at:29" -$at_traceon - +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 65 ) # 65. volume.at:23: volume - at_setup_line='volume.at:23' - at_desc="volume" - $at_quiet $ECHO_N " 65: volume $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_98 +#AT_START_99 +# 99. volume.at:23: volume +at_setup_line='volume.at:23' +at_desc="volume" +$at_quiet $as_echo_n " 99: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "65. volume.at:23: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "99. volume.at:23: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/volume.at:26: + { $at_traceoff +$as_echo "$at_srcdir/volume.at:26: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26224,13 +35173,9 @@ test \$? = 2 )" echo volume.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26255,11 +35200,9 @@ echo 1>&2 ----- tar xfV archive babel test $? = 2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26284,11 +35227,10 @@ echo 1>&2 ----- tar xfV archive babel test $? = 2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "----- +echo >>"$at_stderr"; $as_echo "----- tar: Volume \`label' does not match \`lab' tar: Error is not recoverable: exiting now ----- @@ -26297,25 +35239,16 @@ tar: Error is not recoverable: exiting now ----- tar: Volume \`label' does not match \`babel' tar: Error is not recoverable: exiting now -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/volume.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/volume.at:26" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/volume.at:26: + { $at_traceoff +$as_echo "$at_srcdir/volume.at:26: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26342,13 +35275,9 @@ test \$? = 2 )" echo volume.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26373,11 +35302,9 @@ echo 1>&2 ----- tar xfV archive babel test $? = 2 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26402,11 +35329,10 @@ echo 1>&2 ----- tar xfV archive babel test $? = 2 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "----- +echo >>"$at_stderr"; $as_echo "----- tar: Volume \`label' does not match \`lab' tar: Error is not recoverable: exiting now ----- @@ -26415,49 +35341,40 @@ tar: Error is not recoverable: exiting now ----- tar: Volume \`label' does not match \`babel' tar: Error is not recoverable: exiting now -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/volume.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/volume.at:26" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 66 ) # 66. volsize.at:29: volume header size - at_setup_line='volsize.at:29' - at_desc="volume header size" - $at_quiet $ECHO_N " 66: volume header size $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_99 +#AT_START_100 +# 100. volsize.at:29: volume header size +at_setup_line='volsize.at:29' +at_desc="volume header size" +$at_quiet $as_echo_n "100: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "66. volsize.at:29: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "100. volsize.at:29: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/volsize.at:32: + { $at_traceoff +$as_echo "$at_srcdir/volsize.at:32: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -26483,13 +35400,9 @@ find abc|sort )" echo volsize.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -26513,11 +35426,9 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -26541,14 +35452,11 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 5 blocks -tar: Record size = 5 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Short Listing +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing abc/not-a-file.gif abc/CCC Verbose Listing @@ -26557,24 +35465,15 @@ V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Heade Extracted directory abc abc/CCC -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/volsize.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/volsize.at:32: + { $at_traceoff +$as_echo "$at_srcdir/volsize.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26600,13 +35499,9 @@ find abc|sort )" echo volsize.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26630,11 +35525,9 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -26658,14 +35551,11 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 5 blocks -tar: Record size = 5 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Short Listing +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing abc/not-a-file.gif abc/CCC Verbose Listing @@ -26674,24 +35564,15 @@ V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Heade Extracted directory abc abc/CCC -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/volsize.at:32" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/volsize.at:32: + { $at_traceoff +$as_echo "$at_srcdir/volsize.at:32: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -26717,13 +35598,9 @@ find abc|sort )" echo volsize.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -26747,11 +35624,9 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -26775,14 +35650,11 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 5 blocks -tar: Record size = 5 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Short Listing +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing abc/not-a-file.gif abc/CCC Verbose Listing @@ -26791,24 +35663,15 @@ V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Heade Extracted directory abc abc/CCC -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/volsize.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/volsize.at:32: + { $at_traceoff +$as_echo "$at_srcdir/volsize.at:32: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26834,13 +35697,9 @@ find abc|sort )" echo volsize.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26864,11 +35723,9 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -26892,14 +35749,11 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 5 blocks -tar: Record size = 5 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Short Listing +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing abc/not-a-file.gif abc/CCC Verbose Listing @@ -26908,24 +35762,15 @@ V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Heade Extracted directory abc abc/CCC -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/volsize.at:32" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/volsize.at:32: + { $at_traceoff +$as_echo "$at_srcdir/volsize.at:32: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26951,13 +35796,9 @@ find abc|sort )" echo volsize.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -26981,11 +35822,9 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27009,14 +35848,11 @@ echo Extracted directory tar xf $TEST_DATA_DIR/abc.tar find abc|sort ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: Record size = 5 blocks -tar: Record size = 5 blocks -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "Short Listing +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "Short Listing abc/not-a-file.gif abc/CCC Verbose Listing @@ -27025,49 +35861,40 @@ V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Heade Extracted directory abc abc/CCC -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/volsize.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/volsize.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 67 ) # 67. comprec.at:21: compressed format recognition - at_setup_line='comprec.at:21' - at_desc="compressed format recognition" - $at_quiet $ECHO_N " 67: compressed format recognition $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_100 +#AT_START_101 +# 101. comprec.at:21: compressed format recognition +at_setup_line='comprec.at:21' +at_desc="compressed format recognition" +$at_quiet $as_echo_n "101: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "67. comprec.at:21: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "101. comprec.at:21: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/comprec.at:25: + { $at_traceoff +$as_echo "$at_srcdir/comprec.at:25: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27084,18 +35911,14 @@ echo \"separator\" tar cfz archive file1 echo \"separator\" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 )" echo comprec.at:25 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27112,14 +35935,12 @@ echo "separator" tar cfz archive file1 echo "separator" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27136,35 +35957,25 @@ echo "separator" tar cfz archive file1 echo "separator" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/comprec.at:25" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/comprec.at:25: + { $at_traceoff +$as_echo "$at_srcdir/comprec.at:25: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27181,18 +35992,14 @@ echo \"separator\" tar cfz archive file1 echo \"separator\" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 )" echo comprec.at:25 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27209,14 +36016,12 @@ echo "separator" tar cfz archive file1 echo "separator" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27233,35 +36038,25 @@ echo "separator" tar cfz archive file1 echo "separator" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/comprec.at:25" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/comprec.at:25: + { $at_traceoff +$as_echo "$at_srcdir/comprec.at:25: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27278,18 +36073,14 @@ echo \"separator\" tar cfz archive file1 echo \"separator\" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 )" echo comprec.at:25 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27306,14 +36097,12 @@ echo "separator" tar cfz archive file1 echo "separator" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27330,35 +36119,25 @@ echo "separator" tar cfz archive file1 echo "separator" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/comprec.at:25" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/comprec.at:25: + { $at_traceoff +$as_echo "$at_srcdir/comprec.at:25: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27375,18 +36154,14 @@ echo \"separator\" tar cfz archive file1 echo \"separator\" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 )" echo comprec.at:25 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27403,14 +36178,12 @@ echo "separator" tar cfz archive file1 echo "separator" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27427,35 +36200,25 @@ echo "separator" tar cfz archive file1 echo "separator" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/comprec.at:25" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/comprec.at:25: + { $at_traceoff +$as_echo "$at_srcdir/comprec.at:25: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27472,18 +36235,14 @@ echo \"separator\" tar cfz archive file1 echo \"separator\" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 )" echo comprec.at:25 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27500,14 +36259,12 @@ echo "separator" tar cfz archive file1 echo "separator" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27524,59 +36281,49 @@ echo "separator" tar cfz archive file1 echo "separator" mv file1 orig -tar xfv archive +tar xfv archive --warning=no-timestamp cmp orig file1 ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "separator +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator separator file1 -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/comprec.at:25: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/comprec.at:25" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 68 ) # 68. shortfile.at:26: short input files - at_setup_line='shortfile.at:26' - at_desc="short input files" - $at_quiet $ECHO_N " 68: short input files $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_101 +#AT_START_102 +# 102. shortfile.at:26: short input files +at_setup_line='shortfile.at:26' +at_desc="short input files" +$at_quiet $as_echo_n "102: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "68. shortfile.at:26: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "102. shortfile.at:26: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/shortfile.at:29: + { $at_traceoff +$as_echo "$at_srcdir/shortfile.at:29: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27590,13 +36337,9 @@ tar tf foo )" echo shortfile.at:29 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27608,11 +36351,9 @@ rm -rf * genfile --length 511 --file foo || exit 5 tar tf foo ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27624,55 +36365,45 @@ rm -rf * genfile --length 511 --file foo || exit 5 tar tf foo ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: This does not look like a tar archive +echo >>"$at_stderr"; $as_echo "tar: This does not look like a tar archive tar: Exiting with failure status due to previous errors -" | $at_diff - "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 2) ;; - *) echo "$at_srcdir/shortfile.at:29: exit code was $at_status, expected 2" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 2 $at_status "$at_srcdir/shortfile.at:29" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 69 ) # 69. shortupd.at:29: updating short archives - at_setup_line='shortupd.at:29' - at_desc="updating short archives" - $at_quiet $ECHO_N " 69: updating short archives $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_102 +#AT_START_103 +# 103. shortupd.at:29: updating short archives +at_setup_line='shortupd.at:29' +at_desc="updating short archives" +$at_quiet $as_echo_n "103: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "69. shortupd.at:29: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "103. shortupd.at:29: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/shortupd.at:32: + { $at_traceoff +$as_echo "$at_srcdir/shortupd.at:32: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27686,13 +36417,9 @@ tar uf archive foo )" echo shortupd.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27704,11 +36431,9 @@ rm -rf * touch foo tar uf archive foo ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -27720,29 +36445,18 @@ rm -rf * touch foo tar uf archive foo ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/shortupd.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/shortupd.at:32: + { $at_traceoff +$as_echo "$at_srcdir/shortupd.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27756,13 +36470,9 @@ tar uf archive foo )" echo shortupd.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27774,11 +36484,9 @@ rm -rf * touch foo tar uf archive foo ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27790,29 +36498,18 @@ rm -rf * touch foo tar uf archive foo ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/shortupd.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/shortupd.at:32: + { $at_traceoff +$as_echo "$at_srcdir/shortupd.at:32: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27826,13 +36523,9 @@ tar uf archive foo )" echo shortupd.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27844,11 +36537,9 @@ rm -rf * touch foo tar uf archive foo ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -27860,29 +36551,18 @@ rm -rf * touch foo tar uf archive foo ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/shortupd.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/shortupd.at:32: + { $at_traceoff +$as_echo "$at_srcdir/shortupd.at:32: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27896,13 +36576,9 @@ tar uf archive foo )" echo shortupd.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27914,11 +36590,9 @@ rm -rf * touch foo tar uf archive foo ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -27930,29 +36604,18 @@ rm -rf * touch foo tar uf archive foo ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/shortupd.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/shortupd.at:32: + { $at_traceoff +$as_echo "$at_srcdir/shortupd.at:32: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27966,13 +36629,9 @@ tar uf archive foo )" echo shortupd.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27984,11 +36643,9 @@ rm -rf * touch foo tar uf archive foo ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28000,53 +36657,42 @@ rm -rf * touch foo tar uf archive foo ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -$at_diff "$at_devnull" "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/shortupd.at:32: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/shortupd.at:32" +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - 70 ) # 70. truncate.at:29: truncate - at_setup_line='truncate.at:29' - at_desc="truncate" - $at_quiet $ECHO_N " 70: truncate $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_103 +#AT_START_104 +# 104. truncate.at:29: truncate +at_setup_line='truncate.at:29' +at_desc="truncate" +$at_quiet $as_echo_n "104: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "70. truncate.at:29: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "104. truncate.at:29: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/truncate.at:32: + { $at_traceoff +$as_echo "$at_srcdir/truncate.at:32: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28057,7 +36703,7 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: \$? echo separator sleep 1 @@ -28065,13 +36711,9 @@ genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar)" echo truncate.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28082,17 +36724,15 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: $? echo separator sleep 1 genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28103,43 +36743,34 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: $? echo separator sleep 1 genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "foo +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz Exit status: 1 separator foo foo: Mod time differs baz -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 1 $at_status "$at_srcdir/truncate.at:32" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/truncate.at:32: + { $at_traceoff +$as_echo "$at_srcdir/truncate.at:32: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28150,7 +36781,7 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: \$? echo separator sleep 1 @@ -28158,13 +36789,9 @@ genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar)" echo truncate.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28175,17 +36802,15 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: $? echo separator sleep 1 genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28196,43 +36821,34 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: $? echo separator sleep 1 genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "foo +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz Exit status: 1 separator foo foo: Mod time differs baz -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 1 $at_status "$at_srcdir/truncate.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/truncate.at:32: + { $at_traceoff +$as_echo "$at_srcdir/truncate.at:32: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28243,7 +36859,7 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: \$? echo separator sleep 1 @@ -28251,13 +36867,9 @@ genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar)" echo truncate.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28268,17 +36880,15 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: $? echo separator sleep 1 genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28289,43 +36899,34 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: $? echo separator sleep 1 genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "foo +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz Exit status: 1 separator foo foo: Mod time differs baz -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 1 $at_status "$at_srcdir/truncate.at:32" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/truncate.at:32: + { $at_traceoff +$as_echo "$at_srcdir/truncate.at:32: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28336,7 +36937,7 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: \$? echo separator sleep 1 @@ -28344,13 +36945,9 @@ genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar)" echo truncate.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28361,17 +36958,15 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: $? echo separator sleep 1 genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28382,43 +36977,34 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: $? echo separator sleep 1 genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "foo +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz Exit status: 1 separator foo foo: Mod time differs baz -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 1 $at_status "$at_srcdir/truncate.at:32" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/truncate.at:32: + { $at_traceoff +$as_echo "$at_srcdir/truncate.at:32: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28429,7 +37015,7 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: \$? echo separator sleep 1 @@ -28437,13 +37023,9 @@ genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar)" echo truncate.at:32 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28454,17 +37036,15 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: $? echo separator sleep 1 genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28475,67 +37055,58 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 49995k --truncate foo +genfile --run --checkpoint 10 --length 49995k --truncate foo -- tar --checkpoint -vcf bar foo baz echo Exit status: $? echo separator sleep 1 genfile --file foo --seek 49995k --length 5k --pattern=zeros tar dvf bar) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo: File shrank by 5120 bytes; padding with zeros -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "foo +echo >>"$at_stderr"; $as_echo "tar: foo: File shrank by 5120 bytes; padding with zeros +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz Exit status: 1 separator foo foo: Mod time differs baz -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/truncate.at:32: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 1 $at_status "$at_srcdir/truncate.at:32" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 71 ) # 71. grow.at:24: grow - at_setup_line='grow.at:24' - at_desc="grow" - $at_quiet $ECHO_N " 71: grow $ECHO_C" - at_xfail=no + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_104 +#AT_START_105 +# 105. grow.at:24: grow +at_setup_line='grow.at:24' +at_desc="grow" +$at_quiet $as_echo_n "105: $at_desc " +at_xfail=no test -f $XFAILFILE && at_xfail=yes - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "71. grow.at:24: testing ..." - $at_traceon +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "105. grow.at:24: testing ..." + $at_traceon - $at_traceoff -echo "$at_srcdir/grow.at:27: + { $at_traceoff +$as_echo "$at_srcdir/grow.at:27: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28546,18 +37117,13 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz )" echo grow.at:27 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28568,14 +37134,11 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -28586,35 +37149,25 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo: file changed as we read it -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "foo +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/grow.at:27: + { $at_traceoff +$as_echo "$at_srcdir/grow.at:27: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28625,18 +37178,13 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz )" echo grow.at:27 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28647,14 +37195,11 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -28665,35 +37210,25 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo: file changed as we read it -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "foo +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 1 $at_status "$at_srcdir/grow.at:27" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/grow.at:27: + { $at_traceoff +$as_echo "$at_srcdir/grow.at:27: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28704,18 +37239,13 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz )" echo grow.at:27 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28726,14 +37256,11 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -28744,35 +37271,25 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo: file changed as we read it -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "foo +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon - - $at_traceoff -echo "$at_srcdir/grow.at:27: + { $at_traceoff +$as_echo "$at_srcdir/grow.at:27: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28783,18 +37300,13 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz )" echo grow.at:27 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28805,14 +37317,11 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -28823,35 +37332,25 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo: file changed as we read it -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "foo +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then - - - echo 1 > "$at_status_file" - exit 1 -fi +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 1 $at_status "$at_srcdir/grow.at:27" -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff -echo "$at_srcdir/grow.at:27: + { $at_traceoff +$as_echo "$at_srcdir/grow.at:27: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28862,18 +37361,13 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \\ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz )" echo grow.at:27 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28884,14 +37378,11 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz ) ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -28902,58 +37393,443 @@ rm -rf * genfile --file foo --length 50000k genfile --file baz -genfile --run 'tar -vcf bar foo baz' --checkpoint 10 --length 1024 \ - --append foo +genfile --run --checkpoint 10 --length 1024 --append foo -- tar --checkpoint -vcf bar foo baz ) ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -echo >>"$at_stderr"; echo "tar: foo: file changed as we read it -" | $at_diff - "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "foo +echo >>"$at_stderr"; $as_echo "tar: foo: file changed as we read it +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "foo baz -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 1) ;; - *) echo "$at_srcdir/grow.at:27: exit code was $at_status, expected 1" - at_failed=:;; -esac -if $at_failed; then +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 1 $at_status "$at_srcdir/grow.at:27" +$at_failed && at_func_log_failure +$at_traceon; } - echo 1 > "$at_status_file" - exit 1 + + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_105 +#AT_START_106 +# 106. remfiles01.at:28: remove-files with compression +at_setup_line='remfiles01.at:28' +at_desc="remove-files with compression" +$at_quiet $as_echo_n "106: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "106. remfiles01.at:28: testing ..." + $at_traceon + + + +unset TAR_OPTIONS +{ $at_traceoff +$as_echo "$at_srcdir/remfiles01.at:32: + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir dir +cd dir +genfile --file a --length 0 +chmod 0 a +genfile --file b +mkdir c + +# Depending on when the SIGPIPE gets delivered, the invocation below +# may finish with either +# tar: a: Cannot write: Broken pipe +# or +# tar: Child returned status 2 + +tar -c -f a -z --remove-files b c 2>err +EC=\$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +# Gzip exit code is propagated to the shell. Usually it is +# 141. We convert all non-zero exits to 2 to make it predictable. +test \$EC && exit 2 +" +echo remfiles01.at:32 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir dir +cd dir +genfile --file a --length 0 +chmod 0 a +genfile --file b +mkdir c + +# Depending on when the SIGPIPE gets delivered, the invocation below +# may finish with either +# tar: a: Cannot write: Broken pipe +# or +# tar: Child returned status 2 + +tar -c -f a -z --remove-files b c 2>err +EC=$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +# Gzip exit code is propagated to the shell. Usually it is +# 141. We convert all non-zero exits to 2 to make it predictable. +test $EC && exit 2 + ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 && exit 77 + + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir dir +cd dir +genfile --file a --length 0 +chmod 0 a +genfile --file b +mkdir c + +# Depending on when the SIGPIPE gets delivered, the invocation below +# may finish with either +# tar: a: Cannot write: Broken pipe +# or +# tar: Child returned status 2 + +tar -c -f a -z --remove-files b c 2>err +EC=$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +# Gzip exit code is propagated to the shell. Usually it is +# 141. We convert all non-zero exits to 2 to make it predictable. +test $EC && exit 2 + ) >"$at_stdout" 2>"$at_stderr" fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Permission denied +tar (child): Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./b +./c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 2 $at_status "$at_srcdir/remfiles01.at:32" + +$at_failed && at_func_log_failure +$at_traceon; } -$at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_106 +#AT_START_107 +# 107. remfiles02.at:28: remove-files with compression: grand-child +at_setup_line='remfiles02.at:28' +at_desc="remove-files with compression: grand-child" +$at_quiet $as_echo_n "107: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "107. remfiles02.at:28: testing ..." + $at_traceon - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; +unset TAR_OPTIONS +{ $at_traceoff +$as_echo "$at_srcdir/remfiles02.at:32: + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir dir +cd dir +mkdir a +genfile --file b +mkdir c + +tar -c -f a -z --remove-files b c 2>err +EC=\$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +exit \$EC +" +echo remfiles02.at:32 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir dir +cd dir +mkdir a +genfile --file b +mkdir c + +tar -c -f a -z --remove-files b c 2>err +EC=$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +exit $EC + ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; + +cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 + + +test -z "`sort < /dev/null 2>&1`" || exit 77 + + +mkdir dir +cd dir +mkdir a +genfile --file b +mkdir c + +tar -c -f a -z --remove-files b c 2>err +EC=$? +sed -n '/(child)/p' err >&2 +rm err +find . | sort +exit $EC + ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "tar (child): a: Cannot open: Is a directory +tar (child): Error is not recoverable: exiting now +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./b +./c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 2 $at_status "$at_srcdir/remfiles02.at:32" + +$at_failed && at_func_log_failure +$at_traceon; } + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_107 +#AT_START_108 +# 108. remfiles03.at:28: remove-files with symbolic links +at_setup_line='remfiles03.at:28' +at_desc="remove-files with symbolic links" +$at_quiet $as_echo_n "108: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "108. remfiles03.at:28: testing ..." + $at_traceon + + - 72 ) # 72. gtarfail.at:21: gtarfail - at_setup_line='gtarfail.at:21' - at_desc="gtarfail" - $at_quiet $ECHO_N " 72: gtarfail $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "72. gtarfail.at:21: testing ..." - $at_traceon +{ $at_traceoff +$as_echo "$at_srcdir/remfiles03.at:31: +mkdir a +mkdir a/b +ln -s b a/c || exit 77 +tar --remove-files -cf a.tar a +genfile --stat a +" +echo remfiles03.at:31 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +mkdir a +mkdir a/b +ln -s b a/c || exit 77 +tar --remove-files -cf a.tar a +genfile --stat a + ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +mkdir a +mkdir a/b +ln -s b a/c || exit 77 +tar --remove-files -cf a.tar a +genfile --stat a + ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +echo >>"$at_stderr"; $as_echo "genfile: stat(a) failed: No such file or directory +" | \ + $at_diff - "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/remfiles03.at:31" + +$at_failed && at_func_log_failure +$at_traceon; } + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_108 +#AT_START_109 +# 109. sigpipe.at:19: sigpipe handling +at_setup_line='sigpipe.at:19' +at_desc="sigpipe handling" +$at_quiet $as_echo_n "109: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "109. sigpipe.at:19: testing ..." + $at_traceon + + + +# Description: Tar 1.23 ignored sigpipe which lead to spurious "write +# error" diagnostics when piping output to another programs. +# Reported-by: "Dmitry V. Levin" +# References: http://lists.gnu.org/archive/html/bug-tar/2010-03/msg00039.html +# <20100319184141.GC30047@wo.int.altlinux.org> + +{ $at_traceoff +$as_echo "$at_srcdir/sigpipe.at:28: +genfile --length 2048 --file first +genfile --length 2048 --file second +genfile --length 2049 --file third + +tar cf archive first second third + +tar tf archive | : +" +echo sigpipe.at:28 >"$at_check_line_file" + +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; +genfile --length 2048 --file first +genfile --length 2048 --file second +genfile --length 2049 --file third + +tar cf archive first second third + +tar tf archive | : + ) >"$at_stdout" 2>"$at_stder1" + at_func_filter_trace $? +else + ( :; +genfile --length 2048 --file first +genfile --length 2048 --file second +genfile --length 2049 --file third + +tar cf archive first second third + +tar tf archive | : + ) >"$at_stdout" 2>"$at_stderr" +fi +at_status=$? +at_failed=false +at_func_diff_devnull "$at_stderr" || at_failed=: +at_func_diff_devnull "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/sigpipe.at:28" + +$at_failed && at_func_log_failure +$at_traceon; } + + + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_109 +#AT_START_110 +# 110. gtarfail.at:21: gtarfail +at_setup_line='gtarfail.at:21' +at_desc="gtarfail" +$at_quiet $as_echo_n "110: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "110. gtarfail.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/gtarfail.at:26: +{ $at_traceoff +$as_echo "$at_srcdir/gtarfail.at:26: test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 @@ -28963,13 +37839,9 @@ tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail.tar " echo gtarfail.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 @@ -28977,11 +37849,9 @@ tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $ tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 @@ -28989,56 +37859,46 @@ tarball_prereq gtarfail.tar bf7612e401aaa679edbb07ae1183811b $STAR_TESTSCRIPTS $ tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "-rw-r--r-- jes/glone 518 2001-05-25 14:41 vedpowered.gif +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "-rw-r--r-- jes/glone 518 2001-05-25 14:41 vedpowered.gif -rw-r--r-- jes/glone 6825 1997-04-29 00:19 cd.gif -rw-r--r-- jes/glone 33354 1999-06-22 12:17 DSCN0049c.JPG -rw-r--r-- jes/glone 86159 2001-06-05 18:16 Window1.jpg -rw-r--r-- jes/glone 1310 2001-05-25 13:05 vipower.gif -rw-rw-rw- jes/glone 148753 1998-09-15 13:08 billyboy.jpg -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/gtarfail.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/gtarfail.at:26" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 73 ) # 73. gtarfail2.at:21: gtarfail2 - at_setup_line='gtarfail2.at:21' - at_desc="gtarfail2" - $at_quiet $ECHO_N " 73: gtarfail2 $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "73. gtarfail2.at:21: testing ..." - $at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_110 +#AT_START_111 +# 111. gtarfail2.at:21: gtarfail2 +at_setup_line='gtarfail2.at:21' +at_desc="gtarfail2" +$at_quiet $as_echo_n "111: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "111. gtarfail2.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/gtarfail2.at:26: +{ $at_traceoff +$as_echo "$at_srcdir/gtarfail2.at:26: test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 @@ -29047,36 +37907,29 @@ tar --utc -tvf \$STAR_TESTSCRIPTS/gtarfail2.tar " echo gtarfail2.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gtarfail2.tar 6b607d1faec14b82f69525d9c5b66e53 $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "-rwxr-xr-x jes/glone 214 2001-09-21 14:08 .clean +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "-rwxr-xr-x jes/glone 214 2001-09-21 14:08 .clean lrwxrwxrwx jes/cats 0 1998-05-07 12:39 RULES -> makefiles/RULES drwxr-sr-x jes/glone 0 2001-12-10 00:00 build/ -rw-r--r-- jes/glone 312019 2001-12-10 00:00 build/smake-1.2.tar.gz @@ -29086,45 +37939,36 @@ drwxr-sr-x jes/glone 0 2001-11-09 18:20 build/psmake/ -rw-r--r-- jes/glone 647 2001-02-25 23:50 build/psmake/Makefile lrwxrwxrwx jes/glone 0 2001-08-29 10:53 build/psmake/archconf.c -> ../archconf.c lrwxrwxrwx jes/glone 0 2001-08-29 10:54 build/psmake/astoi.c -> ../../lib/astoi.c -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/gtarfail2.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/gtarfail2.at:26" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 74 ) # 74. multi-fail.at:21: multi-fail - at_setup_line='multi-fail.at:21' - at_desc="multi-fail" - $at_quiet $ECHO_N " 74: multi-fail $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "74. multi-fail.at:21: testing ..." - $at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_111 +#AT_START_112 +# 112. multi-fail.at:21: multi-fail +at_setup_line='multi-fail.at:21' +at_desc="multi-fail" +$at_quiet $as_echo_n "112: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "112. multi-fail.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/multi-fail.at:26: +{ $at_traceoff +$as_echo "$at_srcdir/multi-fail.at:26: test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 @@ -29139,13 +37983,9 @@ tar --utc -tvM -f \$STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \\ " echo multi-fail.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 @@ -29158,11 +37998,9 @@ tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STA tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \ -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&- ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; test -z "$STAR_TESTSCRIPTS" && exit 77 tarball_prereq gnu-multi-fail-volume1.gtar 7c28663dd98b0bd91ceb4be7af55254e $STAR_TESTSCRIPTS $STAR_DATA_URL || exit 77 @@ -29175,12 +38013,11 @@ tarball_prereq gnu-multi-fail-volume2.gtar b5d41c4c3ec440687d4a44957b5079a8 $STA tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \ -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar <&- ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false -$at_diff "$at_devnull" "$at_stderr" || at_failed=: -echo >>"$at_stdout"; echo "drwxrwsr-x joerg/bs 0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/ +at_func_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "drwxrwsr-x joerg/bs 0 2003-10-11 14:32 OBJ/i386-sunos5-gcc/ -rw-r--r-- joerg/bs 1 2003-10-11 14:32 OBJ/i386-sunos5-gcc/Dnull -rw-r--r-- joerg/bs 1743 2003-10-10 18:06 OBJ/i386-sunos5-gcc/star.d -rw-r--r-- joerg/bs 1460 2003-10-11 11:53 OBJ/i386-sunos5-gcc/header.d @@ -29232,45 +38069,36 @@ echo >>"$at_stdout"; echo "drwxrwsr-x joerg/bs 0 2003-10-11 14:32 OBJ/i -rw-r--r-- joerg/bs 2576 2003-10-10 18:07 OBJ/i386-sunos5-gcc/names.o -rw-r--r-- joerg/bs 952 2003-10-10 18:07 OBJ/i386-sunos5-gcc/movearch.o -rw-r--r-- joerg/bs 2756 2003-10-07 17:53 OBJ/i386-sunos5-gcc/table.o -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/multi-fail.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/multi-fail.at:26" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 75 ) # 75. ustar-big-2g.at:21: ustar-big-2g - at_setup_line='ustar-big-2g.at:21' - at_desc="ustar-big-2g" - $at_quiet $ECHO_N " 75: ustar-big-2g $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "75. ustar-big-2g.at:21: testing ..." - $at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_112 +#AT_START_113 +# 113. ustar-big-2g.at:21: ustar-big-2g +at_setup_line='ustar-big-2g.at:21' +at_desc="ustar-big-2g" +$at_quiet $as_echo_n "113: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "113. ustar-big-2g.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/ustar-big-2g.at:26: +{ $at_traceoff +$as_echo "$at_srcdir/ustar-big-2g.at:26: cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29283,13 +38111,9 @@ tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2 " echo ustar-big-2g.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29300,11 +38124,9 @@ tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTS tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29315,28 +38137,18 @@ tarball_prereq ustar-big-2g.tar.bz2 b63979733629c8fcdf40b60065422767 $STAR_TESTS tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big +echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 2147483647 2002-06-15 14:53 big -rw-r--r-- jes/glone 0 2002-06-15 14:53 file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/ustar-big-2g.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/ustar-big-2g.at:26" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } @@ -29352,28 +38164,28 @@ do done - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 76 ) # 76. ustar-big-8g.at:21: ustar-big-8g - at_setup_line='ustar-big-8g.at:21' - at_desc="ustar-big-8g" - $at_quiet $ECHO_N " 76: ustar-big-8g $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "76. ustar-big-8g.at:21: testing ..." - $at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_113 +#AT_START_114 +# 114. ustar-big-8g.at:21: ustar-big-8g +at_setup_line='ustar-big-8g.at:21' +at_desc="ustar-big-8g" +$at_quiet $as_echo_n "114: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "114. ustar-big-8g.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/ustar-big-8g.at:26: +{ $at_traceoff +$as_echo "$at_srcdir/ustar-big-8g.at:26: cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29386,13 +38198,9 @@ tar --utc -tvjf \$STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2 " echo ustar-big-8g.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29403,11 +38211,9 @@ tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTS tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29418,28 +38224,18 @@ tarball_prereq ustar-big-8g.tar.bz2 60ff503fa4b8288bef7ada89e9c91b0f $STAR_TESTS tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1 +echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 8589934591 2002-06-15 15:08 8gb-1 -rw-r--r-- jes/glone 0 2002-06-15 14:53 file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/ustar-big-8g.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/ustar-big-8g.at:26" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } @@ -29455,28 +38251,28 @@ do done - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - 77 ) # 77. pax-big-10g.at:21: pax-big-10g - at_setup_line='pax-big-10g.at:21' - at_desc="pax-big-10g" - $at_quiet $ECHO_N " 77: pax-big-10g $ECHO_C" - at_xfail=no - echo "# -*- compilation -*-" >> "$at_group_log" - ( - echo "77. pax-big-10g.at:21: testing ..." - $at_traceon + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_114 +#AT_START_115 +# 115. pax-big-10g.at:21: pax-big-10g +at_setup_line='pax-big-10g.at:21' +at_desc="pax-big-10g" +$at_quiet $as_echo_n "115: $at_desc " +at_xfail=no +echo "# -*- compilation -*-" >> "$at_group_log" +( + $as_echo "115. pax-big-10g.at:21: testing ..." + $at_traceon unset TAR_OPTIONS -$at_traceoff -echo "$at_srcdir/pax-big-10g.at:26: +{ $at_traceoff +$as_echo "$at_srcdir/pax-big-10g.at:26: cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29489,13 +38285,9 @@ tar --utc -tvjf \$STAR_TESTSCRIPTS/pax-big-10g.tar.bz2 " echo pax-big-10g.at:26 >"$at_check_line_file" -at_trace_this= -if test -n "$at_traceon"; then - echo 'Not enabling shell tracing (command contains an embedded newline)' -fi - -if test -n "$at_trace_this"; then - ( $at_traceon; +if { echo 'Not enabling shell tracing (command contains an embedded newline)' + false; }; then + ( $at_traceon; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29506,11 +38298,9 @@ tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSC tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2 ) >"$at_stdout" 2>"$at_stder1" - at_status=$? - grep '^ *+' "$at_stder1" >&2 - grep -v '^ *+' "$at_stder1" >"$at_stderr" + at_func_filter_trace $? else - ( :; + ( :; cat /dev/null | bzip2 - > /dev/null 2>&1 || exit 77 @@ -29521,28 +38311,18 @@ tarball_prereq pax-big-10g.tar.bz2 ca15c23acc8d8bb1f27e60113a5f8bff $STAR_TESTSC tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2 ) >"$at_stdout" 2>"$at_stderr" - at_status=$? fi - +at_status=$? at_failed=false echo stderr:; tee stderr <"$at_stderr" -echo >>"$at_stdout"; echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g +echo >>"$at_stdout"; $as_echo "-rw------- jes/glone 10737418240 2002-06-15 21:18 10g -rw-r--r-- jes/glone 0 2002-06-15 14:53 file -" | $at_diff - "$at_stdout" || at_failed=: -case $at_status in - 77) echo 77 > "$at_status_file"; exit 77;; - 0) ;; - *) echo "$at_srcdir/pax-big-10g.at:26: exit code was $at_status, expected 0" - at_failed=:;; -esac -if $at_failed; then - +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_func_check_status 0 $at_status "$at_srcdir/pax-big-10g.at:26" - echo 1 > "$at_status_file" - exit 1 -fi - -$at_traceon +$at_failed && at_func_log_failure +$at_traceon; } @@ -29558,315 +38338,8 @@ do done - $at_traceoff - $at_times_p && times >"$at_times_file" - ) 5>&1 2>&1 | eval $at_tee_pipe - at_status=`cat "$at_status_file"` - ;; - - - * ) - echo "$as_me: no such test group: $at_group" >&2 - continue - ;; - esac - - # Be sure to come back to the suite directory, in particular - # since below we might `rm' the group directory we are in currently. - cd "$at_suite_dir" - - case $at_group in - banner-*) ;; - *) - if test ! -f "$at_check_line_file"; then - sed "s/^ */$as_me: warning: /" <<_ATEOF - A failure happened in a test group before any test could be - run. This means that test suite is improperly designed. Please - report this failure to . -_ATEOF - echo "$at_setup_line" >"$at_check_line_file" - fi - at_group_count=`expr 1 + $at_group_count` - $at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C" - echo $ECHO_N "$at_group. $at_setup_line: $ECHO_C" >> "$at_group_log" - case $at_xfail:$at_status in - yes:0) - at_msg="UNEXPECTED PASS" - at_xpass_list="$at_xpass_list $at_group" - at_errexit=$at_errexit_p - ;; - no:0) - at_msg="ok" - at_pass_list="$at_pass_list $at_group" - at_errexit=false - ;; - *:77) - at_msg='skipped ('`cat "$at_check_line_file"`')' - at_skip_list="$at_skip_list $at_group" - at_errexit=false - ;; - yes:*) - at_msg='expected failure ('`cat "$at_check_line_file"`')' - at_xfail_list="$at_xfail_list $at_group" - at_errexit=false - ;; - no:*) - at_msg='FAILED ('`cat "$at_check_line_file"`')' - at_fail_list="$at_fail_list $at_group" - at_errexit=$at_errexit_p - ;; - esac - # Make sure there is a separator even with long titles. - echo " $at_msg" - at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" - case $at_status in - 0|77) - # $at_times_file is only available if the group succeeded. - # We're not including the group log, so the success message - # is written in the global log separately. But we also - # write to the group log in case they're using -d. - if test -f "$at_times_file"; then - at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')' - rm -f "$at_times_file" - fi - echo "$at_log_msg" >> "$at_group_log" - echo "$at_log_msg" >&5 - - # Cleanup the group directory, unless the user wants the files. - if $at_debug_p ; then - { - echo "#! /bin/sh" - echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' - echo "cd '$at_dir'" - echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \ - '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}' - echo 'exit 1' - } >$at_group_dir/run - chmod +x $at_group_dir/run - - elif test -d "$at_group_dir"; then - find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \; - rm -fr "$at_group_dir" - fi - ;; - *) - # Upon failure, include the log into the testsuite's global - # log. The failure message is written in the group log. It - # is later included in the global log. - echo "$at_log_msg" >> "$at_group_log" - - # Upon failure, keep the group directory for autopsy, and - # create the debugging script. - { - echo "#! /bin/sh" - echo 'test "${ZSH_VERSION+set}" = set && alias -g '\''${1+"$@"}'\''='\''"$@"'\''' - echo "cd '$at_dir'" - echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$0" \ - '-v -d' "$at_debug_args" "$at_group" '${1+"$@"}' - echo 'exit 1' - } >$at_group_dir/run - chmod +x $at_group_dir/run - - $at_errexit && break - ;; - esac - ;; - esac -done - -# Back to the top directory. -cd "$at_dir" - -# Compute the duration of the suite. -at_stop_date=`date` -at_stop_time=`date +%s 2>/dev/null` -echo "$as_me: ending at: $at_stop_date" >&5 -case $at_start_time,$at_stop_time in - [0-9]*,[0-9]*) - at_duration_s=`expr $at_stop_time - $at_start_time` - at_duration_m=`expr $at_duration_s / 60` - at_duration_h=`expr $at_duration_m / 60` - at_duration_s=`expr $at_duration_s % 60` - at_duration_m=`expr $at_duration_m % 60` - at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s" - echo "$as_me: test suite duration: $at_duration" >&5 - ;; -esac - -# Wrap up the test suite with summary statistics. -at_skip_count=`set dummy $at_skip_list; shift; echo $#` -at_fail_count=`set dummy $at_fail_list; shift; echo $#` -at_xpass_count=`set dummy $at_xpass_list; shift; echo $#` -at_xfail_count=`set dummy $at_xfail_list; shift; echo $#` - -at_run_count=`expr $at_group_count - $at_skip_count` -at_unexpected_count=`expr $at_xpass_count + $at_fail_count` -at_total_fail_count=`expr $at_xfail_count + $at_fail_count` - -echo -cat <<\_ASBOX -## ------------- ## -## Test results. ## -## ------------- ## -_ASBOX -echo -{ - echo - cat <<\_ASBOX -## ------------- ## -## Test results. ## -## ------------- ## -_ASBOX - echo -} >&5 - -if test $at_run_count = 1; then - at_result="1 test" - at_were=was -else - at_result="$at_run_count tests" - at_were=were -fi -if $at_errexit_p && test $at_unexpected_count != 0; then - if test $at_xpass_count = 1; then - at_result="$at_result $at_were run, one passed" - else - at_result="$at_result $at_were run, one failed" - fi - at_result="$at_result unexpectedly and inhibited subsequent tests." -else - # Don't you just love exponential explosion of the number of cases? - case $at_xpass_count:$at_fail_count:$at_xfail_count in - # So far, so good. - 0:0:0) at_result="$at_result $at_were successful." ;; - 0:0:*) at_result="$at_result behaved as expected." ;; - - # Some unexpected failures - 0:*:0) at_result="$at_result $at_were run, -$at_fail_count failed unexpectedly." ;; - - # Some failures, both expected and unexpected - 0:*:1) at_result="$at_result $at_were run, -$at_total_fail_count failed ($at_xfail_count expected failure)." ;; - 0:*:*) at_result="$at_result $at_were run, -$at_total_fail_count failed ($at_xfail_count expected failures)." ;; - - # No unexpected failures, but some xpasses - *:0:*) at_result="$at_result $at_were run, -$at_xpass_count passed unexpectedly." ;; - - # No expected failures, but failures and xpasses - *:1:0) at_result="$at_result $at_were run, -$at_unexpected_count did not behave as expected ($at_fail_count unexpected failure)." ;; - *:*:0) at_result="$at_result $at_were run, -$at_unexpected_count did not behave as expected ($at_fail_count unexpected failures)." ;; - - # All of them. - *:*:1) at_result="$at_result $at_were run, -$at_xpass_count passed unexpectedly, -$at_total_fail_count failed ($at_xfail_count expected failure)." ;; - *:*:*) at_result="$at_result $at_were run, -$at_xpass_count passed unexpectedly, -$at_total_fail_count failed ($at_xfail_count expected failures)." ;; - esac - - if test $at_skip_count = 0 && test $at_run_count -gt 1; then - at_result="All $at_result" - fi -fi - -# Now put skips in the mix. -case $at_skip_count in - 0) ;; - 1) at_result="$at_result -1 test was skipped." ;; - *) at_result="$at_result -$at_skip_count tests were skipped." ;; -esac - -if test $at_unexpected_count = 0; then - echo "$at_result" - echo "$at_result" >&5 -else - echo "ERROR: $at_result" >&2 - echo "ERROR: $at_result" >&5 - { - echo - cat <<\_ASBOX -## ------------------------ ## -## Summary of the failures. ## -## ------------------------ ## -_ASBOX - - # Summary of failed and skipped tests. - if test $at_fail_count != 0; then - echo "Failed tests:" - $SHELL "$0" $at_fail_list --list - echo - fi - if test $at_skip_count != 0; then - echo "Skipped tests:" - $SHELL "$0" $at_skip_list --list - echo - fi - if test $at_xpass_count != 0; then - echo "Unexpected passes:" - $SHELL "$0" $at_xpass_list --list - echo - fi - if test $at_fail_count != 0; then - cat <<\_ASBOX -## ---------------------- ## -## Detailed failed tests. ## -## ---------------------- ## -_ASBOX - echo - for at_group in $at_fail_list - do - at_group_normalized=$at_group - - while :; do - case $at_group_normalized in #( - $at_format*) break;; - esac - at_group_normalized=0$at_group_normalized - done - - cat "$at_suite_dir/$at_group_normalized/$as_me.log" - echo - done - echo - fi - if test -n "$at_top_srcdir"; then - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## ${at_top_build_prefix}config.log ## -_ASBOX - sed 's/^/| /' ${at_top_build_prefix}config.log - echo - fi - } >&5 - - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## $as_me.log was created. ## -_ASBOX - - echo - echo "Please send \`${at_testdir+${at_testdir}/}$as_me.log' and all information you think might help:" - echo - echo " To: " - echo " Subject: [GNU tar 1.22] $as_me:$at_fail_list${at_fail_list:+ failed${at_xpass_list:+,}}$at_xpass_list${at_xpass_list:+ passed unexpectedly}" - echo - if test $at_debug_p = false; then - echo - echo 'You may investigate any problem if you feel able to do so, in which' - echo 'case the test suite provides a good starting point. Its output may' - echo "be found below \`${at_testdir+${at_testdir}/}$as_me.dir'." - echo - fi - exit 1 -fi - -exit 0 - - - + $at_traceoff + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 | eval $at_tee_pipe +at_status=`cat "$at_status_file"` +#AT_STOP_115