multiv05.at 1.8 KB

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