aboutsummaryrefslogtreecommitdiff
path: root/contrib/netbsd-tests/lib/libc/regex
Commit message (Collapse)AuthorAgeFilesLines
* libc: regex: partial revert of r368358Kyle Evans2020-12-053-2/+6
| | | | | | | | | | | | | | Part of the libregex functionality leaked into the tests it shares with the standard regex(3). Introduce a P flag to set the REG_POSIX cflag to indicate that libc regex should effectively do nothing while libregex should specifically run it in non-extended mode. This unbreaks the libc/regex test run. Reported by: Jenkins Notes: svn path=/head/; revision=368371
* libregex: implement \b and \B (word boundary, not word boundary)Kyle Evans2020-12-051-1/+1
| | | | | | | | | | This is the last of the needed GNU expressions before we can unleash bsdgrep by default. \b is effectively an agnostic equivalent of \< and \>, while \B will match every space that isn't making a transition from nonchar -> char or char -> nonchar. Notes: svn path=/head/; revision=368358
* regex(3): Interpret many escaped ordinary characters as EESCAPEKyle Evans2020-07-292-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In IEEE 1003.1-2008 [1] and earlier revisions, BRE/ERE grammar allows for any character to be escaped, but "ORD_CHAR preceded by an unescaped <backslash> character [gives undefined results]". Historically, we've interpreted an escaped ordinary character as the ordinary character itself. This becomes problematic when some extensions give special meanings to an otherwise ordinary character (e.g. GNU's \b, \s, \w), meaning we may have two different valid interpretations of the same sequence. To make this easier to deal with and given that the standard calls this undefined, we should throw an error (EESCAPE) if we run into this scenario to ease transition into a state where some escaped ordinaries are blessed with a special meaning -- it will either error out or have extended behavior, rather than have two entirely different versions of undefined behavior that leave the consumer of regex(3) guessing as to what behavior will be used or leaving them with false impressions. This change bumps the symbol version of regcomp to FBSD_1.6 and provides the old escape semantics for legacy applications, just in case one has an older application that would immediately turn into a pumpkin because of an extraneous escape that's embedded or otherwise critical to its operation. This is the final piece needed before enhancing libregex with GNU extensions and flipping the switch on bsdgrep. [1] http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/ PR: 229925 (exp-run, courtesy of antoine) Differential Revision: https://reviews.freebsd.org/D10510 Notes: svn path=/head/; revision=363679
* Only skip problematic test in CI env.Li-Wen Hsu2019-09-111-1/+2
| | | | | | | | PR: 237450 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=352227
* Temporarily skip lib.libc.regex.exhaust_test.regcomp_too_big andLi-Wen Hsu2019-07-221-0/+4
| | | | | | | | | | lib.libregex.exhaust_test.regcomp_too_big on i386 as they are flakey on it PR: 237450 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=350219
* MFV r345515: netbsd-tests: import memory bump for libc/regex/t_exhaustKyle Evans2019-03-261-5/+6
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=345516
* regex(3): Handle invalid {} constructs consistently and adjust testsKyle Evans2017-08-082-6/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, regex(3) exhibits the following wrong behavior as demonstrated with sed: - echo "a{1,2,3}b" | sed -r "s/{/_/" (1) - echo "a{1,2,3}b" | sed "s/\}/_/" (2) - echo "a{1,2,3}b" | sed -r "s/{}/_/" (3) Cases (1) and (3) should throw errors but they actually succeed, and (2) throws an error when it should match the literal '}'. The correct behavior was decided by comparing to the behavior with the equivalent BRE (1)(3) or ERE (2) and consulting POSIX, along with some reasonable evaluation. Tests were also adjusted/added accordingly. PR: 166861 Reviewed by: emaste, ngie, pfg Approved by: emaste (mentor) MFC after: never Differential Revision: https://reviews.freebsd.org/D10315 Notes: svn path=/head/; revision=322211
* Add regression test for recent regex(3) breakageKyle Evans2017-07-211-0/+3
| | | | | | | | | | | | | BREs recently became prematurely sensitive to the branching operator, which outright broke expressions that used it instead of failing silently. Test that \| is matching a literal | for the time being. Reviewed by: cem, emaste, ngie Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D11577 Notes: svn path=/head/; revision=321315
* Pull in ^/vendor/NetBSD/tests/dist@r312219Enji Cooper2017-01-151-12/+7
| | | | | | | Remove divergence with upstream where possible Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312221
* Merge content currently under test from ^/vendor/NetBSD/tests/dist/@r312123Enji Cooper2017-01-143-28/+11
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312126
* Consolidate __NetBSD__ #ifdefEnji Cooper2017-01-111-2/+0
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=311926
* Redo r290847: use #ifdef __NetBSD__ on all the non-public APIs toEnji Cooper2015-11-151-12/+10
| | | | | | | | | | | | | mute -Wunused-but-set-variable warnings with gcc dealing with the function calls X-MFC with: r290847 MFC after: 1 week Reported by: gcc Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290869
* Fix -Wunused warnings with variables used unlit code by adding appropriate ↵Enji Cooper2015-11-151-0/+4
| | | | | | | | | | | | #ifdef guards around the variables MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290847
* Reenable the test.Baptiste Daroussin2015-08-111-1/+1
| | | | | | | Sorry I was testing on the wrong branch. Notes: svn path=/head/; revision=286638
* Disable broken test until we have time ti actually fix the testBaptiste Daroussin2015-08-111-1/+1
| | | | Notes: svn path=/head/; revision=286620
* Mechanically replace #if defined(__FreeBSD__) and #if defined(__NetBSD__) withEnji Cooper2014-11-173-11/+11
| | | | | | | | | | | | their #ifdef equivalents for everything changed in contrib/netbsd-tests. There are some items from the vendor tree that use #if defined(__FreeBSD__) or #if defined(__NetBSD__) which are being left alone Requested by: bde, rpaulo Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=274626
* - Add libutil #include for fparselnEnji Cooper2014-10-121-0/+10
| | | | | | | | | | | | | - Change ATF_REQUIRE_EQ_MSG to ATF_CHECK_EQ_MSG to gather all failing results possible (currently 12 with leftassoc) - Mark leftassoc "atf_tc_expect_fail" on FreeBSD (PR coming soon after further analysis is done on the code) In collaboration with: pho Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=273012
* Fix compilation errors with missing wide-type headers and fix compilationEnji Cooper2014-10-121-0/+12
| | | | | | | | | | warnings with -Wformat In collaboration with: pho Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=273011
* Implement 64MB memory limit for test to ensure that it fails reliably inEnji Cooper2014-10-121-0/+14
| | | | | | | | | | | | | | | | 600 seconds; it would previously fail inconsistently when run in some virtual machine configurations This patch might need to be reverted or revisited later (see the attached PR for more details) PR: 169302 Submitted by: pho Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=273010
* Import the NetBSD test suite from ^/vendor/NetBSD/tests/09.30.2014_20.45 ,Enji Cooper2014-10-0235-0/+3106
minus the vendor Makefiles Provide directions for how to bootstrap the vendor sources in FREEBSD-upgrade MFC after 2 weeks Discussed with: rpaulo Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272458