comperr.at 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2015-2023 Free Software Foundation, Inc.
  4. #
  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. #
  10. # GNU tar is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. AT_SETUP([compressor program failure])
  18. AT_KEYWORDS([compress comperr])
  19. # Description: If the --use-compress-program fails, then it is unsafe
  20. # to assume that the created archive is OK. Tar should fail with a
  21. # prominent error message.
  22. # Reported by: Ole Tange <[email protected]>
  23. # References: <CA+4vN7wLZ-+LK1t7WMkM_b9f3mV9JTnSuPamPn2ciX5PTN=9Xw@mail.gmail.com>,
  24. # http://lists.gnu.org/archive/html/bug-tar/2015-03/msg00002.html
  25. AT_TAR_CHECK([
  26. tar --use-compress-program false -cf a.tar . 2>err
  27. rc=$?
  28. sed -n '$p' err
  29. exit $rc
  30. ],
  31. [2],
  32. [tar: Error is not recoverable: exiting now
  33. ])
  34. AT_CLEANUP