4
0

sparsemvp.at 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2005, 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. # 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. genfile --sparse --file sparsefile $2 || AT_SKIP_TEST
  24. echo "Pass 1: Split between data blocks"
  25. echo "Create archive"
  26. tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
  27. echo "Test archive"
  28. tar -t -M -f arc.1 -f arc.2 -f arc.3
  29. echo "Compare archive"
  30. tar -d -M -f arc.1 -f arc.2 -f arc.3
  31. echo "Pass 2: Split within a data block"
  32. genfile --sparse --file sparsefile $3 || AT_SKIP_TEST
  33. echo "Create archive"
  34. tar --sparse --sparse-version=$1 -c --record-size=512 -M -L6 -f arc.1 -f arc.2 -f arc.3 sparsefile
  35. echo "Test archive"
  36. tar -t -M -f arc.1 -f arc.2 -f arc.3
  37. echo "Compare archive"
  38. tar -d -M -f arc.1 -f arc.2 -f arc.3
  39. ],
  40. [0],
  41. [Pass 1: Split between data blocks
  42. Create archive
  43. Test archive
  44. sparsefile
  45. Compare archive
  46. Pass 2: Split within a data block
  47. Create archive
  48. Test archive
  49. sparsefile
  50. Compare archive
  51. ],
  52. [tar: Record size = 12 blocks
  53. tar: Record size = 12 blocks
  54. ],[],[],[pax])])