mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 11:42:21 +00:00
tests/sh_match.sh: redirect ulimit to 2>/dev/null
macOS 12.2.1 doesn't seem to like the -M, -v or -d ulimit options: sh_match.sh[502]: FAIL: test_xmlfragment1/0/testfile1.xml: Expected empty stderr, got $'test1_script.sh[2]: ulimit: 1048576: limit exceeded [Invalid argument]\ntest1_script.sh[3]: ulimit: 1048576: limit exceeded [Invalid argument]\ntest1_script.sh[4]: ulimit: 1048576: limit exceeded [Invalid argument]' The 'Invalid argument' addition is caused by errno==EINVAL and suggests the OS either doesn't support setting this limit, or support for it was somehow disabled. src/cmd/ksh93/tests/sh_match.sh: - Redirect standard error for ulimit commands to 2>/dev/null. If they fail it's pretty inconsequential and it's not related to actual ${.sh.match} testing at all. Resolves: https://github.com/ksh93/ksh/issues/459 Thanks to @posguy99 for the report.
This commit is contained in:
parent
4ca578bde4
commit
fc5bd8e8c3
1 changed files with 6 additions and 4 deletions
|
@ -130,9 +130,11 @@ function test_xmlfragment1
|
|||
typeset -r testscript='test1_script.sh'
|
||||
cat >"${testscript}" <<-TEST1SCRIPT
|
||||
# memory safeguards to prevent out-of-control memory consumption
|
||||
ulimit -M \$(( 1024 * 1024 ))
|
||||
ulimit -v \$(( 1024 * 1024 ))
|
||||
ulimit -d \$(( 1024 * 1024 ))
|
||||
{
|
||||
ulimit -M \$(( 1024 * 1024 ))
|
||||
ulimit -v \$(( 1024 * 1024 ))
|
||||
ulimit -d \$(( 1024 * 1024 ))
|
||||
} 2>/dev/null
|
||||
|
||||
# input text
|
||||
xmltext="\$( < "\$1" )"
|
||||
|
@ -149,7 +151,7 @@ cat >"${testscript}" <<-TEST1SCRIPT
|
|||
nameref ar="\$1"
|
||||
|
||||
# fixme:
|
||||
# - We want to enforce standard conformance - does ~(Exp) or ~(Ex-p) does that ?
|
||||
# - We want to enforce standard conformance - does ~(Exp) or ~(Ex-p) do that ?
|
||||
dummy="\${xmltext//~(Ex-p)(?:
|
||||
(<!--.*-->)+?| # xml comments
|
||||
(<[:_[:alnum:]-]+
|
||||
|
|
Loading…
Reference in a new issue