init variables, vagrant with-cligen

This commit is contained in:
Olof hagsand 2023-07-28 12:49:51 +02:00
parent f526d5b7a0
commit 05c082b202
6 changed files with 11 additions and 9 deletions

View file

@ -285,7 +285,7 @@ mtpoint_paths(yang_stmt *yspec0,
yang_stmt *ybot0 = NULL; yang_stmt *ybot0 = NULL;
cvec *nsc0 = NULL; cvec *nsc0 = NULL;
int ret; int ret;
char *api_path_fmt0; char *api_path_fmt0 = NULL;
cbuf *cb = NULL; cbuf *cb = NULL;
cxobj *xbot0 = NULL; cxobj *xbot0 = NULL;
cxobj *xtop0 = NULL; cxobj *xtop0 = NULL;
@ -1291,7 +1291,7 @@ cli_notification_cb(int s,
struct clicon_msg *reply = NULL; struct clicon_msg *reply = NULL;
int eof; int eof;
cxobj *xt = NULL; cxobj *xt = NULL;
enum format_enum format = (enum format_enum)arg; enum format_enum format = (enum format_enum)(uintptr_t)arg;
int ret; int ret;
/* get msg (this is the reason this function is called) */ /* get msg (this is the reason this function is called) */

View file

@ -168,5 +168,6 @@
* Exception of expand-grouping in clixon-autocli.yang * Exception of expand-grouping in clixon-autocli.yang
* If enabled do not expand-grouping if a yang uses is directly under augment * If enabled do not expand-grouping if a yang uses is directly under augment
* Disabled does not work today and is temporary and for documentation * Disabled does not work today and is temporary and for documentation
* it is also a "layering vilation" since the grouping/augment code is in cli-independent libs
*/ */
#define AUTOCLI_GROUPING_AUGMENT_SKIP #define AUTOCLI_GROUPING_AUGMENT_SKIP

View file

@ -522,7 +522,7 @@ yang_schema_mount_statistics(clicon_handle h,
yang_stmt *yspec; yang_stmt *yspec;
yang_stmt *ym; yang_stmt *ym;
int ret; int ret;
char *xpath; char *xpath = NULL;
uint64_t nr; uint64_t nr;
size_t sz; size_t sz;

View file

@ -7,6 +7,7 @@
# Notes: # Notes:
# 1. May tests without "new" which makes it difficult to debug # 1. May tests without "new" which makes it difficult to debug
# 2. Sleeps are difficult when running valgrind tests when startup times (eg netconf) increase # 2. Sleeps are difficult when running valgrind tests when startup times (eg netconf) increase
# Occasionally fails (non-determinisitic) when asserting running, see marked TIMEOUT? below
# Magic line must be first in script (see README.md) # Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
@ -313,9 +314,7 @@ assert_config_equals "candidate" "$CONFIGB"
# use HELLONO11 which uses older EOM framing # use HELLONO11 which uses older EOM framing
sleep 60 | cat <(echo "$HELLONO11<rpc $DEFAULTNS><commit><confirmed/><confirm-timeout>60</confirm-timeout></commit></rpc>]]>]]>") -| $clixon_netconf -qf $cfg >> /dev/null & sleep 60 | cat <(echo "$HELLONO11<rpc $DEFAULTNS><commit><confirmed/><confirm-timeout>60</confirm-timeout></commit></rpc>]]>]]>") -| $clixon_netconf -qf $cfg >> /dev/null &
PIDS=($(jobs -l % | cut -c 6- | awk '{print $1}')) PIDS=($(jobs -l % | cut -c 6- | awk '{print $1}'))
if [ $valgrindtest -eq 1 ]; then sleep 1 # TIMEOUT?
sleep 1
fi
assert_config_equals "running" "$CONFIGB" # assert config twice to prove it survives disconnect assert_config_equals "running" "$CONFIGB" # assert config twice to prove it survives disconnect
assert_config_equals "running" "$CONFIGB" # of ephemeral sessions assert_config_equals "running" "$CONFIGB" # of ephemeral sessions
@ -434,6 +433,7 @@ assert_config_equals "candidate" "$CONFIGB"
# use HELLONO11 which uses older EOM framing # use HELLONO11 which uses older EOM framing
sleep 60 | cat <(echo "$HELLONO11<rpc $DEFAULTNS><commit><confirmed/><confirm-timeout>60</confirm-timeout></commit></rpc>]]>]]><rpc $DEFAULTNS><commit></commit></rpc>]]>]]>") -| $clixon_netconf -qf $cfg >> /dev/null & sleep 60 | cat <(echo "$HELLONO11<rpc $DEFAULTNS><commit><confirmed/><confirm-timeout>60</confirm-timeout></commit></rpc>]]>]]><rpc $DEFAULTNS><commit></commit></rpc>]]>]]>") -| $clixon_netconf -qf $cfg >> /dev/null &
PIDS=($(jobs -l % | cut -c 6- | awk '{print $1}')) PIDS=($(jobs -l % | cut -c 6- | awk '{print $1}'))
sleep 1 # TIMEOUT?
assert_config_equals "running" "$CONFIGB" # assert config twice to prove it surives disconnect assert_config_equals "running" "$CONFIGB" # assert config twice to prove it surives disconnect
new "restconf POST" new "restconf POST"

View file

@ -23,9 +23,10 @@ You can also run a single vagrant test as follows:
``` ```
The current vagrant boxes are verified continuously: The current vagrant boxes are verified continuously:
* ubuntu/bionic64
# * generic/centos8
* generic/freebsd13 * generic/freebsd13
* generic/lunar64 # 23.04
* generic/ubuntu2204
* generic/bionic64 # 18.04
For other vagrant boxes, see [search vagrant boxes](https://vagrantcloud.com/search) For other vagrant boxes, see [search vagrant boxes](https://vagrantcloud.com/search)

View file

@ -63,7 +63,7 @@ cd src/clixon
git pull origin master git pull origin master
if [ $release = "freebsd" ]; then if [ $release = "freebsd" ]; then
LDFLAGS=-L/usr/local/lib ./configure --with-cligen=/usr/local --with-restconf=${with_restconf} LDFLAGS=-L/usr/local/lib ./configure --with-cligen=/ --with-restconf=${with_restconf}
else else
# Problems with su not having "sbin" in path on centos when when we run tests later # Problems with su not having "sbin" in path on centos when when we run tests later
./configure --sbindir=/usr/sbin --libdir=/usr/lib --with-restconf=${with_restconf} ./configure --sbindir=/usr/sbin --libdir=/usr/lib --with-restconf=${with_restconf}