From: Sergey Poznyakoff Date: Sat, 5 Oct 2013 06:10:35 +0000 (+0300) Subject: Fix namespace contamination in testsuite. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=576e1fcd6a7be06f86768b6a839148feeb07ad02;p=chaz%2Ftar Fix namespace contamination in testsuite. * tests/append01.at: Use m4_pushdef/m4_popdef to define local macros. * tests/delete03.at: Likewise. * tests/exclude06.at: Likewise. * tests/incr04.at: Likewise. * tests/link03.at: Likewise. * tests/long01.at: Likewise. * tests/longv7.at: Likewise. * tests/lustar01.at: Likewise. * tests/lustar02.at: Likewise. * tests/lustar03.at: Likewise. * tests/multiv05.at: Likewise. * tests/sparse04.at: Likewise. --- diff --git a/tests/append01.at b/tests/append01.at index 04b79b2..9cb01e5 100644 --- a/tests/append01.at +++ b/tests/append01.at @@ -29,7 +29,7 @@ AT_SETUP([appending files with long names]) AT_KEYWORDS([append append01]) -m4_define([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX]) +m4_pushdef([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_appending_long_file_names_that_run_into_a_limit_of_the_ustar_tarX]) AT_TAR_CHECK([ mkdir PREFIX @@ -44,4 +44,5 @@ PREFIX/file2 ], [],[],[],[oldgnu, ustar, posix, gnu]) +m4_popdef([PREFIX]) AT_CLEANUP diff --git a/tests/delete03.at b/tests/delete03.at index 243e1d4..1feed23 100644 --- a/tests/delete03.at +++ b/tests/delete03.at @@ -21,7 +21,7 @@ AT_SETUP([deleting members with long names]) AT_KEYWORDS([delete delete03]) -m4_define([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX]) +m4_pushdef([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX]) AT_TAR_CHECK([ @@ -45,4 +45,5 @@ tar -cf archive ./$prefix* && ./PREFIX[]9 ],[],[],[],[gnu, oldgnu, posix]) +m4_popdef([PREFIX]) AT_CLEANUP diff --git a/tests/exclude06.at b/tests/exclude06.at index 76dcc0a..c9155e4 100644 --- a/tests/exclude06.at +++ b/tests/exclude06.at @@ -26,7 +26,7 @@ AT_SETUP([exclude: long files in pax archives]) AT_KEYWORDS([exclude exclude06]) -m4_define([test_base_dir],[one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen]) +m4_pushdef([test_base_dir],[one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen]) AT_TAR_CHECK([ AT_TAR_MKHIER(test_base_dir) @@ -46,4 +46,5 @@ find out -type f [], [pax]) +m4_popdef([test_base_dir]) AT_CLEANUP diff --git a/tests/incr04.at b/tests/incr04.at index 27ca17a..0638e1b 100644 --- a/tests/incr04.at +++ b/tests/incr04.at @@ -29,7 +29,7 @@ AT_SETUP([proper icontents initialization]) AT_KEYWORDS([incremental incr04 icontents]) -m4_define([NAME_PREFIX],[a/b/one_31_chars_long_file_name_]) +m4_pushdef([NAME_PREFIX],[a/b/one_31_chars_long_file_name_]) AT_TAR_CHECK([ AT_TAR_MKHIER(a/b) @@ -61,6 +61,7 @@ tar: a/b: Directory is new tar: a/c: Directory has been renamed from 'a/b' ],[],[],[gnu, oldgnu, posix]) +m4_popdef([NAME_PREFIX]) AT_CLEANUP # End of incr04.at diff --git a/tests/link03.at b/tests/link03.at index c4a0331..0d87ccd 100644 --- a/tests/link03.at +++ b/tests/link03.at @@ -24,7 +24,7 @@ AT_SETUP([working -l with --remove-files]) AT_KEYWORDS([hardlinks link03]) -m4_define([create_files],[ +m4_pushdef([create_files],[ genfile -l 64 -f file1 ln file1 file2 ln file2 file3 @@ -51,4 +51,5 @@ file1 [tar: Missing links to 'file1'. ]) +m4_popdef([create_files]) AT_CLEANUP diff --git a/tests/long01.at b/tests/long01.at index b4b6605..fdab203 100644 --- a/tests/long01.at +++ b/tests/long01.at @@ -29,8 +29,8 @@ AT_SETUP([long file names divisible by block size]) AT_KEYWORDS([longname long512]) dnl Create a directory structure with maximum directory name length 512-16 -m4_define([NAME],[0123456789abcde]) -m4_define([FULLNAME],NAME) +m4_pushdef([NAME],[0123456789abcde]) +m4_pushdef([FULLNAME],NAME) m4_for([N],0,29,,[m4_define([FULLNAME],FULLNAME/NAME)]) AT_TAR_CHECK([ @@ -45,4 +45,6 @@ endfile ], [],[],[],[gnu,oldgnu]) +m4_popdef([NAME]) +m4_popdef([FULLNAME]) AT_CLEANUP diff --git a/tests/longv7.at b/tests/longv7.at index f910e3b..ed3cc21 100644 --- a/tests/longv7.at +++ b/tests/longv7.at @@ -24,8 +24,8 @@ AT_SETUP([long names in V7 archives]) AT_KEYWORDS([longname longv7]) -m4_define([DIR],[this_is_a_very_long_name_for_a_directory_which_causes_problems]) -m4_define([FILE],[this_is_a_very_long_file_name_which_raises_issues.c]) +m4_pushdef([DIR],[this_is_a_very_long_name_for_a_directory_which_causes_problems]) +m4_pushdef([FILE],[this_is_a_very_long_file_name_which_raises_issues.c]) AT_TAR_CHECK([ mkdir DIR @@ -44,4 +44,6 @@ tar: Exiting with failure status due to previous errors ], [],[],[v7]) +m4_popdef([FILE]) +m4_popdef([DIR]) AT_CLEANUP diff --git a/tests/lustar01.at b/tests/lustar01.at index bee6dcc..c3163c9 100644 --- a/tests/lustar01.at +++ b/tests/lustar01.at @@ -21,7 +21,7 @@ AT_SETUP([ustar: unsplittable file name]) AT_KEYWORDS([longname ustar lustar01]) -m4_define([LONGNAME], +m4_pushdef([LONGNAME], [this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_between_name_and_prefix]) AT_TAR_CHECK([ @@ -34,4 +34,5 @@ tar cf archive LONGNAME tar: Exiting with failure status due to previous errors ],[],[],[ustar]) +m4_popdef([LONGNAME]) AT_CLEANUP diff --git a/tests/lustar02.at b/tests/lustar02.at index 5ab20d6..0156142 100644 --- a/tests/lustar02.at +++ b/tests/lustar02.at @@ -21,13 +21,13 @@ AT_SETUP([ustar: unsplittable path name]) AT_KEYWORDS([longname ustar lustar02]) -m4_define([PREFIX_155], +m4_pushdef([PREFIX_155], [this_is_a_very_long_name_for_a_file_designed_to_test_generation_of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be]) -m4_define([DIR_155], +m4_pushdef([DIR_155], [this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be]) -m4_define([NAME], [tween_name_and_prefix]) +m4_pushdef([NAME], [tween_name_and_prefix]) AT_TAR_CHECK([ AT_TAR_MKHIER(PREFIX_155,NAME) @@ -39,4 +39,8 @@ tar cf archive PREFIX_155 tar: Exiting with failure status due to previous errors ],[],[],[ustar]) +m4_popdef([NAME]) +m4_popdef([DIR_155]) +m4_popdef([PREFIX_155]) + AT_CLEANUP diff --git a/tests/lustar03.at b/tests/lustar03.at index 4929eeb..055f0f4 100644 --- a/tests/lustar03.at +++ b/tests/lustar03.at @@ -21,10 +21,10 @@ AT_SETUP([ustar: splitting long names]) AT_KEYWORDS([longname ustar lustar03]) -m4_define([DIR_155], +m4_pushdef([DIR_155], [this_is_a_very_long_name_for_a_file_designed_to_test_generation/of_ustar_archives_by_gnu_tar_semicolon_it_will_not_fit_the_name_field_and_cannot_be_split_be]) -m4_define([NAME], [file]) +m4_pushdef([NAME], [file]) AT_TAR_CHECK([ AT_TAR_MKHIER(DIR_155,NAME) @@ -40,4 +40,6 @@ DIR_155/NAME ], [],[],[],[ustar]) +m4_popdef([NAME]) +m4_popdef([DIR_155]) AT_CLEANUP diff --git a/tests/multiv05.at b/tests/multiv05.at index ce03c87..33422f4 100644 --- a/tests/multiv05.at +++ b/tests/multiv05.at @@ -25,7 +25,7 @@ AT_SETUP([Restoring after an out of sync volume]) AT_KEYWORDS([multivolume multiv multiv05 sync]) -m4_define([FILELIST],[jeden,dwa,trzy,cztery,piec,szesc]) +m4_pushdef([FILELIST],[jeden,dwa,trzy,cztery,piec,szesc]) AT_TAR_CHECK([ exec <&- @@ -61,4 +61,5 @@ m4_foreach([file], [tar: 'trzy' is not continued on this volume ],[],[], [gnu]) +m4_popdef([FILELIST]) AT_CLEANUP diff --git a/tests/sparse04.at b/tests/sparse04.at index eb2867e..2cfae79 100644 --- a/tests/sparse04.at +++ b/tests/sparse04.at @@ -29,7 +29,7 @@ AT_KEYWORDS([sparse sparse04]) # References: <201011250026.44908.kdudka@redhat.com>, # http://lists.gnu.org/archive/html/bug-tar/2010-11/msg00099.html -m4_define([NAME_111], +m4_pushdef([NAME_111], [123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960]) AT_TAR_CHECK([ @@ -44,4 +44,5 @@ tar -f - -c --sparse --posix NAME_111 | tar tf - [], [pax]) +m4_popdef([NAME_111]) AT_CLEANUP