sparse03.at 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2005, 2006, 2007 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. AT_SETUP([storing sparse files > 8G])
  17. AT_KEYWORDS([sparse sparse03])
  18. # Tar 1.15.1 incorrectly computed sparse member size if the extended
  19. # PAX header contained size keyword.
  20. # References: <[email protected]>
  21. # http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00040.html
  22. AT_TAR_CHECK([
  23. genfile --length 1000 --file begin
  24. genfile --length 1000 --file end
  25. genfile --sparse --file sparsefile --block-size 512 8G A || AT_SKIP_TEST
  26. tar -c -f archive --sparse begin sparsefile end || exit 1
  27. echo separator
  28. tar tfv archive
  29. echo separator
  30. mkdir directory
  31. tar Cxf directory archive
  32. genfile --stat=name,size sparsefile
  33. cmp sparsefile directory/sparsefile
  34. ],
  35. [0],
  36. [stdout],
  37. [],[],[],[posix])
  38. RE_CHECK([stdout],
  39. [separator
  40. -rw-r--r-- [^ ][^ ]* *1000 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] begin
  41. -rw-r--r-- [^ ][^ ]* *8589935104 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] sparsefile
  42. -rw-r--r-- [^ ][^ ]* *1000 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] end
  43. separator
  44. sparsefile 8589935104
  45. ])
  46. AT_CLEANUP