multiv03.at 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2004,2005 Free Software Foundation, Inc.
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program; if not, write to the Free Software
  14. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. # 02110-1301, USA.
  16. # Problem: GNU multivolume archives are not able to continue on members
  17. # with filenames longer than 100 characters. Versions of tar <= 1.14
  18. # were not checking filename lengths and produced malformed multivolume
  19. # headers.
  20. # References: <[email protected]>
  21. # http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00012.html
  22. AT_SETUP([MV archive & long filenames])
  23. AT_KEYWORDS([multivolume multiv multiv03])
  24. AT_TAR_CHECK([
  25. AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
  26. BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
  27. cat > ../experr <<EOF
  28. tar: $BFILE: file name too long to be stored in a GNU multivolume header, truncated
  29. EOF
  30. cat > ../expout <<EOF
  31. $AFILE
  32. separator
  33. EOF
  34. genfile --length 15360 > $AFILE
  35. tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
  36. tar -tM -f arch.1 -f arch.2 || exit 1
  37. echo separator
  38. genfile --length 15360 > $BFILE
  39. tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE
  40. ],
  41. [0],
  42. [expout],
  43. [experr],
  44. [],[],[gnu, oldgnu])
  45. AT_CLEANUP