multiv04.at 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2005-2007, 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. # Problem: Tar was not able to match directory name if the directory
  17. # member was split between two volumes
  18. # References: Jörg Schilling pretends to have reported this two
  19. # years ago (<42551FF2.nail98011FRAT@burner>).
  20. # Test idea:
  21. # 1. Create a listed-incremental archive of a directory containing
  22. # a cetrain number of zero-length files.
  23. # 2. Using the same snapshot file, create a *multivolume* listed-incremental
  24. # archive. Number of files created in the directory and volume size should
  25. # be selected so that the first volume ends in the midst of the directory
  26. # member. The files are zero-length so that their member records are
  27. # sufficiently small, in order for the entire archive to fit in two volumes.
  28. # 3. Test the created multi-volume archive.
  29. AT_SETUP([split directory members in a MV archive])
  30. AT_KEYWORDS([multivolume multiv incremental listed multiv04])
  31. AT_TAR_CHECK([
  32. mkdir directory
  33. awk 'BEGIN { for (i = 0; i < 1024; i++) printf("directory/%014x\n", i); }' </dev/null | genfile --files-from -
  34. exec <&-
  35. sleep 2
  36. tar --listed-incremental=list -c -f archive.a directory
  37. sleep 2
  38. tar --listed-incremental=list -c --record-size 1024 -L 16 -f arc.1 -f arc.2 -v directory
  39. echo separator
  40. tar -MRt -f arc.1 -f arc.2],
  41. [0],
  42. [directory/
  43. separator
  44. block 0: directory/
  45. block 35: ** Block of NULs **
  46. ],
  47. [],
  48. [],[],[gnu, oldgnu])
  49. AT_CLEANUP