volsize.at 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2006, 2007, 2008 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 3, 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. # Description: The size field of a volume header was ignored when listing,
  17. # but taken into account when extracting. Thus it was possible to hide
  18. # some files within the archive, placing them after a volume header and
  19. # manually modifying its size field. Test tarball kindly provided by Tomas.
  20. # Reported by: Thomas <[email protected]>
  21. # References: <[email protected]>,
  22. # <[email protected]>
  23. AT_SETUP([volume header size])
  24. AT_KEYWORDS([volume volsize])
  25. AT_TAR_CHECK([
  26. AT_SORT_PREREQ
  27. AT_TARBALL_PREREQ([abc.tar],[540f196ceddcad9e7bd2f2d7533d0474])
  28. echo Short Listing
  29. tar tf $TEST_DATA_DIR/abc.tar
  30. echo Verbose Listing
  31. tar --utc -tvf $TEST_DATA_DIR/abc.tar
  32. echo Extracted directory
  33. tar xf $TEST_DATA_DIR/abc.tar
  34. find abc|sort
  35. ],
  36. [0],
  37. [Short Listing
  38. abc/not-a-file.gif
  39. abc/CCC
  40. Verbose Listing
  41. V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
  42. -rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC
  43. Extracted directory
  44. abc
  45. abc/CCC
  46. ],
  47. [tar: Record size = 5 blocks
  48. tar: Record size = 5 blocks
  49. ])
  50. AT_CLEANUP
  51. # End of volsize.at