X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=tests%2Ftestsuite;h=c1432b1681ad16be0b7dea8998006d1593a5ead0;hb=4aa85f09e755fc827cd5ab6225f20c83cd42245d;hp=907e52032e759945c49eccdd8cede6784991d1db;hpb=eb3ba7cb06fdd0f8627b8f117d8453e297e18b64;p=debian%2Ftar diff --git a/tests/testsuite b/tests/testsuite index 907e5203..c1432b16 100755 --- a/tests/testsuite +++ b/tests/testsuite @@ -610,166 +610,174 @@ at_help_all="1;version.at:19;tar version;; 18;T-nonl.at:27;entries with missing newlines;files-from nonewline nonl t-nonl; 19;indexfile.at:26;tar --index-file=FILE --file=-;stdout indexfile; 20;verbose.at:26;tar cvf -;stdout verbose; -21;gzip.at:23;gzip;gzip; +21;gzip.at:24;gzip;gzip; 22;recurse.at:21;recurse;recurse; -23;shortrec.at:25;short records;shortrec; -24;same-order01.at:26;working -C with --same-order;same-order same-order01; -25;same-order02.at:25;multiple -C options;same-order same-order02; -26;append.at:21;append;append append00; -27;append01.at:29;appending files with long names;append append01; -28;append02.at:54;append vs. create;append append02 append-gnu; -29;append03.at:21;append with name transformation;append append03; -30;append04.at:29;append with verify;append append04 verify append-verify; -31;xform-h.at:30;transforming hard links on create;transform xform xform-h; -32;xform01.at:26;transformations and GNU volume labels;transform xform xform01 volume; -33;exclude.at:23;exclude;exclude; -34;exclude01.at:19;exclude wildcards;exclude exclude01; -35;exclude02.at:19;exclude: anchoring;exclude exclude02; -36;exclude03.at:19;exclude: wildcards match slash;exclude exclude03; -37;exclude04.at:19;exclude: case insensitive;exclude exclude04; -38;exclude05.at:21;exclude: lots of excludes;exclude exclude05; -39;exclude06.at:26;exclude: long files in pax archives;exclude exclude06; -40;exclude07.at:19;exclude: --exclude-backups option;exclude exclude07; -41;exclude08.at:36;--exclude-tag option;exclude exclude-tag exclude08; -42;exclude09.at:37;--exclude-tag option and --listed-incremental;exclude exclude-tag listed incremental exclude09; -43;exclude10.at:38;--exclude-tag option in incremental pass;exclude exclude-tag listed incremental exclude10; -44;exclude11.at:36;--exclude-tag-under option;exclude exclude-tag exclude-tag-under exclude11; -45;exclude12.at:37;--exclude-tag-under and --listed-incremental;exclude exclude-tag exclude-tag-under listed incremental exclude12; -46;exclude13.at:39;--exclude-tag-under option in incremental pass;exclude exclude-tag exclude-tag-under listed incremental exclude13; -47;exclude14.at:36;--exclude-tag-all option;exclude exclude-tag exclude-tag-all exclude14; -48;exclude15.at:36;--exclude-tag-all and --listed-incremental;exclude exclude-tag exclude-tag-all listed incremental exclude15; -49;exclude16.at:38;--exclude-tag-all option in incremental pass;exclude exclude-tag exclude-tag-all listed incremental exclude16; -50;delete01.at:23;deleting a member after a big one;delete delete01; -51;delete02.at:23;deleting a member from stdin archive;delete delete02; -52;delete03.at:21;deleting members with long names;delete delete03; -53;delete04.at:23;deleting a large last member;delete delete04; -54;delete05.at:27;deleting non-existing member;delete delete05; -55;extrac01.at:23;extract over an existing directory;extract extract01; -56;extrac02.at:23;extracting symlinks over an existing file;extract extract02 symlink; -57;extrac03.at:23;extraction loops;extract extract03; -58;extrac04.at:23;extract + fnmatch;extract extract04 fnmatch; -59;extrac05.at:30;extracting selected members from pax;extract extract05; -60;extrac06.at:34;mode of extracted directories;extract extract06 directory mode; -61;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink; -62;extrac08.at:33;restoring mode on existing directory;extract extrac08; -63;extrac09.at:24;no need to save dir with unreadable . and ..;extract extrac09; -64;extrac10.at:29;-C and delayed setting of metadata;extract extrac10; -65;extrac11.at:25;scarce file descriptors;extract extrac11; -66;extrac12.at:25;extract dot permissions;extract extrac12; -67;extrac13.at:26;extract over symlinks;extract extrac13; -68;extrac14.at:25;extract -C symlink;extract extrac14; -69;extrac15.at:25;extract parent mkdir failure;extract extrac15; -70;extrac16.at:26;extract empty directory with -C;extract extrac16; -71;extrac17.at:21;name matching/transformation ordering;extract extrac17; -72;extrac18.at:34;keep-old-files;extract extrac18 old-files keep-old-files; -73;extrac19.at:21;skip-old-files;extract extrac19 old-files skip-old-files; -74;backup01.at:33;extracting existing dir with --backup;extract backup backup01; -75;label01.at:21;single-volume label;label label01; -76;label02.at:21;multi-volume label;label label02 multi-label multivolume multiv; -77;label03.at:27;test-label option;label label03 test-label; -78;label04.at:27;label with non-create option;label label04; -79;label05.at:24;label with non-create option;label label05; -80;incremental.at:23;incremental;incremental listed incr00; -81;incr01.at:27;restore broken symlinks from incremental;incremental incr01; -82;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02; -83;listed01.at:26;--listed for individual files;listed incremental listed01; -84;listed02.at:28;working --listed;listed incremental listed02; -85;listed03.at:24;incremental dump when the parent directory is unreadable;listed incremental listed03; -86;listed04.at:26;--listed-incremental and --one-file-system;listed incremental listed04; -87;listed05.at:33;--listed-incremental and remounted directories;listed incremental listed05; -88;incr03.at:28;renamed files in incrementals;incremental incr03 rename; -89;incr04.at:29;proper icontents initialization;incremental incr04 icontents; -90;incr05.at:21;incremental dumps with -C;incremental incr05; -91;incr06.at:21;incremental dumps of nested directories;incremental incr06; -92;incr07.at:18;incremental restores with -C;incremental extract incr07; -93;incr08.at:38;filename normalization;incremental create incr08; -94;incr09.at:26;incremental with alternating -C;incremental create incr09; -95;filerem01.at:36;file removed as we read it (ca. 22 seconds);create incremental listed filechange filerem filerem01; -96;filerem02.at:26;toplevel file removed (ca. 24 seconds);create incremental listed filechange filerem filerem02; -97;rename01.at:24;renamed dirs in incrementals;incremental rename rename01; -98;rename02.at:24;move between hierarchies;incremental rename rename02; -99;rename03.at:23;cyclic renames;incremental rename rename03 cyclic-rename; -100;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename; -101;rename05.at:24;renamed subdirectories;incremental rename05 rename; -102;chtype.at:27;changed file types in incrementals;incremental listed chtype; -103;ignfail.at:23;ignfail;ignfail; -104;link01.at:33;link count gt 2;hardlinks link01; -105;link02.at:32;preserve hard links with --remove-files;hardlinks link02; -106;link03.at:24;working -l with --remove-files;hardlinks link03; -107;link04.at:29;link count is 1 but multiple occurrences;hardlinks link04; -108;longv7.at:24;long names in V7 archives;longname longv7; -109;long01.at:28;long file names divisible by block size;longname long512; -110;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01; -111;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02; -112;lustar03.at:21;ustar: splitting long names;longname ustar lustar03; -113;old.at:23;old archives;old; -114;time01.at:20;time: tricky time stamps;time time01; -115;multiv01.at:23;multivolume dumps from pipes;multivolume multiv multiv01; -116;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02; -117;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03; -118;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental listed multiv04; -119;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync; -120;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06; -121;multiv07.at:28;volumes split at an extended header;multivolume multiv multiv07 xsplit; -122;multiv08.at:25;multivolume header creation;multivolume multiv multiv08; -123;owner.at:21;--owner and --group;owner; -124;sparse01.at:21;sparse files;sparse sparse01; -125;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02; -126;sparse03.at:21;storing sparse files > 8G;sparse sparse03; -127;sparse04.at:21;storing long sparse file names;sparse sparse04; -128;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv; -129;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multivolume multiv sparsemvp sparsemvp00; -130;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01; -131;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multivolume multiv sparsemvp sparsemvp10; -132;update.at:28;update unchanged directories;update update00; -133;update01.at:29;update directories;update update01; -134;update02.at:26;update changed files;update update02; -135;verify.at:25;verify;verify; -136;volume.at:23;volume;volume volcheck; -137;volsize.at:29;volume header size;volume volsize; -138;comprec.at:21;compressed format recognition;comprec; -139;shortfile.at:26;short input files;shortfile shortfile0; -140;shortupd.at:31;updating short archives;shortfile shortfile1 shortupd; -141;truncate.at:29;truncate;truncate filechange; -142;grow.at:24;grow;grow filechange; -143;sigpipe.at:21;sigpipe handling;sigpipe; -144;remfiles01.at:28;remove-files with compression;create remove-files remfiles01 gzip; -145;remfiles02.at:28;remove-files with compression: grand-child;create remove-files remfiles02 gzip; -146;remfiles03.at:28;remove-files with symbolic links;create remove-files remfiles03; -147;remfiles04a.at:25;remove-files with -C:rel in -c/non-incr. mode;create remove-files remfiles04 remfiles04a; -148;remfiles04b.at:33;remove-files with -C:rel in -c/incr. mode;create incremental remove-files remfiles04 remfiles04b; -149;remfiles04c.at:33;remove-files with -C:rel in -r mode;create append remove-files remfiles04 remfiles04c; -150;remfiles05a.at:34;remove-files with -C:rel,rel in -c/non-incr. mode;create remove-files remfiles05 remfiles05a; -151;remfiles05b.at:25;remove-files with -C:rel,rel in -c/incr. mode;create incremental remove-files remfiles05 remfiles05b; -152;remfiles05c.at:25;remove-files with -C:rel,rel in -r mode;create append remove-files remfiles05 remfiles05c; -153;remfiles06a.at:25;remove-files with -C:rel,abs in -c/non-incr. mode;create remove-files remfiles06 remfiles06a; -154;remfiles06b.at:25;remove-files with -C:rel,abs in -c/incr. mode;create incremental remove-files remfiles06 remfiles06b; -155;remfiles06c.at:25;remove-files with -C:rel,abs in -r mode;create append remove-files remfiles06 remfiles06c; -156;remfiles07a.at:25;remove-files with -C:rel,abs in -c/non-incr. mode;create remove-files remfiles07 remfiles07a; -157;remfiles07b.at:25;remove-files with -C:rel,abs in -c/incr. mode;create incremental remove-files remfiles07 remfiles07b; -158;remfiles07c.at:25;remove-files with -C:rel,abs in -r mode;create append remove-files remfiles07 remfiles07c; -159;remfiles08a.at:25;remove-files with -C:abs,rel in -c/non-incr. mode;create remove-files remfiles08 remfiles08a; -160;remfiles08b.at:25;remove-files with -C:abs,rel in -c/incr. mode;create incremental remove-files remfiles08 remfiles08b; -161;remfiles08c.at:25;remove-files with -C:abs,rel in -r mode;create append remove-files remfiles08 remfiles08c; -162;remfiles09a.at:25;remove-files on full directory in -c/non-incr. mode;create remove-files remfiles09 remfiles09a; -163;remfiles09b.at:29;remove-files on full directory in -c/incr. mode;create incremental remove-files remfiles09 remfiles09b; -164;remfiles09c.at:25;remove-files on full directory in -r mode;create append remove-files remfiles09 remfiles09c; -165;xattr01.at:25;xattrs: basic functionality;xattrs xattr01; -166;xattr02.at:25;xattrs: change directory with -C option;xattrs xattr02; -167;xattr03.at:25;xattrs: trusted.* attributes;xattrs xattr03; -168;xattr04.at:26;xattrs: s/open/openat/ regression;xattrs xattr04; -169;xattr05.at:28;xattrs: keywords with '=' and '%';xattrs xattr05; -170;acls01.at:25;acls: basic functionality;xattrs acls acls01; -171;acls02.at:25;acls: work with -C;xattrs acls acls02; -172;selnx01.at:25;selinux: basic store/restore;xattrs selinux selnx01; -173;selacl01.at:25;acls/selinux: special files & fifos;xattrs selinux acls selacls01; -174;capabs_raw01.at:25;capabilities: binary store/restore;xattrs capabilities capabs_raw01; -175;gtarfail.at:21;gtarfail;star gtarfail; -176;gtarfail2.at:21;gtarfail2;star gtarfail2; -177;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail; -178;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g; -179;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g; -180;pax-big-10g.at:21;pax-big-10g;star pax-big-10g; +23;recurs02.at:30;recurse: toggle;recurse options recurse02; +24;shortrec.at:25;short records;shortrec; +25;iotty.at:26;terminal input;options iotty; +26;same-order01.at:26;working -C with --same-order;same-order same-order01; +27;same-order02.at:25;multiple -C options;same-order same-order02; +28;append.at:21;append;append append00; +29;append01.at:29;appending files with long names;append append01; +30;append02.at:54;append vs. create;append append02 append-gnu; +31;append03.at:21;append with name transformation;append append03; +32;append04.at:29;append with verify;append append04 verify append-verify; +33;xform-h.at:30;transforming hard links on create;transform xform xform-h; +34;xform01.at:26;transformations and GNU volume labels;transform xform xform01 volume; +35;exclude.at:23;exclude;exclude; +36;exclude01.at:19;exclude wildcards;exclude exclude01; +37;exclude02.at:19;exclude: anchoring;exclude exclude02; +38;exclude03.at:19;exclude: wildcards match slash;exclude exclude03; +39;exclude04.at:19;exclude: case insensitive;exclude exclude04; +40;exclude05.at:21;exclude: lots of excludes;exclude exclude05; +41;exclude06.at:26;exclude: long files in pax archives;exclude exclude06; +42;exclude07.at:19;exclude: --exclude-backups option;exclude exclude07; +43;exclude08.at:36;--exclude-tag option;exclude exclude-tag exclude08; +44;exclude09.at:37;--exclude-tag option and --listed-incremental;exclude exclude-tag listed incremental exclude09; +45;exclude10.at:38;--exclude-tag option in incremental pass;exclude exclude-tag listed incremental exclude10; +46;exclude11.at:36;--exclude-tag-under option;exclude exclude-tag exclude-tag-under exclude11; +47;exclude12.at:37;--exclude-tag-under and --listed-incremental;exclude exclude-tag exclude-tag-under listed incremental exclude12; +48;exclude13.at:39;--exclude-tag-under option in incremental pass;exclude exclude-tag exclude-tag-under listed incremental exclude13; +49;exclude14.at:36;--exclude-tag-all option;exclude exclude-tag exclude-tag-all exclude14; +50;exclude15.at:36;--exclude-tag-all and --listed-incremental;exclude exclude-tag exclude-tag-all listed incremental exclude15; +51;exclude16.at:38;--exclude-tag-all option in incremental pass;exclude exclude-tag exclude-tag-all listed incremental exclude16; +52;delete01.at:23;deleting a member after a big one;delete delete01; +53;delete02.at:23;deleting a member from stdin archive;delete delete02; +54;delete03.at:21;deleting members with long names;delete delete03; +55;delete04.at:23;deleting a large last member;delete delete04; +56;delete05.at:27;deleting non-existing member;delete delete05; +57;extrac01.at:23;extract over an existing directory;extract extract01; +58;extrac02.at:23;extracting symlinks over an existing file;extract extract02 symlink; +59;extrac03.at:23;extraction loops;extract extract03; +60;extrac04.at:23;extract + fnmatch;extract extract04 fnmatch; +61;extrac05.at:30;extracting selected members from pax;extract extract05; +62;extrac06.at:34;mode of extracted directories;extract extract06 directory mode; +63;extrac07.at:27;extracting symlinks to a read-only dir;extract extract07 read-only symlink; +64;extrac08.at:33;restoring mode on existing directory;extract extrac08; +65;extrac09.at:34;extracting even when . and .. are unreadable;extract extrac09; +66;extrac10.at:29;-C and delayed setting of metadata;extract extrac10; +67;extrac11.at:25;scarce file descriptors;extract extrac11; +68;extrac12.at:25;extract dot permissions;extract extrac12; +69;extrac13.at:26;extract over symlinks;extract extrac13; +70;extrac14.at:25;extract -C symlink;extract extrac14; +71;extrac15.at:25;extract parent mkdir failure;extract extrac15; +72;extrac16.at:26;extract empty directory with -C;extract extrac16; +73;extrac17.at:21;name matching/transformation ordering;extract extrac17; +74;extrac18.at:34;keep-old-files;extract extrac18 old-files keep-old-files; +75;extrac19.at:21;skip-old-files;extract extrac19 old-files skip-old-files; +76;backup01.at:33;extracting existing dir with --backup;extract backup backup01; +77;label01.at:21;single-volume label;label label01; +78;label02.at:21;multi-volume label;label label02 multi-label multivolume multiv; +79;label03.at:27;test-label option;label label03 test-label; +80;label04.at:27;label with non-create option;label label04; +81;label05.at:24;label with non-create option;label label05; +82;incremental.at:23;incremental;incremental listed incr00; +83;incr01.at:27;restore broken symlinks from incremental;incremental incr01; +84;incr02.at:32;restoring timestamps from incremental;incremental timestamp restore incr02; +85;listed01.at:26;--listed for individual files;listed incremental listed01; +86;listed02.at:28;working --listed;listed incremental listed02; +87;listed03.at:24;incremental dump when the parent directory is unreadable;listed incremental listed03; +88;listed04.at:26;--listed-incremental and --one-file-system;listed incremental listed04; +89;listed05.at:33;--listed-incremental and remounted directories;listed incremental listed05; +90;incr03.at:28;renamed files in incrementals;incremental incr03 rename; +91;incr04.at:29;proper icontents initialization;incremental incr04 icontents; +92;incr05.at:21;incremental dumps with -C;incremental incr05; +93;incr06.at:21;incremental dumps of nested directories;incremental incr06; +94;incr07.at:18;incremental restores with -C;incremental extract incr07; +95;incr08.at:38;filename normalization;incremental create incr08; +96;incr09.at:26;incremental with alternating -C;incremental create incr09; +97;filerem01.at:36;file removed as we read it (ca. 22 seconds);create incremental listed filechange filerem filerem01; +98;filerem02.at:26;toplevel file removed (ca. 24 seconds);create incremental listed filechange filerem filerem02; +99;rename01.at:24;renamed dirs in incrementals;incremental rename rename01; +100;rename02.at:24;move between hierarchies;incremental rename rename02; +101;rename03.at:23;cyclic renames;incremental rename rename03 cyclic-rename; +102;rename04.at:27;renamed directory containing subdirectories;incremental rename04 rename; +103;rename05.at:24;renamed subdirectories;incremental rename05 rename; +104;chtype.at:27;changed file types in incrementals;incremental listed chtype; +105;ignfail.at:23;ignfail;ignfail; +106;link01.at:33;link count gt 2;hardlinks link01; +107;link02.at:32;preserve hard links with --remove-files;hardlinks link02; +108;link03.at:24;working -l with --remove-files;hardlinks link03; +109;link04.at:29;link count is 1 but multiple occurrences;hardlinks link04; +110;longv7.at:24;long names in V7 archives;longname longv7; +111;long01.at:28;long file names divisible by block size;longname long512; +112;lustar01.at:21;ustar: unsplittable file name;longname ustar lustar01; +113;lustar02.at:21;ustar: unsplittable path name;longname ustar lustar02; +114;lustar03.at:21;ustar: splitting long names;longname ustar lustar03; +115;old.at:23;old archives;old; +116;time01.at:20;time: tricky time stamps;time time01; +117;multiv01.at:24;multivolume dumps from pipes;multivolume multiv multiv01; +118;multiv02.at:28;skipping a straddling member;multivolume multiv multiv02; +119;multiv03.at:30;MV archive & long filenames;multivolume multiv multiv03; +120;multiv04.at:36;split directory members in a MV archive;multivolume multiv incremental listed multiv04; +121;multiv05.at:26;Restoring after an out of sync volume;multivolume multiv multiv05 sync; +122;multiv06.at:27;Multivolumes with L=record_size;multivolume multiv multiv06; +123;multiv07.at:28;volumes split at an extended header;multivolume multiv multiv07 xsplit; +124;multiv08.at:25;multivolume header creation;multivolume multiv multiv08; +125;owner.at:21;--owner and --group;owner; +126;sparse01.at:21;sparse files;sparse sparse01; +127;sparse02.at:21;extracting sparse file over a pipe;sparse sparse02; +128;sparse03.at:21;storing sparse files > 8G;sparse sparse03; +129;sparse04.at:21;storing long sparse file names;sparse sparse04; +130;sparsemv.at:21;sparse files in MV archives;sparse multiv sparsemv; +131;spmvp00.at:21;sparse files in PAX MV archives, v.0.0;sparse multivolume multiv sparsemvp sparsemvp00; +132;spmvp01.at:21;sparse files in PAX MV archives, v.0.1;sparse multiv sparsemvp sparsemvp01; +133;spmvp10.at:21;sparse files in PAX MV archives, v.1.0;sparse multivolume multiv sparsemvp sparsemvp10; +134;update.at:28;update unchanged directories;update update00; +135;update01.at:29;update directories;update update01; +136;update02.at:26;update changed files;update update02; +137;verify.at:25;verify;verify; +138;volume.at:23;volume;volume volcheck; +139;volsize.at:29;volume header size;volume volsize; +140;comprec.at:21;compressed format recognition;comprec; +141;shortfile.at:26;short input files;shortfile shortfile0; +142;shortupd.at:31;updating short archives;shortfile shortfile1 shortupd; +143;truncate.at:29;truncate;truncate filechange; +144;grow.at:24;grow;grow filechange; +145;sigpipe.at:21;sigpipe handling;sigpipe; +146;remfiles01.at:28;remove-files with compression;create remove-files remfiles01 gzip; +147;remfiles02.at:28;remove-files with compression: grand-child;create remove-files remfiles02 gzip; +148;remfiles03.at:28;remove-files with symbolic links;create remove-files remfiles03; +149;remfiles04a.at:25;remove-files with -C:rel in -c/non-incr. mode;create remove-files remfiles04 remfiles04a; +150;remfiles04b.at:33;remove-files with -C:rel in -c/incr. mode;create incremental remove-files remfiles04 remfiles04b; +151;remfiles04c.at:33;remove-files with -C:rel in -r mode;create append remove-files remfiles04 remfiles04c; +152;remfiles05a.at:34;remove-files with -C:rel,rel in -c/non-incr. mode;create remove-files remfiles05 remfiles05a; +153;remfiles05b.at:25;remove-files with -C:rel,rel in -c/incr. mode;create incremental remove-files remfiles05 remfiles05b; +154;remfiles05c.at:25;remove-files with -C:rel,rel in -r mode;create append remove-files remfiles05 remfiles05c; +155;remfiles06a.at:25;remove-files with -C:rel,abs in -c/non-incr. mode;create remove-files remfiles06 remfiles06a; +156;remfiles06b.at:25;remove-files with -C:rel,abs in -c/incr. mode;create incremental remove-files remfiles06 remfiles06b; +157;remfiles06c.at:25;remove-files with -C:rel,abs in -r mode;create append remove-files remfiles06 remfiles06c; +158;remfiles07a.at:25;remove-files with -C:abs,rel in -c/non-incr. mode;create remove-files remfiles07 remfiles07a; +159;remfiles07b.at:25;remove-files with -C:abs,rel in -c/incr. mode;create incremental remove-files remfiles07 remfiles07b; +160;remfiles07c.at:25;remove-files with -C:abs,rel in -r mode;create append remove-files remfiles07 remfiles07c; +161;remfiles08a.at:28;remove-files deleting two subdirs in -c/non-incr. mode;create remove-files remfiles08 remfiles08a; +162;remfiles08b.at:31;remove-files deleting two subdirs in -c/incr. mode;create incremental remove-files remfiles08 remfiles08b; +163;remfiles08c.at:28;remove-files deleting two subdirs in -r mode;create append remove-files remfiles08 remfiles08c; +164;remfiles09a.at:25;remove-files on full directory in -c/non-incr. mode;create remove-files remfiles09 remfiles09a; +165;remfiles09b.at:29;remove-files on full directory in -c/incr. mode;create incremental remove-files remfiles09 remfiles09b; +166;remfiles09c.at:25;remove-files on full directory in -r mode;create append remove-files remfiles09 remfiles09c; +167;remfiles10.at:20;remove-files;create remove-files remfiles10; +168;xattr01.at:25;xattrs: basic functionality;xattrs xattr01; +169;xattr02.at:25;xattrs: change directory with -C option;xattrs xattr02; +170;xattr03.at:25;xattrs: trusted.* attributes;xattrs xattr03; +171;xattr04.at:26;xattrs: s/open/openat/ regression;xattrs xattr04; +172;xattr05.at:28;xattrs: keywords with '=' and '%';xattrs xattr05; +173;acls01.at:25;acls: basic functionality;xattrs acls acls01; +174;acls02.at:25;acls: work with -C;xattrs acls acls02; +175;acls03.at:30;acls: default ACLs;xattrs acls acls03; +176;selnx01.at:25;selinux: basic store/restore;xattrs selinux selnx01; +177;selacl01.at:25;acls/selinux: special files & fifos;xattrs selinux acls selacls01; +178;capabs_raw01.at:25;capabilities: binary store/restore;xattrs capabilities capabs_raw01; +179;onetop01.at:21;tar --one-top-level;extract onetop onetop01; +180;onetop02.at:21;tar --one-top-level --show-transformed;extract onetop onetop02; +181;onetop03.at:21;tar --one-top-level --transform;extract onetop onetop02; +182;onetop04.at:21;tar --one-top-level --transform;extract onetop onetop02; +183;gtarfail.at:21;gtarfail;star gtarfail; +184;gtarfail2.at:21;gtarfail2;star gtarfail2; +185;multi-fail.at:21;multi-fail;star multivolume multiv multi-fail; +186;ustar-big-2g.at:21;ustar-big-2g;star ustar-big-2g; +187;ustar-big-8g.at:21;ustar-big-8g;star ustar-big-8g; +188;pax-big-10g.at:21;pax-big-10g;star pax-big-10g; " # List of the all the test groups. at_groups_all=`$as_echo "$at_help_all" | sed 's/;.*//'` @@ -783,7 +791,7 @@ at_fn_validate_ranges () for at_grp do eval at_value=\$$at_grp - if test $at_value -lt 1 || test $at_value -gt 180; then + if test $at_value -lt 1 || test $at_value -gt 188; then $as_echo "invalid test group: $at_value" >&2 exit 1 fi @@ -1082,7 +1090,7 @@ fi # List of tests. if $at_list_p; then cat <<_ATEOF || at_write_fail=1 -GNU tar 1.27.1 test suite test groups: +GNU tar 1.28 test suite test groups: NUM: FILE-NAME:LINE TEST-GROUP-NAME KEYWORDS @@ -1123,7 +1131,7 @@ _ATEOF exit $at_write_fail fi if $at_version_p; then - $as_echo "$as_me (GNU tar 1.27.1)" && + $as_echo "$as_me (GNU tar 1.28)" && cat <<\_ATEOF || at_write_fail=1 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1149,75 +1157,78 @@ at_banner_text_2="The -T option" # Banner 3. testsuite.at:209 # Category starts at test group 19. at_banner_text_3="Various options" -# Banner 4. testsuite.at:216 -# Category starts at test group 24. -at_banner_text_4="The --same-order option" -# Banner 5. testsuite.at:220 +# Banner 4. testsuite.at:218 # Category starts at test group 26. +at_banner_text_4="The --same-order option" +# Banner 5. testsuite.at:222 +# Category starts at test group 28. at_banner_text_5="Append" -# Banner 6. testsuite.at:227 -# Category starts at test group 31. -at_banner_text_6="Transforms" -# Banner 7. testsuite.at:231 +# Banner 6. testsuite.at:229 # Category starts at test group 33. +at_banner_text_6="Transforms" +# Banner 7. testsuite.at:233 +# Category starts at test group 35. at_banner_text_7="Exclude" -# Banner 8. testsuite.at:250 -# Category starts at test group 50. +# Banner 8. testsuite.at:252 +# Category starts at test group 52. at_banner_text_8="Deletions" -# Banner 9. testsuite.at:257 -# Category starts at test group 55. +# Banner 9. testsuite.at:259 +# Category starts at test group 57. at_banner_text_9="Extracting" -# Banner 10. testsuite.at:279 -# Category starts at test group 75. +# Banner 10. testsuite.at:281 +# Category starts at test group 77. at_banner_text_10="Volume label operations" -# Banner 11. testsuite.at:286 -# Category starts at test group 80. +# Banner 11. testsuite.at:288 +# Category starts at test group 82. at_banner_text_11="Incremental archives" -# Banner 12. testsuite.at:303 -# Category starts at test group 95. -at_banner_text_12="Files removed while archiving" -# Banner 13. testsuite.at:307 +# Banner 12. testsuite.at:305 # Category starts at test group 97. +at_banner_text_12="Files removed while archiving" +# Banner 13. testsuite.at:309 +# Category starts at test group 99. at_banner_text_13="Renames" -# Banner 14. testsuite.at:315 -# Category starts at test group 103. +# Banner 14. testsuite.at:317 +# Category starts at test group 105. at_banner_text_14="Ignore failing reads" -# Banner 15. testsuite.at:318 -# Category starts at test group 104. +# Banner 15. testsuite.at:320 +# Category starts at test group 106. at_banner_text_15="Link handling" -# Banner 16. testsuite.at:324 -# Category starts at test group 108. +# Banner 16. testsuite.at:326 +# Category starts at test group 110. at_banner_text_16="Specific archive formats" -# Banner 17. testsuite.at:334 -# Category starts at test group 115. +# Banner 17. testsuite.at:336 +# Category starts at test group 117. at_banner_text_17="Multivolume archives" -# Banner 18. testsuite.at:344 -# Category starts at test group 123. +# Banner 18. testsuite.at:346 +# Category starts at test group 125. at_banner_text_18="Owner and Groups" -# Banner 19. testsuite.at:347 -# Category starts at test group 124. +# Banner 19. testsuite.at:349 +# Category starts at test group 126. at_banner_text_19="Sparse files" -# Banner 20. testsuite.at:357 -# Category starts at test group 132. +# Banner 20. testsuite.at:359 +# Category starts at test group 134. at_banner_text_20="Updates" -# Banner 21. testsuite.at:362 -# Category starts at test group 135. +# Banner 21. testsuite.at:364 +# Category starts at test group 137. at_banner_text_21="Verifying the archive" -# Banner 22. testsuite.at:365 -# Category starts at test group 136. -at_banner_text_22="Volume operations" -# Banner 23. testsuite.at:369 +# Banner 22. testsuite.at:367 # Category starts at test group 138. +at_banner_text_22="Volume operations" +# Banner 23. testsuite.at:371 +# Category starts at test group 140. at_banner_text_23="" -# Banner 24. testsuite.at:378 -# Category starts at test group 144. +# Banner 24. testsuite.at:380 +# Category starts at test group 146. at_banner_text_24="Removing files after archiving" -# Banner 25. testsuite.at:401 -# Category starts at test group 165. +# Banner 25. testsuite.at:404 +# Category starts at test group 168. at_banner_text_25="Extended attributes" -# Banner 26. testsuite.at:416 -# Category starts at test group 175. -at_banner_text_26="Star tests" +# Banner 26. testsuite.at:420 +# Category starts at test group 179. +at_banner_text_26="One top level" +# Banner 27. testsuite.at:426 +# Category starts at test group 183. +at_banner_text_27="Star tests" # Take any -C into account. if $at_change_dir ; then @@ -1377,13 +1388,13 @@ fi exec 5>>"$at_suite_log" # Banners and logs. -$as_echo "## -------------------------- ## -## GNU tar 1.27.1 test suite. ## -## -------------------------- ##" +$as_echo "## ------------------------ ## +## GNU tar 1.28 test suite. ## +## ------------------------ ##" { - $as_echo "## -------------------------- ## -## GNU tar 1.27.1 test suite. ## -## -------------------------- ##" + $as_echo "## ------------------------ ## +## GNU tar 1.28 test suite. ## +## ------------------------ ##" echo $as_echo "$as_me: command line was:" @@ -2226,7 +2237,7 @@ _ASBOX $as_echo "Please send $at_msg and all information you think might help: To: - Subject: [GNU tar 1.27.1] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} + Subject: [GNU tar 1.28] $as_me: $at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}$at_xpass_list${at_xpass_list:+ passed unexpectedly} You may investigate any problem if you feel able to do so, in which case the test suite provides a good starting point. Its output may @@ -2257,7 +2268,7 @@ at_fn_check_prepare_notrace 'a shell pipeline' "version.at:21" at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.27.1 +echo >>"$at_stdout"; $as_echo "tar (GNU tar) 1.28 " | \ $at_diff - "$at_stdout" || at_failed=: at_fn_check_status 0 $at_status "$at_srcdir/version.at:21" @@ -2717,7 +2728,7 @@ tar --occurrence=1 -cf test.tar . ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter -echo >>"$at_stderr"; $as_echo "tar: --occurrence cannot be used with -c +echo >>"$at_stderr"; $as_echo "tar: '--occurrence' cannot be used with '-c' Try 'tar --help' or 'tar --usage' for more information. " | \ $at_diff - "$at_stderr" || at_failed=: @@ -2789,7 +2800,7 @@ tar -tWf test.tar . ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter -echo >>"$at_stderr"; $as_echo "tar: --verify cannot be used with -t +echo >>"$at_stderr"; $as_echo "tar: '--verify' cannot be used with '-t' Try 'tar --help' or 'tar --usage' for more information. " | \ $at_diff - "$at_stderr" || at_failed=: @@ -4222,7 +4233,7 @@ $at_traceon; } read at_status <"$at_status_file" #AT_STOP_20 #AT_START_21 -at_fn_group_banner 21 'gzip.at:23' \ +at_fn_group_banner 21 'gzip.at:24' \ "gzip" " " 3 at_xfail=no ( @@ -4234,7 +4245,7 @@ at_xfail=no unset TAR_OPTIONS { set +x -$as_echo "$at_srcdir/gzip.at:28: +$as_echo "$at_srcdir/gzip.at:29: cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 @@ -4243,7 +4254,7 @@ RC=\$? sed -n '/^tar:/p' err >&2 exit \$RC " -at_fn_check_prepare_notrace 'an embedded newline' "gzip.at:28" +at_fn_check_prepare_notrace 'an embedded newline' "gzip.at:29" ( $at_check_trace; cat /dev/null | gzip - > /dev/null 2>&1 || exit 77 @@ -4261,7 +4272,7 @@ tar: Error is not recoverable: exiting now " | \ $at_diff - "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 2 $at_status "$at_srcdir/gzip.at:28" +at_fn_check_status 2 $at_status "$at_srcdir/gzip.at:29" $at_failed && at_fn_log_failure $at_traceon; } @@ -4498,8 +4509,8 @@ $at_traceon; } read at_status <"$at_status_file" #AT_STOP_22 #AT_START_23 -at_fn_group_banner 23 'shortrec.at:25' \ - "short records" " " 3 +at_fn_group_banner 23 'recurs02.at:30' \ + "recurse: toggle" " " 3 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( @@ -4510,6 +4521,262 @@ at_xfail=no + { set +x +$as_echo "$at_srcdir/recurs02.at:33: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurs02.at:33: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurs02.at:33: +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H ustar\" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33" +( $at_check_trace; +mkdir ustar +(cd ustar +TEST_TAR_FORMAT=ustar +export TEST_TAR_FORMAT +TAR_OPTIONS="-H ustar" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurs02.at:33: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/recurs02.at:33: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \\ + --no-recursion directory1 \\ + --recursion directory2 || exit 1 +tar tf archive +)" +at_fn_check_prepare_notrace 'an embedded newline' "recurs02.at:33" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir directory1 directory2 +touch directory1/file directory2/file +tar --create --file archive \ + --no-recursion directory1 \ + --recursion directory2 || exit 1 +tar tf archive +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "directory1/ +directory2/ +directory2/file +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/recurs02.at:33" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_23 +#AT_START_24 +at_fn_group_banner 24 'shortrec.at:25' \ + "short records" " " 3 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "24. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + { set +x $as_echo "$at_srcdir/shortrec.at:28: mkdir v7 @@ -4752,14 +5019,212 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_23 -#AT_START_24 -at_fn_group_banner 24 'same-order01.at:26' \ +#AT_STOP_24 +#AT_START_25 +at_fn_group_banner 25 'iotty.at:26' \ + "terminal input" " " 3 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "25. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/iotty.at:29: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + +test -x \$abs_builddir/ttyemu || exit 77 +TAPE=- +export TAPE +ttyemu -t5 -i/dev/null tar -x +echo \$? +ttyemu -t5 -i/dev/null tar -xz +echo \$? +ttyemu -t5 -i/dev/null tar -c . +echo \$? +)" +at_fn_check_prepare_notrace 'an embedded newline' "iotty.at:29" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + +test -x $abs_builddir/ttyemu || exit 77 +TAPE=- +export TAPE +ttyemu -t5 -i/dev/null tar -x +echo $? +ttyemu -t5 -i/dev/null tar -xz +echo $? +ttyemu -t5 -i/dev/null tar -c . +echo $? +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar: Refusing to read archive contents from terminal (missing -f option?) +tar: Error is not recoverable: exiting now +2 +tar: Refusing to read archive contents from terminal (missing -f option?) +tar: Error is not recoverable: exiting now +2 +tar: Refusing to write archive contents to terminal (missing -f option?) +tar: Error is not recoverable: exiting now +2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/iotty.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/iotty.at:29: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +test -x \$abs_builddir/ttyemu || exit 77 +TAPE=- +export TAPE +ttyemu -t5 -i/dev/null tar -x +echo \$? +ttyemu -t5 -i/dev/null tar -xz +echo \$? +ttyemu -t5 -i/dev/null tar -c . +echo \$? +)" +at_fn_check_prepare_notrace 'an embedded newline' "iotty.at:29" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +test -x $abs_builddir/ttyemu || exit 77 +TAPE=- +export TAPE +ttyemu -t5 -i/dev/null tar -x +echo $? +ttyemu -t5 -i/dev/null tar -xz +echo $? +ttyemu -t5 -i/dev/null tar -c . +echo $? +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar: Refusing to read archive contents from terminal (missing -f option?) +tar: Error is not recoverable: exiting now +2 +tar: Refusing to read archive contents from terminal (missing -f option?) +tar: Error is not recoverable: exiting now +2 +tar: Refusing to write archive contents to terminal (missing -f option?) +tar: Error is not recoverable: exiting now +2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/iotty.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/iotty.at:29: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + +test -x \$abs_builddir/ttyemu || exit 77 +TAPE=- +export TAPE +ttyemu -t5 -i/dev/null tar -x +echo \$? +ttyemu -t5 -i/dev/null tar -xz +echo \$? +ttyemu -t5 -i/dev/null tar -c . +echo \$? +)" +at_fn_check_prepare_notrace 'an embedded newline' "iotty.at:29" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + +test -x $abs_builddir/ttyemu || exit 77 +TAPE=- +export TAPE +ttyemu -t5 -i/dev/null tar -x +echo $? +ttyemu -t5 -i/dev/null tar -xz +echo $? +ttyemu -t5 -i/dev/null tar -c . +echo $? +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "tar: Refusing to read archive contents from terminal (missing -f option?) +tar: Error is not recoverable: exiting now +2 +tar: Refusing to read archive contents from terminal (missing -f option?) +tar: Error is not recoverable: exiting now +2 +tar: Refusing to write archive contents to terminal (missing -f option?) +tar: Error is not recoverable: exiting now +2 +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/iotty.at:29" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_25 +#AT_START_26 +at_fn_group_banner 26 'same-order01.at:26' \ "working -C with --same-order" " " 4 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "24. $at_setup_line: testing $at_desc ..." + $as_echo "26. $at_setup_line: testing $at_desc ..." $at_traceon @@ -5063,14 +5528,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_24 -#AT_START_25 -at_fn_group_banner 25 'same-order02.at:25' \ +#AT_STOP_26 +#AT_START_27 +at_fn_group_banner 27 'same-order02.at:25' \ "multiple -C options" " " 4 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "25. $at_setup_line: testing $at_desc ..." + $as_echo "27. $at_setup_line: testing $at_desc ..." $at_traceon @@ -5409,14 +5874,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_25 -#AT_START_26 -at_fn_group_banner 26 'append.at:21' \ +#AT_STOP_27 +#AT_START_28 +at_fn_group_banner 28 'append.at:21' \ "append" " " 5 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "26. $at_setup_line: testing $at_desc ..." + $as_echo "28. $at_setup_line: testing $at_desc ..." $at_traceon @@ -5630,14 +6095,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_26 -#AT_START_27 -at_fn_group_banner 27 'append01.at:29' \ +#AT_STOP_28 +#AT_START_29 +at_fn_group_banner 29 'append01.at:29' \ "appending files with long names" " " 5 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "27. $at_setup_line: testing $at_desc ..." + $as_echo "29. $at_setup_line: testing $at_desc ..." $at_traceon @@ -5830,14 +6295,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_27 -#AT_START_28 -at_fn_group_banner 28 'append02.at:54' \ +#AT_STOP_29 +#AT_START_30 +at_fn_group_banner 30 'append02.at:54' \ "append vs. create" " " 5 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "28. $at_setup_line: testing $at_desc ..." + $as_echo "30. $at_setup_line: testing $at_desc ..." $at_traceon @@ -6246,14 +6711,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_28 -#AT_START_29 -at_fn_group_banner 29 'append03.at:21' \ +#AT_STOP_30 +#AT_START_31 +at_fn_group_banner 31 'append03.at:21' \ "append with name transformation" " " 5 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "29. $at_setup_line: testing $at_desc ..." + $as_echo "31. $at_setup_line: testing $at_desc ..." $at_traceon @@ -6539,14 +7004,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_29 -#AT_START_30 -at_fn_group_banner 30 'append04.at:29' \ +#AT_STOP_31 +#AT_START_32 +at_fn_group_banner 32 'append04.at:29' \ "append with verify" " " 5 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "30. $at_setup_line: testing $at_desc ..." + $as_echo "32. $at_setup_line: testing $at_desc ..." $at_traceon @@ -6920,14 +7385,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_30 -#AT_START_31 -at_fn_group_banner 31 'xform-h.at:30' \ +#AT_STOP_32 +#AT_START_33 +at_fn_group_banner 33 'xform-h.at:30' \ "transforming hard links on create" " " 6 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "31. $at_setup_line: testing $at_desc ..." + $as_echo "33. $at_setup_line: testing $at_desc ..." $at_traceon @@ -7325,14 +7790,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_31 -#AT_START_32 -at_fn_group_banner 32 'xform01.at:26' \ +#AT_STOP_33 +#AT_START_34 +at_fn_group_banner 34 'xform01.at:26' \ "transformations and GNU volume labels" " " 6 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "32. $at_setup_line: testing $at_desc ..." + $as_echo "34. $at_setup_line: testing $at_desc ..." $at_traceon @@ -7386,14 +7851,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_32 -#AT_START_33 -at_fn_group_banner 33 'exclude.at:23' \ +#AT_STOP_34 +#AT_START_35 +at_fn_group_banner 35 'exclude.at:23' \ "exclude" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "33. $at_setup_line: testing $at_desc ..." + $as_echo "35. $at_setup_line: testing $at_desc ..." $at_traceon @@ -7603,14 +8068,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_33 -#AT_START_34 -at_fn_group_banner 34 'exclude01.at:19' \ +#AT_STOP_35 +#AT_START_36 +at_fn_group_banner 36 'exclude01.at:19' \ "exclude wildcards" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "34. $at_setup_line: testing $at_desc ..." + $as_echo "36. $at_setup_line: testing $at_desc ..." $at_traceon @@ -8184,14 +8649,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_34 -#AT_START_35 -at_fn_group_banner 35 'exclude02.at:19' \ +#AT_STOP_36 +#AT_START_37 +at_fn_group_banner 37 'exclude02.at:19' \ "exclude: anchoring" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "35. $at_setup_line: testing $at_desc ..." + $as_echo "37. $at_setup_line: testing $at_desc ..." $at_traceon @@ -8825,14 +9290,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_35 -#AT_START_36 -at_fn_group_banner 36 'exclude03.at:19' \ +#AT_STOP_37 +#AT_START_38 +at_fn_group_banner 38 'exclude03.at:19' \ "exclude: wildcards match slash" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "36. $at_setup_line: testing $at_desc ..." + $as_echo "38. $at_setup_line: testing $at_desc ..." $at_traceon @@ -9426,14 +9891,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_36 -#AT_START_37 -at_fn_group_banner 37 'exclude04.at:19' \ +#AT_STOP_38 +#AT_START_39 +at_fn_group_banner 39 'exclude04.at:19' \ "exclude: case insensitive" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "37. $at_setup_line: testing $at_desc ..." + $as_echo "39. $at_setup_line: testing $at_desc ..." $at_traceon @@ -10042,14 +10507,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_37 -#AT_START_38 -at_fn_group_banner 38 'exclude05.at:21' \ +#AT_STOP_39 +#AT_START_40 +at_fn_group_banner 40 'exclude05.at:21' \ "exclude: lots of excludes" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "38. $at_setup_line: testing $at_desc ..." + $as_echo "40. $at_setup_line: testing $at_desc ..." $at_traceon @@ -10518,14 +10983,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_38 -#AT_START_39 -at_fn_group_banner 39 'exclude06.at:26' \ +#AT_STOP_40 +#AT_START_41 +at_fn_group_banner 41 'exclude06.at:26' \ "exclude: long files in pax archives" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "39. $at_setup_line: testing $at_desc ..." + $as_echo "41. $at_setup_line: testing $at_desc ..." $at_traceon @@ -10593,14 +11058,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_39 -#AT_START_40 -at_fn_group_banner 40 'exclude07.at:19' \ +#AT_STOP_41 +#AT_START_42 +at_fn_group_banner 42 'exclude07.at:19' \ "exclude: --exclude-backups option" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "40. $at_setup_line: testing $at_desc ..." + $as_echo "42. $at_setup_line: testing $at_desc ..." $at_traceon @@ -10854,14 +11319,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_40 -#AT_START_41 -at_fn_group_banner 41 'exclude08.at:36' \ +#AT_STOP_42 +#AT_START_43 +at_fn_group_banner 43 'exclude08.at:36' \ "--exclude-tag option" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "41. $at_setup_line: testing $at_desc ..." + $as_echo "43. $at_setup_line: testing $at_desc ..." $at_traceon @@ -11115,14 +11580,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_41 -#AT_START_42 -at_fn_group_banner 42 'exclude09.at:37' \ +#AT_STOP_43 +#AT_START_44 +at_fn_group_banner 44 'exclude09.at:37' \ "--exclude-tag option and --listed-incremental" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "42. $at_setup_line: testing $at_desc ..." + $as_echo "44. $at_setup_line: testing $at_desc ..." $at_traceon @@ -11186,14 +11651,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_42 -#AT_START_43 -at_fn_group_banner 43 'exclude10.at:38' \ +#AT_STOP_44 +#AT_START_45 +at_fn_group_banner 45 'exclude10.at:38' \ "--exclude-tag option in incremental pass" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "43. $at_setup_line: testing $at_desc ..." + $as_echo "45. $at_setup_line: testing $at_desc ..." $at_traceon @@ -11280,14 +11745,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_43 -#AT_START_44 -at_fn_group_banner 44 'exclude11.at:36' \ +#AT_STOP_45 +#AT_START_46 +at_fn_group_banner 46 'exclude11.at:36' \ "--exclude-tag-under option" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "44. $at_setup_line: testing $at_desc ..." + $as_echo "46. $at_setup_line: testing $at_desc ..." $at_traceon @@ -11536,14 +12001,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_44 -#AT_START_45 -at_fn_group_banner 45 'exclude12.at:37' \ +#AT_STOP_46 +#AT_START_47 +at_fn_group_banner 47 'exclude12.at:37' \ "--exclude-tag-under and --listed-incremental" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "45. $at_setup_line: testing $at_desc ..." + $as_echo "47. $at_setup_line: testing $at_desc ..." $at_traceon @@ -11606,14 +12071,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_45 -#AT_START_46 -at_fn_group_banner 46 'exclude13.at:39' \ +#AT_STOP_47 +#AT_START_48 +at_fn_group_banner 48 'exclude13.at:39' \ "--exclude-tag-under option in incremental pass" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "46. $at_setup_line: testing $at_desc ..." + $as_echo "48. $at_setup_line: testing $at_desc ..." $at_traceon @@ -11699,14 +12164,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_46 -#AT_START_47 -at_fn_group_banner 47 'exclude14.at:36' \ +#AT_STOP_48 +#AT_START_49 +at_fn_group_banner 49 'exclude14.at:36' \ "--exclude-tag-all option" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "47. $at_setup_line: testing $at_desc ..." + $as_echo "49. $at_setup_line: testing $at_desc ..." $at_traceon @@ -11950,14 +12415,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_47 -#AT_START_48 -at_fn_group_banner 48 'exclude15.at:36' \ +#AT_STOP_49 +#AT_START_50 +at_fn_group_banner 50 'exclude15.at:36' \ "--exclude-tag-all and --listed-incremental" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "48. $at_setup_line: testing $at_desc ..." + $as_echo "50. $at_setup_line: testing $at_desc ..." $at_traceon @@ -12019,14 +12484,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_48 -#AT_START_49 -at_fn_group_banner 49 'exclude16.at:38' \ +#AT_STOP_50 +#AT_START_51 +at_fn_group_banner 51 'exclude16.at:38' \ "--exclude-tag-all option in incremental pass" " " 7 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "49. $at_setup_line: testing $at_desc ..." + $as_echo "51. $at_setup_line: testing $at_desc ..." $at_traceon @@ -12111,14 +12576,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_49 -#AT_START_50 -at_fn_group_banner 50 'delete01.at:23' \ +#AT_STOP_51 +#AT_START_52 +at_fn_group_banner 52 'delete01.at:23' \ "deleting a member after a big one" " " 8 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "50. $at_setup_line: testing $at_desc ..." + $as_echo "52. $at_setup_line: testing $at_desc ..." $at_traceon @@ -12337,14 +12802,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_50 -#AT_START_51 -at_fn_group_banner 51 'delete02.at:23' \ +#AT_STOP_52 +#AT_START_53 +at_fn_group_banner 53 'delete02.at:23' \ "deleting a member from stdin archive" " " 8 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "51. $at_setup_line: testing $at_desc ..." + $as_echo "53. $at_setup_line: testing $at_desc ..." $at_traceon @@ -12618,14 +13083,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_51 -#AT_START_52 -at_fn_group_banner 52 'delete03.at:21' \ +#AT_STOP_53 +#AT_START_54 +at_fn_group_banner 54 'delete03.at:21' \ "deleting members with long names" " " 8 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "52. $at_setup_line: testing $at_desc ..." + $as_echo "54. $at_setup_line: testing $at_desc ..." $at_traceon @@ -12816,14 +13281,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_52 -#AT_START_53 -at_fn_group_banner 53 'delete04.at:23' \ +#AT_STOP_54 +#AT_START_55 +at_fn_group_banner 55 'delete04.at:23' \ "deleting a large last member" " " 8 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "53. $at_setup_line: testing $at_desc ..." + $as_echo "55. $at_setup_line: testing $at_desc ..." $at_traceon @@ -13172,14 +13637,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_53 -#AT_START_54 -at_fn_group_banner 54 'delete05.at:27' \ +#AT_STOP_55 +#AT_START_56 +at_fn_group_banner 56 'delete05.at:27' \ "deleting non-existing member" " " 8 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "54. $at_setup_line: testing $at_desc ..." + $as_echo "56. $at_setup_line: testing $at_desc ..." $at_traceon @@ -13458,14 +13923,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_54 -#AT_START_55 -at_fn_group_banner 55 'extrac01.at:23' \ +#AT_STOP_56 +#AT_START_57 +at_fn_group_banner 57 'extrac01.at:23' \ "extract over an existing directory" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "55. $at_setup_line: testing $at_desc ..." + $as_echo "57. $at_setup_line: testing $at_desc ..." $at_traceon @@ -13674,14 +14139,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_55 -#AT_START_56 -at_fn_group_banner 56 'extrac02.at:23' \ +#AT_STOP_57 +#AT_START_58 +at_fn_group_banner 58 'extrac02.at:23' \ "extracting symlinks over an existing file" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "56. $at_setup_line: testing $at_desc ..." + $as_echo "58. $at_setup_line: testing $at_desc ..." $at_traceon @@ -13912,14 +14377,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_56 -#AT_START_57 -at_fn_group_banner 57 'extrac03.at:23' \ +#AT_STOP_58 +#AT_START_59 +at_fn_group_banner 59 'extrac03.at:23' \ "extraction loops" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "57. $at_setup_line: testing $at_desc ..." + $as_echo "59. $at_setup_line: testing $at_desc ..." $at_traceon @@ -14138,14 +14603,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_57 -#AT_START_58 -at_fn_group_banner 58 'extrac04.at:23' \ +#AT_STOP_59 +#AT_START_60 +at_fn_group_banner 60 'extrac04.at:23' \ "extract + fnmatch" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "58. $at_setup_line: testing $at_desc ..." + $as_echo "60. $at_setup_line: testing $at_desc ..." $at_traceon @@ -14484,14 +14949,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_58 -#AT_START_59 -at_fn_group_banner 59 'extrac05.at:30' \ +#AT_STOP_60 +#AT_START_61 +at_fn_group_banner 61 'extrac05.at:30' \ "extracting selected members from pax" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "59. $at_setup_line: testing $at_desc ..." + $as_echo "61. $at_setup_line: testing $at_desc ..." $at_traceon @@ -14573,14 +15038,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_59 -#AT_START_60 -at_fn_group_banner 60 'extrac06.at:34' \ +#AT_STOP_61 +#AT_START_62 +at_fn_group_banner 62 'extrac06.at:34' \ "mode of extracted directories" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "60. $at_setup_line: testing $at_desc ..." + $as_echo "62. $at_setup_line: testing $at_desc ..." $at_traceon @@ -15044,14 +15509,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_60 -#AT_START_61 -at_fn_group_banner 61 'extrac07.at:27' \ +#AT_STOP_62 +#AT_START_63 +at_fn_group_banner 63 'extrac07.at:27' \ "extracting symlinks to a read-only dir" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "61. $at_setup_line: testing $at_desc ..." + $as_echo "63. $at_setup_line: testing $at_desc ..." $at_traceon @@ -15152,14 +15617,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_61 -#AT_START_62 -at_fn_group_banner 62 'extrac08.at:33' \ +#AT_STOP_63 +#AT_START_64 +at_fn_group_banner 64 'extrac08.at:33' \ "restoring mode on existing directory" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "62. $at_setup_line: testing $at_desc ..." + $as_echo "64. $at_setup_line: testing $at_desc ..." $at_traceon @@ -15428,14 +15893,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_62 -#AT_START_63 -at_fn_group_banner 63 'extrac09.at:24' \ - "no need to save dir with unreadable . and .." " " 9 +#AT_STOP_64 +#AT_START_65 +at_fn_group_banner 65 'extrac09.at:34' \ + "extracting even when . and .. are unreadable" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "63. $at_setup_line: testing $at_desc ..." + $as_echo "65. $at_setup_line: testing $at_desc ..." $at_traceon @@ -15443,7 +15908,7 @@ at_xfail=no { set +x -$as_echo "$at_srcdir/extrac09.at:27: +$as_echo "$at_srcdir/extrac09.at:37: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -15476,7 +15941,7 @@ chmod a+r . .. cmp f extract/f || status=\$? exit \$status )" -at_fn_check_prepare_notrace 'an embedded newline' "extrac09.at:27" +at_fn_check_prepare_notrace 'an embedded newline' "extrac09.at:37" ( $at_check_trace; mkdir gnu (cd gnu @@ -15517,7 +15982,7 @@ at_fn_diff_devnull "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "f " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/extrac09.at:27" +at_fn_check_status 0 $at_status "$at_srcdir/extrac09.at:37" $at_failed && at_fn_log_failure $at_traceon; } @@ -15528,14 +15993,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_63 -#AT_START_64 -at_fn_group_banner 64 'extrac10.at:29' \ +#AT_STOP_65 +#AT_START_66 +at_fn_group_banner 66 'extrac10.at:29' \ "-C and delayed setting of metadata" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "64. $at_setup_line: testing $at_desc ..." + $as_echo "66. $at_setup_line: testing $at_desc ..." $at_traceon @@ -15596,14 +16061,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_64 -#AT_START_65 -at_fn_group_banner 65 'extrac11.at:25' \ +#AT_STOP_66 +#AT_START_67 +at_fn_group_banner 67 'extrac11.at:25' \ "scarce file descriptors" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "65. $at_setup_line: testing $at_desc ..." + $as_echo "67. $at_setup_line: testing $at_desc ..." $at_traceon @@ -15756,14 +16221,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_65 -#AT_START_66 -at_fn_group_banner 66 'extrac12.at:25' \ +#AT_STOP_67 +#AT_START_68 +at_fn_group_banner 68 'extrac12.at:25' \ "extract dot permissions" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "66. $at_setup_line: testing $at_desc ..." + $as_echo "68. $at_setup_line: testing $at_desc ..." $at_traceon @@ -15826,14 +16291,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_66 -#AT_START_67 -at_fn_group_banner 67 'extrac13.at:26' \ +#AT_STOP_68 +#AT_START_69 +at_fn_group_banner 69 'extrac13.at:26' \ "extract over symlinks" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "67. $at_setup_line: testing $at_desc ..." + $as_echo "69. $at_setup_line: testing $at_desc ..." $at_traceon @@ -15922,14 +16387,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_67 -#AT_START_68 -at_fn_group_banner 68 'extrac14.at:25' \ +#AT_STOP_69 +#AT_START_70 +at_fn_group_banner 70 'extrac14.at:25' \ "extract -C symlink" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "68. $at_setup_line: testing $at_desc ..." + $as_echo "70. $at_setup_line: testing $at_desc ..." $at_traceon @@ -15986,14 +16451,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_68 -#AT_START_69 -at_fn_group_banner 69 'extrac15.at:25' \ +#AT_STOP_70 +#AT_START_71 +at_fn_group_banner 71 'extrac15.at:25' \ "extract parent mkdir failure" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "69. $at_setup_line: testing $at_desc ..." + $as_echo "71. $at_setup_line: testing $at_desc ..." $at_traceon @@ -16078,14 +16543,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_69 -#AT_START_70 -at_fn_group_banner 70 'extrac16.at:26' \ +#AT_STOP_71 +#AT_START_72 +at_fn_group_banner 72 'extrac16.at:26' \ "extract empty directory with -C" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "70. $at_setup_line: testing $at_desc ..." + $as_echo "72. $at_setup_line: testing $at_desc ..." $at_traceon @@ -16140,14 +16605,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_70 -#AT_START_71 -at_fn_group_banner 71 'extrac17.at:21' \ +#AT_STOP_72 +#AT_START_73 +at_fn_group_banner 73 'extrac17.at:21' \ "name matching/transformation ordering" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "71. $at_setup_line: testing $at_desc ..." + $as_echo "73. $at_setup_line: testing $at_desc ..." $at_traceon @@ -16416,14 +16881,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_71 -#AT_START_72 -at_fn_group_banner 72 'extrac18.at:34' \ +#AT_STOP_73 +#AT_START_74 +at_fn_group_banner 74 'extrac18.at:34' \ "keep-old-files" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "72. $at_setup_line: testing $at_desc ..." + $as_echo "74. $at_setup_line: testing $at_desc ..." $at_traceon @@ -16762,14 +17227,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_72 -#AT_START_73 -at_fn_group_banner 73 'extrac19.at:21' \ +#AT_STOP_74 +#AT_START_75 +at_fn_group_banner 75 'extrac19.at:21' \ "skip-old-files" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "73. $at_setup_line: testing $at_desc ..." + $as_echo "75. $at_setup_line: testing $at_desc ..." $at_traceon @@ -17093,14 +17558,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_73 -#AT_START_74 -at_fn_group_banner 74 'backup01.at:33' \ +#AT_STOP_75 +#AT_START_76 +at_fn_group_banner 76 'backup01.at:33' \ "extracting existing dir with --backup" " " 9 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "74. $at_setup_line: testing $at_desc ..." + $as_echo "76. $at_setup_line: testing $at_desc ..." $at_traceon @@ -17344,14 +17809,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_74 -#AT_START_75 -at_fn_group_banner 75 'label01.at:21' \ +#AT_STOP_76 +#AT_START_77 +at_fn_group_banner 77 'label01.at:21' \ "single-volume label" " " 10 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "75. $at_setup_line: testing $at_desc ..." + $as_echo "77. $at_setup_line: testing $at_desc ..." $at_traceon @@ -17494,14 +17959,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_75 -#AT_START_76 -at_fn_group_banner 76 'label02.at:21' \ +#AT_STOP_77 +#AT_START_78 +at_fn_group_banner 78 'label02.at:21' \ "multi-volume label" " " 10 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "76. $at_setup_line: testing $at_desc ..." + $as_echo "78. $at_setup_line: testing $at_desc ..." $at_traceon @@ -17659,14 +18124,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_76 -#AT_START_77 -at_fn_group_banner 77 'label03.at:27' \ +#AT_STOP_78 +#AT_START_79 +at_fn_group_banner 79 'label03.at:27' \ "test-label option" " " 10 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "77. $at_setup_line: testing $at_desc ..." + $as_echo "79. $at_setup_line: testing $at_desc ..." $at_traceon @@ -18004,14 +18469,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_77 -#AT_START_78 -at_fn_group_banner 78 'label04.at:27' \ +#AT_STOP_79 +#AT_START_80 +at_fn_group_banner 80 'label04.at:27' \ "label with non-create option" " " 10 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "78. $at_setup_line: testing $at_desc ..." + $as_echo "80. $at_setup_line: testing $at_desc ..." $at_traceon @@ -18199,14 +18664,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_78 -#AT_START_79 -at_fn_group_banner 79 'label05.at:24' \ +#AT_STOP_80 +#AT_START_81 +at_fn_group_banner 81 'label05.at:24' \ "label with non-create option" " " 10 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "79. $at_setup_line: testing $at_desc ..." + $as_echo "81. $at_setup_line: testing $at_desc ..." $at_traceon @@ -18394,14 +18859,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_79 -#AT_START_80 -at_fn_group_banner 80 'incremental.at:23' \ +#AT_STOP_81 +#AT_START_82 +at_fn_group_banner 82 'incremental.at:23' \ "incremental" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "80. $at_setup_line: testing $at_desc ..." + $as_echo "82. $at_setup_line: testing $at_desc ..." $at_traceon @@ -18679,14 +19144,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_80 -#AT_START_81 -at_fn_group_banner 81 'incr01.at:27' \ +#AT_STOP_82 +#AT_START_83 +at_fn_group_banner 83 'incr01.at:27' \ "restore broken symlinks from incremental" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "81. $at_setup_line: testing $at_desc ..." + $as_echo "83. $at_setup_line: testing $at_desc ..." $at_traceon @@ -18883,14 +19348,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_81 -#AT_START_82 -at_fn_group_banner 82 'incr02.at:32' \ +#AT_STOP_83 +#AT_START_84 +at_fn_group_banner 84 'incr02.at:32' \ "restoring timestamps from incremental" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "82. $at_setup_line: testing $at_desc ..." + $as_echo "84. $at_setup_line: testing $at_desc ..." $at_traceon @@ -19207,14 +19672,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_82 -#AT_START_83 -at_fn_group_banner 83 'listed01.at:26' \ +#AT_STOP_84 +#AT_START_85 +at_fn_group_banner 85 'listed01.at:26' \ "--listed for individual files" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "83. $at_setup_line: testing $at_desc ..." + $as_echo "85. $at_setup_line: testing $at_desc ..." $at_traceon @@ -19394,14 +19859,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_83 -#AT_START_84 -at_fn_group_banner 84 'listed02.at:28' \ +#AT_STOP_85 +#AT_START_86 +at_fn_group_banner 86 'listed02.at:28' \ "working --listed" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "84. $at_setup_line: testing $at_desc ..." + $as_echo "86. $at_setup_line: testing $at_desc ..." $at_traceon @@ -19839,14 +20304,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_84 -#AT_START_85 -at_fn_group_banner 85 'listed03.at:24' \ +#AT_STOP_86 +#AT_START_87 +at_fn_group_banner 87 'listed03.at:24' \ "incremental dump when the parent directory is unreadable" "" 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "85. $at_setup_line: testing $at_desc ..." + $as_echo "87. $at_setup_line: testing $at_desc ..." $at_traceon @@ -19936,14 +20401,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_85 -#AT_START_86 -at_fn_group_banner 86 'listed04.at:26' \ +#AT_STOP_87 +#AT_START_88 +at_fn_group_banner 88 'listed04.at:26' \ "--listed-incremental and --one-file-system" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "86. $at_setup_line: testing $at_desc ..." + $as_echo "88. $at_setup_line: testing $at_desc ..." $at_traceon @@ -20011,14 +20476,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_86 -#AT_START_87 -at_fn_group_banner 87 'listed05.at:33' \ +#AT_STOP_88 +#AT_START_89 +at_fn_group_banner 89 'listed05.at:33' \ "--listed-incremental and remounted directories" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "87. $at_setup_line: testing $at_desc ..." + $as_echo "89. $at_setup_line: testing $at_desc ..." $at_traceon @@ -20139,14 +20604,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_87 -#AT_START_88 -at_fn_group_banner 88 'incr03.at:28' \ +#AT_STOP_89 +#AT_START_90 +at_fn_group_banner 90 'incr03.at:28' \ "renamed files in incrementals" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "88. $at_setup_line: testing $at_desc ..." + $as_echo "90. $at_setup_line: testing $at_desc ..." $at_traceon @@ -20475,14 +20940,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_88 -#AT_START_89 -at_fn_group_banner 89 'incr04.at:29' \ +#AT_STOP_90 +#AT_START_91 +at_fn_group_banner 91 'incr04.at:29' \ "proper icontents initialization" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "89. $at_setup_line: testing $at_desc ..." + $as_echo "91. $at_setup_line: testing $at_desc ..." $at_traceon @@ -21135,14 +21600,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_89 -#AT_START_90 -at_fn_group_banner 90 'incr05.at:21' \ +#AT_STOP_91 +#AT_START_92 +at_fn_group_banner 92 'incr05.at:21' \ "incremental dumps with -C" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "90. $at_setup_line: testing $at_desc ..." + $as_echo "92. $at_setup_line: testing $at_desc ..." $at_traceon @@ -21345,14 +21810,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_90 -#AT_START_91 -at_fn_group_banner 91 'incr06.at:21' \ +#AT_STOP_92 +#AT_START_93 +at_fn_group_banner 93 'incr06.at:21' \ "incremental dumps of nested directories" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "91. $at_setup_line: testing $at_desc ..." + $as_echo "93. $at_setup_line: testing $at_desc ..." $at_traceon @@ -21672,14 +22137,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_91 -#AT_START_92 -at_fn_group_banner 92 'incr07.at:18' \ +#AT_STOP_93 +#AT_START_94 +at_fn_group_banner 94 'incr07.at:18' \ "incremental restores with -C" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "92. $at_setup_line: testing $at_desc ..." + $as_echo "94. $at_setup_line: testing $at_desc ..." $at_traceon @@ -21715,23 +22180,23 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * -mkdir A -echo 'a' > A/a -echo 'a' > A/b +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b decho C0 -tar -g test.snar -vcf test.0.tar A +tar -g test.snar -vcf test.0.tar dirA -echo 'a' > A/c +echo 'a' > dirA/c decho C1 -tar -g test.snar -vcf test.1.tar A +tar -g test.snar -vcf test.1.tar dirA -rm -f A/a +rm -f dirA/a decho C2 -tar -g test.snar -vcf test.2.tar A +tar -g test.snar -vcf test.2.tar dirA mkdir ext -rm -rf A +rm -rf dirA decho E0 tar -g test.snar -vxf test.0.tar -C ext/ @@ -21741,14 +22206,14 @@ tar -g test.snar -vxf test.1.tar -C ext/ decho E2 tar -g test.snar -vxf test.2.tar -C ext/ -mkdir ext/A/B -touch ext/A/B/file +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file decho E3 tar -g test.snar -vxf test.2.tar -C ext/ echo FIN -test -d A && echo >&2 \"toplevel A exists\" +test -d dirA && echo >&2 \"toplevel dirA exists\" exit 0 )" at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40" @@ -21761,23 +22226,23 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * -mkdir A -echo 'a' > A/a -echo 'a' > A/b +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b decho C0 -tar -g test.snar -vcf test.0.tar A +tar -g test.snar -vcf test.0.tar dirA -echo 'a' > A/c +echo 'a' > dirA/c decho C1 -tar -g test.snar -vcf test.1.tar A +tar -g test.snar -vcf test.1.tar dirA -rm -f A/a +rm -f dirA/a decho C2 -tar -g test.snar -vcf test.2.tar A +tar -g test.snar -vcf test.2.tar dirA mkdir ext -rm -rf A +rm -rf dirA decho E0 tar -g test.snar -vxf test.0.tar -C ext/ @@ -21787,21 +22252,21 @@ tar -g test.snar -vxf test.1.tar -C ext/ decho E2 tar -g test.snar -vxf test.2.tar -C ext/ -mkdir ext/A/B -touch ext/A/B/file +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file decho E3 tar -g test.snar -vxf test.2.tar -C ext/ echo FIN -test -d A && echo >&2 "toplevel A exists" +test -d dirA && echo >&2 "toplevel dirA exists" exit 0 ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo >>"$at_stderr"; $as_echo "C0 -tar: A: Directory is new +tar: dirA: Directory is new C1 C2 E0 @@ -21811,27 +22276,27 @@ E3 " | \ $at_diff - "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "C0 -A/ -A/a -A/b +dirA/ +dirA/a +dirA/b C1 -A/ -A/c +dirA/ +dirA/c C2 -A/ +dirA/ E0 -A/ -A/a -A/b +dirA/ +dirA/a +dirA/b E1 -A/ -A/c +dirA/ +dirA/c E2 -A/ -tar: Deleting 'A/a' +dirA/ +tar: Deleting 'dirA/a' E3 -A/ -tar: Deleting 'A/B' +dirA/ +tar: Deleting 'dirA/dirB' FIN " | \ $at_diff - "$at_stdout" || at_failed=: @@ -21849,23 +22314,23 @@ TAR_OPTIONS=\"-H oldgnu\" export TAR_OPTIONS rm -rf * -mkdir A -echo 'a' > A/a -echo 'a' > A/b +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b decho C0 -tar -g test.snar -vcf test.0.tar A +tar -g test.snar -vcf test.0.tar dirA -echo 'a' > A/c +echo 'a' > dirA/c decho C1 -tar -g test.snar -vcf test.1.tar A +tar -g test.snar -vcf test.1.tar dirA -rm -f A/a +rm -f dirA/a decho C2 -tar -g test.snar -vcf test.2.tar A +tar -g test.snar -vcf test.2.tar dirA mkdir ext -rm -rf A +rm -rf dirA decho E0 tar -g test.snar -vxf test.0.tar -C ext/ @@ -21875,14 +22340,14 @@ tar -g test.snar -vxf test.1.tar -C ext/ decho E2 tar -g test.snar -vxf test.2.tar -C ext/ -mkdir ext/A/B -touch ext/A/B/file +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file decho E3 tar -g test.snar -vxf test.2.tar -C ext/ echo FIN -test -d A && echo >&2 \"toplevel A exists\" +test -d dirA && echo >&2 \"toplevel dirA exists\" exit 0 )" at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40" @@ -21895,23 +22360,23 @@ TAR_OPTIONS="-H oldgnu" export TAR_OPTIONS rm -rf * -mkdir A -echo 'a' > A/a -echo 'a' > A/b +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b decho C0 -tar -g test.snar -vcf test.0.tar A +tar -g test.snar -vcf test.0.tar dirA -echo 'a' > A/c +echo 'a' > dirA/c decho C1 -tar -g test.snar -vcf test.1.tar A +tar -g test.snar -vcf test.1.tar dirA -rm -f A/a +rm -f dirA/a decho C2 -tar -g test.snar -vcf test.2.tar A +tar -g test.snar -vcf test.2.tar dirA mkdir ext -rm -rf A +rm -rf dirA decho E0 tar -g test.snar -vxf test.0.tar -C ext/ @@ -21921,21 +22386,21 @@ tar -g test.snar -vxf test.1.tar -C ext/ decho E2 tar -g test.snar -vxf test.2.tar -C ext/ -mkdir ext/A/B -touch ext/A/B/file +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file decho E3 tar -g test.snar -vxf test.2.tar -C ext/ echo FIN -test -d A && echo >&2 "toplevel A exists" +test -d dirA && echo >&2 "toplevel dirA exists" exit 0 ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo >>"$at_stderr"; $as_echo "C0 -tar: A: Directory is new +tar: dirA: Directory is new C1 C2 E0 @@ -21945,27 +22410,27 @@ E3 " | \ $at_diff - "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "C0 -A/ -A/a -A/b +dirA/ +dirA/a +dirA/b C1 -A/ -A/c +dirA/ +dirA/c C2 -A/ +dirA/ E0 -A/ -A/a -A/b +dirA/ +dirA/a +dirA/b E1 -A/ -A/c +dirA/ +dirA/c E2 -A/ -tar: Deleting 'A/a' +dirA/ +tar: Deleting 'dirA/a' E3 -A/ -tar: Deleting 'A/B' +dirA/ +tar: Deleting 'dirA/dirB' FIN " | \ $at_diff - "$at_stdout" || at_failed=: @@ -21983,23 +22448,23 @@ TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -mkdir A -echo 'a' > A/a -echo 'a' > A/b +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b decho C0 -tar -g test.snar -vcf test.0.tar A +tar -g test.snar -vcf test.0.tar dirA -echo 'a' > A/c +echo 'a' > dirA/c decho C1 -tar -g test.snar -vcf test.1.tar A +tar -g test.snar -vcf test.1.tar dirA -rm -f A/a +rm -f dirA/a decho C2 -tar -g test.snar -vcf test.2.tar A +tar -g test.snar -vcf test.2.tar dirA mkdir ext -rm -rf A +rm -rf dirA decho E0 tar -g test.snar -vxf test.0.tar -C ext/ @@ -22009,14 +22474,14 @@ tar -g test.snar -vxf test.1.tar -C ext/ decho E2 tar -g test.snar -vxf test.2.tar -C ext/ -mkdir ext/A/B -touch ext/A/B/file +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file decho E3 tar -g test.snar -vxf test.2.tar -C ext/ echo FIN -test -d A && echo >&2 \"toplevel A exists\" +test -d dirA && echo >&2 \"toplevel dirA exists\" exit 0 )" at_fn_check_prepare_notrace 'an embedded newline' "incr07.at:40" @@ -22029,23 +22494,23 @@ TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -mkdir A -echo 'a' > A/a -echo 'a' > A/b +mkdir dirA +echo 'a' > dirA/a +echo 'a' > dirA/b decho C0 -tar -g test.snar -vcf test.0.tar A +tar -g test.snar -vcf test.0.tar dirA -echo 'a' > A/c +echo 'a' > dirA/c decho C1 -tar -g test.snar -vcf test.1.tar A +tar -g test.snar -vcf test.1.tar dirA -rm -f A/a +rm -f dirA/a decho C2 -tar -g test.snar -vcf test.2.tar A +tar -g test.snar -vcf test.2.tar dirA mkdir ext -rm -rf A +rm -rf dirA decho E0 tar -g test.snar -vxf test.0.tar -C ext/ @@ -22055,21 +22520,21 @@ tar -g test.snar -vxf test.1.tar -C ext/ decho E2 tar -g test.snar -vxf test.2.tar -C ext/ -mkdir ext/A/B -touch ext/A/B/file +mkdir ext/dirA/dirB +touch ext/dirA/dirB/file decho E3 tar -g test.snar -vxf test.2.tar -C ext/ echo FIN -test -d A && echo >&2 "toplevel A exists" +test -d dirA && echo >&2 "toplevel dirA exists" exit 0 ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo >>"$at_stderr"; $as_echo "C0 -tar: A: Directory is new +tar: dirA: Directory is new C1 C2 E0 @@ -22079,27 +22544,27 @@ E3 " | \ $at_diff - "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "C0 -A/ -A/a -A/b +dirA/ +dirA/a +dirA/b C1 -A/ -A/c +dirA/ +dirA/c C2 -A/ +dirA/ E0 -A/ -A/a -A/b +dirA/ +dirA/a +dirA/b E1 -A/ -A/c +dirA/ +dirA/c E2 -A/ -tar: Deleting 'A/a' +dirA/ +tar: Deleting 'dirA/a' E3 -A/ -tar: Deleting 'A/B' +dirA/ +tar: Deleting 'dirA/dirB' FIN " | \ $at_diff - "$at_stdout" || at_failed=: @@ -22114,14 +22579,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_92 -#AT_START_93 -at_fn_group_banner 93 'incr08.at:38' \ +#AT_STOP_94 +#AT_START_95 +at_fn_group_banner 95 'incr08.at:38' \ "filename normalization" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "93. $at_setup_line: testing $at_desc ..." + $as_echo "95. $at_setup_line: testing $at_desc ..." $at_traceon @@ -22227,14 +22692,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_93 -#AT_START_94 -at_fn_group_banner 94 'incr09.at:26' \ +#AT_STOP_95 +#AT_START_96 +at_fn_group_banner 96 'incr09.at:26' \ "incremental with alternating -C" " " 11 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "94. $at_setup_line: testing $at_desc ..." + $as_echo "96. $at_setup_line: testing $at_desc ..." $at_traceon @@ -22329,14 +22794,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_94 -#AT_START_95 -at_fn_group_banner 95 'filerem01.at:36' \ +#AT_STOP_96 +#AT_START_97 +at_fn_group_banner 97 'filerem01.at:36' \ "file removed as we read it (ca. 22 seconds)" " " 12 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "95. $at_setup_line: testing $at_desc ..." + $as_echo "97. $at_setup_line: testing $at_desc ..." $at_traceon @@ -22501,14 +22966,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_95 -#AT_START_96 -at_fn_group_banner 96 'filerem02.at:26' \ +#AT_STOP_97 +#AT_START_98 +at_fn_group_banner 98 'filerem02.at:26' \ "toplevel file removed (ca. 24 seconds)" " " 12 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "96. $at_setup_line: testing $at_desc ..." + $as_echo "98. $at_setup_line: testing $at_desc ..." $at_traceon @@ -22633,14 +23098,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_96 -#AT_START_97 -at_fn_group_banner 97 'rename01.at:24' \ +#AT_STOP_98 +#AT_START_99 +at_fn_group_banner 99 'rename01.at:24' \ "renamed dirs in incrementals" " " 13 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "97. $at_setup_line: testing $at_desc ..." + $as_echo "99. $at_setup_line: testing $at_desc ..." $at_traceon @@ -23011,14 +23476,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_97 -#AT_START_98 -at_fn_group_banner 98 'rename02.at:24' \ +#AT_STOP_99 +#AT_START_100 +at_fn_group_banner 100 'rename02.at:24' \ "move between hierarchies" " " 13 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "98. $at_setup_line: testing $at_desc ..." + $as_echo "100. $at_setup_line: testing $at_desc ..." $at_traceon @@ -23446,14 +23911,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_98 -#AT_START_99 -at_fn_group_banner 99 'rename03.at:23' \ +#AT_STOP_100 +#AT_START_101 +at_fn_group_banner 101 'rename03.at:23' \ "cyclic renames" " " 13 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "99. $at_setup_line: testing $at_desc ..." + $as_echo "101. $at_setup_line: testing $at_desc ..." $at_traceon @@ -23992,14 +24457,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_99 -#AT_START_100 -at_fn_group_banner 100 'rename04.at:27' \ +#AT_STOP_101 +#AT_START_102 +at_fn_group_banner 102 'rename04.at:27' \ "renamed directory containing subdirectories" " " 13 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "100. $at_setup_line: testing $at_desc ..." + $as_echo "102. $at_setup_line: testing $at_desc ..." $at_traceon @@ -24331,14 +24796,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_100 -#AT_START_101 -at_fn_group_banner 101 'rename05.at:24' \ +#AT_STOP_102 +#AT_START_103 +at_fn_group_banner 103 'rename05.at:24' \ "renamed subdirectories" " " 13 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "101. $at_setup_line: testing $at_desc ..." + $as_echo "103. $at_setup_line: testing $at_desc ..." $at_traceon @@ -24676,14 +25141,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_101 -#AT_START_102 -at_fn_group_banner 102 'chtype.at:27' \ +#AT_STOP_103 +#AT_START_104 +at_fn_group_banner 104 'chtype.at:27' \ "changed file types in incrementals" " " 13 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "102. $at_setup_line: testing $at_desc ..." + $as_echo "104. $at_setup_line: testing $at_desc ..." $at_traceon @@ -25000,14 +25465,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_102 -#AT_START_103 -at_fn_group_banner 103 'ignfail.at:23' \ +#AT_STOP_104 +#AT_START_105 +at_fn_group_banner 105 'ignfail.at:23' \ "ignfail" " " 14 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "103. $at_setup_line: testing $at_desc ..." + $as_echo "105. $at_setup_line: testing $at_desc ..." $at_traceon @@ -25641,14 +26106,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_103 -#AT_START_104 -at_fn_group_banner 104 'link01.at:33' \ +#AT_STOP_105 +#AT_START_106 +at_fn_group_banner 106 'link01.at:33' \ "link count gt 2" " " 15 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "104. $at_setup_line: testing $at_desc ..." + $as_echo "106. $at_setup_line: testing $at_desc ..." $at_traceon @@ -25957,14 +26422,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_104 -#AT_START_105 -at_fn_group_banner 105 'link02.at:32' \ +#AT_STOP_106 +#AT_START_107 +at_fn_group_banner 107 'link02.at:32' \ "preserve hard links with --remove-files" " " 15 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "105. $at_setup_line: testing $at_desc ..." + $as_echo "107. $at_setup_line: testing $at_desc ..." $at_traceon @@ -26213,14 +26678,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_105 -#AT_START_106 -at_fn_group_banner 106 'link03.at:24' \ +#AT_STOP_107 +#AT_START_108 +at_fn_group_banner 108 'link03.at:24' \ "working -l with --remove-files" " " 15 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "106. $at_setup_line: testing $at_desc ..." + $as_echo "108. $at_setup_line: testing $at_desc ..." $at_traceon @@ -26612,14 +27077,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_106 -#AT_START_107 -at_fn_group_banner 107 'link04.at:29' \ +#AT_STOP_108 +#AT_START_109 +at_fn_group_banner 109 'link04.at:29' \ "link count is 1 but multiple occurrences" " " 15 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "107. $at_setup_line: testing $at_desc ..." + $as_echo "109. $at_setup_line: testing $at_desc ..." $at_traceon @@ -27013,14 +27478,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_107 -#AT_START_108 -at_fn_group_banner 108 'longv7.at:24' \ +#AT_STOP_109 +#AT_START_110 +at_fn_group_banner 110 'longv7.at:24' \ "long names in V7 archives" " " 16 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "108. $at_setup_line: testing $at_desc ..." + $as_echo "110. $at_setup_line: testing $at_desc ..." $at_traceon @@ -27088,14 +27553,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_108 -#AT_START_109 -at_fn_group_banner 109 'long01.at:28' \ +#AT_STOP_110 +#AT_START_111 +at_fn_group_banner 111 'long01.at:28' \ "long file names divisible by block size" " " 16 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "109. $at_setup_line: testing $at_desc ..." + $as_echo "111. $at_setup_line: testing $at_desc ..." $at_traceon @@ -27203,14 +27668,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_109 -#AT_START_110 -at_fn_group_banner 110 'lustar01.at:21' \ +#AT_STOP_111 +#AT_START_112 +at_fn_group_banner 112 'lustar01.at:21' \ "ustar: unsplittable file name" " " 16 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "110. $at_setup_line: testing $at_desc ..." + $as_echo "112. $at_setup_line: testing $at_desc ..." $at_traceon @@ -27265,14 +27730,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_110 -#AT_START_111 -at_fn_group_banner 111 'lustar02.at:21' \ +#AT_STOP_112 +#AT_START_113 +at_fn_group_banner 113 'lustar02.at:21' \ "ustar: unsplittable path name" " " 16 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "111. $at_setup_line: testing $at_desc ..." + $as_echo "113. $at_setup_line: testing $at_desc ..." $at_traceon @@ -27336,14 +27801,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_111 -#AT_START_112 -at_fn_group_banner 112 'lustar03.at:21' \ +#AT_STOP_113 +#AT_START_114 +at_fn_group_banner 114 'lustar03.at:21' \ "ustar: splitting long names" " " 16 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "112. $at_setup_line: testing $at_desc ..." + $as_echo "114. $at_setup_line: testing $at_desc ..." $at_traceon @@ -27409,13 +27874,13 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_112 -#AT_START_113 -at_fn_group_banner 113 'old.at:23' \ +#AT_STOP_114 +#AT_START_115 +at_fn_group_banner 115 'old.at:23' \ "old archives" " " 16 at_xfail=no ( - $as_echo "113. $at_setup_line: testing $at_desc ..." + $as_echo "115. $at_setup_line: testing $at_desc ..." $at_traceon @@ -27450,14 +27915,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_113 -#AT_START_114 -at_fn_group_banner 114 'time01.at:20' \ +#AT_STOP_115 +#AT_START_116 +at_fn_group_banner 116 'time01.at:20' \ "time: tricky time stamps" " " 16 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "114. $at_setup_line: testing $at_desc ..." + $as_echo "116. $at_setup_line: testing $at_desc ..." $at_traceon @@ -27584,14 +28049,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_114 -#AT_START_115 -at_fn_group_banner 115 'multiv01.at:23' \ +#AT_STOP_116 +#AT_START_117 +at_fn_group_banner 117 'multiv01.at:24' \ "multivolume dumps from pipes" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "115. $at_setup_line: testing $at_desc ..." + $as_echo "117. $at_setup_line: testing $at_desc ..." $at_traceon @@ -27603,7 +28068,7 @@ at_xfail=no { set +x -$as_echo "$at_srcdir/multiv01.at:30: +$as_echo "$at_srcdir/multiv01.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -27641,7 +28106,7 @@ PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ cmp file1 extract-dir-pipe/file1 cmp file2 extract-dir-pipe/file2 )" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31" ( $at_check_trace; mkdir gnu (cd gnu @@ -27685,12 +28150,12 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30" +at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/multiv01.at:30: +$as_echo "$at_srcdir/multiv01.at:31: mkdir oldgnu (cd oldgnu TEST_TAR_FORMAT=oldgnu @@ -27728,7 +28193,7 @@ PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ cmp file1 extract-dir-pipe/file1 cmp file2 extract-dir-pipe/file2 )" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31" ( $at_check_trace; mkdir oldgnu (cd oldgnu @@ -27772,12 +28237,12 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30" +at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/multiv01.at:30: +$as_echo "$at_srcdir/multiv01.at:31: mkdir pax (cd pax TEST_TAR_FORMAT=pax @@ -27815,7 +28280,7 @@ PATH=\$PATH \${TRUSS} tar -f t1-pipe.tar -f - \\ cmp file1 extract-dir-pipe/file1 cmp file2 extract-dir-pipe/file2 )" -at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:30" +at_fn_check_prepare_notrace 'a ${...} parameter expansion' "multiv01.at:31" ( $at_check_trace; mkdir pax (cd pax @@ -27859,7 +28324,7 @@ at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: at_fn_diff_devnull "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:30" +at_fn_check_status 0 $at_status "$at_srcdir/multiv01.at:31" $at_failed && at_fn_log_failure $at_traceon; } @@ -27870,14 +28335,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_115 -#AT_START_116 -at_fn_group_banner 116 'multiv02.at:28' \ +#AT_STOP_117 +#AT_START_118 +at_fn_group_banner 118 'multiv02.at:28' \ "skipping a straddling member" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "116. $at_setup_line: testing $at_desc ..." + $as_echo "118. $at_setup_line: testing $at_desc ..." $at_traceon @@ -28053,14 +28518,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_116 -#AT_START_117 -at_fn_group_banner 117 'multiv03.at:30' \ +#AT_STOP_118 +#AT_START_119 +at_fn_group_banner 119 'multiv03.at:30' \ "MV archive & long filenames" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "117. $at_setup_line: testing $at_desc ..." + $as_echo "119. $at_setup_line: testing $at_desc ..." $at_traceon @@ -28256,14 +28721,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_117 -#AT_START_118 -at_fn_group_banner 118 'multiv04.at:36' \ +#AT_STOP_119 +#AT_START_120 +at_fn_group_banner 120 'multiv04.at:36' \ "split directory members in a MV archive" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "118. $at_setup_line: testing $at_desc ..." + $as_echo "120. $at_setup_line: testing $at_desc ..." $at_traceon @@ -28413,14 +28878,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_118 -#AT_START_119 -at_fn_group_banner 119 'multiv05.at:26' \ +#AT_STOP_120 +#AT_START_121 +at_fn_group_banner 121 'multiv05.at:26' \ "Restoring after an out of sync volume" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "119. $at_setup_line: testing $at_desc ..." + $as_echo "121. $at_setup_line: testing $at_desc ..." $at_traceon @@ -28540,14 +29005,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_119 -#AT_START_120 -at_fn_group_banner 120 'multiv06.at:27' \ +#AT_STOP_121 +#AT_START_122 +at_fn_group_banner 122 'multiv06.at:27' \ "Multivolumes with L=record_size" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "120. $at_setup_line: testing $at_desc ..." + $as_echo "122. $at_setup_line: testing $at_desc ..." $at_traceon @@ -28665,14 +29130,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_120 -#AT_START_121 -at_fn_group_banner 121 'multiv07.at:28' \ +#AT_STOP_122 +#AT_START_123 +at_fn_group_banner 123 'multiv07.at:28' \ "volumes split at an extended header" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "121. $at_setup_line: testing $at_desc ..." + $as_echo "123. $at_setup_line: testing $at_desc ..." $at_traceon @@ -28725,14 +29190,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_121 -#AT_START_122 -at_fn_group_banner 122 'multiv08.at:25' \ +#AT_STOP_123 +#AT_START_124 +at_fn_group_banner 124 'multiv08.at:25' \ "multivolume header creation" " " 17 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "122. $at_setup_line: testing $at_desc ..." + $as_echo "124. $at_setup_line: testing $at_desc ..." $at_traceon @@ -28798,14 +29263,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_122 -#AT_START_123 -at_fn_group_banner 123 'owner.at:21' \ +#AT_STOP_124 +#AT_START_125 +at_fn_group_banner 125 'owner.at:21' \ "--owner and --group" " " 18 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "123. $at_setup_line: testing $at_desc ..." + $as_echo "125. $at_setup_line: testing $at_desc ..." $at_traceon @@ -28877,14 +29342,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_123 -#AT_START_124 -at_fn_group_banner 124 'sparse01.at:21' \ +#AT_STOP_125 +#AT_START_126 +at_fn_group_banner 126 'sparse01.at:21' \ "sparse files" " " 19 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "124. $at_setup_line: testing $at_desc ..." + $as_echo "126. $at_setup_line: testing $at_desc ..." $at_traceon @@ -29081,14 +29546,14 @@ done $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_124 -#AT_START_125 -at_fn_group_banner 125 'sparse02.at:21' \ +#AT_STOP_126 +#AT_START_127 +at_fn_group_banner 127 'sparse02.at:21' \ "extracting sparse file over a pipe" " " 19 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "125. $at_setup_line: testing $at_desc ..." + $as_echo "127. $at_setup_line: testing $at_desc ..." $at_traceon @@ -29241,14 +29706,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_125 -#AT_START_126 -at_fn_group_banner 126 'sparse03.at:21' \ +#AT_STOP_127 +#AT_START_128 +at_fn_group_banner 128 'sparse03.at:21' \ "storing sparse files > 8G" " " 19 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "126. $at_setup_line: testing $at_desc ..." + $as_echo "128. $at_setup_line: testing $at_desc ..." $at_traceon @@ -29340,14 +29805,14 @@ done $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_126 -#AT_START_127 -at_fn_group_banner 127 'sparse04.at:21' \ +#AT_STOP_128 +#AT_START_129 +at_fn_group_banner 129 'sparse04.at:21' \ "storing long sparse file names" " " 19 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "127. $at_setup_line: testing $at_desc ..." + $as_echo "129. $at_setup_line: testing $at_desc ..." $at_traceon @@ -29409,14 +29874,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_127 -#AT_START_128 -at_fn_group_banner 128 'sparsemv.at:21' \ +#AT_STOP_129 +#AT_START_130 +at_fn_group_banner 130 'sparsemv.at:21' \ "sparse files in MV archives" " " 19 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "128. $at_setup_line: testing $at_desc ..." + $as_echo "130. $at_setup_line: testing $at_desc ..." $at_traceon @@ -29593,14 +30058,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_128 -#AT_START_129 -at_fn_group_banner 129 'spmvp00.at:21' \ +#AT_STOP_130 +#AT_START_131 +at_fn_group_banner 131 'spmvp00.at:21' \ "sparse files in PAX MV archives, v.0.0" " " 19 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "129. $at_setup_line: testing $at_desc ..." + $as_echo "131. $at_setup_line: testing $at_desc ..." $at_traceon @@ -29693,14 +30158,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_129 -#AT_START_130 -at_fn_group_banner 130 'spmvp01.at:21' \ +#AT_STOP_131 +#AT_START_132 +at_fn_group_banner 132 'spmvp01.at:21' \ "sparse files in PAX MV archives, v.0.1" " " 19 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "130. $at_setup_line: testing $at_desc ..." + $as_echo "132. $at_setup_line: testing $at_desc ..." $at_traceon @@ -29793,14 +30258,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_130 -#AT_START_131 -at_fn_group_banner 131 'spmvp10.at:21' \ +#AT_STOP_132 +#AT_START_133 +at_fn_group_banner 133 'spmvp10.at:21' \ "sparse files in PAX MV archives, v.1.0" " " 19 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "131. $at_setup_line: testing $at_desc ..." + $as_echo "133. $at_setup_line: testing $at_desc ..." $at_traceon @@ -29893,14 +30358,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_131 -#AT_START_132 -at_fn_group_banner 132 'update.at:28' \ +#AT_STOP_133 +#AT_START_134 +at_fn_group_banner 134 'update.at:28' \ "update unchanged directories" " " 20 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "132. $at_setup_line: testing $at_desc ..." + $as_echo "134. $at_setup_line: testing $at_desc ..." $at_traceon @@ -30219,14 +30684,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_132 -#AT_START_133 -at_fn_group_banner 133 'update01.at:29' \ +#AT_STOP_134 +#AT_START_135 +at_fn_group_banner 135 'update01.at:29' \ "update directories" " " 20 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "133. $at_setup_line: testing $at_desc ..." + $as_echo "135. $at_setup_line: testing $at_desc ..." $at_traceon @@ -30590,14 +31055,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_133 -#AT_START_134 -at_fn_group_banner 134 'update02.at:26' \ +#AT_STOP_135 +#AT_START_136 +at_fn_group_banner 136 'update02.at:26' \ "update changed files" " " 20 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "134. $at_setup_line: testing $at_desc ..." + $as_echo "136. $at_setup_line: testing $at_desc ..." $at_traceon @@ -30961,14 +31426,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_134 -#AT_START_135 -at_fn_group_banner 135 'verify.at:25' \ +#AT_STOP_136 +#AT_START_137 +at_fn_group_banner 137 'verify.at:25' \ "verify" " " 21 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "135. $at_setup_line: testing $at_desc ..." + $as_echo "137. $at_setup_line: testing $at_desc ..." $at_traceon @@ -31172,14 +31637,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_135 -#AT_START_136 -at_fn_group_banner 136 'volume.at:23' \ +#AT_STOP_137 +#AT_START_138 +at_fn_group_banner 138 'volume.at:23' \ "volume" " " 22 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "136. $at_setup_line: testing $at_desc ..." + $as_echo "138. $at_setup_line: testing $at_desc ..." $at_traceon @@ -31335,14 +31800,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_136 -#AT_START_137 -at_fn_group_banner 137 'volsize.at:29' \ +#AT_STOP_138 +#AT_START_139 +at_fn_group_banner 139 'volsize.at:29' \ "volume header size" " " 22 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "137. $at_setup_line: testing $at_desc ..." + $as_echo "139. $at_setup_line: testing $at_desc ..." $at_traceon @@ -31701,14 +32166,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_137 -#AT_START_138 -at_fn_group_banner 138 'comprec.at:21' \ +#AT_STOP_139 +#AT_START_140 +at_fn_group_banner 140 'comprec.at:21' \ "compressed format recognition" " " 23 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "138. $at_setup_line: testing $at_desc ..." + $as_echo "140. $at_setup_line: testing $at_desc ..." $at_traceon @@ -31998,14 +32463,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_138 -#AT_START_139 -at_fn_group_banner 139 'shortfile.at:26' \ +#AT_STOP_140 +#AT_START_141 +at_fn_group_banner 141 'shortfile.at:26' \ "short input files" " " 23 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "139. $at_setup_line: testing $at_desc ..." + $as_echo "141. $at_setup_line: testing $at_desc ..." $at_traceon @@ -32057,14 +32522,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_139 -#AT_START_140 -at_fn_group_banner 140 'shortupd.at:31' \ +#AT_STOP_141 +#AT_START_142 +at_fn_group_banner 142 'shortupd.at:31' \ "updating short archives" " " 23 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "140. $at_setup_line: testing $at_desc ..." + $as_echo "142. $at_setup_line: testing $at_desc ..." $at_traceon @@ -32253,14 +32718,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_140 -#AT_START_141 -at_fn_group_banner 141 'truncate.at:29' \ +#AT_STOP_142 +#AT_START_143 +at_fn_group_banner 143 'truncate.at:29' \ "truncate" " " 23 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "141. $at_setup_line: testing $at_desc ..." + $as_echo "143. $at_setup_line: testing $at_desc ..." $at_traceon @@ -32539,14 +33004,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_141 -#AT_START_142 -at_fn_group_banner 142 'grow.at:24' \ +#AT_STOP_143 +#AT_START_144 +at_fn_group_banner 144 'grow.at:24' \ "grow" " " 23 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "142. $at_setup_line: testing $at_desc ..." + $as_echo "144. $at_setup_line: testing $at_desc ..." $at_traceon @@ -32770,13 +33235,13 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_142 -#AT_START_143 -at_fn_group_banner 143 'sigpipe.at:21' \ +#AT_STOP_144 +#AT_START_145 +at_fn_group_banner 145 'sigpipe.at:21' \ "sigpipe handling" " " 23 at_xfail=no ( - $as_echo "143. $at_setup_line: testing $at_desc ..." + $as_echo "145. $at_setup_line: testing $at_desc ..." $at_traceon @@ -32835,13 +33300,13 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_143 -#AT_START_144 -at_fn_group_banner 144 'remfiles01.at:28' \ +#AT_STOP_145 +#AT_START_146 +at_fn_group_banner 146 'remfiles01.at:28' \ "remove-files with compression" " " 24 at_xfail=no ( - $as_echo "144. $at_setup_line: testing $at_desc ..." + $as_echo "146. $at_setup_line: testing $at_desc ..." $at_traceon @@ -32961,13 +33426,13 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_144 -#AT_START_145 -at_fn_group_banner 145 'remfiles02.at:28' \ +#AT_STOP_146 +#AT_START_147 +at_fn_group_banner 147 'remfiles02.at:28' \ "remove-files with compression: grand-child" " " 24 at_xfail=no ( - $as_echo "145. $at_setup_line: testing $at_desc ..." + $as_echo "147. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33039,13 +33504,13 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_145 -#AT_START_146 -at_fn_group_banner 146 'remfiles03.at:28' \ +#AT_STOP_147 +#AT_START_148 +at_fn_group_banner 148 'remfiles03.at:28' \ "remove-files with symbolic links" " " 24 at_xfail=no ( - $as_echo "146. $at_setup_line: testing $at_desc ..." + $as_echo "148. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33082,14 +33547,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_146 -#AT_START_147 -at_fn_group_banner 147 'remfiles04a.at:25' \ +#AT_STOP_148 +#AT_START_149 +at_fn_group_banner 149 'remfiles04a.at:25' \ "remove-files with -C:rel in -c/non-incr. mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "147. $at_setup_line: testing $at_desc ..." + $as_echo "149. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33158,14 +33623,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_147 -#AT_START_148 -at_fn_group_banner 148 'remfiles04b.at:33' \ +#AT_STOP_149 +#AT_START_150 +at_fn_group_banner 150 'remfiles04b.at:33' \ "remove-files with -C:rel in -c/incr. mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "148. $at_setup_line: testing $at_desc ..." + $as_echo "150. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33234,14 +33699,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_148 -#AT_START_149 -at_fn_group_banner 149 'remfiles04c.at:33' \ +#AT_STOP_150 +#AT_START_151 +at_fn_group_banner 151 'remfiles04c.at:33' \ "remove-files with -C:rel in -r mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "149. $at_setup_line: testing $at_desc ..." + $as_echo "151. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33322,14 +33787,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_149 -#AT_START_150 -at_fn_group_banner 150 'remfiles05a.at:34' \ +#AT_STOP_151 +#AT_START_152 +at_fn_group_banner 152 'remfiles05a.at:34' \ "remove-files with -C:rel,rel in -c/non-incr. mode" "" 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "150. $at_setup_line: testing $at_desc ..." + $as_echo "152. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33411,14 +33876,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_150 -#AT_START_151 -at_fn_group_banner 151 'remfiles05b.at:25' \ +#AT_STOP_152 +#AT_START_153 +at_fn_group_banner 153 'remfiles05b.at:25' \ "remove-files with -C:rel,rel in -c/incr. mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "151. $at_setup_line: testing $at_desc ..." + $as_echo "153. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33500,14 +33965,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_151 -#AT_START_152 -at_fn_group_banner 152 'remfiles05c.at:25' \ +#AT_STOP_153 +#AT_START_154 +at_fn_group_banner 154 'remfiles05c.at:25' \ "remove-files with -C:rel,rel in -r mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "152. $at_setup_line: testing $at_desc ..." + $as_echo "154. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33604,14 +34069,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_152 -#AT_START_153 -at_fn_group_banner 153 'remfiles06a.at:25' \ +#AT_STOP_154 +#AT_START_155 +at_fn_group_banner 155 'remfiles06a.at:25' \ "remove-files with -C:rel,abs in -c/non-incr. mode" "" 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "153. $at_setup_line: testing $at_desc ..." + $as_echo "155. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33695,14 +34160,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_153 -#AT_START_154 -at_fn_group_banner 154 'remfiles06b.at:25' \ +#AT_STOP_155 +#AT_START_156 +at_fn_group_banner 156 'remfiles06b.at:25' \ "remove-files with -C:rel,abs in -c/incr. mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "154. $at_setup_line: testing $at_desc ..." + $as_echo "156. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33786,14 +34251,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_154 -#AT_START_155 -at_fn_group_banner 155 'remfiles06c.at:25' \ +#AT_STOP_156 +#AT_START_157 +at_fn_group_banner 157 'remfiles06c.at:25' \ "remove-files with -C:rel,abs in -r mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "155. $at_setup_line: testing $at_desc ..." + $as_echo "157. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33823,7 +34288,7 @@ tar -cf foo.tar -C foo file -C \$DIR/bar file decho A find . | sort decho B -tar -rvf foo.tar --remove-files -C foo file -C ../bar file +tar -rvf foo.tar --remove-files -C foo file -C \$DIR/bar file decho C find . | sort )" @@ -33850,7 +34315,7 @@ tar -cf foo.tar -C foo file -C $DIR/bar file decho A find . | sort decho B -tar -rvf foo.tar --remove-files -C foo file -C ../bar file +tar -rvf foo.tar --remove-files -C foo file -C $DIR/bar file decho C find . | sort ) @@ -33892,14 +34357,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_155 -#AT_START_156 -at_fn_group_banner 156 'remfiles07a.at:25' \ - "remove-files with -C:rel,abs in -c/non-incr. mode" "" 24 +#AT_STOP_157 +#AT_START_158 +at_fn_group_banner 158 'remfiles07a.at:25' \ + "remove-files with -C:abs,rel in -c/non-incr. mode" "" 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "156. $at_setup_line: testing $at_desc ..." + $as_echo "158. $at_setup_line: testing $at_desc ..." $at_traceon @@ -33926,7 +34391,7 @@ echo foo/file > foo/file echo bar/file > bar/file DIR=\`pwd\` decho A -tar -cvf foo.tar --remove-files -C foo file -C \$DIR/bar file +tar -cvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file decho B find . | sort )" @@ -33950,7 +34415,7 @@ echo foo/file > foo/file echo bar/file > bar/file DIR=`pwd` decho A -tar -cvf foo.tar --remove-files -C foo file -C $DIR/bar file +tar -cvf foo.tar --remove-files -C $DIR/foo file -C ../bar file decho B find . | sort ) @@ -33983,14 +34448,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_156 -#AT_START_157 -at_fn_group_banner 157 'remfiles07b.at:25' \ - "remove-files with -C:rel,abs in -c/incr. mode" " " 24 +#AT_STOP_158 +#AT_START_159 +at_fn_group_banner 159 'remfiles07b.at:25' \ + "remove-files with -C:abs,rel in -c/incr. mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "157. $at_setup_line: testing $at_desc ..." + $as_echo "159. $at_setup_line: testing $at_desc ..." $at_traceon @@ -34017,7 +34482,7 @@ echo foo/file > foo/file echo bar/file > bar/file DIR=\`pwd\` decho A -tar -cvf foo.tar --incremental --remove-files -C foo file -C \$DIR/bar file +tar -cvf foo.tar --incremental --remove-files -C \$DIR/foo file -C ../bar file decho B find . | sort )" @@ -34041,7 +34506,7 @@ echo foo/file > foo/file echo bar/file > bar/file DIR=`pwd` decho A -tar -cvf foo.tar --incremental --remove-files -C foo file -C $DIR/bar file +tar -cvf foo.tar --incremental --remove-files -C $DIR/foo file -C ../bar file decho B find . | sort ) @@ -34074,14 +34539,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_157 -#AT_START_158 -at_fn_group_banner 158 'remfiles07c.at:25' \ - "remove-files with -C:rel,abs in -r mode" " " 24 +#AT_STOP_159 +#AT_START_160 +at_fn_group_banner 160 'remfiles07c.at:25' \ + "remove-files with -C:abs,rel in -r mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "158. $at_setup_line: testing $at_desc ..." + $as_echo "160. $at_setup_line: testing $at_desc ..." $at_traceon @@ -34107,11 +34572,11 @@ echo file > file echo foo/file > foo/file echo bar/file > bar/file DIR=\`pwd\` -tar -cf foo.tar -C foo file -C \$DIR/bar file +tar -cf foo.tar -C \$DIR/foo file -C ../bar file decho A find . | sort decho B -tar -rvf foo.tar --remove-files -C foo file -C \$DIR/bar file +tar -rvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file decho C find . | sort )" @@ -34134,11 +34599,11 @@ echo file > file echo foo/file > foo/file echo bar/file > bar/file DIR=`pwd` -tar -cf foo.tar -C foo file -C $DIR/bar file +tar -cf foo.tar -C $DIR/foo file -C ../bar file decho A find . | sort decho B -tar -rvf foo.tar --remove-files -C foo file -C $DIR/bar file +tar -rvf foo.tar --remove-files -C $DIR/foo file -C ../bar file decho C find . | sort ) @@ -34180,14 +34645,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_158 -#AT_START_159 -at_fn_group_banner 159 'remfiles08a.at:25' \ - "remove-files with -C:abs,rel in -c/non-incr. mode" "" 24 +#AT_STOP_160 +#AT_START_161 +at_fn_group_banner 161 'remfiles08a.at:28' \ + "remove-files deleting two subdirs in -c/non-incr. mode" "" 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "159. $at_setup_line: testing $at_desc ..." + $as_echo "161. $at_setup_line: testing $at_desc ..." $at_traceon @@ -34195,7 +34660,7 @@ at_xfail=no { set +x -$as_echo "$at_srcdir/remfiles08a.at:28: +$as_echo "$at_srcdir/remfiles08a.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -34204,21 +34669,16 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * - -test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 - mkdir foo mkdir bar -echo file > file -echo foo/file > foo/file -echo bar/file > bar/file -DIR=\`pwd\` +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file decho A -tar -cvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file +tar -cvf foo.tar --remove-files -C foo . -C ../bar . decho B -find . | sort +find . )" -at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08a.at:28" +at_fn_check_prepare_notrace 'an embedded newline' "remfiles08a.at:31" ( $at_check_trace; mkdir gnu (cd gnu @@ -34228,19 +34688,14 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - mkdir foo mkdir bar -echo file > file -echo foo/file > foo/file -echo bar/file > bar/file -DIR=`pwd` +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file decho A -tar -cvf foo.tar --remove-files -C $DIR/foo file -C ../bar file +tar -cvf foo.tar --remove-files -C foo . -C ../bar . decho B -find . | sort +find . ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false @@ -34250,17 +34705,16 @@ B " | \ $at_diff - "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "A -file -file +./ +./foo_file +./ +./bar_file B . -./bar -./file -./foo ./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/remfiles08a.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/remfiles08a.at:31" $at_failed && at_fn_log_failure $at_traceon; } @@ -34271,22 +34725,24 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_159 -#AT_START_160 -at_fn_group_banner 160 'remfiles08b.at:25' \ - "remove-files with -C:abs,rel in -c/incr. mode" " " 24 -at_xfail=no +#AT_STOP_161 +#AT_START_162 +at_fn_group_banner 162 'remfiles08b.at:31' \ + "remove-files deleting two subdirs in -c/incr. mode" "" 24 +at_xfail=yes test -f $XFAILFILE && at_xfail=yes ( - $as_echo "160. $at_setup_line: testing $at_desc ..." + $as_echo "162. $at_setup_line: testing $at_desc ..." $at_traceon + # we expect to fail in tar 1.27 + { set +x -$as_echo "$at_srcdir/remfiles08b.at:28: +$as_echo "$at_srcdir/remfiles08b.at:36: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -34295,21 +34751,16 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * - -test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 - mkdir foo mkdir bar -echo file > file -echo foo/file > foo/file -echo bar/file > bar/file -DIR=\`pwd\` +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file decho A -tar -cvf foo.tar --incremental --remove-files -C \$DIR/foo file -C ../bar file +tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar . decho B -find . | sort +find . )" -at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08b.at:28" +at_fn_check_prepare_notrace 'an embedded newline' "remfiles08b.at:36" ( $at_check_trace; mkdir gnu (cd gnu @@ -34319,39 +34770,35 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - mkdir foo mkdir bar -echo file > file -echo foo/file > foo/file -echo bar/file > bar/file -DIR=`pwd` +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file decho A -tar -cvf foo.tar --incremental --remove-files -C $DIR/foo file -C ../bar file +tar -cvf foo.tar --incremental --remove-files -C foo . -C ../bar . decho B -find . | sort +find . ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter echo >>"$at_stderr"; $as_echo "A +tar: .: Directory is new +tar: .: Directory is new B " | \ $at_diff - "$at_stderr" || at_failed=: echo >>"$at_stdout"; $as_echo "A -file -file +./ +./ +./foo_file +./bar_file B . -./bar -./file -./foo ./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/remfiles08b.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/remfiles08b.at:36" $at_failed && at_fn_log_failure $at_traceon; } @@ -34362,14 +34809,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_160 -#AT_START_161 -at_fn_group_banner 161 'remfiles08c.at:25' \ - "remove-files with -C:abs,rel in -r mode" " " 24 +#AT_STOP_162 +#AT_START_163 +at_fn_group_banner 163 'remfiles08c.at:28' \ + "remove-files deleting two subdirs in -r mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "161. $at_setup_line: testing $at_desc ..." + $as_echo "163. $at_setup_line: testing $at_desc ..." $at_traceon @@ -34377,7 +34824,7 @@ at_xfail=no { set +x -$as_echo "$at_srcdir/remfiles08c.at:28: +$as_echo "$at_srcdir/remfiles08c.at:31: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -34391,19 +34838,17 @@ test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 mkdir foo mkdir bar -echo file > file -echo foo/file > foo/file -echo bar/file > bar/file -DIR=\`pwd\` -tar -cf foo.tar -C \$DIR/foo file -C ../bar file +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file +tar -cf foo.tar -C foo . -C ../bar . decho A find . | sort decho B -tar -rvf foo.tar --remove-files -C \$DIR/foo file -C ../bar file +tar -rvf foo.tar --remove-files -C foo . -C ../bar . decho C -find . | sort +find . )" -at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08c.at:28" +at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08c.at:31" ( $at_check_trace; mkdir gnu (cd gnu @@ -34418,17 +34863,15 @@ test -z "`sort < /dev/null 2>&1`" || exit 77 mkdir foo mkdir bar -echo file > file -echo foo/file > foo/file -echo bar/file > bar/file -DIR=`pwd` -tar -cf foo.tar -C $DIR/foo file -C ../bar file +echo foo/foo_file > foo/foo_file +echo bar/bar_file > bar/bar_file +tar -cf foo.tar -C foo . -C ../bar . decho A find . | sort decho B -tar -rvf foo.tar --remove-files -C $DIR/foo file -C ../bar file +tar -rvf foo.tar --remove-files -C foo . -C ../bar . decho C -find . | sort +find . ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false @@ -34441,23 +34884,21 @@ C echo >>"$at_stdout"; $as_echo "A . ./bar -./bar/file -./file +./bar/bar_file ./foo ./foo.tar -./foo/file +./foo/foo_file B -file -file +./ +./foo_file +./ +./bar_file C . -./bar -./file -./foo ./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/remfiles08c.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/remfiles08c.at:31" $at_failed && at_fn_log_failure $at_traceon; } @@ -34468,14 +34909,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_161 -#AT_START_162 -at_fn_group_banner 162 'remfiles09a.at:25' \ +#AT_STOP_163 +#AT_START_164 +at_fn_group_banner 164 'remfiles09a.at:25' \ "remove-files on full directory in -c/non-incr. mode" "" 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "162. $at_setup_line: testing $at_desc ..." + $as_echo "164. $at_setup_line: testing $at_desc ..." $at_traceon @@ -34542,14 +34983,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_162 -#AT_START_163 -at_fn_group_banner 163 'remfiles09b.at:29' \ +#AT_STOP_164 +#AT_START_165 +at_fn_group_banner 165 'remfiles09b.at:29' \ "remove-files on full directory in -c/incr. mode" "" 24 at_xfail=yes test -f $XFAILFILE && at_xfail=yes ( - $as_echo "163. $at_setup_line: testing $at_desc ..." + $as_echo "165. $at_setup_line: testing $at_desc ..." $at_traceon @@ -34568,18 +35009,14 @@ TAR_OPTIONS=\"-H gnu\" export TAR_OPTIONS rm -rf * - -test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 - mkdir foo echo foo/file > foo/file decho A tar -cvf foo.tar --incremental --remove-files foo -TARSTAT=\$? decho B find . )" -at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles09b.at:34" +at_fn_check_prepare_notrace 'an embedded newline' "remfiles09b.at:34" ( $at_check_trace; mkdir gnu (cd gnu @@ -34589,14 +35026,10 @@ TAR_OPTIONS="-H gnu" export TAR_OPTIONS rm -rf * - -test -z "`sort < /dev/null 2>&1`" || exit 77 - mkdir foo echo foo/file > foo/file decho A tar -cvf foo.tar --incremental --remove-files foo -TARSTAT=$? decho B find . ) @@ -34613,7 +35046,6 @@ foo/ foo/file B . -./foo ./foo.tar " | \ $at_diff - "$at_stdout" || at_failed=: @@ -34628,14 +35060,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_163 -#AT_START_164 -at_fn_group_banner 164 'remfiles09c.at:25' \ +#AT_STOP_165 +#AT_START_166 +at_fn_group_banner 166 'remfiles09c.at:25' \ "remove-files on full directory in -r mode" " " 24 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "164. $at_setup_line: testing $at_desc ..." + $as_echo "166. $at_setup_line: testing $at_desc ..." $at_traceon @@ -34720,14 +35152,93 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_164 -#AT_START_165 -at_fn_group_banner 165 'xattr01.at:25' \ +#AT_STOP_166 +#AT_START_167 +at_fn_group_banner 167 'remfiles10.at:20' \ + "remove-files" " " 24 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "167. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/remfiles10.at:23: +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H gnu\" +export TAR_OPTIONS +rm -rf * + +mkdir foo +echo foo/file > foo/file +decho A +(cd foo && tar -cvf ../foo.tar --remove-files .) +tar_status=\$? +decho B +find foo +exit \$tar_status +)" +at_fn_check_prepare_notrace 'an embedded newline' "remfiles10.at:23" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + +mkdir foo +echo foo/file > foo/file +decho A +(cd foo && tar -cvf ../foo.tar --remove-files .) +tar_status=$? +decho B +find foo +exit $tar_status +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +echo >>"$at_stderr"; $as_echo "A +tar: .: Cannot rmdir: Invalid argument +tar: Exiting with failure status due to previous errors +B +" | \ + $at_diff - "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "A +./ +./file +B +foo +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 2 $at_status "$at_srcdir/remfiles10.at:23" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_167 +#AT_START_168 +at_fn_group_banner 168 'xattr01.at:25' \ "xattrs: basic functionality" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "165. $at_setup_line: testing $at_desc ..." + $as_echo "168. $at_setup_line: testing $at_desc ..." $at_traceon @@ -35281,14 +35792,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_165 -#AT_START_166 -at_fn_group_banner 166 'xattr02.at:25' \ +#AT_STOP_168 +#AT_START_169 +at_fn_group_banner 169 'xattr02.at:25' \ "xattrs: change directory with -C option" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "166. $at_setup_line: testing $at_desc ..." + $as_echo "169. $at_setup_line: testing $at_desc ..." $at_traceon @@ -35917,14 +36428,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_166 -#AT_START_167 -at_fn_group_banner 167 'xattr03.at:25' \ +#AT_STOP_169 +#AT_START_170 +at_fn_group_banner 170 'xattr03.at:25' \ "xattrs: trusted.* attributes" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "167. $at_setup_line: testing $at_desc ..." + $as_echo "170. $at_setup_line: testing $at_desc ..." $at_traceon @@ -36633,14 +37144,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_167 -#AT_START_168 -at_fn_group_banner 168 'xattr04.at:26' \ +#AT_STOP_170 +#AT_START_171 +at_fn_group_banner 171 'xattr04.at:26' \ "xattrs: s/open/openat/ regression" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "168. $at_setup_line: testing $at_desc ..." + $as_echo "171. $at_setup_line: testing $at_desc ..." $at_traceon @@ -37199,14 +37710,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_168 -#AT_START_169 -at_fn_group_banner 169 'xattr05.at:28' \ +#AT_STOP_171 +#AT_START_172 +at_fn_group_banner 172 'xattr05.at:28' \ "xattrs: keywords with '=' and '%'" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "169. $at_setup_line: testing $at_desc ..." + $as_echo "172. $at_setup_line: testing $at_desc ..." $at_traceon @@ -37755,14 +38266,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_169 -#AT_START_170 -at_fn_group_banner 170 'acls01.at:25' \ +#AT_STOP_172 +#AT_START_173 +at_fn_group_banner 173 'acls01.at:25' \ "acls: basic functionality" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "170. $at_setup_line: testing $at_desc ..." + $as_echo "173. $at_setup_line: testing $at_desc ..." $at_traceon @@ -38521,14 +39032,14 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_170 -#AT_START_171 -at_fn_group_banner 171 'acls02.at:25' \ +#AT_STOP_173 +#AT_START_174 +at_fn_group_banner 174 'acls02.at:25' \ "acls: work with -C" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "171. $at_setup_line: testing $at_desc ..." + $as_echo "174. $at_setup_line: testing $at_desc ..." $at_traceon @@ -39347,22 +39858,26 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_171 -#AT_START_172 -at_fn_group_banner 172 'selnx01.at:25' \ - "selinux: basic store/restore" " " 25 +#AT_STOP_174 +#AT_START_175 +at_fn_group_banner 175 'acls03.at:30' \ + "acls: default ACLs" " " 25 at_xfail=no test -f $XFAILFILE && at_xfail=yes ( - $as_echo "172. $at_setup_line: testing $at_desc ..." + $as_echo "175. $at_setup_line: testing $at_desc ..." $at_traceon + + + + { set +x -$as_echo "$at_srcdir/selnx01.at:28: +$as_echo "$at_srcdir/acls03.at:47: mkdir v7 (cd v7 TEST_TAR_FORMAT=v7 @@ -39390,13 +39905,13 @@ rm -rf * file=\$(TMPDIR=. mktemp fiXXXXXX) - restorecon \$file &> /dev/null + setfacl -m u:\$UID:rwx \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi - chcon -h --user=unconfined_u \$file &> /dev/null + getfacl \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi @@ -39404,310 +39919,188 @@ rm -rf * rm -rf \$file file=\$(TMPDIR=. mktemp fiXXXXXX) - err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) if test \"\$err\" != \"0\"; then exit 77 fi -mkdir dir -genfile --file dir/file -ln -s file dir/link - -getfattr -h -d -msecurity.selinux dir dir/file dir/link > start - -restorecon -R dir -chcon -h --user=system_u dir -chcon -h --user=unconfined_u dir/file -chcon -h --user=system_u dir/link - -# archive whole directory including selinux contexts -tar --selinux -cf archive.tar dir - -# clear the directory -rm -rf dir - -# ================================================ -# check if selinux contexts are correctly restored - -tar --selinux -xf archive.tar - -# archive for later debugging -cp archive.tar archive_origin.tar - -# check if selinux contexts were restored -getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ - grep -v -e '^#' -e ^\$ | cut -d: -f1 - -# =========================================================================== -# check if selinux contexts are not restored when --selinux option is missing - -getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux -rm -rf dir -tar -xf archive.tar -getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux - -diff with_selinux without_selinux > diff_with_without -if test \"\$?\" -eq \"0\"; then - echo \"selinux contexts probably restored while --selinux is off\" -fi - -# ================================================================= -# check if selinux is not archived when --selinux option is missing - -tar -cf archive.tar dir - -# clear the directory -rm -rf dir - -# restore (with --selinux) -tar --selinux -xf archive.tar dir - -getfattr -h -d -msecurity.selinux dir dir/file dir/link > final -diff start final > final_diff -if test \"\$?\" -ne \"0\"; then - echo \"bad result\" -fi - -)" -at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" -( $at_check_trace; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" -export TAR_OPTIONS -rm -rf * - - - file=$(TMPDIR=. mktemp fiXXXXXX) - - setfattr -n user.test -v test $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - getfattr $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - - - file=$(TMPDIR=. mktemp fiXXXXXX) - - restorecon $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - chcon -h --user=unconfined_u $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - rm -rf $file - - file=$(TMPDIR=. mktemp fiXXXXXX) - err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -mkdir dir -genfile --file dir/file -ln -s file dir/link +MYNAME=\$( id -un ) +MYGROUP=\$( id -gn ) -getfattr -h -d -msecurity.selinux dir dir/file dir/link > start +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:\$MYGROUP:r-x pure/d1 +setfacl -d -m g:\$MYGROUP:rwx pure/d1 +setfacl -d -m u:\$MYNAME:rwx pure/d1 +# \"*a\" files have \"some\" additional ACLs +setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:\$MYNAME:--- pure/d1/f2a -restorecon -R dir -chcon -h --user=system_u dir -chcon -h --user=unconfined_u dir/file -chcon -h --user=system_u dir/link +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -# archive whole directory including selinux contexts -tar --selinux -cf archive.tar dir +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -# clear the directory -rm -rf dir +# Directory names are chosen based on \"how the files were extracted from +# archive\". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl\$ — extraction was done with --acls option -# ================================================ -# check if selinux contexts are correctly restored +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -tar --selinux -xf archive.tar +setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -# archive for later debugging -cp archive.tar archive_origin.tar +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -# check if selinux contexts were restored -getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ - grep -v -e '^#' -e ^$ | cut -d: -f1 -# =========================================================================== -# check if selinux contexts are not restored when --selinux option is missing + cd pure + pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux -rm -rf dir -tar -xf archive.tar -getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -diff with_selinux without_selinux > diff_with_without -if test "$?" -eq "0"; then - echo "selinux contexts probably restored while --selinux is off" -fi -# ================================================================= -# check if selinux is not archived when --selinux option is missing + cd sacl_def_optacl + sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -tar -cf archive.tar dir -# clear the directory -rm -rf dir + cd sacl_def_optnoacl + sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -# restore (with --selinux) -tar --selinux -xf archive.tar dir -getfattr -h -d -msecurity.selinux dir dir/file dir/link > final -diff start final > final_diff -if test "$?" -ne "0"; then - echo "bad result" -fi + cd sacl_nodef_optacl + sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -) -) >>"$at_stdout" 2>>"$at_stderr" 5>&- -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u -security.selinux=\"unconfined_u -security.selinux=\"system_u -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" -$at_failed && at_fn_log_failure -$at_traceon; } - { set +x -$as_echo "$at_srcdir/selnx01.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H oldgnu\" -export TAR_OPTIONS -rm -rf * + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - file=\$(TMPDIR=. mktemp fiXXXXXX) + cd nosacl_def_optacl + nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - setfattr -n user.test -v test \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi + cd nosacl_def_optnoacl + nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - getfattr \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi + cd nosacl_nodef_optacl + nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - - file=\$(TMPDIR=. mktemp fiXXXXXX) - - restorecon \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - chcon -h --user=unconfined_u \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - rm -rf \$file + echo \"\$pure\" > pure.log + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then + echo \"bad 'pure' against 'sacl_def_optacl' output\" + fi - file=\$(TMPDIR=. mktemp fiXXXXXX) - err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi -mkdir dir -genfile --file dir/file -ln -s file dir/link - -getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log + if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\" + fi -restorecon -R dir -chcon -h --user=system_u dir -chcon -h --user=unconfined_u dir/file -chcon -h --user=system_u dir/link -# archive whole directory including selinux contexts -tar --selinux -cf archive.tar dir + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\" + fi -# clear the directory -rm -rf dir -# ================================================ -# check if selinux contexts are correctly restored + echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi -tar --selinux -xf archive.tar -# archive for later debugging -cp archive.tar archive_origin.tar + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\" + fi -# check if selinux contexts were restored -getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ - grep -v -e '^#' -e ^\$ | cut -d: -f1 -# =========================================================================== -# check if selinux contexts are not restored when --selinux option is missing + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\" + fi -getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux -rm -rf dir -tar -xf archive.tar -getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -diff with_selinux without_selinux > diff_with_without -if test \"\$?\" -eq \"0\"; then - echo \"selinux contexts probably restored while --selinux is off\" -fi -# ================================================================= -# check if selinux is not archived when --selinux option is missing + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\" + fi -tar -cf archive.tar dir -# clear the directory -rm -rf dir + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\" + fi -# restore (with --selinux) -tar --selinux -xf archive.tar dir -getfattr -h -d -msecurity.selinux dir dir/file dir/link > final -diff start final > final_diff -if test \"\$?\" -ne \"0\"; then - echo \"bad result\" -fi + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" +at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47" ( $at_check_trace; -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +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 * @@ -39730,13 +40123,13 @@ rm -rf * file=$(TMPDIR=. mktemp fiXXXXXX) - restorecon $file &> /dev/null + setfacl -m u:$UID:rwx $file &> /dev/null if test "$?" != 0; then exit 77 fi - chcon -h --user=unconfined_u $file &> /dev/null + getfacl $file &> /dev/null if test "$?" != 0; then exit 77 fi @@ -39744,92 +40137,197 @@ rm -rf * rm -rf $file file=$(TMPDIR=. mktemp fiXXXXXX) - err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) if test "$err" != "0"; then exit 77 fi -mkdir dir -genfile --file dir/file -ln -s file dir/link +test -z "`sort < /dev/null 2>&1`" || exit 77 -getfattr -h -d -msecurity.selinux dir dir/file dir/link > start -restorecon -R dir -chcon -h --user=system_u dir -chcon -h --user=unconfined_u dir/file -chcon -h --user=system_u dir/link +MYNAME=$( id -un ) +MYGROUP=$( id -gn ) -# archive whole directory including selinux contexts -tar --selinux -cf archive.tar dir +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:$MYGROUP:r-x pure/d1 +setfacl -d -m g:$MYGROUP:rwx pure/d1 +setfacl -d -m u:$MYNAME:rwx pure/d1 +# "*a" files have "some" additional ACLs +setfacl -m u:$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:$MYNAME:--- pure/d1/f2a -# clear the directory -rm -rf dir +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -# ================================================ -# check if selinux contexts are correctly restored +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -tar --selinux -xf archive.tar +# Directory names are chosen based on "how the files were extracted from +# archive". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl$ — extraction was done with --acls option -# archive for later debugging -cp archive.tar archive_origin.tar +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -# check if selinux contexts were restored -getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ - grep -v -e '^#' -e ^$ | cut -d: -f1 +setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -# =========================================================================== -# check if selinux contexts are not restored when --selinux option is missing +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux -rm -rf dir -tar -xf archive.tar -getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -diff with_selinux without_selinux > diff_with_without -if test "$?" -eq "0"; then - echo "selinux contexts probably restored while --selinux is off" -fi + cd pure + pure="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -# ================================================================= -# check if selinux is not archived when --selinux option is missing -tar -cf archive.tar dir -# clear the directory -rm -rf dir + cd sacl_def_optacl + sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -# restore (with --selinux) -tar --selinux -xf archive.tar dir -getfattr -h -d -msecurity.selinux dir dir/file dir/link > final -diff start final > final_diff -if test "$?" -ne "0"; then - echo "bad result" -fi + cd sacl_def_optnoacl + sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd sacl_nodef_optacl + sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_def_optacl + nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_def_optnoacl + nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_nodef_optacl + nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + + echo "$pure" > pure.log + echo "$sacl_def_optacl" > sacl_def_optacl.log + if test ! "$pure" "=" "$sacl_def_optacl"; then + echo "bad 'pure' against 'sacl_def_optacl' output" + fi + + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log + if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output" + fi + + + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output" + fi + + + echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi + + + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output" + fi + + + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output" + fi + + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output" + fi + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output" + fi + + + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u -security.selinux=\"unconfined_u -security.selinux=\"system_u -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/selnx01.at:28: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar +$as_echo "$at_srcdir/acls03.at:47: +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 * @@ -39852,13 +40350,13 @@ rm -rf * file=\$(TMPDIR=. mktemp fiXXXXXX) - restorecon \$file &> /dev/null + setfacl -m u:\$UID:rwx \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi - chcon -h --user=unconfined_u \$file &> /dev/null + getfacl \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi @@ -39866,79 +40364,188 @@ rm -rf * rm -rf \$file file=\$(TMPDIR=. mktemp fiXXXXXX) - err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) if test \"\$err\" != \"0\"; then exit 77 fi -mkdir dir -genfile --file dir/file -ln -s file dir/link +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -getfattr -h -d -msecurity.selinux dir dir/file dir/link > start -restorecon -R dir -chcon -h --user=system_u dir -chcon -h --user=unconfined_u dir/file -chcon -h --user=system_u dir/link +MYNAME=\$( id -un ) +MYGROUP=\$( id -gn ) -# archive whole directory including selinux contexts -tar --selinux -cf archive.tar dir +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:\$MYGROUP:r-x pure/d1 +setfacl -d -m g:\$MYGROUP:rwx pure/d1 +setfacl -d -m u:\$MYNAME:rwx pure/d1 +# \"*a\" files have \"some\" additional ACLs +setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:\$MYNAME:--- pure/d1/f2a -# clear the directory -rm -rf dir +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -# ================================================ -# check if selinux contexts are correctly restored +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -tar --selinux -xf archive.tar +# Directory names are chosen based on \"how the files were extracted from +# archive\". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl\$ — extraction was done with --acls option -# archive for later debugging -cp archive.tar archive_origin.tar +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -# check if selinux contexts were restored -getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ - grep -v -e '^#' -e ^\$ | cut -d: -f1 +setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -# =========================================================================== -# check if selinux contexts are not restored when --selinux option is missing +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux -rm -rf dir -tar -xf archive.tar -getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -diff with_selinux without_selinux > diff_with_without -if test \"\$?\" -eq \"0\"; then - echo \"selinux contexts probably restored while --selinux is off\" -fi + cd pure + pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -# ================================================================= -# check if selinux is not archived when --selinux option is missing -tar -cf archive.tar dir -# clear the directory -rm -rf dir + cd sacl_def_optacl + sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -# restore (with --selinux) -tar --selinux -xf archive.tar dir -getfattr -h -d -msecurity.selinux dir dir/file dir/link > final -diff start final > final_diff -if test \"\$?\" -ne \"0\"; then - echo \"bad result\" -fi + cd sacl_def_optnoacl + sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd sacl_nodef_optacl + sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_def_optacl + nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_def_optnoacl + nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_nodef_optacl + nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + + echo \"\$pure\" > pure.log + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then + echo \"bad 'pure' against 'sacl_def_optacl' output\" + fi + + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log + if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\" + fi + + + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\" + fi + + + echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi + + + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\" + fi + + + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\" + fi + + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\" + fi + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\" + fi + + + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" +at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47" ( $at_check_trace; -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 * @@ -39961,13 +40568,13 @@ rm -rf * file=$(TMPDIR=. mktemp fiXXXXXX) - restorecon $file &> /dev/null + setfacl -m u:$UID:rwx $file &> /dev/null if test "$?" != 0; then exit 77 fi - chcon -h --user=unconfined_u $file &> /dev/null + getfacl $file &> /dev/null if test "$?" != 0; then exit 77 fi @@ -39975,92 +40582,197 @@ rm -rf * rm -rf $file file=$(TMPDIR=. mktemp fiXXXXXX) - err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) if test "$err" != "0"; then exit 77 fi -mkdir dir -genfile --file dir/file -ln -s file dir/link +test -z "`sort < /dev/null 2>&1`" || exit 77 -getfattr -h -d -msecurity.selinux dir dir/file dir/link > start -restorecon -R dir -chcon -h --user=system_u dir -chcon -h --user=unconfined_u dir/file -chcon -h --user=system_u dir/link +MYNAME=$( id -un ) +MYGROUP=$( id -gn ) -# archive whole directory including selinux contexts -tar --selinux -cf archive.tar dir +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:$MYGROUP:r-x pure/d1 +setfacl -d -m g:$MYGROUP:rwx pure/d1 +setfacl -d -m u:$MYNAME:rwx pure/d1 +# "*a" files have "some" additional ACLs +setfacl -m u:$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:$MYNAME:--- pure/d1/f2a -# clear the directory -rm -rf dir +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -# ================================================ -# check if selinux contexts are correctly restored +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -tar --selinux -xf archive.tar +# Directory names are chosen based on "how the files were extracted from +# archive". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl$ — extraction was done with --acls option -# archive for later debugging -cp archive.tar archive_origin.tar +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -# check if selinux contexts were restored -getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ - grep -v -e '^#' -e ^$ | cut -d: -f1 +setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -# =========================================================================== -# check if selinux contexts are not restored when --selinux option is missing +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux -rm -rf dir -tar -xf archive.tar -getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -diff with_selinux without_selinux > diff_with_without -if test "$?" -eq "0"; then - echo "selinux contexts probably restored while --selinux is off" -fi + cd pure + pure="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -# ================================================================= -# check if selinux is not archived when --selinux option is missing -tar -cf archive.tar dir -# clear the directory -rm -rf dir + cd sacl_def_optacl + sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -# restore (with --selinux) -tar --selinux -xf archive.tar dir -getfattr -h -d -msecurity.selinux dir dir/file dir/link > final -diff start final > final_diff -if test "$?" -ne "0"; then - echo "bad result" -fi + cd sacl_def_optnoacl + sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd sacl_nodef_optacl + sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_def_optacl + nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_def_optnoacl + nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_nodef_optacl + nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + + echo "$pure" > pure.log + echo "$sacl_def_optacl" > sacl_def_optacl.log + if test ! "$pure" "=" "$sacl_def_optacl"; then + echo "bad 'pure' against 'sacl_def_optacl' output" + fi + + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log + if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output" + fi + + + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output" + fi + + + echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi + + + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output" + fi + + + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output" + fi + + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output" + fi + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output" + fi + + + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u -security.selinux=\"unconfined_u -security.selinux=\"system_u -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/selnx01.at:28: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +$as_echo "$at_srcdir/acls03.at:47: +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 * @@ -40083,13 +40795,13 @@ rm -rf * file=\$(TMPDIR=. mktemp fiXXXXXX) - restorecon \$file &> /dev/null + setfacl -m u:\$UID:rwx \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi - chcon -h --user=unconfined_u \$file &> /dev/null + getfacl \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi @@ -40097,79 +40809,188 @@ rm -rf * rm -rf \$file file=\$(TMPDIR=. mktemp fiXXXXXX) - err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) if test \"\$err\" != \"0\"; then exit 77 fi -mkdir dir -genfile --file dir/file -ln -s file dir/link +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -getfattr -h -d -msecurity.selinux dir dir/file dir/link > start -restorecon -R dir -chcon -h --user=system_u dir -chcon -h --user=unconfined_u dir/file -chcon -h --user=system_u dir/link +MYNAME=\$( id -un ) +MYGROUP=\$( id -gn ) -# archive whole directory including selinux contexts -tar --selinux -cf archive.tar dir +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:\$MYGROUP:r-x pure/d1 +setfacl -d -m g:\$MYGROUP:rwx pure/d1 +setfacl -d -m u:\$MYNAME:rwx pure/d1 +# \"*a\" files have \"some\" additional ACLs +setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:\$MYNAME:--- pure/d1/f2a -# clear the directory -rm -rf dir +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -# ================================================ -# check if selinux contexts are correctly restored +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -tar --selinux -xf archive.tar +# Directory names are chosen based on \"how the files were extracted from +# archive\". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl\$ — extraction was done with --acls option -# archive for later debugging -cp archive.tar archive_origin.tar +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -# check if selinux contexts were restored -getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ - grep -v -e '^#' -e ^\$ | cut -d: -f1 +setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -# =========================================================================== -# check if selinux contexts are not restored when --selinux option is missing +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux -rm -rf dir -tar -xf archive.tar -getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -diff with_selinux without_selinux > diff_with_without -if test \"\$?\" -eq \"0\"; then - echo \"selinux contexts probably restored while --selinux is off\" -fi + cd pure + pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -# ================================================================= -# check if selinux is not archived when --selinux option is missing -tar -cf archive.tar dir -# clear the directory -rm -rf dir + cd sacl_def_optacl + sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -# restore (with --selinux) -tar --selinux -xf archive.tar dir -getfattr -h -d -msecurity.selinux dir dir/file dir/link > final -diff start final > final_diff -if test \"\$?\" -ne \"0\"; then - echo \"bad result\" -fi + cd sacl_def_optnoacl + sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd sacl_nodef_optacl + sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_def_optacl + nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_def_optnoacl + nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_nodef_optacl + nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + + echo \"\$pure\" > pure.log + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then + echo \"bad 'pure' against 'sacl_def_optacl' output\" + fi + + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log + if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\" + fi + + + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\" + fi + + + echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi + + + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\" + fi + + + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\" + fi + + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\" + fi + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\" + fi + + + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" +at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47" ( $at_check_trace; -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +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 * @@ -40192,13 +41013,13 @@ rm -rf * file=$(TMPDIR=. mktemp fiXXXXXX) - restorecon $file &> /dev/null + setfacl -m u:$UID:rwx $file &> /dev/null if test "$?" != 0; then exit 77 fi - chcon -h --user=unconfined_u $file &> /dev/null + getfacl $file &> /dev/null if test "$?" != 0; then exit 77 fi @@ -40206,465 +41027,419 @@ rm -rf * rm -rf $file file=$(TMPDIR=. mktemp fiXXXXXX) - err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) if test "$err" != "0"; then exit 77 fi -mkdir dir -genfile --file dir/file -ln -s file dir/link +test -z "`sort < /dev/null 2>&1`" || exit 77 -getfattr -h -d -msecurity.selinux dir dir/file dir/link > start -restorecon -R dir -chcon -h --user=system_u dir -chcon -h --user=unconfined_u dir/file -chcon -h --user=system_u dir/link +MYNAME=$( id -un ) +MYGROUP=$( id -gn ) -# archive whole directory including selinux contexts -tar --selinux -cf archive.tar dir +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:$MYGROUP:r-x pure/d1 +setfacl -d -m g:$MYGROUP:rwx pure/d1 +setfacl -d -m u:$MYNAME:rwx pure/d1 +# "*a" files have "some" additional ACLs +setfacl -m u:$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:$MYNAME:--- pure/d1/f2a -# clear the directory -rm -rf dir +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -# ================================================ -# check if selinux contexts are correctly restored +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -tar --selinux -xf archive.tar +# Directory names are chosen based on "how the files were extracted from +# archive". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl$ — extraction was done with --acls option -# archive for later debugging -cp archive.tar archive_origin.tar +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -# check if selinux contexts were restored -getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ - grep -v -e '^#' -e ^$ | cut -d: -f1 +setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -# =========================================================================== -# check if selinux contexts are not restored when --selinux option is missing +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux -rm -rf dir -tar -xf archive.tar -getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -diff with_selinux without_selinux > diff_with_without -if test "$?" -eq "0"; then - echo "selinux contexts probably restored while --selinux is off" -fi + cd pure + pure="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -# ================================================================= -# check if selinux is not archived when --selinux option is missing -tar -cf archive.tar dir -# clear the directory -rm -rf dir + cd sacl_def_optacl + sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -# restore (with --selinux) -tar --selinux -xf archive.tar dir -getfattr -h -d -msecurity.selinux dir dir/file dir/link > final -diff start final > final_diff -if test "$?" -ne "0"; then - echo "bad result" -fi + cd sacl_def_optnoacl + sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -) -) >>"$at_stdout" 2>>"$at_stderr" 5>&- -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u -security.selinux=\"unconfined_u -security.selinux=\"system_u -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" -$at_failed && at_fn_log_failure -$at_traceon; } - { set +x -$as_echo "$at_srcdir/selnx01.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H gnu\" -export TAR_OPTIONS -rm -rf * + cd sacl_nodef_optacl + sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - file=\$(TMPDIR=. mktemp fiXXXXXX) + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - setfattr -n user.test -v test \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi + cd nosacl_def_optacl + nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - getfattr \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi + cd nosacl_def_optnoacl + nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + cd nosacl_nodef_optacl + nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - file=\$(TMPDIR=. mktemp fiXXXXXX) - restorecon \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. - chcon -h --user=unconfined_u \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - rm -rf \$file + echo "$pure" > pure.log + echo "$sacl_def_optacl" > sacl_def_optacl.log + if test ! "$pure" "=" "$sacl_def_optacl"; then + echo "bad 'pure' against 'sacl_def_optacl' output" + fi - file=\$(TMPDIR=. mktemp fiXXXXXX) - err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi -mkdir dir -genfile --file dir/file -ln -s file dir/link + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log + if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output" + fi -getfattr -h -d -msecurity.selinux dir dir/file dir/link > start -restorecon -R dir -chcon -h --user=system_u dir -chcon -h --user=unconfined_u dir/file -chcon -h --user=system_u dir/link + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output" + fi -# archive whole directory including selinux contexts -tar --selinux -cf archive.tar dir -# clear the directory -rm -rf dir + echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi -# ================================================ -# check if selinux contexts are correctly restored -tar --selinux -xf archive.tar + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output" + fi -# archive for later debugging -cp archive.tar archive_origin.tar -# check if selinux contexts were restored -getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ - grep -v -e '^#' -e ^\$ | cut -d: -f1 + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output" + fi -# =========================================================================== -# check if selinux contexts are not restored when --selinux option is missing -getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux -rm -rf dir -tar -xf archive.tar -getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -diff with_selinux without_selinux > diff_with_without -if test \"\$?\" -eq \"0\"; then - echo \"selinux contexts probably restored while --selinux is off\" -fi + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output" + fi -# ================================================================= -# check if selinux is not archived when --selinux option is missing -tar -cf archive.tar dir + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output" + fi -# clear the directory -rm -rf dir -# restore (with --selinux) -tar --selinux -xf archive.tar dir + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi -getfattr -h -d -msecurity.selinux dir dir/file dir/link > final -diff start final > final_diff -if test \"\$?\" -ne \"0\"; then - echo \"bad result\" -fi +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47" +$at_failed && at_fn_log_failure +$at_traceon; } -)" -at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" -( $at_check_trace; -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu + { set +x +$as_echo "$at_srcdir/acls03.at:47: +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 * - file=$(TMPDIR=. mktemp fiXXXXXX) + file=\$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v test $file &> /dev/null - if test "$?" != 0; then + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then exit 77 fi - getfattr $file &> /dev/null - if test "$?" != 0; then + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then exit 77 fi - file=$(TMPDIR=. mktemp fiXXXXXX) + file=\$(TMPDIR=. mktemp fiXXXXXX) - restorecon $file &> /dev/null - if test "$?" != 0; then + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then exit 77 fi - chcon -h --user=unconfined_u $file &> /dev/null - if test "$?" != 0; then + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then exit 77 fi - rm -rf $file + rm -rf \$file - file=$(TMPDIR=. mktemp fiXXXXXX) - err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then exit 77 fi -mkdir dir -genfile --file dir/file -ln -s file dir/link - -getfattr -h -d -msecurity.selinux dir dir/file dir/link > start - -restorecon -R dir -chcon -h --user=system_u dir -chcon -h --user=unconfined_u dir/file -chcon -h --user=system_u dir/link - -# archive whole directory including selinux contexts -tar --selinux -cf archive.tar dir - -# clear the directory -rm -rf dir - -# ================================================ -# check if selinux contexts are correctly restored - -tar --selinux -xf archive.tar - -# archive for later debugging -cp archive.tar archive_origin.tar - -# check if selinux contexts were restored -getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ - grep -v -e '^#' -e ^$ | cut -d: -f1 - -# =========================================================================== -# check if selinux contexts are not restored when --selinux option is missing +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux -rm -rf dir -tar -xf archive.tar -getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -diff with_selinux without_selinux > diff_with_without -if test "$?" -eq "0"; then - echo "selinux contexts probably restored while --selinux is off" -fi +MYNAME=\$( id -un ) +MYGROUP=\$( id -gn ) -# ================================================================= -# check if selinux is not archived when --selinux option is missing +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:\$MYGROUP:r-x pure/d1 +setfacl -d -m g:\$MYGROUP:rwx pure/d1 +setfacl -d -m u:\$MYNAME:rwx pure/d1 +# \"*a\" files have \"some\" additional ACLs +setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:\$MYNAME:--- pure/d1/f2a -tar -cf archive.tar dir +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 -# clear the directory -rm -rf dir +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 -# restore (with --selinux) -tar --selinux -xf archive.tar dir +# Directory names are chosen based on \"how the files were extracted from +# archive\". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl\$ — extraction was done with --acls option -getfattr -h -d -msecurity.selinux dir dir/file dir/link > final -diff start final > final_diff -if test "$?" -ne "0"; then - echo "bad result" -fi +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -) -) >>"$at_stdout" 2>>"$at_stderr" 5>&- -at_status=$? at_failed=false -$at_check_filter -at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u -security.selinux=\"unconfined_u -security.selinux=\"system_u -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" -$at_failed && at_fn_log_failure -$at_traceon; } +setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl + cd pure + pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 7>&- | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_172 -#AT_START_173 -at_fn_group_banner 173 'selacl01.at:25' \ - "acls/selinux: special files & fifos" " " 25 -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -( - $as_echo "173. $at_setup_line: testing $at_desc ..." - $at_traceon + cd sacl_def_optacl + sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + cd sacl_def_optnoacl + sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - { set +x -$as_echo "$at_srcdir/selacl01.at:28: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 -export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" -export TAR_OPTIONS -rm -rf * + cd sacl_nodef_optacl + sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -echo \"test\" > \$\$ -chmod 0 \$\$ -cat \$\$ > /dev/null 2>&1 -result=\$? -rm -f \$\$ -test \$result -eq 0 || exit 77 + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v test \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi + cd nosacl_def_optacl + nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - getfattr \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi + cd nosacl_def_optnoacl + nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + cd nosacl_nodef_optacl + nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - file=\$(TMPDIR=. mktemp fiXXXXXX) + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. - restorecon \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - chcon -h --user=unconfined_u \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi + echo \"\$pure\" > pure.log + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then + echo \"bad 'pure' against 'sacl_def_optacl' output\" + fi - rm -rf \$file - file=\$(TMPDIR=. mktemp fiXXXXXX) - err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log + if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\" + fi - file=\$(TMPDIR=. mktemp fiXXXXXX) + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\" + fi - setfacl -m u:\$UID:rwx \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi + echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi - getfacl \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - rm -rf \$file + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\" + fi - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:\$UID:rwx \$file - err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\" + fi -mkdir dir -mkfifo dir/fifo -MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) -MINOR=\$( stat /dev/urandom --printf=\"%T\" ) -mknod dir/chartype c \$MAJOR \$MINOR -# setup attributes -restorecon -R dir -chcon -h --user=system_u dir/fifo -chcon -h --user=system_u dir/chartype -setfacl -m u:\$UID:--- dir/fifo -setfacl -m u:\$UID:rwx dir/chartype -getfacl dir/fifo >> before -getfattr -msecurity.selinux dir/chartype >> before + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\" + fi -tar --xattrs --selinux --acls -cf archive.tar dir -mv dir olddir + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\" + fi -tar --xattrs --selinux --acls -xf archive.tar -getfacl dir/fifo >> after -getfattr -msecurity.selinux dir/chartype >> after + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi -diff before after -echo separator )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47" ( $at_check_trace; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 || exit 77 - - file=$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test $file &> /dev/null @@ -40683,13 +41458,13 @@ test $result -eq 0 || exit 77 file=$(TMPDIR=. mktemp fiXXXXXX) - restorecon $file &> /dev/null + setfacl -m u:$UID:rwx $file &> /dev/null if test "$?" != 0; then exit 77 fi - chcon -h --user=unconfined_u $file &> /dev/null + getfacl $file &> /dev/null if test "$?" != 0; then exit 77 fi @@ -40697,94 +41472,201 @@ test $result -eq 0 || exit 77 rm -rf $file file=$(TMPDIR=. mktemp fiXXXXXX) - err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) if test "$err" != "0"; then exit 77 fi +test -z "`sort < /dev/null 2>&1`" || exit 77 - file=$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:$UID:rwx $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi +MYNAME=$( id -un ) +MYGROUP=$( id -gn ) +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:$MYGROUP:r-x pure/d1 +setfacl -d -m g:$MYGROUP:rwx pure/d1 +setfacl -d -m u:$MYNAME:rwx pure/d1 +# "*a" files have "some" additional ACLs +setfacl -m u:$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:$MYNAME:--- pure/d1/f2a - getfacl $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 - rm -rf $file +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 - file=$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:$UID:rwx $file - err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi +# Directory names are chosen based on "how the files were extracted from +# archive". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl$ — extraction was done with --acls option +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -mkdir dir -mkfifo dir/fifo -MAJOR=$( stat /dev/urandom --printf="%t" ) -MINOR=$( stat /dev/urandom --printf="%T" ) -mknod dir/chartype c $MAJOR $MINOR +setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -# setup attributes -restorecon -R dir -chcon -h --user=system_u dir/fifo -chcon -h --user=system_u dir/chartype -setfacl -m u:$UID:--- dir/fifo -setfacl -m u:$UID:rwx dir/chartype +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -getfacl dir/fifo >> before -getfattr -msecurity.selinux dir/chartype >> before -tar --xattrs --selinux --acls -cf archive.tar dir + cd pure + pure="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -mv dir olddir -tar --xattrs --selinux --acls -xf archive.tar -getfacl dir/fifo >> after -getfattr -msecurity.selinux dir/chartype >> after + cd sacl_def_optacl + sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd sacl_def_optnoacl + sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd sacl_nodef_optacl + sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_def_optacl + nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_def_optnoacl + nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_nodef_optacl + nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + + echo "$pure" > pure.log + echo "$sacl_def_optacl" > sacl_def_optacl.log + if test ! "$pure" "=" "$sacl_def_optacl"; then + echo "bad 'pure' against 'sacl_def_optacl' output" + fi + + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log + if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output" + fi + + + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output" + fi + + + echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi + + + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output" + fi + + + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output" + fi + + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output" + fi + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output" + fi + + + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi -diff before after -echo separator ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/selacl01.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +$as_echo "$at_srcdir/acls03.at:47: +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 * -echo \"test\" > \$\$ -chmod 0 \$\$ -cat \$\$ > /dev/null 2>&1 -result=\$? -rm -f \$\$ -test \$result -eq 0 || exit 77 - - file=\$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test \$file &> /dev/null @@ -40803,13 +41685,13 @@ test \$result -eq 0 || exit 77 file=\$(TMPDIR=. mktemp fiXXXXXX) - restorecon \$file &> /dev/null + setfacl -m u:\$UID:rwx \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi - chcon -h --user=unconfined_u \$file &> /dev/null + getfacl \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi @@ -40817,83 +41699,192 @@ test \$result -eq 0 || exit 77 rm -rf \$file file=\$(TMPDIR=. mktemp fiXXXXXX) - err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) if test \"\$err\" != \"0\"; then exit 77 fi +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:\$UID:rwx \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi +MYNAME=\$( id -un ) +MYGROUP=\$( id -gn ) +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:\$MYGROUP:r-x pure/d1 +setfacl -d -m g:\$MYGROUP:rwx pure/d1 +setfacl -d -m u:\$MYNAME:rwx pure/d1 +# \"*a\" files have \"some\" additional ACLs +setfacl -m u:\$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:\$MYNAME:--- pure/d1/f2a - getfacl \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 - rm -rf \$file +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:\$UID:rwx \$file - err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi +# Directory names are chosen based on \"how the files were extracted from +# archive\". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl\$ — extraction was done with --acls option +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -mkdir dir -mkfifo dir/fifo -MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) -MINOR=\$( stat /dev/urandom --printf=\"%T\" ) -mknod dir/chartype c \$MAJOR \$MINOR +setfacl -d -m u:\$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:\$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -# setup attributes -restorecon -R dir -chcon -h --user=system_u dir/fifo -chcon -h --user=system_u dir/chartype -setfacl -m u:\$UID:--- dir/fifo -setfacl -m u:\$UID:rwx dir/chartype +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -getfacl dir/fifo >> before -getfattr -msecurity.selinux dir/chartype >> before -tar --xattrs --selinux --acls -cf archive.tar dir + cd pure + pure=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. -mv dir olddir -tar --xattrs --selinux --acls -xf archive.tar -getfacl dir/fifo >> after -getfattr -msecurity.selinux dir/chartype >> after + cd sacl_def_optacl + sacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd sacl_def_optnoacl + sacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd sacl_nodef_optacl + sacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_def_optacl + nosacl_def_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_def_optnoacl + nosacl_def_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_nodef_optacl + nosacl_nodef_optacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl=\"\$(find d1 | sort | xargs -n 1 getfacl)\" + cd .. + + + + echo \"\$pure\" > pure.log + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + if test ! \"\$pure\" \"=\" \"\$sacl_def_optacl\"; then + echo \"bad 'pure' against 'sacl_def_optacl' output\" + fi + + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_nodef_optacl\" > sacl_nodef_optacl.log + if test ! \"\$sacl_def_optacl\" \"=\" \"\$sacl_nodef_optacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output\" + fi + + + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optnoacl\" \"=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output\" + fi + + + echo \"\$sacl_nodef_optnoacl\" > sacl_nodef_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$sacl_nodef_optnoacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi + + + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optacl\" > nosacl_nodef_optacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output\" + fi + + + echo \"\$nosacl_def_optacl\" > nosacl_def_optacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optacl\" \"=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output\" + fi + + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$sacl_def_optnoacl\" > sacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$sacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output\" + fi + + + echo \"\$sacl_def_optacl\" > sacl_def_optacl.log + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + if test ! \"\$sacl_def_optacl\" \"!=\" \"\$nosacl_def_optnoacl\"; then + echo \"bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output\" + fi + + + echo \"\$nosacl_def_optnoacl\" > nosacl_def_optnoacl.log + echo \"\$nosacl_nodef_optnoacl\" > nosacl_nodef_optnoacl.log + if test ! \"\$nosacl_def_optnoacl\" \"!=\" \"\$nosacl_nodef_optnoacl\"; then + echo \"bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output\" + fi -diff before after -echo separator )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +at_fn_check_prepare_notrace 'a `...` command substitution' "acls03.at:47" ( $at_check_trace; -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 * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 || exit 77 - - file=$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test $file &> /dev/null @@ -40912,13 +41903,13 @@ test $result -eq 0 || exit 77 file=$(TMPDIR=. mktemp fiXXXXXX) - restorecon $file &> /dev/null + setfacl -m u:$UID:rwx $file &> /dev/null if test "$?" != 0; then exit 77 fi - chcon -h --user=unconfined_u $file &> /dev/null + getfacl $file &> /dev/null if test "$?" != 0; then exit 77 fi @@ -40926,94 +41917,222 @@ test $result -eq 0 || exit 77 rm -rf $file file=$(TMPDIR=. mktemp fiXXXXXX) - err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) if test "$err" != "0"; then exit 77 fi +test -z "`sort < /dev/null 2>&1`" || exit 77 - file=$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:$UID:rwx $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi +MYNAME=$( id -un ) +MYGROUP=$( id -gn ) +# Prepare directory structure with default ACLs +mkdir -p pure/d1/d2 +genfile --file pure/d1/f2a +genfile --file pure/d1/f2b +genfile --file pure/d1/d2/f3a +genfile --file pure/d1/d2/f3b +setfacl -m g:$MYGROUP:r-x pure/d1 +setfacl -d -m g:$MYGROUP:rwx pure/d1 +setfacl -d -m u:$MYNAME:rwx pure/d1 +# "*a" files have "some" additional ACLs +setfacl -m u:$MYNAME:--- pure/d1/d2/f3a +setfacl -m u:$MYNAME:--- pure/d1/f2a - getfacl $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi +# use default format (no acls stored) +tar -cf noacl.tar -C pure d1 - rm -rf $file +# use posix format, acls stored +tar --acls -cf acl.tar -C pure d1 - file=$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:$UID:rwx $file - err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi +# Directory names are chosen based on "how the files were extracted from +# archive". Equivalent no* tags are used also: +# ^sacl_ — extracted archive has stored ACLs +# _def_ — target directory (-C) has default ACLs +# _optacl$ — extraction was done with --acls option +mkdir sacl_def_optacl +mkdir sacl_def_optnoacl +mkdir sacl_nodef_optacl +mkdir sacl_nodef_optnoacl +mkdir nosacl_def_optacl +mkdir nosacl_def_optnoacl +mkdir nosacl_nodef_optacl +mkdir nosacl_nodef_optnoacl -mkdir dir -mkfifo dir/fifo -MAJOR=$( stat /dev/urandom --printf="%t" ) -MINOR=$( stat /dev/urandom --printf="%T" ) -mknod dir/chartype c $MAJOR $MINOR +setfacl -d -m u:$MYNAME:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl +setfacl -d -m g:$MYGROUP:--- nosacl_def_optnoacl sacl_def_optnoacl sacl_def_optacl nosacl_def_optacl -# setup attributes -restorecon -R dir -chcon -h --user=system_u dir/fifo -chcon -h --user=system_u dir/chartype -setfacl -m u:$UID:--- dir/fifo -setfacl -m u:$UID:rwx dir/chartype +tar -xf acl.tar -C sacl_nodef_optnoacl +tar --acls -xf acl.tar -C sacl_nodef_optacl +tar -xf acl.tar -C sacl_def_optnoacl +tar --acls -xf acl.tar -C sacl_def_optacl +tar -xf noacl.tar -C nosacl_def_optnoacl +# _NO_ ACLs in output +tar -xf noacl.tar -C nosacl_nodef_optnoacl +tar -xf noacl.tar -C nosacl_nodef_optacl +tar -cf noacl_repackaged.tar -C nosacl_nodef_optnoacl d1 +# _NO_ ACLs in output (even when default ACLs exist) +tar --acls -xf noacl_repackaged.tar -C nosacl_def_optacl -getfacl dir/fifo >> before -getfattr -msecurity.selinux dir/chartype >> before -tar --xattrs --selinux --acls -cf archive.tar dir + cd pure + pure="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. -mv dir olddir -tar --xattrs --selinux --acls -xf archive.tar -getfacl dir/fifo >> after -getfattr -msecurity.selinux dir/chartype >> after + cd sacl_def_optacl + sacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd sacl_def_optnoacl + sacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd sacl_nodef_optacl + sacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd sacl_nodef_optnoacl + sacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_def_optacl + nosacl_def_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_def_optnoacl + nosacl_def_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_nodef_optacl + nosacl_nodef_optacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + cd nosacl_nodef_optnoacl + nosacl_nodef_optnoacl="$(find d1 | sort | xargs -n 1 getfacl)" + cd .. + + + + echo "$pure" > pure.log + echo "$sacl_def_optacl" > sacl_def_optacl.log + if test ! "$pure" "=" "$sacl_def_optacl"; then + echo "bad 'pure' against 'sacl_def_optacl' output" + fi + + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_nodef_optacl" > sacl_nodef_optacl.log + if test ! "$sacl_def_optacl" "=" "$sacl_nodef_optacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_nodef_optacl' output" + fi + + + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optnoacl" "=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optnoacl' against 'nosacl_def_optnoacl' output" + fi + + + echo "$sacl_nodef_optnoacl" > sacl_nodef_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$sacl_nodef_optnoacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'sacl_nodef_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi + + + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optacl" > nosacl_nodef_optacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optacl' output" + fi + + + echo "$nosacl_def_optacl" > nosacl_def_optacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optacl" "=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optacl' against 'nosacl_nodef_optnoacl' output" + fi + + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$sacl_def_optnoacl" > sacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$sacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'sacl_def_optnoacl' output" + fi + + + echo "$sacl_def_optacl" > sacl_def_optacl.log + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + if test ! "$sacl_def_optacl" "!=" "$nosacl_def_optnoacl"; then + echo "bad 'sacl_def_optacl' against 'nosacl_def_optnoacl' output" + fi + + + echo "$nosacl_def_optnoacl" > nosacl_def_optnoacl.log + echo "$nosacl_nodef_optnoacl" > nosacl_nodef_optnoacl.log + if test ! "$nosacl_def_optnoacl" "!=" "$nosacl_nodef_optnoacl"; then + echo "bad 'nosacl_def_optnoacl' against 'nosacl_nodef_optnoacl' output" + fi -diff before after -echo separator ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator -" | \ - $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +at_fn_diff_devnull "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/acls03.at:47" $at_failed && at_fn_log_failure $at_traceon; } - { set +x -$as_echo "$at_srcdir/selacl01.at:28: -mkdir ustar -(cd ustar -TEST_TAR_FORMAT=ustar + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_175 +#AT_START_176 +at_fn_group_banner 176 'selnx01.at:25' \ + "selinux: basic store/restore" " " 25 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "176. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/selnx01.at:28: +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 * -echo \"test\" > \$\$ -chmod 0 \$\$ -cat \$\$ > /dev/null 2>&1 -result=\$? -rm -f \$\$ -test \$result -eq 0 || exit 77 - - file=\$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test \$file &> /dev/null @@ -41052,77 +42171,77 @@ test \$result -eq 0 || exit 77 fi +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link - file=\$(TMPDIR=. mktemp fiXXXXXX) +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir - setfacl -m u:\$UID:rwx \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi +# clear the directory +rm -rf dir +# ================================================ +# check if selinux contexts are correctly restored - getfacl \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi +tar --selinux -xf archive.tar - rm -rf \$file +# archive for later debugging +cp archive.tar archive_origin.tar - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:\$UID:rwx \$file - err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ + grep -v -e '^#' -e ^\$ | cut -d: -f1 +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing -mkdir dir -mkfifo dir/fifo -MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) -MINOR=\$( stat /dev/urandom --printf=\"%T\" ) -mknod dir/chartype c \$MAJOR \$MINOR +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -# setup attributes -restorecon -R dir -chcon -h --user=system_u dir/fifo -chcon -h --user=system_u dir/chartype -setfacl -m u:\$UID:--- dir/fifo -setfacl -m u:\$UID:rwx dir/chartype +diff with_selinux without_selinux > diff_with_without +if test \"\$?\" -eq \"0\"; then + echo \"selinux contexts probably restored while --selinux is off\" +fi -getfacl dir/fifo >> before -getfattr -msecurity.selinux dir/chartype >> before +# ================================================================= +# check if selinux is not archived when --selinux option is missing -tar --xattrs --selinux --acls -cf archive.tar dir +tar -cf archive.tar dir -mv dir olddir +# clear the directory +rm -rf dir -tar --xattrs --selinux --acls -xf archive.tar +# restore (with --selinux) +tar --selinux -xf archive.tar dir -getfacl dir/fifo >> after -getfattr -msecurity.selinux dir/chartype >> after +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test \"\$?\" -ne \"0\"; then + echo \"bad result\" +fi -diff before after -echo separator )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" ( $at_check_trace; -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 * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 || exit 77 - - file=$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test $file &> /dev/null @@ -41161,88 +42280,90 @@ test $result -eq 0 || exit 77 fi +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start - file=$(TMPDIR=. mktemp fiXXXXXX) +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link - setfacl -m u:$UID:rwx $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir +# clear the directory +rm -rf dir - getfacl $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi +# ================================================ +# check if selinux contexts are correctly restored - rm -rf $file +tar --selinux -xf archive.tar - file=$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:$UID:rwx $file - err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi +# archive for later debugging +cp archive.tar archive_origin.tar +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ + grep -v -e '^#' -e ^$ | cut -d: -f1 -mkdir dir -mkfifo dir/fifo -MAJOR=$( stat /dev/urandom --printf="%t" ) -MINOR=$( stat /dev/urandom --printf="%T" ) -mknod dir/chartype c $MAJOR $MINOR +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing -# setup attributes -restorecon -R dir -chcon -h --user=system_u dir/fifo -chcon -h --user=system_u dir/chartype -setfacl -m u:$UID:--- dir/fifo -setfacl -m u:$UID:rwx dir/chartype +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -getfacl dir/fifo >> before -getfattr -msecurity.selinux dir/chartype >> before +diff with_selinux without_selinux > diff_with_without +if test "$?" -eq "0"; then + echo "selinux contexts probably restored while --selinux is off" +fi -tar --xattrs --selinux --acls -cf archive.tar dir +# ================================================================= +# check if selinux is not archived when --selinux option is missing -mv dir olddir +tar -cf archive.tar dir -tar --xattrs --selinux --acls -xf archive.tar +# clear the directory +rm -rf dir -getfacl dir/fifo >> after -getfattr -msecurity.selinux dir/chartype >> after +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test "$?" -ne "0"; then + echo "bad result" +fi -diff before after -echo separator ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator +echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u +security.selinux=\"unconfined_u +security.selinux=\"system_u " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/selacl01.at:28: -mkdir posix -(cd posix -TEST_TAR_FORMAT=posix +$as_echo "$at_srcdir/selnx01.at:28: +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 * -echo \"test\" > \$\$ -chmod 0 \$\$ -cat \$\$ > /dev/null 2>&1 -result=\$? -rm -f \$\$ -test \$result -eq 0 || exit 77 - - file=\$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test \$file &> /dev/null @@ -41281,77 +42402,77 @@ test \$result -eq 0 || exit 77 fi +mkdir dir +genfile --file dir/file +ln -s file dir/link - file=\$(TMPDIR=. mktemp fiXXXXXX) +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start - setfacl -m u:\$UID:rwx \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir - getfacl \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi +# clear the directory +rm -rf dir - rm -rf \$file +# ================================================ +# check if selinux contexts are correctly restored - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:\$UID:rwx \$file - err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi +tar --selinux -xf archive.tar +# archive for later debugging +cp archive.tar archive_origin.tar -mkdir dir -mkfifo dir/fifo -MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) -MINOR=\$( stat /dev/urandom --printf=\"%T\" ) -mknod dir/chartype c \$MAJOR \$MINOR +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ + grep -v -e '^#' -e ^\$ | cut -d: -f1 -# setup attributes -restorecon -R dir -chcon -h --user=system_u dir/fifo -chcon -h --user=system_u dir/chartype -setfacl -m u:\$UID:--- dir/fifo -setfacl -m u:\$UID:rwx dir/chartype +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing -getfacl dir/fifo >> before -getfattr -msecurity.selinux dir/chartype >> before +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -tar --xattrs --selinux --acls -cf archive.tar dir +diff with_selinux without_selinux > diff_with_without +if test \"\$?\" -eq \"0\"; then + echo \"selinux contexts probably restored while --selinux is off\" +fi -mv dir olddir +# ================================================================= +# check if selinux is not archived when --selinux option is missing -tar --xattrs --selinux --acls -xf archive.tar +tar -cf archive.tar dir -getfacl dir/fifo >> after -getfattr -msecurity.selinux dir/chartype >> after +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test \"\$?\" -ne \"0\"; then + echo \"bad result\" +fi -diff before after -echo separator )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" ( $at_check_trace; -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 * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 || exit 77 - - file=$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test $file &> /dev/null @@ -41390,88 +42511,90 @@ test $result -eq 0 || exit 77 fi +mkdir dir +genfile --file dir/file +ln -s file dir/link - file=$(TMPDIR=. mktemp fiXXXXXX) +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start - setfacl -m u:$UID:rwx $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir - getfacl $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi +# clear the directory +rm -rf dir - rm -rf $file +# ================================================ +# check if selinux contexts are correctly restored - file=$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:$UID:rwx $file - err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi +tar --selinux -xf archive.tar +# archive for later debugging +cp archive.tar archive_origin.tar -mkdir dir -mkfifo dir/fifo -MAJOR=$( stat /dev/urandom --printf="%t" ) -MINOR=$( stat /dev/urandom --printf="%T" ) -mknod dir/chartype c $MAJOR $MINOR +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ + grep -v -e '^#' -e ^$ | cut -d: -f1 -# setup attributes -restorecon -R dir -chcon -h --user=system_u dir/fifo -chcon -h --user=system_u dir/chartype -setfacl -m u:$UID:--- dir/fifo -setfacl -m u:$UID:rwx dir/chartype +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing -getfacl dir/fifo >> before -getfattr -msecurity.selinux dir/chartype >> before +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -tar --xattrs --selinux --acls -cf archive.tar dir +diff with_selinux without_selinux > diff_with_without +if test "$?" -eq "0"; then + echo "selinux contexts probably restored while --selinux is off" +fi -mv dir olddir +# ================================================================= +# check if selinux is not archived when --selinux option is missing -tar --xattrs --selinux --acls -xf archive.tar +tar -cf archive.tar dir -getfacl dir/fifo >> after -getfattr -msecurity.selinux dir/chartype >> after +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test "$?" -ne "0"; then + echo "bad result" +fi -diff before after -echo separator ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator +echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u +security.selinux=\"unconfined_u +security.selinux=\"system_u " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/selacl01.at:28: -mkdir gnu -(cd gnu -TEST_TAR_FORMAT=gnu +$as_echo "$at_srcdir/selnx01.at:28: +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 * -echo \"test\" > \$\$ -chmod 0 \$\$ -cat \$\$ > /dev/null 2>&1 -result=\$? -rm -f \$\$ -test \$result -eq 0 || exit 77 - - file=\$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test \$file &> /dev/null @@ -41510,77 +42633,77 @@ test \$result -eq 0 || exit 77 fi +mkdir dir +genfile --file dir/file +ln -s file dir/link - file=\$(TMPDIR=. mktemp fiXXXXXX) +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start - setfacl -m u:\$UID:rwx \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir - getfacl \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi +# clear the directory +rm -rf dir - rm -rf \$file +# ================================================ +# check if selinux contexts are correctly restored - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:\$UID:rwx \$file - err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi +tar --selinux -xf archive.tar +# archive for later debugging +cp archive.tar archive_origin.tar -mkdir dir -mkfifo dir/fifo -MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) -MINOR=\$( stat /dev/urandom --printf=\"%T\" ) -mknod dir/chartype c \$MAJOR \$MINOR +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ + grep -v -e '^#' -e ^\$ | cut -d: -f1 -# setup attributes -restorecon -R dir -chcon -h --user=system_u dir/fifo -chcon -h --user=system_u dir/chartype -setfacl -m u:\$UID:--- dir/fifo -setfacl -m u:\$UID:rwx dir/chartype +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing -getfacl dir/fifo >> before -getfattr -msecurity.selinux dir/chartype >> before +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -tar --xattrs --selinux --acls -cf archive.tar dir +diff with_selinux without_selinux > diff_with_without +if test \"\$?\" -eq \"0\"; then + echo \"selinux contexts probably restored while --selinux is off\" +fi -mv dir olddir +# ================================================================= +# check if selinux is not archived when --selinux option is missing -tar --xattrs --selinux --acls -xf archive.tar +tar -cf archive.tar dir -getfacl dir/fifo >> after -getfattr -msecurity.selinux dir/chartype >> after +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test \"\$?\" -ne \"0\"; then + echo \"bad result\" +fi -diff before after -echo separator )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" ( $at_check_trace; -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 * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 || exit 77 - - file=$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test $file &> /dev/null @@ -41619,110 +42742,90 @@ test $result -eq 0 || exit 77 fi +mkdir dir +genfile --file dir/file +ln -s file dir/link - file=$(TMPDIR=. mktemp fiXXXXXX) +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start - setfacl -m u:$UID:rwx $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir - getfacl $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi +# clear the directory +rm -rf dir - rm -rf $file +# ================================================ +# check if selinux contexts are correctly restored - file=$(TMPDIR=. mktemp fiXXXXXX) - setfacl -m u:$UID:rwx $file - err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi +tar --selinux -xf archive.tar +# archive for later debugging +cp archive.tar archive_origin.tar -mkdir dir -mkfifo dir/fifo -MAJOR=$( stat /dev/urandom --printf="%t" ) -MINOR=$( stat /dev/urandom --printf="%T" ) -mknod dir/chartype c $MAJOR $MINOR +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ + grep -v -e '^#' -e ^$ | cut -d: -f1 -# setup attributes -restorecon -R dir -chcon -h --user=system_u dir/fifo -chcon -h --user=system_u dir/chartype -setfacl -m u:$UID:--- dir/fifo -setfacl -m u:$UID:rwx dir/chartype +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing -getfacl dir/fifo >> before -getfattr -msecurity.selinux dir/chartype >> before +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux -tar --xattrs --selinux --acls -cf archive.tar dir +diff with_selinux without_selinux > diff_with_without +if test "$?" -eq "0"; then + echo "selinux contexts probably restored while --selinux is off" +fi -mv dir olddir +# ================================================================= +# check if selinux is not archived when --selinux option is missing -tar --xattrs --selinux --acls -xf archive.tar +tar -cf archive.tar dir -getfacl dir/fifo >> after -getfattr -msecurity.selinux dir/chartype >> after +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test "$?" -ne "0"; then + echo "bad result" +fi -diff before after -echo separator ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "separator +echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u +security.selinux=\"unconfined_u +security.selinux=\"system_u " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" $at_failed && at_fn_log_failure $at_traceon; } - - - - set +x - $at_times_p && times >"$at_times_file" -) 5>&1 2>&1 7>&- | eval $at_tee_pipe -read at_status <"$at_status_file" -#AT_STOP_173 -#AT_START_174 -at_fn_group_banner 174 'capabs_raw01.at:25' \ - "capabilities: binary store/restore" " " 25 -at_xfail=no - test -f $XFAILFILE && at_xfail=yes -( - $as_echo "174. $at_setup_line: testing $at_desc ..." - $at_traceon - - - - - - { set +x -$as_echo "$at_srcdir/capabs_raw01.at:28: -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 + { set +x +$as_echo "$at_srcdir/selnx01.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS=\"-H v7\" +TAR_OPTIONS=\"-H posix\" export TAR_OPTIONS rm -rf * -echo \"test\" > \$\$ -chmod 0 \$\$ -cat \$\$ > /dev/null 2>&1 -result=\$? -rm -f \$\$ -test \$result -eq 0 || exit 77 - - - file=\$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test \$file &> /dev/null @@ -41737,67 +42840,101 @@ test \$result -eq 0 || exit 77 fi - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v ahoj \$file - # check whether tar fails to store xattrs - err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi file=\$(TMPDIR=. mktemp fiXXXXXX) - setcap \"= cap_chown=ei\" \$file &> /dev/null + restorecon \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi - getcap \$file &> /dev/null + chcon -h --user=unconfined_u \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi rm -rf \$file + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + mkdir dir genfile --file dir/file +ln -s file dir/link -setcap \"= cap_chown=ei\" dir/file +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start -# archive whole directory including binary xattrs -tar --xattrs -cf archive.tar dir +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir # clear the directory rm -rf dir -# restore _all_ xattrs (not just the user.* domain) -tar --xattrs --xattrs-include='*' -xf archive.tar +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ + grep -v -e '^#' -e ^\$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test \"\$?\" -eq \"0\"; then + echo \"selinux contexts probably restored while --selinux is off\" +fi + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test \"\$?\" -ne \"0\"; then + echo \"bad result\" +fi -getcap dir/file )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" ( $at_check_trace; -mkdir v7 -(cd v7 -TEST_TAR_FORMAT=v7 +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix export TEST_TAR_FORMAT -TAR_OPTIONS="-H v7" +TAR_OPTIONS="-H posix" export TAR_OPTIONS rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 || exit 77 - - - file=$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test $file &> /dev/null @@ -41812,78 +42949,114 @@ test $result -eq 0 || exit 77 fi - file=$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v ahoj $file - # check whether tar fails to store xattrs - err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi file=$(TMPDIR=. mktemp fiXXXXXX) - setcap "= cap_chown=ei" $file &> /dev/null + restorecon $file &> /dev/null if test "$?" != 0; then exit 77 fi - getcap $file &> /dev/null + chcon -h --user=unconfined_u $file &> /dev/null if test "$?" != 0; then exit 77 fi rm -rf $file + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + mkdir dir genfile --file dir/file +ln -s file dir/link -setcap "= cap_chown=ei" dir/file +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start -# archive whole directory including binary xattrs -tar --xattrs -cf archive.tar dir +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir # clear the directory rm -rf dir -# restore _all_ xattrs (not just the user.* domain) -tar --xattrs --xattrs-include='*' -xf archive.tar +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ + grep -v -e '^#' -e ^$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test "$?" -eq "0"; then + echo "selinux contexts probably restored while --selinux is off" +fi + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test "$?" -ne "0"; then + echo "bad result" +fi -getcap dir/file ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei +echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u +security.selinux=\"unconfined_u +security.selinux=\"system_u " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/capabs_raw01.at:28: -mkdir oldgnu -(cd oldgnu -TEST_TAR_FORMAT=oldgnu +$as_echo "$at_srcdir/selnx01.at:28: +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 * -echo \"test\" > \$\$ -chmod 0 \$\$ -cat \$\$ > /dev/null 2>&1 -result=\$? -rm -f \$\$ -test \$result -eq 0 || exit 77 - - - file=\$(TMPDIR=. mktemp fiXXXXXX) setfattr -n user.test -v test \$file &> /dev/null @@ -41898,48 +43071,3244 @@ test \$result -eq 0 || exit 77 fi - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v ahoj \$file - # check whether tar fails to store xattrs - err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi file=\$(TMPDIR=. mktemp fiXXXXXX) - setcap \"= cap_chown=ei\" \$file &> /dev/null + restorecon \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi - getcap \$file &> /dev/null + chcon -h --user=unconfined_u \$file &> /dev/null if test \"\$?\" != 0; then exit 77 fi rm -rf \$file + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + mkdir dir genfile --file dir/file +ln -s file dir/link -setcap \"= cap_chown=ei\" dir/file +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start -# archive whole directory including binary xattrs -tar --xattrs -cf archive.tar dir +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \\ + grep -v -e '^#' -e ^\$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test \"\$?\" -eq \"0\"; then + echo \"selinux contexts probably restored while --selinux is off\" +fi + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test \"\$?\" -ne \"0\"; then + echo \"bad result\" +fi + +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selnx01.at:28" +( $at_check_trace; +mkdir gnu +(cd gnu +TEST_TAR_FORMAT=gnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H gnu" +export TAR_OPTIONS +rm -rf * + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +genfile --file dir/file +ln -s file dir/link + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > start + +restorecon -R dir +chcon -h --user=system_u dir +chcon -h --user=unconfined_u dir/file +chcon -h --user=system_u dir/link + +# archive whole directory including selinux contexts +tar --selinux -cf archive.tar dir + +# clear the directory +rm -rf dir + +# ================================================ +# check if selinux contexts are correctly restored + +tar --selinux -xf archive.tar + +# archive for later debugging +cp archive.tar archive_origin.tar + +# check if selinux contexts were restored +getfattr -h -d dir dir/file dir/link -msecurity.selinux | \ + grep -v -e '^#' -e ^$ | cut -d: -f1 + +# =========================================================================== +# check if selinux contexts are not restored when --selinux option is missing + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > with_selinux +rm -rf dir +tar -xf archive.tar +getfattr -h -d -msecurity.selinux dir dir/file dir/link > without_selinux + +diff with_selinux without_selinux > diff_with_without +if test "$?" -eq "0"; then + echo "selinux contexts probably restored while --selinux is off" +fi + +# ================================================================= +# check if selinux is not archived when --selinux option is missing + +tar -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore (with --selinux) +tar --selinux -xf archive.tar dir + +getfattr -h -d -msecurity.selinux dir dir/file dir/link > final +diff start final > final_diff +if test "$?" -ne "0"; then + echo "bad result" +fi + +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "security.selinux=\"system_u +security.selinux=\"unconfined_u +security.selinux=\"system_u +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/selnx01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_176 +#AT_START_177 +at_fn_group_banner 177 'selacl01.at:25' \ + "acls/selinux: special files & fifos" " " 25 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "177. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/selacl01.at:28: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) +MINOR=\$( stat /dev/urandom --printf=\"%T\" ) +mknod dir/chartype c \$MAJOR \$MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:\$UID:--- dir/fifo +setfacl -m u:\$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=$( stat /dev/urandom --printf="%t" ) +MINOR=$( stat /dev/urandom --printf="%T" ) +mknod dir/chartype c $MAJOR $MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:$UID:--- dir/fifo +setfacl -m u:$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/selacl01.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) +MINOR=\$( stat /dev/urandom --printf=\"%T\" ) +mknod dir/chartype c \$MAJOR \$MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:\$UID:--- dir/fifo +setfacl -m u:\$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=$( stat /dev/urandom --printf="%t" ) +MINOR=$( stat /dev/urandom --printf="%T" ) +mknod dir/chartype c $MAJOR $MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:$UID:--- dir/fifo +setfacl -m u:$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/selacl01.at:28: +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 + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) +MINOR=\$( stat /dev/urandom --printf=\"%T\" ) +mknod dir/chartype c \$MAJOR \$MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:\$UID:--- dir/fifo +setfacl -m u:\$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +( $at_check_trace; +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 + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=$( stat /dev/urandom --printf="%t" ) +MINOR=$( stat /dev/urandom --printf="%T" ) +mknod dir/chartype c $MAJOR $MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:$UID:--- dir/fifo +setfacl -m u:$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/selacl01.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) +MINOR=\$( stat /dev/urandom --printf=\"%T\" ) +mknod dir/chartype c \$MAJOR \$MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:\$UID:--- dir/fifo +setfacl -m u:\$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=$( stat /dev/urandom --printf="%t" ) +MINOR=$( stat /dev/urandom --printf="%T" ) +mknod dir/chartype c $MAJOR $MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:$UID:--- dir/fifo +setfacl -m u:$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/selacl01.at:28: +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 + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + restorecon \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + err=\$( tar --selinux -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:\$UID:rwx \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfacl \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:\$UID:rwx \$file + err=\$( tar --acls -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=\$( stat /dev/urandom --printf=\"%t\" ) +MINOR=\$( stat /dev/urandom --printf=\"%T\" ) +mknod dir/chartype c \$MAJOR \$MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:\$UID:--- dir/fifo +setfacl -m u:\$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "selacl01.at:28" +( $at_check_trace; +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 + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + restorecon $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + chcon -h --user=unconfined_u $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + err=$( tar --selinux -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfacl -m u:$UID:rwx $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfacl $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfacl -m u:$UID:rwx $file + err=$( tar --acls -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + +mkdir dir +mkfifo dir/fifo +MAJOR=$( stat /dev/urandom --printf="%t" ) +MINOR=$( stat /dev/urandom --printf="%T" ) +mknod dir/chartype c $MAJOR $MINOR + +# setup attributes +restorecon -R dir +chcon -h --user=system_u dir/fifo +chcon -h --user=system_u dir/chartype +setfacl -m u:$UID:--- dir/fifo +setfacl -m u:$UID:rwx dir/chartype + +getfacl dir/fifo >> before +getfattr -msecurity.selinux dir/chartype >> before + +tar --xattrs --selinux --acls -cf archive.tar dir + +mv dir olddir + +tar --xattrs --selinux --acls -xf archive.tar + +getfacl dir/fifo >> after +getfattr -msecurity.selinux dir/chartype >> after + +diff before after +echo separator +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "separator +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/selacl01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_177 +#AT_START_178 +at_fn_group_banner 178 'capabs_raw01.at:25' \ + "capabilities: binary store/restore" " " 25 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "178. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/capabs_raw01.at:28: +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H v7\" +export TAR_OPTIONS +rm -rf * + + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setcap \"= cap_chown=ei\" \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getcap \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + +mkdir dir +genfile --file dir/file + +setcap \"= cap_chown=ei\" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +( $at_check_trace; +mkdir v7 +(cd v7 +TEST_TAR_FORMAT=v7 +export TEST_TAR_FORMAT +TAR_OPTIONS="-H v7" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setcap "= cap_chown=ei" $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getcap $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + +mkdir dir +genfile --file dir/file + +setcap "= cap_chown=ei" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/capabs_raw01.at:28: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * + + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setcap \"= cap_chown=ei\" \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getcap \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + +mkdir dir +genfile --file dir/file + +setcap \"= cap_chown=ei\" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +( $at_check_trace; +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS="-H oldgnu" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setcap "= cap_chown=ei" $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getcap $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + +mkdir dir +genfile --file dir/file + +setcap "= cap_chown=ei" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/capabs_raw01.at:28: +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 + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setcap \"= cap_chown=ei\" \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getcap \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + +mkdir dir +genfile --file dir/file + +setcap \"= cap_chown=ei\" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +( $at_check_trace; +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 + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setcap "= cap_chown=ei" $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getcap $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + +mkdir dir +genfile --file dir/file + +setcap "= cap_chown=ei" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/capabs_raw01.at:28: +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H posix\" +export TAR_OPTIONS +rm -rf * + + +echo \"test\" > \$\$ +chmod 0 \$\$ +cat \$\$ > /dev/null 2>&1 +result=\$? +rm -f \$\$ +test \$result -eq 0 || exit 77 + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setcap \"= cap_chown=ei\" \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getcap \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + +mkdir dir +genfile --file dir/file + +setcap \"= cap_chown=ei\" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +( $at_check_trace; +mkdir posix +(cd posix +TEST_TAR_FORMAT=posix +export TEST_TAR_FORMAT +TAR_OPTIONS="-H posix" +export TAR_OPTIONS +rm -rf * + + +echo "test" > $$ +chmod 0 $$ +cat $$ > /dev/null 2>&1 +result=$? +rm -f $$ +test $result -eq 0 || exit 77 + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setcap "= cap_chown=ei" $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getcap $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + +mkdir dir +genfile --file dir/file + +setcap "= cap_chown=ei" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/capabs_raw01.at:28: +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 + + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getfattr \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj \$file + # check whether tar fails to store xattrs + err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) + if test \"\$err\" != \"0\"; then + exit 77 + fi + + + file=\$(TMPDIR=. mktemp fiXXXXXX) + + setcap \"= cap_chown=ei\" \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + + getcap \$file &> /dev/null + if test \"\$?\" != 0; then + exit 77 + fi + + rm -rf \$file + + +mkdir dir +genfile --file dir/file + +setcap \"= cap_chown=ei\" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +)" +at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +( $at_check_trace; +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 + + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setfattr -n user.test -v test $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getfattr $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + setfattr -n user.test -v ahoj $file + # check whether tar fails to store xattrs + err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) + if test "$err" != "0"; then + exit 77 + fi + + + file=$(TMPDIR=. mktemp fiXXXXXX) + + setcap "= cap_chown=ei" $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + + getcap $file &> /dev/null + if test "$?" != 0; then + exit 77 + fi + + rm -rf $file + + +mkdir dir +genfile --file dir/file + +setcap "= cap_chown=ei" dir/file + +# archive whole directory including binary xattrs +tar --xattrs -cf archive.tar dir + +# clear the directory +rm -rf dir + +# restore _all_ xattrs (not just the user.* domain) +tar --xattrs --xattrs-include='*' -xf archive.tar + +getcap dir/file +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_178 +#AT_START_179 +at_fn_group_banner 179 'onetop01.at:21' \ + "tar --one-top-level" " " 26 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "179. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/onetop01.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop01.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop01.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop01.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop01.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop01.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop01.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_179 +#AT_START_180 +at_fn_group_banner 180 'onetop02.at:21' \ + "tar --one-top-level --show-transformed" " " 26 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "180. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/onetop02.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/c +. +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop02.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/c +. +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop02.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/c +. +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop02.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/c +. +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop02.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop02.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --show-transformed -v -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/c +. +./a +./a/b +./a/c +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop02.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_180 +#AT_START_181 +at_fn_group_banner 181 'onetop03.at:21' \ + "tar --one-top-level --transform" " " 26 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "181. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/onetop03.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/d +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop03.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/d +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop03.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/d +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop03.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/d +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop03.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop03.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +mkdir out +cd out +tar --one-top-level --transform 's/c/d/' -x -f ../a.tar +find . | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo ". +./a +./a/b +./a/d +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop03.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + + + + set +x + $at_times_p && times >"$at_times_file" +) 5>&1 2>&1 7>&- | eval $at_tee_pipe +read at_status <"$at_status_file" +#AT_STOP_181 +#AT_START_182 +at_fn_group_banner 182 'onetop04.at:21' \ + "tar --one-top-level --transform" " " 26 +at_xfail=no + test -f $XFAILFILE && at_xfail=yes +( + $as_echo "182. $at_setup_line: testing $at_desc ..." + $at_traceon + + + + + + { set +x +$as_echo "$at_srcdir/onetop04.at:24: +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +)" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24" +( $at_check_trace; +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 a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort +) +) >>"$at_stdout" 2>>"$at_stderr" 5>&- +at_status=$? at_failed=false +$at_check_filter +at_fn_diff_devnull "$at_stderr" || at_failed=: +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/d +" | \ + $at_diff - "$at_stdout" || at_failed=: +at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24" +$at_failed && at_fn_log_failure +$at_traceon; } + + { set +x +$as_echo "$at_srcdir/onetop04.at:24: +mkdir oldgnu +(cd oldgnu +TEST_TAR_FORMAT=oldgnu +export TEST_TAR_FORMAT +TAR_OPTIONS=\"-H oldgnu\" +export TAR_OPTIONS +rm -rf * -# clear the directory -rm -rf dir -# restore _all_ xattrs (not just the user.* domain) -tar --xattrs --xattrs-include='*' -xf archive.tar +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -getcap dir/file +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24" ( $at_check_trace; mkdir oldgnu (cd oldgnu @@ -41950,83 +46319,29 @@ export TAR_OPTIONS rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 || exit 77 - - - - file=$(TMPDIR=. mktemp fiXXXXXX) - - setfattr -n user.test -v test $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - getfattr $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - file=$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v ahoj $file - # check whether tar fails to store xattrs - err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi - - - file=$(TMPDIR=. mktemp fiXXXXXX) - - setcap "= cap_chown=ei" $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - getcap $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - rm -rf $file - - -mkdir dir -genfile --file dir/file - -setcap "= cap_chown=ei" dir/file - -# archive whole directory including binary xattrs -tar --xattrs -cf archive.tar dir - -# clear the directory -rm -rf dir - -# restore _all_ xattrs (not just the user.* domain) -tar --xattrs --xattrs-include='*' -xf archive.tar +test -z "`sort < /dev/null 2>&1`" || exit 77 -getcap dir/file +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/capabs_raw01.at:28: +$as_echo "$at_srcdir/onetop04.at:24: mkdir ustar (cd ustar TEST_TAR_FORMAT=ustar @@ -42036,71 +46351,15 @@ export TAR_OPTIONS rm -rf * -echo \"test\" > \$\$ -chmod 0 \$\$ -cat \$\$ > /dev/null 2>&1 -result=\$? -rm -f \$\$ -test \$result -eq 0 || exit 77 - - - - file=\$(TMPDIR=. mktemp fiXXXXXX) - - setfattr -n user.test -v test \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - - getfattr \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v ahoj \$file - # check whether tar fails to store xattrs - err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi - - - file=\$(TMPDIR=. mktemp fiXXXXXX) - - setcap \"= cap_chown=ei\" \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - - getcap \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - rm -rf \$file - - -mkdir dir -genfile --file dir/file - -setcap \"= cap_chown=ei\" dir/file - -# archive whole directory including binary xattrs -tar --xattrs -cf archive.tar dir - -# clear the directory -rm -rf dir - -# restore _all_ xattrs (not just the user.* domain) -tar --xattrs --xattrs-include='*' -xf archive.tar +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -getcap dir/file +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24" ( $at_check_trace; mkdir ustar (cd ustar @@ -42111,83 +46370,29 @@ export TAR_OPTIONS rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 || exit 77 - - - - file=$(TMPDIR=. mktemp fiXXXXXX) - - setfattr -n user.test -v test $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - getfattr $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - file=$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v ahoj $file - # check whether tar fails to store xattrs - err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi - - - file=$(TMPDIR=. mktemp fiXXXXXX) - - setcap "= cap_chown=ei" $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - getcap $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - rm -rf $file - - -mkdir dir -genfile --file dir/file - -setcap "= cap_chown=ei" dir/file - -# archive whole directory including binary xattrs -tar --xattrs -cf archive.tar dir - -# clear the directory -rm -rf dir - -# restore _all_ xattrs (not just the user.* domain) -tar --xattrs --xattrs-include='*' -xf archive.tar +test -z "`sort < /dev/null 2>&1`" || exit 77 -getcap dir/file +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/capabs_raw01.at:28: +$as_echo "$at_srcdir/onetop04.at:24: mkdir posix (cd posix TEST_TAR_FORMAT=posix @@ -42197,71 +46402,15 @@ export TAR_OPTIONS rm -rf * -echo \"test\" > \$\$ -chmod 0 \$\$ -cat \$\$ > /dev/null 2>&1 -result=\$? -rm -f \$\$ -test \$result -eq 0 || exit 77 - - - - file=\$(TMPDIR=. mktemp fiXXXXXX) - - setfattr -n user.test -v test \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - - getfattr \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v ahoj \$file - # check whether tar fails to store xattrs - err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi - - - file=\$(TMPDIR=. mktemp fiXXXXXX) - - setcap \"= cap_chown=ei\" \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - - getcap \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - rm -rf \$file - - -mkdir dir -genfile --file dir/file - -setcap \"= cap_chown=ei\" dir/file - -# archive whole directory including binary xattrs -tar --xattrs -cf archive.tar dir - -# clear the directory -rm -rf dir - -# restore _all_ xattrs (not just the user.* domain) -tar --xattrs --xattrs-include='*' -xf archive.tar +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -getcap dir/file +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24" ( $at_check_trace; mkdir posix (cd posix @@ -42272,83 +46421,29 @@ export TAR_OPTIONS rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 || exit 77 - - - - file=$(TMPDIR=. mktemp fiXXXXXX) - - setfattr -n user.test -v test $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - getfattr $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - file=$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v ahoj $file - # check whether tar fails to store xattrs - err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi - - - file=$(TMPDIR=. mktemp fiXXXXXX) - - setcap "= cap_chown=ei" $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - getcap $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - rm -rf $file - - -mkdir dir -genfile --file dir/file - -setcap "= cap_chown=ei" dir/file - -# archive whole directory including binary xattrs -tar --xattrs -cf archive.tar dir - -# clear the directory -rm -rf dir - -# restore _all_ xattrs (not just the user.* domain) -tar --xattrs --xattrs-include='*' -xf archive.tar +test -z "`sort < /dev/null 2>&1`" || exit 77 -getcap dir/file +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24" $at_failed && at_fn_log_failure $at_traceon; } { set +x -$as_echo "$at_srcdir/capabs_raw01.at:28: +$as_echo "$at_srcdir/onetop04.at:24: mkdir gnu (cd gnu TEST_TAR_FORMAT=gnu @@ -42358,71 +46453,15 @@ export TAR_OPTIONS rm -rf * -echo \"test\" > \$\$ -chmod 0 \$\$ -cat \$\$ > /dev/null 2>&1 -result=\$? -rm -f \$\$ -test \$result -eq 0 || exit 77 - - - - file=\$(TMPDIR=. mktemp fiXXXXXX) - - setfattr -n user.test -v test \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - - getfattr \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - - file=\$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v ahoj \$file - # check whether tar fails to store xattrs - err=\$( tar --xattrs -cf /dev/null \$file 2>&1 >/dev/null | wc -l ) - if test \"\$err\" != \"0\"; then - exit 77 - fi - - - file=\$(TMPDIR=. mktemp fiXXXXXX) - - setcap \"= cap_chown=ei\" \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - - getcap \$file &> /dev/null - if test \"\$?\" != 0; then - exit 77 - fi - - rm -rf \$file - - -mkdir dir -genfile --file dir/file - -setcap \"= cap_chown=ei\" dir/file - -# archive whole directory including binary xattrs -tar --xattrs -cf archive.tar dir - -# clear the directory -rm -rf dir - -# restore _all_ xattrs (not just the user.* domain) -tar --xattrs --xattrs-include='*' -xf archive.tar +test -z \"\`sort < /dev/null 2>&1\`\" || exit 77 -getcap dir/file +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort )" -at_fn_check_prepare_notrace 'a $(...) command substitution' "capabs_raw01.at:28" +at_fn_check_prepare_notrace 'a `...` command substitution' "onetop04.at:24" ( $at_check_trace; mkdir gnu (cd gnu @@ -42433,78 +46472,24 @@ export TAR_OPTIONS rm -rf * -echo "test" > $$ -chmod 0 $$ -cat $$ > /dev/null 2>&1 -result=$? -rm -f $$ -test $result -eq 0 || exit 77 - - - - file=$(TMPDIR=. mktemp fiXXXXXX) - - setfattr -n user.test -v test $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - getfattr $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - file=$(TMPDIR=. mktemp fiXXXXXX) - setfattr -n user.test -v ahoj $file - # check whether tar fails to store xattrs - err=$( tar --xattrs -cf /dev/null $file 2>&1 >/dev/null | wc -l ) - if test "$err" != "0"; then - exit 77 - fi - - - file=$(TMPDIR=. mktemp fiXXXXXX) - - setcap "= cap_chown=ei" $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - - getcap $file &> /dev/null - if test "$?" != 0; then - exit 77 - fi - - rm -rf $file - - -mkdir dir -genfile --file dir/file - -setcap "= cap_chown=ei" dir/file - -# archive whole directory including binary xattrs -tar --xattrs -cf archive.tar dir - -# clear the directory -rm -rf dir - -# restore _all_ xattrs (not just the user.* domain) -tar --xattrs --xattrs-include='*' -xf archive.tar +test -z "`sort < /dev/null 2>&1`" || exit 77 -getcap dir/file +mkdir a +genfile --file a/b +genfile --file c +tar cf a.tar a c +tar -tf a.tar --one-top-level --transform 's/c/d/' --show-transformed | sort ) ) >>"$at_stdout" 2>>"$at_stderr" 5>&- at_status=$? at_failed=false $at_check_filter at_fn_diff_devnull "$at_stderr" || at_failed=: -echo >>"$at_stdout"; $as_echo "dir/file = cap_chown+ei +echo >>"$at_stdout"; $as_echo "a/ +a/b +a/d " | \ $at_diff - "$at_stdout" || at_failed=: -at_fn_check_status 0 $at_status "$at_srcdir/capabs_raw01.at:28" +at_fn_check_status 0 $at_status "$at_srcdir/onetop04.at:24" $at_failed && at_fn_log_failure $at_traceon; } @@ -42515,13 +46500,13 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_174 -#AT_START_175 -at_fn_group_banner 175 'gtarfail.at:21' \ - "gtarfail" " " 26 +#AT_STOP_182 +#AT_START_183 +at_fn_group_banner 183 'gtarfail.at:21' \ + "gtarfail" " " 27 at_xfail=no ( - $as_echo "175. $at_setup_line: testing $at_desc ..." + $as_echo "183. $at_setup_line: testing $at_desc ..." $at_traceon @@ -42567,13 +46552,13 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_175 -#AT_START_176 -at_fn_group_banner 176 'gtarfail2.at:21' \ - "gtarfail2" " " 26 +#AT_STOP_183 +#AT_START_184 +at_fn_group_banner 184 'gtarfail2.at:21' \ + "gtarfail2" " " 27 at_xfail=no ( - $as_echo "176. $at_setup_line: testing $at_desc ..." + $as_echo "184. $at_setup_line: testing $at_desc ..." $at_traceon @@ -42621,13 +46606,13 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_176 -#AT_START_177 -at_fn_group_banner 177 'multi-fail.at:21' \ - "multi-fail" " " 26 +#AT_STOP_184 +#AT_START_185 +at_fn_group_banner 185 'multi-fail.at:21' \ + "multi-fail" " " 27 at_xfail=no ( - $as_echo "177. $at_setup_line: testing $at_desc ..." + $as_echo "185. $at_setup_line: testing $at_desc ..." $at_traceon @@ -42729,13 +46714,13 @@ $at_traceon; } $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_177 -#AT_START_178 -at_fn_group_banner 178 'ustar-big-2g.at:21' \ - "ustar-big-2g" " " 26 +#AT_STOP_185 +#AT_START_186 +at_fn_group_banner 186 'ustar-big-2g.at:21' \ + "ustar-big-2g" " " 27 at_xfail=no ( - $as_echo "178. $at_setup_line: testing $at_desc ..." + $as_echo "186. $at_setup_line: testing $at_desc ..." $at_traceon @@ -42796,13 +46781,13 @@ done $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_178 -#AT_START_179 -at_fn_group_banner 179 'ustar-big-8g.at:21' \ - "ustar-big-8g" " " 26 +#AT_STOP_186 +#AT_START_187 +at_fn_group_banner 187 'ustar-big-8g.at:21' \ + "ustar-big-8g" " " 27 at_xfail=no ( - $as_echo "179. $at_setup_line: testing $at_desc ..." + $as_echo "187. $at_setup_line: testing $at_desc ..." $at_traceon @@ -42863,13 +46848,13 @@ done $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_179 -#AT_START_180 -at_fn_group_banner 180 'pax-big-10g.at:21' \ - "pax-big-10g" " " 26 +#AT_STOP_187 +#AT_START_188 +at_fn_group_banner 188 'pax-big-10g.at:21' \ + "pax-big-10g" " " 27 at_xfail=no ( - $as_echo "180. $at_setup_line: testing $at_desc ..." + $as_echo "188. $at_setup_line: testing $at_desc ..." $at_traceon @@ -42930,4 +46915,4 @@ done $at_times_p && times >"$at_times_file" ) 5>&1 2>&1 7>&- | eval $at_tee_pipe read at_status <"$at_status_file" -#AT_STOP_180 +#AT_STOP_188