multiv05.at 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2006-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. # Up to version 1.15.91 tar was unable to recognize all volumes
  16. # given after an out-of-sync volume.
  17. # Reported by: Joerg Weilbier <[email protected]>
  18. # References: <[email protected]>
  19. AT_SETUP([Restoring after an out of sync volume])
  20. AT_KEYWORDS([multivolume multiv multiv05 sync])
  21. m4_pushdef([FILELIST],[jeden,dwa,trzy,cztery,piec,szesc])
  22. AT_TAR_CHECK([
  23. exec <&-
  24. m4_foreach([f],
  25. [FILELIST],
  26. [genfile --length 250k --file f
  27. ])
  28. echo Creating archive
  29. tar -c -M -L 502 -f a.tar -f b.tar -f c.tar m4_foreach([f],[FILELIST],f )
  30. echo separator
  31. mkdir bak
  32. mv m4_foreach([f],[FILELIST],f )bak
  33. tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar
  34. m4_foreach([f],
  35. [FILELIST],
  36. [echo Diffing f
  37. cmp bak/f f || exit 1
  38. ])],
  39. [0],
  40. [Creating archive
  41. separator]
  42. m4_foreach([file],
  43. [FILELIST],
  44. [file
  45. ])dnl
  46. m4_foreach([file],
  47. [FILELIST],
  48. [Diffing file
  49. ])dnl
  50. ,
  51. [tar: 'trzy' is not continued on this volume
  52. ],[],[], [gnu])
  53. m4_popdef([FILELIST])
  54. AT_CLEANUP