diff --git a/apps/backend/backend_commit.c b/apps/backend/backend_commit.c index bd5aed49..51a4dbdc 100644 --- a/apps/backend/backend_commit.c +++ b/apps/backend/backend_commit.c @@ -221,8 +221,11 @@ startup_common(clicon_handle h, if (msdiff){ if ((ret = clixon_module_upgrade(h, xt, msdiff, cbret)) < 0) goto done; - if (ret == 0) + if (ret == 0){ + if (cbuf_len(cbret) == 0) + cprintf(cbret, "Module-set upgrade function returned failure but lacks reason (cbret is not set)"); goto fail; + } } /* Print upgraded db: -q backend switch for debugging/ showing upgraded config only */ if (clicon_quit_upgrade_get(h) == 1){ diff --git a/lib/src/clixon_yang_module.c b/lib/src/clixon_yang_module.c index 74af4394..8d4867b9 100644 --- a/lib/src/clixon_yang_module.c +++ b/lib/src/clixon_yang_module.c @@ -424,8 +424,10 @@ mod_ns_upgrade(clicon_handle h, /* If modified or added get to revision from system */ if (xml_flag(xmod, (XML_FLAG_CHANGE|XML_FLAG_ADD)) != 0x0){ yspec = clicon_dbspec_yang(h); - if ((ymod = yang_find_module_by_namespace(yspec, ns)) == NULL) + if ((ymod = yang_find_module_by_namespace(yspec, ns)) == NULL){ + cprintf(cbret, "Module-set upgrade header contains namespace %s, but is not found in running system", ns); goto fail; + } if ((yrev = yang_find(ymod, Y_REVISION, NULL)) == NULL){ retval = 1; goto done; diff --git a/test/lib.sh b/test/lib.sh index bc4b03ed..634216a7 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -427,7 +427,8 @@ function err(){ ret=$2 echo -e "\e[31m\nError in Test$testnr [$testname]:" if [ $# -gt 0 ]; then - echo "Expected: $1" + echo "Expected" + echo "$1" echo fi if [ $# -gt 1 ]; then diff --git a/test/test_http_data.sh b/test/test_http_data.sh index 6a0a7329..a0e50549 100755 --- a/test/test_http_data.sh +++ b/test/test_http_data.sh @@ -195,7 +195,6 @@ EOF if ! $enable; then # XXX or bad request? new "WWW get html, not enabled, expect not found" -# echo "curl $CURLOPTS -X GET -H 'Accept: text/html' $proto://localhost/data/index.html" expectpart "$(curl $CURLOPTS -X GET -H 'Accept: text/html' $proto://localhost/data/index.html)" 0 "HTTP/$HVER 404" else new "WWW get root expect 404 without body"