- Added an extended state plugin callback: ca_statedata2 with offset and limit parameters

- Fixed memory errors
This commit is contained in:
Olof hagsand 2021-09-02 12:35:48 +02:00
parent 28f58fb7d6
commit aaf9a89183
9 changed files with 121 additions and 114 deletions

View file

@ -21,6 +21,7 @@ fexample=$dir/example-social.yang
: ${validatexml:=false}
# Number of audit-log entries
# Note mem.sh sets it
#: ${perfnr:=20000}
: ${perfnr:=200}
@ -151,8 +152,6 @@ wait_backend
# XXX How to run without using a terminal?
new "cli show"
$clixon_cli -f $cfg -l o -1 show pagination xpath /es:members/es:member[es:member-id=\'bob\']/es:favorites/es:uint64-numbers cli
#expectpart "$(echo "show pagination xpath /es:members/es:member[es:member-id=\'bob\']/es:favorites/es:uint64-numbers cli" | $clixon_cli -f $cfg -l o)" 0 foo
#expectpart "$($clixon_cli -1 -f $cfg -l o show pagination xpath /es:members/es:member[es:member-id=\'bob\']/es:favorites/es:uint64-numbers cli)" 0 foo
if [ $BE -ne 0 ]; then
new "Kill backend"

View file

@ -280,7 +280,9 @@ function testlimit()
for li in $list; do
if [ $i = 0 ]; then
if [ $limit == 0 ]; then
# Note: if REMAINING is enabled:
# if [ $limit == 0 ]; then
if true; then
el="<uint8-numbers>$li</uint8-numbers>"
el2="<uint8-numbers xmlns=\"http://example.com/ns/example-social\">$li</uint8-numbers>"
else

View file

@ -7,6 +7,9 @@
# Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
echo "...skipped: Must run interactvely"
if [ "$s" = $0 ]; then exit 0; else return 0; fi
APPNAME=example
cfg=$dir/conf.xml
@ -127,8 +130,9 @@ fi
new "wait backend"
wait_backend
# XXX How to run without using a terminal?
new "cli show"
expectpart "$($clixon_cli -1 -f $cfg -l o show pagination xpath /es:audit-logs/es:audit-log cli)" 255 "Get configuration: protocol operation-not-supported List pagination for state lists is not yet implemented"
$clixon_cli -1 -f $cfg -l o show pagination xpath /es:audit-logs/es:audit-log cli
if [ $BE -ne 0 ]; then
new "Kill backend"