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.
This commit is contained in:
Sergey Poznyakoff
2013-10-05 09:10:35 +03:00
parent 3125d311e1
commit 576e1fcd6a
12 changed files with 35 additions and 17 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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