long01.at 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2005-2007, 2013-2014, 2016-2017 Free Software Foundation,
  4. # Inc.
  5. # This file is part of GNU tar.
  6. # GNU tar is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License, or
  9. # (at your option) any later version.
  10. # GNU tar is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # In GNU format, when extracting or listing a file member with a name
  17. # whose length is divisible by block size (512) tar used to read an
  18. # extra block of data. In consequence the following file was not extracted.
  19. # Reported by Josef Bauer
  20. # References: <200501122145.j0CLjGhl006070@uhu.mchp.siemens.de>
  21. # http://lists.gnu.org/archive/html/bug-tar/2005-01/msg00038.html
  22. AT_SETUP([long file names divisible by block size])
  23. AT_KEYWORDS([longname long512])
  24. dnl Create a directory structure with maximum directory name length 512-16
  25. m4_pushdef([NAME],[0123456789abcde])
  26. m4_pushdef([FULLNAME],NAME)
  27. m4_for([N],0,29,,[m4_define([FULLNAME],FULLNAME/NAME)])
  28. AT_TAR_CHECK([
  29. AT_TAR_MKHIER(FULLNAME,NAME)
  30. echo test > endfile
  31. tar cf archive FULLNAME/NAME endfile
  32. tar tf archive],
  33. [0],
  34. [FULLNAME/NAME
  35. endfile
  36. ],
  37. [],[],[],[gnu,oldgnu])
  38. m4_popdef([NAME])
  39. m4_popdef([FULLNAME])
  40. AT_CLEANUP