sparsemvp.at 1.9 KB

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