sparsemvp.at 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 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. AT_SETUP([Sparse files in PAX MV archives])
  17. AT_KEYWORDS([sparse multiv sparsemvp])
  18. # Check if sparse files are correctly split between PAX multi-volume
  19. # archives.
  20. # See comment in sparsemv.at for the description.
  21. AT_TAR_CHECK([
  22. genfile --sparse --file sparsefile 0 ABCDEFGHIJK 1M ABCDEFGHI || AT_SKIP_TEST
  23. echo "Pass 1: Split between data blocks"
  24. echo "Create archive"
  25. tar --sparse -c --record-size=512 -M -L7 -f arc.1 -f arc.2 sparsefile
  26. echo "Test archive"
  27. tar -t -M -f arc.1 -f arc.2
  28. echo "Compare archive"
  29. tar -d -M -f arc.1 -f arc.2
  30. echo "Pass 2: Split within a data block"
  31. genfile --sparse --file sparsefile 0 ABCDEFGHIJKL 1M ABCDEFG || AT_SKIP_TEST
  32. echo "Create archive"
  33. tar --sparse -c --record-size=512 -M -L7 -f arc.1 -f arc.2 sparsefile
  34. echo "Test archive"
  35. tar -t -M -f arc.1 -f arc.2
  36. echo "Compare archive"
  37. tar -d -M -f arc.1 -f arc.2
  38. ],
  39. [0],
  40. [Pass 1: Split between data blocks
  41. Create archive
  42. Test archive
  43. sparsefile
  44. Compare archive
  45. Pass 2: Split within a data block
  46. Create archive
  47. Test archive
  48. sparsefile
  49. Compare archive
  50. ],
  51. [],[],[],[pax])
  52. AT_CLEANUP