20 Commits
Author SHA1 Message Date
Jim Meyering 13604c8f68 tests: tolerate SELinux setfscreatecon warning on Android/Termux
* init.cfg (remove_selinux_warning_): New function.
* testsuite/in-place-hyphen.sh: Use it before comparing stderr.
* testsuite/in-place-suffix-backup.sh: Likewise.
* testsuite/panic-tests.sh: Likewise.
* testsuite/temp-file-cleanup.sh: Likewise.
Reported by Bruno Haible in
https://lists.gnu.org/r/sed-devel/2026-04/msg00019.html
2026-04-21 08:11:48 -07:00
Jim Meyering 3b6c162a91 tests: ensure valgrind accepts --errors-for-leak-kinds=definite
* init.cfg (require_valgrind_): Test with --errors-for-leak-kinds=definite
2026-03-21 18:58:36 -07:00
Jim Meyering 03ec9a1080 maint: update copyright dates 2026-01-02 17:33:20 -08:00
Jim Meyering d3456f4482 maint: update all copyright dates via "make update-copyright" 2025-01-03 09:56:57 -08:00
Jim Meyering 2037812a6d maint: update copyright dates 2024-01-05 08:44:01 -08:00
Jim Meyering d81710cc8d maint: update copyright dates 2023-01-01 17:19:34 -08:00
Jim Meyering 0c8d88bc61 maint: make update-copyright 2022-01-01 15:00:18 -08:00
Assaf Gordon 71de42fd34 maint: update all copyright year number ranges
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* bootstrap.conf (gnulib_modules): Remove getopt module, depracated in
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0abc38bd2a1398f0
* po/POTFILES.in: Remove getopt.c
* sed/utils.h (panic): Rename _GL_ATTRIBUTE_FORMAT_PRINTF to
_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD following gnulib's change:
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=387d654cabd7bc15
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
2021-01-05 17:02:10 -07:00
Jim Meyering 623f5cd2f9 maint: update all copyright year number ranges
Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
2020-01-01 11:38:46 -08:00
Assaf Gordon 07df2c2e61 maint: update copyright dates for 2019
* all files: Run "make update-copyright".
2019-01-01 14:46:27 -07:00
Assaf Gordon 5433dc245b sed: reject RE searches on buffers larger than INT_MAX
Sed uses 'size_t' internally, but gnulib's re_search uses 'signed int'.
If the buffer is larger than INT_MAX, reject it (panic, exit code 4).

The test is marked 'very expensive' and skipped by default (due to
creating a 2GB input file). To run it, use:

   make check SUBDIRS=. RUN_VERY_EXPENSIVE_TESTS=yes \
              TESTS=testsuite/regex-max-int.sh

Reported by YushiOMOTE in https://bugs.gnu.org/30520 .

* NEWS: Mention this.
* Makefile.am (check-expensive, check-very-expensive): New targets.
* init.cfg (expensive_, very_expensive_): Copied from coreutils.
* sed/regexp.c (match_regex): Check buffer length and panic if too large.
* testsuite/regex-max-int.sh: New test.
* testsuite/local.mk (T): Add new test.
2018-03-23 08:58:01 -06:00
Assaf Gordon a2daab7fb1 maint: change http to https in license headers
* all files: Change http to https for all licenses URL.
2018-02-13 16:02:12 -07:00
Jakub Martisko 057ab92dfe sed: with --in-place and selinux, use the symlink's context
When editing a file in place, the SELinux context (if exists)
should be based on the link instead of the target file itself.
--follow-symlinks option remains unchanged.

Bug reported by Jakub Jelen, fix proposed by Petr Lautrbach,
discussed in https://lists.gnu.org/r/sed-devel/2017-12/msg00000.html

* NEWS: Mention this.
* sed/execute.c (open_next_file): Use lgetfilecon (instead of getfilecon)
to get the context of the symlink instead of the target file.
* testsuite/inplace-selinux.sh: Test the above change.
* testsuite/local.mk (T): Add new test file.
* init.cfg (require_selinux_): Copied from coreutils, skip the test if
selinux is not available.
2018-01-09 15:44:51 -07:00
Assaf Gordon 4d4c0d5ad0 maint: update gnulib and copyright dates for 2018
* gnulib: Update to latest.
* all files: Run "make update-copyright".
2018-01-02 13:56:16 -07:00
Assaf Gordon 315c804175 tests: skip utf8-ru test if required locale is not found
Reported by Dennis Clarke in https://bugs.gnu.org/28665#14 .

* init.cfg (require_ru_utf8_locale_): New function.
* testsuite/utf8-ru.sh: Skip test is required locale was not found.
2017-10-05 23:38:30 -06:00
Assaf Gordon 96b8cec2aa tests: new function remove_cr_inplace in init.cfg
When testing on Windows OSes, remove any CR (\r) characters
from output files (before comparing them to expected output).

This functionality was used by the old-style tests, embedded
directly in 'Makefile.tests'.

* init.cfg: (remove_cr_inplace): New function.
2017-05-10 21:37:28 -04:00
Jim Meyering 1d7ee2d553 tests: skip valgrind-running tests when ASAN-enabled
* init.cfg (require_valgrind_): Skip when we detect that the
binary is ASAN-enabled.
2017-01-14 15:34:08 -08:00
Jim Meyering 1ceaa652a5 maint: update gnulib and copyright dates for 2017
* gnulib: Update to latest.
* all files: Run "make update-copyright".
2017-01-01 03:17:39 -08:00
Norihiro Tanaka 188207529c sed: fix incorrect match for title case
* sed/regexp.c (compile_regex_1): Avoid building fastmap for case-
insensitive matching.
* testsuite/title-case.sh: New file, to test for this fix.
* testsuite/local.mk (T): Add the new file name and sort alphabetically.
* init.cfg (require_el_iso88597_locale_): Define.
2016-09-25 16:34:03 -07:00
Assaf Gordon 3b29bece3e build: switch to non-recursive makefile
* .gitignore: Ignore '.dirstamp' files
* bootstrap.conf: Add 'non-recursive-gnulib-prefix-hack' gnulib module.
  Add missing 'stdalign' module.
  (bootstrap_post_import_hook): Use module to adjust gnulib.mk file.
* configure.ac: Add 'subdir-objects' automake option, don't generate
  makefiles in subdirectories. Adjust path of XFAIL tests.
* Makefile.am: Include 'local.mk' files, adjust for non-recursive make.
* doc/Makefile.am: Rename to ...
* doc/local.mk: Adjust paths. Rename SED to
  SEDBIN variable, to avoid overriding the default system-wide SED value
  which is automatically set by autotools.
* lib/Makefile.am: Rename to ...
* lib/local.mk: Adjust paths.
* lib/.gitignore: Ignore 'stdalign.h' from gnulib module.
* sed/Makefile.am: Rename to ...
* sed/local.mk: Adjust paths.
* testsuite/Makefile.am: Rename to ...
* testsuite/local.mk: Adjust paths.
* testsuite/init.cfg: Move to ...
* init.cfg: ... here. Moved to avoid changing the path in init.sh, and to
  keep the same directory structure as coreutils.
  (require_en_utf8_locale_): Adjust path for get-mb-cur-max executable.
  (require_ja_shiftjis_locale_,require_valid_ja_shiftjis_locale_): Adjust
  path for test-mbrtowc executable.
* m4/.gitignore: Add gnulib's non-recusive-make module.
* testsuite/runtest: Adjust paths of Makefile.tests and dir variables,
  Skip utility program 'get-mb-cur-max' which is not a standalone test.
* testsuite/Makefile.tests: Adjust path of sed exeutable.
* testsuite/eval.sed, testsuite/eval.good: Adjust path of sed executable.
* testsuite/cmd-R.sh,
  testsuite/cmd-l.sh,
  testsuite/colon-with-no-label.sh,
  testsuite/comment-n.sh,
  testsuite/compile-errors.sh,
  testsuite/compile-tests.sh,
  testsuite/convert-number.sh,
  testsuite/execute-tests.sh,
  testsuite/follow-symlinks-stdin.sh,
  testsuite/follow-symlinks.sh,
  testsuite/help-version.sh,
  testsuite/in-place-hyphen.sh,
  testsuite/in-place-suffix-backup.sh,
  testsuite/invalid-mb-seq-UMR.sh,
  testsuite/mb-bad-delim.sh,
  testsuite/mb-charclass-non-utf8.sh,
  testsuite/mb-match-slash.sh,
  testsuite/mb-y-translate.sh,
  testsuite/normalize-text.sh,
  testsuite/nulldata.sh,
  testsuite/panic-tests.sh,
  testsuite/posix-char-class.sh,
  testsuite/posix-mode-N.sh,
  testsuite/posix-mode-addr.sh,
  testsuite/posix-mode-bad-ref.sh,
  testsuite/posix-mode-s.sh,
  testsuite/range-overlap.sh,
  testsuite/recursive-escape-c.sh,
  testsuite/regex-errors.sh,
  testsuite/stdin-prog.sh,
  testsuite/subst-mb-incomplete.sh,
  testsuite/subst-options.sh,
  testsuite/subst-replacement.sh,
  testsuite/temp-file-cleanup.sh,
  testsuite/unbuffered.sh: Adjust paths of init.sh, sed executable.
2016-07-24 22:22:53 -04:00