sparsemvp.at 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2005-2009, 2013-2014 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. # Check if sparse files are correctly split between PAX multi-volume
  16. # archives.
  17. # See comment in sparsemv.at for the description.
  18. dnl TAR_MVP_TEST version map1 map2
  19. m4_define([TAR_MVP_TEST],[
  20. AT_TAR_CHECK([
  21. exec <&-
  22. genfile --sparse --file sparsefile $2 || AT_SKIP_TEST
  23. echo "Pass 1: Split between data blocks"
  24. echo "Create archive"
  25. tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
  26. echo "Test archive"
  27. tar -t -M -f arc.1 -f arc.2 -f arc.3
  28. echo "Compare archive"
  29. tar -d -M -f arc.1 -f arc.2 -f arc.3
  30. echo "Pass 2: Split within a data block"
  31. genfile --sparse --file sparsefile $3 || AT_SKIP_TEST
  32. echo "Create archive"
  33. tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
  34. echo "Test archive"
  35. tar -t -M -f arc.1 -f arc.2 -f arc.3
  36. echo "Compare archive"
  37. tar -d -M -f arc.1 -f arc.2 -f arc.3
  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])])