4
0

multiv04.at 2.1 KB

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