volsize.at 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2006-2023 Free Software Foundation, Inc.
  4. # This file is part of GNU tar.
  5. # GNU tar is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License, or
  8. # (at your option) any later version.
  9. # GNU tar is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. # Description: The size field of a volume header was ignored when listing,
  16. # but taken into account when extracting. Thus it was possible to hide
  17. # some files within the archive, placing them after a volume header and
  18. # manually modifying its size field. Test tarball kindly provided by Tomas.
  19. # Reported by: Thomas <[email protected]>
  20. # References: <[email protected]>,
  21. # <[email protected]>
  22. AT_SETUP([volume header size])
  23. AT_KEYWORDS([volume volsize])
  24. AT_TAR_CHECK([
  25. AT_SORT_PREREQ
  26. AT_TARBALL_PREREQ([abc.tar],[540f196ceddcad9e7bd2f2d7533d0474])
  27. echo Short Listing
  28. tar tf $TEST_DATA_DIR/abc.tar
  29. echo Verbose Listing
  30. tar --utc -tvf $TEST_DATA_DIR/abc.tar
  31. echo Extracted directory
  32. tar xf $TEST_DATA_DIR/abc.tar
  33. find abc|sort
  34. ],
  35. [0],
  36. [Short Listing
  37. abc/not-a-file.gif
  38. abc/CCC
  39. Verbose Listing
  40. V--------- 0/0 1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Header--
  41. -rw-r--r-- tom/users 0 2006-04-22 19:52 abc/CCC
  42. Extracted directory
  43. abc
  44. abc/CCC
  45. ],
  46. [])
  47. AT_CLEANUP
  48. # End of volsize.at