* Fixed: [Double free when using libxml2 as regex engine #117](https://github.com/clicon/clixon/issues/117)
* added libxml2 support in test_pattern.sh when libxml2 is configured
This commit is contained in:
parent
eda4a58ebf
commit
99b01040a7
7 changed files with 29 additions and 10 deletions
|
|
@ -7,7 +7,6 @@
|
|||
# Test strings have been generated by:
|
||||
# https://www.browserling.com/tools/text-from-regex
|
||||
# This is an unit test, not a clixon system test
|
||||
# See test_regexp.sh for unit regexp tests
|
||||
#
|
||||
# NOTE: no tests for ' quote in strings
|
||||
# NOTE, the following does not match in libxml2 (but in clixon):
|
||||
|
|
@ -22,9 +21,15 @@ APPNAME=example
|
|||
cfg=$dir/pattern.xml
|
||||
fyang=$dir/pattern.yang
|
||||
|
||||
# Regexp mode: posix or libxml2
|
||||
: ${regex:=posix}
|
||||
|
||||
regexlist="posix"
|
||||
if [ "${WITH_LIBXML2}" = yes ] ; then
|
||||
regexlist="$regexlist libxml2"
|
||||
fi
|
||||
# Loop over supported regexps. Always run posix, run libxml2 if configured
|
||||
for regex in $regexlist; do
|
||||
new "pattern tests for regex:$regex"
|
||||
|
||||
cat <<EOF > $cfg
|
||||
<clixon-config xmlns="http://clicon.org/config">
|
||||
<CLICON_CONFIGFILE>$cfg</CLICON_CONFIGFILE>
|
||||
|
|
@ -720,7 +725,6 @@ testrun "p$pnr" 0 '<![CDATA01234567890]]>'
|
|||
#testrun "p$pnr" 0 '<![CDATA[0123456789]]' # XML parse error
|
||||
|
||||
# CLI tests
|
||||
|
||||
new "CLI tests for RFC7950 Sec 9.4.7 ex 2 AB"
|
||||
expectfn "$clixon_cli -1f $cfg -l o set c rfc2 AB" 0 '^$'
|
||||
|
||||
|
|
@ -797,6 +801,8 @@ if [ $BE -ne 0 ]; then
|
|||
sudo pkill -u root -f clixon_backend
|
||||
fi
|
||||
|
||||
done # regex
|
||||
|
||||
rm -rf $dir
|
||||
|
||||
# unset conditional parameters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue