extrac26.at 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Test suite for GNU tar. -*- autotest -*-
  2. # Copyright 2022-2023 Free Software Foundation, Inc.
  3. #
  4. # This file is part of GNU tar.
  5. #
  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. #
  11. # GNU tar is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. AT_SETUP([extract a large directory tree with --delay-directory-restore])
  19. AT_KEYWORDS([extract extrac26])
  20. AT_TAR_CHECK([
  21. AT_SKIP_LARGE_FILES
  22. AT_TIMEOUT_PREREQ
  23. echo Creating dirtree
  24. awk 'BEGIN { for (j = 0; j < 300; j++) for (k = 0; k < 300; k++) print "dirtree/" j "/" k }' | \
  25. xargs mkdir -p
  26. echo Creating archive
  27. tar -cf archive.tar dirtree
  28. echo Extracting archive
  29. mkdir output
  30. timeout 60 tar -xf archive.tar --delay-directory-restore -C output
  31. ],
  32. [0],
  33. [Creating dirtree
  34. Creating archive
  35. Extracting archive
  36. ],
  37. [],[],[],[gnu])
  38. AT_CLEANUP