multiv03.at 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2004 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., 59 Temple Place - Suite 330, Boston, MA
  15. # 02111-1307, 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([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
  29. tar: Error is not recoverable: exiting now
  30. EOF
  31. cat > ../expout <<EOF
  32. $AFILE
  33. separator
  34. EOF
  35. genfile --length 15360 > $AFILE
  36. tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
  37. tar -tM -f arch.1 -f arch.2 || exit 1
  38. echo separator
  39. genfile --length 15360 > $BFILE
  40. tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE
  41. ],
  42. [2],
  43. [expout],
  44. [experr],
  45. [],[],[gnu, oldgnu])
  46. AT_CLEANUP