diff --git a/tests/utests/schema/test_parser_yang.c b/tests/utests/schema/test_parser_yang.c
index c107e76..3b9c81e 100644
--- a/tests/utests/schema/test_parser_yang.c
+++ b/tests/utests/schema/test_parser_yang.c
@@ -3,7 +3,7 @@
  * @author: Radek Krejci <rkrejci@cesnet.cz>
  * @brief unit tests for functions from parser_yang.c
  *
- * Copyright (c) 2018 CESNET, z.s.p.o.
+ * Copyright (c) 2018-2020 CESNET, z.s.p.o.
  *
  * This source code is licensed under BSD 3-Clause License (the "License").
  * You may not use this file except in compliance with the License.
@@ -11,6 +11,8 @@
  *
  *     https://opensource.org/licenses/BSD-3-Clause
  */
+#define _UTEST_MAIN_
+#include "utests.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -21,7 +23,6 @@
 #include "schema_compile.h"
 #include "tree_schema.h"
 #include "tree_schema_internal.h"
-#include "utests.h"
 
 /* originally static functions from tree_schema_free.c and parser_yang.c */
 void lysp_ext_instance_free(struct ly_ctx *ctx, struct lysp_ext_instance *ext);
@@ -63,103 +64,53 @@
 LY_ERR parse_when(struct lys_yang_parser_ctx *ctx, struct ly_in *in, struct lysp_when **when_p);
 LY_ERR parse_type_enum_value_pos(struct lys_yang_parser_ctx *ctx, struct ly_in *in, enum ly_stmt val_kw, int64_t *value, uint16_t *flags, struct lysp_ext_instance **exts);
 
-#define BUFSIZE 1024
-char logbuf[BUFSIZE] = {0};
-int store = -1; /* negative for infinite logging, positive for limited logging */
-
-/* set to 0 to printing error messages to stderr instead of checking them in code */
-#define ENABLE_LOGGER_CHECKING 1
-
-#if ENABLE_LOGGER_CHECKING
-static void
-logger(LY_LOG_LEVEL level, const char *msg, const char *path)
-{
-    (void) level; /* unused */
-    if (store) {
-        if (path && path[0]) {
-            snprintf(logbuf, BUFSIZE - 1, "%s %s", msg, path);
-        } else {
-            strncpy(logbuf, msg, BUFSIZE - 1);
-        }
-        if (store > 0) {
-            --store;
-        }
-    }
-}
-
-#endif
-
-static void
-logger_setup(void)
-{
-#if ENABLE_LOGGER_CHECKING
-    ly_set_log_clb(logger, 1);
-#endif
-}
-
-void
-logbuf_clean(void)
-{
-    logbuf[0] = '\0';
-}
-
-#if ENABLE_LOGGER_CHECKING
-#   define logbuf_assert(str) assert_string_equal(logbuf, str)
-#else
-#   define logbuf_assert(str)
-#endif
+struct lys_yang_parser_ctx *YCTX;
 
 static int
-setup_f(void **state)
+setup(void **state)
 {
-    struct lys_yang_parser_ctx *pctx;
-    LY_ERR ret;
+    UTEST_SETUP;
 
-    logger_setup();
+    /* allocate parser context */
+    YCTX = calloc(1, sizeof(*YCTX));
+    YCTX->format = LYS_IN_YANG;
+    YCTX->pos_type = LY_VLOG_LINE;
+    YCTX->line = 1;
 
-    pctx = calloc(1, sizeof *pctx);
-    pctx->format = LYS_IN_YANG;
-    pctx->pos_type = LY_VLOG_LINE;
-    pctx->line = 1;
+    /* allocate new parsed module */
+    YCTX->parsed_mod = calloc(1, sizeof *YCTX->parsed_mod);
 
-    pctx->parsed_mod = calloc(1, sizeof *pctx->parsed_mod);
-    pctx->parsed_mod->mod = calloc(1, sizeof *pctx->parsed_mod->mod);
-    pctx->parsed_mod->mod->parsed = pctx->parsed_mod;
-    ret = ly_ctx_new(NULL, 0, &pctx->parsed_mod->mod->ctx);
-    if (ret) {
-        return ret;
-    }
+    /* allocate new module */
+    YCTX->parsed_mod->mod = calloc(1, sizeof *YCTX->parsed_mod->mod);
+    YCTX->parsed_mod->mod->ctx = UTEST_LYCTX;
+    YCTX->parsed_mod->mod->parsed = YCTX->parsed_mod;
 
-    *state = pctx;
     return 0;
 }
 
 static int
-teardown_f(void **state)
+teardown(void **state)
 {
-    struct lys_yang_parser_ctx *pctx = *state;
-    struct ly_ctx *ctx = pctx->parsed_mod->mod->ctx;
+    lys_module_free(YCTX->parsed_mod->mod, NULL);
+    free(YCTX);
+    YCTX = NULL;
 
-    lys_module_free(pctx->parsed_mod->mod, NULL);
-    ly_ctx_destroy(ctx, NULL);
-    free(pctx);
+    UTEST_TEARDOWN;
 
     return 0;
 }
 
 #define TEST_DUP_GENERIC(PREFIX, MEMBER, VALUE1, VALUE2, FUNC, RESULT, LINE, CLEANUP) \
     in.current = PREFIX MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, FUNC(ctx, &in, RESULT)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number "LINE"."); \
+    assert_int_equal(LY_EVALID, FUNC(YCTX, &in, RESULT)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number "LINE".");\
     CLEANUP
-
 static void
 test_helpers(void **state)
 {
     struct ly_in in = {0};
     char *buf, *p;
     size_t len, size;
-    struct lys_yang_parser_ctx *ctx = *state;
     uint8_t prefix = 0;
 
     /* storing into buffer */
@@ -177,28 +128,28 @@
     /* invalid first characters */
     len = 0;
     in.current = "2invalid";
-    assert_int_equal(LY_EVALID, buf_store_char(ctx, &in, Y_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
+    assert_int_equal(LY_EVALID, buf_store_char(YCTX, &in, Y_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
     in.current = ".invalid";
-    assert_int_equal(LY_EVALID, buf_store_char(ctx, &in, Y_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
+    assert_int_equal(LY_EVALID, buf_store_char(YCTX, &in, Y_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
     in.current = "-invalid";
-    assert_int_equal(LY_EVALID, buf_store_char(ctx, &in, Y_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
+    assert_int_equal(LY_EVALID, buf_store_char(YCTX, &in, Y_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
     /* invalid following characters */
     len = 3; /* number of characters read before the str content */
     in.current = "!";
-    assert_int_equal(LY_EVALID, buf_store_char(ctx, &in, Y_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
+    assert_int_equal(LY_EVALID, buf_store_char(YCTX, &in, Y_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
     in.current = ":";
-    assert_int_equal(LY_EVALID, buf_store_char(ctx, &in, Y_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
+    assert_int_equal(LY_EVALID, buf_store_char(YCTX, &in, Y_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
     /* valid colon for prefixed identifiers */
     len = size = 0;
     p = NULL;
     prefix = 0;
     in.current = "x:id";
-    assert_int_equal(LY_SUCCESS, buf_store_char(ctx, &in, Y_PREF_IDENTIF_ARG, &p, &len, &buf, &size, 0, &prefix));
+    assert_int_equal(LY_SUCCESS, buf_store_char(YCTX, &in, Y_PREF_IDENTIF_ARG, &p, &len, &buf, &size, 0, &prefix));
     assert_int_equal(1, len);
     assert_null(buf);
     assert_string_equal(":id", in.current);
     assert_int_equal('x', p[len - 1]);
-    assert_int_equal(LY_SUCCESS, buf_store_char(ctx, &in, Y_PREF_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
+    assert_int_equal(LY_SUCCESS, buf_store_char(YCTX, &in, Y_PREF_IDENTIF_ARG, &p, &len, &buf, &size, 1, &prefix));
     assert_int_equal(2, len);
     assert_string_equal("id", in.current);
     assert_int_equal(':', p[len - 1]);
@@ -206,208 +157,176 @@
     prefix = 0;
 
     /* checking identifiers */
-    assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)ctx, ':', 0, NULL));
-    logbuf_assert("Invalid identifier character ':' (0x003a). Line number 1.");
-    assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)ctx, '#', 1, NULL));
-    logbuf_assert("Invalid identifier first character '#' (0x0023). Line number 1.");
+    assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)YCTX, ':', 0, NULL));
+    CHECK_LOG_CTX("Invalid identifier character ':' (0x003a).", "Line number 1.");
+    assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)YCTX, '#', 1, NULL));
+    CHECK_LOG_CTX("Invalid identifier first character '#' (0x0023).", "Line number 1.");
 
-    assert_int_equal(LY_SUCCESS, lysp_check_identifierchar((struct lys_parser_ctx *)ctx, 'a', 1, &prefix));
+    assert_int_equal(LY_SUCCESS, lysp_check_identifierchar((struct lys_parser_ctx *)YCTX, 'a', 1, &prefix));
     assert_int_equal(0, prefix);
-    assert_int_equal(LY_SUCCESS, lysp_check_identifierchar((struct lys_parser_ctx *)ctx, ':', 0, &prefix));
+    assert_int_equal(LY_SUCCESS, lysp_check_identifierchar((struct lys_parser_ctx *)YCTX, ':', 0, &prefix));
     assert_int_equal(1, prefix);
-    assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)ctx, ':', 0, &prefix));
+    assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)YCTX, ':', 0, &prefix));
     assert_int_equal(1, prefix);
-    assert_int_equal(LY_SUCCESS, lysp_check_identifierchar((struct lys_parser_ctx *)ctx, 'b', 0, &prefix));
+    assert_int_equal(LY_SUCCESS, lysp_check_identifierchar((struct lys_parser_ctx *)YCTX, 'b', 0, &prefix));
     assert_int_equal(2, prefix);
     /* second colon is invalid */
-    assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)ctx, ':', 0, &prefix));
-    logbuf_assert("Invalid identifier character ':' (0x003a). Line number 1.");
+    assert_int_equal(LY_EVALID, lysp_check_identifierchar((struct lys_parser_ctx *)YCTX, ':', 0, &prefix));
+    CHECK_LOG_CTX("Invalid identifier character ':' (0x003a).", "Line number 1.");
 }
 
+#define TEST_GET_ARGUMENT_SUCCESS(INPUT_TEXT, CTX, ARG_TYPE, EXPECT_WORD, EXPECT_LEN, EXPECT_CURRENT)\
+    {\
+        const char * text  = INPUT_TEXT;\
+        in.current = text;\
+        assert_int_equal(LY_SUCCESS, get_argument(CTX, &in, Y_MAYBE_STR_ARG, NULL, &word, &buf, &len));\
+        assert_string_equal(word, EXPECT_WORD);\
+        assert_int_equal(len, EXPECT_LEN);\
+        assert_string_equal(EXPECT_CURRENT, in.current);\
+    }
+
 static void
 test_comments(void **state)
 {
     struct ly_in in = {0};
-    struct lys_yang_parser_ctx *ctx = *state;
     char *word, *buf;
     size_t len;
+    const char *in_text;
 
-    in.current = " // this is a text of / one * line */ comment\nargument;";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_string_equal("argument;", word);
+    // in.current = " // this is a text of / one * line */ comment\nargument;";
+    in_text = " // this is a text of / one * line */ comment\nargument;";
+    TEST_GET_ARGUMENT_SUCCESS(in_text, YCTX, Y_STR_ARG, "argument;", 8, ";");
     assert_null(buf);
-    assert_int_equal(8, len);
 
-    in.current = "/* this is a \n * text // of / block * comment */\"arg\" + \"ume\" \n + \n \"nt\";";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_string_equal("argument", word);
+    in_text = "/* this is a \n * text // of / block * comment */\"arg\" + \"ume\" \n + \n \"nt\";";
+    TEST_GET_ARGUMENT_SUCCESS(in_text, YCTX, Y_STR_ARG, "argument", 8, ";");
     assert_ptr_equal(buf, word);
-    assert_int_equal(8, len);
     free(word);
 
     in.current = " this is one line comment on last line";
-    assert_int_equal(LY_SUCCESS, skip_comment(ctx, &in, 1));
+    assert_int_equal(LY_SUCCESS, skip_comment(YCTX, &in, 1));
     assert_true(in.current[0] == '\0');
 
     in.current = " this is a not terminated comment x";
-    assert_int_equal(LY_EVALID, skip_comment(ctx, &in, 2));
-    logbuf_assert("Unexpected end-of-input, non-terminated comment. Line number 5.");
+    assert_int_equal(LY_EVALID, skip_comment(YCTX, &in, 2));
+    CHECK_LOG_CTX("Unexpected end-of-input, non-terminated comment.", "Line number 5.");
     assert_true(in.current[0] == '\0');
 }
 
 static void
 test_arg(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct ly_in in = {0};
     char *word, *buf;
     size_t len;
 
     /* missing argument */
     in.current = ";";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_MAYBE_STR_ARG, NULL, &word, &buf, &len));
+    assert_int_equal(LY_SUCCESS, get_argument(YCTX, &in, Y_MAYBE_STR_ARG, NULL, &word, &buf, &len));
     assert_null(word);
 
     in.current = "{";
-    assert_int_equal(LY_EVALID, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    logbuf_assert("Invalid character sequence \"{\", expected an argument. Line number 1.");
+    assert_int_equal(LY_EVALID, get_argument(YCTX, &in, Y_STR_ARG, NULL, &word, &buf, &len));
+    CHECK_LOG_CTX("Invalid character sequence \"{\", expected an argument.", "Line number 1.");
 
     /* invalid escape sequence */
     in.current = "\"\\s\"";
-    assert_int_equal(LY_EVALID, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    logbuf_assert("Double-quoted string unknown special character \'\\s\'. Line number 1.");
-    in.current = "\'\\s\'"; /* valid, since it is not an escape sequence in single quoted string */
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_int_equal(2, len);
-    assert_string_equal("\\s\'", word);
-    assert_int_equal('\0', in.current[0]); /* input has been eaten */
+    assert_int_equal(LY_EVALID, get_argument(YCTX, &in, Y_STR_ARG, NULL, &word, &buf, &len));
+    CHECK_LOG_CTX("Double-quoted string unknown special character \'\\s\'.", "Line number 1.");
+
+    TEST_GET_ARGUMENT_SUCCESS("\'\\s\'", YCTX, Y_STR_ARG, "\\s\'", 2, "");
 
     /* invalid character after the argument */
     in.current = "hello\"";
-    assert_int_equal(LY_EVALID, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    logbuf_assert("Invalid character sequence \"\"\", expected unquoted string character, optsep, semicolon or opening brace. Line number 1.");
-    in.current = "hello}";
-    assert_int_equal(LY_EVALID, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    logbuf_assert("Invalid character sequence \"}\", expected unquoted string character, optsep, semicolon or opening brace. Line number 1.");
+    assert_int_equal(LY_EVALID, get_argument(YCTX, &in, Y_STR_ARG, NULL, &word, &buf, &len));
+    CHECK_LOG_CTX("Invalid character sequence \"\"\", expected unquoted string character, optsep, semicolon or opening brace.", "Line number 1.");
 
+    in.current = "hello}";
+    assert_int_equal(LY_EVALID, get_argument(YCTX, &in, Y_STR_ARG, NULL, &word, &buf, &len));
+    CHECK_LOG_CTX("Invalid character sequence \"}\", expected unquoted string character, optsep, semicolon or opening brace.", "Line number 1.");
     /* invalid identifier-ref-arg-str */
     in.current = "pre:pre:value";
-    assert_int_equal(LY_EVALID, get_argument(ctx, &in, Y_PREF_IDENTIF_ARG, NULL, &word, &buf, &len));
+    assert_int_equal(LY_EVALID, get_argument(YCTX, &in, Y_PREF_IDENTIF_ARG, NULL, &word, &buf, &len));
+    CHECK_LOG_CTX("Invalid identifier character ':' (0x003a).", "Line number 1.");
 
     in.current = "\"\";"; /* empty identifier is not allowed */
-    assert_int_equal(LY_EVALID, get_argument(ctx, &in, Y_IDENTIF_ARG, NULL, &word, &buf, &len));
-    logbuf_assert("Statement argument is required. Line number 1.");
-    logbuf_clean();
+    assert_int_equal(LY_EVALID, get_argument(YCTX, &in, Y_IDENTIF_ARG, NULL, &word, &buf, &len));
+    CHECK_LOG_CTX("Statement argument is required.", "Line number 1.");
+
     in.current = "\"\";"; /* empty reference identifier is not allowed */
-    assert_int_equal(LY_EVALID, get_argument(ctx, &in, Y_PREF_IDENTIF_ARG, NULL, &word, &buf, &len));
-    logbuf_assert("Statement argument is required. Line number 1.");
+    assert_int_equal(LY_EVALID, get_argument(YCTX, &in, Y_PREF_IDENTIF_ARG, NULL, &word, &buf, &len));
+    CHECK_LOG_CTX("Statement argument is required.", "Line number 1.");
 
-    in.current = "hello/x\t"; /* slash is not an invalid character */
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_int_equal(7, len);
-    assert_string_equal("hello/x\t", word);
-
+    /* slash is not an invalid character */
+    TEST_GET_ARGUMENT_SUCCESS("hello/x\t", YCTX, Y_STR_ARG, "hello/x\t", 7, "\t");
     assert_null(buf);
 
     /* different quoting */
-    in.current = "hello ";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_null(buf);
-    assert_int_equal(5, len);
-    assert_string_equal("hello ", word);
+    TEST_GET_ARGUMENT_SUCCESS("hello/x\t", YCTX, Y_STR_ARG, "hello/x\t", 7, "\t");
 
-    in.current = "hello/*comment*/\n";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_null(buf);
-    assert_int_equal(5, len);
-    assert_false(strncmp("hello", word, len));
+    TEST_GET_ARGUMENT_SUCCESS("hello ", YCTX, Y_STR_ARG, "hello ", 5, " ");
 
-    in.current = "\"hello\\n\\t\\\"\\\\\";";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_non_null(buf);
-    assert_int_equal(9, len);
-    assert_string_equal("hello\n\t\"\\", word);
+    TEST_GET_ARGUMENT_SUCCESS("hello/*comment*/\n", YCTX, Y_STR_ARG, "hello/*comment*/\n", 5, "\n");
+
+    TEST_GET_ARGUMENT_SUCCESS("\"hello\\n\\t\\\"\\\\\";", YCTX, Y_STR_ARG, "hello\n\t\"\\", 9, ";");
     free(buf);
 
-    ctx->indent = 14;
-    in.current = "\"hello \t\n\t\t world!\"";
+    YCTX->indent = 14;
     /* - space and tabs before newline are stripped out
      * - space and tabs after newline (indentation) are stripped out
      */
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_non_null(buf);
-    assert_ptr_equal(word, buf);
-    assert_int_equal(14, len);
-    assert_string_equal("hello\n  world!", word);
+    TEST_GET_ARGUMENT_SUCCESS("\"hello \t\n\t\t world!\"", YCTX, Y_STR_ARG, "hello\n  world!", 14, "");
     free(buf);
-    /* In contrast to previous, the backslash-escaped tabs are expanded after trimming, so they are preserved */
-    ctx->indent = 14;
-    in.current = "\"hello \\t\n\t\\t world!\"";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_non_null(buf);
+
+/* In contrast to previous, the backslash-escaped tabs are expanded after trimming, so they are preserved */
+    YCTX->indent = 14;
+    TEST_GET_ARGUMENT_SUCCESS("\"hello \\t\n\t\\t world!\"", YCTX, Y_STR_ARG, "hello \t\n\t world!", 16, "");
     assert_ptr_equal(word, buf);
-    assert_int_equal(16, len);
-    assert_string_equal("hello \t\n\t world!", word);
     free(buf);
+
     /* Do not handle whitespaces after backslash-escaped newline as indentation */
-    ctx->indent = 14;
-    in.current = "\"hello\\n\t\t world!\"";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_non_null(buf);
+    YCTX->indent = 14;
+    TEST_GET_ARGUMENT_SUCCESS("\"hello\\n\t\t world!\"", YCTX, Y_STR_ARG, "hello\n\t\t world!", 15, "");
     assert_ptr_equal(word, buf);
-    assert_int_equal(15, len);
-    assert_string_equal("hello\n\t\t world!", word);
     free(buf);
 
-    ctx->indent = 14;
-    in.current = "\"hello\n \tworld!\"";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_non_null(buf);
+    YCTX->indent = 14;
+    TEST_GET_ARGUMENT_SUCCESS("\"hello\n \tworld!\"", YCTX, Y_STR_ARG, "hello\nworld!", 12, "");
     assert_ptr_equal(word, buf);
-    assert_int_equal(12, len);
-    assert_string_equal("hello\nworld!", word);
     free(buf);
 
-    in.current = "\'hello\'";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_null(buf);
-    assert_int_equal(5, len);
-    assert_false(strncmp("hello", word, 5));
+    TEST_GET_ARGUMENT_SUCCESS("\'hello\'", YCTX, Y_STR_ARG, "hello'", 5, "");
 
-    in.current = "\"hel\"  +\t\n\"lo\"";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
+    TEST_GET_ARGUMENT_SUCCESS("\"hel\"  +\t\n\"lo\"", YCTX, Y_STR_ARG, "hello", 5, "");
     assert_ptr_equal(word, buf);
-    assert_int_equal(5, len);
-    assert_string_equal("hello", word);
     free(buf);
+
     in.current = "\"hel\"  +\t\nlo"; /* unquoted the second part */
-    assert_int_equal(LY_EVALID, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    logbuf_assert("Both string parts divided by '+' must be quoted. Line number 6.");
+    assert_int_equal(LY_EVALID, get_argument(YCTX, &in, Y_STR_ARG, NULL, &word, &buf, &len));
+    CHECK_LOG_CTX("Both string parts divided by '+' must be quoted.", "Line number 6.");
 
-    in.current = "\'he\'\t\n+ \"llo\"";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_ptr_equal(word, buf);
-    assert_int_equal(5, len);
-    assert_string_equal("hello", word);
+    TEST_GET_ARGUMENT_SUCCESS("\'he\'\t\n+ \"llo\"", YCTX, Y_STR_ARG, "hello", 5, "");
     free(buf);
 
-    in.current = " \t\n\"he\"+\'llo\'";
-    assert_int_equal(LY_SUCCESS, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    assert_ptr_equal(word, buf);
-    assert_int_equal(5, len);
-    assert_string_equal("hello", word);
+    TEST_GET_ARGUMENT_SUCCESS(" \t\n\"he\"+\'llo\'", YCTX, Y_STR_ARG, "hello", 5, "");
     free(buf);
 
     /* missing argument */
     in.current = ";";
-    assert_int_equal(LY_EVALID, get_argument(ctx, &in, Y_STR_ARG, NULL, &word, &buf, &len));
-    logbuf_assert("Invalid character sequence \";\", expected an argument. Line number 8.");
+    assert_int_equal(LY_EVALID, get_argument(YCTX, &in, Y_STR_ARG, NULL, &word, &buf, &len));
+    CHECK_LOG_CTX("Invalid character sequence \";\", expected an argument.", "Line number 8.");
 }
 
+#define TEST_STMS_SUCCESS(INPUT_TEXT, CTX, ACTION, EXPECT_WORD)\
+                   in.current = INPUT_TEXT;\
+                   assert_int_equal(LY_SUCCESS, get_keyword(CTX, &in, &kw, &word, &len));\
+                   assert_int_equal(ACTION, kw);\
+                   assert_int_equal(strlen(EXPECT_WORD), len);\
+                   assert_true(0 == strncmp(EXPECT_WORD, word, len))
+
 static void
 test_stmts(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct ly_in in = {0};
     const char *p;
     enum ly_stmt kw;
@@ -415,418 +334,201 @@
     size_t len;
 
     in.current = "\n// comment\n\tinput\t{";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
+    assert_int_equal(LY_SUCCESS, get_keyword(YCTX, &in, &kw, &word, &len));
     assert_int_equal(LY_STMT_INPUT, kw);
     assert_int_equal(5, len);
     assert_string_equal("input\t{", word);
     assert_string_equal("\t{", in.current);
 
     in.current = "\t /* comment */\t output\n\t{";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
+    assert_int_equal(LY_SUCCESS, get_keyword(YCTX, &in, &kw, &word, &len));
     assert_int_equal(LY_STMT_OUTPUT, kw);
     assert_int_equal(6, len);
     assert_string_equal("output\n\t{", word);
     assert_string_equal("\n\t{", in.current);
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
+    assert_int_equal(LY_SUCCESS, get_keyword(YCTX, &in, &kw, &word, &len));
     assert_int_equal(LY_STMT_SYNTAX_LEFT_BRACE, kw);
     assert_int_equal(1, len);
     assert_string_equal("{", word);
     assert_string_equal("", in.current);
 
     in.current = "/input { "; /* invalid slash */
-    assert_int_equal(LY_EVALID, get_keyword(ctx, &in, &kw, &word, &len));
-    logbuf_assert("Invalid identifier first character '/'. Line number 4.");
+    assert_int_equal(LY_EVALID, get_keyword(YCTX, &in, &kw, &word, &len));
+    CHECK_LOG_CTX("Invalid identifier first character '/'.", "Line number 4.");
 
     in.current = "not-a-statement-nor-extension { "; /* invalid identifier */
-    assert_int_equal(LY_EVALID, get_keyword(ctx, &in, &kw, &word, &len));
-    logbuf_assert("Invalid character sequence \"not-a-statement-nor-extension\", expected a keyword. Line number 4.");
+    assert_int_equal(LY_EVALID, get_keyword(YCTX, &in, &kw, &word, &len));
+    CHECK_LOG_CTX("Invalid character sequence \"not-a-statement-nor-extension\", expected a keyword.", "Line number 4.");
 
     in.current = "path;"; /* missing sep after the keyword */
-    assert_int_equal(LY_EVALID, get_keyword(ctx, &in, &kw, &word, &len));
-    logbuf_assert("Invalid character sequence \"path;\", expected a keyword followed by a separator. Line number 4.");
+    assert_int_equal(LY_EVALID, get_keyword(YCTX, &in, &kw, &word, &len));
+    CHECK_LOG_CTX("Invalid character sequence \"path;\", expected a keyword followed by a separator.", "Line number 4.");
 
-    in.current = "action ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_ACTION, kw);
-    assert_int_equal(6, len);
-    in.current = "anydata ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_ANYDATA, kw);
-    assert_int_equal(7, len);
-    in.current = "anyxml ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_ANYXML, kw);
-    assert_int_equal(6, len);
-    in.current = "argument ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_ARGUMENT, kw);
-    assert_int_equal(8, len);
-    in.current = "augment ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_AUGMENT, kw);
-    assert_int_equal(7, len);
-    in.current = "base ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_BASE, kw);
-    assert_int_equal(4, len);
-    in.current = "belongs-to ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_BELONGS_TO, kw);
-    assert_int_equal(10, len);
-    in.current = "bit ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_BIT, kw);
-    assert_int_equal(3, len);
-    in.current = "case ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_CASE, kw);
-    assert_int_equal(4, len);
-    in.current = "choice ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_CHOICE, kw);
-    assert_int_equal(6, len);
-    in.current = "config ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_CONFIG, kw);
-    assert_int_equal(6, len);
-    in.current = "contact ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_CONTACT, kw);
-    assert_int_equal(7, len);
-    in.current = "container ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_CONTAINER, kw);
-    assert_int_equal(9, len);
-    in.current = "default ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_DEFAULT, kw);
-    assert_int_equal(7, len);
-    in.current = "description ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_DESCRIPTION, kw);
-    assert_int_equal(11, len);
-    in.current = "deviate ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_DEVIATE, kw);
-    assert_int_equal(7, len);
-    in.current = "deviation ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_DEVIATION, kw);
-    assert_int_equal(9, len);
-    in.current = "enum ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_ENUM, kw);
-    assert_int_equal(4, len);
-    in.current = "error-app-tag ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_ERROR_APP_TAG, kw);
-    assert_int_equal(13, len);
-    in.current = "error-message ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_ERROR_MESSAGE, kw);
-    assert_int_equal(13, len);
-    in.current = "extension ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_EXTENSION, kw);
-    assert_int_equal(9, len);
-    in.current = "feature ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_FEATURE, kw);
-    assert_int_equal(7, len);
-    in.current = "fraction-digits ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_FRACTION_DIGITS, kw);
-    assert_int_equal(15, len);
-    in.current = "grouping ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_GROUPING, kw);
-    assert_int_equal(8, len);
-    in.current = "identity ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_IDENTITY, kw);
-    assert_int_equal(8, len);
-    in.current = "if-feature ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_IF_FEATURE, kw);
-    assert_int_equal(10, len);
-    in.current = "import ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_IMPORT, kw);
-    assert_int_equal(6, len);
-    in.current = "include ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_INCLUDE, kw);
-    assert_int_equal(7, len);
-    in.current = "input{";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_INPUT, kw);
-    assert_int_equal(5, len);
-    in.current = "key ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_KEY, kw);
-    assert_int_equal(3, len);
-    in.current = "leaf ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_LEAF, kw);
-    assert_int_equal(4, len);
-    in.current = "leaf-list ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_LEAF_LIST, kw);
-    assert_int_equal(9, len);
-    in.current = "length ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_LENGTH, kw);
-    assert_int_equal(6, len);
-    in.current = "list ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_LIST, kw);
-    assert_int_equal(4, len);
-    in.current = "mandatory ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_MANDATORY, kw);
-    assert_int_equal(9, len);
-    in.current = "max-elements ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_MAX_ELEMENTS, kw);
-    assert_int_equal(12, len);
-    in.current = "min-elements ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_MIN_ELEMENTS, kw);
-    assert_int_equal(12, len);
-    in.current = "modifier ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_MODIFIER, kw);
-    assert_int_equal(8, len);
-    in.current = "module ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_MODULE, kw);
-    assert_int_equal(6, len);
-    in.current = "must ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_MUST, kw);
-    assert_int_equal(4, len);
-    in.current = "namespace ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_NAMESPACE, kw);
-    assert_int_equal(9, len);
-    in.current = "notification ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_NOTIFICATION, kw);
-    assert_int_equal(12, len);
-    in.current = "ordered-by ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_ORDERED_BY, kw);
-    assert_int_equal(10, len);
-    in.current = "organization ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_ORGANIZATION, kw);
-    assert_int_equal(12, len);
-    in.current = "output ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_OUTPUT, kw);
-    assert_int_equal(6, len);
-    in.current = "path ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_PATH, kw);
-    assert_int_equal(4, len);
-    in.current = "pattern ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_PATTERN, kw);
-    assert_int_equal(7, len);
-    in.current = "position ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_POSITION, kw);
-    assert_int_equal(8, len);
-    in.current = "prefix ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_PREFIX, kw);
-    assert_int_equal(6, len);
-    in.current = "presence ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_PRESENCE, kw);
-    assert_int_equal(8, len);
-    in.current = "range ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_RANGE, kw);
-    assert_int_equal(5, len);
-    in.current = "reference ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_REFERENCE, kw);
-    assert_int_equal(9, len);
-    in.current = "refine ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_REFINE, kw);
-    assert_int_equal(6, len);
-    in.current = "require-instance ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_REQUIRE_INSTANCE, kw);
-    assert_int_equal(16, len);
-    in.current = "revision ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_REVISION, kw);
-    assert_int_equal(8, len);
-    in.current = "revision-date ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_REVISION_DATE, kw);
-    assert_int_equal(13, len);
-    in.current = "rpc ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_RPC, kw);
-    assert_int_equal(3, len);
-    in.current = "status ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_STATUS, kw);
-    assert_int_equal(6, len);
-    in.current = "submodule ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_SUBMODULE, kw);
-    assert_int_equal(9, len);
-    in.current = "type ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_TYPE, kw);
-    assert_int_equal(4, len);
-    in.current = "typedef ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_TYPEDEF, kw);
-    assert_int_equal(7, len);
-    in.current = "unique ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_UNIQUE, kw);
-    assert_int_equal(6, len);
-    in.current = "units ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_UNITS, kw);
-    assert_int_equal(5, len);
-    in.current = "uses ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_USES, kw);
-    assert_int_equal(4, len);
-    in.current = "value ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_VALUE, kw);
-    assert_int_equal(5, len);
-    in.current = "when ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_WHEN, kw);
-    assert_int_equal(4, len);
-    in.current = "yang-version ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_YANG_VERSION, kw);
-    assert_int_equal(12, len);
-    in.current = "yin-element ";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_YIN_ELEMENT, kw);
-    assert_int_equal(11, len);
-    in.current = ";config false;";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_SYNTAX_SEMICOLON, kw);
-    assert_int_equal(1, len);
+    TEST_STMS_SUCCESS("action ", YCTX, LY_STMT_ACTION, "action");
+
+    TEST_STMS_SUCCESS("anydata ", YCTX, LY_STMT_ANYDATA, "anydata");
+    TEST_STMS_SUCCESS("anyxml ", YCTX, LY_STMT_ANYXML, "anyxml");
+    TEST_STMS_SUCCESS("argument ", YCTX, LY_STMT_ARGUMENT, "argument");
+    TEST_STMS_SUCCESS("augment ", YCTX, LY_STMT_AUGMENT, "augment");
+    TEST_STMS_SUCCESS("base ", YCTX, LY_STMT_BASE, "base");
+    TEST_STMS_SUCCESS("belongs-to ", YCTX, LY_STMT_BELONGS_TO, "belongs-to");
+    TEST_STMS_SUCCESS("bit ", YCTX, LY_STMT_BIT, "bit");
+    TEST_STMS_SUCCESS("case ", YCTX, LY_STMT_CASE, "case");
+    TEST_STMS_SUCCESS("choice ", YCTX, LY_STMT_CHOICE, "choice");
+    TEST_STMS_SUCCESS("config ", YCTX, LY_STMT_CONFIG, "config");
+    TEST_STMS_SUCCESS("contact ", YCTX, LY_STMT_CONTACT, "contact");
+    TEST_STMS_SUCCESS("container ", YCTX, LY_STMT_CONTAINER, "container");
+    TEST_STMS_SUCCESS("default ", YCTX, LY_STMT_DEFAULT, "default");
+    TEST_STMS_SUCCESS("description ", YCTX, LY_STMT_DESCRIPTION, "description");
+    TEST_STMS_SUCCESS("deviate ", YCTX, LY_STMT_DEVIATE, "deviate");
+    TEST_STMS_SUCCESS("deviation ", YCTX, LY_STMT_DEVIATION, "deviation");
+    TEST_STMS_SUCCESS("enum ", YCTX, LY_STMT_ENUM, "enum");
+    TEST_STMS_SUCCESS("error-app-tag ", YCTX, LY_STMT_ERROR_APP_TAG, "error-app-tag");
+    TEST_STMS_SUCCESS("error-message ", YCTX, LY_STMT_ERROR_MESSAGE, "error-message");
+    TEST_STMS_SUCCESS("extension ", YCTX, LY_STMT_EXTENSION, "extension");
+    TEST_STMS_SUCCESS("feature ", YCTX, LY_STMT_FEATURE, "feature");
+    TEST_STMS_SUCCESS("fraction-digits ", YCTX, LY_STMT_FRACTION_DIGITS, "fraction-digits");
+    TEST_STMS_SUCCESS("grouping ", YCTX, LY_STMT_GROUPING, "grouping");
+    TEST_STMS_SUCCESS("identity ", YCTX, LY_STMT_IDENTITY, "identity");
+    TEST_STMS_SUCCESS("if-feature ", YCTX, LY_STMT_IF_FEATURE, "if-feature");
+    TEST_STMS_SUCCESS("import ", YCTX, LY_STMT_IMPORT, "import");
+    TEST_STMS_SUCCESS("include ", YCTX, LY_STMT_INCLUDE, "include");
+    TEST_STMS_SUCCESS("input{", YCTX, LY_STMT_INPUT, "input");
+    TEST_STMS_SUCCESS("key ", YCTX, LY_STMT_KEY, "key");
+    TEST_STMS_SUCCESS("leaf ", YCTX, LY_STMT_LEAF, "leaf");
+    TEST_STMS_SUCCESS("leaf-list ", YCTX, LY_STMT_LEAF_LIST, "leaf-list");
+    TEST_STMS_SUCCESS("length ", YCTX, LY_STMT_LENGTH, "length");
+    TEST_STMS_SUCCESS("list ", YCTX, LY_STMT_LIST, "list");
+    TEST_STMS_SUCCESS("mandatory ", YCTX, LY_STMT_MANDATORY, "mandatory");
+    TEST_STMS_SUCCESS("max-elements ", YCTX, LY_STMT_MAX_ELEMENTS, "max-elements");
+    TEST_STMS_SUCCESS("min-elements ", YCTX, LY_STMT_MIN_ELEMENTS, "min-elements");
+    TEST_STMS_SUCCESS("modifier ", YCTX, LY_STMT_MODIFIER, "modifier");
+    TEST_STMS_SUCCESS("module ", YCTX, LY_STMT_MODULE, "module");
+    TEST_STMS_SUCCESS("must ", YCTX, LY_STMT_MUST, "must");
+    TEST_STMS_SUCCESS("namespace ", YCTX, LY_STMT_NAMESPACE, "namespace");
+    TEST_STMS_SUCCESS("notification ", YCTX, LY_STMT_NOTIFICATION, "notification");
+    TEST_STMS_SUCCESS("ordered-by ", YCTX, LY_STMT_ORDERED_BY, "ordered-by");
+    TEST_STMS_SUCCESS("organization ", YCTX, LY_STMT_ORGANIZATION, "organization");
+    TEST_STMS_SUCCESS("output ", YCTX, LY_STMT_OUTPUT, "output");
+    TEST_STMS_SUCCESS("path ", YCTX, LY_STMT_PATH, "path");
+    TEST_STMS_SUCCESS("pattern ", YCTX, LY_STMT_PATTERN, "pattern");
+    TEST_STMS_SUCCESS("position ", YCTX, LY_STMT_POSITION, "position");
+    TEST_STMS_SUCCESS("prefix ", YCTX, LY_STMT_PREFIX, "prefix");
+    TEST_STMS_SUCCESS("presence ", YCTX, LY_STMT_PRESENCE, "presence");
+    TEST_STMS_SUCCESS("range ", YCTX, LY_STMT_RANGE, "range");
+    TEST_STMS_SUCCESS("reference ", YCTX, LY_STMT_REFERENCE, "reference");
+    TEST_STMS_SUCCESS("refine ", YCTX, LY_STMT_REFINE, "refine");
+    TEST_STMS_SUCCESS("require-instance ", YCTX, LY_STMT_REQUIRE_INSTANCE, "require-instance");
+    TEST_STMS_SUCCESS("revision ", YCTX, LY_STMT_REVISION, "revision");
+    TEST_STMS_SUCCESS("revision-date ", YCTX, LY_STMT_REVISION_DATE, "revision-date");
+    TEST_STMS_SUCCESS("rpc ", YCTX, LY_STMT_RPC, "rpc");
+    TEST_STMS_SUCCESS("status ", YCTX, LY_STMT_STATUS, "status");
+    TEST_STMS_SUCCESS("submodule ", YCTX, LY_STMT_SUBMODULE, "submodule");
+    TEST_STMS_SUCCESS("type ", YCTX, LY_STMT_TYPE, "type");
+    TEST_STMS_SUCCESS("typedef ", YCTX, LY_STMT_TYPEDEF, "typedef");
+    TEST_STMS_SUCCESS("unique ", YCTX, LY_STMT_UNIQUE, "unique");
+    TEST_STMS_SUCCESS("units ", YCTX, LY_STMT_UNITS, "units");
+    TEST_STMS_SUCCESS("uses ", YCTX, LY_STMT_USES, "uses");
+    TEST_STMS_SUCCESS("value ", YCTX, LY_STMT_VALUE, "value");
+    TEST_STMS_SUCCESS("when ", YCTX, LY_STMT_WHEN, "when");
+    TEST_STMS_SUCCESS("yang-version ", YCTX, LY_STMT_YANG_VERSION, "yang-version");
+    TEST_STMS_SUCCESS("yin-element ", YCTX, LY_STMT_YIN_ELEMENT, "yin-element");
+    TEST_STMS_SUCCESS(";config false;", YCTX, LY_STMT_SYNTAX_SEMICOLON, ";");
     assert_string_equal("config false;", in.current);
-    in.current = "{ config false;";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_SYNTAX_LEFT_BRACE, kw);
-    assert_int_equal(1, len);
+    TEST_STMS_SUCCESS("{ config false;", YCTX, LY_STMT_SYNTAX_LEFT_BRACE, "{");
     assert_string_equal(" config false;", in.current);
-    in.current = "}";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
-    assert_int_equal(LY_STMT_SYNTAX_RIGHT_BRACE, kw);
-    assert_int_equal(1, len);
+    TEST_STMS_SUCCESS("}", YCTX, LY_STMT_SYNTAX_RIGHT_BRACE, "}");
     assert_string_equal("", in.current);
 
     /* geenric extension */
     in.current = p = "nacm:default-deny-write;";
-    assert_int_equal(LY_SUCCESS, get_keyword(ctx, &in, &kw, &word, &len));
+    assert_int_equal(LY_SUCCESS, get_keyword(YCTX, &in, &kw, &word, &len));
     assert_int_equal(LY_STMT_EXTENSION_INSTANCE, kw);
     assert_int_equal(23, len);
     assert_ptr_equal(p, word);
 }
 
+#define TEST_MINMAX_SUCCESS(INPUT_TEXT, CTX, TYPE, VALUE)\
+    in.current = INPUT_TEXT;\
+    if(TYPE == LYS_SET_MIN){\
+       assert_int_equal(LY_SUCCESS, parse_minelements(CTX, &in, &value, &flags, &ext));\
+    }\
+    if(TYPE == LYS_SET_MAX){\
+       assert_int_equal(LY_SUCCESS, parse_maxelements(CTX, &in, &value, &flags, &ext));\
+    }\
+    assert_int_equal(TYPE, flags);\
+    assert_int_equal(VALUE, value)
+
 static void
 test_minmax(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     uint16_t flags = 0;
     uint32_t value = 0;
     struct lysp_ext_instance *ext = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     in.current = " 1invalid; ...";
-    assert_int_equal(LY_EVALID, parse_minelements(ctx, &in, &value, &flags, &ext));
-    logbuf_assert("Invalid value \"1invalid\" of \"min-elements\". Line number 1.");
+    assert_int_equal(LY_EVALID, parse_minelements(YCTX, &in, &value, &flags, &ext));
+    CHECK_LOG_CTX("Invalid value \"1invalid\" of \"min-elements\".", "Line number 1.");
 
     flags = value = 0;
     in.current = " -1; ...";
-    assert_int_equal(LY_EVALID, parse_minelements(ctx, &in, &value, &flags, &ext));
-    logbuf_assert("Invalid value \"-1\" of \"min-elements\". Line number 1.");
+    assert_int_equal(LY_EVALID, parse_minelements(YCTX, &in, &value, &flags, &ext));
+    CHECK_LOG_CTX("Invalid value \"-1\" of \"min-elements\".", "Line number 1.");
 
     /* implementation limit */
     flags = value = 0;
     in.current = " 4294967296; ...";
-    assert_int_equal(LY_EVALID, parse_minelements(ctx, &in, &value, &flags, &ext));
-    logbuf_assert("Value \"4294967296\" is out of \"min-elements\" bounds. Line number 1.");
+    assert_int_equal(LY_EVALID, parse_minelements(YCTX, &in, &value, &flags, &ext));
+    CHECK_LOG_CTX("Value \"4294967296\" is out of \"min-elements\" bounds.", "Line number 1.");
 
     flags = value = 0;
-    in.current = " 1; ...";
-    assert_int_equal(LY_SUCCESS, parse_minelements(ctx, &in, &value, &flags, &ext));
-    assert_int_equal(LYS_SET_MIN, flags);
-    assert_int_equal(1, value);
+    TEST_MINMAX_SUCCESS(" 1; ...", YCTX, LYS_SET_MIN, 1);
 
     flags = value = 0;
-    in.current = " 1 {m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_minelements(ctx, &in, &value, &flags, &ext));
-    assert_int_equal(LYS_SET_MIN, flags);
-    assert_int_equal(1, value);
+    TEST_MINMAX_SUCCESS(" 1 {m:ext;} ...", YCTX, LYS_SET_MIN, 1);
     assert_non_null(ext);
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, ext, lysp_ext_instance_free);
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, ext, lysp_ext_instance_free);
     ext = NULL;
 
     flags = value = 0;
     in.current = " 1 {config true;} ...";
-    assert_int_equal(LY_EVALID, parse_minelements(ctx, &in, &value, &flags, &ext));
-    logbuf_assert("Invalid keyword \"config\" as a child of \"min-elements\". Line number 1.");
+    assert_int_equal(LY_EVALID, parse_minelements(YCTX, &in, &value, &flags, &ext));
+    CHECK_LOG_CTX("Invalid keyword \"config\" as a child of \"min-elements\".", "Line number 1.");
 
     in.current = " 1invalid; ...";
-    assert_int_equal(LY_EVALID, parse_maxelements(ctx, &in, &value, &flags, &ext));
-    logbuf_assert("Invalid value \"1invalid\" of \"max-elements\". Line number 1.");
+    assert_int_equal(LY_EVALID, parse_maxelements(YCTX, &in, &value, &flags, &ext));
+    CHECK_LOG_CTX("Invalid value \"1invalid\" of \"max-elements\".", "Line number 1.");
 
     flags = value = 0;
     in.current = " -1; ...";
-    assert_int_equal(LY_EVALID, parse_maxelements(ctx, &in, &value, &flags, &ext));
-    logbuf_assert("Invalid value \"-1\" of \"max-elements\". Line number 1.");
+    assert_int_equal(LY_EVALID, parse_maxelements(YCTX, &in, &value, &flags, &ext));
+    CHECK_LOG_CTX("Invalid value \"-1\" of \"max-elements\".", "Line number 1.");
 
     /* implementation limit */
     flags = value = 0;
     in.current = " 4294967296; ...";
-    assert_int_equal(LY_EVALID, parse_maxelements(ctx, &in, &value, &flags, &ext));
-    logbuf_assert("Value \"4294967296\" is out of \"max-elements\" bounds. Line number 1.");
+    assert_int_equal(LY_EVALID, parse_maxelements(YCTX, &in, &value, &flags, &ext));
+    CHECK_LOG_CTX("Value \"4294967296\" is out of \"max-elements\" bounds.", "Line number 1.");
 
     flags = value = 0;
-    in.current = " 1; ...";
-    assert_int_equal(LY_SUCCESS, parse_maxelements(ctx, &in, &value, &flags, &ext));
-    assert_int_equal(LYS_SET_MAX, flags);
-    assert_int_equal(1, value);
+    TEST_MINMAX_SUCCESS(" 1; ...", YCTX, LYS_SET_MAX, 1);
 
     flags = value = 0;
-    in.current = " unbounded; ...";
-    assert_int_equal(LY_SUCCESS, parse_maxelements(ctx, &in, &value, &flags, &ext));
-    assert_int_equal(LYS_SET_MAX, flags);
-    assert_int_equal(0, value);
+    TEST_MINMAX_SUCCESS(" unbounded; ...", YCTX, LYS_SET_MAX, 0);
 
     flags = value = 0;
-    in.current = " 1 {m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_maxelements(ctx, &in, &value, &flags, &ext));
-    assert_int_equal(LYS_SET_MAX, flags);
-    assert_int_equal(1, value);
+    TEST_MINMAX_SUCCESS(" 1 {m:ext;} ...", YCTX, LYS_SET_MAX, 1);
     assert_non_null(ext);
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, ext, lysp_ext_instance_free);
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, ext, lysp_ext_instance_free);
     ext = NULL;
 
     flags = value = 0;
     in.current = " 1 {config true;} ...";
-    assert_int_equal(LY_EVALID, parse_maxelements(ctx, &in, &value, &flags, &ext));
-    logbuf_assert("Invalid keyword \"config\" as a child of \"max-elements\". Line number 1.");
+    assert_int_equal(LY_EVALID, parse_maxelements(YCTX, &in, &value, &flags, &ext));
+    CHECK_LOG_CTX("Invalid keyword \"config\" as a child of \"max-elements\".", "Line number 1.");
 }
 
 static struct lysp_module *
@@ -872,51 +574,51 @@
 static void
 test_module(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_module *mod = NULL;
     struct lysp_submodule *submod = NULL;
     struct lys_module *m;
     struct ly_in in = {0};
     struct lys_glob_unres unres = {0};
+    struct lys_yang_parser_ctx *ctx_p;
 
-    mod = mod_renew(ctx);
+    mod = mod_renew(YCTX);
 
     /* missing mandatory substatements */
     in.current = " name {}";
-    assert_int_equal(LY_EVALID, parse_module(ctx, &in, mod));
+    assert_int_equal(LY_EVALID, parse_module(YCTX, &in, mod));
     assert_string_equal("name", mod->mod->name);
-    logbuf_assert("Missing mandatory keyword \"namespace\" as a child of \"module\". Line number 1.");
-    mod = mod_renew(ctx);
+    CHECK_LOG_CTX("Missing mandatory keyword \"namespace\" as a child of \"module\".", "Line number 1.");
 
+    mod = mod_renew(YCTX);
     in.current = " name {namespace urn:x;}";
-    assert_int_equal(LY_EVALID, parse_module(ctx, &in, mod));
+    assert_int_equal(LY_EVALID, parse_module(YCTX, &in, mod));
     assert_string_equal("urn:x", mod->mod->ns);
-    logbuf_assert("Missing mandatory keyword \"prefix\" as a child of \"module\". Line number 1.");
-    mod = mod_renew(ctx);
+    CHECK_LOG_CTX("Missing mandatory keyword \"prefix\" as a child of \"module\".", "Line number 1.");
+    mod = mod_renew(YCTX);
 
     in.current = " name {namespace urn:x;prefix \"x\";}";
-    assert_int_equal(LY_SUCCESS, parse_module(ctx, &in, mod));
+    assert_int_equal(LY_SUCCESS, parse_module(YCTX, &in, mod));
     assert_string_equal("x", mod->mod->prefix);
-    mod = mod_renew(ctx);
+    mod = mod_renew(YCTX);
 
 #define SCHEMA_BEGINNING " name {yang-version 1.1;namespace urn:x;prefix \"x\";"
 #define SCHEMA_BEGINNING2 " name {namespace urn:x;prefix \"x\";"
 #define TEST_NODE(NODETYPE, INPUT, NAME) \
         in.current = SCHEMA_BEGINNING INPUT; \
-        assert_int_equal(LY_SUCCESS, parse_module(ctx, &in, mod)); \
+        assert_int_equal(LY_SUCCESS, parse_module(YCTX, &in, mod)); \
         assert_non_null(mod->data); \
         assert_int_equal(NODETYPE, mod->data->nodetype); \
         assert_string_equal(NAME, mod->data->name); \
-        mod = mod_renew(ctx);
+        mod = mod_renew(YCTX);
 #define TEST_GENERIC(INPUT, TARGET, TEST) \
         in.current = SCHEMA_BEGINNING INPUT; \
-        assert_int_equal(LY_SUCCESS, parse_module(ctx, &in, mod)); \
+        assert_int_equal(LY_SUCCESS, parse_module(YCTX, &in, mod)); \
         assert_non_null(TARGET); \
         TEST; \
-        mod = mod_renew(ctx);
+        mod = mod_renew(YCTX);
 #define TEST_DUP(MEMBER, VALUE1, VALUE2, LINE) \
         TEST_DUP_GENERIC(SCHEMA_BEGINNING, MEMBER, VALUE1, VALUE2, \
-                         parse_module, mod, LINE, mod = mod_renew(ctx))
+                         parse_module, mod, LINE, mod = mod_renew(YCTX))
 
     /* duplicated namespace, prefix */
     TEST_DUP("namespace", "y", "z", "1");
@@ -928,9 +630,9 @@
 
     /* not allowed in module (submodule-specific) */
     in.current = SCHEMA_BEGINNING "belongs-to master {prefix m;}}";
-    assert_int_equal(LY_EVALID, parse_module(ctx, &in, mod));
-    logbuf_assert("Invalid keyword \"belongs-to\" as a child of \"module\". Line number 1.");
-    mod = mod_renew(ctx);
+    assert_int_equal(LY_EVALID, parse_module(YCTX, &in, mod));
+    CHECK_LOG_CTX("Invalid keyword \"belongs-to\" as a child of \"module\".", "Line number 1.");
+    mod = mod_renew(YCTX);
 
     /* anydata */
     TEST_NODE(LYS_ANYDATA, "anydata test;}", "test");
@@ -965,39 +667,37 @@
     TEST_GENERIC("identity test;}", mod->identities,
             assert_string_equal("test", mod->identities[0].name));
     /* import */
-    ly_ctx_set_module_imp_clb(ctx->parsed_mod->mod->ctx, test_imp_clb, "module zzz { namespace urn:zzz; prefix z;}");
+    ly_ctx_set_module_imp_clb(YCTX->parsed_mod->mod->ctx, test_imp_clb, "module zzz { namespace urn:zzz; prefix z;}");
     TEST_GENERIC("import zzz {prefix z;}}", mod->imports,
             assert_string_equal("zzz", mod->imports[0].name));
 
     /* import - prefix collision */
     in.current = SCHEMA_BEGINNING "import zzz {prefix x;}}";
-    assert_int_equal(LY_EVALID, parse_module(ctx, &in, mod));
-    logbuf_assert("Prefix \"x\" already used as module prefix. Line number 2.");
-    mod = mod_renew(ctx);
+    assert_int_equal(LY_EVALID, parse_module(YCTX, &in, mod));
+    CHECK_LOG_CTX("Prefix \"x\" already used as module prefix.", "Line number 2.");
+    mod = mod_renew(YCTX);
+
     in.current = SCHEMA_BEGINNING "import zzz {prefix y;}import zzz {prefix y;}}";
-    assert_int_equal(LY_EVALID, parse_module(ctx, &in, mod));
-    logbuf_assert("Prefix \"y\" already used to import \"zzz\" module. Line number 2.");
-    mod = mod_renew(ctx);
+    assert_int_equal(LY_EVALID, parse_module(YCTX, &in, mod));
+    CHECK_LOG_CTX("Prefix \"y\" already used to import \"zzz\" module.", "Line number 2.");
+
+    mod = mod_renew(YCTX);
     in.current = "module name10 {yang-version 1.1;namespace urn:x;prefix \"x\";import zzz {prefix y;}import zzz {prefix z;}}";
-    assert_int_equal(lys_parse_mem(ctx->parsed_mod->mod->ctx, in.current, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("Single revision of the module \"zzz\" imported twice.");
+    assert_int_equal(lys_parse_mem(YCTX->parsed_mod->mod->ctx, in.current, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX("Single revision of the module \"zzz\" imported twice.", NULL);
 
     /* include */
-    store = 1;
-    ly_ctx_set_module_imp_clb(ctx->parsed_mod->mod->ctx, test_imp_clb, "module xxx { namespace urn:xxx; prefix x;}");
+    ly_ctx_set_module_imp_clb(YCTX->parsed_mod->mod->ctx, test_imp_clb, "module xxx { namespace urn:xxx; prefix x;}");
     in.current = "module" SCHEMA_BEGINNING "include xxx;}";
-    assert_int_equal(lys_parse_mem(ctx->parsed_mod->mod->ctx, in.current, LYS_IN_YANG, NULL), LY_EVALID);
-    logbuf_assert("Input data contains module in situation when a submodule is expected.");
-    store = -1;
+    assert_int_equal(lys_parse_mem(YCTX->parsed_mod->mod->ctx, in.current, LYS_IN_YANG, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Including \"xxx\" submodule into \"name\" failed.", NULL);
 
-    store = 1;
-    ly_ctx_set_module_imp_clb(ctx->parsed_mod->mod->ctx, test_imp_clb, "submodule xxx {belongs-to wrong-name {prefix w;}}");
+    ly_ctx_set_module_imp_clb(YCTX->parsed_mod->mod->ctx, test_imp_clb, "submodule xxx {belongs-to wrong-name {prefix w;}}");
     in.current = "module" SCHEMA_BEGINNING "include xxx;}";
-    assert_int_equal(lys_parse_mem(ctx->parsed_mod->mod->ctx, in.current, LYS_IN_YANG, NULL), LY_EVALID);
-    logbuf_assert("Submodule \"belongs-to\" value \"wrong-name\" does not match its module name \"name\". Line number 1.");
-    store = -1;
+    assert_int_equal(lys_parse_mem(YCTX->parsed_mod->mod->ctx, in.current, LYS_IN_YANG, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Including \"xxx\" submodule into \"name\" failed.", NULL);
 
-    ly_ctx_set_module_imp_clb(ctx->parsed_mod->mod->ctx, test_imp_clb, "submodule xxx {belongs-to name {prefix x;}}");
+    ly_ctx_set_module_imp_clb(YCTX->parsed_mod->mod->ctx, test_imp_clb, "submodule xxx {belongs-to name {prefix x;}}");
     TEST_GENERIC("include xxx;}", mod->includes,
             assert_string_equal("xxx", mod->includes[0].name));
 
@@ -1029,44 +729,43 @@
     TEST_NODE(LYS_USES, "uses test;}", "test");
     /* yang-version */
     in.current = SCHEMA_BEGINNING2 "\n\tyang-version 10;}";
-    assert_int_equal(LY_EVALID, parse_module(ctx, &in, mod));
-    logbuf_assert("Invalid value \"10\" of \"yang-version\". Line number 3.");
-    mod = mod_renew(ctx);
+    assert_int_equal(LY_EVALID, parse_module(YCTX, &in, mod));
+    CHECK_LOG_CTX("Invalid value \"10\" of \"yang-version\".", "Line number 3.");
+    mod = mod_renew(YCTX);
     in.current = SCHEMA_BEGINNING2 "yang-version 1;yang-version 1.1;}";
-    assert_int_equal(LY_EVALID, parse_module(ctx, &in, mod));
-    logbuf_assert("Duplicate keyword \"yang-version\". Line number 3.");
-    mod = mod_renew(ctx);
+    assert_int_equal(LY_EVALID, parse_module(YCTX, &in, mod));
+    CHECK_LOG_CTX("Duplicate keyword \"yang-version\".", "Line number 3.");
+    mod = mod_renew(YCTX);
     in.current = SCHEMA_BEGINNING2 "yang-version 1;}";
-    assert_int_equal(LY_SUCCESS, parse_module(ctx, &in, mod));
+    assert_int_equal(LY_SUCCESS, parse_module(YCTX, &in, mod));
     assert_int_equal(1, mod->version);
-    mod = mod_renew(ctx);
+    mod = mod_renew(YCTX);
     in.current = SCHEMA_BEGINNING2 "yang-version \"1.1\";}";
-    assert_int_equal(LY_SUCCESS, parse_module(ctx, &in, mod));
+    assert_int_equal(LY_SUCCESS, parse_module(YCTX, &in, mod));
     assert_int_equal(2, mod->version);
-    mod = mod_renew(ctx);
+    mod = mod_renew(YCTX);
 
-    struct lys_yang_parser_ctx *ctx_p = NULL;
     in.current = "module " SCHEMA_BEGINNING "} module q {namespace urn:q;prefixq;}";
     m = calloc(1, sizeof *m);
-    m->ctx = ctx->parsed_mod->mod->ctx;
+    m->ctx = YCTX->parsed_mod->mod->ctx;
     assert_int_equal(LY_EVALID, yang_parse_module(&ctx_p, &in, m, &unres));
-    logbuf_assert("Trailing garbage \"module q {names...\" after module, expected end-of-input. Line number 1.");
+    CHECK_LOG_CTX("Trailing garbage \"module q {names...\" after module, expected end-of-input.", "Line number 1.");
     yang_parser_ctx_free(ctx_p);
     lys_module_free(m, NULL);
 
     in.current = "prefix " SCHEMA_BEGINNING "}";
     m = calloc(1, sizeof *m);
-    m->ctx = ctx->parsed_mod->mod->ctx;
+    m->ctx = YCTX->parsed_mod->mod->ctx;
     assert_int_equal(LY_EVALID, yang_parse_module(&ctx_p, &in, m, &unres));
-    logbuf_assert("Invalid keyword \"prefix\", expected \"module\" or \"submodule\". Line number 1.");
+    CHECK_LOG_CTX("Invalid keyword \"prefix\", expected \"module\" or \"submodule\".", "Line number 1.");
     yang_parser_ctx_free(ctx_p);
     lys_module_free(m, NULL);
 
     in.current = "module " SCHEMA_BEGINNING "leaf enum {type enumeration {enum seven { position 7;}}}}";
     m = calloc(1, sizeof *m);
-    m->ctx = ctx->parsed_mod->mod->ctx;
+    m->ctx = YCTX->parsed_mod->mod->ctx;
     assert_int_equal(LY_EVALID, yang_parse_module(&ctx_p, &in, m, &unres));
-    logbuf_assert("Invalid keyword \"position\" as a child of \"enum\". Line number 1.");
+    CHECK_LOG_CTX("Invalid keyword \"position\" as a child of \"enum\".", "Line number 1.");
     yang_parser_ctx_free(ctx_p);
     lys_module_free(m, NULL);
 
@@ -1074,57 +773,58 @@
     TEST_GENERIC("prefix:test;}", mod->exts,
             assert_string_equal("prefix:test", mod->exts[0].name);
             assert_int_equal(LYEXT_SUBSTMT_SELF, mod->exts[0].insubstmt));
-    mod = mod_renew(ctx);
+    mod = mod_renew(YCTX);
 
     /* invalid substatement */
     in.current = SCHEMA_BEGINNING "must false;}";
-    assert_int_equal(LY_EVALID, parse_module(ctx, &in, mod));
-    logbuf_assert("Invalid keyword \"must\" as a child of \"module\". Line number 3.");
+    assert_int_equal(LY_EVALID, parse_module(YCTX, &in, mod));
+    CHECK_LOG_CTX("Invalid keyword \"must\" as a child of \"module\".", "Line number 3.");
 
     /* submodule */
-    submod = submod_renew(ctx);
+    submod = submod_renew(YCTX);
 
     /* missing mandatory substatements */
     in.current = " subname {}";
-    assert_int_equal(LY_EVALID, parse_submodule(ctx, &in, submod));
+    assert_int_equal(LY_EVALID, parse_submodule(YCTX, &in, submod));
+    CHECK_LOG_CTX("Missing mandatory keyword \"belongs-to\" as a child of \"submodule\".", "Line number 3.");
     assert_string_equal("subname", submod->name);
-    logbuf_assert("Missing mandatory keyword \"belongs-to\" as a child of \"submodule\". Line number 3.");
-    submod = submod_renew(ctx);
+
+    submod = submod_renew(YCTX);
 
     in.current = " subname {belongs-to name {prefix x;}}";
-    assert_int_equal(LY_SUCCESS, parse_submodule(ctx, &in, submod));
+    assert_int_equal(LY_SUCCESS, parse_submodule(YCTX, &in, submod));
     assert_string_equal("name", submod->mod->name);
-    submod = submod_renew(ctx);
+    submod = submod_renew(YCTX);
 
 #undef SCHEMA_BEGINNING
 #define SCHEMA_BEGINNING " subname {belongs-to name {prefix x;}"
 
     /* duplicated namespace, prefix */
     in.current = " subname {belongs-to name {prefix x;}belongs-to module1;belongs-to module2;} ...";
-    assert_int_equal(LY_EVALID, parse_submodule(ctx, &in, submod)); \
-    logbuf_assert("Duplicate keyword \"belongs-to\". Line number 3."); \
-    submod = submod_renew(ctx);
+    assert_int_equal(LY_EVALID, parse_submodule(YCTX, &in, submod));
+    CHECK_LOG_CTX("Duplicate keyword \"belongs-to\".", "Line number 3.");
+    submod = submod_renew(YCTX);
 
     /* not allowed in submodule (module-specific) */
     in.current = SCHEMA_BEGINNING "namespace \"urn:z\";}";
-    assert_int_equal(LY_EVALID, parse_submodule(ctx, &in, submod));
-    logbuf_assert("Invalid keyword \"namespace\" as a child of \"submodule\". Line number 3.");
-    submod = submod_renew(ctx);
+    assert_int_equal(LY_EVALID, parse_submodule(YCTX, &in, submod));
+    CHECK_LOG_CTX("Invalid keyword \"namespace\" as a child of \"submodule\".", "Line number 3.");
+    submod = submod_renew(YCTX);
     in.current = SCHEMA_BEGINNING "prefix m;}}";
-    assert_int_equal(LY_EVALID, parse_submodule(ctx, &in, submod));
-    logbuf_assert("Invalid keyword \"prefix\" as a child of \"submodule\". Line number 3.");
-    submod = submod_renew(ctx);
+    assert_int_equal(LY_EVALID, parse_submodule(YCTX, &in, submod));
+    CHECK_LOG_CTX("Invalid keyword \"prefix\" as a child of \"submodule\".", "Line number 3.");
+    submod = submod_renew(YCTX);
 
     in.current = "submodule " SCHEMA_BEGINNING "} module q {namespace urn:q;prefixq;}";
-    assert_int_equal(LY_EVALID, yang_parse_submodule(&ctx_p, ctx->parsed_mod->mod->ctx, (struct lys_parser_ctx *)ctx, &in, &submod));
+    assert_int_equal(LY_EVALID, yang_parse_submodule(&ctx_p, YCTX->parsed_mod->mod->ctx, (struct lys_parser_ctx *)YCTX, &in, &submod));
+    CHECK_LOG_CTX("Trailing garbage \"module q {names...\" after submodule, expected end-of-input.", "Line number 1.");
     yang_parser_ctx_free(ctx_p);
-    logbuf_assert("Trailing garbage \"module q {names...\" after submodule, expected end-of-input. Line number 1.");
 
     in.current = "prefix " SCHEMA_BEGINNING "}";
-    assert_int_equal(LY_EVALID, yang_parse_submodule(&ctx_p, ctx->parsed_mod->mod->ctx, (struct lys_parser_ctx *)ctx, &in, &submod));
+    assert_int_equal(LY_EVALID, yang_parse_submodule(&ctx_p, YCTX->parsed_mod->mod->ctx, (struct lys_parser_ctx *)YCTX, &in, &submod));
+    CHECK_LOG_CTX("Invalid keyword \"prefix\", expected \"module\" or \"submodule\".", "Line number 1.");
     yang_parser_ctx_free(ctx_p);
-    logbuf_assert("Invalid keyword \"prefix\", expected \"module\" or \"submodule\". Line number 1.");
-    submod = submod_renew(ctx);
+    submod = submod_renew(YCTX);
 
 #undef TEST_GENERIC
 #undef TEST_NODE
@@ -1135,54 +835,58 @@
 static void
 test_deviation(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_deviation *d = NULL;
     struct ly_in in = {0};
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     TEST_DUP_GENERIC(" test {deviate not-supported;", MEMBER, VALUE1, VALUE2, parse_deviation, \
-                     &d, "1", FREE_ARRAY(ctx->parsed_mod->mod->ctx, d, lysp_deviation_free); d = NULL)
+                     &d, "1", FREE_ARRAY(YCTX->parsed_mod->mod->ctx, d, lysp_deviation_free); d = NULL)
 
     TEST_DUP("description", "a", "b");
     TEST_DUP("reference", "a", "b");
 
     /* full content */
     in.current = " test {deviate not-supported;description text;reference \'another text\';prefix:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_deviation(ctx, &in, &d));
+    assert_int_equal(LY_SUCCESS, parse_deviation(YCTX, &in, &d));
     assert_non_null(d);
     assert_string_equal(" ...", in.current);
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, d, lysp_deviation_free);
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, d, lysp_deviation_free);
     d = NULL;
 
     /* missing mandatory substatement */
     in.current = " test {description text;}";
-    assert_int_equal(LY_EVALID, parse_deviation(ctx, &in, &d));
-    logbuf_assert("Missing mandatory keyword \"deviate\" as a child of \"deviation\". Line number 1.");
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, d, lysp_deviation_free);
+    assert_int_equal(LY_EVALID, parse_deviation(YCTX, &in, &d));
+    CHECK_LOG_CTX("Missing mandatory keyword \"deviate\" as a child of \"deviation\".", "Line number 1.");
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, d, lysp_deviation_free);
     d = NULL;
 
     /* invalid substatement */
     in.current = " test {deviate not-supported; status obsolete;}";
-    assert_int_equal(LY_EVALID, parse_deviation(ctx, &in, &d));
-    logbuf_assert("Invalid keyword \"status\" as a child of \"deviation\". Line number 1.");
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, d, lysp_deviation_free);
+    assert_int_equal(LY_EVALID, parse_deviation(YCTX, &in, &d));
+    CHECK_LOG_CTX("Invalid keyword \"status\" as a child of \"deviation\".", "Line number 1.");
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, d, lysp_deviation_free);
     d = NULL;
-
 #undef TEST_DUP
 }
 
+#define TEST_DEVIATE_SUCCESS(INPUT_TEXT, REMAIN_TEXT)\
+                    in.current = INPUT_TEXT;\
+                    assert_int_equal(LY_SUCCESS, parse_deviate(YCTX, &in, &d));\
+                    assert_non_null(d);\
+                    assert_string_equal(REMAIN_TEXT, in.current);\
+                    lysp_deviate_free(YCTX->parsed_mod->mod->ctx, d); free(d); d = NULL
+
 static void
 test_deviate(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_deviate *d = NULL;
     struct ly_in in = {0};
 
     /* invalid cardinality */
 #define TEST_DUP(TYPE, MEMBER, VALUE1, VALUE2) \
     TEST_DUP_GENERIC(TYPE" {", MEMBER, VALUE1, VALUE2, parse_deviate, \
-                     &d, "1", lysp_deviate_free(ctx->parsed_mod->mod->ctx, d); free(d); d = NULL)
+                     &d, "1", lysp_deviate_free(YCTX->parsed_mod->mod->ctx, d); free(d); d = NULL)
 
     TEST_DUP("add", "config", "true", "false");
     TEST_DUP("replace", "default", "int8", "uint8");
@@ -1193,33 +897,17 @@
     TEST_DUP("add", "units", "kilometers", "miles");
 
     /* full contents */
-    in.current = " not-supported {prefix:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_deviate(ctx, &in, &d));
-    assert_non_null(d);
-    assert_string_equal(" ...", in.current);
-    lysp_deviate_free(ctx->parsed_mod->mod->ctx, d); free(d); d = NULL;
-    in.current = " add {units meters; must 1; must 2; unique x; unique y; default a; default b; config true; mandatory true; min-elements 1; max-elements 2; prefix:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_deviate(ctx, &in, &d));
-    assert_non_null(d);
-    assert_string_equal(" ...", in.current);
-    lysp_deviate_free(ctx->parsed_mod->mod->ctx, d); free(d); d = NULL;
-    in.current = " delete {units meters; must 1; must 2; unique x; unique y; default a; default b; prefix:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_deviate(ctx, &in, &d));
-    assert_non_null(d);
-    assert_string_equal(" ...", in.current);
-    lysp_deviate_free(ctx->parsed_mod->mod->ctx, d); free(d); d = NULL;
-    in.current = " replace {type string; units meters; default a; config true; mandatory true; min-elements 1; max-elements 2; prefix:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_deviate(ctx, &in, &d));
-    assert_non_null(d);
-    assert_string_equal(" ...", in.current);
-    lysp_deviate_free(ctx->parsed_mod->mod->ctx, d); free(d); d = NULL;
+    TEST_DEVIATE_SUCCESS(" not-supported {prefix:ext;} ...", " ...");
+    TEST_DEVIATE_SUCCESS(" add {units meters; must 1; must 2; unique x; unique y; default a; default b; config true; mandatory true; min-elements 1; max-elements 2; prefix:ext;} ...", " ...");
+    TEST_DEVIATE_SUCCESS(" delete {units meters; must 1; must 2; unique x; unique y; default a; default b; prefix:ext;} ...", " ...");
+    TEST_DEVIATE_SUCCESS(" replace {type string; units meters; default a; config true; mandatory true; min-elements 1; max-elements 2; prefix:ext;} ...", " ...");
 
     /* invalid substatements */
 #define TEST_NOT_SUP(DEV, STMT, VALUE) \
     in.current = " "DEV" {"STMT" "VALUE";}..."; \
-    assert_int_equal(LY_EVALID, parse_deviate(ctx, &in, &d)); \
-    logbuf_assert("Deviate \""DEV"\" does not support keyword \""STMT"\". Line number 1."); \
-    lysp_deviate_free(ctx->parsed_mod->mod->ctx, d); free(d); d = NULL
+    assert_int_equal(LY_EVALID, parse_deviate(YCTX, &in, &d)); \
+    CHECK_LOG_CTX("Deviate \""DEV"\" does not support keyword \""STMT"\".", "Line number 1.");\
+    lysp_deviate_free(YCTX->parsed_mod->mod->ctx, d); free(d); d = NULL
 
     TEST_NOT_SUP("not-supported", "units", "meters");
     TEST_NOT_SUP("not-supported", "must", "1");
@@ -1240,10 +928,9 @@
     TEST_NOT_SUP("replace", "unique", "a");
 
     in.current = " nonsence; ...";
-    assert_int_equal(LY_EVALID, parse_deviate(ctx, &in, &d));
-    logbuf_assert("Invalid value \"nonsence\" of \"deviate\". Line number 1.");
+    assert_int_equal(LY_EVALID, parse_deviate(YCTX, &in, &d));
+    CHECK_LOG_CTX("Invalid value \"nonsence\" of \"deviate\".", "Line number 1.");\
     assert_null(d);
-
 #undef TEST_NOT_SUP
 #undef TEST_DUP
 }
@@ -1251,18 +938,17 @@
 static void
 test_container(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_node_container *c = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "cont {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_container(ctx, &in, NULL, (struct lysp_node**)&c)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node*)c); c = NULL;
+    assert_int_equal(LY_EVALID, parse_container(YCTX, &in, NULL, (struct lysp_node**)&c)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node*)c); c = NULL;
 
     TEST_DUP("config", "true", "false");
     TEST_DUP("description", "text1", "text2");
@@ -1275,58 +961,48 @@
     /* full content */
     in.current = "cont {action x;anydata any;anyxml anyxml; choice ch;config false;container c;description test;grouping g;if-feature f; leaf l {type string;}"
             "leaf-list ll {type string;} list li;must 'expr';notification not; presence true; reference test;status current;typedef t {type int8;}uses g;when true;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_container(ctx, &in, NULL, (struct lysp_node **)&c));
-    assert_non_null(c);
-    assert_int_equal(LYS_CONTAINER, c->nodetype);
-    assert_string_equal("cont", c->name);
+    assert_int_equal(LY_SUCCESS, parse_container(YCTX, &in, NULL, (struct lysp_node **)&c));
+    CHECK_LYSP_NODE(c, "test", 1, LYS_CONFIG_R | LYS_STATUS_CURR, 1, "cont", 0, LYS_CONTAINER, 0, "test", 1);
     assert_non_null(c->actions);
     assert_non_null(c->child);
-    assert_string_equal("test", c->dsc);
-    assert_non_null(c->exts);
     assert_non_null(c->groupings);
-    assert_non_null(c->iffeatures);
     assert_non_null(c->musts);
     assert_non_null(c->notifs);
     assert_string_equal("true", c->presence);
-    assert_string_equal("test", c->ref);
     assert_non_null(c->typedefs);
-    assert_non_null(c->when);
-    assert_null(c->parent);
-    assert_null(c->next);
-    assert_int_equal(LYS_CONFIG_R | LYS_STATUS_CURR, c->flags);
-    ly_set_erase(&ctx->tpdfs_nodes, NULL);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)c); c = NULL;
+    ly_set_erase(&YCTX->tpdfs_nodes, NULL);
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)c); c = NULL;
 
     /* invalid */
     in.current = " cont {augment /root;} ...";
-    assert_int_equal(LY_EVALID, parse_container(ctx, &in, NULL, (struct lysp_node **)&c));
-    logbuf_assert("Invalid keyword \"augment\" as a child of \"container\". Line number 1.");
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)c); c = NULL;
+    assert_int_equal(LY_EVALID, parse_container(YCTX, &in, NULL, (struct lysp_node **)&c));
+    CHECK_LOG_CTX("Invalid keyword \"augment\" as a child of \"container\".", "Line number 1.");
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)c); c = NULL;
     in.current = " cont {nonsence true;} ...";
-    assert_int_equal(LY_EVALID, parse_container(ctx, &in, NULL, (struct lysp_node **)&c));
-    logbuf_assert("Invalid character sequence \"nonsence\", expected a keyword. Line number 1.");
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)c); c = NULL;
+    assert_int_equal(LY_EVALID, parse_container(YCTX, &in, NULL, (struct lysp_node **)&c));
+    CHECK_LOG_CTX("Invalid character sequence \"nonsence\", expected a keyword.", "Line number 1.");
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)c); c = NULL;
 
-    ctx->parsed_mod->version = 1; /* simulate YANG 1.0 */
+    YCTX->parsed_mod->version = 1; /* simulate YANG 1.0 */
     in.current = " cont {action x;} ...";
-    assert_int_equal(LY_EVALID, parse_container(ctx, &in, NULL, (struct lysp_node **)&c));
-    logbuf_assert("Invalid keyword \"action\" as a child of \"container\" - the statement is allowed only in YANG 1.1 modules. Line number 1.");
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)c); c = NULL;
+    assert_int_equal(LY_EVALID, parse_container(YCTX, &in, NULL, (struct lysp_node **)&c));
+    CHECK_LOG_CTX("Invalid keyword \"action\" as a child of \"container\" - "
+            "the statement is allowed only in YANG 1.1 modules.", "Line number 1.");
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)c); c = NULL;
 }
 
 static void
 test_leaf(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_node_leaf *l = NULL;
     struct ly_in in = {0};
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "l {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_leaf(ctx, &in, NULL, (struct lysp_node**)&l)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node*)l); l = NULL;
+    assert_int_equal(LY_EVALID, parse_leaf(YCTX, &in, NULL, (struct lysp_node**)&l)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node*)l); l = NULL;
 
     TEST_DUP("config", "true", "false");
     TEST_DUP("default", "x", "y");
@@ -1342,56 +1018,42 @@
     /* full content - without mandatory which is mutual exclusive with default */
     in.current = "l {config false;default \"xxx\";description test;if-feature f;"
             "must 'expr';reference test;status current;type string; units yyy;when true;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_leaf(ctx, &in, NULL, (struct lysp_node **)&l));
-    assert_non_null(l);
-    assert_int_equal(LYS_LEAF, l->nodetype);
-    assert_string_equal("l", l->name);
-    assert_string_equal("test", l->dsc);
+    assert_int_equal(LY_SUCCESS, parse_leaf(YCTX, &in, NULL, (struct lysp_node **)&l));
+    CHECK_LYSP_NODE(l, "test", 1, LYS_CONFIG_R | LYS_STATUS_CURR, 1, "l", 0, LYS_LEAF, 0, "test", 1);
     assert_string_equal("xxx", l->dflt.str);
     assert_string_equal("yyy", l->units);
     assert_string_equal("string", l->type.name);
-    assert_non_null(l->exts);
-    assert_non_null(l->iffeatures);
     assert_non_null(l->musts);
-    assert_string_equal("test", l->ref);
-    assert_non_null(l->when);
-    assert_null(l->parent);
-    assert_null(l->next);
-    assert_int_equal(LYS_CONFIG_R | LYS_STATUS_CURR, l->flags);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)l); l = NULL;
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)l); l = NULL;
 
     /* full content - now with mandatory */
     in.current = "l {mandatory true; type string;} ...";
-    assert_int_equal(LY_SUCCESS, parse_leaf(ctx, &in, NULL, (struct lysp_node **)&l));
-    assert_non_null(l);
-    assert_int_equal(LYS_LEAF, l->nodetype);
-    assert_string_equal("l", l->name);
+    assert_int_equal(LY_SUCCESS, parse_leaf(YCTX, &in, NULL, (struct lysp_node **)&l));
+    CHECK_LYSP_NODE(l, NULL, 0, LYS_MAND_TRUE, 0, "l", 0, LYS_LEAF, 0, NULL, 0);
     assert_string_equal("string", l->type.name);
-    assert_int_equal(LYS_MAND_TRUE, l->flags);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)l); l = NULL;
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)l); l = NULL;
 
     /* invalid */
     in.current = " l {description \"missing type\";} ...";
-    assert_int_equal(LY_EVALID, parse_leaf(ctx, &in, NULL, (struct lysp_node **)&l));
-    logbuf_assert("Missing mandatory keyword \"type\" as a child of \"leaf\". Line number 1.");
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)l); l = NULL;
+    assert_int_equal(LY_EVALID, parse_leaf(YCTX, &in, NULL, (struct lysp_node **)&l));
+    CHECK_LOG_CTX("Missing mandatory keyword \"type\" as a child of \"leaf\".", "Line number 1.");
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)l); l = NULL;
 }
 
 static void
 test_leaflist(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_node_leaflist *ll = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "ll {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_leaflist(ctx, &in, NULL, (struct lysp_node**)&ll)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node*)ll); ll = NULL;
+    assert_int_equal(LY_EVALID, parse_leaflist(YCTX, &in, NULL, (struct lysp_node**)&ll)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node*)ll); ll = NULL;
 
     TEST_DUP("config", "true", "false");
     TEST_DUP("description", "text1", "text2");
@@ -1409,11 +1071,8 @@
     in.current = "ll {config false;default \"xxx\"; default \"yyy\";description test;if-feature f;"
             "max-elements 10;must 'expr';ordered-by user;reference test;"
             "status current;type string; units zzz;when true;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_leaflist(ctx, &in, NULL, (struct lysp_node **)&ll));
-    assert_non_null(ll);
-    assert_int_equal(LYS_LEAFLIST, ll->nodetype);
-    assert_string_equal("ll", ll->name);
-    assert_string_equal("test", ll->dsc);
+    assert_int_equal(LY_SUCCESS, parse_leaflist(YCTX, &in, NULL, (struct lysp_node **)&ll));
+    CHECK_LYSP_NODE(ll, "test", 1, 0x446, 1, "ll", 0, LYS_LEAFLIST, 0, "test", 1);
     assert_non_null(ll->dflts);
     assert_int_equal(2, LY_ARRAY_COUNT(ll->dflts));
     assert_string_equal("xxx", ll->dflts[0].str);
@@ -1422,56 +1081,47 @@
     assert_int_equal(10, ll->max);
     assert_int_equal(0, ll->min);
     assert_string_equal("string", ll->type.name);
-    assert_non_null(ll->exts);
-    assert_non_null(ll->iffeatures);
     assert_non_null(ll->musts);
-    assert_string_equal("test", ll->ref);
-    assert_non_null(ll->when);
-    assert_null(ll->parent);
-    assert_null(ll->next);
     assert_int_equal(LYS_CONFIG_R | LYS_STATUS_CURR | LYS_ORDBY_USER | LYS_SET_MAX, ll->flags);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)ll); ll = NULL;
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)ll); ll = NULL;
 
     /* full content - now with min-elements */
     in.current = "ll {min-elements 10; type string;} ...";
-    assert_int_equal(LY_SUCCESS, parse_leaflist(ctx, &in, NULL, (struct lysp_node **)&ll));
-    assert_non_null(ll);
-    assert_int_equal(LYS_LEAFLIST, ll->nodetype);
-    assert_string_equal("ll", ll->name);
+    assert_int_equal(LY_SUCCESS, parse_leaflist(YCTX, &in, NULL, (struct lysp_node **)&ll));
+    CHECK_LYSP_NODE(ll, NULL, 0, 0x200, 0, "ll", 0, LYS_LEAFLIST, 0, NULL, 0);
     assert_string_equal("string", ll->type.name);
     assert_int_equal(0, ll->max);
     assert_int_equal(10, ll->min);
     assert_int_equal(LYS_SET_MIN, ll->flags);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)ll); ll = NULL;
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)ll); ll = NULL;
 
     /* invalid */
     in.current = " ll {description \"missing type\";} ...";
-    assert_int_equal(LY_EVALID, parse_leaflist(ctx, &in, NULL, (struct lysp_node **)&ll));
-    logbuf_assert("Missing mandatory keyword \"type\" as a child of \"leaf-list\". Line number 1.");
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)ll); ll = NULL;
+    assert_int_equal(LY_EVALID, parse_leaflist(YCTX, &in, NULL, (struct lysp_node **)&ll));
+    CHECK_LOG_CTX("Missing mandatory keyword \"type\" as a child of \"leaf-list\".", "Line number 1.");
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)ll); ll = NULL;
 
-    ctx->parsed_mod->version = 1; /* simulate YANG 1.0 - default statement is not allowed */
+    YCTX->parsed_mod->version = 1; /* simulate YANG 1.0 - default statement is not allowed */
     in.current = " ll {default xx; type string;} ...";
-    assert_int_equal(LY_EVALID, parse_leaflist(ctx, &in, NULL, (struct lysp_node **)&ll));
-    logbuf_assert("Invalid keyword \"default\" as a child of \"leaf-list\" - the statement is allowed only in YANG 1.1 modules. Line number 1.");
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)ll); ll = NULL;
+    assert_int_equal(LY_EVALID, parse_leaflist(YCTX, &in, NULL, (struct lysp_node **)&ll));
+    CHECK_LOG_CTX("Invalid keyword \"default\" as a child of \"leaf-list\" - the statement is allowed only in YANG 1.1 modules.", "Line number 1.");
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)ll); ll = NULL;
 }
 
 static void
 test_list(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_node_list *l = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "l {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_list(ctx, &in, NULL, (struct lysp_node**)&l)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node*)l); l = NULL;
+    assert_int_equal(LY_EVALID, parse_list(YCTX, &in, NULL, (struct lysp_node**)&l)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node*)l); l = NULL;
 
     TEST_DUP("config", "true", "false");
     TEST_DUP("description", "text1", "text2");
@@ -1488,11 +1138,9 @@
     in.current = "l {action x;anydata any;anyxml anyxml; choice ch;config false;container c;description test;grouping g;if-feature f; key l; leaf l {type string;}"
             "leaf-list ll {type string;} list li;max-elements 10; min-elements 1;must 'expr';notification not; ordered-by system; reference test;"
             "status current;typedef t {type int8;}unique xxx;unique yyy;uses g;when true;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_list(ctx, &in, NULL, (struct lysp_node **)&l));
-    assert_non_null(l);
-    assert_int_equal(LYS_LIST, l->nodetype);
-    assert_string_equal("l", l->name);
-    assert_string_equal("test", l->dsc);
+    assert_int_equal(LY_SUCCESS, parse_list(YCTX, &in, NULL, (struct lysp_node **)&l));
+    CHECK_LYSP_NODE(l, "test", 1, LYS_CONFIG_R | LYS_STATUS_CURR | LYS_ORDBY_SYSTEM | LYS_SET_MAX | LYS_SET_MIN, 1, "l",
+            0, LYS_LIST, 0, "test", 1);
     assert_string_equal("l", l->key);
     assert_non_null(l->uniques);
     assert_int_equal(2, LY_ARRAY_COUNT(l->uniques));
@@ -1500,40 +1148,32 @@
     assert_string_equal("yyy", l->uniques[1].str);
     assert_int_equal(10, l->max);
     assert_int_equal(1, l->min);
-    assert_non_null(l->exts);
-    assert_non_null(l->iffeatures);
     assert_non_null(l->musts);
-    assert_string_equal("test", l->ref);
-    assert_non_null(l->when);
-    assert_null(l->parent);
-    assert_null(l->next);
-    assert_int_equal(LYS_CONFIG_R | LYS_STATUS_CURR | LYS_ORDBY_SYSTEM | LYS_SET_MAX | LYS_SET_MIN, l->flags);
-    ly_set_erase(&ctx->tpdfs_nodes, NULL);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)l); l = NULL;
+    ly_set_erase(&YCTX->tpdfs_nodes, NULL);
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)l); l = NULL;
 
     /* invalid content */
-    ctx->parsed_mod->version = 1; /* simulate YANG 1.0 */
+    YCTX->parsed_mod->version = 1; /* simulate YANG 1.0 */
     in.current = "l {action x;} ...";
-    assert_int_equal(LY_EVALID, parse_list(ctx, &in, NULL, (struct lysp_node **)&l));
-    logbuf_assert("Invalid keyword \"action\" as a child of \"list\" - the statement is allowed only in YANG 1.1 modules. Line number 1.");
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)l); l = NULL;
+    assert_int_equal(LY_EVALID, parse_list(YCTX, &in, NULL, (struct lysp_node **)&l));
+    CHECK_LOG_CTX("Invalid keyword \"action\" as a child of \"list\" - the statement is allowed only in YANG 1.1 modules.", "Line number 1.");
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)l); l = NULL;
 }
 
 static void
 test_choice(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_node_choice *ch = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "ch {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_choice(ctx, &in, NULL, (struct lysp_node**)&ch)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node*)ch); ch = NULL;
+    assert_int_equal(LY_EVALID, parse_choice(YCTX, &in, NULL, (struct lysp_node**)&ch)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node*)ch); ch = NULL;
 
     TEST_DUP("config", "true", "false");
     TEST_DUP("default", "a", "b");
@@ -1547,46 +1187,32 @@
     /* full content - without default due to a collision with mandatory */
     in.current = "ch {anydata any;anyxml anyxml; case c;choice ch;config false;container c;description test;if-feature f;leaf l {type string;}"
             "leaf-list ll {type string;} list li;mandatory true;reference test;status current;when true;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_choice(ctx, &in, NULL, (struct lysp_node **)&ch));
-    assert_non_null(ch);
-    assert_int_equal(LYS_CHOICE, ch->nodetype);
-    assert_string_equal("ch", ch->name);
-    assert_string_equal("test", ch->dsc);
-    assert_non_null(ch->exts);
-    assert_non_null(ch->iffeatures);
-    assert_string_equal("test", ch->ref);
-    assert_non_null(ch->when);
-    assert_null(ch->parent);
-    assert_null(ch->next);
-    assert_int_equal(LYS_CONFIG_R | LYS_STATUS_CURR | LYS_MAND_TRUE, ch->flags);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)ch); ch = NULL;
+    assert_int_equal(LY_SUCCESS, parse_choice(YCTX, &in, NULL, (struct lysp_node **)&ch));
+    CHECK_LYSP_NODE(ch, "test", 1, LYS_CONFIG_R | LYS_STATUS_CURR | LYS_MAND_TRUE, 1, "ch", 0, LYS_CHOICE, 0, "test", 1);
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)ch); ch = NULL;
 
     /* full content - the default missing from the previous node */
     in.current = "ch {default c;case c;} ...";
-    assert_int_equal(LY_SUCCESS, parse_choice(ctx, &in, NULL, (struct lysp_node **)&ch));
-    assert_non_null(ch);
-    assert_int_equal(LYS_CHOICE, ch->nodetype);
-    assert_string_equal("ch", ch->name);
+    assert_int_equal(LY_SUCCESS, parse_choice(YCTX, &in, NULL, (struct lysp_node **)&ch));
+    CHECK_LYSP_NODE(ch, NULL, 0, 0, 0, "ch", 0, LYS_CHOICE, 0, NULL, 0);
     assert_string_equal("c", ch->dflt.str);
-    assert_int_equal(0, ch->flags);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)ch); ch = NULL;
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)ch); ch = NULL;
 }
 
 static void
 test_case(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_node_case *cs = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "cs {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_case(ctx, &in, NULL, (struct lysp_node**)&cs)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node*)cs); cs = NULL;
+    assert_int_equal(LY_EVALID, parse_case(YCTX, &in, NULL, (struct lysp_node**)&cs)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node*)cs); cs = NULL;
 
     TEST_DUP("description", "text1", "text2");
     TEST_DUP("reference", "1", "2");
@@ -1597,46 +1223,35 @@
     /* full content */
     in.current = "cs {anydata any;anyxml anyxml; choice ch;container c;description test;if-feature f;leaf l {type string;}"
             "leaf-list ll {type string;} list li;reference test;status current;uses grp;when true;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_case(ctx, &in, NULL, (struct lysp_node **)&cs));
-    assert_non_null(cs);
-    assert_int_equal(LYS_CASE, cs->nodetype);
-    assert_string_equal("cs", cs->name);
-    assert_string_equal("test", cs->dsc);
-    assert_non_null(cs->exts);
-    assert_non_null(cs->iffeatures);
-    assert_string_equal("test", cs->ref);
-    assert_non_null(cs->when);
-    assert_null(cs->parent);
-    assert_null(cs->next);
-    assert_int_equal(LYS_STATUS_CURR, cs->flags);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)cs); cs = NULL;
+    assert_int_equal(LY_SUCCESS, parse_case(YCTX, &in, NULL, (struct lysp_node **)&cs));
+    CHECK_LYSP_NODE(cs, "test", 1, LYS_STATUS_CURR, 1, "cs", 0, LYS_CASE, 0, "test", 1);
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)cs); cs = NULL;
 
     /* invalid content */
     in.current = "cs {config true} ...";
-    assert_int_equal(LY_EVALID, parse_case(ctx, &in, NULL, (struct lysp_node **)&cs));
-    logbuf_assert("Invalid keyword \"config\" as a child of \"case\". Line number 1.");
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)cs); cs = NULL;
+    assert_int_equal(LY_EVALID, parse_case(YCTX, &in, NULL, (struct lysp_node **)&cs));
+    CHECK_LOG_CTX("Invalid keyword \"config\" as a child of \"case\".", "Line number 1.");
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)cs); cs = NULL;
 }
 
 static void
 test_any(void **state, enum ly_stmt kw)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_node_anydata *any = NULL;
     struct ly_in in = {0};
 
     if (kw == LY_STMT_ANYDATA) {
-        ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+        YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
     } else {
-        ctx->parsed_mod->version = 1; /* simulate YANG 1.0 */
+        YCTX->parsed_mod->version = 1; /* simulate YANG 1.0 */
     }
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "l {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_any(ctx, &in, kw, NULL, (struct lysp_node**)&any)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node*)any); any = NULL;
+    assert_int_equal(LY_EVALID, parse_any(YCTX, &in, kw, NULL, (struct lysp_node**)&any)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node*)any); any = NULL;
 
     TEST_DUP("config", "true", "false");
     TEST_DUP("description", "text1", "text2");
@@ -1648,20 +1263,12 @@
 
     /* full content */
     in.current = "any {config true;description test;if-feature f;mandatory true;must 'expr';reference test;status current;when true;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_any(ctx, &in, kw, NULL, (struct lysp_node **)&any));
-    assert_non_null(any);
-    assert_int_equal(kw == LY_STMT_ANYDATA ? LYS_ANYDATA : LYS_ANYXML, any->nodetype);
-    assert_string_equal("any", any->name);
-    assert_string_equal("test", any->dsc);
-    assert_non_null(any->exts);
-    assert_non_null(any->iffeatures);
+    assert_int_equal(LY_SUCCESS, parse_any(YCTX, &in, kw, NULL, (struct lysp_node **)&any));
+    // CHECK_LYSP_NODE(NODE, DSC, EXTS, FLAGS, IFFEATURES, NAME, NEXT, TYPE, PARENT, REF, WHEN)
+    uint16_t node_type = kw == LY_STMT_ANYDATA ? LYS_ANYDATA : LYS_ANYXML;
+    CHECK_LYSP_NODE(any, "test", 1, LYS_CONFIG_W | LYS_STATUS_CURR | LYS_MAND_TRUE, 1, "any", 0, node_type, 0, "test", 1);
     assert_non_null(any->musts);
-    assert_string_equal("test", any->ref);
-    assert_non_null(any->when);
-    assert_null(any->parent);
-    assert_null(any->next);
-    assert_int_equal(LYS_CONFIG_W | LYS_STATUS_CURR | LYS_MAND_TRUE, any->flags);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)any); any = NULL;
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)any); any = NULL;
 }
 
 static void
@@ -1679,18 +1286,17 @@
 static void
 test_grouping(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_grp *grp = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "l {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_grouping(ctx, &in, NULL, &grp)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, grp, lysp_grp_free); grp = NULL;
+    assert_int_equal(LY_EVALID, parse_grouping(YCTX, &in, NULL, &grp)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, grp, lysp_grp_free); grp = NULL;
 
     TEST_DUP("description", "text1", "text2");
     TEST_DUP("reference", "1", "2");
@@ -1700,7 +1306,7 @@
     /* full content */
     in.current = "grp {action x;anydata any;anyxml anyxml; choice ch;container c;description test;grouping g;leaf l {type string;}"
             "leaf-list ll {type string;} list li;notification not;reference test;status current;typedef t {type int8;}uses g;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_grouping(ctx, &in, NULL, &grp));
+    assert_int_equal(LY_SUCCESS, parse_grouping(YCTX, &in, NULL, &grp));
     assert_non_null(grp);
     assert_int_equal(LYS_GROUPING, grp->nodetype);
     assert_string_equal("grp", grp->name);
@@ -1709,37 +1315,36 @@
     assert_string_equal("test", grp->ref);
     assert_null(grp->parent);
     assert_int_equal(LYS_STATUS_CURR, grp->flags);
-    ly_set_erase(&ctx->tpdfs_nodes, NULL);
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, grp, lysp_grp_free); grp = NULL;
+    ly_set_erase(&YCTX->tpdfs_nodes, NULL);
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, grp, lysp_grp_free); grp = NULL;
 
     /* invalid content */
     in.current = "grp {config true} ...";
-    assert_int_equal(LY_EVALID, parse_grouping(ctx, &in, NULL, &grp));
-    logbuf_assert("Invalid keyword \"config\" as a child of \"grouping\". Line number 1.");
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, grp, lysp_grp_free); grp = NULL;
+    assert_int_equal(LY_EVALID, parse_grouping(YCTX, &in, NULL, &grp));
+    CHECK_LOG_CTX("Invalid keyword \"config\" as a child of \"grouping\".", "Line number 1.");
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, grp, lysp_grp_free); grp = NULL;
 
     in.current = "grp {must 'expr'} ...";
-    assert_int_equal(LY_EVALID, parse_grouping(ctx, &in, NULL, &grp));
-    logbuf_assert("Invalid keyword \"must\" as a child of \"grouping\". Line number 1.");
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, grp, lysp_grp_free); grp = NULL;
+    assert_int_equal(LY_EVALID, parse_grouping(YCTX, &in, NULL, &grp));
+    CHECK_LOG_CTX("Invalid keyword \"must\" as a child of \"grouping\".", "Line number 1.");
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, grp, lysp_grp_free); grp = NULL;
 }
 
 static void
 test_action(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_action *rpcs = NULL;
     struct lysp_node_container *c = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "func {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_action(ctx, &in, NULL, &rpcs)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, rpcs, lysp_action_free); rpcs = NULL;
+    assert_int_equal(LY_EVALID, parse_action(YCTX, &in, NULL, &rpcs)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, rpcs, lysp_action_free); rpcs = NULL;
 
     TEST_DUP("description", "text1", "text2");
     TEST_DUP("input", "{leaf l1 {type empty;}} description a", "{leaf l2 {type empty;}} description a");
@@ -1750,13 +1355,13 @@
 
     /* full content */
     in.current = "top;";
-    assert_int_equal(LY_SUCCESS, parse_container(ctx, &in, NULL, (struct lysp_node **)&c));
+    assert_int_equal(LY_SUCCESS, parse_container(YCTX, &in, NULL, (struct lysp_node **)&c));
     in.current = "func {description test;grouping grp;if-feature f;reference test;status current;typedef mytype {type int8;} m:ext;"
             "input {anydata a1; anyxml a2; choice ch; container c; grouping grp; leaf l {type int8;} leaf-list ll {type int8;}"
             " list li; must 1; typedef mytypei {type int8;} uses grp; m:ext;}"
             "output {anydata a1; anyxml a2; choice ch; container c; grouping grp; leaf l {type int8;} leaf-list ll {type int8;}"
             " list li; must 1; typedef mytypeo {type int8;} uses grp; m:ext;}} ...";
-    assert_int_equal(LY_SUCCESS, parse_action(ctx, &in, (struct lysp_node *)c, &rpcs));
+    assert_int_equal(LY_SUCCESS, parse_action(YCTX, &in, (struct lysp_node *)c, &rpcs));
     assert_non_null(rpcs);
     assert_int_equal(LYS_ACTION, rpcs->nodetype);
     assert_string_equal("func", rpcs->name);
@@ -1782,34 +1387,33 @@
     assert_non_null(rpcs->output.typedefs);
     assert_non_null(rpcs->output.data);
 
-    ly_set_erase(&ctx->tpdfs_nodes, NULL);
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, rpcs, lysp_action_free); rpcs = NULL;
+    ly_set_erase(&YCTX->tpdfs_nodes, NULL);
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, rpcs, lysp_action_free); rpcs = NULL;
 
     /* invalid content */
     in.current = "func {config true} ...";
-    assert_int_equal(LY_EVALID, parse_action(ctx, &in, NULL, &rpcs));
-    logbuf_assert("Invalid keyword \"config\" as a child of \"rpc\". Line number 1.");
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, rpcs, lysp_action_free); rpcs = NULL;
+    assert_int_equal(LY_EVALID, parse_action(YCTX, &in, NULL, &rpcs));
+    CHECK_LOG_CTX("Invalid keyword \"config\" as a child of \"rpc\".", "Line number 1.");
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, rpcs, lysp_action_free); rpcs = NULL;
 
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)c);
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)c);
 }
 
 static void
 test_notification(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_notif *notifs = NULL;
     struct lysp_node_container *c = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "func {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_notif(ctx, &in, NULL, &notifs)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, notifs, lysp_notif_free); notifs = NULL;
+    assert_int_equal(LY_EVALID, parse_notif(YCTX, &in, NULL, &notifs)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, notifs, lysp_notif_free); notifs = NULL;
 
     TEST_DUP("description", "text1", "text2");
     TEST_DUP("reference", "1", "2");
@@ -1818,10 +1422,10 @@
 
     /* full content */
     in.current = "top;";
-    assert_int_equal(LY_SUCCESS, parse_container(ctx, &in, NULL, (struct lysp_node **)&c));
+    assert_int_equal(LY_SUCCESS, parse_container(YCTX, &in, NULL, (struct lysp_node **)&c));
     in.current = "ntf {anydata a1; anyxml a2; choice ch; container c; description test; grouping grp; if-feature f; leaf l {type int8;}"
             "leaf-list ll {type int8;} list li; must 1; reference test; status current; typedef mytype {type int8;} uses grp; m:ext;}";
-    assert_int_equal(LY_SUCCESS, parse_notif(ctx, &in, (struct lysp_node *)c, &notifs));
+    assert_int_equal(LY_SUCCESS, parse_notif(YCTX, &in, (struct lysp_node *)c, &notifs));
     assert_non_null(notifs);
     assert_int_equal(LYS_NOTIF, notifs->nodetype);
     assert_string_equal("ntf", notifs->name);
@@ -1835,33 +1439,32 @@
     assert_non_null(notifs->data);
     assert_int_equal(LYS_STATUS_CURR, notifs->flags);
 
-    ly_set_erase(&ctx->tpdfs_nodes, NULL);
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, notifs, lysp_notif_free); notifs = NULL;
+    ly_set_erase(&YCTX->tpdfs_nodes, NULL);
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, notifs, lysp_notif_free); notifs = NULL;
 
     /* invalid content */
     in.current = "ntf {config true} ...";
-    assert_int_equal(LY_EVALID, parse_notif(ctx, &in, NULL, &notifs));
-    logbuf_assert("Invalid keyword \"config\" as a child of \"notification\". Line number 1.");
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, notifs, lysp_notif_free); notifs = NULL;
+    assert_int_equal(LY_EVALID, parse_notif(YCTX, &in, NULL, &notifs));
+    CHECK_LOG_CTX("Invalid keyword \"config\" as a child of \"notification\".", "Line number 1.");
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, notifs, lysp_notif_free); notifs = NULL;
 
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)c);
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)c);
 }
 
 static void
 test_uses(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_node_uses *u = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "l {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_uses(ctx, &in, NULL, (struct lysp_node**)&u)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node*)u); u = NULL;
+    assert_int_equal(LY_EVALID, parse_uses(YCTX, &in, NULL, (struct lysp_node**)&u)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node*)u); u = NULL;
 
     TEST_DUP("description", "text1", "text2");
     TEST_DUP("reference", "1", "2");
@@ -1871,38 +1474,27 @@
 
     /* full content */
     in.current = "grpref {augment some/node;description test;if-feature f;reference test;refine some/other/node;status current;when true;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_uses(ctx, &in, NULL, (struct lysp_node **)&u));
-    assert_non_null(u);
-    assert_int_equal(LYS_USES, u->nodetype);
-    assert_string_equal("grpref", u->name);
-    assert_string_equal("test", u->dsc);
-    assert_non_null(u->exts);
-    assert_non_null(u->iffeatures);
-    assert_string_equal("test", u->ref);
+    assert_int_equal(LY_SUCCESS, parse_uses(YCTX, &in, NULL, (struct lysp_node **)&u));
+    CHECK_LYSP_NODE(u, "test", 1, LYS_STATUS_CURR, 1, "grpref", 0, LYS_USES, 0, "test", 1);
     assert_non_null(u->augments);
     assert_non_null(u->refines);
-    assert_non_null(u->when);
-    assert_null(u->parent);
-    assert_null(u->next);
-    assert_int_equal(LYS_STATUS_CURR, u->flags);
-    lysp_node_free(ctx->parsed_mod->mod->ctx, (struct lysp_node *)u); u = NULL;
+    lysp_node_free(YCTX->parsed_mod->mod->ctx, (struct lysp_node *)u); u = NULL;
 }
 
 static void
 test_augment(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_augment *a = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "l {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_augment(ctx, &in, NULL, &a)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, a, lysp_augment_free); a = NULL;
+    assert_int_equal(LY_EVALID, parse_augment(YCTX, &in, NULL, &a)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, a, lysp_augment_free); a = NULL;
 
     TEST_DUP("description", "text1", "text2");
     TEST_DUP("reference", "1", "2");
@@ -1913,7 +1505,7 @@
     /* full content */
     in.current = "/target/nodeid {action x; anydata any;anyxml anyxml; case cs; choice ch;container c;description test;if-feature f;leaf l {type string;}"
             "leaf-list ll {type string;} list li;notification not;reference test;status current;uses g;when true;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_augment(ctx, &in, NULL, &a));
+    assert_int_equal(LY_SUCCESS, parse_augment(YCTX, &in, NULL, &a));
     assert_non_null(a);
     assert_int_equal(LYS_AUGMENT, a->nodetype);
     assert_string_equal("/target/nodeid", a->nodeid);
@@ -1924,24 +1516,23 @@
     assert_non_null(a->when);
     assert_null(a->parent);
     assert_int_equal(LYS_STATUS_CURR, a->flags);
-    FREE_ARRAY(ctx->parsed_mod->mod->ctx, a, lysp_augment_free); a = NULL;
+    FREE_ARRAY(YCTX->parsed_mod->mod->ctx, a, lysp_augment_free); a = NULL;
 }
 
 static void
 test_when(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct lysp_when *w = NULL;
     struct ly_in in = {0};
 
-    ctx->parsed_mod->version = 2; /* simulate YANG 1.1 */
+    YCTX->parsed_mod->version = 2; /* simulate YANG 1.1 */
 
     /* invalid cardinality */
 #define TEST_DUP(MEMBER, VALUE1, VALUE2) \
     in.current = "l {" MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, parse_when(ctx, &in, &w)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number 1."); \
-    FREE_MEMBER(ctx->parsed_mod->mod->ctx, w, lysp_when_free); w = NULL;
+    assert_int_equal(LY_EVALID, parse_when(YCTX, &in, &w)); \
+    CHECK_LOG_CTX("Duplicate keyword \""MEMBER"\".", "Line number 1."); \
+    FREE_MEMBER(YCTX->parsed_mod->mod->ctx, w, lysp_when_free); w = NULL;
 
     TEST_DUP("description", "text1", "text2");
     TEST_DUP("reference", "1", "2");
@@ -1949,68 +1540,67 @@
 
     /* full content */
     in.current = "expression {description test;reference test;m:ext;} ...";
-    assert_int_equal(LY_SUCCESS, parse_when(ctx, &in, &w));
+    assert_int_equal(LY_SUCCESS, parse_when(YCTX, &in, &w));
     assert_non_null(w);
     assert_string_equal("expression", w->cond);
     assert_string_equal("test", w->dsc);
     assert_string_equal("test", w->ref);
     assert_non_null(w->exts);
-    FREE_MEMBER(ctx->parsed_mod->mod->ctx, w, lysp_when_free); w = NULL;
+    FREE_MEMBER(YCTX->parsed_mod->mod->ctx, w, lysp_when_free); w = NULL;
 
     /* empty condition */
     in.current = "\"\";";
-    assert_int_equal(LY_SUCCESS, parse_when(ctx, &in, &w));
-    logbuf_assert("Empty argument of when statement does not make sense.");
+    assert_int_equal(LY_SUCCESS, parse_when(YCTX, &in, &w));
+    CHECK_LOG_CTX("Empty argument of when statement does not make sense.", NULL);
     assert_non_null(w);
     assert_string_equal("", w->cond);
-    FREE_MEMBER(ctx->parsed_mod->mod->ctx, w, lysp_when_free); w = NULL;
+    FREE_MEMBER(YCTX->parsed_mod->mod->ctx, w, lysp_when_free); w = NULL;
 }
 
 static void
 test_value(void **state)
 {
-    struct lys_yang_parser_ctx *ctx = *state;
     struct ly_in in = {0};
     int64_t val = 0;
     uint16_t flags = 0;
 
     in.current = "-0;";
-    assert_int_equal(parse_type_enum_value_pos(ctx, &in, LY_STMT_VALUE, &val, &flags, NULL), LY_SUCCESS);
+    assert_int_equal(parse_type_enum_value_pos(YCTX, &in, LY_STMT_VALUE, &val, &flags, NULL), LY_SUCCESS);
     assert_int_equal(val, 0);
 
     in.current = "-0;";
     flags = 0;
-    assert_int_equal(parse_type_enum_value_pos(ctx, &in, LY_STMT_POSITION, &val, &flags, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"-0\" of \"position\". Line number 1.");
+    assert_int_equal(parse_type_enum_value_pos(YCTX, &in, LY_STMT_POSITION, &val, &flags, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"-0\" of \"position\".", "Line number 1.");
 }
 
 int
 main(void)
 {
     const struct CMUnitTest tests[] = {
-        cmocka_unit_test_setup_teardown(test_helpers, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_comments, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_arg, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_stmts, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_minmax, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_module, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_deviation, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_deviate, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_container, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_leaf, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_leaflist, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_list, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_choice, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_case, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_anydata, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_anyxml, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_action, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_notification, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_grouping, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_uses, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_augment, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_when, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_value, setup_f, teardown_f),
+        UTEST(test_helpers, setup, teardown),
+        UTEST(test_comments, setup, teardown),
+        UTEST(test_arg, setup, teardown),
+        UTEST(test_stmts, setup, teardown),
+        UTEST(test_minmax, setup, teardown),
+        UTEST(test_module, setup, teardown),
+        UTEST(test_deviation, setup, teardown),
+        UTEST(test_deviate, setup, teardown),
+        UTEST(test_container, setup, teardown),
+        UTEST(test_leaf, setup, teardown),
+        UTEST(test_leaflist, setup, teardown),
+        UTEST(test_list, setup, teardown),
+        UTEST(test_choice, setup, teardown),
+        UTEST(test_case, setup, teardown),
+        UTEST(test_anydata, setup, teardown),
+        UTEST(test_anyxml, setup, teardown),
+        UTEST(test_action, setup, teardown),
+        UTEST(test_notification, setup, teardown),
+        UTEST(test_grouping, setup, teardown),
+        UTEST(test_uses, setup, teardown),
+        UTEST(test_augment, setup, teardown),
+        UTEST(test_when, setup, teardown),
+        UTEST(test_value, setup, teardown),
     };
 
     return cmocka_run_group_tests(tests, NULL, NULL);
diff --git a/tests/utests/schema/test_parser_yin.c b/tests/utests/schema/test_parser_yin.c
index fe33de4..5adcf3a 100644
--- a/tests/utests/schema/test_parser_yin.c
+++ b/tests/utests/schema/test_parser_yin.c
@@ -3,7 +3,7 @@
  * @author David Sedlák <xsedla1d@stud.fit.vutbr.cz>
  * @brief unit tests for functions from parser_yin.c
  *
- * Copyright (c) 2015 - 2019 CESNET, z.s.p.o.
+ * Copyright (c) 2015 - 2020 CESNET, z.s.p.o.
  *
  * This source code is licensed under BSD 3-Clause License (the "License").
  * You may not use this file except in compliance with the License.
@@ -11,6 +11,8 @@
  *
  *     https://opensource.org/licenses/BSD-3-Clause
  */
+#define _UTEST_MAIN_
+#include "utests.h"
 
 #include <stdbool.h>
 #include <stdio.h>
@@ -22,7 +24,6 @@
 #include "schema_compile.h"
 #include "tree_schema.h"
 #include "tree_schema_internal.h"
-#include "utests.h"
 #include "xml.h"
 #include "xpath.h"
 
@@ -122,251 +123,153 @@
 #define ELEMENT_WRAPPER_START "<status xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\">"
 #define ELEMENT_WRAPPER_END "</status>"
 
-struct test_parser_yin_state {
-    struct ly_ctx *ctx;
-    struct lys_yin_parser_ctx *yin_ctx;
-    struct ly_in *in;
-    bool finished_correctly;
-};
+#define TEST_1_CHECK_LYSP_EXT_INSTANCE(NODE, INSUBSTMT)\
+    CHECK_LYSP_EXT_INSTANCE((NODE), NULL, 1, NULL, INSUBSTMT, 0, "urn:example:extensions:c-define", 0, 0x2, 0x1)
 
-#define BUFSIZE 1024
-char logbuf[BUFSIZE] = {0};
-int store = -1; /* negative for infinite logging, positive for limited logging */
-
-/* set to 0 to printing error messages to stderr instead of checking them in code */
-#define ENABLE_LOGGER_CHECKING 1
-
-#if ENABLE_LOGGER_CHECKING
-static void
-logger(LY_LOG_LEVEL level, const char *msg, const char *path)
-{
-    (void) level; /* unused */
-    if (store) {
-        if (path && path[0]) {
-            snprintf(logbuf, BUFSIZE - 1, "%s %s", msg, path);
-        } else {
-            strncpy(logbuf, msg, BUFSIZE - 1);
-        }
-        if (store > 0) {
-            --store;
-        }
-    }
-}
-
-#endif
-
-#if ENABLE_LOGGER_CHECKING
-#   define logbuf_assert(str) assert_string_equal(logbuf, str)
-#else
-#   define logbuf_assert(str)
-#endif
-
-#define TEST_DUP_GENERIC(PREFIX, MEMBER, VALUE1, VALUE2, FUNC, RESULT, LINE, CLEANUP) \
-    str = PREFIX MEMBER" "VALUE1";"MEMBER" "VALUE2";} ..."; \
-    assert_int_equal(LY_EVALID, FUNC(&ctx, &str, RESULT)); \
-    logbuf_assert("Duplicate keyword \""MEMBER"\". Line number "LINE"."); \
-    CLEANUP
-
-int
-setup_ly_ctx(void **state)
-{
-    struct test_parser_yin_state *st = NULL;
-
-    /* allocate state variable */
-    (*state) = st = calloc(1, sizeof(*st));
-    if (!st) {
-        fprintf(stderr, "Memmory allocation failed");
-        return EXIT_FAILURE;
-    }
-
-    /* create new libyang context */
-    ly_ctx_new(NULL, 0, &st->ctx);
-
-    return EXIT_SUCCESS;
-}
-
-int
-destroy_ly_ctx(void **state)
-{
-    struct test_parser_yin_state *st = *state;
-
-    ly_ctx_destroy(st->ctx, NULL);
-    free(st);
-
-    return EXIT_SUCCESS;
-}
+struct lys_yin_parser_ctx *YCTX;
 
 static int
-setup_f(void **state)
+setup_ctx(void **state)
 {
-    struct test_parser_yin_state *st = *state;
-
-#if ENABLE_LOGGER_CHECKING
-    /* setup logger */
-    ly_set_log_clb(logger, 1);
-#endif
-
     /* allocate parser context */
-    st->yin_ctx = calloc(1, sizeof(*st->yin_ctx));
-    st->yin_ctx->format = LYS_IN_YIN;
+    YCTX = calloc(1, sizeof(*YCTX));
+    YCTX->format = LYS_IN_YIN;
 
     /* allocate new parsed module */
-    st->yin_ctx->parsed_mod = calloc(1, sizeof *st->yin_ctx->parsed_mod);
+    YCTX->parsed_mod = calloc(1, sizeof *YCTX->parsed_mod);
 
     /* allocate new module */
-    st->yin_ctx->parsed_mod->mod = calloc(1, sizeof *st->yin_ctx->parsed_mod->mod);
-    st->yin_ctx->parsed_mod->mod->ctx = st->ctx;
-    st->yin_ctx->parsed_mod->mod->parsed = st->yin_ctx->parsed_mod;
+    YCTX->parsed_mod->mod = calloc(1, sizeof *YCTX->parsed_mod->mod);
+    YCTX->parsed_mod->mod->ctx = UTEST_LYCTX;
+    YCTX->parsed_mod->mod->parsed = YCTX->parsed_mod;
 
-    st->in = NULL;
-
-    return EXIT_SUCCESS;
+    return 0;
 }
 
 static int
-teardown_f(void **state)
+setup(void **state)
 {
-    struct test_parser_yin_state *st = *(struct test_parser_yin_state **)state;
+    UTEST_SETUP;
 
-#if ENABLE_LOGGER_CHECKING
-    /* teardown logger */
-    if (!st->finished_correctly && (logbuf[0] != '\0')) {
-        fprintf(stderr, "%s\n", logbuf);
-    }
-#endif
+    setup_ctx(state);
 
-    lyxml_ctx_free(st->yin_ctx->xmlctx);
-    lys_module_free(st->yin_ctx->parsed_mod->mod, NULL);
-    free(st->yin_ctx);
-    ly_in_free(st->in, 0);
-
-    return EXIT_SUCCESS;
-}
-
-static struct test_parser_yin_state *
-reset_state(void **state)
-{
-    ((struct test_parser_yin_state *)*state)->finished_correctly = true;
-    logbuf[0] = '\0';
-    teardown_f(state);
-    setup_f(state);
-
-    return *state;
-}
-
-void
-logbuf_clean(void)
-{
-    logbuf[0] = '\0';
+    return 0;
 }
 
 static int
-setup_element_test(void **state)
+teardown_ctx(void **UNUSED(state))
 {
-    struct test_parser_yin_state *st;
+    lyxml_ctx_free(YCTX->xmlctx);
+    lys_module_free(YCTX->parsed_mod->mod, NULL);
+    free(YCTX);
+    YCTX = NULL;
 
-    setup_f(state);
-    st = *state;
-
-    lydict_insert(st->ctx, "module-name", 0, &st->yin_ctx->parsed_mod->mod->name);
-
-    return EXIT_SUCCESS;
+    return 0;
 }
 
+static int
+teardown(void **state)
+{
+    teardown_ctx(state);
+
+    UTEST_TEARDOWN;
+
+    return 0;
+}
+
+#define RESET_STATE \
+    ly_in_free(UTEST_IN, 0); \
+    UTEST_IN = NULL; \
+    teardown_ctx(state); \
+    setup_ctx(state)
+
 static void
 test_yin_match_keyword(void **state)
 {
-    struct test_parser_yin_state *st = *state;
-
     const char *prefix;
     size_t prefix_len;
+
     /* create mock yin namespace in xml context */
-    const char *data = "<module xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\" />";
+    ly_in_new_memory("<module xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\" />", &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
+    prefix = YCTX->xmlctx->prefix;
+    prefix_len = YCTX->xmlctx->prefix_len;
 
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
-    prefix = st->yin_ctx->xmlctx->prefix;
-    prefix_len = st->yin_ctx->xmlctx->prefix_len;
-
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "anydatax", strlen("anydatax"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_NONE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "asdasd", strlen("asdasd"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_NONE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "", 0, prefix, prefix_len, LY_STMT_NONE), LY_STMT_NONE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "anydata", strlen("anydata"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ANYDATA);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "anyxml", strlen("anyxml"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ANYXML);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "argument", strlen("argument"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ARGUMENT);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "augment", strlen("augment"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_AUGMENT);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "base", strlen("base"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_BASE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "belongs-to", strlen("belongs-to"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_BELONGS_TO);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "bit", strlen("bit"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_BIT);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "case", strlen("case"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_CASE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "choice", strlen("choice"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_CHOICE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "config", strlen("config"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_CONFIG);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "contact", strlen("contact"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_CONTACT);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "container", strlen("container"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_CONTAINER);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "default", strlen("default"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_DEFAULT);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "description", strlen("description"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_DESCRIPTION);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "deviate", strlen("deviate"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_DEVIATE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "deviation", strlen("deviation"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_DEVIATION);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "enum", strlen("enum"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ENUM);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "error-app-tag", strlen("error-app-tag"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ERROR_APP_TAG);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "error-message", strlen("error-message"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ERROR_MESSAGE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "extension", strlen("extension"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_EXTENSION);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "feature", strlen("feature"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_FEATURE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "fraction-digits", strlen("fraction-digits"), prefix,  prefix_len, LY_STMT_NONE), LY_STMT_FRACTION_DIGITS);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "grouping", strlen("grouping"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_GROUPING);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "identity", strlen("identity"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_IDENTITY);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "if-feature", strlen("if-feature"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_IF_FEATURE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "import", strlen("import"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_IMPORT);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "include", strlen("include"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_INCLUDE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "input", strlen("input"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_INPUT);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "key", strlen("key"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_KEY);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "leaf", strlen("leaf"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_LEAF);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "leaf-list", strlen("leaf-list"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_LEAF_LIST);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "length", strlen("length"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_LENGTH);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "list", strlen("list"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_LIST);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "mandatory", strlen("mandatory"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MANDATORY);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "max-elements", strlen("max-elements"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MAX_ELEMENTS);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "min-elements", strlen("min-elements"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MIN_ELEMENTS);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "modifier", strlen("modifier"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MODIFIER);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "module", strlen("module"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MODULE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "must", strlen("must"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MUST);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "namespace", strlen("namespace"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_NAMESPACE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "notification", strlen("notification"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_NOTIFICATION);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "ordered-by", strlen("ordered-by"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ORDERED_BY);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "organization", strlen("organization"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ORGANIZATION);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "output", strlen("output"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_OUTPUT);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "path", strlen("path"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_PATH);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "pattern", strlen("pattern"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_PATTERN);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "position", strlen("position"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_POSITION);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "prefix", strlen("prefix"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_PREFIX);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "presence", strlen("presence"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_PRESENCE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "range", strlen("range"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_RANGE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "reference", strlen("reference"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_REFERENCE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "refine", strlen("refine"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_REFINE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "require-instance", strlen("require-instance"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_REQUIRE_INSTANCE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "revision", strlen("revision"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_REVISION);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "revision-date", strlen("revision-date"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_REVISION_DATE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "rpc", strlen("rpc"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_RPC);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "status", strlen("status"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_STATUS);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "submodule", strlen("submodule"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_SUBMODULE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "type", strlen("type"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_TYPE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "typedef", strlen("typedef"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_TYPEDEF);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "unique", strlen("unique"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_UNIQUE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "units", strlen("units"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_UNITS);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "uses", strlen("uses"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_USES);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "value", strlen("value"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_VALUE);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "when", strlen("when"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_WHEN);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "yang-version", strlen("yang-version"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_YANG_VERSION);
-    assert_int_equal(yin_match_keyword(st->yin_ctx, "yin-element", strlen("yin-element"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_YIN_ELEMENT);
-
-    st->finished_correctly = true;
+    assert_int_equal(yin_match_keyword(YCTX, "anydatax", strlen("anydatax"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_NONE);
+    assert_int_equal(yin_match_keyword(YCTX, "asdasd", strlen("asdasd"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_NONE);
+    assert_int_equal(yin_match_keyword(YCTX, "", 0, prefix, prefix_len, LY_STMT_NONE), LY_STMT_NONE);
+    assert_int_equal(yin_match_keyword(YCTX, "anydata", strlen("anydata"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ANYDATA);
+    assert_int_equal(yin_match_keyword(YCTX, "anyxml", strlen("anyxml"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ANYXML);
+    assert_int_equal(yin_match_keyword(YCTX, "argument", strlen("argument"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ARGUMENT);
+    assert_int_equal(yin_match_keyword(YCTX, "augment", strlen("augment"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_AUGMENT);
+    assert_int_equal(yin_match_keyword(YCTX, "base", strlen("base"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_BASE);
+    assert_int_equal(yin_match_keyword(YCTX, "belongs-to", strlen("belongs-to"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_BELONGS_TO);
+    assert_int_equal(yin_match_keyword(YCTX, "bit", strlen("bit"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_BIT);
+    assert_int_equal(yin_match_keyword(YCTX, "case", strlen("case"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_CASE);
+    assert_int_equal(yin_match_keyword(YCTX, "choice", strlen("choice"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_CHOICE);
+    assert_int_equal(yin_match_keyword(YCTX, "config", strlen("config"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_CONFIG);
+    assert_int_equal(yin_match_keyword(YCTX, "contact", strlen("contact"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_CONTACT);
+    assert_int_equal(yin_match_keyword(YCTX, "container", strlen("container"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_CONTAINER);
+    assert_int_equal(yin_match_keyword(YCTX, "default", strlen("default"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_DEFAULT);
+    assert_int_equal(yin_match_keyword(YCTX, "description", strlen("description"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_DESCRIPTION);
+    assert_int_equal(yin_match_keyword(YCTX, "deviate", strlen("deviate"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_DEVIATE);
+    assert_int_equal(yin_match_keyword(YCTX, "deviation", strlen("deviation"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_DEVIATION);
+    assert_int_equal(yin_match_keyword(YCTX, "enum", strlen("enum"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ENUM);
+    assert_int_equal(yin_match_keyword(YCTX, "error-app-tag", strlen("error-app-tag"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ERROR_APP_TAG);
+    assert_int_equal(yin_match_keyword(YCTX, "error-message", strlen("error-message"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ERROR_MESSAGE);
+    assert_int_equal(yin_match_keyword(YCTX, "extension", strlen("extension"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_EXTENSION);
+    assert_int_equal(yin_match_keyword(YCTX, "feature", strlen("feature"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_FEATURE);
+    assert_int_equal(yin_match_keyword(YCTX, "fraction-digits", strlen("fraction-digits"), prefix,  prefix_len, LY_STMT_NONE), LY_STMT_FRACTION_DIGITS);
+    assert_int_equal(yin_match_keyword(YCTX, "grouping", strlen("grouping"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_GROUPING);
+    assert_int_equal(yin_match_keyword(YCTX, "identity", strlen("identity"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_IDENTITY);
+    assert_int_equal(yin_match_keyword(YCTX, "if-feature", strlen("if-feature"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_IF_FEATURE);
+    assert_int_equal(yin_match_keyword(YCTX, "import", strlen("import"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_IMPORT);
+    assert_int_equal(yin_match_keyword(YCTX, "include", strlen("include"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_INCLUDE);
+    assert_int_equal(yin_match_keyword(YCTX, "input", strlen("input"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_INPUT);
+    assert_int_equal(yin_match_keyword(YCTX, "key", strlen("key"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_KEY);
+    assert_int_equal(yin_match_keyword(YCTX, "leaf", strlen("leaf"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_LEAF);
+    assert_int_equal(yin_match_keyword(YCTX, "leaf-list", strlen("leaf-list"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_LEAF_LIST);
+    assert_int_equal(yin_match_keyword(YCTX, "length", strlen("length"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_LENGTH);
+    assert_int_equal(yin_match_keyword(YCTX, "list", strlen("list"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_LIST);
+    assert_int_equal(yin_match_keyword(YCTX, "mandatory", strlen("mandatory"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MANDATORY);
+    assert_int_equal(yin_match_keyword(YCTX, "max-elements", strlen("max-elements"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MAX_ELEMENTS);
+    assert_int_equal(yin_match_keyword(YCTX, "min-elements", strlen("min-elements"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MIN_ELEMENTS);
+    assert_int_equal(yin_match_keyword(YCTX, "modifier", strlen("modifier"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MODIFIER);
+    assert_int_equal(yin_match_keyword(YCTX, "module", strlen("module"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MODULE);
+    assert_int_equal(yin_match_keyword(YCTX, "must", strlen("must"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_MUST);
+    assert_int_equal(yin_match_keyword(YCTX, "namespace", strlen("namespace"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_NAMESPACE);
+    assert_int_equal(yin_match_keyword(YCTX, "notification", strlen("notification"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_NOTIFICATION);
+    assert_int_equal(yin_match_keyword(YCTX, "ordered-by", strlen("ordered-by"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ORDERED_BY);
+    assert_int_equal(yin_match_keyword(YCTX, "organization", strlen("organization"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_ORGANIZATION);
+    assert_int_equal(yin_match_keyword(YCTX, "output", strlen("output"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_OUTPUT);
+    assert_int_equal(yin_match_keyword(YCTX, "path", strlen("path"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_PATH);
+    assert_int_equal(yin_match_keyword(YCTX, "pattern", strlen("pattern"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_PATTERN);
+    assert_int_equal(yin_match_keyword(YCTX, "position", strlen("position"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_POSITION);
+    assert_int_equal(yin_match_keyword(YCTX, "prefix", strlen("prefix"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_PREFIX);
+    assert_int_equal(yin_match_keyword(YCTX, "presence", strlen("presence"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_PRESENCE);
+    assert_int_equal(yin_match_keyword(YCTX, "range", strlen("range"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_RANGE);
+    assert_int_equal(yin_match_keyword(YCTX, "reference", strlen("reference"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_REFERENCE);
+    assert_int_equal(yin_match_keyword(YCTX, "refine", strlen("refine"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_REFINE);
+    assert_int_equal(yin_match_keyword(YCTX, "require-instance", strlen("require-instance"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_REQUIRE_INSTANCE);
+    assert_int_equal(yin_match_keyword(YCTX, "revision", strlen("revision"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_REVISION);
+    assert_int_equal(yin_match_keyword(YCTX, "revision-date", strlen("revision-date"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_REVISION_DATE);
+    assert_int_equal(yin_match_keyword(YCTX, "rpc", strlen("rpc"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_RPC);
+    assert_int_equal(yin_match_keyword(YCTX, "status", strlen("status"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_STATUS);
+    assert_int_equal(yin_match_keyword(YCTX, "submodule", strlen("submodule"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_SUBMODULE);
+    assert_int_equal(yin_match_keyword(YCTX, "type", strlen("type"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_TYPE);
+    assert_int_equal(yin_match_keyword(YCTX, "typedef", strlen("typedef"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_TYPEDEF);
+    assert_int_equal(yin_match_keyword(YCTX, "unique", strlen("unique"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_UNIQUE);
+    assert_int_equal(yin_match_keyword(YCTX, "units", strlen("units"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_UNITS);
+    assert_int_equal(yin_match_keyword(YCTX, "uses", strlen("uses"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_USES);
+    assert_int_equal(yin_match_keyword(YCTX, "value", strlen("value"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_VALUE);
+    assert_int_equal(yin_match_keyword(YCTX, "when", strlen("when"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_WHEN);
+    assert_int_equal(yin_match_keyword(YCTX, "yang-version", strlen("yang-version"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_YANG_VERSION);
+    assert_int_equal(yin_match_keyword(YCTX, "yin-element", strlen("yin-element"), prefix, prefix_len, LY_STMT_NONE), LY_STMT_YIN_ELEMENT);
 }
 
 static void
-test_yin_match_argument_name(void **state)
+test_yin_match_argument_name(void **UNUSED(state))
 {
-    (void)state; /* unused */
-
     assert_int_equal(yin_match_argument_name("", 5), YIN_ARG_UNKNOWN);
     assert_int_equal(yin_match_argument_name("qwertyasd", 5), YIN_ARG_UNKNOWN);
     assert_int_equal(yin_match_argument_name("conditionasd", 8), YIN_ARG_UNKNOWN);
@@ -384,95 +287,87 @@
 static void
 test_yin_parse_element_generic(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     struct lysp_ext_instance exts;
     LY_ERR ret;
+    const char *arg;
+    const char *stmt;
+    const char *data;
 
     memset(&exts, 0, sizeof(exts));
 
-    const char *data = "<myext:elem attr=\"value\" xmlns:myext=\"urn:example:extensions\">text_value</myext:elem>";
+    data = "<myext:elem attr=\"value\" xmlns:myext=\"urn:example:extensions\">text_value</myext:elem>";
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
 
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
-
-    ret = yin_parse_element_generic(st->yin_ctx, LY_STMT_EXTENSION_INSTANCE, &exts.child);
+    ret = yin_parse_element_generic(YCTX, LY_STMT_EXTENSION_INSTANCE, &exts.child);
     assert_int_equal(ret, LY_SUCCESS);
-    assert_int_equal(st->yin_ctx->xmlctx->status, LYXML_ELEM_CLOSE);
-    assert_string_equal(exts.child->stmt, "urn:example:extensions:elem");
-    assert_string_equal(exts.child->arg, "text_value");
-    assert_string_equal(exts.child->child->stmt, "attr");
-    assert_string_equal(exts.child->child->arg, "value");
-    assert_true(exts.child->child->flags & LYS_YIN_ATTR);
-    lysp_ext_instance_free(st->ctx, &exts);
-    st = reset_state(state);
+    assert_int_equal(YCTX->xmlctx->status, LYXML_ELEM_CLOSE);
+    stmt = "urn:example:extensions:elem";
+    arg = "text_value";
+    CHECK_LYSP_STMT(exts.child, arg, 1, 0, 0x45, 0, stmt);
+    stmt = "attr";
+    arg = "value";
+    CHECK_LYSP_STMT(exts.child->child, arg, 0, 0x400, 0, 0, stmt);
+    lysp_ext_instance_free(UTEST_LYCTX, &exts);
+    RESET_STATE;
 
     data = "<myext:elem xmlns:myext=\"urn:example:extensions\"></myext:elem>";
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
 
-    ret = yin_parse_element_generic(st->yin_ctx, LY_STMT_EXTENSION_INSTANCE, &exts.child);
+    ret = yin_parse_element_generic(YCTX, LY_STMT_EXTENSION_INSTANCE, &exts.child);
     assert_int_equal(ret, LY_SUCCESS);
-    assert_int_equal(st->yin_ctx->xmlctx->status, LYXML_ELEM_CLOSE);
-    assert_string_equal(exts.child->stmt, "urn:example:extensions:elem");
-    assert_null(exts.child->child);
-    assert_null(exts.child->arg);
-    lysp_ext_instance_free(st->ctx, &exts);
-
-    st->finished_correctly = true;
+    assert_int_equal(YCTX->xmlctx->status, LYXML_ELEM_CLOSE);
+    stmt = "urn:example:extensions:elem";
+    CHECK_LYSP_STMT(exts.child, NULL, 0, 0x0, 0x45, 0, stmt);
+    lysp_ext_instance_free(UTEST_LYCTX, &exts);
 }
 
 static void
 test_yin_parse_extension_instance(void **state)
 {
     LY_ERR ret;
-    struct test_parser_yin_state *st = *state;
     struct lysp_ext_instance *exts = NULL;
+    struct lysp_stmt *act_child;
     const char *data = "<myext:ext value1=\"test\" value=\"test2\" xmlns:myext=\"urn:example:extensions\"><myext:subelem>text</myext:subelem></myext:ext>";
+    const char *exts_name;
+    const char *stmt = "value1";
+    const char *arg = "test";
 
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
 
-    ret = yin_parse_extension_instance(st->yin_ctx, LYEXT_SUBSTMT_CONTACT, 0, &exts);
+    ret = yin_parse_extension_instance(YCTX, LYEXT_SUBSTMT_CONTACT, 0, &exts);
     assert_int_equal(ret, LY_SUCCESS);
-    assert_string_equal(exts->name, "urn:example:extensions:ext");
-    assert_int_equal(exts->insubstmt_index, 0);
-    assert_true(exts->insubstmt == LYEXT_SUBSTMT_CONTACT);
-    assert_true(exts->yin & LYS_YIN);
-    assert_string_equal(exts->child->stmt, "value1");
-    assert_string_equal(exts->child->arg, "test");
-    assert_null(exts->child->child);
-    assert_true(exts->child->flags & LYS_YIN_ATTR);
-    assert_string_equal(exts->child->next->stmt, "value");
-    assert_string_equal(exts->child->next->arg, "test2");
-    assert_null(exts->child->next->child);
-    assert_true(exts->child->next->flags & LYS_YIN_ATTR);
+    exts_name = "urn:example:extensions:ext";
+    CHECK_LYSP_EXT_INSTANCE(exts, NULL, 1, NULL,
+            LYEXT_SUBSTMT_CONTACT, 0, exts_name, 0, 0x2, LYS_YIN);
 
-    assert_string_equal(exts->child->next->next->stmt, "urn:example:extensions:subelem");
-    assert_string_equal(exts->child->next->next->arg, "text");
-    assert_null(exts->child->next->next->child);
-    assert_null(exts->child->next->next->next);
-    assert_false(exts->child->next->next->flags & LYS_YIN_ATTR);
-    lysp_ext_instance_free(st->ctx, exts);
+    CHECK_LYSP_STMT(exts->child, arg, 0, LYS_YIN_ATTR, 0, 1, stmt);
+    stmt = "value";
+    arg = "test2";
+    CHECK_LYSP_STMT(exts->child->next, arg, 0, LYS_YIN_ATTR, 0, 1, stmt);
+    stmt = "urn:example:extensions:subelem";
+    arg = "text";
+    CHECK_LYSP_STMT(exts->child->next->next, arg, 0, 0, 0x45, 0, stmt);
+    lysp_ext_instance_free(UTEST_LYCTX, exts);
     LY_ARRAY_FREE(exts);
     exts = NULL;
-    st = reset_state(state);
+    RESET_STATE;
 
     data = "<myext:extension-elem xmlns:myext=\"urn:example:extensions\" />";
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
 
-    ret = yin_parse_extension_instance(st->yin_ctx, LYEXT_SUBSTMT_CONTACT, 0, &exts);
+    ret = yin_parse_extension_instance(YCTX, LYEXT_SUBSTMT_CONTACT, 0, &exts);
     assert_int_equal(ret, LY_SUCCESS);
-    assert_string_equal(exts->name, "urn:example:extensions:extension-elem");
-    assert_null(exts->argument);
-    assert_null(exts->child);
-    assert_int_equal(exts->insubstmt, LYEXT_SUBSTMT_CONTACT);
-    assert_int_equal(exts->insubstmt_index, 0);
-    assert_true(exts->yin & LYS_YIN);
-    lysp_ext_instance_free(st->ctx, exts);
+    exts_name = "urn:example:extensions:extension-elem";
+    CHECK_LYSP_EXT_INSTANCE(exts, NULL, 0, NULL,
+            LYEXT_SUBSTMT_CONTACT, 0, exts_name, 0, 0x2, LYS_YIN);
+    lysp_ext_instance_free(UTEST_LYCTX, exts);
     LY_ARRAY_FREE(exts);
     exts = NULL;
-    st = reset_state(state);
+    RESET_STATE;
 
     data =
             "<myext:ext attr1=\"text1\" attr2=\"text2\" xmlns:myext=\"urn:example:extensions\">\n"
@@ -484,71 +379,65 @@
             "     </myext:ext-sub2>\n"
             "     <myext:ext-sub3 attr3=\"text3\"></myext:ext-sub3>\n"
             "</myext:ext>";
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
 
-    ret = yin_parse_extension_instance(st->yin_ctx, LYEXT_SUBSTMT_CONTACT, 0, &exts);
+    ret = yin_parse_extension_instance(YCTX, LYEXT_SUBSTMT_CONTACT, 0, &exts);
     assert_int_equal(ret, LY_SUCCESS);
 
-    assert_string_equal(exts->name, "urn:example:extensions:ext");
-    assert_null(exts->argument);
-    assert_int_equal(exts->insubstmt, LYEXT_SUBSTMT_CONTACT);
-    assert_int_equal(exts->insubstmt_index, 0);
-    assert_true(exts->yin & LYS_YIN);
-    assert_string_equal(exts->child->stmt, "attr1");
-    assert_string_equal(exts->child->arg, "text1");
-    assert_null(exts->child->child);
-    assert_true(exts->child->flags & LYS_YIN_ATTR);
+    exts_name = "urn:example:extensions:ext";
+    CHECK_LYSP_EXT_INSTANCE(exts, NULL, 1, NULL,
+            LYEXT_SUBSTMT_CONTACT, 0, exts_name, 0, 0x2, LYS_YIN);
 
-    assert_string_equal(exts->child->next->stmt, "attr2");
-    assert_string_equal(exts->child->next->arg, "text2");
-    assert_null(exts->child->next->child);
-    assert_true(exts->child->next->flags & LYS_YIN_ATTR);
+    stmt = "attr1";
+    arg = "text1";
+    act_child = exts->child;
+    CHECK_LYSP_STMT(act_child, arg, NULL, LYS_YIN_ATTR, 0x0, 1, stmt);
+    stmt = "attr2";
+    arg = "text2";
+    act_child = act_child->next;
+    CHECK_LYSP_STMT(act_child, arg, NULL, LYS_YIN_ATTR, 0x0, 1, stmt);
+    stmt = "urn:example:extensions:ext-sub1";
+    arg = NULL;
+    act_child = act_child->next;
+    CHECK_LYSP_STMT(act_child, arg, NULL, 0, 0x45, 1, stmt);
+    stmt = "urn:example:extensions:ext-sub2";
+    arg = NULL;
+    act_child = act_child->next;
+    CHECK_LYSP_STMT(act_child, arg, 1, 0, 0x45, 1, stmt);
 
-    assert_string_equal(exts->child->next->next->stmt, "urn:example:extensions:ext-sub1");
-    assert_null(exts->child->next->next->arg);
-    assert_null(exts->child->next->next->child);
-    assert_int_equal(exts->child->next->next->flags, 0);
+    stmt = "sattr1";
+    arg = "stext2";
+    act_child = act_child->child;
+    CHECK_LYSP_STMT(act_child, arg, NULL, LYS_YIN_ATTR, 0, 1, stmt);
+    stmt = "urn:example:extensions:ext-sub21";
+    arg = NULL;
+    act_child = act_child->next;
+    CHECK_LYSP_STMT(act_child, arg, 1, 0, 0x45, 0, stmt);
 
-    assert_string_equal(exts->child->next->next->next->stmt, "urn:example:extensions:ext-sub2");
-    assert_null(exts->child->next->next->next->arg);
-    assert_int_equal(exts->child->next->next->next->flags, 0);
-    assert_string_equal(exts->child->next->next->next->child->stmt, "sattr1");
-    assert_string_equal(exts->child->next->next->next->child->arg, "stext2");
-    assert_null(exts->child->next->next->next->child->child);
-    assert_true(exts->child->next->next->next->child->flags & LYS_YIN_ATTR);
+    stmt = "urn:example:extensions:ext-sub211";
+    arg = NULL;
+    act_child = act_child->child;
+    CHECK_LYSP_STMT(act_child, arg, 1, 0, 0x45, 0, stmt);
 
-    assert_string_equal(exts->child->next->next->next->child->next->stmt, "urn:example:extensions:ext-sub21");
-    assert_null(exts->child->next->next->next->child->next->arg);
-    assert_null(exts->child->next->next->next->child->next->next);
-    assert_int_equal(exts->child->next->next->next->child->next->flags, 0);
+    stmt = "sattr21";
+    arg = "text21";
+    act_child = act_child->child;
+    CHECK_LYSP_STMT(act_child, arg, 0, LYS_YIN_ATTR, 0, 0, stmt);
 
-    assert_string_equal(exts->child->next->next->next->child->next->child->stmt, "urn:example:extensions:ext-sub211");
-    assert_null(exts->child->next->next->next->child->next->child->arg);
-    assert_int_equal(exts->child->next->next->next->child->next->child->flags, 0);
-    assert_null(exts->child->next->next->next->child->next->child->next);
+    stmt = "urn:example:extensions:ext-sub3";
+    arg = NULL;
+    act_child = exts->child->next->next->next->next;
+    CHECK_LYSP_STMT(act_child, arg, 1, 0, 0x45, 0, stmt);
+    stmt = "attr3";
+    arg = "text3";
+    act_child = act_child->child;
+    CHECK_LYSP_STMT(act_child, arg, 0, LYS_YIN_ATTR, 0, 0, stmt);
 
-    assert_string_equal(exts->child->next->next->next->child->next->child->child->stmt, "sattr21");
-    assert_string_equal(exts->child->next->next->next->child->next->child->child->arg, "text21");
-    assert_null(exts->child->next->next->next->child->next->child->child->next);
-    assert_null(exts->child->next->next->next->child->next->child->child->child);
-    assert_true(exts->child->next->next->next->child->next->child->child->flags & LYS_YIN_ATTR);
-
-    assert_string_equal(exts->child->next->next->next->next->stmt, "urn:example:extensions:ext-sub3");
-    assert_null(exts->child->next->next->next->next->arg);
-    assert_null(exts->child->next->next->next->next->next);
-    assert_int_equal(exts->child->next->next->next->next->flags, 0);
-
-    assert_string_equal(exts->child->next->next->next->next->child->stmt, "attr3");
-    assert_string_equal(exts->child->next->next->next->next->child->arg, "text3");
-    assert_null(exts->child->next->next->next->next->child->next);
-    assert_null(exts->child->next->next->next->next->child->child);
-    assert_true(exts->child->next->next->next->next->child->flags & LYS_YIN_ATTR);
-
-    lysp_ext_instance_free(st->ctx, exts);
+    lysp_ext_instance_free(UTEST_LYCTX, exts);
     LY_ARRAY_FREE(exts);
     exts = NULL;
-    st = reset_state(state);
+    RESET_STATE;
 
     data =
             "<myext:extension-elem xmlns:myext=\"urn:example:extensions\" xmlns:yin=\"urn:ietf:params:xml:ns:yang:yin:1\">\n"
@@ -564,10 +453,10 @@
             "     <yin:description><yin:text>contact-val</yin:text></yin:description>\n"
             "     <yin:error-message><yin:value>err-msg</yin:value></yin:error-message>\n"
             "</myext:extension-elem>";
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
 
-    ret = yin_parse_extension_instance(st->yin_ctx, LYEXT_SUBSTMT_CONTACT, 0, &exts);
+    ret = yin_parse_extension_instance(YCTX, LYEXT_SUBSTMT_CONTACT, 0, &exts);
     assert_int_equal(ret, LY_SUCCESS);
     assert_string_equal(exts->child->arg, "act-name");
     assert_string_equal(exts->child->next->arg, "target");
@@ -579,18 +468,15 @@
     assert_string_equal(exts->child->next->next->next->next->next->next->next->arg, "data");
     assert_string_equal(exts->child->next->next->next->next->next->next->next->next->arg, "tag");
     assert_string_equal(exts->child->next->next->next->next->next->next->next->next->next->arg, "contact-val");
-    lysp_ext_instance_free(st->ctx, exts);
+    lysp_ext_instance_free(UTEST_LYCTX, exts);
     LY_ARRAY_FREE(exts);
     exts = NULL;
-    st = reset_state(state);
-
-    st->finished_correctly = true;
+    RESET_STATE;
 }
 
 static void
 test_yin_parse_content(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     LY_ERR ret = LY_SUCCESS;
     const char *data =
             "<prefix value=\"a_mod\" xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\">\n"
@@ -627,7 +513,7 @@
             "</prefix>";
     struct lysp_ext_instance *exts = NULL;
     const char **if_features = NULL;
-    const char *value, *err_msg, *app_tag, *units;
+    const char *value, *error_message, *app_tag, *units;
     struct lysp_qname def = {0};
     struct lysp_ext *ext_def = NULL;
     struct lysp_when *when_p = NULL;
@@ -635,18 +521,18 @@
     struct lysp_type req_type = {}, range_type = {}, len_type = {}, patter_type = {}, enum_type = {};
     uint16_t config = 0;
 
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
-    lyxml_ctx_next(st->yin_ctx->xmlctx);
-    lyxml_ctx_next(st->yin_ctx->xmlctx);
-    lyxml_ctx_next(st->yin_ctx->xmlctx);
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
+    lyxml_ctx_next(YCTX->xmlctx);
+    lyxml_ctx_next(YCTX->xmlctx);
+    lyxml_ctx_next(YCTX->xmlctx);
 
     struct yin_subelement subelems[17] = {
         {LY_STMT_CONFIG, &config, 0},
         {LY_STMT_DEFAULT, &def, YIN_SUBELEM_UNIQUE},
         {LY_STMT_ENUM, &enum_type, 0},
         {LY_STMT_ERROR_APP_TAG, &app_tag, YIN_SUBELEM_UNIQUE},
-        {LY_STMT_ERROR_MESSAGE, &err_msg, 0},
+        {LY_STMT_ERROR_MESSAGE, &error_message, 0},
         {LY_STMT_EXTENSION, &ext_def, 0},
         {LY_STMT_IF_FEATURE, &if_features, 0},
         {LY_STMT_LENGTH, &len_type, 0},
@@ -661,47 +547,49 @@
         {LY_STMT_ARG_TEXT, &value, 0}
     };
 
-    ret = yin_parse_content(st->yin_ctx, subelems, 17, LY_STMT_PREFIX, NULL, &exts);
+    ret = yin_parse_content(YCTX, subelems, 17, LY_STMT_PREFIX, NULL, &exts);
     assert_int_equal(ret, LY_SUCCESS);
     /* check parsed values */
     assert_string_equal(def.str, "default-value");
-    assert_string_equal(exts->name, "urn:example:extensions:custom");
-    assert_string_equal(exts->argument, "totally amazing extension");
+    const char *exts_name = "urn:example:extensions:custom";
+    const char *exts_arg = "totally amazing extension";
+
+    CHECK_LYSP_EXT_INSTANCE(exts, exts_arg, 0, NULL,
+            LYEXT_SUBSTMT_PREFIX, 0, exts_name, 0, 0x1, 0x1);
     assert_string_equal(value, "wsefsdf");
     assert_string_equal(units, "radians");
     assert_string_equal(when_p->cond, "condition...");
     assert_string_equal(when_p->dsc, "when_desc");
     assert_string_equal(when_p->ref, "when_ref");
     assert_int_equal(config, LYS_CONFIG_W);
-    assert_int_equal(pos_enum.value, 25);
-    assert_true(pos_enum.flags & LYS_SET_VALUE);
-    assert_int_equal(val_enum.value, -5);
-    assert_true(val_enum.flags & LYS_SET_VALUE);
+    CHECK_LYSP_TYPE_ENUM(&pos_enum, NULL, 0, LYS_SET_VALUE, 0, NULL, NULL, 25);
+    CHECK_LYSP_TYPE_ENUM(&val_enum, NULL, 0, LYS_SET_VALUE, 0, NULL, NULL, -5);
     assert_int_equal(req_type.require_instance, 1);
     assert_true(req_type.flags &= LYS_SET_REQINST);
     assert_string_equal(range_type.range->arg.str, "5..10");
     assert_true(range_type.flags & LYS_SET_RANGE);
-    assert_string_equal(err_msg, "error-msg");
+    assert_string_equal(error_message, "error-msg");
     assert_string_equal(app_tag, "err-app-tag");
     assert_string_equal(enum_type.enums->name, "yay");
-    assert_string_equal(len_type.length->arg.str, "baf");
+    CHECK_LYSP_RESTR(len_type.length, "baf", NULL,
+            NULL, NULL, 0, NULL);
     assert_true(len_type.flags & LYS_SET_LENGTH);
     assert_string_equal(patter_type.patterns->arg.str, "\x015pattern");
     assert_true(patter_type.flags & LYS_SET_PATTERN);
     /* cleanup */
-    lysp_ext_instance_free(st->ctx, exts);
-    lysp_when_free(st->ctx, when_p);
-    lysp_ext_free(st->ctx, ext_def);
-    FREE_STRING(st->ctx, *if_features);
-    FREE_STRING(st->ctx, err_msg);
-    FREE_STRING(st->ctx, app_tag);
-    FREE_STRING(st->ctx, units);
-    FREE_STRING(st->ctx, patter_type.patterns->arg.str);
-    FREE_STRING(st->ctx, def.str);
-    FREE_STRING(st->ctx, range_type.range->arg.str);
-    FREE_STRING(st->ctx, len_type.length->arg.str);
-    FREE_STRING(st->ctx, enum_type.enums->name);
-    FREE_STRING(st->ctx, value);
+    lysp_ext_instance_free(UTEST_LYCTX, exts);
+    lysp_when_free(UTEST_LYCTX, when_p);
+    lysp_ext_free(UTEST_LYCTX, ext_def);
+    FREE_STRING(UTEST_LYCTX, *if_features);
+    FREE_STRING(UTEST_LYCTX, error_message);
+    FREE_STRING(UTEST_LYCTX, app_tag);
+    FREE_STRING(UTEST_LYCTX, units);
+    FREE_STRING(UTEST_LYCTX, patter_type.patterns->arg.str);
+    FREE_STRING(UTEST_LYCTX, def.str);
+    FREE_STRING(UTEST_LYCTX, range_type.range->arg.str);
+    FREE_STRING(UTEST_LYCTX, len_type.length->arg.str);
+    FREE_STRING(UTEST_LYCTX, enum_type.enums->name);
+    FREE_STRING(UTEST_LYCTX, value);
     LY_ARRAY_FREE(if_features);
     LY_ARRAY_FREE(exts);
     LY_ARRAY_FREE(ext_def);
@@ -710,7 +598,7 @@
     free(when_p);
     free(range_type.range);
     free(len_type.length);
-    st = reset_state(state);
+    RESET_STATE;
 
     /* test unique subelem */
     const char *prefix_value;
@@ -722,16 +610,16 @@
             "<text xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\">wsefsdf</text>"
             "<text xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\">wsefsdf</text>"
             ELEMENT_WRAPPER_END;
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
-    lyxml_ctx_next(st->yin_ctx->xmlctx);
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
+    lyxml_ctx_next(YCTX->xmlctx);
 
-    ret = yin_parse_content(st->yin_ctx, subelems2, 2, LY_STMT_STATUS, NULL, &exts);
+    ret = yin_parse_content(YCTX, subelems2, 2, LY_STMT_STATUS, NULL, &exts);
     assert_int_equal(ret, LY_EVALID);
-    logbuf_assert("Redefinition of \"text\" sub-element in \"status\" element. Line number 1.");
-    lydict_remove(st->ctx, prefix_value);
-    lydict_remove(st->ctx, value);
-    st = reset_state(state);
+    CHECK_LOG_CTX("Redefinition of \"text\" sub-element in \"status\" element.", "Line number 1.");
+    lydict_remove(UTEST_LYCTX, prefix_value);
+    lydict_remove(UTEST_LYCTX, value);
+    RESET_STATE;
 
     /* test first subelem */
     data = ELEMENT_WRAPPER_START
@@ -742,67 +630,62 @@
     struct yin_subelement subelems3[2] = {{LY_STMT_PREFIX, &prefix_value, YIN_SUBELEM_UNIQUE},
         {LY_STMT_ARG_TEXT, &value, YIN_SUBELEM_FIRST}};
 
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
-    lyxml_ctx_next(st->yin_ctx->xmlctx);
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
+    lyxml_ctx_next(YCTX->xmlctx);
 
-    ret = yin_parse_content(st->yin_ctx, subelems3, 2, LY_STMT_STATUS, NULL, &exts);
+    ret = yin_parse_content(YCTX, subelems3, 2, LY_STMT_STATUS, NULL, &exts);
     assert_int_equal(ret, LY_EVALID);
-    logbuf_assert("Sub-element \"text\" of \"status\" element must be defined as it's first sub-element. Line number 1.");
-    lydict_remove(st->ctx, prefix_value);
-    st = reset_state(state);
+    CHECK_LOG_CTX("Sub-element \"text\" of \"status\" element must be defined as it's first sub-element.", "Line number 1.");
+    lydict_remove(UTEST_LYCTX, prefix_value);
+    RESET_STATE;
 
     /* test mandatory subelem */
     data = ELEMENT_WRAPPER_START ELEMENT_WRAPPER_END;
     struct yin_subelement subelems4[1] = {{LY_STMT_PREFIX, &prefix_value, YIN_SUBELEM_MANDATORY | YIN_SUBELEM_UNIQUE}};
 
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
-    lyxml_ctx_next(st->yin_ctx->xmlctx);
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
+    lyxml_ctx_next(YCTX->xmlctx);
 
-    ret = yin_parse_content(st->yin_ctx, subelems4, 1, LY_STMT_STATUS, NULL, &exts);
+    ret = yin_parse_content(YCTX, subelems4, 1, LY_STMT_STATUS, NULL, &exts);
     assert_int_equal(ret, LY_EVALID);
-    logbuf_assert("Missing mandatory sub-element \"prefix\" of \"status\" element. Line number 1.");
-
-    st->finished_correctly = true;
+    CHECK_LOG_CTX("Missing mandatory sub-element \"prefix\" of \"status\" element.", "Line number 1.");
 }
 
 static void
 test_validate_value(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data = ELEMENT_WRAPPER_START ELEMENT_WRAPPER_END;
 
     /* create some XML context */
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
-    st->yin_ctx->xmlctx->status = LYXML_ELEM_CONTENT;
-    st->yin_ctx->xmlctx->dynamic = 0;
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
+    YCTX->xmlctx->status = LYXML_ELEM_CONTENT;
+    YCTX->xmlctx->dynamic = 0;
 
-    st->yin_ctx->xmlctx->value = "#invalid";
-    st->yin_ctx->xmlctx->value_len = 8;
-    assert_int_equal(yin_validate_value(st->yin_ctx, Y_IDENTIF_ARG), LY_EVALID);
-    logbuf_assert("Invalid identifier character '#' (0x0023). Line number 1.");
+    YCTX->xmlctx->value = "#invalid";
+    YCTX->xmlctx->value_len = 8;
+    assert_int_equal(yin_validate_value(YCTX, Y_IDENTIF_ARG), LY_EVALID);
+    CHECK_LOG_CTX("Invalid identifier character '#' (0x0023).", "Line number 1.");
 
-    st->yin_ctx->xmlctx->value = "";
-    st->yin_ctx->xmlctx->value_len = 0;
-    assert_int_equal(yin_validate_value(st->yin_ctx, Y_STR_ARG), LY_SUCCESS);
+    YCTX->xmlctx->value = "";
+    YCTX->xmlctx->value_len = 0;
+    assert_int_equal(yin_validate_value(YCTX, Y_STR_ARG), LY_SUCCESS);
 
-    st->yin_ctx->xmlctx->value = "pre:b";
-    st->yin_ctx->xmlctx->value_len = 5;
-    assert_int_equal(yin_validate_value(st->yin_ctx, Y_IDENTIF_ARG), LY_EVALID);
-    assert_int_equal(yin_validate_value(st->yin_ctx, Y_PREF_IDENTIF_ARG), LY_SUCCESS);
+    YCTX->xmlctx->value = "pre:b";
+    YCTX->xmlctx->value_len = 5;
+    assert_int_equal(yin_validate_value(YCTX, Y_IDENTIF_ARG), LY_EVALID);
+    assert_int_equal(yin_validate_value(YCTX, Y_PREF_IDENTIF_ARG), LY_SUCCESS);
 
-    st->yin_ctx->xmlctx->value = "pre:pre:b";
-    st->yin_ctx->xmlctx->value_len = 9;
-    assert_int_equal(yin_validate_value(st->yin_ctx, Y_PREF_IDENTIF_ARG), LY_EVALID);
-
-    st->finished_correctly = true;
+    YCTX->xmlctx->value = "pre:pre:b";
+    YCTX->xmlctx->value_len = 9;
+    assert_int_equal(yin_validate_value(YCTX, Y_PREF_IDENTIF_ARG), LY_EVALID);
 }
 
 /* helper function to simplify unit test of each element using parse_content function */
 LY_ERR
-test_element_helper(struct test_parser_yin_state *st, const char *data, void *dest, const char **text, struct lysp_ext_instance **exts)
+test_element_helper(void **state, const char *data, void *dest, const char **text, struct lysp_ext_instance **exts)
 {
     const char *name, *prefix;
     size_t name_len, prefix_len;
@@ -881,21 +764,21 @@
         {LY_STMT_ARG_VALUE, dest, 0}
     };
 
-    ly_in_new_memory(data, &st->in);
-    lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx);
-    prefix = st->yin_ctx->xmlctx->prefix;
-    prefix_len = st->yin_ctx->xmlctx->prefix_len;
-    name = st->yin_ctx->xmlctx->name;
-    name_len = st->yin_ctx->xmlctx->name_len;
-    lyxml_ctx_next(st->yin_ctx->xmlctx);
+    ly_in_new_memory(data, &UTEST_IN);
+    lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx);
+    prefix = YCTX->xmlctx->prefix;
+    prefix_len = YCTX->xmlctx->prefix_len;
+    name = YCTX->xmlctx->name;
+    name_len = YCTX->xmlctx->name_len;
+    lyxml_ctx_next(YCTX->xmlctx);
 
-    ret = yin_parse_content(st->yin_ctx, subelems, 71, yin_match_keyword(st->yin_ctx, name, name_len, prefix, prefix_len, LY_STMT_NONE), text, exts);
+    ret = yin_parse_content(YCTX, subelems, 71, yin_match_keyword(YCTX, name, name_len, prefix, prefix_len, LY_STMT_NONE), text, exts);
 
     /* free parser and input */
-    lyxml_ctx_free(st->yin_ctx->xmlctx);
-    st->yin_ctx->xmlctx = NULL;
-    ly_in_free(st->in, 0);
-    st->in = NULL;
+    lyxml_ctx_free(YCTX->xmlctx);
+    YCTX->xmlctx = NULL;
+    ly_in_free(UTEST_IN, 0);
+    UTEST_IN = NULL;
     return ret;
 }
 
@@ -904,7 +787,6 @@
 static void
 test_enum_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     struct lysp_type type = {};
     const char *data;
 
@@ -918,34 +800,27 @@
             "     " EXT_SUBELEM "\n"
             "</enum>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(type.enums->name, "enum-name");
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
+    uint16_t flags = LYS_STATUS_DEPRC | LYS_SET_VALUE;
+
+    CHECK_LYSP_TYPE_ENUM(type.enums, "desc...", 1, flags, 1, "enum-name", "ref...", 55);
     assert_string_equal(type.enums->iffeatures[0].str, "feature");
-    assert_int_equal(type.enums->value, 55);
-    assert_true((type.enums->flags & LYS_STATUS_DEPRC) && (type.enums->flags & LYS_SET_VALUE));
-    assert_string_equal(type.enums->dsc, "desc...");
-    assert_string_equal(type.enums->ref, "ref...");
-    assert_string_equal(type.enums->exts->name, "urn:example:extensions:c-define");
-    assert_int_equal(type.enums->exts->insubstmt_index, 0);
-    assert_int_equal(type.enums->exts->insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_type_free(st->ctx, &type);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(type.enums->exts, LYEXT_SUBSTMT_SELF);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof type);
 
     data = ELEMENT_WRAPPER_START
             "<enum name=\"enum-name\"></enum>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
     assert_string_equal(type.enums->name, "enum-name");
-    lysp_type_free(st->ctx, &type);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof type);
-
-    st->finished_correctly = true;
 }
 
 static void
 test_bit_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     struct lysp_type type = {};
     const char *data;
 
@@ -959,34 +834,27 @@
             EXT_SUBELEM
             "</bit>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(type.bits->name, "bit-name");
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
+    uint16_t flags = LYS_STATUS_DEPRC | LYS_SET_VALUE;
+
+    CHECK_LYSP_TYPE_ENUM(type.bits, "desc...", 1, flags, 1, "bit-name", "ref...", 55);
     assert_string_equal(type.bits->iffeatures[0].str, "feature");
-    assert_int_equal(type.bits->value, 55);
-    assert_true((type.bits->flags & LYS_STATUS_DEPRC) && (type.bits->flags & LYS_SET_VALUE));
-    assert_string_equal(type.bits->dsc, "desc...");
-    assert_string_equal(type.bits->ref, "ref...");
-    assert_string_equal(type.bits->exts->name, "urn:example:extensions:c-define");
-    assert_int_equal(type.bits->exts->insubstmt_index, 0);
-    assert_int_equal(type.bits->exts->insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_type_free(st->ctx, &type);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(type.bits->exts, LYEXT_SUBSTMT_SELF);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof type);
 
     data = ELEMENT_WRAPPER_START
             "<bit name=\"bit-name\"> </bit>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(type.bits->name, "bit-name");
-    lysp_type_free(st->ctx, &type);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_TYPE_ENUM(type.bits, NULL, 0, 0, 0, "bit-name", NULL, 0);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof type);
-
-    st->finished_correctly = true;
 }
 
 static void
 test_meta_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     char *value = NULL;
     const char *data;
     struct lysp_ext_instance *exts = NULL;
@@ -995,16 +863,13 @@
     data = ELEMENT_WRAPPER_START
             "<organization><text>organization...</text>" EXT_SUBELEM EXT_SUBELEM "</organization>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &value, NULL, &exts), LY_SUCCESS);
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_ORGANIZATION);
-    assert_string_equal(exts[1].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[1].insubstmt_index, 0);
-    assert_int_equal(exts[1].insubstmt, LYEXT_SUBSTMT_ORGANIZATION);
+    assert_int_equal(test_element_helper(state, data, &value, NULL, &exts), LY_SUCCESS);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_ORGANIZATION);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[1]), LYEXT_SUBSTMT_ORGANIZATION);
+
     assert_string_equal(value, "organization...");
-    FREE_STRING(st->ctx, value);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    FREE_STRING(UTEST_LYCTX, value);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     value = NULL;
     exts = NULL;
 
@@ -1012,13 +877,11 @@
     data = ELEMENT_WRAPPER_START
             "<contact><text>contact...</text>" EXT_SUBELEM "</contact>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &value, NULL, &exts), LY_SUCCESS);
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_CONTACT);
+    assert_int_equal(test_element_helper(state, data, &value, NULL, &exts), LY_SUCCESS);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_CONTACT);
     assert_string_equal(value, "contact...");
-    FREE_STRING(st->ctx, value);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    FREE_STRING(UTEST_LYCTX, value);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
     value = NULL;
 
@@ -1026,66 +889,59 @@
     data = ELEMENT_WRAPPER_START
             "<description><text>description...</text>" EXT_SUBELEM "</description>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &value, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &value, NULL, &exts), LY_SUCCESS);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_DESCRIPTION);
     assert_string_equal(value, "description...");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_DESCRIPTION);
-    FREE_STRING(st->ctx, value);
+    FREE_STRING(UTEST_LYCTX, value);
     value = NULL;
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
 
     /* reference element */
     data = ELEMENT_WRAPPER_START
             "<reference><text>reference...</text>" EXT_SUBELEM "</reference>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &value, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &value, NULL, &exts), LY_SUCCESS);
     assert_string_equal(value, "reference...");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_REFERENCE);
-    FREE_STRING(st->ctx, value);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_REFERENCE);
+    FREE_STRING(UTEST_LYCTX, value);
     value = NULL;
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
 
     /* reference element */
     data = ELEMENT_WRAPPER_START
             "<reference invalid=\"text\"><text>reference...</text>" "</reference>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &value, NULL, &exts), LY_EVALID);
-    logbuf_assert("Unexpected attribute \"invalid\" of \"reference\" element. Line number 1.");
-    FREE_STRING(st->ctx, value);
+    assert_int_equal(test_element_helper(state, data, &value, NULL, &exts), LY_EVALID);
+    CHECK_LOG_CTX("Unexpected attribute \"invalid\" of \"reference\" element.", "Line number 1.");
+    FREE_STRING(UTEST_LYCTX, value);
     value = NULL;
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
 
     /* missing text subelement */
     data = ELEMENT_WRAPPER_START
             "<reference>reference...</reference>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &value, NULL, &exts), LY_EVALID);
-    logbuf_assert("Missing mandatory sub-element \"text\" of \"reference\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &value, NULL, &exts), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory sub-element \"text\" of \"reference\" element.", "Line number 1.");
 
     /* reference element */
     data = ELEMENT_WRAPPER_START
             "<reference>" EXT_SUBELEM "<text>reference...</text></reference>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &value, NULL, &exts), LY_EVALID);
-    logbuf_assert("Sub-element \"text\" of \"reference\" element must be defined as it's first sub-element. Line number 1.");
-    FREE_STRING(st->ctx, value);
+    assert_int_equal(test_element_helper(state, data, &value, NULL, &exts), LY_EVALID);
+    CHECK_LOG_CTX("Sub-element \"text\" of \"reference\" element must be defined as it's first sub-element.", "Line number 1.");
+    FREE_STRING(UTEST_LYCTX, value);
     value = NULL;
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_import_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_import *imports = NULL;
     struct import_meta imp_meta = {"prefix", &imports};
@@ -1100,16 +956,11 @@
             "    <reference><text>import reference</text></reference>\n"
             "</import>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &imp_meta, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(imports->name, "a");
-    assert_string_equal(imports->prefix, "a_mod");
-    assert_string_equal(imports->rev, "2015-01-01");
-    assert_string_equal(imports->dsc, "import description");
-    assert_string_equal(imports->ref, "import reference");
-    assert_string_equal(imports->exts->name, "urn:example:extensions:c-define");
-    assert_int_equal(imports->exts->insubstmt, LYEXT_SUBSTMT_SELF);
-    assert_int_equal(imports->exts->insubstmt_index, 0);
-    FREE_ARRAY(st->ctx, imports, lysp_import_free);
+    assert_int_equal(test_element_helper(state, data, &imp_meta, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_IMPORT(imports, "import description", 1, "a",
+            "a_mod", "import reference", "2015-01-01");
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(imports->exts, LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, imports, lysp_import_free);
     imports = NULL;
 
     /* min subelems */
@@ -1118,16 +969,17 @@
             "    <prefix value=\"a_mod\"/>\n"
             "</import>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &imp_meta, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(imports->prefix, "a_mod");
-    FREE_ARRAY(st->ctx, imports, lysp_import_free);
+    assert_int_equal(test_element_helper(state, data, &imp_meta, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_IMPORT(imports, NULL, 0, "a",
+            "a_mod", NULL, "");
+    FREE_ARRAY(UTEST_LYCTX, imports, lysp_import_free);
     imports = NULL;
 
     /* invalid (missing prefix) */
     data = ELEMENT_WRAPPER_START "<import module=\"a\"></import>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &imp_meta, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory sub-element \"prefix\" of \"import\" element. Line number 1.");
-    FREE_ARRAY(st->ctx, imports, lysp_import_free);
+    assert_int_equal(test_element_helper(state, data, &imp_meta, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory sub-element \"prefix\" of \"import\" element.", "Line number 1.");
+    FREE_ARRAY(UTEST_LYCTX, imports, lysp_import_free);
     imports = NULL;
 
     /* invalid reused prefix */
@@ -1136,9 +988,9 @@
             "    <prefix value=\"prefix\"/>\n"
             "</import>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &imp_meta, NULL, NULL), LY_EVALID);
-    logbuf_assert("Prefix \"prefix\" already used as module prefix. Line number 3.");
-    FREE_ARRAY(st->ctx, imports, lysp_import_free);
+    assert_int_equal(test_element_helper(state, data, &imp_meta, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Prefix \"prefix\" already used as module prefix.", "Line number 3.");
+    FREE_ARRAY(UTEST_LYCTX, imports, lysp_import_free);
     imports = NULL;
 
     data = ELEMENT_WRAPPER_START
@@ -1147,52 +999,47 @@
             "</import>\n"
             "<import module=\"a\">\n"
             "    <prefix value=\"a\"/>\n"
-            "</import>"
+            "</import>\n"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &imp_meta, NULL, NULL), LY_EVALID);
-    logbuf_assert("Prefix \"a\" already used to import \"a\" module. Line number 6.");
-    FREE_ARRAY(st->ctx, imports, lysp_import_free);
+    assert_int_equal(test_element_helper(state, data, &imp_meta, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Prefix \"a\" already used to import \"a\" module.", "Line number 6.");
+    FREE_ARRAY(UTEST_LYCTX, imports, lysp_import_free);
     imports = NULL;
-    st->finished_correctly = true;
 }
 
 static void
 test_status_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     uint16_t flags = 0;
     struct lysp_ext_instance *exts = NULL;
 
     /* test valid values */
     data = ELEMENT_WRAPPER_START "<status value=\"current\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, NULL), LY_SUCCESS);
     assert_true(flags & LYS_STATUS_CURR);
 
     data = ELEMENT_WRAPPER_START "<status value=\"deprecated\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, NULL), LY_SUCCESS);
     assert_true(flags & LYS_STATUS_DEPRC);
 
     data = ELEMENT_WRAPPER_START "<status value=\"obsolete\">"EXT_SUBELEM "</status>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, &exts), LY_SUCCESS);
     assert_true(flags & LYS_STATUS_OBSLT);
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_STATUS);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_STATUS);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
 
     /* test invalid value */
     data = ELEMENT_WRAPPER_START "<status value=\"invalid\"></status>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"invalid\" of \"value\" attribute in \"status\" element. Valid values are \"current\", \"deprecated\" and \"obsolete\". Line number 1.");
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"invalid\" of \"value\" attribute in \"status\" element. "
+            "Valid values are \"current\", \"deprecated\" and \"obsolete\".", "Line number 1.");
 }
 
 static void
 test_ext_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_ext *ext = NULL;
 
@@ -1206,119 +1053,99 @@
             EXT_SUBELEM
             "</extension>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &ext, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(ext->name, "ext_name");
-    assert_string_equal(ext->argument, "arg");
-    assert_true(ext->flags & LYS_STATUS_CURR);
-    assert_string_equal(ext->dsc, "ext_desc");
-    assert_string_equal(ext->ref, "ext_ref");
-    assert_string_equal(ext->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(ext->exts[0].insubstmt_index, 0);
-    assert_int_equal(ext->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_ext_free(st->ctx, ext);
+    assert_int_equal(test_element_helper(state, data, &ext, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_EXT(ext, "arg", 0, "ext_desc", 1, LYS_STATUS_CURR, "ext_name", "ext_ref");
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(ext->exts[0]), LYEXT_SUBSTMT_SELF);
+    lysp_ext_free(UTEST_LYCTX, ext);
     LY_ARRAY_FREE(ext);
     ext = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<extension name=\"ext_name\"></extension>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &ext, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(ext->name, "ext_name");
-    lysp_ext_free(st->ctx, ext);
+    assert_int_equal(test_element_helper(state, data, &ext, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_EXT(ext, NULL, 0, NULL, 0, 0, "ext_name", NULL);
+    lysp_ext_free(UTEST_LYCTX, ext);
     LY_ARRAY_FREE(ext);
     ext = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_yin_element_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     uint16_t flags = 0;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<yin-element value=\"true\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, NULL), LY_SUCCESS);
     assert_true(flags & LYS_YINELEM_TRUE);
 
     data = ELEMENT_WRAPPER_START "<yin-element value=\"false\">" EXT_SUBELEM "</yin-element>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, &exts), LY_SUCCESS);
     assert_true(flags & LYS_YINELEM_TRUE);
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_YINELEM);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_YINELEM);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
 
     data = ELEMENT_WRAPPER_START "<yin-element value=\"invalid\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, NULL), LY_EVALID);
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, NULL), LY_EVALID);
     assert_true(flags & LYS_YINELEM_TRUE);
-    logbuf_assert("Invalid value \"invalid\" of \"value\" attribute in \"yin-element\" element. Valid values are \"true\" and \"false\". Line number 1.");
-    st->finished_correctly = true;
+    CHECK_LOG_CTX("Invalid value \"invalid\" of \"value\" attribute in \"yin-element\" element. "
+            "Valid values are \"true\" and \"false\".", "Line number 1.");
 }
 
 static void
 test_yangversion_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     uint8_t version = 0;
     struct lysp_ext_instance *exts = NULL;
 
     /* valid values */
     data = ELEMENT_WRAPPER_START "<yang-version value=\"1\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &version, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &version, NULL, NULL), LY_SUCCESS);
     assert_true(version & LYS_VERSION_1_0);
 
     data = ELEMENT_WRAPPER_START "<yang-version value=\"1.1\">" EXT_SUBELEM "</yang-version>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &version, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &version, NULL, &exts), LY_SUCCESS);
     assert_true(version & LYS_VERSION_1_1);
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_VERSION);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_VERSION);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
 
     /* invalid value */
     data = ELEMENT_WRAPPER_START "<yang-version value=\"version\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &version, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"version\" of \"value\" attribute in \"yang-version\" element. Valid values are \"1\" and \"1.1\". Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &version, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"version\" of \"value\" attribute in \"yang-version\" element. "
+            "Valid values are \"1\" and \"1.1\".", "Line number 1.");
 }
 
 static void
 test_mandatory_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     uint16_t man = 0;
     struct lysp_ext_instance *exts = NULL;
 
     /* valid values */
     data = ELEMENT_WRAPPER_START "<mandatory value=\"true\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &man, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &man, NULL, NULL), LY_SUCCESS);
     assert_int_equal(man, LYS_MAND_TRUE);
     man = 0;
 
     data = ELEMENT_WRAPPER_START "<mandatory value=\"false\">" EXT_SUBELEM "</mandatory>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &man, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &man, NULL, &exts), LY_SUCCESS);
     assert_int_equal(man, LYS_MAND_FALSE);
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_MANDATORY);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_MANDATORY);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
 
     data = ELEMENT_WRAPPER_START "<mandatory value=\"invalid\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &man, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"invalid\" of \"value\" attribute in \"mandatory\" element. Valid values are \"true\" and \"false\". Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &man, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"invalid\" of \"value\" attribute in \"mandatory\" element. "
+            "Valid values are \"true\" and \"false\".", "Line number 1.");
 }
 
 static void
 test_argument_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     uint16_t flags = 0;
     const char *arg;
@@ -1332,16 +1159,14 @@
             EXT_SUBELEM
             "</argument>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &arg_meta, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &arg_meta, NULL, &exts), LY_SUCCESS);
     assert_string_equal(arg, "arg-name");
     assert_true(flags & LYS_YINELEM_TRUE);
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_ARGUMENT);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_ARGUMENT);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
     flags = 0;
-    FREE_STRING(st->ctx, arg);
+    FREE_STRING(UTEST_LYCTX, arg);
     arg = NULL;
 
     /* min subelems */
@@ -1349,18 +1174,15 @@
             "<argument name=\"arg\">"
             "</argument>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &arg_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &arg_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(arg, "arg");
     assert_true(flags == 0);
-    FREE_STRING(st->ctx, arg);
-
-    st->finished_correctly = true;
+    FREE_STRING(UTEST_LYCTX, arg);
 }
 
 static void
 test_base_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char **bases = NULL;
     struct lysp_ext_instance *exts = NULL;
@@ -1372,14 +1194,12 @@
             EXT_SUBELEM
             "     </base>\n"
             "</identity>";
-    assert_int_equal(test_element_helper(st, data, &bases, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &bases, NULL, &exts), LY_SUCCESS);
     assert_string_equal(*bases, "base-name");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_BASE);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_BASE);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-    FREE_STRING(st->ctx, *bases);
+    FREE_STRING(UTEST_LYCTX, *bases);
     LY_ARRAY_FREE(bases);
 
     /* as type subelement */
@@ -1388,232 +1208,195 @@
             EXT_SUBELEM
             "     </base>\n"
             "</type>";
-    assert_int_equal(test_element_helper(st, data, &type, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, &exts), LY_SUCCESS);
     assert_string_equal(*type.bases, "base-name");
     assert_true(type.flags & LYS_SET_BASE);
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_BASE);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_BASE);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-    FREE_STRING(st->ctx, *type.bases);
+    FREE_STRING(UTEST_LYCTX, *type.bases);
     LY_ARRAY_FREE(type.bases);
-
-    st->finished_correctly = true;
 }
 
 static void
 test_belongsto_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_submodule submod;
     struct lysp_ext_instance *exts = NULL;
 
+    lydict_insert(UTEST_LYCTX, "module-name", 0, &YCTX->parsed_mod->mod->name);
+
     data = ELEMENT_WRAPPER_START
             "<belongs-to module=\"module-name\"><prefix value=\"pref\"/>"EXT_SUBELEM "</belongs-to>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &submod, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &submod, NULL, &exts), LY_SUCCESS);
     assert_string_equal(submod.prefix, "pref");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_BELONGSTO);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_BELONGSTO);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-    FREE_STRING(st->ctx, submod.prefix);
+    FREE_STRING(UTEST_LYCTX, submod.prefix);
 
     data = ELEMENT_WRAPPER_START "<belongs-to module=\"module-name\"></belongs-to>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &submod, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory sub-element \"prefix\" of \"belongs-to\" element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &submod, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory sub-element \"prefix\" of \"belongs-to\" element.", "Line number 1.");
 }
 
 static void
 test_config_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     uint16_t flags = 0;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<config value=\"true\">" EXT_SUBELEM "</config>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, &exts), LY_SUCCESS);
     assert_true(flags & LYS_CONFIG_W);
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_CONFIG);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_CONFIG);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
     flags = 0;
 
     data = ELEMENT_WRAPPER_START "<config value=\"false\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, NULL), LY_SUCCESS);
     assert_true(flags & LYS_CONFIG_R);
     flags = 0;
 
     data = ELEMENT_WRAPPER_START "<config value=\"invalid\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"invalid\" of \"value\" attribute in \"config\" element. Valid values are \"true\" and \"false\". Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"invalid\" of \"value\" attribute in \"config\" element. "
+            "Valid values are \"true\" and \"false\".", "Line number 1.");
 }
 
 static void
 test_default_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_qname val = {0};
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<default value=\"defaul-value\">"EXT_SUBELEM "</default>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &val, NULL, &exts), LY_SUCCESS);
     assert_string_equal(val.str, "defaul-value");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_DEFAULT);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]), LYEXT_SUBSTMT_DEFAULT);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-    FREE_STRING(st->ctx, val.str);
+    FREE_STRING(UTEST_LYCTX, val.str);
     val.str = NULL;
 
     data = ELEMENT_WRAPPER_START "<default/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory attribute value of default element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory attribute value of default element.", "Line number 1.");
 }
 
 static void
 test_err_app_tag_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char *val = NULL;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<error-app-tag value=\"val\">"EXT_SUBELEM "</error-app-tag>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &val, NULL, &exts), LY_SUCCESS);
     assert_string_equal(val, "val");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_ERRTAG);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_ERRTAG);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-    FREE_STRING(st->ctx, val);
+    FREE_STRING(UTEST_LYCTX, val);
     val = NULL;
 
     data = ELEMENT_WRAPPER_START "<error-app-tag/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory attribute value of error-app-tag element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory attribute value of error-app-tag element.", "Line number 1.");
 }
 
 static void
 test_err_msg_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char *val = NULL;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<error-message><value>val</value>"EXT_SUBELEM "</error-message>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &val, NULL, &exts), LY_SUCCESS);
     assert_string_equal(val, "val");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_ERRMSG);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_ERRMSG);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-    FREE_STRING(st->ctx, val);
+    FREE_STRING(UTEST_LYCTX, val);
 
     data = ELEMENT_WRAPPER_START "<error-message></error-message>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory sub-element \"value\" of \"error-message\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory sub-element \"value\" of \"error-message\" element.", "Line number 1.");
 
     data = ELEMENT_WRAPPER_START "<error-message invalid=\"text\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_EVALID);
-    logbuf_assert("Unexpected attribute \"invalid\" of \"error-message\" element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Unexpected attribute \"invalid\" of \"error-message\" element.", "Line number 1.");
 }
 
 static void
 test_fracdigits_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_type type = {};
 
     /* valid value */
     data = ELEMENT_WRAPPER_START "<fraction-digits value=\"10\">"EXT_SUBELEM "</fraction-digits>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(type.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(type.exts[0].insubstmt_index, 0);
-    assert_int_equal(type.exts[0].insubstmt, LYEXT_SUBSTMT_FRACDIGITS);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(type.exts[0]),  LYEXT_SUBSTMT_FRACDIGITS);
     assert_int_equal(type.fraction_digits, 10);
     assert_true(type.flags & LYS_SET_FRDIGITS);
-    FREE_ARRAY(st->ctx, type.exts, lysp_ext_instance_free);
+    FREE_ARRAY(UTEST_LYCTX, type.exts, lysp_ext_instance_free);
 
     /* invalid values */
     data = ELEMENT_WRAPPER_START "<fraction-digits value=\"-1\"></fraction-digits>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"-1\" of \"value\" attribute in \"fraction-digits\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"-1\" of \"value\" attribute in \"fraction-digits\" element.", "Line number 1.");
 
     data = ELEMENT_WRAPPER_START "<fraction-digits value=\"02\"></fraction-digits>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"02\" of \"value\" attribute in \"fraction-digits\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"02\" of \"value\" attribute in \"fraction-digits\" element.", "Line number 1.");
 
     data = ELEMENT_WRAPPER_START "<fraction-digits value=\"1p\"></fraction-digits>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"1p\" of \"value\" attribute in \"fraction-digits\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"1p\" of \"value\" attribute in \"fraction-digits\" element.", "Line number 1.");
 
     data = ELEMENT_WRAPPER_START "<fraction-digits value=\"19\"></fraction-digits>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"19\" of \"value\" attribute in \"fraction-digits\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"19\" of \"value\" attribute in \"fraction-digits\" element.", "Line number 1.");
 
     data = ELEMENT_WRAPPER_START "<fraction-digits value=\"999999999999999999\"></fraction-digits>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"999999999999999999\" of \"value\" attribute in \"fraction-digits\" element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"999999999999999999\" of \"value\" attribute in \"fraction-digits\" element.", "Line number 1.");
 }
 
 static void
 test_iffeature_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char **iffeatures = NULL;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<if-feature name=\"local-storage\">"EXT_SUBELEM "</if-feature>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &iffeatures, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &iffeatures, NULL, &exts), LY_SUCCESS);
     assert_string_equal(*iffeatures, "local-storage");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_IFFEATURE);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_IFFEATURE);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-    FREE_STRING(st->ctx, *iffeatures);
+    FREE_STRING(UTEST_LYCTX, *iffeatures);
     LY_ARRAY_FREE(iffeatures);
     iffeatures = NULL;
 
     data = ELEMENT_WRAPPER_START "<if-feature/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &iffeatures, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory attribute name of if-feature element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &iffeatures, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory attribute name of if-feature element.", "Line number 1.");
     LY_ARRAY_FREE(iffeatures);
     iffeatures = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_length_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_type type = {};
 
@@ -1627,17 +1410,12 @@
             EXT_SUBELEM
             "</length>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(type.length->arg.str, "length-str");
-    assert_string_equal(type.length->emsg, "err-msg");
-    assert_string_equal(type.length->eapptag, "err-app-tag");
-    assert_string_equal(type.length->dsc, "desc");
-    assert_string_equal(type.length->ref, "ref");
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_RESTR(type.length, "length-str", "desc",
+            "err-app-tag", "err-msg", 1, "ref");
     assert_true(type.flags & LYS_SET_LENGTH);
-    assert_string_equal(type.length->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(type.length->exts[0].insubstmt_index, 0);
-    assert_int_equal(type.length->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_type_free(st->ctx, &type);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(type.length->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof(type));
 
     /* min subelems */
@@ -1645,78 +1423,67 @@
             "<length value=\"length-str\">"
             "</length>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(type.length->arg.str, "length-str");
-    lysp_type_free(st->ctx, &type);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_RESTR(type.length, "length-str", NULL,
+            NULL, NULL, 0, NULL);
+    lysp_type_free(UTEST_LYCTX, &type);
     assert_true(type.flags & LYS_SET_LENGTH);
     memset(&type, 0, sizeof(type));
 
     data = ELEMENT_WRAPPER_START "<length></length>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory attribute value of length element. Line number 1.");
-    lysp_type_free(st->ctx, &type);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory attribute value of length element.", "Line number 1.");
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof(type));
-
-    st->finished_correctly = true;
 }
 
 static void
 test_modifier_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char *pat;
     struct lysp_ext_instance *exts = NULL;
 
-    assert_int_equal(LY_SUCCESS, lydict_insert(st->ctx, "\006pattern", 8, &pat));
+    assert_int_equal(LY_SUCCESS, lydict_insert(UTEST_LYCTX, "\006pattern", 8, &pat));
     data = ELEMENT_WRAPPER_START "<modifier value=\"invert-match\">" EXT_SUBELEM "</modifier>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &pat, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &pat, NULL, &exts), LY_SUCCESS);
     assert_string_equal(pat, "\x015pattern");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_MODIFIER);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_MODIFIER);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-    FREE_STRING(st->ctx, pat);
+    FREE_STRING(UTEST_LYCTX, pat);
 
-    assert_int_equal(LY_SUCCESS, lydict_insert(st->ctx, "\006pattern", 8, &pat));
+    assert_int_equal(LY_SUCCESS, lydict_insert(UTEST_LYCTX, "\006pattern", 8, &pat));
     data = ELEMENT_WRAPPER_START "<modifier value=\"invert\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &pat, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"invert\" of \"value\" attribute in \"modifier\" element. Only valid value is \"invert-match\". Line number 1.");
-    FREE_STRING(st->ctx, pat);
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &pat, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"invert\" of \"value\" attribute in \"modifier\" element. "
+            "Only valid value is \"invert-match\".", "Line number 1.");
+    FREE_STRING(UTEST_LYCTX, pat);
 }
 
 static void
 test_namespace_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char *ns;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<namespace uri=\"ns\">" EXT_SUBELEM "</namespace>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &ns, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &ns, NULL, &exts), LY_SUCCESS);
     assert_string_equal(ns, "ns");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_NAMESPACE);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_NAMESPACE);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-    FREE_STRING(st->ctx, ns);
+    FREE_STRING(UTEST_LYCTX, ns);
 
     data = ELEMENT_WRAPPER_START "<namespace/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &ns, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory attribute uri of namespace element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &ns, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory attribute uri of namespace element.", "Line number 1.");
 }
 
 static void
 test_pattern_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_type type = {};
 
@@ -1731,145 +1498,119 @@
             EXT_SUBELEM
             "</pattern>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
     assert_true(type.flags & LYS_SET_PATTERN);
-    assert_string_equal(type.patterns->arg.str, "\x015super_pattern");
-    assert_string_equal(type.patterns->dsc, "\"pattern-desc\"");
-    assert_string_equal(type.patterns->eapptag, "err-app-tag-value");
-    assert_string_equal(type.patterns->emsg, "err-msg-value");
-    assert_string_equal(type.patterns->ref, "pattern-ref");
-    assert_string_equal(type.patterns->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(type.patterns->exts[0].insubstmt_index, 0);
-    assert_int_equal(type.patterns->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_type_free(st->ctx, &type);
+    CHECK_LYSP_RESTR(type.patterns, "\x015super_pattern", "\"pattern-desc\"",
+            "err-app-tag-value", "err-msg-value", 1, "pattern-ref");
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(type.patterns->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof(type));
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<pattern value=\"pattern\"> </pattern>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(type.patterns->arg.str, "\x006pattern");
-    lysp_type_free(st->ctx, &type);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_RESTR(type.patterns, "\x006pattern", NULL, NULL, NULL, 0, NULL);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof(type));
-
-    st->finished_correctly = true;
 }
 
 static void
 test_value_position_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_type_enum en = {};
 
     /* valid values */
     data = ELEMENT_WRAPPER_START "<value value=\"55\">" EXT_SUBELEM "</value>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_SUCCESS);
-    assert_int_equal(en.value, 55);
-    assert_true(en.flags & LYS_SET_VALUE);
-    assert_string_equal(en.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(en.exts[0].insubstmt_index, 0);
-    assert_int_equal(en.exts[0].insubstmt, LYEXT_SUBSTMT_VALUE);
-    FREE_ARRAY(st->ctx, en.exts, lysp_ext_instance_free);
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_TYPE_ENUM(&(en), NULL, 1, LYS_SET_VALUE, 0, NULL, NULL, 55);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(en.exts[0]),  LYEXT_SUBSTMT_VALUE);
+    FREE_ARRAY(UTEST_LYCTX, en.exts, lysp_ext_instance_free);
     memset(&en, 0, sizeof(en));
 
     data = ELEMENT_WRAPPER_START "<value value=\"-55\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_SUCCESS);
-    assert_int_equal(en.value, -55);
-    assert_true(en.flags & LYS_SET_VALUE);
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_TYPE_ENUM(&(en), NULL, 0, LYS_SET_VALUE, 0, NULL, NULL, -55);
     memset(&en, 0, sizeof(en));
 
     data = ELEMENT_WRAPPER_START "<value value=\"0\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_SUCCESS);
-    assert_int_equal(en.value, 0);
-    assert_true(en.flags & LYS_SET_VALUE);
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_TYPE_ENUM(&(en), NULL, 0, LYS_SET_VALUE, 0, NULL, NULL, 0);
     memset(&en, 0, sizeof(en));
 
     data = ELEMENT_WRAPPER_START "<value value=\"-0\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_SUCCESS);
-    assert_int_equal(en.value, 0);
-    assert_true(en.flags & LYS_SET_VALUE);
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_TYPE_ENUM(&(en), NULL, 0, LYS_SET_VALUE, 0, NULL, NULL, 0);
     memset(&en, 0, sizeof(en));
 
     /* valid positions */
     data = ELEMENT_WRAPPER_START "<position value=\"55\">" EXT_SUBELEM "</position>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_SUCCESS);
-    assert_int_equal(en.value, 55);
-    assert_true(en.flags & LYS_SET_VALUE);
-    assert_string_equal(en.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(en.exts[0].insubstmt_index, 0);
-    assert_int_equal(en.exts[0].insubstmt, LYEXT_SUBSTMT_POSITION);
-    FREE_ARRAY(st->ctx, en.exts, lysp_ext_instance_free);
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_TYPE_ENUM(&(en), NULL, 1, LYS_SET_VALUE, 0, NULL, NULL, 55);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(en.exts[0]),  LYEXT_SUBSTMT_POSITION);
+    FREE_ARRAY(UTEST_LYCTX, en.exts, lysp_ext_instance_free);
     memset(&en, 0, sizeof(en));
 
     data = ELEMENT_WRAPPER_START "<position value=\"0\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_SUCCESS);
-    assert_int_equal(en.value, 0);
-    assert_true(en.flags & LYS_SET_VALUE);
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_TYPE_ENUM(&(en), NULL, 0, LYS_SET_VALUE, 0, NULL, NULL, 0);
     memset(&en, 0, sizeof(en));
 
     /* invalid values */
     data = ELEMENT_WRAPPER_START "<value value=\"99999999999999999999999\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"99999999999999999999999\" of \"value\" attribute in \"value\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"99999999999999999999999\" of \"value\" attribute in \"value\" element.", "Line number 1.");
 
     data = ELEMENT_WRAPPER_START "<value value=\"1k\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"1k\" of \"value\" attribute in \"value\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"1k\" of \"value\" attribute in \"value\" element.", "Line number 1.");
 
     data = ELEMENT_WRAPPER_START "<value value=\"\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"\" of \"value\" attribute in \"value\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"\" of \"value\" attribute in \"value\" element.", "Line number 1.");
 
     /*invalid positions */
     data = ELEMENT_WRAPPER_START "<position value=\"-5\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"-5\" of \"value\" attribute in \"position\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"-5\" of \"value\" attribute in \"position\" element.", "Line number 1.");
 
     data = ELEMENT_WRAPPER_START "<position value=\"-0\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"-0\" of \"value\" attribute in \"position\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"-0\" of \"value\" attribute in \"position\" element.", "Line number 1.");
 
     data = ELEMENT_WRAPPER_START "<position value=\"99999999999999999999\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"99999999999999999999\" of \"value\" attribute in \"position\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"99999999999999999999\" of \"value\" attribute in \"position\" element.", "Line number 1.");
 
     data = ELEMENT_WRAPPER_START "<position value=\"\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &en, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"\" of \"value\" attribute in \"position\" element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &en, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"\" of \"value\" attribute in \"position\" element.", "Line number 1.");
 }
 
 static void
 test_prefix_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char *value = NULL;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<prefix value=\"pref\">" EXT_SUBELEM "</prefix>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &value, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &value, NULL, &exts), LY_SUCCESS);
     assert_string_equal(value, "pref");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_PREFIX);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_PREFIX);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
     exts = NULL;
-    FREE_STRING(st->ctx, value);
+    FREE_STRING(UTEST_LYCTX, value);
 
     data = ELEMENT_WRAPPER_START "<prefix value=\"pref\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &value, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &value, NULL, NULL), LY_SUCCESS);
     assert_string_equal(value, "pref");
-    FREE_STRING(st->ctx, value);
-
-    st->finished_correctly = true;
+    FREE_STRING(UTEST_LYCTX, value);
 }
 
 static void
 test_range_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_type type = {};
 
@@ -1883,147 +1624,121 @@
             EXT_SUBELEM
             "</range>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(type.range->arg.str, "range-str");
-    assert_string_equal(type.range->dsc, "desc");
-    assert_string_equal(type.range->eapptag, "err-app-tag");
-    assert_string_equal(type.range->emsg, "err-msg");
-    assert_string_equal(type.range->ref, "ref");
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_RESTR(type.range, "range-str", "desc",
+            "err-app-tag", "err-msg", 1, "ref");
     assert_true(type.flags & LYS_SET_RANGE);
-    assert_string_equal(type.range->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(type.range->exts[0].insubstmt_index, 0);
-    assert_int_equal(type.range->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_type_free(st->ctx, &type);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(type.range->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof(type));
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<range value=\"range-str\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(type.range->arg.str, "range-str");
-    lysp_type_free(st->ctx, &type);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_RESTR(type.range, "range-str", NULL,
+            NULL, NULL, 0, NULL);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof(type));
-
-    st->finished_correctly = true;
 }
 
 static void
 test_reqinstance_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_type type = {};
 
     data = ELEMENT_WRAPPER_START "<require-instance value=\"true\">" EXT_SUBELEM "</require-instance>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
     assert_int_equal(type.require_instance, 1);
     assert_true(type.flags & LYS_SET_REQINST);
-    assert_string_equal(type.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(type.exts[0].insubstmt_index, 0);
-    assert_int_equal(type.exts[0].insubstmt, LYEXT_SUBSTMT_REQINSTANCE);
-    lysp_type_free(st->ctx, &type);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(type.exts[0]),  LYEXT_SUBSTMT_REQINSTANCE);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof(type));
 
     data = ELEMENT_WRAPPER_START "<require-instance value=\"false\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
     assert_int_equal(type.require_instance, 0);
     assert_true(type.flags & LYS_SET_REQINST);
     memset(&type, 0, sizeof(type));
 
     data = ELEMENT_WRAPPER_START "<require-instance value=\"invalid\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_EVALID);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_EVALID);
     memset(&type, 0, sizeof(type));
-    logbuf_assert("Invalid value \"invalid\" of \"value\" attribute in \"require-instance\" element. Valid values are \"true\" and \"false\". Line number 1.");
-
-    st->finished_correctly = true;
+    CHECK_LOG_CTX("Invalid value \"invalid\" of \"value\" attribute in \"require-instance\" element. "
+            "Valid values are \"true\" and \"false\".", "Line number 1.");
 }
 
 static void
 test_revision_date_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     char rev[LY_REV_SIZE];
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<revision-date date=\"2000-01-01\">"EXT_SUBELEM "</revision-date>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, rev, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, rev, NULL, &exts), LY_SUCCESS);
     assert_string_equal(rev, "2000-01-01");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_REVISIONDATE);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_REVISIONDATE);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
 
     data = ELEMENT_WRAPPER_START "<revision-date date=\"2000-01-01\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, rev, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, rev, NULL, NULL), LY_SUCCESS);
     assert_string_equal(rev, "2000-01-01");
 
     data = ELEMENT_WRAPPER_START "<revision-date date=\"2000-50-05\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, rev, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"2000-50-05\" of \"revision-date\". Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, rev, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"2000-50-05\" of \"revision-date\".", "Line number 1.");
 }
 
 static void
 test_unique_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char **values = NULL;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<unique tag=\"tag\">"EXT_SUBELEM "</unique>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &values, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &values, NULL, &exts), LY_SUCCESS);
     assert_string_equal(*values, "tag");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_UNIQUE);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
-    FREE_STRING(st->ctx, *values);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_UNIQUE);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
+    FREE_STRING(UTEST_LYCTX, *values);
     LY_ARRAY_FREE(values);
     values = NULL;
 
     data = ELEMENT_WRAPPER_START "<unique tag=\"tag\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &values, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &values, NULL, NULL), LY_SUCCESS);
     assert_string_equal(*values, "tag");
-    FREE_STRING(st->ctx, *values);
+    FREE_STRING(UTEST_LYCTX, *values);
     LY_ARRAY_FREE(values);
     values = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_units_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char *values = NULL;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<units name=\"name\">"EXT_SUBELEM "</units>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &values, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &values, NULL, &exts), LY_SUCCESS);
     assert_string_equal(values, "name");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_UNITS);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
-    FREE_STRING(st->ctx, values);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_UNITS);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
+    FREE_STRING(UTEST_LYCTX, values);
     values = NULL;
 
     data = ELEMENT_WRAPPER_START "<units name=\"name\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &values, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &values, NULL, NULL), LY_SUCCESS);
     assert_string_equal(values, "name");
-    FREE_STRING(st->ctx, values);
+    FREE_STRING(UTEST_LYCTX, values);
     values = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_when_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_when *when = NULL;
 
@@ -2034,56 +1749,46 @@
             EXT_SUBELEM
             "</when>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &when, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(when->cond, "cond");
-    assert_string_equal(when->dsc, "desc");
-    assert_string_equal(when->ref, "ref");
-    assert_string_equal(when->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(when->exts[0].insubstmt_index, 0);
-    assert_int_equal(when->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_when_free(st->ctx, when);
+    assert_int_equal(test_element_helper(state, data, &when, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_WHEN(when, "cond", "desc", 1, "ref");
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(when->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_when_free(UTEST_LYCTX, when);
     free(when);
     when = NULL;
 
     data = ELEMENT_WRAPPER_START "<when condition=\"cond\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &when, NULL, NULL), LY_SUCCESS);
-    assert_string_equal(when->cond, "cond");
-    lysp_when_free(st->ctx, when);
+    assert_int_equal(test_element_helper(state, data, &when, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_WHEN(when, "cond", NULL, 0, NULL);
+    lysp_when_free(UTEST_LYCTX, when);
     free(when);
     when = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_yin_text_value_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char *val;
 
     data = ELEMENT_WRAPPER_START "<text>text</text>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_SUCCESS);
     assert_string_equal(val, "text");
-    FREE_STRING(st->ctx, val);
+    FREE_STRING(UTEST_LYCTX, val);
 
     data = "<error-message xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <value>text</value> </error-message>";
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_SUCCESS);
     assert_string_equal(val, "text");
-    FREE_STRING(st->ctx, val);
+    FREE_STRING(UTEST_LYCTX, val);
 
     data = ELEMENT_WRAPPER_START "<text></text>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_SUCCESS);
     assert_string_equal("", val);
-    FREE_STRING(st->ctx, val);
-
-    st->finished_correctly = true;
+    FREE_STRING(UTEST_LYCTX, val);
 }
 
 static void
 test_type_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_type type = {};
 
@@ -2103,21 +1808,22 @@
             EXT_SUBELEM
             "</type>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
     assert_string_equal(type.name, "type-name");
     assert_string_equal(*type.bases, "base-name");
     assert_string_equal(type.bits->name,  "bit");
     assert_string_equal(type.enums->name,  "enum");
     assert_int_equal(type.fraction_digits, 2);
-    assert_string_equal(type.length->arg.str, "length");
+    CHECK_LYSP_RESTR(type.length, "length", NULL,
+            NULL, NULL, 0, NULL);
     assert_string_equal(type.path->expr, "/path");
-    assert_string_equal(type.patterns->arg.str, "\006pattern");
-    assert_string_equal(type.range->arg.str, "range");
+    CHECK_LYSP_RESTR(type.patterns, "\006pattern", NULL,
+            NULL, NULL, 0, NULL);
+    CHECK_LYSP_RESTR(type.range, "range", NULL,
+            NULL, NULL, 0, NULL);
     assert_int_equal(type.require_instance, 1);
     assert_string_equal(type.types->name, "sub-type-name");
-    assert_string_equal(type.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(type.exts[0].insubstmt_index, 0);
-    assert_int_equal(type.exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(type.exts[0]),  LYEXT_SUBSTMT_SELF);
     assert_true(type.flags & LYS_SET_BASE);
     assert_true(type.flags & LYS_SET_BIT);
     assert_true(type.flags & LYS_SET_ENUM);
@@ -2128,168 +1834,144 @@
     assert_true(type.flags & LYS_SET_RANGE);
     assert_true(type.flags & LYS_SET_REQINST);
     assert_true(type.flags & LYS_SET_TYPE);
-    lysp_type_free(st->ctx, &type);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof(type));
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<type name=\"type-name\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &type, NULL, NULL), LY_SUCCESS);
-    lysp_type_free(st->ctx, &type);
+    assert_int_equal(test_element_helper(state, data, &type, NULL, NULL), LY_SUCCESS);
+    lysp_type_free(UTEST_LYCTX, &type);
     memset(&type, 0, sizeof(type));
-
-    st->finished_correctly = true;
 }
 
 static void
 test_max_elems_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_node_list list = {};
     struct lysp_node_leaflist llist = {};
     struct lysp_refine refine = {};
 
     data = "<refine xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <max-elements value=\"unbounded\">"EXT_SUBELEM "</max-elements> </refine>";
-    assert_int_equal(test_element_helper(st, data, &refine, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &refine, NULL, NULL), LY_SUCCESS);
     assert_int_equal(refine.max, 0);
     assert_true(refine.flags & LYS_SET_MAX);
-    assert_string_equal(refine.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(refine.exts[0].insubstmt_index, 0);
-    assert_int_equal(refine.exts[0].insubstmt, LYEXT_SUBSTMT_MAX);
-    FREE_ARRAY(st->ctx, refine.exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(refine.exts[0]),  LYEXT_SUBSTMT_MAX);
+    FREE_ARRAY(UTEST_LYCTX, refine.exts, lysp_ext_instance_free);
 
     data = "<list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <max-elements value=\"5\">"EXT_SUBELEM "</max-elements> </list>";
-    assert_int_equal(test_element_helper(st, data, &list, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &list, NULL, NULL), LY_SUCCESS);
     assert_int_equal(list.max, 5);
-    assert_true(list.flags & LYS_SET_MAX);
-    assert_string_equal(list.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(list.exts[0].insubstmt_index, 0);
-    assert_int_equal(list.exts[0].insubstmt, LYEXT_SUBSTMT_MAX);
-    FREE_ARRAY(st->ctx, list.exts, lysp_ext_instance_free);
+    CHECK_LYSP_NODE(&list, NULL, 1, LYS_SET_MAX, 0, NULL, 0, LYS_UNKNOWN, NULL, NULL, 0);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(list.exts[0]),  LYEXT_SUBSTMT_MAX);
+    FREE_ARRAY(UTEST_LYCTX, list.exts, lysp_ext_instance_free);
 
     data = "<leaf-list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <max-elements value=\"85\">"EXT_SUBELEM "</max-elements> </leaf-list>";
-    assert_int_equal(test_element_helper(st, data, &llist, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &llist, NULL, NULL), LY_SUCCESS);
     assert_int_equal(llist.max, 85);
-    assert_true(llist.flags & LYS_SET_MAX);
-    assert_string_equal(llist.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(llist.exts[0].insubstmt_index, 0);
-    assert_int_equal(llist.exts[0].insubstmt, LYEXT_SUBSTMT_MAX);
-    FREE_ARRAY(st->ctx, llist.exts, lysp_ext_instance_free);
+    CHECK_LYSP_NODE(&llist, NULL, 1, LYS_SET_MAX, 0, NULL, 0, LYS_UNKNOWN, NULL, NULL, 0);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(llist.exts[0]),  LYEXT_SUBSTMT_MAX);
+    FREE_ARRAY(UTEST_LYCTX, llist.exts, lysp_ext_instance_free);
 
     data = "<refine xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <max-elements value=\"10\"/> </refine>";
-    assert_int_equal(test_element_helper(st, data, &refine, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &refine, NULL, NULL), LY_SUCCESS);
     assert_int_equal(refine.max, 10);
     assert_true(refine.flags & LYS_SET_MAX);
 
     data = "<list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <max-elements value=\"0\"/> </list>";
-    assert_int_equal(test_element_helper(st, data, &list, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"0\" of \"value\" attribute in \"max-elements\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &list, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"0\" of \"value\" attribute in \"max-elements\" element.", "Line number 1.");
 
     data = "<list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <max-elements value=\"-10\"/> </list>";
-    assert_int_equal(test_element_helper(st, data, &list, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"-10\" of \"value\" attribute in \"max-elements\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &list, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"-10\" of \"value\" attribute in \"max-elements\" element.", "Line number 1.");
 
     data = "<list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <max-elements value=\"k\"/> </list>";
-    assert_int_equal(test_element_helper(st, data, &list, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"k\" of \"value\" attribute in \"max-elements\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &list, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"k\" of \"value\" attribute in \"max-elements\" element.", "Line number 1.");
 
     data = "<list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <max-elements value=\"u12\"/> </list>";
-    assert_int_equal(test_element_helper(st, data, &list, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"u12\" of \"value\" attribute in \"max-elements\" element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &list, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"u12\" of \"value\" attribute in \"max-elements\" element.", "Line number 1.");
 }
 
 static void
 test_min_elems_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_node_list list = {};
     struct lysp_node_leaflist llist = {};
     struct lysp_refine refine = {};
 
     data = "<refine xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <min-elements value=\"0\">"EXT_SUBELEM "</min-elements> </refine>";
-    assert_int_equal(test_element_helper(st, data, &refine, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &refine, NULL, NULL), LY_SUCCESS);
     assert_int_equal(refine.min, 0);
     assert_true(refine.flags & LYS_SET_MIN);
-    assert_string_equal(refine.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(refine.exts[0].insubstmt_index, 0);
-    assert_int_equal(refine.exts[0].insubstmt, LYEXT_SUBSTMT_MIN);
-    FREE_ARRAY(st->ctx, refine.exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(refine.exts[0]),  LYEXT_SUBSTMT_MIN);
+    FREE_ARRAY(UTEST_LYCTX, refine.exts, lysp_ext_instance_free);
 
     data = "<list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <min-elements value=\"41\">"EXT_SUBELEM "</min-elements> </list>";
-    assert_int_equal(test_element_helper(st, data, &list, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &list, NULL, NULL), LY_SUCCESS);
     assert_int_equal(list.min, 41);
     assert_true(list.flags & LYS_SET_MIN);
-    assert_string_equal(list.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(list.exts[0].insubstmt_index, 0);
-    assert_int_equal(list.exts[0].insubstmt, LYEXT_SUBSTMT_MIN);
-    FREE_ARRAY(st->ctx, list.exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(list.exts[0]),  LYEXT_SUBSTMT_MIN);
+    FREE_ARRAY(UTEST_LYCTX, list.exts, lysp_ext_instance_free);
 
     data = "<leaf-list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <min-elements value=\"50\">"EXT_SUBELEM "</min-elements> </leaf-list>";
-    assert_int_equal(test_element_helper(st, data, &llist, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &llist, NULL, NULL), LY_SUCCESS);
     assert_int_equal(llist.min, 50);
     assert_true(llist.flags & LYS_SET_MIN);
-    assert_string_equal(llist.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(llist.exts[0].insubstmt_index, 0);
-    assert_int_equal(llist.exts[0].insubstmt, LYEXT_SUBSTMT_MIN);
-    FREE_ARRAY(st->ctx, llist.exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(llist.exts[0]),  LYEXT_SUBSTMT_MIN);
+    FREE_ARRAY(UTEST_LYCTX, llist.exts, lysp_ext_instance_free);
 
     data = "<leaf-list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <min-elements value=\"-5\"/> </leaf-list>";
-    assert_int_equal(test_element_helper(st, data, &llist, NULL, NULL), LY_EVALID);
-    logbuf_assert("Value \"-5\" of \"value\" attribute in \"min-elements\" element is out of bounds. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &llist, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Value \"-5\" of \"value\" attribute in \"min-elements\" element is out of bounds.", "Line number 1.");
 
     data = "<leaf-list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <min-elements value=\"99999999999999999\"/> </leaf-list>";
-    assert_int_equal(test_element_helper(st, data, &llist, NULL, NULL), LY_EVALID);
-    logbuf_assert("Value \"99999999999999999\" of \"value\" attribute in \"min-elements\" element is out of bounds. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &llist, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Value \"99999999999999999\" of \"value\" attribute in \"min-elements\" element is out of bounds.", "Line number 1.");
 
     data = "<leaf-list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <min-elements value=\"5k\"/> </leaf-list>";
-    assert_int_equal(test_element_helper(st, data, &llist, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"5k\" of \"value\" attribute in \"min-elements\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &llist, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"5k\" of \"value\" attribute in \"min-elements\" element.", "Line number 1.");
 
     data = "<leaf-list xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\"> <min-elements value=\"05\"/> </leaf-list>";
-    assert_int_equal(test_element_helper(st, data, &llist, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"05\" of \"value\" attribute in \"min-elements\" element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &llist, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"05\" of \"value\" attribute in \"min-elements\" element.", "Line number 1.");
 }
 
 static void
 test_ordby_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     uint16_t flags = 0;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<ordered-by value=\"system\">"EXT_SUBELEM "</ordered-by>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, &exts), LY_SUCCESS);
     assert_true(flags & LYS_ORDBY_SYSTEM);
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_ORDEREDBY);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_ORDEREDBY);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
 
     data = ELEMENT_WRAPPER_START "<ordered-by value=\"user\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, NULL), LY_SUCCESS);
     assert_true(flags & LYS_ORDBY_USER);
 
     data = ELEMENT_WRAPPER_START "<ordered-by value=\"inv\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &flags, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"inv\" of \"value\" attribute in \"ordered-by\" element. Valid values are \"system\" and \"user\". Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &flags, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"inv\" of \"value\" attribute in \"ordered-by\" element. "
+            "Valid values are \"system\" and \"user\".", "Line number 1.");
 }
 
 static void
 test_any_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_node *siblings = NULL;
     struct tree_node_meta node_meta = {.parent = NULL, .nodes = &siblings};
     struct lysp_node_anydata *parsed = NULL;
+    uint16_t flags;
 
     /* anyxml max subelems */
     data = ELEMENT_WRAPPER_START
@@ -2305,23 +1987,15 @@
             EXT_SUBELEM
             "</anyxml>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_anydata *)siblings;
-    assert_null(parsed->parent);
-    assert_int_equal(parsed->nodetype, LYS_ANYXML);
-    assert_true(parsed->flags & LYS_CONFIG_W);
-    assert_true(parsed->flags & LYS_MAND_TRUE);
-    assert_true(parsed->flags & LYS_STATUS_DEPRC);
-    assert_null(parsed->next);
-    assert_string_equal(parsed->name, "any-name");
-    assert_string_equal(parsed->dsc, "desc");
-    assert_string_equal(parsed->ref, "ref");
-    assert_string_equal(parsed->when->cond, "when-cond");
+    flags = LYS_CONFIG_W | LYS_MAND_TRUE | LYS_STATUS_DEPRC;
+    CHECK_LYSP_NODE(parsed, "desc", 1, flags, 1,
+            "any-name", 0, LYS_ANYXML, 0, "ref", 1);
+    CHECK_LYSP_WHEN(parsed->when, "when-cond", NULL, 0, NULL);
     assert_string_equal(parsed->iffeatures[0].str, "feature");
-    assert_string_equal(parsed->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(parsed->exts[0].insubstmt_index, 0);
-    assert_int_equal(parsed->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_node_free(st->ctx, siblings);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(parsed->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     /* anydata max subelems */
@@ -2338,47 +2012,36 @@
             EXT_SUBELEM
             "</anydata>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_anydata *)siblings;
-    assert_null(parsed->parent);
-    assert_int_equal(parsed->nodetype, LYS_ANYDATA);
-    assert_true(parsed->flags & LYS_CONFIG_W);
-    assert_true(parsed->flags & LYS_MAND_TRUE);
-    assert_true(parsed->flags & LYS_STATUS_DEPRC);
-    assert_null(parsed->next);
-    assert_string_equal(parsed->name, "any-name");
-    assert_string_equal(parsed->dsc, "desc");
-    assert_string_equal(parsed->ref, "ref");
-    assert_string_equal(parsed->when->cond, "when-cond");
+    flags = LYS_CONFIG_W | LYS_MAND_TRUE | LYS_STATUS_DEPRC;
+    CHECK_LYSP_NODE(parsed, "desc", 1, flags, 1,
+            "any-name", 0, LYS_ANYDATA, 0, "ref", 1);
+    CHECK_LYSP_WHEN(parsed->when, "when-cond", NULL, 0, NULL);
     assert_string_equal(parsed->iffeatures[0].str, "feature");
-    assert_string_equal(parsed->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(parsed->exts[0].insubstmt_index, 0);
-    assert_int_equal(parsed->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_node_free(st->ctx, siblings);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(parsed->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     /* min subelems */
     node_meta.parent = (void *)0x10;
     data = ELEMENT_WRAPPER_START "<anydata name=\"any-name\"> </anydata>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_anydata *)siblings;
     assert_ptr_equal(parsed->parent, node_meta.parent);
-    assert_int_equal(parsed->nodetype, LYS_ANYDATA);
-    assert_null(parsed->next);
-    assert_null(parsed->exts);
-    lysp_node_free(st->ctx, siblings);
-
-    st->finished_correctly = true;
+    CHECK_LYSP_NODE(parsed, NULL, 0, 0, 0,
+            "any-name", 0, LYS_ANYDATA, 1, NULL, 0);
+    lysp_node_free(UTEST_LYCTX, siblings);
 }
 
 static void
 test_leaf_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_node *siblings = NULL;
     struct tree_node_meta node_meta = {.parent = NULL, .nodes = &siblings};
     struct lysp_node_leaf *parsed = NULL;
+    uint16_t flags;
 
     /* max elements */
     data = ELEMENT_WRAPPER_START
@@ -2397,49 +2060,39 @@
             EXT_SUBELEM
             "</leaf>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_leaf *)siblings;
-    assert_null(parsed->parent);
-    assert_int_equal(parsed->nodetype, LYS_LEAF);
-    assert_true(parsed->flags & LYS_CONFIG_W);
-    assert_true(parsed->flags & LYS_MAND_TRUE);
-    assert_true(parsed->flags & LYS_STATUS_DEPRC);
-    assert_null(parsed->next);
-    assert_string_equal(parsed->name, "leaf");
-    assert_string_equal(parsed->dsc, "desc");
-    assert_string_equal(parsed->ref, "ref");
-    assert_string_equal(parsed->when->cond, "when-cond");
+    flags = LYS_CONFIG_W | LYS_MAND_TRUE | LYS_STATUS_DEPRC;
+    CHECK_LYSP_NODE(parsed, "desc", 1, flags, 1,
+            "leaf", 0, LYS_LEAF, 0, "ref", 1);
+    CHECK_LYSP_WHEN(parsed->when, "when-cond", NULL, 0, NULL);
     assert_string_equal(parsed->iffeatures[0].str, "feature");
-    assert_string_equal(parsed->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(parsed->exts[0].insubstmt_index, 0);
-    assert_int_equal(parsed->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(parsed->exts[0]),  LYEXT_SUBSTMT_SELF);
     assert_string_equal(parsed->musts->arg.str, "must-cond");
     assert_string_equal(parsed->type.name, "type");
     assert_string_equal(parsed->units, "uni");
     assert_string_equal(parsed->dflt.str, "def-val");
-    lysp_node_free(st->ctx, siblings);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     /* min elements */
     data = ELEMENT_WRAPPER_START "<leaf name=\"leaf\"> <type name=\"type\"/> </leaf>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_leaf *)siblings;
     assert_string_equal(parsed->name, "leaf");
     assert_string_equal(parsed->type.name, "type");
-    lysp_node_free(st->ctx, siblings);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_leaf_list_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_node *siblings = NULL;
     struct tree_node_meta node_meta = {.parent = NULL, .nodes = &siblings};
     struct lysp_node_leaflist *parsed = NULL;
+    uint16_t flags;
 
     data = ELEMENT_WRAPPER_START
             "<leaf-list name=\"llist\">\n"
@@ -2459,29 +2112,21 @@
             EXT_SUBELEM
             "</leaf-list>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_leaflist *)siblings;
+    flags = LYS_CONFIG_W | LYS_ORDBY_USER | LYS_STATUS_CURR | LYS_SET_MAX;
+    CHECK_LYSP_NODE(parsed, "desc", 1, flags, 1,
+            "llist", 0, LYS_LEAFLIST, 0, "ref", 1);
+    CHECK_LYSP_RESTR(parsed->musts, "must-cond", NULL, NULL, NULL, 0, NULL);
     assert_string_equal(parsed->dflts[0].str, "def-val0");
     assert_string_equal(parsed->dflts[1].str, "def-val1");
-    assert_string_equal(parsed->dsc, "desc");
     assert_string_equal(parsed->iffeatures[0].str, "feature");
     assert_int_equal(parsed->max, 5);
-    assert_string_equal(parsed->musts->arg.str, "must-cond");
-    assert_string_equal(parsed->name, "llist");
-    assert_null(parsed->next);
-    assert_int_equal(parsed->nodetype, LYS_LEAFLIST);
-    assert_null(parsed->parent);
-    assert_string_equal(parsed->ref, "ref");
     assert_string_equal(parsed->type.name, "type");
     assert_string_equal(parsed->units, "uni");
-    assert_string_equal(parsed->when->cond, "when-cond");
-    assert_true(parsed->flags & LYS_CONFIG_W);
-    assert_true(parsed->flags & LYS_ORDBY_USER);
-    assert_true(parsed->flags & LYS_STATUS_CURR);
-    assert_string_equal(parsed->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(parsed->exts[0].insubstmt_index, 0);
-    assert_int_equal(parsed->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_node_free(st->ctx, siblings);
+    CHECK_LYSP_WHEN(parsed->when, "when-cond", NULL, 0, NULL);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(parsed->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     data = ELEMENT_WRAPPER_START
@@ -2500,27 +2145,19 @@
             EXT_SUBELEM
             "</leaf-list>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_leaflist *)siblings;
-    assert_string_equal(parsed->dsc, "desc");
+    flags = LYS_CONFIG_W | LYS_ORDBY_USER | LYS_STATUS_CURR | LYS_SET_MIN;
+    CHECK_LYSP_NODE(parsed, "desc", 1, flags, 1,
+            "llist", 0, LYS_LEAFLIST, 0, "ref", 1);
+    CHECK_LYSP_RESTR(parsed->musts, "must-cond", NULL, NULL, NULL, 0, NULL);
+    CHECK_LYSP_WHEN(parsed->when, "when-cond", NULL, 0, NULL);
     assert_string_equal(parsed->iffeatures[0].str, "feature");
     assert_int_equal(parsed->min, 5);
-    assert_string_equal(parsed->musts->arg.str, "must-cond");
-    assert_string_equal(parsed->name, "llist");
-    assert_null(parsed->next);
-    assert_int_equal(parsed->nodetype, LYS_LEAFLIST);
-    assert_null(parsed->parent);
-    assert_string_equal(parsed->ref, "ref");
     assert_string_equal(parsed->type.name, "type");
     assert_string_equal(parsed->units, "uni");
-    assert_string_equal(parsed->when->cond, "when-cond");
-    assert_true(parsed->flags & LYS_CONFIG_W);
-    assert_true(parsed->flags & LYS_ORDBY_USER);
-    assert_true(parsed->flags & LYS_STATUS_CURR);
-    assert_string_equal(parsed->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(parsed->exts[0].insubstmt_index, 0);
-    assert_int_equal(parsed->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_node_free(st->ctx, siblings);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(parsed->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     data = ELEMENT_WRAPPER_START
@@ -2539,25 +2176,19 @@
             "    <when condition=\"when-cond\"/>\n"
             "</leaf-list>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_leaflist *)siblings;
-    assert_string_equal(parsed->dsc, "desc");
+    flags = LYS_CONFIG_W | LYS_ORDBY_USER | LYS_STATUS_CURR | LYS_SET_MIN | LYS_SET_MAX;
+    CHECK_LYSP_NODE(parsed, "desc", 0, flags, 1,
+            "llist", 0, LYS_LEAFLIST, 0, "ref", 1);
+    CHECK_LYSP_RESTR(parsed->musts, "must-cond", NULL, NULL, NULL, 0, NULL);
+    CHECK_LYSP_WHEN(parsed->when, "when-cond", NULL, 0, NULL);
     assert_string_equal(parsed->iffeatures[0].str, "feature");
     assert_int_equal(parsed->min, 5);
     assert_int_equal(parsed->max, 15);
-    assert_string_equal(parsed->musts->arg.str, "must-cond");
-    assert_string_equal(parsed->name, "llist");
-    assert_null(parsed->next);
-    assert_int_equal(parsed->nodetype, LYS_LEAFLIST);
-    assert_null(parsed->parent);
-    assert_string_equal(parsed->ref, "ref");
     assert_string_equal(parsed->type.name, "type");
     assert_string_equal(parsed->units, "uni");
-    assert_string_equal(parsed->when->cond, "when-cond");
-    assert_true(parsed->flags & LYS_CONFIG_W);
-    assert_true(parsed->flags & LYS_ORDBY_USER);
-    assert_true(parsed->flags & LYS_STATUS_CURR);
-    lysp_node_free(st->ctx, siblings);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     data = ELEMENT_WRAPPER_START
@@ -2565,11 +2196,11 @@
             "    <type name=\"type\"/>\n"
             "</leaf-list>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_leaflist *)siblings;
     assert_string_equal(parsed->name, "llist");
     assert_string_equal(parsed->type.name, "type");
-    lysp_node_free(st->ctx, siblings);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     /* invalid combinations */
@@ -2580,9 +2211,9 @@
             "    <type name=\"type\"/>"
             "</leaf-list>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid combination of min-elements and max-elements: min value 15 is bigger than the max value 5. Line number 4.");
-    lysp_node_free(st->ctx, siblings);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid combination of min-elements and max-elements: min value 15 is bigger than the max value 5.", "Line number 4.");
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     data = ELEMENT_WRAPPER_START
@@ -2592,85 +2223,72 @@
             "    <type name=\"type\"/>\n"
             "</leaf-list>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid combination of sub-elemnts \"min-elements\" and \"default\" in \"leaf-list\" element. Line number 5.");
-    lysp_node_free(st->ctx, siblings);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid combination of sub-elemnts \"min-elements\" and \"default\" in \"leaf-list\" element.", "Line number 5.");
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     data = ELEMENT_WRAPPER_START
             "<leaf-list name=\"llist\">"
             "</leaf-list>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory sub-element \"type\" of \"leaf-list\" element. Line number 1.");
-    lysp_node_free(st->ctx, siblings);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory sub-element \"type\" of \"leaf-list\" element.", "Line number 1.");
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_presence_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char *val;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<presence value=\"presence-val\">"EXT_SUBELEM "</presence>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &val, NULL, &exts), LY_SUCCESS);
     assert_string_equal(val, "presence-val");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_PRESENCE);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
-    FREE_STRING(st->ctx, val);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_PRESENCE);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
+    FREE_STRING(UTEST_LYCTX, val);
 
     data = ELEMENT_WRAPPER_START "<presence value=\"presence-val\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_SUCCESS);
     assert_string_equal(val, "presence-val");
-    FREE_STRING(st->ctx, val);
+    FREE_STRING(UTEST_LYCTX, val);
 
     data = ELEMENT_WRAPPER_START "<presence/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory attribute value of presence element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory attribute value of presence element.", "Line number 1.");
 }
 
 static void
 test_key_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     const char *val;
     struct lysp_ext_instance *exts = NULL;
 
     data = ELEMENT_WRAPPER_START "<key value=\"key-value\">"EXT_SUBELEM "</key>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, &exts), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &val, NULL, &exts), LY_SUCCESS);
     assert_string_equal(val, "key-value");
-    assert_string_equal(exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(exts[0].insubstmt_index, 0);
-    assert_int_equal(exts[0].insubstmt, LYEXT_SUBSTMT_KEY);
-    FREE_ARRAY(st->ctx, exts, lysp_ext_instance_free);
-    FREE_STRING(st->ctx, val);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(exts[0]),  LYEXT_SUBSTMT_KEY);
+    FREE_ARRAY(UTEST_LYCTX, exts, lysp_ext_instance_free);
+    FREE_STRING(UTEST_LYCTX, val);
 
     data = ELEMENT_WRAPPER_START "<key value=\"key-value\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_SUCCESS);
     assert_string_equal(val, "key-value");
-    FREE_STRING(st->ctx, val);
+    FREE_STRING(UTEST_LYCTX, val);
 
     data = ELEMENT_WRAPPER_START "<key/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &val, NULL, NULL), LY_EVALID);
-    logbuf_assert("Missing mandatory attribute value of key element. Line number 1.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &val, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Missing mandatory attribute value of key element.", "Line number 1.");
 }
 
 static void
 test_typedef_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_tpdf *tpdfs = NULL;
     struct tree_node_meta typdef_meta = {NULL, (struct lysp_node **)&tpdfs};
@@ -2686,7 +2304,7 @@
             EXT_SUBELEM
             "</typedef>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &typdef_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &typdef_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(tpdfs[0].dflt.str, "def-val");
     assert_string_equal(tpdfs[0].dsc, "desc-text");
     assert_string_equal(tpdfs[0].name, "tpdf-name");
@@ -2694,10 +2312,8 @@
     assert_string_equal(tpdfs[0].type.name, "type");
     assert_string_equal(tpdfs[0].units, "uni");
     assert_true(tpdfs[0].flags & LYS_STATUS_CURR);
-    assert_string_equal(tpdfs[0].exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(tpdfs[0].exts[0].insubstmt_index, 0);
-    assert_int_equal(tpdfs[0].exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    FREE_ARRAY(st->ctx, tpdfs, lysp_tpdf_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(tpdfs[0].exts[0]),  LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, tpdfs, lysp_tpdf_free);
     tpdfs = NULL;
 
     data = ELEMENT_WRAPPER_START
@@ -2705,19 +2321,16 @@
             "    <type name=\"type\"/>\n"
             "</typedef>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &typdef_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &typdef_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(tpdfs[0].name, "tpdf-name");
     assert_string_equal(tpdfs[0].type.name, "type");
-    FREE_ARRAY(st->ctx, tpdfs, lysp_tpdf_free);
+    FREE_ARRAY(UTEST_LYCTX, tpdfs, lysp_tpdf_free);
     tpdfs = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_refine_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_refine *refines = NULL;
 
@@ -2737,7 +2350,7 @@
             EXT_SUBELEM
             "</refine>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &refines, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &refines, NULL, NULL), LY_SUCCESS);
     assert_string_equal(refines->nodeid, "target");
     assert_string_equal(refines->dflts[0].str, "def");
     assert_string_equal(refines->dsc, "desc");
@@ -2749,26 +2362,21 @@
     assert_string_equal(refines->musts->arg.str, "cond");
     assert_string_equal(refines->presence, "presence");
     assert_string_equal(refines->ref, "ref");
-    assert_string_equal(refines->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(refines->exts[0].insubstmt_index, 0);
-    assert_int_equal(refines->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    FREE_ARRAY(st->ctx, refines, lysp_refine_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(refines->exts[0]),  LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, refines, lysp_refine_free);
     refines = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<refine target-node=\"target\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &refines, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &refines, NULL, NULL), LY_SUCCESS);
     assert_string_equal(refines->nodeid, "target");
-    FREE_ARRAY(st->ctx, refines, lysp_refine_free);
+    FREE_ARRAY(UTEST_LYCTX, refines, lysp_refine_free);
     refines = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_uses_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_node *siblings = NULL;
     struct tree_node_meta node_meta = {NULL, &siblings};
@@ -2787,39 +2395,29 @@
             EXT_SUBELEM
             "</uses>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_uses *)&siblings[0];
-    assert_string_equal(parsed->name, "uses-name");
-    assert_string_equal(parsed->dsc, "desc");
-    assert_true(parsed->flags & LYS_STATUS_OBSLT);
+    CHECK_LYSP_NODE(parsed, "desc", 1, LYS_STATUS_OBSLT, 1,
+            "uses-name", 0, LYS_USES, 0, "ref", 1);
+    CHECK_LYSP_WHEN(parsed->when, "cond", NULL, 0, NULL);
     assert_string_equal(parsed->iffeatures[0].str, "feature");
-    assert_null(parsed->next);
-    assert_int_equal(parsed->nodetype, LYS_USES);
-    assert_null(parsed->parent);
-    assert_string_equal(parsed->ref, "ref");
     assert_string_equal(parsed->refines->nodeid, "target");
-    assert_string_equal(parsed->when->cond, "cond");
     assert_string_equal(parsed->augments->nodeid, "target");
-    assert_string_equal(parsed->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(parsed->exts[0].insubstmt_index, 0);
-    assert_int_equal(parsed->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_node_free(st->ctx, siblings);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(parsed->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<uses name=\"uses-name\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(siblings[0].name, "uses-name");
-    lysp_node_free(st->ctx, siblings);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_revision_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_revision *revs = NULL;
 
@@ -2831,43 +2429,38 @@
             EXT_SUBELEM
             "</revision>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &revs, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &revs, NULL, NULL), LY_SUCCESS);
     assert_string_equal(revs->date, "2018-12-25");
     assert_string_equal(revs->dsc, "desc");
     assert_string_equal(revs->ref, "ref");
-    assert_string_equal(revs->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(revs->exts[0].insubstmt_index, 0);
-    assert_int_equal(revs->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    FREE_ARRAY(st->ctx, revs, lysp_revision_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(revs->exts[0]),  LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, revs, lysp_revision_free);
     revs = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<revision date=\"2005-05-05\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &revs, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &revs, NULL, NULL), LY_SUCCESS);
     assert_string_equal(revs->date, "2005-05-05");
-    FREE_ARRAY(st->ctx, revs, lysp_revision_free);
+    FREE_ARRAY(UTEST_LYCTX, revs, lysp_revision_free);
     revs = NULL;
 
     /* invalid value */
     data = ELEMENT_WRAPPER_START "<revision date=\"05-05-2005\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &revs, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"05-05-2005\" of \"revision\". Line number 1.");
-    FREE_ARRAY(st->ctx, revs, lysp_revision_free);
+    assert_int_equal(test_element_helper(state, data, &revs, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"05-05-2005\" of \"revision\".", "Line number 1.");
+    FREE_ARRAY(UTEST_LYCTX, revs, lysp_revision_free);
     revs = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_include_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_include *includes = NULL;
     struct include_meta inc_meta = {"module-name", &includes};
 
     /* max subelems */
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_1;
+    YCTX->parsed_mod->version = LYS_VERSION_1_1;
     data = ELEMENT_WRAPPER_START
             "<include module=\"mod\">\n"
             "    <description><text>desc</text></description>\n"
@@ -2876,56 +2469,53 @@
             EXT_SUBELEM
             "</include>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &inc_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &inc_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(includes->name, "mod");
     assert_string_equal(includes->dsc, "desc");
     assert_string_equal(includes->ref, "ref");
     assert_string_equal(includes->rev, "1999-09-09");
-    assert_string_equal(includes->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(includes->exts[0].insubstmt_index, 0);
-    assert_int_equal(includes->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    FREE_ARRAY(st->ctx, includes, lysp_include_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(includes->exts[0]),  LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, includes, lysp_include_free);
     includes = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<include module=\"mod\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &inc_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &inc_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(includes->name, "mod");
-    FREE_ARRAY(st->ctx, includes, lysp_include_free);
+    FREE_ARRAY(UTEST_LYCTX, includes, lysp_include_free);
     includes = NULL;
 
     /* invalid combinations */
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_0;
+    YCTX->parsed_mod->version = LYS_VERSION_1_0;
     data = ELEMENT_WRAPPER_START
             "<include module=\"mod\">\n"
             "    <description><text>desc</text></description>\n"
             "    <revision-date date=\"1999-09-09\"/>\n"
             "</include>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &inc_meta, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid sub-elemnt \"description\" of \"include\" element - this sub-element is allowed only in modules with version 1.1 or newer. Line number 2.");
-    FREE_ARRAY(st->ctx, includes, lysp_include_free);
+    assert_int_equal(test_element_helper(state, data, &inc_meta, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid sub-elemnt \"description\" of \"include\" element - this sub-element is allowed only in modules with version 1.1 or newer.",
+            "Line number 2.");
+    FREE_ARRAY(UTEST_LYCTX, includes, lysp_include_free);
     includes = NULL;
 
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_0;
+    YCTX->parsed_mod->version = LYS_VERSION_1_0;
     data = ELEMENT_WRAPPER_START
             "<include module=\"mod\">\n"
             "    <reference><text>ref</text></reference>\n"
             "    <revision-date date=\"1999-09-09\"/>\n"
             "</include>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &inc_meta, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid sub-elemnt \"reference\" of \"include\" element - this sub-element is allowed only in modules with version 1.1 or newer. Line number 2.");
-    FREE_ARRAY(st->ctx, includes, lysp_include_free);
+    assert_int_equal(test_element_helper(state, data, &inc_meta, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid sub-elemnt \"reference\" of \"include\" element - this sub-element is allowed only in modules with version 1.1 or newer.",
+            "Line number 2.");
+    FREE_ARRAY(UTEST_LYCTX, includes, lysp_include_free);
     includes = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_list_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_node *siblings = NULL;
     struct tree_node_meta node_meta = {NULL, &siblings};
@@ -2960,9 +2550,8 @@
             EXT_SUBELEM
             "</list>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_list *)&siblings[0];
-    assert_string_equal(parsed->dsc, "desc");
     assert_string_equal(parsed->child->name, "anyd");
     assert_int_equal(parsed->child->nodetype, LYS_ANYDATA);
     assert_string_equal(parsed->child->next->name, "anyx");
@@ -2980,53 +2569,45 @@
     assert_string_equal(parsed->child->next->next->next->next->next->next->next->name, "uses-name");
     assert_int_equal(parsed->child->next->next->next->next->next->next->next->nodetype, LYS_USES);
     assert_null(parsed->child->next->next->next->next->next->next->next->next);
+    uint16_t flags = LYS_ORDBY_USER | LYS_STATUS_DEPRC | LYS_CONFIG_W | LYS_SET_MIN;
+
+    CHECK_LYSP_NODE(parsed, "desc", 1, flags, 1,
+            "list-name", 0, LYS_LIST, 0, "ref", 1);
+    CHECK_LYSP_RESTR(parsed->musts, "must-cond", NULL, NULL, NULL, 0, NULL);
+    CHECK_LYSP_WHEN(parsed->when, "when", NULL, 0, NULL);
     assert_string_equal(parsed->groupings->name, "grp");
     assert_string_equal(parsed->actions->name, "action");
     assert_int_equal(parsed->groupings->nodetype, LYS_GROUPING);
     assert_string_equal(parsed->notifs->name, "notf");
-    assert_true(parsed->flags & LYS_ORDBY_USER);
-    assert_true(parsed->flags & LYS_STATUS_DEPRC);
-    assert_true(parsed->flags & LYS_CONFIG_W);
     assert_string_equal(parsed->iffeatures[0].str, "iff");
     assert_string_equal(parsed->key, "key");
     assert_int_equal(parsed->min, 10);
-    assert_string_equal(parsed->musts->arg.str, "must-cond");
-    assert_string_equal(parsed->name, "list-name");
-    assert_null(parsed->next);
-    assert_int_equal(parsed->nodetype, LYS_LIST);
-    assert_null(parsed->parent);
-    assert_string_equal(parsed->ref, "ref");
     assert_string_equal(parsed->typedefs->name, "tpdf");
     assert_string_equal(parsed->uniques->str, "utag");
-    assert_string_equal(parsed->when->cond, "when");
-    assert_string_equal(parsed->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(parsed->exts[0].insubstmt_index, 0);
-    assert_int_equal(parsed->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_node_free(st->ctx, siblings);
-    ly_set_erase(&st->yin_ctx->tpdfs_nodes, NULL);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(parsed->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_node_free(UTEST_LYCTX, siblings);
+    ly_set_erase(&YCTX->tpdfs_nodes, NULL);
     siblings = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<list name=\"list-name\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_list *)&siblings[0];
-    assert_string_equal(parsed->name, "list-name");
-    lysp_node_free(st->ctx, siblings);
+    CHECK_LYSP_NODE(parsed, NULL, 0, 0, 0,
+            "list-name", 0, LYS_LIST, 0, NULL, 0);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_notification_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_notif *notifs = NULL;
     struct tree_node_meta notif_meta = {NULL, (struct lysp_node **)&notifs};
 
     /* max subelems */
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_1;
+    YCTX->parsed_mod->version = LYS_VERSION_1_1;
     data = ELEMENT_WRAPPER_START
             "<notification name=\"notif-name\">\n"
             "    <anydata name=\"anyd\"/>\n"
@@ -3047,7 +2628,7 @@
             EXT_SUBELEM
             "</notification>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &notif_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &notif_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(notifs->name, "notif-name");
     assert_string_equal(notifs->data->name, "anyd");
     assert_int_equal(notifs->data->nodetype, LYS_ANYDATA);
@@ -3075,26 +2656,21 @@
     assert_null(notifs->parent);
     assert_string_equal(notifs->ref, "ref");
     assert_string_equal(notifs->typedefs->name, "tpdf");
-    assert_string_equal(notifs->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(notifs->exts[0].insubstmt_index, 0);
-    assert_int_equal(notifs->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    FREE_ARRAY(st->ctx, notifs, lysp_notif_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(notifs->exts[0]),  LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, notifs, lysp_notif_free);
     notifs = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<notification name=\"notif-name\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &notif_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &notif_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(notifs->name, "notif-name");
-    FREE_ARRAY(st->ctx, notifs, lysp_notif_free);
+    FREE_ARRAY(UTEST_LYCTX, notifs, lysp_notif_free);
     notifs = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_grouping_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_grp *grps = NULL;
     struct tree_node_meta grp_meta = {NULL, (struct lysp_node **)&grps};
@@ -3120,7 +2696,7 @@
             EXT_SUBELEM
             "</grouping>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &grp_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &grp_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(grps->name, "grp-name");
     assert_string_equal(grps->data->name, "anyd");
     assert_string_equal(grps->data->next->name, "anyx");
@@ -3142,33 +2718,28 @@
     assert_int_equal(grps->data->next->next->next->next->next->next->nodetype, LYS_CONTAINER);
     assert_string_equal(grps->data->next->next->next->next->next->next->next->name, "choice");
     assert_int_equal(grps->data->next->next->next->next->next->next->next->nodetype, LYS_CHOICE);
-    assert_string_equal(grps->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(grps->exts[0].insubstmt_index, 0);
-    assert_int_equal(grps->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    FREE_ARRAY(st->ctx, grps, lysp_grp_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(grps->exts[0]),  LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, grps, lysp_grp_free);
     grps = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<grouping name=\"grp-name\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &grp_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &grp_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(grps->name, "grp-name");
-    FREE_ARRAY(st->ctx, grps, lysp_grp_free);
+    FREE_ARRAY(UTEST_LYCTX, grps, lysp_grp_free);
     grps = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_container_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_node *siblings = NULL;
     struct tree_node_meta node_meta = {NULL, &siblings};
     struct lysp_node_container *parsed = NULL;
 
     /* max subelems */
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_1;
+    YCTX->parsed_mod->version = LYS_VERSION_1_1;
     data = ELEMENT_WRAPPER_START
             "<container name=\"cont-name\">\n"
             "    <anydata name=\"anyd\"/>\n"
@@ -3194,19 +2765,16 @@
             EXT_SUBELEM
             "</container>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_container *)siblings;
-    assert_string_equal(parsed->name, "cont-name");
-    assert_null(parsed->parent);
-    assert_int_equal(parsed->nodetype, LYS_CONTAINER);
-    assert_true(parsed->flags & LYS_CONFIG_W);
-    assert_true(parsed->flags & LYS_STATUS_CURR);
-    assert_null(parsed->next);
-    assert_string_equal(parsed->dsc, "desc");
-    assert_string_equal(parsed->ref, "ref");
-    assert_string_equal(parsed->when->cond, "when-cond");
+    uint16_t flags = LYS_CONFIG_W | LYS_STATUS_CURR;
+
+    CHECK_LYSP_NODE(parsed, "desc", 1, flags, 1,
+            "cont-name", 0, LYS_CONTAINER, 0, "ref", 1);
+    CHECK_LYSP_RESTR(parsed->musts, "cond", NULL, NULL, NULL, 0, NULL);
+    CHECK_LYSP_WHEN(parsed->when, "when-cond", NULL, 0, NULL);
+
     assert_string_equal(parsed->iffeatures[0].str, "iff");
-    assert_string_equal(parsed->musts->arg.str, "cond");
     assert_string_equal(parsed->presence, "presence");
     assert_string_equal(parsed->typedefs->name, "tpdf");
     assert_string_equal(parsed->groupings->name, "sub-grp");
@@ -3229,35 +2797,31 @@
     assert_null(parsed->child->next->next->next->next->next->next->next->next);
     assert_string_equal(parsed->notifs->name, "notf");
     assert_string_equal(parsed->actions->name, "act");
-    assert_string_equal(parsed->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(parsed->exts[0].insubstmt_index, 0);
-    assert_int_equal(parsed->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_node_free(st->ctx, siblings);
-    ly_set_erase(&st->yin_ctx->tpdfs_nodes, NULL);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(parsed->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_node_free(UTEST_LYCTX, siblings);
+    ly_set_erase(&YCTX->tpdfs_nodes, NULL);
     siblings = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<container name=\"cont-name\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_container *)siblings;
-    assert_string_equal(parsed->name, "cont-name");
-    lysp_node_free(st->ctx, siblings);
+    CHECK_LYSP_NODE(parsed, NULL, 0, 0, 0,
+            "cont-name", 0, LYS_CONTAINER, 0, NULL, 0);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_case_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_node *siblings = NULL;
     struct tree_node_meta node_meta = {NULL, &siblings};
     struct lysp_node_case *parsed = NULL;
 
     /* max subelems */
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_1;
+    YCTX->parsed_mod->version = LYS_VERSION_1_1;
     data = ELEMENT_WRAPPER_START
             "<case name=\"case-name\">\n"
             "    <anydata name=\"anyd\"/>\n"
@@ -3276,16 +2840,13 @@
             EXT_SUBELEM
             "</case>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_case *)siblings;
-    assert_string_equal(parsed->name, "case-name");
-    assert_null(parsed->parent);
-    assert_int_equal(parsed->nodetype, LYS_CASE);
-    assert_true(parsed->flags & LYS_STATUS_CURR);
-    assert_null(parsed->next);
-    assert_string_equal(parsed->dsc, "desc");
-    assert_string_equal(parsed->ref, "ref");
-    assert_string_equal(parsed->when->cond, "when-cond");
+    uint16_t flags = LYS_STATUS_CURR;
+
+    CHECK_LYSP_NODE(parsed, "desc", 1, flags, 1,
+            "case-name", 0, LYS_CASE, 0, "ref", 1);
+    CHECK_LYSP_WHEN(parsed->when, "when-cond", NULL, 0, NULL);
     assert_string_equal(parsed->iffeatures[0].str, "iff");
     assert_string_equal(parsed->child->name, "anyd");
     assert_int_equal(parsed->child->nodetype, LYS_ANYDATA);
@@ -3304,34 +2865,30 @@
     assert_string_equal(parsed->child->next->next->next->next->next->next->next->name, "choice");
     assert_int_equal(parsed->child->next->next->next->next->next->next->next->nodetype, LYS_CHOICE);
     assert_null(parsed->child->next->next->next->next->next->next->next->next);
-    assert_string_equal(parsed->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(parsed->exts[0].insubstmt_index, 0);
-    assert_int_equal(parsed->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_node_free(st->ctx, siblings);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(parsed->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<case name=\"case-name\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_case *)siblings;
-    assert_string_equal(parsed->name, "case-name");
-    lysp_node_free(st->ctx, siblings);
+    CHECK_LYSP_NODE(parsed, NULL, 0, 0, 0,
+            "case-name", 0, LYS_CASE, 0, NULL, 0);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_choice_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_node *siblings = NULL;
     struct tree_node_meta node_meta = {NULL, &siblings};
     struct lysp_node_choice *parsed = NULL;
 
     /* max subelems */
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_1;
+    YCTX->parsed_mod->version = LYS_VERSION_1_1;
     data = ELEMENT_WRAPPER_START
             "<choice name=\"choice-name\">\n"
             "    <anydata name=\"anyd\"/>\n"
@@ -3353,16 +2910,13 @@
             EXT_SUBELEM
             "</choice>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_choice *)siblings;
-    assert_string_equal(parsed->name, "choice-name");
-    assert_null(parsed->parent);
-    assert_int_equal(parsed->nodetype, LYS_CHOICE);
-    assert_true(parsed->flags & LYS_CONFIG_W && parsed->flags & LYS_MAND_TRUE && parsed->flags & LYS_STATUS_CURR);
-    assert_null(parsed->next);
-    assert_string_equal(parsed->dsc, "desc");
-    assert_string_equal(parsed->ref, "ref");
-    assert_string_equal(parsed->when->cond, "when-cond");
+    uint16_t flags = LYS_CONFIG_W | LYS_MAND_TRUE | LYS_STATUS_CURR;
+
+    CHECK_LYSP_NODE(parsed, "desc", 1, flags, 1,
+            "choice-name", 0, LYS_CHOICE, 0, "ref", 1);
+    CHECK_LYSP_WHEN(parsed->when, "when-cond", NULL, 0, NULL);
     assert_string_equal(parsed->iffeatures[0].str, "iff");
     assert_string_equal(parsed->child->name, "anyd");
     assert_int_equal(parsed->child->nodetype, LYS_ANYDATA);
@@ -3381,33 +2935,30 @@
     assert_string_equal(parsed->child->next->next->next->next->next->next->next->name, "list");
     assert_int_equal(parsed->child->next->next->next->next->next->next->next->nodetype, LYS_LIST);
     assert_null(parsed->child->next->next->next->next->next->next->next->next);
-    assert_string_equal(parsed->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(parsed->exts[0].insubstmt_index, 0);
-    assert_int_equal(parsed->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_node_free(st->ctx, siblings);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(parsed->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<choice name=\"choice-name\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &node_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &node_meta, NULL, NULL), LY_SUCCESS);
     parsed = (struct lysp_node_choice *)siblings;
     assert_string_equal(parsed->name, "choice-name");
-    lysp_node_free(st->ctx, siblings);
+    CHECK_LYSP_NODE(parsed, NULL, 0, 0, 0,
+            "choice-name", 0, LYS_CHOICE, 0, NULL, 0);
+    lysp_node_free(UTEST_LYCTX, siblings);
     siblings = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_inout_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_action_inout inout = {};
     struct inout_meta inout_meta = {NULL, &inout};
 
     /* max subelements */
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_1;
+    YCTX->parsed_mod->version = LYS_VERSION_1_1;
     data = ELEMENT_WRAPPER_START
             "<input>\n"
             "    <anydata name=\"anyd\"/>\n"
@@ -3424,10 +2975,9 @@
             EXT_SUBELEM
             "</input>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &inout_meta, NULL, NULL), LY_SUCCESS);
-    assert_null(inout.parent);
-    assert_int_equal(inout.nodetype, LYS_INPUT);
-    assert_string_equal(inout.musts->arg.str, "cond");
+    assert_int_equal(test_element_helper(state, data, &inout_meta, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_ACTION_INOUT(&(inout), 1, 1, 1, 1, LYS_INPUT, 0, 1);
+    CHECK_LYSP_RESTR(inout.musts, "cond", NULL, NULL, NULL, 0, NULL);
     assert_string_equal(inout.typedefs->name, "tpdf");
     assert_string_equal(inout.groupings->name, "sub-grp");
     assert_string_equal(inout.data->name, "anyd");
@@ -3447,14 +2997,12 @@
     assert_string_equal(inout.data->next->next->next->next->next->next->next->name, "uses-name");
     assert_int_equal(inout.data->next->next->next->next->next->next->next->nodetype, LYS_USES);
     assert_null(inout.data->next->next->next->next->next->next->next->next);
-    assert_string_equal(inout.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(inout.exts[0].insubstmt_index, 0);
-    assert_int_equal(inout.exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_action_inout_free(st->ctx, &inout);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(inout.exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_action_inout_free(UTEST_LYCTX, &inout);
     memset(&inout, 0, sizeof inout);
 
     /* max subelements */
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_1;
+    YCTX->parsed_mod->version = LYS_VERSION_1_1;
     data = ELEMENT_WRAPPER_START
             "<output>\n"
             "    <anydata name=\"anyd\"/>\n"
@@ -3471,9 +3019,8 @@
             EXT_SUBELEM
             "</output>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &inout_meta, NULL, NULL), LY_SUCCESS);
-    assert_null(inout.parent);
-    assert_int_equal(inout.nodetype, LYS_OUTPUT);
+    assert_int_equal(test_element_helper(state, data, &inout_meta, NULL, NULL), LY_SUCCESS);
+    CHECK_LYSP_ACTION_INOUT(&(inout), 1, 1, 1, 1, LYS_OUTPUT, 0, 1);
     assert_string_equal(inout.musts->arg.str, "cond");
     assert_string_equal(inout.typedefs->name, "tpdf");
     assert_string_equal(inout.groupings->name, "sub-grp");
@@ -3494,42 +3041,38 @@
     assert_string_equal(inout.data->next->next->next->next->next->next->next->name, "uses-name");
     assert_int_equal(inout.data->next->next->next->next->next->next->next->nodetype, LYS_USES);
     assert_null(inout.data->next->next->next->next->next->next->next->next);
-    assert_string_equal(inout.exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(inout.exts[0].insubstmt_index, 0);
-    assert_int_equal(inout.exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_action_inout_free(st->ctx, &inout);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(inout.exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_action_inout_free(UTEST_LYCTX, &inout);
     memset(&inout, 0, sizeof inout);
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<input><leaf name=\"l\"><type name=\"empty\"/></leaf></input>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &inout_meta, NULL, NULL), LY_SUCCESS);
-    lysp_action_inout_free(st->ctx, &inout);
+    assert_int_equal(test_element_helper(state, data, &inout_meta, NULL, NULL), LY_SUCCESS);
+    lysp_action_inout_free(UTEST_LYCTX, &inout);
     memset(&inout, 0, sizeof inout);
 
     data = ELEMENT_WRAPPER_START "<output><leaf name=\"l\"><type name=\"empty\"/></leaf></output>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &inout_meta, NULL, NULL), LY_SUCCESS);
-    lysp_action_inout_free(st->ctx, &inout);
+    assert_int_equal(test_element_helper(state, data, &inout_meta, NULL, NULL), LY_SUCCESS);
+    lysp_action_inout_free(UTEST_LYCTX, &inout);
     memset(&inout, 0, sizeof inout);
 
     /* invalid combinations */
     data = ELEMENT_WRAPPER_START "<input name=\"test\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &inout_meta, NULL, NULL), LY_EVALID);
-    logbuf_assert("Unexpected attribute \"name\" of \"input\" element. Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &inout_meta, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Unexpected attribute \"name\" of \"input\" element.", "Line number 1.");
     memset(&inout, 0, sizeof inout);
-
-    st->finished_correctly = true;
 }
 
 static void
 test_action_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_action *actions = NULL;
     struct tree_node_meta act_meta = {NULL, (struct lysp_node **)&actions};
+    uint16_t flags;
 
     /* max subelems */
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_1;
+    YCTX->parsed_mod->version = LYS_VERSION_1_1;
     data = ELEMENT_WRAPPER_START
             "<action name=\"act\">\n"
             "    <description><text>desc</text></description>\n"
@@ -3545,26 +3088,27 @@
             ELEMENT_WRAPPER_END;
     /* there must be parent for action */
     act_meta.parent = (void *)1;
-    assert_int_equal(test_element_helper(st, data, &act_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &act_meta, NULL, NULL), LY_SUCCESS);
     act_meta.parent = NULL;
-    assert_non_null(actions->parent);
-    assert_int_equal(actions->nodetype, LYS_ACTION);
-    assert_true(actions->flags & LYS_STATUS_DEPRC);
-    assert_string_equal(actions->name, "act");
-    assert_string_equal(actions->dsc, "desc");
-    assert_string_equal(actions->ref, "ref");
+    flags = LYS_STATUS_DEPRC;
+    CHECK_LYSP_ACTION(actions, "desc", 1, flags, 1, 1,\
+            1, 0, 0, 0,\
+            1, 0,\
+            "act", LYS_ACTION, \
+            1, 0, 0, 1,\
+            1, 0,\
+            1, "ref", 1);
+
     assert_string_equal(actions->iffeatures[0].str, "iff");
     assert_string_equal(actions->typedefs->name, "tpdf");
     assert_string_equal(actions->groupings->name, "grouping");
-    assert_string_equal(actions->input.data->name, "uses-name");
     assert_string_equal(actions->output.musts->arg.str, "cond");
-    assert_string_equal(actions->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(actions->exts[0].insubstmt_index, 0);
-    assert_int_equal(actions->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    FREE_ARRAY(st->ctx, actions, lysp_action_free)
+    assert_string_equal(actions->input.data->name, "uses-name");
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(actions->exts[0]),  LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, actions, lysp_action_free)
     actions = NULL;
 
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_1;
+    YCTX->parsed_mod->version = LYS_VERSION_1_1;
     data = ELEMENT_WRAPPER_START
             "<rpc name=\"act\">\n"
             "    <description><text>desc</text></description>\n"
@@ -3578,43 +3122,41 @@
             EXT_SUBELEM
             "</rpc>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &act_meta, NULL, NULL), LY_SUCCESS);
-    assert_null(actions->parent);
-    assert_int_equal(actions->nodetype, LYS_RPC);
-    assert_true(actions->flags & LYS_STATUS_DEPRC);
-    assert_string_equal(actions->name, "act");
-    assert_string_equal(actions->dsc, "desc");
-    assert_string_equal(actions->ref, "ref");
+    assert_int_equal(test_element_helper(state, data, &act_meta, NULL, NULL), LY_SUCCESS);
+    flags = LYS_STATUS_DEPRC;
+    CHECK_LYSP_ACTION(actions, "desc", 1, flags, 1, 1,\
+            1, 0, 0, 0,\
+            1, 0,\
+            "act", LYS_RPC, \
+            1, 0, 0, 1,\
+            1, 0,\
+            0, "ref", 1);
+
     assert_string_equal(actions->iffeatures[0].str, "iff");
     assert_string_equal(actions->typedefs->name, "tpdf");
     assert_string_equal(actions->groupings->name, "grouping");
     assert_string_equal(actions->input.data->name, "uses-name");
     assert_string_equal(actions->output.musts->arg.str, "cond");
-    assert_string_equal(actions->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(actions->exts[0].insubstmt_index, 0);
-    assert_int_equal(actions->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    FREE_ARRAY(st->ctx, actions, lysp_action_free)
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(actions->exts[0]),  LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, actions, lysp_action_free)
     actions = NULL;
 
     /* min subelems */
     data = ELEMENT_WRAPPER_START "<action name=\"act\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &act_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &act_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(actions->name, "act");
-    FREE_ARRAY(st->ctx, actions, lysp_action_free)
+    FREE_ARRAY(UTEST_LYCTX, actions, lysp_action_free)
     actions = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_augment_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_augment *augments = NULL;
     struct tree_node_meta aug_meta = {NULL, (struct lysp_node **)&augments};
 
-    st->yin_ctx->parsed_mod->version = LYS_VERSION_1_1;
+    YCTX->parsed_mod->version = LYS_VERSION_1_1;
     data = ELEMENT_WRAPPER_START
             "<augment target-node=\"target\">\n"
             "    <action name=\"action\"/>\n"
@@ -3636,7 +3178,7 @@
             EXT_SUBELEM
             "</augment>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &aug_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &aug_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(augments->nodeid, "target");
     assert_null(augments->parent);
     assert_int_equal(augments->nodetype, LYS_AUGMENT);
@@ -3666,25 +3208,20 @@
     assert_null(augments->child->next->next->next->next->next->next->next->next->next);
     assert_string_equal(augments->actions->name, "action");
     assert_string_equal(augments->notifs->name, "notif");
-    assert_string_equal(augments->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(augments->exts[0].insubstmt_index, 0);
-    assert_int_equal(augments->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    FREE_ARRAY(st->ctx, augments, lysp_augment_free)
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(augments->exts[0]),  LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, augments, lysp_augment_free)
     augments = NULL;
 
     data = ELEMENT_WRAPPER_START "<augment target-node=\"target\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &aug_meta, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &aug_meta, NULL, NULL), LY_SUCCESS);
     assert_string_equal(augments->nodeid, "target");
-    FREE_ARRAY(st->ctx, augments, lysp_augment_free)
+    FREE_ARRAY(UTEST_LYCTX, augments, lysp_augment_free)
     augments = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_deviate_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_deviate *deviates = NULL;
     struct lysp_deviate_add *d_add;
@@ -3693,30 +3230,30 @@
 
     /* all valid arguments with min subelems */
     data = ELEMENT_WRAPPER_START "<deviate value=\"not-supported\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_SUCCESS);
     assert_int_equal(deviates->mod, LYS_DEV_NOT_SUPPORTED);
-    lysp_deviate_free(st->ctx, deviates);
+    lysp_deviate_free(UTEST_LYCTX, deviates);
     free(deviates);
     deviates = NULL;
 
     data = ELEMENT_WRAPPER_START "<deviate value=\"add\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_SUCCESS);
     assert_int_equal(deviates->mod, LYS_DEV_ADD);
-    lysp_deviate_free(st->ctx, deviates);
+    lysp_deviate_free(UTEST_LYCTX, deviates);
     free(deviates);
     deviates = NULL;
 
     data = ELEMENT_WRAPPER_START "<deviate value=\"replace\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_SUCCESS);
     assert_int_equal(deviates->mod, LYS_DEV_REPLACE);
-    lysp_deviate_free(st->ctx, deviates);
+    lysp_deviate_free(UTEST_LYCTX, deviates);
     free(deviates);
     deviates = NULL;
 
     data = ELEMENT_WRAPPER_START "<deviate value=\"delete\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_SUCCESS);
     assert_int_equal(deviates->mod, LYS_DEV_DELETE);
-    lysp_deviate_free(st->ctx, deviates);
+    lysp_deviate_free(UTEST_LYCTX, deviates);
     free(deviates);
     deviates = NULL;
 
@@ -3726,12 +3263,10 @@
             EXT_SUBELEM
             "</deviate>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_SUCCESS);
     assert_int_equal(deviates->mod, LYS_DEV_NOT_SUPPORTED);
-    assert_string_equal(deviates->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(deviates->exts[0].insubstmt_index, 0);
-    assert_int_equal(deviates->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_deviate_free(st->ctx, deviates);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(deviates->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_deviate_free(UTEST_LYCTX, deviates);
     free(deviates);
     deviates = NULL;
 
@@ -3748,7 +3283,7 @@
             EXT_SUBELEM
             "</deviate>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_SUCCESS);
     d_add = (struct lysp_deviate_add *)deviates;
     assert_int_equal(d_add->mod, LYS_DEV_ADD);
     assert_null(d_add->next);
@@ -3756,13 +3291,11 @@
     assert_string_equal(d_add->musts->arg.str, "cond");
     assert_string_equal(d_add->uniques[0].str, "utag");
     assert_string_equal(d_add->dflts[0].str, "def");
-    assert_true(d_add->flags & LYS_MAND_TRUE && d_add->flags & LYS_CONFIG_W);
+    assert_true((d_add->flags & LYS_MAND_TRUE) && (d_add->flags & LYS_CONFIG_W));
     assert_int_equal(d_add->min, 5);
     assert_int_equal(d_add->max, 15);
-    assert_string_equal(deviates->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(deviates->exts[0].insubstmt_index, 0);
-    assert_int_equal(deviates->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_deviate_free(st->ctx, deviates);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(deviates->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_deviate_free(UTEST_LYCTX, deviates);
     free(deviates);
     deviates = NULL;
 
@@ -3778,20 +3311,18 @@
             EXT_SUBELEM
             "</deviate>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_SUCCESS);
     d_rpl = (struct lysp_deviate_rpl *)deviates;
     assert_int_equal(d_rpl->mod, LYS_DEV_REPLACE);
     assert_null(d_rpl->next);
     assert_string_equal(d_rpl->type->name, "newtype");
     assert_string_equal(d_rpl->units, "uni");
     assert_string_equal(d_rpl->dflt.str, "def");
-    assert_true(d_rpl->flags & LYS_MAND_TRUE && d_rpl->flags & LYS_CONFIG_W);
+    assert_true((d_rpl->flags & LYS_MAND_TRUE) && (d_rpl->flags & LYS_CONFIG_W));
     assert_int_equal(d_rpl->min, 5);
     assert_int_equal(d_rpl->max, 15);
-    assert_string_equal(deviates->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(deviates->exts[0].insubstmt_index, 0);
-    assert_int_equal(deviates->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_deviate_free(st->ctx, deviates);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(deviates->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_deviate_free(UTEST_LYCTX, deviates);
     free(deviates);
     deviates = NULL;
 
@@ -3804,7 +3335,7 @@
             EXT_SUBELEM
             "</deviate>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_SUCCESS);
     d_del = (struct lysp_deviate_del *)deviates;
     assert_int_equal(d_del->mod, LYS_DEV_DELETE);
     assert_null(d_del->next);
@@ -3812,32 +3343,34 @@
     assert_string_equal(d_del->musts->arg.str, "c");
     assert_string_equal(d_del->uniques[0].str, "tag");
     assert_string_equal(d_del->dflts[0].str, "default");
-    assert_string_equal(deviates->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(deviates->exts[0].insubstmt_index, 0);
-    assert_int_equal(deviates->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    lysp_deviate_free(st->ctx, deviates);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(deviates->exts[0]),  LYEXT_SUBSTMT_SELF);
+    lysp_deviate_free(UTEST_LYCTX, deviates);
     free(deviates);
     deviates = NULL;
 
     /* invalid arguments */
     data = ELEMENT_WRAPPER_START "<deviate value=\"\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"\" of \"value\" attribute in \"deviate\" element. Valid values are \"not-supported\", \"add\", \"replace\" and \"delete\". Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"\" of \"value\" attribute in \"deviate\" element. "
+            "Valid values are \"not-supported\", \"add\", \"replace\" and \"delete\".", "Line number 1.");
     deviates = NULL;
 
     data = ELEMENT_WRAPPER_START "<deviate value=\"invalid\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"invalid\" of \"value\" attribute in \"deviate\" element. Valid values are \"not-supported\", \"add\", \"replace\" and \"delete\". Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"invalid\" of \"value\" attribute in \"deviate\" element. "
+            "Valid values are \"not-supported\", \"add\", \"replace\" and \"delete\".", "Line number 1.");
     deviates = NULL;
 
     data = ELEMENT_WRAPPER_START "<deviate value=\"ad\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"ad\" of \"value\" attribute in \"deviate\" element. Valid values are \"not-supported\", \"add\", \"replace\" and \"delete\". Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"ad\" of \"value\" attribute in \"deviate\" element. "
+            "Valid values are \"not-supported\", \"add\", \"replace\" and \"delete\".", "Line number 1.");
     deviates = NULL;
 
     data = ELEMENT_WRAPPER_START "<deviate value=\"adds\" />" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_EVALID);
-    logbuf_assert("Invalid value \"adds\" of \"value\" attribute in \"deviate\" element. Valid values are \"not-supported\", \"add\", \"replace\" and \"delete\". Line number 1.");
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid value \"adds\" of \"value\" attribute in \"deviate\" element. "
+            "Valid values are \"not-supported\", \"add\", \"replace\" and \"delete\".", "Line number 1.");
     deviates = NULL;
 
     data = ELEMENT_WRAPPER_START
@@ -3845,16 +3378,13 @@
             "    <must condition=\"c\"/>\n"
             "</deviate>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviates, NULL, NULL), LY_EVALID);
-    logbuf_assert("Deviate of this type doesn't allow \"must\" as it's sub-element. Line number 2.");
-
-    st->finished_correctly = true;
+    assert_int_equal(test_element_helper(state, data, &deviates, NULL, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Deviate of this type doesn't allow \"must\" as it's sub-element.", "Line number 2.");
 }
 
 static void
 test_deviation_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lysp_deviation *deviations = NULL;
 
@@ -3864,10 +3394,10 @@
             "    <deviate value=\"not-supported\"/>\n"
             "</deviation>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviations, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &deviations, NULL, NULL), LY_SUCCESS);
     assert_string_equal(deviations->nodeid, "target");
     assert_int_equal(deviations->deviates->mod, LYS_DEV_NOT_SUPPORTED);
-    FREE_ARRAY(st->ctx, deviations, lysp_deviation_free);
+    FREE_ARRAY(UTEST_LYCTX, deviations, lysp_deviation_free);
     deviations = NULL;
 
     /* max subelems */
@@ -3879,26 +3409,22 @@
             EXT_SUBELEM
             "</deviation>"
             ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviations, NULL, NULL), LY_SUCCESS);
+    assert_int_equal(test_element_helper(state, data, &deviations, NULL, NULL), LY_SUCCESS);
     assert_string_equal(deviations->nodeid, "target");
     assert_int_equal(deviations->deviates->mod, LYS_DEV_ADD);
     assert_string_equal(deviations->ref, "ref");
     assert_string_equal(deviations->dsc, "desc");
-    assert_string_equal(deviations->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(deviations->exts[0].insubstmt_index, 0);
-    assert_int_equal(deviations->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
-    FREE_ARRAY(st->ctx, deviations, lysp_deviation_free);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(deviations->exts[0]),  LYEXT_SUBSTMT_SELF);
+    FREE_ARRAY(UTEST_LYCTX, deviations, lysp_deviation_free);
     deviations = NULL;
 
     /* invalid */
     data = ELEMENT_WRAPPER_START "<deviation target-node=\"target\"/>" ELEMENT_WRAPPER_END;
-    assert_int_equal(test_element_helper(st, data, &deviations, NULL, NULL), LY_EVALID);
-    FREE_ARRAY(st->ctx, deviations, lysp_deviation_free);
+    assert_int_equal(test_element_helper(state, data, &deviations, NULL, NULL), LY_EVALID);
+    FREE_ARRAY(UTEST_LYCTX, deviations, lysp_deviation_free);
     deviations = NULL;
-    logbuf_assert("Missing mandatory sub-element \"deviate\" of \"deviation\" element. Line number 1.");
-    /* TODO */
-    st->finished_correctly = true;
-}
+    CHECK_LOG_CTX("Missing mandatory sub-element \"deviate\" of \"deviation\" element.", "Line number 1.");
+    /* TODO */}
 
 static struct lysp_module *
 mod_renew(struct lys_yin_parser_ctx *ctx)
@@ -3917,9 +3443,8 @@
 static void
 test_module_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
-    struct lysp_module *lysp_mod = mod_renew(st->yin_ctx);
+    struct lysp_module *lysp_mod = mod_renew(YCTX);
 
     /* max subelems */
     data = "<module xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\" name=\"mod\">\n"
@@ -3954,10 +3479,10 @@
             "    <typedef name=\"tpdf\"> <type name=\"type\"/> </typedef>\n"
             EXT_SUBELEM "\n"
             "</module>\n";
-    assert_int_equal(ly_in_new_memory(data, &st->in), LY_SUCCESS);
-    assert_int_equal(lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx), LY_SUCCESS);
+    assert_int_equal(ly_in_new_memory(data, &UTEST_IN), LY_SUCCESS);
+    assert_int_equal(lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx), LY_SUCCESS);
 
-    assert_int_equal(yin_parse_mod(st->yin_ctx, lysp_mod), LY_SUCCESS);
+    assert_int_equal(yin_parse_mod(YCTX, lysp_mod), LY_SUCCESS);
     assert_string_equal(lysp_mod->mod->name, "mod");
     assert_string_equal(lysp_mod->revs, "2019-02-02");
     assert_string_equal(lysp_mod->mod->ns, "ns");
@@ -3968,7 +3493,8 @@
     assert_string_equal(lysp_mod->mod->dsc, "desc");
     assert_string_equal(lysp_mod->mod->ref, "ref");
     assert_int_equal(lysp_mod->version, LYS_VERSION_1_1);
-    assert_string_equal(lysp_mod->imports->name, "a-mod");
+    CHECK_LYSP_IMPORT(lysp_mod->imports, NULL, 0, "a-mod",
+            "imp-pref", NULL, "");
     assert_string_equal(lysp_mod->includes->name, "b-mod");
     assert_string_equal(lysp_mod->extensions->name, "ext");
     assert_string_equal(lysp_mod->features->name, "feature");
@@ -3996,40 +3522,36 @@
     assert_string_equal(lysp_mod->rpcs->name, "rpc-name");
     assert_string_equal(lysp_mod->notifs->name, "notf");
     assert_string_equal(lysp_mod->deviations->nodeid, "target");
-    assert_string_equal(lysp_mod->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(lysp_mod->exts[0].insubstmt_index, 0);
-    assert_int_equal(lysp_mod->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(lysp_mod->exts[0]), LYEXT_SUBSTMT_SELF);
 
     /* min subelems */
-    ly_in_free(st->in, 0);
-    lyxml_ctx_free(st->yin_ctx->xmlctx);
-    lysp_mod = mod_renew(st->yin_ctx);
+    ly_in_free(UTEST_IN, 0);
+    lyxml_ctx_free(YCTX->xmlctx);
+    lysp_mod = mod_renew(YCTX);
     data = "<module xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\" name=\"mod\">\n"
             "    <namespace uri=\"ns\"/>\n"
             "    <prefix value=\"pref\"/>\n"
             "    <yang-version value=\"1.1\"/>\n"
             "</module>";
-    assert_int_equal(ly_in_new_memory(data, &st->in), LY_SUCCESS);
-    assert_int_equal(lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx), LY_SUCCESS);
-    assert_int_equal(yin_parse_mod(st->yin_ctx, lysp_mod), LY_SUCCESS);
+    assert_int_equal(ly_in_new_memory(data, &UTEST_IN), LY_SUCCESS);
+    assert_int_equal(lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx), LY_SUCCESS);
+    assert_int_equal(yin_parse_mod(YCTX, lysp_mod), LY_SUCCESS);
     assert_string_equal(lysp_mod->mod->name, "mod");
 
     /* incorrect subelem order */
-    ly_in_free(st->in, 0);
-    lyxml_ctx_free(st->yin_ctx->xmlctx);
-    lysp_mod = mod_renew(st->yin_ctx);
+    ly_in_free(UTEST_IN, 0);
+    lyxml_ctx_free(YCTX->xmlctx);
+    lysp_mod = mod_renew(YCTX);
     data = "<module xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\" name=\"mod\">\n"
             "    <feature name=\"feature\"/>\n"
             "    <namespace uri=\"ns\"/>\n"
             "    <prefix value=\"pref\"/>\n"
             "    <yang-version value=\"1.1\"/>\n"
             "</module>";
-    assert_int_equal(ly_in_new_memory(data, &st->in), LY_SUCCESS);
-    assert_int_equal(lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx), LY_SUCCESS);
-    assert_int_equal(yin_parse_mod(st->yin_ctx, lysp_mod), LY_EVALID);
-    logbuf_assert("Invalid order of module\'s sub-elements \"namespace\" can\'t appear after \"feature\". Line number 3.");
-
-    st->finished_correctly = true;
+    assert_int_equal(ly_in_new_memory(data, &UTEST_IN), LY_SUCCESS);
+    assert_int_equal(lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx), LY_SUCCESS);
+    assert_int_equal(yin_parse_mod(YCTX, lysp_mod), LY_EVALID);
+    CHECK_LOG_CTX("Invalid order of module\'s sub-elements \"namespace\" can\'t appear after \"feature\".", "Line number 3.");
 }
 
 static struct lysp_submodule *
@@ -4050,9 +3572,8 @@
 static void
 test_submodule_elem(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
-    struct lysp_submodule *lysp_submod = submod_renew(st->yin_ctx, "module-name");
+    struct lysp_submodule *lysp_submod = submod_renew(YCTX, "module-name");
 
     /* max subelements */
     data = "<submodule xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\" name=\"mod\">\n"
@@ -4088,10 +3609,10 @@
             "    <typedef name=\"tpdf\"> <type name=\"type\"/> </typedef>\n"
             EXT_SUBELEM "\n"
             "</submodule>\n";
-    assert_int_equal(ly_in_new_memory(data, &st->in), LY_SUCCESS);
-    assert_int_equal(lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx), LY_SUCCESS);
+    assert_int_equal(ly_in_new_memory(data, &UTEST_IN), LY_SUCCESS);
+    assert_int_equal(lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx), LY_SUCCESS);
 
-    assert_int_equal(yin_parse_submod(st->yin_ctx, lysp_submod), LY_SUCCESS);
+    assert_int_equal(yin_parse_submod(YCTX, lysp_submod), LY_SUCCESS);
     assert_string_equal(lysp_submod->name, "mod");
     assert_string_equal(lysp_submod->revs, "2019-02-02");
     assert_string_equal(lysp_submod->prefix, "pref");
@@ -4101,7 +3622,8 @@
     assert_string_equal(lysp_submod->dsc, "desc");
     assert_string_equal(lysp_submod->ref, "ref");
     assert_int_equal(lysp_submod->version, LYS_VERSION_1_1);
-    assert_string_equal(lysp_submod->imports->name, "a-mod");
+    CHECK_LYSP_IMPORT(lysp_submod->imports, NULL, 0, "a-mod",
+            "imp-pref", NULL, "");
     assert_string_equal(lysp_submod->includes->name, "b-mod");
     assert_string_equal(lysp_submod->extensions->name, "ext");
     assert_string_equal(lysp_submod->features->name, "feature");
@@ -4129,45 +3651,40 @@
     assert_string_equal(lysp_submod->rpcs->name, "rpc-name");
     assert_string_equal(lysp_submod->notifs->name, "notf");
     assert_string_equal(lysp_submod->deviations->nodeid, "target");
-    assert_string_equal(lysp_submod->exts[0].name, "urn:example:extensions:c-define");
-    assert_int_equal(lysp_submod->exts[0].insubstmt_index, 0);
-    assert_int_equal(lysp_submod->exts[0].insubstmt, LYEXT_SUBSTMT_SELF);
+    TEST_1_CHECK_LYSP_EXT_INSTANCE(&(lysp_submod->exts[0]), LYEXT_SUBSTMT_SELF);
 
     /* min subelemnts */
-    ly_in_free(st->in, 0);
-    lyxml_ctx_free(st->yin_ctx->xmlctx);
-    lysp_submod = submod_renew(st->yin_ctx, "module-name");
+    ly_in_free(UTEST_IN, 0);
+    lyxml_ctx_free(YCTX->xmlctx);
+    lysp_submod = submod_renew(YCTX, "module-name");
     data = "<submodule xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\" name=\"submod\">\n"
             "    <yang-version value=\"1\"/>\n"
             "    <belongs-to module=\"module-name\"><prefix value=\"pref\"/></belongs-to>\n"
             "</submodule>";
-    assert_int_equal(ly_in_new_memory(data, &st->in), LY_SUCCESS);
-    assert_int_equal(lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx), LY_SUCCESS);
-    assert_int_equal(yin_parse_submod(st->yin_ctx, lysp_submod), LY_SUCCESS);
+    assert_int_equal(ly_in_new_memory(data, &UTEST_IN), LY_SUCCESS);
+    assert_int_equal(lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx), LY_SUCCESS);
+    assert_int_equal(yin_parse_submod(YCTX, lysp_submod), LY_SUCCESS);
     assert_string_equal(lysp_submod->prefix, "pref");
     assert_int_equal(lysp_submod->version, LYS_VERSION_1_0);
 
     /* incorrect subelem order */
-    ly_in_free(st->in, 0);
-    lyxml_ctx_free(st->yin_ctx->xmlctx);
-    lysp_submod = submod_renew(st->yin_ctx, "module-name");
+    ly_in_free(UTEST_IN, 0);
+    lyxml_ctx_free(YCTX->xmlctx);
+    lysp_submod = submod_renew(YCTX, "module-name");
     data = "<submodule xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\" name=\"submod\">\n"
             "    <yang-version value=\"1\"/>\n"
             "    <reference><text>ref</text></reference>\n"
             "    <belongs-to module=\"module-name\"><prefix value=\"pref\"/></belongs-to>\n"
             "</submodule>";
-    assert_int_equal(ly_in_new_memory(data, &st->in), LY_SUCCESS);
-    assert_int_equal(lyxml_ctx_new(st->ctx, st->in, &st->yin_ctx->xmlctx), LY_SUCCESS);
-    assert_int_equal(yin_parse_submod(st->yin_ctx, lysp_submod), LY_EVALID);
-    logbuf_assert("Invalid order of submodule's sub-elements \"belongs-to\" can't appear after \"reference\". Line number 4.");
-
-    st->finished_correctly = true;
+    assert_int_equal(ly_in_new_memory(data, &UTEST_IN), LY_SUCCESS);
+    assert_int_equal(lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx), LY_SUCCESS);
+    assert_int_equal(yin_parse_submod(YCTX, lysp_submod), LY_EVALID);
+    CHECK_LOG_CTX("Invalid order of submodule's sub-elements \"belongs-to\" can't appear after \"reference\".", "Line number 4.");
 }
 
 static void
 test_yin_parse_module(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lys_module *mod;
     struct lys_yin_parser_ctx *yin_ctx = NULL;
@@ -4175,7 +3692,7 @@
     struct lys_glob_unres unres = {0};
 
     mod = calloc(1, sizeof *mod);
-    mod->ctx = st->ctx;
+    mod->ctx = UTEST_LYCTX;
     data = "<module xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\" xmlns:md=\"urn:ietf:params:xml:ns:yang:ietf-yang-metadata\" name=\"a\"> \n"
             "    <yang-version value=\"1.1\"/>\n"
             "    <namespace uri=\"urn:tests:extensions:metadata:a\"/>\n"
@@ -4201,7 +3718,7 @@
     assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &unres), LY_SUCCESS);
     assert_null(mod->parsed->exts->child->next->child);
     assert_string_equal(mod->parsed->exts->child->next->arg, "test");
-    lys_compile_unres_glob_erase(st->ctx, &unres);
+    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
     lys_module_free(mod, NULL);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
@@ -4209,7 +3726,7 @@
     yin_ctx = NULL;
 
     mod = calloc(1, sizeof *mod);
-    mod->ctx = st->ctx;
+    mod->ctx = UTEST_LYCTX;
     data = "<module name=\"example-foo\""
             "    xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\""
             "    xmlns:foo=\"urn:example:foo\""
@@ -4240,7 +3757,7 @@
             "</module>\n";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
     assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &unres), LY_SUCCESS);
-    lys_compile_unres_glob_erase(st->ctx, &unres);
+    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
     lys_module_free(mod, NULL);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
@@ -4248,7 +3765,7 @@
     yin_ctx = NULL;
 
     mod = calloc(1, sizeof *mod);
-    mod->ctx = st->ctx;
+    mod->ctx = UTEST_LYCTX;
     data = "<module name=\"example-foo\" xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\">\n"
             "    <yang-version value=\"1\"/>\n"
             "    <namespace uri=\"urn:example:foo\"/>\n"
@@ -4256,7 +3773,7 @@
             "</module>\n";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
     assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &unres), LY_SUCCESS);
-    lys_compile_unres_glob_erase(st->ctx, &unres);
+    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
     lys_module_free(mod, NULL);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
@@ -4264,18 +3781,18 @@
     yin_ctx = NULL;
 
     mod = calloc(1, sizeof *mod);
-    mod->ctx = st->ctx;
+    mod->ctx = UTEST_LYCTX;
     data = "<submodule name=\"example-foo\" xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\">"
             "</submodule>\n";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
     assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &unres), LY_EINVAL);
-    logbuf_assert("Input data contains submodule which cannot be parsed directly without its main module.");
+    CHECK_LOG_CTX("Input data contains submodule which cannot be parsed directly without its main module.", NULL);
     lys_module_free(mod, NULL);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
 
     mod = calloc(1, sizeof *mod);
-    mod->ctx = st->ctx;
+    mod->ctx = UTEST_LYCTX;
     data = "<module name=\"example-foo\" xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\">\n"
             "    <yang-version value=\"1\"/>\n"
             "    <namespace uri=\"urn:example:foo\"/>\n"
@@ -4284,26 +3801,23 @@
             "<module>";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
     assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &unres), LY_EVALID);
-    logbuf_assert("Trailing garbage \"<module>\" after module, expected end-of-input. Line number 6.");
+    CHECK_LOG_CTX("Trailing garbage \"<module>\" after module, expected end-of-input.", "Line number 6.");
     lys_module_free(mod, NULL);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
     mod = NULL;
     yin_ctx = NULL;
-
-    st->finished_correctly = true;
 }
 
 static void
 test_yin_parse_submodule(void **state)
 {
-    struct test_parser_yin_state *st = *state;
     const char *data;
     struct lys_yin_parser_ctx *yin_ctx = NULL;
     struct lysp_submodule *submod = NULL;
     struct ly_in *in;
 
-    lydict_insert(st->ctx, "a", 0, &st->yin_ctx->parsed_mod->mod->name);
+    lydict_insert(UTEST_LYCTX, "a", 0, &YCTX->parsed_mod->mod->name);
 
     data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
             "<submodule name=\"asub\""
@@ -4330,7 +3844,7 @@
             "    </augment>\n"
             "</submodule>";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
-    assert_int_equal(yin_parse_submodule(&yin_ctx, st->ctx, (struct lys_parser_ctx *)st->yin_ctx, in, &submod), LY_SUCCESS);
+    assert_int_equal(yin_parse_submodule(&yin_ctx, UTEST_LYCTX, (struct lys_parser_ctx *)YCTX, in, &submod), LY_SUCCESS);
     lysp_module_free((struct lysp_module *)submod);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
@@ -4345,7 +3859,7 @@
             "    </belongs-to>\n"
             "</submodule>";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
-    assert_int_equal(yin_parse_submodule(&yin_ctx, st->ctx, (struct lys_parser_ctx *)st->yin_ctx, in, &submod), LY_SUCCESS);
+    assert_int_equal(yin_parse_submodule(&yin_ctx, UTEST_LYCTX, (struct lys_parser_ctx *)YCTX, in, &submod), LY_SUCCESS);
     lysp_module_free((struct lysp_module *)submod);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
@@ -4356,8 +3870,8 @@
             "<module name=\"inval\" xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\">"
             "</module>";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
-    assert_int_equal(yin_parse_submodule(&yin_ctx, st->ctx, (struct lys_parser_ctx *)st->yin_ctx, in, &submod), LY_EINVAL);
-    logbuf_assert("Input data contains module in situation when a submodule is expected.");
+    assert_int_equal(yin_parse_submodule(&yin_ctx, UTEST_LYCTX, (struct lys_parser_ctx *)YCTX, in, &submod), LY_EINVAL);
+    CHECK_LOG_CTX("Input data contains module in situation when a submodule is expected.", NULL);
     lysp_module_free((struct lysp_module *)submod);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
@@ -4378,15 +3892,13 @@
             "    </belongs-to>\n"
             "</submodule>";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
-    assert_int_equal(yin_parse_submodule(&yin_ctx, st->ctx, (struct lys_parser_ctx *)st->yin_ctx, in, &submod), LY_EVALID);
-    logbuf_assert("Trailing garbage \"<submodule name...\" after submodule, expected end-of-input. Line number 8.");
+    assert_int_equal(yin_parse_submodule(&yin_ctx, UTEST_LYCTX, (struct lys_parser_ctx *)YCTX, in, &submod), LY_EVALID);
+    CHECK_LOG_CTX("Trailing garbage \"<submodule name...\" after submodule, expected end-of-input.", "Line number 8.");
     lysp_module_free((struct lysp_module *)submod);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
     yin_ctx = NULL;
     submod = NULL;
-
-    st->finished_correctly = true;
 }
 
 int
@@ -4394,75 +3906,75 @@
 {
 
     const struct CMUnitTest tests[] = {
-        cmocka_unit_test_setup_teardown(test_yin_match_keyword, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_yin_parse_element_generic, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_yin_parse_extension_instance, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_yin_parse_content, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_validate_value, setup_f, teardown_f),
+        UTEST(test_yin_match_keyword, setup, teardown),
+        UTEST(test_yin_parse_element_generic, setup, teardown),
+        UTEST(test_yin_parse_extension_instance, setup, teardown),
+        UTEST(test_yin_parse_content, setup, teardown),
+        UTEST(test_validate_value, setup, teardown),
 
-        cmocka_unit_test(test_yin_match_argument_name),
-        cmocka_unit_test_setup_teardown(test_enum_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_bit_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_meta_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_import_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_status_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_ext_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_yin_element_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_yangversion_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_mandatory_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_argument_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_base_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_belongsto_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_config_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_default_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_err_app_tag_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_err_msg_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_fracdigits_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_iffeature_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_length_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_modifier_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_namespace_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_pattern_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_value_position_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_prefix_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_range_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_reqinstance_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_revision_date_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_unique_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_units_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_when_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_yin_text_value_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_type_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_max_elems_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_min_elems_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_ordby_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_any_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_leaf_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_leaf_list_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_presence_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_key_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_typedef_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_refine_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_uses_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_revision_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_include_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_list_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_notification_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_grouping_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_container_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_case_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_choice_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_inout_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_action_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_augment_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_deviate_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_deviation_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_module_elem, setup_element_test, teardown_f),
-        cmocka_unit_test_setup_teardown(test_submodule_elem, setup_element_test, teardown_f),
+        UTEST(test_yin_match_argument_name),
+        cmocka_unit_test_setup_teardown(test_enum_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_bit_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_meta_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_import_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_status_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_ext_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_yin_element_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_yangversion_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_mandatory_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_argument_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_base_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_belongsto_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_config_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_default_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_err_app_tag_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_err_msg_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_fracdigits_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_iffeature_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_length_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_modifier_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_namespace_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_pattern_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_value_position_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_prefix_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_range_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_reqinstance_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_revision_date_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_unique_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_units_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_when_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_yin_text_value_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_type_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_max_elems_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_min_elems_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_ordby_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_any_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_leaf_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_leaf_list_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_presence_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_key_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_typedef_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_refine_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_uses_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_revision_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_include_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_list_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_notification_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_grouping_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_container_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_case_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_choice_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_inout_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_action_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_augment_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_deviate_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_deviation_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_module_elem, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_submodule_elem, setup, teardown),
 
-        cmocka_unit_test_setup_teardown(test_yin_parse_module, setup_f, teardown_f),
-        cmocka_unit_test_setup_teardown(test_yin_parse_submodule, setup_f, teardown_f),
+        cmocka_unit_test_setup_teardown(test_yin_parse_module, setup, teardown),
+        cmocka_unit_test_setup_teardown(test_yin_parse_submodule, setup, teardown),
     };
 
-    return cmocka_run_group_tests(tests, setup_ly_ctx, destroy_ly_ctx);
+    return cmocka_run_group_tests(tests, NULL, NULL);
 }
diff --git a/tests/utests/schema/test_printer_yang.c b/tests/utests/schema/test_printer_yang.c
index 4296c05..124bb28 100644
--- a/tests/utests/schema/test_printer_yang.c
+++ b/tests/utests/schema/test_printer_yang.c
@@ -3,7 +3,7 @@
  * @author: Radek Krejci <rkrejci@cesnet.cz>
  * @brief unit tests for functions from printer_yang.c
  *
- * Copyright (c) 2019 CESNET, z.s.p.o.
+ * Copyright (c) 2019-2020 CESNET, z.s.p.o.
  *
  * This source code is licensed under BSD 3-Clause License (the "License").
  * You may not use this file except in compliance with the License.
@@ -11,80 +11,18 @@
  *
  *     https://opensource.org/licenses/BSD-3-Clause
  */
+#define _UTEST_MAIN_
+#include "utests.h"
 
 #include "common.h"
 #include "context.h"
 #include "out.h"
 #include "printer_schema.h"
 #include "tree_schema.h"
-#include "utests.h"
-
-#define BUFSIZE 1024
-char logbuf[BUFSIZE] = {0};
-int store = -1; /* negative for infinite logging, positive for limited logging */
-
-/* set to 0 to printing error messages to stderr instead of checking them in code */
-#define ENABLE_LOGGER_CHECKING 1
-
-#if ENABLE_LOGGER_CHECKING
-static void
-logger(LY_LOG_LEVEL level, const char *msg, const char *path)
-{
-    (void) level; /* unused */
-    if (store) {
-        if (path && path[0]) {
-            snprintf(logbuf, BUFSIZE - 1, "%s %s", msg, path);
-        } else {
-            strncpy(logbuf, msg, BUFSIZE - 1);
-        }
-        if (store > 0) {
-            --store;
-        }
-    }
-}
-
-#endif
-
-static int
-logger_setup(void **state)
-{
-    (void) state; /* unused */
-#if ENABLE_LOGGER_CHECKING
-    ly_set_log_clb(logger, 1);
-#endif
-    return 0;
-}
-
-static int
-logger_teardown(void **state)
-{
-    (void) state; /* unused */
-#if ENABLE_LOGGER_CHECKING
-    if (*state) {
-        fprintf(stderr, "%s\n", logbuf);
-    }
-#endif
-    return 0;
-}
-
-void
-logbuf_clean(void)
-{
-    logbuf[0] = '\0';
-}
-
-#if ENABLE_LOGGER_CHECKING
-#   define logbuf_assert(str) assert_string_equal(logbuf, str)
-#else
-#   define logbuf_assert(str)
-#endif
 
 static void
 test_module(void **state)
 {
-    *state = test_module;
-
-    struct ly_ctx *ctx = {0};
     const struct lys_module *mod;
     const char *orig = "module a {\n"
             "  yang-version 1.1;\n"
@@ -125,9 +63,8 @@
     struct ly_out *out;
 
     assert_int_equal(LY_SUCCESS, ly_out_new_memory(&printed, 0, &out));
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, orig, LYS_IN_YANG, &mod));
+    UTEST_ADD_MODULE(orig, LYS_IN_YANG, NULL, &mod);
     assert_int_equal(LY_SUCCESS, lys_print_module(out, mod, LYS_OUT_YANG, 0, 0));
     assert_int_equal(strlen(orig), ly_out_printed(out));
     assert_string_equal(printed, orig);
@@ -167,7 +104,7 @@
             "  prefix b;\n\n"
             "  revision 2019-04-16;\n"
             "}\n";
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, orig, LYS_IN_YANG, &mod));
+    UTEST_ADD_MODULE(orig, LYS_IN_YANG, NULL, &mod);
     assert_int_equal(LY_SUCCESS, lys_print_module(out, mod, LYS_OUT_YANG, 0, 0));
     assert_int_equal(strlen(orig), ly_out_printed(out));
     assert_string_equal(printed, orig);
@@ -198,7 +135,7 @@
             "  namespace \"urn:test:c\";\n"
             "  prefix c;\n"
             "}\n";
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, orig, LYS_IN_YANG, &mod));
+    UTEST_ADD_MODULE(orig, LYS_IN_YANG, NULL, &mod);
     assert_int_equal(LY_SUCCESS, lys_print_module(out, mod, LYS_OUT_YANG, 0, 0));
     assert_int_equal(strlen(orig), ly_out_printed(out));
     assert_string_equal(printed, orig);
@@ -207,9 +144,7 @@
     assert_int_equal(strlen(compiled), ly_out_printed(out));
     assert_string_equal(printed, compiled);
 
-    *state = NULL;
     ly_out_free(out, NULL, 1);
-    ly_ctx_destroy(ctx, NULL);
 }
 
 static LY_ERR
@@ -226,9 +161,6 @@
 static void
 test_submodule(void **state)
 {
-    *state = test_submodule;
-
-    struct ly_ctx *ctx = {0};
     const struct lys_module *mod;
     const char *mod_yang = "module a {\n"
             "  yang-version 1.1;\n"
@@ -259,25 +191,23 @@
     struct ly_out *out;
 
     assert_int_equal(LY_SUCCESS, ly_out_new_memory(&printed, 0, &out));
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, submod_yang);
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, mod_yang, LYS_IN_YANG, &mod));
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, submod_yang);
+    UTEST_ADD_MODULE(mod_yang, LYS_IN_YANG, NULL, &mod);
     assert_int_equal(LY_SUCCESS, lys_print_submodule(out, mod, mod->parsed->includes[0].submodule, LYS_OUT_YANG, 0, 0));
     assert_int_equal(strlen(submod_yang), ly_out_printed(out));
     assert_string_equal(printed, submod_yang);
 
     *state = NULL;
     ly_out_free(out, NULL, 1);
-    ly_ctx_destroy(ctx, NULL);
 }
 
 int
 main(void)
 {
     const struct CMUnitTest tests[] = {
-        cmocka_unit_test_setup_teardown(test_module, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_submodule, logger_setup, logger_teardown),
+        UTEST(test_module),
+        UTEST(test_submodule),
     };
 
     return cmocka_run_group_tests(tests, NULL, NULL);
diff --git a/tests/utests/schema/test_printer_yin.c b/tests/utests/schema/test_printer_yin.c
index 3688faa..d1d42e8 100644
--- a/tests/utests/schema/test_printer_yin.c
+++ b/tests/utests/schema/test_printer_yin.c
@@ -3,7 +3,7 @@
  * @author: Fred Gan <ganshaolong@vip.qq.com>
  * @brief unit tests for functions from printer_yin.c
  *
- * Copyright (c) 2019 CESNET, z.s.p.o.
+ * Copyright (c) 2019-2020 CESNET, z.s.p.o.
  *
  * This source code is licensed under BSD 3-Clause License (the "License").
  * You may not use this file except in compliance with the License.
@@ -11,80 +11,18 @@
  *
  *     https://opensource.org/licenses/BSD-3-Clause
  */
+#define _UTEST_MAIN_
+#include "utests.h"
 
 #include "common.h"
 #include "context.h"
 #include "out.h"
 #include "printer_schema.h"
 #include "tree_schema.h"
-#include "utests.h"
-
-#define BUFSIZE 1024
-char logbuf[BUFSIZE] = {0};
-int store = -1; /* negative for infinite logging, positive for limited logging */
-
-/* set to 0 to printing error messages to stderr instead of checking them in code */
-#define ENABLE_LOGGER_CHECKING 1
-
-#if ENABLE_LOGGER_CHECKING
-static void
-logger(LY_LOG_LEVEL level, const char *msg, const char *path)
-{
-    (void) level; /* unused */
-    if (store) {
-        if (path && path[0]) {
-            snprintf(logbuf, BUFSIZE - 1, "%s %s", msg, path);
-        } else {
-            strncpy(logbuf, msg, BUFSIZE - 1);
-        }
-        if (store > 0) {
-            --store;
-        }
-    }
-}
-
-#endif
-
-static int
-logger_setup(void **state)
-{
-    (void) state; /* unused */
-#if ENABLE_LOGGER_CHECKING
-    ly_set_log_clb(logger, 1);
-#endif
-    return 0;
-}
-
-static int
-logger_teardown(void **state)
-{
-    (void) state; /* unused */
-#if ENABLE_LOGGER_CHECKING
-    if (*state) {
-        fprintf(stderr, "%s\n", logbuf);
-    }
-#endif
-    return 0;
-}
-
-void
-logbuf_clean(void)
-{
-    logbuf[0] = '\0';
-}
-
-#if ENABLE_LOGGER_CHECKING
-#   define logbuf_assert(str) assert_string_equal(logbuf, str)
-#else
-#   define logbuf_assert(str)
-#endif
 
 static void
 test_module(void **state)
 {
-    *state = test_module;
-
-    struct ly_ctx *ctx = {0};
     const struct lys_module *mod;
 
     const char *orig =
@@ -577,16 +515,13 @@
     struct ly_out *out;
 
     assert_int_equal(LY_SUCCESS, ly_out_new_memory(&printed, 0, &out));
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, orig, LYS_IN_YANG, &mod));
+    UTEST_ADD_MODULE(orig, LYS_IN_YANG, NULL, &mod);
     assert_int_equal(LY_SUCCESS, lys_print_module(out, mod, LYS_OUT_YIN, 0, 0));
     assert_int_equal(strlen(ori_res), ly_out_printed(out));
     assert_string_equal(printed, ori_res);
 
-    *state = NULL;
     ly_out_free(out, NULL, 1);
-    ly_ctx_destroy(ctx, NULL);
 }
 
 static LY_ERR
@@ -603,9 +538,6 @@
 static void
 test_submodule(void **state)
 {
-    *state = test_module;
-
-    struct ly_ctx *ctx = {0};
     const struct lys_module *mod;
 
     const char *mod_yin =
@@ -645,25 +577,23 @@
     struct ly_out *out;
 
     assert_int_equal(LY_SUCCESS, ly_out_new_memory(&printed, 0, &out));
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, submod_yin);
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, mod_yin, LYS_IN_YIN, &mod));
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, submod_yin);
+
+    UTEST_ADD_MODULE(mod_yin, LYS_IN_YIN, NULL, &mod);
     assert_int_equal(LY_SUCCESS, lys_print_submodule(out, mod, mod->parsed->includes[0].submodule, LYS_OUT_YIN, 0, 0));
     assert_int_equal(strlen(submod_yin), ly_out_printed(out));
     assert_string_equal(printed, submod_yin);
 
-    *state = NULL;
     ly_out_free(out, NULL, 1);
-    ly_ctx_destroy(ctx, NULL);
 }
 
 int
 main(void)
 {
     const struct CMUnitTest tests[] = {
-        cmocka_unit_test_setup_teardown(test_module, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_submodule, logger_setup, logger_teardown),
+        UTEST(test_module),
+        UTEST(test_submodule),
     };
 
     return cmocka_run_group_tests(tests, NULL, NULL);
diff --git a/tests/utests/schema/test_schema.c b/tests/utests/schema/test_schema.c
index ebe8af3..7e7a351 100644
--- a/tests/utests/schema/test_schema.c
+++ b/tests/utests/schema/test_schema.c
@@ -11,73 +11,14 @@
  *
  *     https://opensource.org/licenses/BSD-3-Clause
  */
-
+#define _UTEST_MAIN_
 #include "test_schema.h"
 
 #include <string.h>
 
 #include "log.h"
 #include "parser_schema.h"
-#include "tests/config.h"
 #include "tree_schema.h"
-#include "utests.h"
-
-#if ENABLE_LOGGER_CHECKING
-
-#define BUFSIZE 1024
-char logbuf[BUFSIZE] = {0};
-int store = -1; /* negative for infinite logging, positive for limited logging */
-
-static void
-logger(LY_LOG_LEVEL level, const char *msg, const char *path)
-{
-    (void) level; /* unused */
-    if (store) {
-        if (path && path[0]) {
-            snprintf(logbuf, BUFSIZE - 1, "%s %s", msg, path);
-        } else {
-            strncpy(logbuf, msg, BUFSIZE - 1);
-        }
-        if (store > 0) {
-            --store;
-        }
-    }
-}
-
-#endif
-
-static int
-logger_setup(void **state)
-{
-    (void) state; /* unused */
-
-#if ENABLE_LOGGER_CHECKING
-    /* setup logger */
-    ly_set_log_clb(logger, 1);
-#endif
-
-    return 0;
-}
-
-static int
-logger_teardown(void **state)
-{
-    (void) state; /* unused */
-#if ENABLE_LOGGER_CHECKING
-    if (*state) {
-        fprintf(stderr, "%s\n", logbuf);
-    }
-#endif
-    return 0;
-}
-
-void
-logbuf_clean(void)
-{
-#if ENABLE_LOGGER_CHECKING
-    logbuf[0] = '\0';
-#endif
-}
 
 LY_ERR
 test_imp_clb(const char *UNUSED(mod_name), const char *UNUSED(mod_rev), const char *UNUSED(submod_name),
@@ -109,15 +50,15 @@
 {
     const struct CMUnitTest tests[] = {
         /** test_schema_common.c */
-        cmocka_unit_test_setup_teardown(test_getnext, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_date, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_revisions, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_typedef, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_accessible_tree, logger_setup, logger_teardown),
+        UTEST(test_getnext),
+        UTEST(test_date),
+        UTEST(test_revisions),
+        UTEST(test_typedef),
+        UTEST(test_accessible_tree),
 
         /** test_schema_stmts.c */
-        cmocka_unit_test_setup_teardown(test_identity, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_feature, logger_setup, logger_teardown),
+        UTEST(test_identity),
+        UTEST(test_feature),
     };
 
     return cmocka_run_group_tests(tests, NULL, NULL);
diff --git a/tests/utests/schema/test_schema.h b/tests/utests/schema/test_schema.h
index 2599db3..d3cacb7 100644
--- a/tests/utests/schema/test_schema.h
+++ b/tests/utests/schema/test_schema.h
@@ -15,22 +15,12 @@
 #ifndef TESTS_UTESTS_SCHEMA_TEST_SCHEMA_H_
 #define TESTS_UTESTS_SCHEMA_TEST_SCHEMA_H_
 
+#include "utests.h"
+
 #include "log.h"
 #include "parser_schema.h"
 #include "tests/config.h"
 
-/* set to 0 to printing error messages to stderr instead of checking them in code */
-#define ENABLE_LOGGER_CHECKING 1
-
-#if ENABLE_LOGGER_CHECKING
-extern char logbuf[];
-#   define logbuf_assert(str) assert_string_equal(logbuf, str)
-#else
-#   define logbuf_assert(str)
-#endif
-
-void logbuf_clean(void);
-
 LY_ERR test_imp_clb(const char *UNUSED(mod_name), const char *UNUSED(mod_rev), const char *UNUSED(submod_name),
         const char *UNUSED(sub_rev), void *user_data, LYS_INFORMAT * format,
         const char **module_data, void (**free_module_data)(void *model_data, void *user_data));
@@ -49,7 +39,7 @@
     "<module xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\" name=\""MOD_NAME"\"><yang-version value=\"1.1\"/>" \
     "<namespace uri=\""MOD_NS"\"/><prefix value=\""MOD_PREFIX"\"/>"CONTENT"</module>"
 
-#define TEST_SCHEMA_STR(CTX, RFC7950, YIN, MOD_NAME, CONTENT, STR) \
+#define TEST_SCHEMA_STR(RFC7950, YIN, MOD_NAME, CONTENT, STR) \
     if (YIN) { \
         if (RFC7950) { \
             STR = TEST_YIN_MODULE_11(MOD_NAME, MOD_NAME, "urn:libyang:test:"MOD_NAME, CONTENT); \
@@ -64,30 +54,31 @@
         } \
     }
 
-#define TEST_SCHEMA_OK(CTX, RFC7950, YIN, MOD_NAME, CONTENT, RESULT) \
+#define TEST_SCHEMA_OK(RFC7950, YIN, MOD_NAME, CONTENT, RESULT) \
     { \
     const char *test_str__; \
-    TEST_SCHEMA_STR(CTX, RFC7950, YIN, MOD_NAME, CONTENT, test_str__) \
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(CTX, test_str__, YIN ? LYS_IN_YIN : LYS_IN_YANG, &(RESULT))); \
+    TEST_SCHEMA_STR(RFC7950, YIN, MOD_NAME, CONTENT, test_str__) \
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, test_str__, YIN ? LYS_IN_YIN : LYS_IN_YANG, &(RESULT))); \
     }
 
-#define TEST_SCHEMA_ERR(CTX, RFC7950, YIN, MOD_NAME, CONTENT, ERRMSG) \
+#define TEST_SCHEMA_ERR(RFC7950, YIN, MOD_NAME, CONTENT, ERRMSG, ERRPATH) \
     { \
     const char *test_str__; \
-    TEST_SCHEMA_STR(CTX, RFC7950, YIN, MOD_NAME, CONTENT, test_str__) \
-    assert_int_not_equal(lys_parse_mem(CTX, test_str__, YIN ? LYS_IN_YIN : LYS_IN_YANG, NULL), LY_SUCCESS); \
-    logbuf_assert(ERRMSG); \
+    TEST_SCHEMA_STR(RFC7950, YIN, MOD_NAME, CONTENT, test_str__) \
+    assert_int_not_equal(lys_parse_mem(UTEST_LYCTX, test_str__, YIN ? LYS_IN_YIN : LYS_IN_YANG, NULL), LY_SUCCESS); \
+    CHECK_LOG_CTX(ERRMSG, ERRPATH); \
     }
 
-#define TEST_STMT_DUP(CTX, RFC7950, YIN, STMT, MEMBER, VALUE1, VALUE2, LINE) \
+#define TEST_STMT_DUP(RFC7950, YIN, STMT, MEMBER, VALUE1, VALUE2, LINE) \
     if (YIN) { \
-        TEST_SCHEMA_ERR(CTX, RFC7950, YIN, "dup", "", "Duplicate keyword \""MEMBER"\". Line number "LINE"."); \
+        TEST_SCHEMA_ERR(RFC7950, YIN, "dup", "", "Duplicate keyword \""MEMBER"\".", "Line number "LINE"."); \
     } else { \
-        TEST_SCHEMA_ERR(CTX, RFC7950, YIN, "dup", STMT"{"MEMBER" "VALUE1";"MEMBER" "VALUE2";}", \
-                        "Duplicate keyword \""MEMBER"\". Line number "LINE"."); \
+        TEST_SCHEMA_ERR(RFC7950, YIN, "dup", STMT"{"MEMBER" "VALUE1";"MEMBER" "VALUE2";}", \
+                        "Duplicate keyword \""MEMBER"\".", "Line number "LINE"."); \
     }
 
-#define TEST_STMT_SUBSTM_ERR(CTX, RFC7950, STMT, SUBSTMT, VALUE) ;\
-        TEST_SCHEMA_ERR(CTX, RFC7950, 0, "inv", STMT" test {"SUBSTMT" "VALUE";}", "Invalid keyword \""SUBSTMT"\" as a child of \""STMT"\". Line number 1.");
+#define TEST_STMT_SUBSTM_ERR(RFC7950, STMT, SUBSTMT, VALUE) ;\
+        TEST_SCHEMA_ERR(RFC7950, 0, "inv", STMT" test {"SUBSTMT" "VALUE";}", \
+                        "Invalid keyword \""SUBSTMT"\" as a child of \""STMT"\".", "Line number 1.");
 
 #endif /* TESTS_UTESTS_SCHEMA_TEST_SCHEMA_H_ */
diff --git a/tests/utests/schema/test_schema_common.c b/tests/utests/schema/test_schema_common.c
index 8e3bc5d..ab4b3b2 100644
--- a/tests/utests/schema/test_schema_common.c
+++ b/tests/utests/schema/test_schema_common.c
@@ -11,6 +11,7 @@
  *
  *     https://opensource.org/licenses/BSD-3-Clause
  */
+#include "test_schema.h"
 
 #include <string.h>
 
@@ -18,24 +19,16 @@
 #include "log.h"
 #include "tree_schema.h"
 #include "tree_schema_internal.h"
-#include "utests.h"
-
-#include "test_schema.h"
 
 void
 test_getnext(void **state)
 {
-    *state = test_getnext;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     const struct lysc_node *node = NULL, *four;
     const struct lysc_node_container *cont;
     const struct lysc_action *rpc;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {yang-version 1.1; namespace urn:a;prefix a;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {yang-version 1.1; namespace urn:a;prefix a;"
             "container a { container one {presence test;} leaf two {type string;} leaf-list three {type string;}"
             "  list four {config false;} choice x { leaf five {type string;} case y {leaf six {type string;}}}"
             "  anyxml seven; action eight {input {leaf eight-input {type string;}} output {leaf eight-output {type string;}}}"
@@ -119,68 +112,58 @@
     assert_string_equal("h-output", node->name);
     assert_null(node = lys_getnext(node, (const struct lysc_node *)rpc, mod->compiled, LYS_GETNEXT_OUTPUT));
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {namespace urn:c;prefix c; rpc c;}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {namespace urn:c;prefix c; rpc c;}", LYS_IN_YANG, &mod));
     assert_non_null(node = lys_getnext(NULL, NULL, mod->compiled, 0));
     assert_string_equal("c", node->name);
     assert_null(node = lys_getnext(node, NULL, mod->compiled, 0));
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {namespace urn:d;prefix d; notification d;}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {namespace urn:d;prefix d; notification d;}", LYS_IN_YANG, &mod));
     assert_non_null(node = lys_getnext(NULL, NULL, mod->compiled, 0));
     assert_string_equal("d", node->name);
     assert_null(node = lys_getnext(node, NULL, mod->compiled, 0));
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module e {namespace urn:e;prefix e; container c {container cc;} leaf a {type string;}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module e {namespace urn:e;prefix e; container c {container cc;} leaf a {type string;}}", LYS_IN_YANG, &mod));
     assert_non_null(node = lys_getnext(NULL, NULL, mod->compiled, 0));
     assert_string_equal("c", node->name);
     assert_non_null(node = lys_getnext(NULL, NULL, mod->compiled, LYS_GETNEXT_INTONPCONT));
     assert_string_equal("a", node->name);
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
 }
 
 void
 test_date(void **state)
 {
-    *state = test_date;
-
     assert_int_equal(LY_EINVAL, lysp_check_date(NULL, NULL, 0, "date"));
-    logbuf_assert("Invalid argument date (lysp_check_date()).");
+    CHECK_LOG("Invalid argument date (lysp_check_date()).", NULL);
     assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "x", 1, "date"));
-    logbuf_assert("Invalid argument date_len (lysp_check_date()).");
+    CHECK_LOG("Invalid argument date_len (lysp_check_date()).", NULL);
     assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "nonsencexx", 10, "date"));
-    logbuf_assert("Invalid value \"nonsencexx\" of \"date\".");
+    CHECK_LOG("Invalid value \"nonsencexx\" of \"date\".", NULL);
     assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "123x-11-11", 10, "date"));
-    logbuf_assert("Invalid value \"123x-11-11\" of \"date\".");
+    CHECK_LOG("Invalid value \"123x-11-11\" of \"date\".", NULL);
     assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "2018-13-11", 10, "date"));
-    logbuf_assert("Invalid value \"2018-13-11\" of \"date\".");
+    CHECK_LOG("Invalid value \"2018-13-11\" of \"date\".", NULL);
     assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "2018-11-41", 10, "date"));
-    logbuf_assert("Invalid value \"2018-11-41\" of \"date\".");
+    CHECK_LOG("Invalid value \"2018-11-41\" of \"date\".", NULL);
     assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "2018-02-29", 10, "date"));
-    logbuf_assert("Invalid value \"2018-02-29\" of \"date\".");
+    CHECK_LOG("Invalid value \"2018-02-29\" of \"date\".", NULL);
     assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "2018.02-28", 10, "date"));
-    logbuf_assert("Invalid value \"2018.02-28\" of \"date\".");
+    CHECK_LOG("Invalid value \"2018.02-28\" of \"date\".", NULL);
     assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "2018-02.28", 10, "date"));
-    logbuf_assert("Invalid value \"2018-02.28\" of \"date\".");
+    CHECK_LOG("Invalid value \"2018-02.28\" of \"date\".", NULL);
 
     assert_int_equal(LY_SUCCESS, lysp_check_date(NULL, "2018-11-11", 10, "date"));
     assert_int_equal(LY_SUCCESS, lysp_check_date(NULL, "2018-02-28", 10, "date"));
     assert_int_equal(LY_SUCCESS, lysp_check_date(NULL, "2016-02-29", 10, "date"));
-
-    *state = NULL;
 }
 
 void
 test_revisions(void **state)
 {
-    (void) state; /* unused */
-
     struct lysp_revision *revs = NULL, *rev;
 
-    logbuf_clean();
     /* no error, it just does nothing */
     lysp_sort_revisions(NULL);
-    logbuf_assert("");
+    CHECK_LOG(NULL, NULL);
 
     /* revisions are stored in wrong order - the newest is the last */
     LY_ARRAY_NEW_RET(NULL, revs, rev, );
@@ -202,127 +185,112 @@
 void
 test_typedef(void **state)
 {
-    *state = test_typedef;
-
-    struct ly_ctx *ctx = NULL;
     const char *str;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
     str = "module a {namespace urn:a; prefix a; typedef binary {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"binary\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"binary\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef bits {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"bits\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"bits\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef boolean {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"boolean\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"boolean\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef decimal64 {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"decimal64\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"decimal64\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef empty {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"empty\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"empty\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef enumeration {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"enumeration\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"enumeration\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef int8 {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"int8\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"int8\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef int16 {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"int16\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"int16\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef int32 {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"int32\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"int32\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef int64 {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"int64\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"int64\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef instance-identifier {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"instance-identifier\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"instance-identifier\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef identityref {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"identityref\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"identityref\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef leafref {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"leafref\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"leafref\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef string {type int8;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"string\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"string\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef union {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"union\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"union\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef uint8 {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"uint8\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"uint8\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef uint16 {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"uint16\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"uint16\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef uint32 {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"uint32\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"uint32\" of typedef - name collision with a built-in type.", "Line number 1.");
     str = "module a {namespace urn:a; prefix a; typedef uint64 {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"uint64\" of typedef - name collision with a built-in type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"uint64\" of typedef - name collision with a built-in type.", "Line number 1.");
 
     str = "module mytypes {namespace urn:types; prefix t; typedef binary_ {type string;} typedef bits_ {type string;} typedef boolean_ {type string;} "
             "typedef decimal64_ {type string;} typedef empty_ {type string;} typedef enumeration_ {type string;} typedef int8_ {type string;} typedef int16_ {type string;}"
             "typedef int32_ {type string;} typedef int64_ {type string;} typedef instance-identifier_ {type string;} typedef identityref_ {type string;}"
             "typedef leafref_ {type string;} typedef string_ {type int8;} typedef union_ {type string;} typedef uint8_ {type string;} typedef uint16_ {type string;}"
             "typedef uint32_ {type string;} typedef uint64_ {type string;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
 
     str = "module a {namespace urn:a; prefix a; typedef test {type string;} typedef test {type int8;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"test\" of typedef - name collision with another top-level type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"test\" of typedef - name collision with another top-level type.", "Line number 1.");
 
     str = "module a {namespace urn:a; prefix a; typedef x {type string;} container c {typedef x {type int8;}}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"x\" of typedef - scoped type collide with a top-level type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"x\" of typedef - scoped type collide with a top-level type.", "Line number 1.");
 
     str = "module a {namespace urn:a; prefix a; container c {container d {typedef y {type int8;}} typedef y {type string;}}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"y\" of typedef - name collision with another scoped type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"y\" of typedef - name collision with another scoped type.", "Line number 1.");
 
     str = "module a {namespace urn:a; prefix a; container c {typedef y {type int8;} typedef y {type string;}}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"y\" of typedef - name collision with sibling type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"y\" of typedef - name collision with sibling type.", "Line number 1.");
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule b {belongs-to a {prefix a;} typedef x {type string;}}");
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "submodule b {belongs-to a {prefix a;} typedef x {type string;}}");
     str = "module a {namespace urn:a; prefix a; include b; typedef x {type int8;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"x\" of typedef - name collision with another top-level type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"x\" of typedef - name collision with another top-level type.", "Line number 1.");
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule b {belongs-to a {prefix a;} container c {typedef x {type string;}}}");
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "submodule b {belongs-to a {prefix a;} container c {typedef x {type string;}}}");
     str = "module a {namespace urn:a; prefix a; include b; typedef x {type int8;}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"x\" of typedef - scoped type collide with a top-level type. Line number 1.");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"x\" of typedef - scoped type collide with a top-level type.", "Line number 1.");
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule b {belongs-to a {prefix a;} typedef x {type int8;}}");
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "submodule b {belongs-to a {prefix a;} typedef x {type int8;}}");
     str = "module a {namespace urn:a; prefix a; include b; container c {typedef x {type string;}}}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EEXIST);
-    logbuf_assert("Invalid name \"x\" of typedef - scoped type collide with a top-level type. Line number 1.");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EEXIST);
+    CHECK_LOG("Invalid name \"x\" of typedef - scoped type collide with a top-level type.", "Line number 1.");
 }
 
 void
 test_accessible_tree(void **state)
 {
-    *state = test_accessible_tree;
-
-    struct ly_ctx *ctx = NULL;
     const char *str;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-    logbuf_clean();
-
     /* config -> config */
-    str =
-            "module a {\n"
+    str = "module a {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    container cont {\n"
@@ -339,12 +307,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX(NULL, NULL);
 
     /* config -> state leafref */
-    str =
-            "module b {\n"
+    str = "module b {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    container cont {\n"
@@ -361,14 +328,12 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EVALID);
-    logbuf_assert("Invalid leafref path \"/cont/l\" - target is supposed to represent configuration data"
-            " (as the leafref does), but it does not. /b:cont2/l2");
-    logbuf_clean();
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Invalid leafref path \"/cont/l\" - target is supposed to represent configuration data"
+            " (as the leafref does), but it does not.", "/b:cont2/l2");
 
     /* config -> state must */
-    str =
-            "module b {\n"
+    str = "module b {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    container cont {\n"
@@ -384,13 +349,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("Schema node \"l\" not found (\"../../cont/l\") with context node \"/b:cont2/l2\".");
-    logbuf_clean();
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX("Schema node \"l\" not found (\"../../cont/l\") with context node \"/b:cont2/l2\".", NULL);
 
     /* state -> config */
-    str =
-            "module c {\n"
+    str = "module c {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    container cont {\n"
@@ -408,12 +371,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX(NULL, NULL);
 
     /* notif -> state */
-    str =
-            "module d {\n"
+    str = "module d {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    container cont {\n"
@@ -431,12 +393,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX(NULL, NULL);
 
     /* notif -> notif */
-    str =
-            "module e {\n"
+    str = "module e {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    notification notif {\n"
@@ -451,12 +412,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX(NULL, NULL);
 
     /* rpc input -> state */
-    str =
-            "module f {\n"
+    str = "module f {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    container cont {\n"
@@ -476,12 +436,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX(NULL, NULL);
 
     /* rpc input -> rpc input */
-    str =
-            "module g {\n"
+    str = "module g {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    rpc rp {\n"
@@ -498,12 +457,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX(NULL, NULL);
 
     /* rpc input -> rpc output leafref */
-    str =
-            "module h {\n"
+    str = "module h {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    rpc rp {\n"
@@ -521,13 +479,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EVALID);
-    logbuf_assert("Not found node \"l\" in path. /h:rp/l2");
-    logbuf_clean();
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Not found node \"l\" in path.", "/h:rp/l2");
 
     /* rpc input -> rpc output must */
-    str =
-            "module h {\n"
+    str = "module h {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    rpc rp {\n"
@@ -544,13 +500,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("Schema node \"l\" not found (\"../l\") with context node \"/h:rp/l2\".");
-    logbuf_clean();
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX("Schema node \"l\" not found (\"../l\") with context node \"/h:rp/l2\".", NULL);
 
     /* rpc input -> notif leafref */
-    str =
-            "module i {\n"
+    str = "module i {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    rpc rp {\n"
@@ -568,13 +522,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EVALID);
-    logbuf_assert("Not found node \"notif\" in path. /i:rp/l2");
-    logbuf_clean();
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Not found node \"notif\" in path.", "/i:rp/l2");
 
     /* rpc input -> notif must */
-    str =
-            "module i {\n"
+    str = "module i {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
             "    rpc rp {\n"
@@ -591,13 +543,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("Schema node \"l\" not found (\"/notif/l\") with context node \"/i:rp/l2\".");
-    logbuf_clean();
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX("Schema node \"l\" not found (\"/notif/l\") with context node \"/i:rp/l2\".", NULL);
 
     /* action output -> state */
-    str =
-            "module j {\n"
+    str = "module j {\n"
             "    yang-version 1.1;\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
@@ -624,12 +574,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("");
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX(NULL, NULL);
 
     /* action output -> action input leafref */
-    str =
-            "module k {\n"
+    str = "module k {\n"
             "    yang-version 1.1;\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
@@ -656,13 +605,11 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_EVALID);
-    logbuf_assert("Not found node \"l\" in path. /k:cont/ll/act/l2");
-    logbuf_clean();
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_EVALID);
+    CHECK_LOG_CTX("Not found node \"l\" in path.", "/k:cont/ll/act/l2");
 
     /* action output -> action input must */
-    str =
-            "module k {\n"
+    str = "module k {\n"
             "    yang-version 1.1;\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
@@ -688,10 +635,6 @@
             "        }\n"
             "    }\n"
             "}";
-    assert_int_equal(lys_parse_mem(ctx, str, LYS_IN_YANG, NULL), LY_SUCCESS);
-    logbuf_assert("Schema node \"l\" not found (\"/cont/ll/act/l\") with context node \"/k:cont/ll/act/l2\".");
-    logbuf_clean();
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    assert_int_equal(lys_parse_mem(UTEST_LYCTX, str, LYS_IN_YANG, NULL), LY_SUCCESS);
+    CHECK_LOG_CTX("Schema node \"l\" not found (\"/cont/ll/act/l\") with context node \"/k:cont/ll/act/l2\".", NULL);
 }
diff --git a/tests/utests/schema/test_schema_stmts.c b/tests/utests/schema/test_schema_stmts.c
index 24417c4..1cd8ced 100644
--- a/tests/utests/schema/test_schema_stmts.c
+++ b/tests/utests/schema/test_schema_stmts.c
@@ -11,49 +11,41 @@
  *
  *     https://opensource.org/licenses/BSD-3-Clause
  */
+#include "test_schema.h"
 
 #include <string.h>
 
 #include "context.h"
 #include "log.h"
-#include "test_schema.h"
 #include "tree_schema.h"
-#include "utests.h"
-
-#include "test_schema.h"
 
 void
 test_identity(void **state)
 {
-    *state = test_identity;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod, *mod_imp;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
-
     /*
      * parsing YANG
      */
-    TEST_STMT_DUP(ctx, 1, 0, "identity id", "description", "a", "b", "1");
-    TEST_STMT_DUP(ctx, 1, 0, "identity id", "reference", "a", "b", "1");
-    TEST_STMT_DUP(ctx, 1, 0, "identity id", "status", "current", "obsolete", "1");
+    TEST_STMT_DUP(1, 0, "identity id", "description", "a", "b", "1");
+    TEST_STMT_DUP(1, 0, "identity id", "reference", "a", "b", "1");
+    TEST_STMT_DUP(1, 0, "identity id", "status", "current", "obsolete", "1");
 
     /* full content */
-    TEST_SCHEMA_OK(ctx, 1, 0, "identityone",
+    TEST_SCHEMA_OK(1, 0, "identityone",
             "identity test {base \"a\";base b; description text;reference \'another text\';status current; if-feature x;if-feature y; identityone:ext;}"
             "identity a; identity b; extension ext; feature x; feature y;", mod);
     assert_non_null(mod->parsed->identities);
     assert_int_equal(3, LY_ARRAY_COUNT(mod->parsed->identities));
 
     /* invalid substatement */
-    TEST_STMT_SUBSTM_ERR(ctx, 0, "identity", "organization", "XXX");
+    TEST_STMT_SUBSTM_ERR(0, "identity", "organization", "XXX");
 
     /*
      * parsing YIN
      */
     /* max subelems */
-    TEST_SCHEMA_OK(ctx, 1, 1, "identityone-yin", "<identity name=\"ident-name\">"
+    TEST_SCHEMA_OK(1, 1, "identityone-yin", "<identity name=\"ident-name\">"
             "<if-feature name=\"iff\"/>"
             "<base name=\"base-name\"/>"
             "<status value=\"deprecated\"/>"
@@ -75,19 +67,20 @@
     assert_int_equal(mod->parsed->identities[0].exts[0].insubstmt, LYEXT_SUBSTMT_SELF);*/
 
     /* min subelems */
-    TEST_SCHEMA_OK(ctx, 1, 1, "identitytwo-yin", "<identity name=\"ident-name\" />", mod);
+    TEST_SCHEMA_OK(1, 1, "identitytwo-yin", "<identity name=\"ident-name\" />", mod);
     assert_int_equal(1, LY_ARRAY_COUNT(mod->parsed->identities));
     assert_string_equal(mod->parsed->identities[0].name, "ident-name");
 
     /* invalid substatement */
-    TEST_SCHEMA_ERR(ctx, 0, 1, "inv", "<identity name=\"ident-name\"><if-feature name=\"iff\"/></identity>",
-            "Invalid sub-elemnt \"if-feature\" of \"identity\" element - this sub-element is allowed only in modules with version 1.1 or newer. Line number 1.");
+    TEST_SCHEMA_ERR(0, 1, "inv", "<identity name=\"ident-name\"><if-feature name=\"iff\"/></identity>",
+            "Invalid sub-elemnt \"if-feature\" of \"identity\" element - "
+            "this sub-element is allowed only in modules with version 1.1 or newer.", "Line number 1.");
 
     /*
      * compiling
      */
-    TEST_SCHEMA_OK(ctx, 0, 0, "a", "identity a1;", mod_imp);
-    TEST_SCHEMA_OK(ctx, 1, 0, "b", "import a {prefix a;}"
+    TEST_SCHEMA_OK(0, 0, "a", "identity a1;", mod_imp);
+    TEST_SCHEMA_OK(1, 0, "b", "import a {prefix a;}"
             "identity b1; identity b2; identity b3 {base b1; base b:b2; base a:a1;}"
             "identity b4 {base b:b1; base b3;}", mod);
     assert_non_null(mod_imp->compiled);
@@ -107,34 +100,34 @@
     assert_int_equal(1, LY_ARRAY_COUNT(mod->identities[2].derived));
     assert_ptr_equal(mod->identities[2].derived[0], &mod->identities[3]);
 
-    TEST_SCHEMA_OK(ctx, 1, 0, "c", "identity c2 {base c1;} identity c1;", mod);
+    TEST_SCHEMA_OK(1, 0, "c", "identity c2 {base c1;} identity c1;", mod);
     assert_int_equal(1, LY_ARRAY_COUNT(mod->identities[1].derived));
     assert_ptr_equal(mod->identities[1].derived[0], &mod->identities[0]);
 
-    TEST_SCHEMA_ERR(ctx, 0, 0, "inv", "identity i1;identity i1;", "Duplicate identifier \"i1\" of identity statement. Line number 1.");
+    TEST_SCHEMA_ERR(0, 0, "inv", "identity i1;identity i1;", "Duplicate identifier \"i1\" of identity statement.", "Line number 1.");
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule inv_sub {belongs-to inv {prefix inv;} identity i1;}");
-    TEST_SCHEMA_ERR(ctx, 0, 0, "inv", "include inv_sub;identity i1;",
-            "Duplicate identifier \"i1\" of identity statement. Line number 1.");
-    TEST_SCHEMA_ERR(ctx, 0, 0, "inv", "identity i1 {base i2;}", "Unable to find base (i2) of identity \"i1\". /inv:{identity='i1'}");
-    TEST_SCHEMA_ERR(ctx, 0, 0, "inv", "identity i1 {base i1;}", "Identity \"i1\" is derived from itself. /inv:{identity='i1'}");
-    TEST_SCHEMA_ERR(ctx, 0, 0, "inv", "identity i1 {base i2;}identity i2 {base i3;}identity i3 {base i1;}",
-            "Identity \"i1\" is indirectly derived from itself. /inv:{identity='i3'}");
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "submodule inv_sub {belongs-to inv {prefix inv;} identity i1;}");
+    TEST_SCHEMA_ERR(0, 0, "inv", "include inv_sub;identity i1;",
+            "Duplicate identifier \"i1\" of identity statement.", "Line number 1.");
+    TEST_SCHEMA_ERR(0, 0, "inv", "identity i1 {base i2;}", "Unable to find base (i2) of identity \"i1\".", "/inv:{identity='i1'}");
+    TEST_SCHEMA_ERR(0, 0, "inv", "identity i1 {base i1;}", "Identity \"i1\" is derived from itself.", "/inv:{identity='i1'}");
+    TEST_SCHEMA_ERR(0, 0, "inv", "identity i1 {base i2;}identity i2 {base i3;}identity i3 {base i1;}",
+            "Identity \"i1\" is indirectly derived from itself.", "/inv:{identity='i3'}");
 
     /* base in non-implemented module */
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb,
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb,
             "module base {namespace \"urn\"; prefix b; identity i1; identity i2 {base i1;}}");
-    TEST_SCHEMA_OK(ctx, 0, 0, "ident", "import base {prefix b;} identity ii {base b:i1;}", mod);
+    TEST_SCHEMA_OK(0, 0, "ident", "import base {prefix b;} identity ii {base b:i1;}", mod);
 
     /* default value from non-implemented module */
-    TEST_SCHEMA_ERR(ctx, 0, 0, "ident2", "import base {prefix b;} leaf l {type identityref {base b:i1;} default b:i2;}",
+    TEST_SCHEMA_ERR(0, 0, "ident2", "import base {prefix b;} leaf l {type identityref {base b:i1;} default b:i2;}",
             "Invalid default - value does not fit the type (Invalid identityref \"b:i2\" value"
-            " - identity found in non-implemented module \"base\".). /ident2:l");
+            " - identity found in non-implemented module \"base\".).", "/ident2:l");
 
     /* default value in typedef from non-implemented module */
-    TEST_SCHEMA_ERR(ctx, 0, 0, "ident2", "import base {prefix b;} typedef t1 {type identityref {base b:i1;} default b:i2;}"
+    TEST_SCHEMA_ERR(0, 0, "ident2", "import base {prefix b;} typedef t1 {type identityref {base b:i1;} default b:i2;}"
             "leaf l {type t1;}", "Invalid default - value does not fit the type (Invalid"
-            " identityref \"b:i2\" value - identity found in non-implemented module \"base\".). /ident2:l");
+            " identityref \"b:i2\" value - identity found in non-implemented module \"base\".).", "/ident2:l");
 
     /*
      * printing
@@ -143,45 +136,37 @@
     /*
      * cleanup
      */
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
 }
 
 void
 test_feature(void **state)
 {
-    *state = test_feature;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     const struct lysp_feature *f;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
-
     /*
      * parsing YANG
      */
 
-    TEST_STMT_DUP(ctx, 1, 0, "feature f", "description", "a", "b", "1");
-    TEST_STMT_DUP(ctx, 1, 0, "feature f", "reference", "a", "b", "1");
-    TEST_STMT_DUP(ctx, 1, 0, "feature f", "status", "current", "obsolete", "1");
+    TEST_STMT_DUP(1, 0, "feature f", "description", "a", "b", "1");
+    TEST_STMT_DUP(1, 0, "feature f", "reference", "a", "b", "1");
+    TEST_STMT_DUP(1, 0, "feature f", "status", "current", "obsolete", "1");
 
     /* full content */
-    TEST_SCHEMA_OK(ctx, 1, 0, "featureone",
+    TEST_SCHEMA_OK(1, 0, "featureone",
             "feature test {description text;reference \'another text\';status current; if-feature x; if-feature y; featureone:ext;}"
             "extension ext; feature x; feature y;", mod);
     assert_non_null(mod->parsed->features);
     assert_int_equal(3, LY_ARRAY_COUNT(mod->parsed->features));
 
     /* invalid substatement */
-    TEST_STMT_SUBSTM_ERR(ctx, 0, "feature", "organization", "XXX");
+    TEST_STMT_SUBSTM_ERR(0, "feature", "organization", "XXX");
 
     /*
      * parsing YIN
      */
     /* max subelems */
-    TEST_SCHEMA_OK(ctx, 0, 1, "featureone-yin", "<feature name=\"feature-name\">"
+    TEST_SCHEMA_OK(0, 1, "featureone-yin", "<feature name=\"feature-name\">"
             "<if-feature name=\"iff\"/>"
             "<status value=\"deprecated\"/>"
             "<description><text>desc</text></description>"
@@ -199,19 +184,19 @@
     assert_int_equal(mod->parsed->features[0].exts[0].insubstmt, LYEXT_SUBSTMT_SELF);*/
 
     /* min subelems */
-    TEST_SCHEMA_OK(ctx, 0, 1, "featuretwo-yin", "<feature name=\"feature-name\"/>", mod)
+    TEST_SCHEMA_OK(0, 1, "featuretwo-yin", "<feature name=\"feature-name\"/>", mod)
     assert_int_equal(1, LY_ARRAY_COUNT(mod->parsed->features));
     assert_string_equal(mod->parsed->features[0].name, "feature-name");
 
     /* invalid substatement */
-    TEST_SCHEMA_ERR(ctx, 0, 1, "inv", "<feature name=\"feature-name\"><organization><text>org</text></organization></feature>",
-            "Unexpected sub-element \"organization\" of \"feature\" element. Line number 1.");
+    TEST_SCHEMA_ERR(0, 1, "inv", "<feature name=\"feature-name\"><organization><text>org</text></organization></feature>",
+            "Unexpected sub-element \"organization\" of \"feature\" element.", "Line number 1.");
 
     /*
      * compiling
      */
 
-    TEST_SCHEMA_OK(ctx, 1, 0, "a", "feature f1 {description test1;reference test2;status current;} feature f2; feature f3;\n"
+    TEST_SCHEMA_OK(1, 0, "a", "feature f1 {description test1;reference test2;status current;} feature f2; feature f3;\n"
             "feature orfeature {if-feature \"f1 or f2\";}\n"
             "feature andfeature {if-feature \"f1 and f2\";}\n"
             "feature f6 {if-feature \"not f1\";}\n"
@@ -227,42 +212,42 @@
     }
 
     /* some invalid expressions */
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f{if-feature f1;}",
-            "Invalid value \"f1\" of if-feature - unable to find feature \"f1\".");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f1; feature f2{if-feature 'f and';}",
-            "Invalid value \"f and\" of if-feature - unexpected end of expression.");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f{if-feature 'or';}",
-            "Invalid value \"or\" of if-feature - unexpected end of expression.");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f1; feature f2{if-feature '(f1';}",
-            "Invalid value \"(f1\" of if-feature - non-matching opening and closing parentheses.");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f1; feature f2{if-feature 'f1)';}",
-            "Invalid value \"f1)\" of if-feature - non-matching opening and closing parentheses.");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f1; feature f2{if-feature ---;}",
-            "Invalid value \"---\" of if-feature - unable to find feature \"---\".");
-    TEST_SCHEMA_ERR(ctx, 0, 0, "inv", "feature f1; feature f2{if-feature 'not f1';}",
-            "Invalid value \"not f1\" of if-feature - YANG 1.1 expression in YANG 1.0 module.");
-    TEST_SCHEMA_ERR(ctx, 0, 0, "inv", "feature f1; feature f1;",
-            "Duplicate identifier \"f1\" of feature statement. Line number 1.");
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f{if-feature f1;}",
+            "Invalid value \"f1\" of if-feature - unable to find feature \"f1\".", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f1; feature f2{if-feature 'f and';}",
+            "Invalid value \"f and\" of if-feature - unexpected end of expression.", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f{if-feature 'or';}",
+            "Invalid value \"or\" of if-feature - unexpected end of expression.", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f1; feature f2{if-feature '(f1';}",
+            "Invalid value \"(f1\" of if-feature - non-matching opening and closing parentheses.", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f1; feature f2{if-feature 'f1)';}",
+            "Invalid value \"f1)\" of if-feature - non-matching opening and closing parentheses.", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f1; feature f2{if-feature ---;}",
+            "Invalid value \"---\" of if-feature - unable to find feature \"---\".", NULL);
+    TEST_SCHEMA_ERR(0, 0, "inv", "feature f1; feature f2{if-feature 'not f1';}",
+            "Invalid value \"not f1\" of if-feature - YANG 1.1 expression in YANG 1.0 module.", NULL);
+    TEST_SCHEMA_ERR(0, 0, "inv", "feature f1; feature f1;",
+            "Duplicate identifier \"f1\" of feature statement.", "Line number 1.");
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule inv_sub {belongs-to inv {prefix inv;} feature f1;}");
-    TEST_SCHEMA_ERR(ctx, 0, 0, "inv", "include inv_sub;feature f1;",
-            "Duplicate identifier \"f1\" of feature statement. Line number 1.");
-    TEST_SCHEMA_ERR(ctx, 0, 0, "inv", "feature f1 {if-feature f2;} feature f2 {if-feature f1;}",
-            "Feature \"f1\" is indirectly referenced from itself.");
-    TEST_SCHEMA_ERR(ctx, 0, 0, "inv", "feature f1 {if-feature f1;}",
-            "Feature \"f1\" is referenced from itself.");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f {if-feature ();}",
-            "Invalid value \"()\" of if-feature - number of features in expression does not match the required number of operands for the operations.");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f1; feature f {if-feature 'f1(';}",
-            "Invalid value \"f1(\" of if-feature - non-matching opening and closing parentheses.");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f1; feature f {if-feature 'and f1';}",
-            "Invalid value \"and f1\" of if-feature - missing feature/expression before \"and\" operation.");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f1; feature f {if-feature 'f1 not ';}",
-            "Invalid value \"f1 not \" of if-feature - unexpected end of expression.");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f1; feature f {if-feature 'f1 not not ';}",
-            "Invalid value \"f1 not not \" of if-feature - unexpected end of expression.");
-    TEST_SCHEMA_ERR(ctx, 1, 0, "inv", "feature f1; feature f2; feature f {if-feature 'or f1 f2';}",
-            "Invalid value \"or f1 f2\" of if-feature - missing feature/expression before \"or\" operation.");
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "submodule inv_sub {belongs-to inv {prefix inv;} feature f1;}");
+    TEST_SCHEMA_ERR(0, 0, "inv", "include inv_sub;feature f1;",
+            "Duplicate identifier \"f1\" of feature statement.", "Line number 1.");
+    TEST_SCHEMA_ERR(0, 0, "inv", "feature f1 {if-feature f2;} feature f2 {if-feature f1;}",
+            "Feature \"f1\" is indirectly referenced from itself.", NULL);
+    TEST_SCHEMA_ERR(0, 0, "inv", "feature f1 {if-feature f1;}",
+            "Feature \"f1\" is referenced from itself.", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f {if-feature ();}",
+            "Invalid value \"()\" of if-feature - number of features in expression does not match the required number of operands for the operations.", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f1; feature f {if-feature 'f1(';}",
+            "Invalid value \"f1(\" of if-feature - non-matching opening and closing parentheses.", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f1; feature f {if-feature 'and f1';}",
+            "Invalid value \"and f1\" of if-feature - missing feature/expression before \"and\" operation.", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f1; feature f {if-feature 'f1 not ';}",
+            "Invalid value \"f1 not \" of if-feature - unexpected end of expression.", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f1; feature f {if-feature 'f1 not not ';}",
+            "Invalid value \"f1 not not \" of if-feature - unexpected end of expression.", NULL);
+    TEST_SCHEMA_ERR(1, 0, "inv", "feature f1; feature f2; feature f {if-feature 'or f1 f2';}",
+            "Invalid value \"or f1 f2\" of if-feature - missing feature/expression before \"or\" operation.", NULL);
 
     /*
      * printing
@@ -271,7 +256,4 @@
     /*
      * cleanup
      */
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
 }
diff --git a/tests/utests/schema/test_tree_schema_compile.c b/tests/utests/schema/test_tree_schema_compile.c
index 7f0e4da..6f5977c 100644
--- a/tests/utests/schema/test_tree_schema_compile.c
+++ b/tests/utests/schema/test_tree_schema_compile.c
@@ -11,6 +11,8 @@
  *
  *     https://opensource.org/licenses/BSD-3-Clause
  */
+#define _UTEST_MAIN_
+#include "utests.h"
 
 #include "common.h"
 #include "in.h"
@@ -18,66 +20,18 @@
 #include "path.h"
 #include "plugins_types.h"
 #include "schema_compile.h"
-#include "utests.h"
 #include "xpath.h"
 
-void yang_parser_ctx_free(struct lys_yang_parser_ctx *ctx);
-
-#define BUFSIZE 1024
-char logbuf[BUFSIZE] = {0};
-
-/* set to 0 to printing error messages to stderr instead of checking them in code */
-#define ENABLE_LOGGER_CHECKING 1
-
-#if ENABLE_LOGGER_CHECKING
-static void
-logger(LY_LOG_LEVEL level, const char *msg, const char *path)
-{
-    (void) level; /* unused */
-
-    if (path && path[0]) {
-        snprintf(logbuf, BUFSIZE - 1, "%s %s", msg, path);
-    } else {
-        strncpy(logbuf, msg, BUFSIZE - 1);
-    }
-}
-
-#endif
-
 static int
-logger_setup(void **state)
+setup(void **state)
 {
-    (void) state; /* unused */
-#if ENABLE_LOGGER_CHECKING
-    ly_set_log_clb(logger, 1);
-#endif
+    UTEST_SETUP;
+
+    assert_int_equal(LY_SUCCESS, ly_ctx_set_options(UTEST_LYCTX, LY_CTX_DISABLE_SEARCHDIRS));
+
     return 0;
 }
 
-static int
-logger_teardown(void **state)
-{
-    (void) state; /* unused */
-#if ENABLE_LOGGER_CHECKING
-    if (*state) {
-        fprintf(stderr, "%s\n", logbuf);
-    }
-#endif
-    return 0;
-}
-
-void
-logbuf_clean(void)
-{
-    logbuf[0] = '\0';
-}
-
-#if ENABLE_LOGGER_CHECKING
-#   define logbuf_assert(str) assert_string_equal(logbuf, str);logbuf_clean()
-#else
-#   define logbuf_assert(str)
-#endif
-
 static LY_ERR
 test_imp_clb(const char *UNUSED(mod_name), const char *UNUSED(mod_rev), const char *UNUSED(submod_name),
         const char *UNUSED(sub_rev), void *user_data, LYS_INFORMAT *format,
@@ -92,11 +46,8 @@
 static void
 test_module(void **state)
 {
-    *state = test_module;
-
     const char *str;
     struct ly_in *in;
-    struct ly_ctx *ctx = NULL;
     struct lys_module *mod = NULL;
     struct lysp_feature *f;
     struct lysc_iffeature *iff;
@@ -104,24 +55,22 @@
 
     str = "module test {namespace urn:test; prefix t;"
             "feature f1;feature f2 {if-feature f1;}}";
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
-
     assert_int_equal(LY_EINVAL, lys_compile(NULL, 0, NULL));
-    logbuf_assert("Invalid argument mod (lys_compile()).");
+    CHECK_LOG("Invalid argument mod (lys_compile()).", NULL);
     assert_int_equal(LY_SUCCESS, ly_in_new_memory(str, &in));
-    assert_int_equal(LY_SUCCESS, lys_create_module(ctx, in, LYS_IN_YANG, 0, NULL, NULL, NULL, &unres, &mod));
-    assert_int_equal(LY_SUCCESS, lys_compile_unres_glob(ctx, &unres));
-    lys_compile_unres_glob_erase(ctx, &unres);
+    assert_int_equal(LY_SUCCESS, lys_create_module(UTEST_LYCTX, in, LYS_IN_YANG, 0, NULL, NULL, NULL, &unres, &mod));
+    assert_int_equal(LY_SUCCESS, lys_compile_unres_glob(UTEST_LYCTX, &unres));
+    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
     ly_in_free(in, 0);
     assert_int_equal(0, mod->implemented);
     assert_int_equal(LY_SUCCESS, lys_compile(mod, 0, &unres));
-    assert_int_equal(LY_SUCCESS, lys_compile_unres_glob(ctx, &unres));
-    lys_compile_unres_glob_erase(ctx, &unres);
+    assert_int_equal(LY_SUCCESS, lys_compile_unres_glob(UTEST_LYCTX, &unres));
+    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
     assert_null(mod->compiled);
     mod->implemented = 1;
     assert_int_equal(LY_SUCCESS, lys_compile(mod, 0, &unres));
-    assert_int_equal(LY_SUCCESS, lys_compile_unres_glob(ctx, &unres));
-    lys_compile_unres_glob_erase(ctx, &unres);
+    assert_int_equal(LY_SUCCESS, lys_compile_unres_glob(UTEST_LYCTX, &unres));
+    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
     assert_non_null(mod->compiled);
     assert_string_equal("test", mod->name);
     assert_string_equal("urn:test", mod->ns);
@@ -141,60 +90,52 @@
     /* submodules cannot be compiled directly */
     str = "submodule test {belongs-to xxx {prefix x;}}";
     assert_int_equal(LY_SUCCESS, ly_in_new_memory(str, &in));
-    assert_int_equal(LY_EINVAL, lys_create_module(ctx, in, LYS_IN_YANG, 1, NULL, NULL, NULL, &unres, NULL));
-    lys_compile_unres_glob_erase(ctx, &unres);
+    assert_int_equal(LY_EINVAL, lys_create_module(UTEST_LYCTX, in, LYS_IN_YANG, 1, NULL, NULL, NULL, &unres, NULL));
+    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
     ly_in_free(in, 0);
-    logbuf_assert("Input data contains submodule which cannot be parsed directly without its main module.");
+    CHECK_LOG_CTX("Input data contains submodule which cannot be parsed directly without its main module.", NULL);
 
     /* data definition name collision in top level */
     str = "module aa {namespace urn:aa;prefix aa; leaf a {type string;} container a{presence x;}}";
     assert_int_equal(LY_SUCCESS, ly_in_new_memory(str, &in));
-    assert_int_equal(LY_EEXIST, lys_create_module(ctx, in, LYS_IN_YANG, 1, NULL, NULL, NULL, &unres, &mod));
-    logbuf_assert("Duplicate identifier \"a\" of data definition/RPC/action/notification statement. /aa:a");
-    lys_compile_unres_glob_erase(ctx, &unres);
+    assert_int_equal(LY_EEXIST, lys_create_module(UTEST_LYCTX, in, LYS_IN_YANG, 1, NULL, NULL, NULL, &unres, &mod));
+    CHECK_LOG_CTX("Duplicate identifier \"a\" of data definition/RPC/action/notification statement.", "/aa:a");
+    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
     ly_in_free(in, 0);
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
 }
 
 static void
 test_name_collisions(void **state)
 {
-    (void) state; /* unused */
-
-    struct ly_ctx *ctx;
     const char *yang_data;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
     /* top-level */
     yang_data = "module a {namespace urn:a;prefix a;"
             "  container c;"
             "  leaf a {type empty;}"
             "  leaf c {type empty;}"
             "}";
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, yang_data, LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"c\" of data definition/RPC/action/notification statement. /a:c");
-    logbuf_clean();
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, yang_data, LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"c\" of data definition/RPC/action/notification statement.", "/a:c");
+    UTEST_LOG_CLEAN;
 
     yang_data = "module a {namespace urn:a;prefix a;"
             "  container c;"
             "  leaf a {type empty;}"
             "  notification c;"
             "}";
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, yang_data, LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"c\" of data definition/RPC/action/notification statement. /a:c");
-    logbuf_clean();
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, yang_data, LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"c\" of data definition/RPC/action/notification statement.", "/a:c");
+    UTEST_LOG_CLEAN;
 
     yang_data = "module a {namespace urn:a;prefix a;"
             "  container c;"
             "  leaf a {type empty;}"
             "  rpc c;"
             "}";
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, yang_data, LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"c\" of data definition/RPC/action/notification statement. /a:c");
-    logbuf_clean();
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, yang_data, LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"c\" of data definition/RPC/action/notification statement.", "/a:c");
+    UTEST_LOG_CLEAN;
 
     yang_data = "module a {namespace urn:a;prefix a;"
             "  container c;"
@@ -206,51 +147,45 @@
             "    }"
             "  }"
             "}";
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, yang_data, LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"c\" of data definition/RPC/action/notification statement. /a:ch/c/c");
-    logbuf_clean();
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, yang_data, LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"c\" of data definition/RPC/action/notification statement.", "/a:ch/c/c");
+    UTEST_LOG_CLEAN;
 
     /* nested */
     yang_data = "module a {namespace urn:a;prefix a;container c { list l {key \"k\"; leaf k {type string;}"
             "leaf-list a {type string;}"
             "container a;"
             "}}}";
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, yang_data, LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"a\" of data definition/RPC/action/notification statement. /a:c/l/a");
-    logbuf_clean();
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, yang_data, LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"a\" of data definition/RPC/action/notification statement.", "/a:c/l/a");
+    UTEST_LOG_CLEAN;
 
     yang_data = "module a {yang-version 1.1;namespace urn:a;prefix a;container c { list l {key \"k\"; leaf k {type string;}"
             "leaf-list a {type string;}"
             "notification a;"
             "}}}";
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, yang_data, LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"a\" of data definition/RPC/action/notification statement. /a:c/l/a");
-    logbuf_clean();
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, yang_data, LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"a\" of data definition/RPC/action/notification statement.", "/a:c/l/a");
+    UTEST_LOG_CLEAN;
 
     yang_data = "module a {yang-version 1.1;namespace urn:a;prefix a;container c { list l {key \"k\"; leaf k {type string;}"
             "leaf-list a {type string;}"
             "action a;"
             "}}}";
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, yang_data, LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"a\" of data definition/RPC/action/notification statement. /a:c/l/a");
-    logbuf_clean();
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, yang_data, LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"a\" of data definition/RPC/action/notification statement.", "/a:c/l/a");
+    UTEST_LOG_CLEAN;
 
     /* grouping */
-
-    ly_ctx_destroy(ctx, NULL);
 }
 
 static void
 test_node_container(void **state)
 {
-    (void) state; /* unused */
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_node_container *cont;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a;container c;}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a;container c;}", LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled);
     assert_non_null((cont = (struct lysc_node_container *)mod->compiled->data));
     assert_int_equal(LYS_CONTAINER, cont->nodetype);
@@ -258,8 +193,8 @@
     assert_true(cont->flags & LYS_CONFIG_W);
     assert_true(cont->flags & LYS_STATUS_CURR);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;container c {config false; status deprecated; container child;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing explicit \"deprecated\" status that was already specified in parent, inheriting.");
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;container c {config false; status deprecated; container child;}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Missing explicit \"deprecated\" status that was already specified in parent, inheriting.", NULL);
     assert_non_null(mod->compiled);
     assert_non_null((cont = (struct lysc_node_container *)mod->compiled->data));
     assert_true(cont->flags & LYS_CONFIG_R);
@@ -269,16 +204,11 @@
     assert_true(cont->flags & LYS_CONFIG_R);
     assert_true(cont->flags & LYS_STATUS_DEPRC);
     assert_string_equal("child", cont->name);
-
-    ly_ctx_destroy(ctx, NULL);
 }
 
 static void
 test_node_leaflist(void **state)
 {
-    *state = test_node_leaflist;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
     struct lysc_node_leaflist *ll;
@@ -286,9 +216,7 @@
     const char *dflt;
     uint8_t dynamic;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a;"
             "typedef mytype {type union {type leafref {path ../target;} type string;}}"
             "leaf-list ll1 {type union {type decimal64 {fraction-digits 2;} type mytype;}}"
             "leaf-list ll2 {type leafref {path ../target;}}"
@@ -312,13 +240,13 @@
     assert_non_null(((struct lysc_type_leafref *)type)->realtype);
     assert_int_equal(LY_TYPE_INT8, ((struct lysc_type_leafref *)type)->realtype->basetype);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;leaf-list ll {type string;}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;leaf-list ll {type string;}}", LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled);
     assert_non_null((ll = (struct lysc_node_leaflist *)mod->compiled->data));
     assert_int_equal(0, ll->min);
     assert_int_equal((uint32_t)-1, ll->max);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {yang-version 1.1;namespace urn:c;prefix c;typedef mytype {type int8;default 10;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {yang-version 1.1;namespace urn:c;prefix c;typedef mytype {type int8;default 10;}"
             "leaf-list ll1 {type mytype;default 1; default 1; config false;}"
             "leaf-list ll2 {type mytype; ordered-by user;}}", LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled);
@@ -340,26 +268,26 @@
     assert_int_equal(LYS_CONFIG_W | LYS_STATUS_CURR | LYS_ORDBY_USER, ll->flags);
 
     /* ordered-by is ignored for state data, RPC/action output parameters and notification content */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {yang-version 1.1;namespace urn:d;prefix d;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {yang-version 1.1;namespace urn:d;prefix d;"
             "leaf-list ll {config false; type string; ordered-by user;}}", LYS_IN_YANG, &mod));
     /* but warning is present: */
-    logbuf_assert("The ordered-by statement is ignored in lists representing state data (/d:ll).");
+    CHECK_LOG_CTX("The ordered-by statement is ignored in lists representing state data (/d:ll).", NULL);
     assert_non_null(mod->compiled);
     assert_non_null((ll = (struct lysc_node_leaflist *)mod->compiled->data));
     assert_int_equal(LYS_CONFIG_R | LYS_STATUS_CURR | LYS_ORDBY_SYSTEM | LYS_SET_CONFIG, ll->flags);
-    logbuf_clean();
+    UTEST_LOG_CLEAN;
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module e {yang-version 1.1;namespace urn:e;prefix e;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module e {yang-version 1.1;namespace urn:e;prefix e;"
             "rpc oper {output {leaf-list ll {type string; ordered-by user;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("The ordered-by statement is ignored in lists representing RPC/action output parameters (/e:oper/output/ll).");
-    logbuf_clean();
+    CHECK_LOG_CTX("The ordered-by statement is ignored in lists representing RPC/action output parameters (/e:oper/output/ll).", NULL);
+    UTEST_LOG_CLEAN;
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module f {yang-version 1.1;namespace urn:f;prefix f;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module f {yang-version 1.1;namespace urn:f;prefix f;"
             "notification event {leaf-list ll {type string; ordered-by user;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("The ordered-by statement is ignored in lists representing notification content (/f:event/ll).");
+    CHECK_LOG_CTX("The ordered-by statement is ignored in lists representing notification content (/f:event/ll).", NULL);
 
     /* forward reference in default */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module g {yang-version 1.1; namespace urn:g;prefix g;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module g {yang-version 1.1; namespace urn:g;prefix g;"
             "leaf ref {type instance-identifier {require-instance true;} default \"/g:g[.='val']\";}"
             "leaf-list g {type string;}}", LYS_IN_YANG, &mod));
     assert_non_null(l = (struct lysc_node_leaf *)mod->compiled->data);
@@ -367,38 +295,32 @@
     assert_non_null(l->dflt);
 
     /* invalid */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;leaf-list ll {type empty;}}",
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;leaf-list ll {type empty;}}",
             LYS_IN_YANG, NULL));
-    logbuf_assert("Leaf-list of type \"empty\" is allowed only in YANG 1.1 modules. /aa:ll");
+    CHECK_LOG_CTX("Leaf-list of type \"empty\" is allowed only in YANG 1.1 modules.", "/aa:ll");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {yang-version 1.1;namespace urn:bb;prefix bb;leaf-list ll {type empty; default x;}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid default - value does not fit the type (Invalid empty value \"x\".). /bb:ll");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {yang-version 1.1;namespace urn:bb;prefix bb;leaf-list ll {type empty; default x;}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid default - value does not fit the type (Invalid empty value \"x\".).", "/bb:ll");
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module cc {yang-version 1.1;namespace urn:cc;prefix cc;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module cc {yang-version 1.1;namespace urn:cc;prefix cc;"
             "leaf-list ll {config false;type string; default one;default two;default one;}}", LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled);
     assert_non_null((ll = (struct lysc_node_leaflist *)mod->compiled->data));
     assert_non_null(ll->dflts);
     assert_int_equal(3, LY_ARRAY_COUNT(ll->dflts));
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {yang-version 1.1;namespace urn:dd;prefix dd;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {yang-version 1.1;namespace urn:dd;prefix dd;"
             "leaf-list ll {type string; default one;default two;default one;}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Configuration leaf-list has multiple defaults of the same value \"one\". /dd:ll");
+    CHECK_LOG_CTX("Configuration leaf-list has multiple defaults of the same value \"one\".", "/dd:ll");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {yang-version 1.1; namespace urn:ee;prefix ee;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {yang-version 1.1; namespace urn:ee;prefix ee;"
             "leaf ref {type instance-identifier {require-instance true;} default \"/ee:g\";}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid default - value does not fit the type "
-            "(Invalid instance-identifier \"/ee:g\" value - semantic error.). /ee:ref");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Invalid default - value does not fit the type "
+            "(Invalid instance-identifier \"/ee:g\" value - semantic error.).", "/ee:ref");
 }
 
 static void
 test_node_list(void **state)
 {
-    *state = test_node_list;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_node_list *list;
     struct lysc_node *child;
@@ -409,10 +331,8 @@
             "list l2 {config false;leaf value {type string;}}}";
     const char *feats[] = {"f", NULL};
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
     assert_int_equal(LY_SUCCESS, ly_in_new_memory(data, &in));
-    assert_int_equal(LY_SUCCESS, lys_parse(ctx, in, LYS_IN_YANG, feats, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse(UTEST_LYCTX, in, LYS_IN_YANG, feats, &mod));
     ly_in_free(in, 0);
     list = (struct lysc_node_list *)mod->compiled->data;
     assert_non_null(list);
@@ -431,7 +351,7 @@
     assert_false(list->child->flags & LYS_KEY);
     assert_int_equal(LYS_CONFIG_R | LYS_STATUS_CURR | LYS_ORDBY_SYSTEM | LYS_SET_CONFIG | LYS_KEYLESS, list->flags);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;"
             "list l {key a; unique \"a c/b:b\"; unique \"c/e d\";"
             "leaf a {type string; default x;} leaf d {type string;config false;}"
             "container c {leaf b {type string;}leaf e{type string;config false;}}}}",
@@ -455,7 +375,7 @@
     assert_string_equal("d", list->uniques[1][1]->name);
     assert_true(list->uniques[1][1]->flags & LYS_UNIQUE);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {yang-version 1.1;namespace urn:c;prefix c;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {yang-version 1.1;namespace urn:c;prefix c;"
             "list l {key a;leaf a {type empty;}}}", LYS_IN_YANG, &mod));
     list = (struct lysc_node_list *)mod->compiled->data;
     assert_non_null(list);
@@ -465,7 +385,7 @@
     assert_int_equal(LY_TYPE_EMPTY, ((struct lysc_node_leaf *)list->child)->type->basetype);
 
     /* keys order */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {yang-version 1.1;namespace urn:d;prefix d;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {yang-version 1.1;namespace urn:d;prefix d;"
             "list l {key \"d b c\";leaf a {type string;} leaf b {type string;} leaf c {type string;} leaf d {type string;}}}", LYS_IN_YANG, &mod));
     list = (struct lysc_node_list *)mod->compiled->data;
     assert_non_null(list);
@@ -484,74 +404,66 @@
     assert_false(child->flags & LYS_KEY);
 
     /* invalid */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;list l;}", LYS_IN_YANG, NULL));
-    logbuf_assert("Missing key in list representing configuration data. /aa:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;list l;}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Missing key in list representing configuration data.", "/aa:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {yang-version 1.1; namespace urn:bb;prefix bb;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {yang-version 1.1; namespace urn:bb;prefix bb;"
             "list l {key x; leaf x {type string; when 1;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("List's key must not have any \"when\" statement. /bb:l/x");
+    CHECK_LOG_CTX("List's key must not have any \"when\" statement.", "/bb:l/x");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {yang-version 1.1;namespace urn:cc;prefix cc;feature f;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {yang-version 1.1;namespace urn:cc;prefix cc;feature f;"
             "list l {key x; leaf x {type string; if-feature f;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Key \"x\" is disabled by its if-features. /cc:l/x");
+    CHECK_LOG_CTX("Key \"x\" is disabled by its if-features.", "/cc:l/x");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {namespace urn:dd;prefix dd;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {namespace urn:dd;prefix dd;"
             "list l {key x; leaf x {type string; config false;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Key of the configuration list must not be status leaf. /dd:l/x");
+    CHECK_LOG_CTX("Key of the configuration list must not be status leaf.", "/dd:l/x");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:ee;prefix ee;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:ee;prefix ee;"
             "list l {config false;key x; leaf x {type string; config true;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Configuration node cannot be child of any state data node. /ee:l/x");
+    CHECK_LOG_CTX("Configuration node cannot be child of any state data node.", "/ee:l/x");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff {namespace urn:ff;prefix ff;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff {namespace urn:ff;prefix ff;"
             "list l {key x; leaf-list x {type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("The list's key \"x\" not found. /ff:l");
+    CHECK_LOG_CTX("The list's key \"x\" not found.", "/ff:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {namespace urn:gg;prefix gg;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {namespace urn:gg;prefix gg;"
             "list l {key x; unique y;leaf x {type string;} leaf-list y {type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Unique's descendant-schema-nodeid \"y\" refers to leaf-list node instead of a leaf. /gg:l");
+    CHECK_LOG_CTX("Unique's descendant-schema-nodeid \"y\" refers to leaf-list node instead of a leaf.", "/gg:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module hh {namespace urn:hh;prefix hh;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module hh {namespace urn:hh;prefix hh;"
             "list l {key x; unique \"x y\";leaf x {type string;} leaf y {config false; type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Unique statement \"x y\" refers to leaves with different config type. /hh:l");
+    CHECK_LOG_CTX("Unique statement \"x y\" refers to leaves with different config type.", "/hh:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ii {namespace urn:ii;prefix ii;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ii {namespace urn:ii;prefix ii;"
             "list l {key x; unique a:x;leaf x {type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid descendant-schema-nodeid value \"a:x\" - prefix \"a\" not defined in module \"ii\". /ii:l");
+    CHECK_LOG_CTX("Invalid descendant-schema-nodeid value \"a:x\" - prefix \"a\" not defined in module \"ii\".", "/ii:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj {namespace urn:jj;prefix jj;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj {namespace urn:jj;prefix jj;"
             "list l {key x; unique c/x;leaf x {type string;}container c {leaf y {type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid descendant-schema-nodeid value \"c/x\" - target node not found. /jj:l");
+    CHECK_LOG_CTX("Invalid descendant-schema-nodeid value \"c/x\" - target node not found.", "/jj:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module kk {namespace urn:kk;prefix kk;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module kk {namespace urn:kk;prefix kk;"
             "list l {key x; unique c^y;leaf x {type string;}container c {leaf y {type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid descendant-schema-nodeid value \"c^\" - missing \"/\" as node-identifier separator. /kk:l");
+    CHECK_LOG_CTX("Invalid descendant-schema-nodeid value \"c^\" - missing \"/\" as node-identifier separator.", "/kk:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ll {namespace urn:ll;prefix ll;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ll {namespace urn:ll;prefix ll;"
             "list l {key \"x y x\";leaf x {type string;}leaf y {type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicated key identifier \"x\". /ll:l");
+    CHECK_LOG_CTX("Duplicated key identifier \"x\".", "/ll:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm {namespace urn:mm;prefix mm;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm {namespace urn:mm;prefix mm;"
             "list l {key x;leaf x {type empty;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("List's key cannot be of \"empty\" type until it is in YANG 1.1 module. /mm:l/x");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("List's key cannot be of \"empty\" type until it is in YANG 1.1 module.", "/mm:l/x");
 }
 
 static void
 test_node_choice(void **state)
 {
-    *state = test_node_choice;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_node_choice *ch;
     struct lysc_node_case *cs;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a;feature f;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a;feature f;"
             "choice ch {default a:b; when \"true()\"; case a {leaf a1 {type string;}leaf a2 {type string;}}"
             "leaf b {type string;}}}", LYS_IN_YANG, &mod));
     ch = (struct lysc_node_choice *)mod->compiled->data;
@@ -578,81 +490,65 @@
     assert_ptr_equal(cs, cs->child->parent);
     assert_ptr_equal(ch->dflt, cs);
 
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;"
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;"
             "choice ch {case a {leaf x {type string;}}leaf x {type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"x\" of data definition/RPC/action/notification statement. /aa:ch/x/x");
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module aa2 {namespace urn:aa2;prefix aa;"
+    CHECK_LOG_CTX("Duplicate identifier \"x\" of data definition/RPC/action/notification statement.", "/aa:ch/x/x");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module aa2 {namespace urn:aa2;prefix aa;"
             "choice ch {case a {leaf y {type string;}}case b {leaf y {type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"y\" of data definition/RPC/action/notification statement. /aa2:ch/b/y");
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;"
+    CHECK_LOG_CTX("Duplicate identifier \"y\" of data definition/RPC/action/notification statement.", "/aa2:ch/b/y");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;"
             "choice ch {case a {leaf x {type string;}}leaf a {type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"a\" of case statement. /bb:ch/a");
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module bb2 {namespace urn:bb2;prefix bb;"
+    CHECK_LOG_CTX("Duplicate identifier \"a\" of case statement.", "/bb:ch/a");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module bb2 {namespace urn:bb2;prefix bb;"
             "choice ch {case b {leaf x {type string;}}case b {leaf y {type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"b\" of case statement. /bb2:ch/b");
+    CHECK_LOG_CTX("Duplicate identifier \"b\" of case statement.", "/bb2:ch/b");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ca {namespace urn:ca;prefix ca;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ca {namespace urn:ca;prefix ca;"
             "choice ch {default c;case a {leaf x {type string;}}case b {leaf y {type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Default case \"c\" not found. /ca:ch");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cb {namespace urn:cb;prefix cb; import a {prefix a;}"
+    CHECK_LOG_CTX("Default case \"c\" not found.", "/ca:ch");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cb {namespace urn:cb;prefix cb; import a {prefix a;}"
             "choice ch {default a:a;case a {leaf x {type string;}}case b {leaf y {type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Default case \"a:a\" not found. /cb:ch");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc;"
+    CHECK_LOG_CTX("Default case \"a:a\" not found.", "/cb:ch");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc;"
             "choice ch {default a;case a {leaf x {mandatory true;type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Mandatory node \"x\" under the default case \"a\". /cc:ch");
+    CHECK_LOG_CTX("Mandatory node \"x\" under the default case \"a\".", "/cc:ch");
     /* TODO check with mandatory nodes from augment placed into the case */
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
 }
 
 static void
 test_node_anydata(void **state)
 {
-    *state = test_node_anydata;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_node_anydata *any;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {yang-version 1.1;namespace urn:a;prefix a;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {yang-version 1.1;namespace urn:a;prefix a;"
             "anydata any {config false;mandatory true;}}", LYS_IN_YANG, &mod));
     any = (struct lysc_node_anydata *)mod->compiled->data;
     assert_non_null(any);
     assert_int_equal(LYS_ANYDATA, any->nodetype);
     assert_int_equal(LYS_CONFIG_R | LYS_STATUS_CURR | LYS_MAND_TRUE | LYS_SET_CONFIG, any->flags);
 
-    logbuf_clean();
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;"
+    UTEST_LOG_CLEAN;
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;"
             "anyxml any;}", LYS_IN_YANG, &mod));
     any = (struct lysc_node_anydata *)mod->compiled->data;
     assert_non_null(any);
     assert_int_equal(LYS_ANYXML, any->nodetype);
     assert_int_equal(LYS_CONFIG_W | LYS_STATUS_CURR, any->flags);
-    logbuf_assert("Use of anyxml to define configuration data is not recommended. /b:any"); /* warning */
+    CHECK_LOG_CTX("Use of anyxml to define configuration data is not recommended. /b:any", NULL);     /* warning */
 
     /* invalid */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;anydata any;}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid keyword \"anydata\" as a child of \"module\" - the statement is allowed only in YANG 1.1 modules. Line number 1.");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;anydata any;}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid keyword \"anydata\" as a child of \"module\" - the statement is allowed only in YANG 1.1 modules.", "Line number 1.");
 }
 
 static void
 test_action(void **state)
 {
-    *state = test_action;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     const struct lysc_action *rpc;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a;"
             "rpc a {input {leaf x {type int8;} leaf y {type int8;}} output {leaf result {type int16;}}}}", LYS_IN_YANG, &mod));
     rpc = mod->compiled->rpcs;
     assert_non_null(rpc);
@@ -661,7 +557,7 @@
     assert_int_equal(LYS_STATUS_CURR, rpc->flags);
     assert_string_equal("a", rpc->name);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {yang-version 1.1; namespace urn:b;prefix b; container top {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {yang-version 1.1; namespace urn:b;prefix b; container top {"
             "action b {input {leaf x {type int8;} leaf y {type int8;}}"
             "output {must \"result > 25\"; must \"/top\"; leaf result {type int16;}}}}"
             "augment /top/b/output {leaf result2 {type string;}}}", LYS_IN_YANG, &mod));
@@ -675,49 +571,41 @@
     assert_int_equal(2, LY_ARRAY_COUNT(rpc->output.musts));
 
     /* invalid */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;container top {action x;}}",
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;container top {action x;}}",
             LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid keyword \"action\" as a child of \"container\" - the statement is allowed only in YANG 1.1 modules. Line number 1.");
+    CHECK_LOG_CTX("Invalid keyword \"action\" as a child of \"container\" - the statement is allowed only in YANG 1.1 modules.", "Line number 1.");
 
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;leaf x{type string;} rpc x;}",
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;leaf x{type string;} rpc x;}",
             LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"x\" of data definition/RPC/action/notification statement. /bb:x");
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module cc {yang-version 1.1; namespace urn:cc;prefix cc;container c {leaf y {type string;} action y;}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"y\" of data definition/RPC/action/notification statement. /cc:c/y");
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module dd {yang-version 1.1; namespace urn:dd;prefix dd;container c {action z; action z;}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"z\" of data definition/RPC/action/notification statement. /dd:c/z");
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule eesub {belongs-to ee {prefix ee;} notification w;}");
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module ee {yang-version 1.1; namespace urn:ee;prefix ee;include eesub; rpc w;}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"w\" of data definition/RPC/action/notification statement. /ee:w");
+    CHECK_LOG_CTX("Duplicate identifier \"x\" of data definition/RPC/action/notification statement.", "/bb:x");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module cc {yang-version 1.1; namespace urn:cc;prefix cc;container c {leaf y {type string;} action y;}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"y\" of data definition/RPC/action/notification statement.", "/cc:c/y");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module dd {yang-version 1.1; namespace urn:dd;prefix dd;container c {action z; action z;}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"z\" of data definition/RPC/action/notification statement.", "/dd:c/z");
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "submodule eesub {belongs-to ee {prefix ee;} notification w;}");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module ee {yang-version 1.1; namespace urn:ee;prefix ee;include eesub; rpc w;}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"w\" of data definition/RPC/action/notification statement.", "/ee:w");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff {yang-version 1.1; namespace urn:ff;prefix ff; rpc test {input {container a {leaf b {type string;}}}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff {yang-version 1.1; namespace urn:ff;prefix ff; rpc test {input {container a {leaf b {type string;}}}}"
             "augment /test/input/a {action invalid {input {leaf x {type string;}}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Action \"invalid\" is placed inside another RPC/action. /ff:{augment='/test/input/a'}/invalid");
+    CHECK_LOG_CTX("Action \"invalid\" is placed inside another RPC/action.", "/ff:{augment='/test/input/a'}/invalid");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {yang-version 1.1; namespace urn:gg;prefix gg; notification test {container a {leaf b {type string;}}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {yang-version 1.1; namespace urn:gg;prefix gg; notification test {container a {leaf b {type string;}}}"
             "augment /test/a {action invalid {input {leaf x {type string;}}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Action \"invalid\" is placed inside notification. /gg:{augment='/test/a'}/invalid");
+    CHECK_LOG_CTX("Action \"invalid\" is placed inside notification.", "/gg:{augment='/test/a'}/invalid");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module hh {yang-version 1.1; namespace urn:hh;prefix hh; notification test {container a {uses grp;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module hh {yang-version 1.1; namespace urn:hh;prefix hh; notification test {container a {uses grp;}}"
             "grouping grp {action invalid {input {leaf x {type string;}}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Action \"invalid\" is placed inside notification. /hh:test/a/{uses='grp'}/invalid");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Action \"invalid\" is placed inside notification.", "/hh:test/a/{uses='grp'}/invalid");
 }
 
 static void
 test_notification(void **state)
 {
-    *state = test_notification;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     const struct lysc_notif *notif;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a;"
             "notification a1 {leaf x {type int8;}} notification a2;}", LYS_IN_YANG, &mod));
     notif = mod->compiled->notifs;
     assert_non_null(notif);
@@ -732,7 +620,7 @@
     assert_string_equal("a2", notif[1].name);
     assert_null(notif[1].data);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {yang-version 1.1; namespace urn:b;prefix b; container top {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {yang-version 1.1; namespace urn:b;prefix b; container top {"
             "notification b1 {leaf x {type int8;}} notification b2 {must \"/top\";}}}", LYS_IN_YANG, &mod));
     notif = lysc_node_notifs(mod->compiled->data);
     assert_non_null(notif);
@@ -749,34 +637,31 @@
     assert_int_equal(1, LY_ARRAY_COUNT(notif[1].musts));
 
     /* invalid */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;container top {notification x;}}",
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;container top {notification x;}}",
             LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid keyword \"notification\" as a child of \"container\" - the statement is allowed only in YANG 1.1 modules. Line number 1.");
+    CHECK_LOG_CTX("Invalid keyword \"notification\" as a child of \"container\" - the statement is allowed only in YANG 1.1 modules.", "Line number 1.");
 
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;leaf x{type string;} notification x;}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"x\" of data definition/RPC/action/notification statement. /bb:x");
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module cc {yang-version 1.1; namespace urn:cc;prefix cc;container c {leaf y {type string;} notification y;}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"y\" of data definition/RPC/action/notification statement. /cc:c/y");
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module dd {yang-version 1.1; namespace urn:dd;prefix dd;container c {notification z; notification z;}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"z\" of data definition/RPC/action/notification statement. /dd:c/z");
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule eesub {belongs-to ee {prefix ee;} rpc w;}");
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module ee {yang-version 1.1; namespace urn:ee;prefix ee;include eesub; notification w;}", LYS_IN_YANG, NULL));
-    logbuf_assert("Duplicate identifier \"w\" of data definition/RPC/action/notification statement. /ee:w");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;leaf x{type string;} notification x;}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"x\" of data definition/RPC/action/notification statement.", "/bb:x");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module cc {yang-version 1.1; namespace urn:cc;prefix cc;container c {leaf y {type string;} notification y;}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"y\" of data definition/RPC/action/notification statement.", "/cc:c/y");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module dd {yang-version 1.1; namespace urn:dd;prefix dd;container c {notification z; notification z;}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"z\" of data definition/RPC/action/notification statement.", "/dd:c/z");
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "submodule eesub {belongs-to ee {prefix ee;} rpc w;}");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module ee {yang-version 1.1; namespace urn:ee;prefix ee;include eesub; notification w;}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Duplicate identifier \"w\" of data definition/RPC/action/notification statement.", "/ee:w");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff {yang-version 1.1; namespace urn:ff;prefix ff; rpc test {input {container a {leaf b {type string;}}}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff {yang-version 1.1; namespace urn:ff;prefix ff; rpc test {input {container a {leaf b {type string;}}}}"
             "augment /test/input/a {notification invalid {leaf x {type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Notification \"invalid\" is placed inside RPC/action. /ff:{augment='/test/input/a'}/invalid");
+    CHECK_LOG_CTX("Notification \"invalid\" is placed inside RPC/action.", "/ff:{augment='/test/input/a'}/invalid");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {yang-version 1.1; namespace urn:gg;prefix gg; notification test {container a {leaf b {type string;}}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {yang-version 1.1; namespace urn:gg;prefix gg; notification test {container a {leaf b {type string;}}}"
             "augment /test/a {notification invalid {leaf x {type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Notification \"invalid\" is placed inside another notification. /gg:{augment='/test/a'}/invalid");
+    CHECK_LOG_CTX("Notification \"invalid\" is placed inside another notification.", "/gg:{augment='/test/a'}/invalid");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module hh {yang-version 1.1; namespace urn:hh;prefix hh; rpc test {input {container a {uses grp;}}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module hh {yang-version 1.1; namespace urn:hh;prefix hh; rpc test {input {container a {uses grp;}}}"
             "grouping grp {notification invalid {leaf x {type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Notification \"invalid\" is placed inside RPC/action. /hh:test/input/a/{uses='grp'}/invalid");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Notification \"invalid\" is placed inside RPC/action.", "/hh:test/input/a/{uses='grp'}/invalid");
 }
 
 /**
@@ -786,15 +671,10 @@
 static void
 test_type_range(void **state)
 {
-    *state = test_type_range;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a;leaf l {type int8 {range min..10|max;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a;leaf l {type int8 {range min..10|max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_INT8, type->basetype);
@@ -806,7 +686,7 @@
     assert_int_equal(127, ((struct lysc_type_num *)type)->range->parts[1].min_64);
     assert_int_equal(127, ((struct lysc_type_num *)type)->range->parts[1].max_64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;leaf l {type int16 {range min..10|max;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;leaf l {type int16 {range min..10|max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_INT16, type->basetype);
@@ -818,7 +698,7 @@
     assert_int_equal(32767, ((struct lysc_type_num *)type)->range->parts[1].min_64);
     assert_int_equal(32767, ((struct lysc_type_num *)type)->range->parts[1].max_64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {namespace urn:c;prefix c;leaf l {type int32 {range min..10|max;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {namespace urn:c;prefix c;leaf l {type int32 {range min..10|max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_INT32, type->basetype);
@@ -830,7 +710,7 @@
     assert_int_equal(INT64_C(2147483647), ((struct lysc_type_num *)type)->range->parts[1].min_64);
     assert_int_equal(INT64_C(2147483647), ((struct lysc_type_num *)type)->range->parts[1].max_64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {namespace urn:d;prefix d;leaf l {type int64 {range min..10|max;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {namespace urn:d;prefix d;leaf l {type int64 {range min..10|max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_INT64, type->basetype);
@@ -842,7 +722,7 @@
     assert_int_equal(INT64_C(9223372036854775807), ((struct lysc_type_num *)type)->range->parts[1].min_64);
     assert_int_equal(INT64_C(9223372036854775807), ((struct lysc_type_num *)type)->range->parts[1].max_64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module e {namespace urn:e;prefix e;leaf l {type uint8 {range min..10|max;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module e {namespace urn:e;prefix e;leaf l {type uint8 {range min..10|max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_UINT8, type->basetype);
@@ -854,7 +734,7 @@
     assert_int_equal(255, ((struct lysc_type_num *)type)->range->parts[1].min_u64);
     assert_int_equal(255, ((struct lysc_type_num *)type)->range->parts[1].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module f {namespace urn:f;prefix f;leaf l {type uint16 {range min..10|max;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module f {namespace urn:f;prefix f;leaf l {type uint16 {range min..10|max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_UINT16, type->basetype);
@@ -866,7 +746,7 @@
     assert_int_equal(65535, ((struct lysc_type_num *)type)->range->parts[1].min_u64);
     assert_int_equal(65535, ((struct lysc_type_num *)type)->range->parts[1].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module g {namespace urn:g;prefix g;leaf l {type uint32 {range min..10|max;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module g {namespace urn:g;prefix g;leaf l {type uint32 {range min..10|max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_UINT32, type->basetype);
@@ -878,7 +758,7 @@
     assert_int_equal(UINT64_C(4294967295), ((struct lysc_type_num *)type)->range->parts[1].min_u64);
     assert_int_equal(UINT64_C(4294967295), ((struct lysc_type_num *)type)->range->parts[1].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module h {namespace urn:h;prefix h;leaf l {type uint64 {range min..10|max;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module h {namespace urn:h;prefix h;leaf l {type uint64 {range min..10|max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_UINT64, type->basetype);
@@ -890,7 +770,7 @@
     assert_int_equal(UINT64_C(18446744073709551615), ((struct lysc_type_num *)type)->range->parts[1].min_u64);
     assert_int_equal(UINT64_C(18446744073709551615), ((struct lysc_type_num *)type)->range->parts[1].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module i {namespace urn:i;prefix i;typedef mytype {type uint8 {range 10..100;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module i {namespace urn:i;prefix i;typedef mytype {type uint8 {range 10..100;}}"
             "typedef mytype2 {type mytype;} leaf l {type mytype2;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -900,7 +780,7 @@
     assert_non_null(((struct lysc_type_num *)type)->range->parts);
     assert_int_equal(1, LY_ARRAY_COUNT(((struct lysc_type_num *)type)->range->parts));
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module j {namespace urn:j;prefix j;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module j {namespace urn:j;prefix j;"
             "typedef mytype {type uint8 {range 1..100{description \"one to hundred\";reference A;}}}"
             "leaf l {type mytype {range 1..10 {description \"one to ten\";reference B;}}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -914,23 +794,15 @@
     assert_int_equal(1, LY_ARRAY_COUNT(((struct lysc_type_num *)type)->range->parts));
     assert_int_equal(1, ((struct lysc_type_num *)type)->range->parts[0].min_u64);
     assert_int_equal(10, ((struct lysc_type_num *)type)->range->parts[0].max_u64);
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
 }
 
 static void
 test_type_length(void **state)
 {
-    *state = test_type_length;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a;leaf l {type binary {length min {error-app-tag errortag;error-message error;}}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a;leaf l {type binary {length min {error-app-tag errortag;error-message error;}}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_non_null(((struct lysc_type_bin *)type)->length);
@@ -941,7 +813,7 @@
     assert_int_equal(0, ((struct lysc_type_bin *)type)->length->parts[0].min_u64);
     assert_int_equal(0, ((struct lysc_type_bin *)type)->length->parts[0].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;leaf l {type binary {length max;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;leaf l {type binary {length max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_non_null(((struct lysc_type_bin *)type)->length);
@@ -950,7 +822,7 @@
     assert_int_equal(UINT64_C(18446744073709551615), ((struct lysc_type_bin *)type)->length->parts[0].min_u64);
     assert_int_equal(UINT64_C(18446744073709551615), ((struct lysc_type_bin *)type)->length->parts[0].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {namespace urn:c;prefix c;leaf l {type binary {length min..max;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {namespace urn:c;prefix c;leaf l {type binary {length min..max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_non_null(((struct lysc_type_bin *)type)->length);
@@ -959,7 +831,7 @@
     assert_int_equal(0, ((struct lysc_type_bin *)type)->length->parts[0].min_u64);
     assert_int_equal(UINT64_C(18446744073709551615), ((struct lysc_type_bin *)type)->length->parts[0].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {namespace urn:d;prefix d;leaf l {type binary {length 5;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {namespace urn:d;prefix d;leaf l {type binary {length 5;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_non_null(((struct lysc_type_bin *)type)->length);
@@ -968,7 +840,7 @@
     assert_int_equal(5, ((struct lysc_type_bin *)type)->length->parts[0].min_u64);
     assert_int_equal(5, ((struct lysc_type_bin *)type)->length->parts[0].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module e {namespace urn:e;prefix e;leaf l {type binary {length 1..10;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module e {namespace urn:e;prefix e;leaf l {type binary {length 1..10;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_non_null(((struct lysc_type_bin *)type)->length);
@@ -977,7 +849,7 @@
     assert_int_equal(1, ((struct lysc_type_bin *)type)->length->parts[0].min_u64);
     assert_int_equal(10, ((struct lysc_type_bin *)type)->length->parts[0].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module f {namespace urn:f;prefix f;leaf l {type binary {length 1..10|20..30;}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module f {namespace urn:f;prefix f;leaf l {type binary {length 1..10|20..30;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_non_null(((struct lysc_type_bin *)type)->length);
@@ -988,7 +860,7 @@
     assert_int_equal(20, ((struct lysc_type_bin *)type)->length->parts[1].min_u64);
     assert_int_equal(30, ((struct lysc_type_bin *)type)->length->parts[1].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module g {namespace urn:g;prefix g;leaf l {type binary {length \"16 | 32\";}}}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module g {namespace urn:g;prefix g;leaf l {type binary {length \"16 | 32\";}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_non_null(((struct lysc_type_bin *)type)->length);
@@ -999,7 +871,7 @@
     assert_int_equal(32, ((struct lysc_type_bin *)type)->length->parts[1].min_u64);
     assert_int_equal(32, ((struct lysc_type_bin *)type)->length->parts[1].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module h {namespace urn:h;prefix h;typedef mytype {type binary {length 10;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module h {namespace urn:h;prefix h;typedef mytype {type binary {length 10;}}"
             "leaf l {type mytype {length \"10\";}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1009,7 +881,7 @@
     assert_int_equal(10, ((struct lysc_type_bin *)type)->length->parts[0].min_u64);
     assert_int_equal(10, ((struct lysc_type_bin *)type)->length->parts[0].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module i {namespace urn:i;prefix i;typedef mytype {type binary {length 10..100;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module i {namespace urn:i;prefix i;typedef mytype {type binary {length 10..100;}}"
             "leaf l {type mytype {length \"50\";}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1019,7 +891,7 @@
     assert_int_equal(50, ((struct lysc_type_bin *)type)->length->parts[0].min_u64);
     assert_int_equal(50, ((struct lysc_type_bin *)type)->length->parts[0].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module j {namespace urn:j;prefix j;typedef mytype {type binary {length 10..100;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module j {namespace urn:j;prefix j;typedef mytype {type binary {length 10..100;}}"
             "leaf l {type mytype {length \"10..30|60..100\";}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1031,7 +903,7 @@
     assert_int_equal(60, ((struct lysc_type_bin *)type)->length->parts[1].min_u64);
     assert_int_equal(100, ((struct lysc_type_bin *)type)->length->parts[1].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module k {namespace urn:k;prefix k;typedef mytype {type binary {length 10..100;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module k {namespace urn:k;prefix k;typedef mytype {type binary {length 10..100;}}"
             "leaf l {type mytype {length \"10..80\";}}leaf ll {type mytype;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1050,7 +922,7 @@
     assert_int_equal(10, ((struct lysc_type_bin *)type)->length->parts[0].min_u64);
     assert_int_equal(100, ((struct lysc_type_bin *)type)->length->parts[0].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module l {namespace urn:l;prefix l;typedef mytype {type string {length 10..100;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module l {namespace urn:l;prefix l;typedef mytype {type string {length 10..100;}}"
             "typedef mytype2 {type mytype {pattern '[0-9]*';}} leaf l {type mytype2 {pattern '[0-4]*';}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1062,7 +934,7 @@
     assert_int_equal(10, ((struct lysc_type_str *)type)->length->parts[0].min_u64);
     assert_int_equal(100, ((struct lysc_type_str *)type)->length->parts[0].max_u64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module m {namespace urn:m;prefix m;typedef mytype {type string {length 10;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module m {namespace urn:m;prefix m;typedef mytype {type string {length 10;}}"
             "leaf l {type mytype {length min..max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1075,72 +947,64 @@
     assert_int_equal(10, ((struct lysc_type_str *)type)->length->parts[0].max_u64);
 
     /* invalid values */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;leaf l {type binary {length -10;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - value \"-10\" does not fit the type limitations. /aa:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;leaf l {type binary {length 18446744073709551616;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - invalid value \"18446744073709551616\". /bb:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc;leaf l {type binary {length \"max .. 10\";}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - unexpected data after max keyword (.. 10). /cc:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {namespace urn:dd;prefix dd;leaf l {type binary {length 50..10;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - values are not in ascending order (10). /dd:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:ee;prefix ee;leaf l {type binary {length \"50 | 10\";}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - values are not in ascending order (10). /ee:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff {namespace urn:ff;prefix ff;leaf l {type binary {length \"x\";}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - unexpected data (x). /ff:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {namespace urn:gg;prefix gg;leaf l {type binary {length \"50 | min\";}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - unexpected data before min keyword (50 | ). /gg:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module hh {namespace urn:hh;prefix hh;leaf l {type binary {length \"| 50\";}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - unexpected beginning of the expression (| 50). /hh:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ii {namespace urn:ii;prefix ii;leaf l {type binary {length \"10 ..\";}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - unexpected end of the expression after \"..\" (10 ..). /ii:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj {namespace urn:jj;prefix jj;leaf l {type binary {length \".. 10\";}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - unexpected \"..\" without a lower bound. /jj:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module kk {namespace urn:kk;prefix kk;leaf l {type binary {length \"10 |\";}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - unexpected end of the expression (10 |). /kk:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module kl {namespace urn:kl;prefix kl;leaf l {type binary {length \"10..20 | 15..30\";}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - values are not in ascending order (15). /kl:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;leaf l {type binary {length -10;}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - value \"-10\" does not fit the type limitations.", "/aa:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;leaf l {type binary {length 18446744073709551616;}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - invalid value \"18446744073709551616\".", "/bb:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc;leaf l {type binary {length \"max .. 10\";}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - unexpected data after max keyword (.. 10).", "/cc:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {namespace urn:dd;prefix dd;leaf l {type binary {length 50..10;}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - values are not in ascending order (10).", "/dd:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:ee;prefix ee;leaf l {type binary {length \"50 | 10\";}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - values are not in ascending order (10).", "/ee:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff {namespace urn:ff;prefix ff;leaf l {type binary {length \"x\";}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - unexpected data (x).", "/ff:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {namespace urn:gg;prefix gg;leaf l {type binary {length \"50 | min\";}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - unexpected data before min keyword (50 | ).", "/gg:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module hh {namespace urn:hh;prefix hh;leaf l {type binary {length \"| 50\";}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - unexpected beginning of the expression (| 50).", "/hh:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ii {namespace urn:ii;prefix ii;leaf l {type binary {length \"10 ..\";}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - unexpected end of the expression after \"..\" (10 ..).", "/ii:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj {namespace urn:jj;prefix jj;leaf l {type binary {length \".. 10\";}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - unexpected \"..\" without a lower bound.", "/jj:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module kk {namespace urn:kk;prefix kk;leaf l {type binary {length \"10 |\";}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - unexpected end of the expression (10 |).", "/kk:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module kl {namespace urn:kl;prefix kl;leaf l {type binary {length \"10..20 | 15..30\";}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid length restriction - values are not in ascending order (15).", "/kl:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ll {namespace urn:ll;prefix ll;typedef mytype {type binary {length 10;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ll {namespace urn:ll;prefix ll;typedef mytype {type binary {length 10;}}"
             "leaf l {type mytype {length 11;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - the derived restriction (11) is not equally or more limiting. /ll:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm {namespace urn:mm;prefix mm;typedef mytype {type binary {length 10..100;}}"
+    CHECK_LOG_CTX("Invalid length restriction - the derived restriction (11) is not equally or more limiting.", "/ll:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm {namespace urn:mm;prefix mm;typedef mytype {type binary {length 10..100;}}"
             "leaf l {type mytype {length 1..11;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - the derived restriction (1..11) is not equally or more limiting. /mm:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module nn {namespace urn:nn;prefix nn;typedef mytype {type binary {length 10..100;}}"
+    CHECK_LOG_CTX("Invalid length restriction - the derived restriction (1..11) is not equally or more limiting.", "/mm:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module nn {namespace urn:nn;prefix nn;typedef mytype {type binary {length 10..100;}}"
             "leaf l {type mytype {length 20..110;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - the derived restriction (20..110) is not equally or more limiting. /nn:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module oo {namespace urn:oo;prefix oo;typedef mytype {type binary {length 10..100;}}"
+    CHECK_LOG_CTX("Invalid length restriction - the derived restriction (20..110) is not equally or more limiting.", "/nn:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module oo {namespace urn:oo;prefix oo;typedef mytype {type binary {length 10..100;}}"
             "leaf l {type mytype {length 20..30|110..120;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - the derived restriction (20..30|110..120) is not equally or more limiting. /oo:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module pp {namespace urn:pp;prefix pp;typedef mytype {type binary {length 10..11;}}"
+    CHECK_LOG_CTX("Invalid length restriction - the derived restriction (20..30|110..120) is not equally or more limiting.", "/oo:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module pp {namespace urn:pp;prefix pp;typedef mytype {type binary {length 10..11;}}"
             "leaf l {type mytype {length 15;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - the derived restriction (15) is not equally or more limiting. /pp:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module qq {namespace urn:qq;prefix qq;typedef mytype {type binary {length 10..20|30..40;}}"
+    CHECK_LOG_CTX("Invalid length restriction - the derived restriction (15) is not equally or more limiting.", "/pp:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module qq {namespace urn:qq;prefix qq;typedef mytype {type binary {length 10..20|30..40;}}"
             "leaf l {type mytype {length 15..35;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - the derived restriction (15..35) is not equally or more limiting. /qq:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module rr {namespace urn:rr;prefix rr;typedef mytype {type binary {length 10;}}"
+    CHECK_LOG_CTX("Invalid length restriction - the derived restriction (15..35) is not equally or more limiting.", "/qq:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module rr {namespace urn:rr;prefix rr;typedef mytype {type binary {length 10;}}"
             "leaf l {type mytype {length 10..35;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid length restriction - the derived restriction (10..35) is not equally or more limiting. /rr:l");
+    CHECK_LOG_CTX("Invalid length restriction - the derived restriction (10..35) is not equally or more limiting.", "/rr:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ss {namespace urn:ss;prefix ss;leaf l {type binary {pattern '[0-9]*';}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid type restrictions for binary type. /ss:l");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ss {namespace urn:ss;prefix ss;leaf l {type binary {pattern '[0-9]*';}}}", LYS_IN_YANG, NULL));
+    CHECK_LOG_CTX("Invalid type restrictions for binary type.", "/ss:l");
 }
 
 static void
 test_type_pattern(void **state)
 {
-    *state = test_type_pattern;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {yang-version 1.1; namespace urn:a;prefix a;leaf l {type string {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {yang-version 1.1; namespace urn:a;prefix a;leaf l {type string {"
             "pattern .* {error-app-tag errortag;error-message error;}"
             "pattern [0-9].*[0-9] {modifier invert-match;}}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -1156,7 +1020,7 @@
     assert_string_equal("[0-9].*[0-9]", ((struct lysc_type_str *)type)->patterns[1]->expr);
     assert_int_equal(1, ((struct lysc_type_str *)type)->patterns[1]->inverted);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;typedef mytype {type string {pattern '[0-9]*';}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;typedef mytype {type string {pattern '[0-9]*';}}"
             "typedef mytype2 {type mytype {length 10;}} leaf l {type mytype2 {pattern '[0-4]*';}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1169,7 +1033,7 @@
     assert_string_equal("[0-4]*", ((struct lysc_type_str *)type)->patterns[1]->expr);
     assert_int_equal(1, ((struct lysc_type_str *)type)->patterns[1]->refcount);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {namespace urn:c;prefix c;typedef mytype {type string {pattern '[0-9]*';}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {namespace urn:c;prefix c;typedef mytype {type string {pattern '[0-9]*';}}"
             "leaf l {type mytype {length 10;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1181,7 +1045,7 @@
     assert_int_equal(2, ((struct lysc_type_str *)type)->patterns[0]->refcount);
 
     /* test substitutions */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {namespace urn:d;prefix d;leaf l {type string {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {namespace urn:d;prefix d;leaf l {type string {"
             "pattern '^\\p{IsLatinExtended-A}$';}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1189,23 +1053,15 @@
     assert_int_equal(1, LY_ARRAY_COUNT(((struct lysc_type_str *)type)->patterns));
     assert_string_equal("^\\p{IsLatinExtended-A}$", ((struct lysc_type_str *)type)->patterns[0]->expr);
     /* TODO check some data "^ř$" */
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
 }
 
 static void
 test_type_enum(void **state)
 {
-    *state = test_type_enum;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {yang-version 1.1; namespace urn:a;prefix a;feature f; leaf l {type enumeration {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {yang-version 1.1; namespace urn:a;prefix a;feature f; leaf l {type enumeration {"
             "enum automin; enum min {value -2147483648;}enum one {if-feature f; value 1;}"
             "enum two; enum seven {value 7;}enum eight;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -1224,139 +1080,132 @@
     assert_string_equal("eight", ((struct lysc_type_enum *)type)->enums[4].name);
     assert_int_equal(8, ((struct lysc_type_enum *)type)->enums[4].value);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {yang-version 1.1; namespace urn:b;prefix b;feature f; typedef mytype {type enumeration {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {yang-version 1.1; namespace urn:b;prefix b;feature f; typedef mytype {type enumeration {"
             "enum 11; enum min {value -2147483648;}enum x$&;"
             "enum two; enum seven {value 7;}enum eight;}} leaf l { type mytype {enum seven;enum eight;}}}",
             LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_ENUM, type->basetype);
-    assert_non_null(((struct lysc_type_enum*)type)->enums);
-    assert_int_equal(2, LY_ARRAY_COUNT(((struct lysc_type_enum*)type)->enums));
-    assert_string_equal("seven", ((struct lysc_type_enum*)type)->enums[0].name);
-    assert_int_equal(7, ((struct lysc_type_enum*)type)->enums[0].value);
-    assert_string_equal("eight", ((struct lysc_type_enum*)type)->enums[1].name);
-    assert_int_equal(8, ((struct lysc_type_enum*)type)->enums[1].value);
+    assert_non_null(((struct lysc_type_enum *)type)->enums);
+    assert_int_equal(2, LY_ARRAY_COUNT(((struct lysc_type_enum *)type)->enums));
+    assert_string_equal("seven", ((struct lysc_type_enum *)type)->enums[0].name);
+    assert_int_equal(7, ((struct lysc_type_enum *)type)->enums[0].value);
+    assert_string_equal("eight", ((struct lysc_type_enum *)type)->enums[1].name);
+    assert_int_equal(8, ((struct lysc_type_enum *)type)->enums[1].value);
 
     const char *new_module = "module moc_c {yang-version 1.1; namespace urn:moc_c;prefix moc_c;feature f; typedef mytype {type enumeration {"
-                                        "enum first{value -270;} enum second; enum third {value -400;} enum fourth;}} leaf l { type mytype;}}";
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, new_module, LYS_IN_YANG, &mod));
+            "enum first{value -270;} enum second; enum third {value -400;} enum fourth;}} leaf l { type mytype;}}";
 
-    type = ((struct lysc_node_leaf*)mod->compiled->data)->type;
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, new_module, LYS_IN_YANG, &mod));
+
+    type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_ENUM, type->basetype);
-    assert_non_null(((struct lysc_type_enum*)type)->enums);
-    assert_int_equal(4, LY_ARRAY_COUNT(((struct lysc_type_enum*)type)->enums));
-    assert_string_equal("first", ((struct lysc_type_enum*)type)->enums[0].name);
-    assert_int_equal(-270, ((struct lysc_type_enum*)type)->enums[0].value);
-    assert_string_equal("second", ((struct lysc_type_enum*)type)->enums[1].name);
-    assert_int_equal(-269, ((struct lysc_type_enum*)type)->enums[1].value);
-    assert_string_equal("third", ((struct lysc_type_enum*)type)->enums[2].name);
-    assert_int_equal(-400, ((struct lysc_type_enum*)type)->enums[2].value);
-    assert_string_equal("fourth", ((struct lysc_type_enum*)type)->enums[3].name);
-    assert_int_equal(-268, ((struct lysc_type_enum*)type)->enums[3].value);
+    assert_non_null(((struct lysc_type_enum *)type)->enums);
+    assert_int_equal(4, LY_ARRAY_COUNT(((struct lysc_type_enum *)type)->enums));
+    assert_string_equal("first", ((struct lysc_type_enum *)type)->enums[0].name);
+    assert_int_equal(-270, ((struct lysc_type_enum *)type)->enums[0].value);
+    assert_string_equal("second", ((struct lysc_type_enum *)type)->enums[1].name);
+    assert_int_equal(-269, ((struct lysc_type_enum *)type)->enums[1].value);
+    assert_string_equal("third", ((struct lysc_type_enum *)type)->enums[2].name);
+    assert_int_equal(-400, ((struct lysc_type_enum *)type)->enums[2].value);
+    assert_string_equal("fourth", ((struct lysc_type_enum *)type)->enums[3].name);
+    assert_int_equal(-268, ((struct lysc_type_enum *)type)->enums[3].value);
 
     new_module = "module moc_d {yang-version 1.1; namespace urn:moc_d;prefix moc_d;feature f; typedef mytype {type enumeration {"
-                 "enum first; enum second;}} leaf l { type mytype;}}";
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, new_module, LYS_IN_YANG, &mod));
+            "enum first; enum second;}} leaf l { type mytype;}}";
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, new_module, LYS_IN_YANG, &mod));
 
-    type = ((struct lysc_node_leaf*)mod->compiled->data)->type;
+    type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_ENUM, type->basetype);
-    assert_non_null(((struct lysc_type_enum*)type)->enums);
-    assert_int_equal(2, LY_ARRAY_COUNT(((struct lysc_type_enum*)type)->enums));
-    assert_string_equal("first", ((struct lysc_type_enum*)type)->enums[0].name);
-    assert_int_equal(0, ((struct lysc_type_enum*)type)->enums[0].value);
-    assert_string_equal("second", ((struct lysc_type_enum*)type)->enums[1].name);
-    assert_int_equal(1, ((struct lysc_type_enum*)type)->enums[1].value);
+    assert_non_null(((struct lysc_type_enum *)type)->enums);
+    assert_int_equal(2, LY_ARRAY_COUNT(((struct lysc_type_enum *)type)->enums));
+    assert_string_equal("first", ((struct lysc_type_enum *)type)->enums[0].name);
+    assert_int_equal(0, ((struct lysc_type_enum *)type)->enums[0].value);
+    assert_string_equal("second", ((struct lysc_type_enum *)type)->enums[1].name);
+    assert_int_equal(1, ((struct lysc_type_enum *)type)->enums[1].value);
 
     /* invalid cases */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; feature f; leaf l {type enumeration {"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; feature f; leaf l {type enumeration {"
             "enum one {if-feature f;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid keyword \"if-feature\" as a child of \"enum\" - the statement is allowed only in YANG 1.1 modules. Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
+    CHECK_LOG_CTX("Invalid keyword \"if-feature\" as a child of \"enum\" - the statement is allowed only in YANG 1.1 modules.", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
             "enum one {value -2147483649;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid value \"-2147483649\" of \"value\". Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
+    CHECK_LOG_CTX("Invalid value \"-2147483649\" of \"value\".", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
             "enum one {value 2147483648;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid value \"2147483648\" of \"value\". Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
+    CHECK_LOG_CTX("Invalid value \"2147483648\" of \"value\".", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
             "enum one; enum one;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Duplicate identifier \"one\" of enum statement. Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
+    CHECK_LOG_CTX("Duplicate identifier \"one\" of enum statement.", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
             "enum '';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Enum name must not be zero-length. Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
+    CHECK_LOG_CTX("Enum name must not be zero-length.", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
             "enum ' x';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Enum name must not have any leading or trailing whitespaces (\" x\"). Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
+    CHECK_LOG_CTX("Enum name must not have any leading or trailing whitespaces (\" x\").", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
             "enum 'x ';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Enum name must not have any leading or trailing whitespaces (\"x \"). Line number 1.");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
+    CHECK_LOG_CTX("Enum name must not have any leading or trailing whitespaces (\"x \").", "Line number 1.");
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type enumeration {"
             "enum 'inva\nlid';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Control characters in enum name should be avoided (\"inva\nlid\", character number 5).");
+    CHECK_LOG_CTX("Control characters in enum name should be avoided (\"inva\nlid\", character number 5).", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb; leaf l {type enumeration;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing enum substatement for enumeration type. /bb:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb; leaf l {type enumeration;}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Missing enum substatement for enumeration type.", "/bb:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {yang-version 1.1;namespace urn:cc;prefix cc;typedef mytype {type enumeration {enum one;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {yang-version 1.1;namespace urn:cc;prefix cc;typedef mytype {type enumeration {enum one;}}"
             "leaf l {type mytype {enum two;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid enumeration - derived type adds new item \"two\". /cc:l");
+    CHECK_LOG_CTX("Invalid enumeration - derived type adds new item \"two\".", "/cc:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {yang-version 1.1;namespace urn:dd;prefix dd;typedef mytype {type enumeration {enum one;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {yang-version 1.1;namespace urn:dd;prefix dd;typedef mytype {type enumeration {enum one;}}"
             "leaf l {type mytype {enum one {value 1;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid enumeration - value of the item \"one\" has changed from 0 to 1 in the derived type. /dd:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:ee;prefix ee;leaf l {type enumeration {enum x {value 2147483647;}enum y;}}}",
+    CHECK_LOG_CTX("Invalid enumeration - value of the item \"one\" has changed from 0 to 1 in the derived type.", "/dd:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:ee;prefix ee;leaf l {type enumeration {enum x {value 2147483647;}enum y;}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid enumeration - it is not possible to auto-assign enum value for \"y\" since the highest value is already 2147483647. /ee:l");
+    CHECK_LOG_CTX("Invalid enumeration - it is not possible to auto-assign enum value for \"y\" since the highest value is already 2147483647.", "/ee:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff {namespace urn:ff;prefix ff;leaf l {type enumeration {enum x {value 1;}enum y {value 1;}}}}",
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff {namespace urn:ff;prefix ff;leaf l {type enumeration {enum x {value 1;}enum y {value 1;}}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid enumeration - value 1 collide in items \"y\" and \"x\". /ff:l");
+    CHECK_LOG_CTX("Invalid enumeration - value 1 collide in items \"y\" and \"x\".", "/ff:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {namespace urn:gg;prefix gg;typedef mytype {type enumeration;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {namespace urn:gg;prefix gg;typedef mytype {type enumeration;}"
             "leaf l {type mytype {enum one;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing enum substatement for enumeration type mytype. /gg:l");
+    CHECK_LOG_CTX("Missing enum substatement for enumeration type mytype.", "/gg:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module hh {namespace urn:hh;prefix hh; typedef mytype {type enumeration {enum one;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module hh {namespace urn:hh;prefix hh; typedef mytype {type enumeration {enum one;}}"
             "leaf l {type mytype {enum one;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Enumeration type can be subtyped only in YANG 1.1 modules. /hh:l");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Enumeration type can be subtyped only in YANG 1.1 modules.", "/hh:l");
 }
 
 static void
 test_type_bits(void **state)
 {
-    *state = test_type_bits;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {yang-version 1.1; namespace urn:a;prefix a;feature f; leaf l {type bits {"
-                                        "bit automin; bit one {if-feature f; position 1;}"
-                                        "bit two; bit seven {position 7;} bit five {position 5;} bit eight;}}}", LYS_IN_YANG, &mod));
-    type = ((struct lysc_node_leaf*)mod->compiled->data)->type;
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {yang-version 1.1; namespace urn:a;prefix a;feature f; leaf l {type bits {"
+            "bit automin; bit one {if-feature f; position 1;}"
+            "bit two; bit seven {position 7;} bit five {position 5;} bit eight;}}}", LYS_IN_YANG, &mod));
+    type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_BITS, type->basetype);
-    assert_non_null(((struct lysc_type_bits*)type)->bits);
-    assert_int_equal(5, LY_ARRAY_COUNT(((struct lysc_type_bits*)type)->bits));
-    assert_string_equal("automin", ((struct lysc_type_bits*)type)->bits[0].name);
-    assert_int_equal(0, ((struct lysc_type_bits*)type)->bits[0].position);
-    assert_string_equal("two", ((struct lysc_type_bits*)type)->bits[1].name);
-    assert_int_equal(2, ((struct lysc_type_bits*)type)->bits[1].position);
-    assert_string_equal("seven", ((struct lysc_type_bits*)type)->bits[2].name);
-    assert_int_equal(7, ((struct lysc_type_bits*)type)->bits[2].position);
-    assert_string_equal("five", ((struct lysc_type_bits*)type)->bits[3].name);
-    assert_int_equal(5, ((struct lysc_type_bits*)type)->bits[3].position);
-    assert_string_equal("eight", ((struct lysc_type_bits*)type)->bits[4].name);
-    assert_int_equal(8, ((struct lysc_type_bits*)type)->bits[4].position);
+    assert_non_null(((struct lysc_type_bits *)type)->bits);
+    assert_int_equal(5, LY_ARRAY_COUNT(((struct lysc_type_bits *)type)->bits));
+    assert_string_equal("automin", ((struct lysc_type_bits *)type)->bits[0].name);
+    assert_int_equal(0, ((struct lysc_type_bits *)type)->bits[0].position);
+    assert_string_equal("two", ((struct lysc_type_bits *)type)->bits[1].name);
+    assert_int_equal(2, ((struct lysc_type_bits *)type)->bits[1].position);
+    assert_string_equal("seven", ((struct lysc_type_bits *)type)->bits[2].name);
+    assert_int_equal(7, ((struct lysc_type_bits *)type)->bits[2].position);
+    assert_string_equal("five", ((struct lysc_type_bits *)type)->bits[3].name);
+    assert_int_equal(5, ((struct lysc_type_bits *)type)->bits[3].position);
+    assert_string_equal("eight", ((struct lysc_type_bits *)type)->bits[4].name);
+    assert_int_equal(8, ((struct lysc_type_bits *)type)->bits[4].position);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {yang-version 1.1;namespace urn:b;prefix b;feature f; typedef mytype {type bits {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {yang-version 1.1;namespace urn:b;prefix b;feature f; typedef mytype {type bits {"
             "bit automin; bit one;bit two; bit seven {position 7;}bit eight;}} leaf l { type mytype {bit eight;bit seven;bit automin;}}}",
             LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -1372,65 +1221,57 @@
     assert_int_equal(8, ((struct lysc_type_bits *)type)->bits[2].position);
 
     /* invalid cases */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; feature f; leaf l {type bits {"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; feature f; leaf l {type bits {"
             "bit one {if-feature f;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid keyword \"if-feature\" as a child of \"bit\" - the statement is allowed only in YANG 1.1 modules. Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
+    CHECK_LOG_CTX("Invalid keyword \"if-feature\" as a child of \"bit\" - the statement is allowed only in YANG 1.1 modules.", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
             "bit one {position -1;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid value \"-1\" of \"position\". Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
+    CHECK_LOG_CTX("Invalid value \"-1\" of \"position\".", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
             "bit one {position 4294967296;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid value \"4294967296\" of \"position\". Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
+    CHECK_LOG_CTX("Invalid value \"4294967296\" of \"position\".", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
             "bit one; bit one;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Duplicate identifier \"one\" of bit statement. Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
+    CHECK_LOG_CTX("Duplicate identifier \"one\" of bit statement.", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
             "bit '11';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid identifier first character '1' (0x0031). Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
+    CHECK_LOG_CTX("Invalid identifier first character '1' (0x0031).", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type bits {"
             "bit 'x1$1';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid identifier character '$' (0x0024). Line number 1.");
+    CHECK_LOG_CTX("Invalid identifier character '$' (0x0024).", "Line number 1.");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb; leaf l {type bits;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing bit substatement for bits type. /bb:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb; leaf l {type bits;}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Missing bit substatement for bits type.", "/bb:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {yang-version 1.1;namespace urn:cc;prefix cc;typedef mytype {type bits {bit one;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {yang-version 1.1;namespace urn:cc;prefix cc;typedef mytype {type bits {bit one;}}"
             "leaf l {type mytype {bit two;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid bits - derived type adds new item \"two\". /cc:l");
+    CHECK_LOG_CTX("Invalid bits - derived type adds new item \"two\".", "/cc:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {yang-version 1.1;namespace urn:dd;prefix dd;typedef mytype {type bits {bit one;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {yang-version 1.1;namespace urn:dd;prefix dd;typedef mytype {type bits {bit one;}}"
             "leaf l {type mytype {bit one {position 1;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid bits - position of the item \"one\" has changed from 0 to 1 in the derived type. /dd:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:ee;prefix ee;leaf l {type bits {bit x {position 4294967295;}bit y;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid bits - it is not possible to auto-assign bit position for \"y\" since the highest value is already 4294967295. /ee:l");
+    CHECK_LOG_CTX("Invalid bits - position of the item \"one\" has changed from 0 to 1 in the derived type.", "/dd:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:ee;prefix ee;leaf l {type bits {bit x {position 4294967295;}bit y;}}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Invalid bits - it is not possible to auto-assign bit position for \"y\" since the highest value is already 4294967295.", "/ee:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff {namespace urn:ff;prefix ff;leaf l {type bits {bit x {position 1;}bit y {position 1;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid bits - position 1 collide in items \"y\" and \"x\". /ff:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff {namespace urn:ff;prefix ff;leaf l {type bits {bit x {position 1;}bit y {position 1;}}}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Invalid bits - position 1 collide in items \"y\" and \"x\".", "/ff:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {namespace urn:gg;prefix gg;typedef mytype {type bits;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {namespace urn:gg;prefix gg;typedef mytype {type bits;}"
             "leaf l {type mytype {bit one;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing bit substatement for bits type mytype. /gg:l");
+    CHECK_LOG_CTX("Missing bit substatement for bits type mytype.", "/gg:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module hh {namespace urn:hh;prefix hh; typedef mytype {type bits {bit one;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module hh {namespace urn:hh;prefix hh; typedef mytype {type bits {bit one;}}"
             "leaf l {type mytype {bit one;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Bits type can be subtyped only in YANG 1.1 modules. /hh:l");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Bits type can be subtyped only in YANG 1.1 modules.", "/hh:l");
 }
 
 static void
 test_type_dec64(void **state)
 {
-    *state = test_type_dec64;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a;leaf l {type decimal64 {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a;leaf l {type decimal64 {"
             "fraction-digits 2;range min..max;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1442,7 +1283,7 @@
     assert_int_equal(INT64_C(-9223372036854775807) - INT64_C(1), ((struct lysc_type_dec *)type)->range->parts[0].min_64);
     assert_int_equal(INT64_C(9223372036854775807), ((struct lysc_type_dec *)type)->range->parts[0].max_64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;typedef mytype {type decimal64 {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;typedef mytype {type decimal64 {"
             "fraction-digits 2;range '3.14 | 5.1 | 10';}}leaf l {type mytype;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1458,7 +1299,7 @@
     assert_int_equal(1000, ((struct lysc_type_dec *)type)->range->parts[2].min_64);
     assert_int_equal(1000, ((struct lysc_type_dec *)type)->range->parts[2].max_64);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {namespace urn:c;prefix c;typedef mytype {type decimal64 {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {namespace urn:c;prefix c;typedef mytype {type decimal64 {"
             "fraction-digits 2;range '1 .. 65535';}}leaf l {type mytype;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_int_equal(LY_TYPE_DEC64, type->basetype);
@@ -1470,58 +1311,50 @@
     assert_int_equal(6553500, ((struct lysc_type_dec *)type)->range->parts[0].max_64);
 
     /* invalid cases */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type decimal64 {fraction-digits 0;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid value \"0\" of \"fraction-digits\". Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type decimal64 {fraction-digits -1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid value \"-1\" of \"fraction-digits\". Line number 1.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type decimal64 {fraction-digits 19;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Value \"19\" is out of \"fraction-digits\" bounds. Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type decimal64 {fraction-digits 0;}}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Invalid value \"0\" of \"fraction-digits\".", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type decimal64 {fraction-digits -1;}}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Invalid value \"-1\" of \"fraction-digits\".", "Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type decimal64 {fraction-digits 19;}}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Value \"19\" is out of \"fraction-digits\" bounds.", "Line number 1.");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type decimal64;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing fraction-digits substatement for decimal64 type. /aa:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type decimal64;}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Missing fraction-digits substatement for decimal64 type.", "/aa:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ab {namespace urn:ab;prefix ab; typedef mytype {type decimal64;}leaf l {type mytype;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing fraction-digits substatement for decimal64 type mytype. /ab:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ab {namespace urn:ab;prefix ab; typedef mytype {type decimal64;}leaf l {type mytype;}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Missing fraction-digits substatement for decimal64 type mytype.", "/ab:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb; leaf l {type decimal64 {fraction-digits 2;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb; leaf l {type decimal64 {fraction-digits 2;"
             "range '3.142';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Range boundary \"3.142\" of decimal64 type exceeds defined number (2) of fraction digits. /bb:l");
+    CHECK_LOG_CTX("Range boundary \"3.142\" of decimal64 type exceeds defined number (2) of fraction digits.", "/bb:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc; leaf l {type decimal64 {fraction-digits 2;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc; leaf l {type decimal64 {fraction-digits 2;"
             "range '4 | 3.14';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid range restriction - values are not in ascending order (3.14). /cc:l");
+    CHECK_LOG_CTX("Invalid range restriction - values are not in ascending order (3.14).", "/cc:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {namespace urn:dd;prefix dd; typedef mytype {type decimal64 {fraction-digits 2;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {namespace urn:dd;prefix dd; typedef mytype {type decimal64 {fraction-digits 2;}}"
             "leaf l {type mytype {fraction-digits 3;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid fraction-digits substatement for type not directly derived from decimal64 built-in type. /dd:l");
+    CHECK_LOG_CTX("Invalid fraction-digits substatement for type not directly derived from decimal64 built-in type.", "/dd:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module de {namespace urn:de;prefix de; typedef mytype {type decimal64 {fraction-digits 2;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module de {namespace urn:de;prefix de; typedef mytype {type decimal64 {fraction-digits 2;}}"
             "typedef mytype2 {type mytype {fraction-digits 3;}}leaf l {type mytype2;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid fraction-digits substatement for type \"mytype2\" not directly derived from decimal64 built-in type. /de:l");
+    CHECK_LOG_CTX("Invalid fraction-digits substatement for type \"mytype2\" not directly derived from decimal64 built-in type.", "/de:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:c;prefix c;typedef mytype {type decimal64 {"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:c;prefix c;typedef mytype {type decimal64 {"
             "fraction-digits 18;range '-10 .. 0';}}leaf l {type mytype;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid range restriction - invalid value \"-10000000000000000000\". /ee:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:c;prefix c;typedef mytype {type decimal64 {"
+    CHECK_LOG_CTX("Invalid range restriction - invalid value \"-10000000000000000000\".", "/ee:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:c;prefix c;typedef mytype {type decimal64 {"
             "fraction-digits 18;range '0 .. 10';}}leaf l {type mytype;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid range restriction - invalid value \"10000000000000000000\". /ee:l");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Invalid range restriction - invalid value \"10000000000000000000\".", "/ee:l");
 }
 
 static void
 test_type_instanceid(void **state)
 {
-    *state = test_type_instanceid;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a;typedef mytype {type instance-identifier {require-instance false;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a;typedef mytype {type instance-identifier {require-instance false;}}"
             "leaf l1 {type instance-identifier {require-instance true;}}"
             "leaf l2 {type mytype;} leaf l3 {type instance-identifier;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -1540,28 +1373,20 @@
     assert_int_equal(1, ((struct lysc_type_instanceid *)type)->require_instance);
 
     /* invalid cases */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type instance-identifier {require-instance yes;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid value \"yes\" of \"require-instance\". Line number 1.");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type instance-identifier {require-instance yes;}}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Invalid value \"yes\" of \"require-instance\".", "Line number 1.");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type instance-identifier {fraction-digits 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid type restrictions for instance-identifier type. /aa:l");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type instance-identifier {fraction-digits 1;}}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Invalid type restrictions for instance-identifier type.", "/aa:l");
 }
 
 static void
 test_type_identityref(void **state)
 {
-    *state = test_type_identityref;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {yang-version 1.1;namespace urn:a;prefix a;identity i; identity j; identity k {base i;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {yang-version 1.1;namespace urn:a;prefix a;identity i; identity j; identity k {base i;}"
             "typedef mytype {type identityref {base i;}}"
             "leaf l1 {type mytype;} leaf l2 {type identityref {base a:k; base j;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -1579,7 +1404,7 @@
     assert_string_equal("k", ((struct lysc_type_identityref *)type)->bases[0]->name);
     assert_string_equal("j", ((struct lysc_type_identityref *)type)->bases[1]->name);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {yang-version 1.1;namespace urn:b;prefix b;import a {prefix a;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {yang-version 1.1;namespace urn:b;prefix b;import a {prefix a;}"
             "leaf l {type identityref {base a:k; base a:j;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1590,89 +1415,81 @@
     assert_string_equal("j", ((struct lysc_type_identityref *)type)->bases[1]->name);
 
     /* invalid cases */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; leaf l {type identityref;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing base substatement for identityref type. /aa:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; leaf l {type identityref;}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Missing base substatement for identityref type.", "/aa:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb; typedef mytype {type identityref;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb; typedef mytype {type identityref;}"
             "leaf l {type mytype;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing base substatement for identityref type mytype. /bb:l");
+    CHECK_LOG_CTX("Missing base substatement for identityref type mytype.", "/bb:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc; identity i; typedef mytype {type identityref {base i;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc; identity i; typedef mytype {type identityref {base i;}}"
             "leaf l {type mytype {base i;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid base substatement for the type not directly derived from identityref built-in type. /cc:l");
+    CHECK_LOG_CTX("Invalid base substatement for the type not directly derived from identityref built-in type.", "/cc:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {namespace urn:dd;prefix dd; identity i; typedef mytype {type identityref {base i;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {namespace urn:dd;prefix dd; identity i; typedef mytype {type identityref {base i;}}"
             "typedef mytype2 {type mytype {base i;}}leaf l {type mytype2;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid base substatement for the type \"mytype2\" not directly derived from identityref built-in type. /dd:l");
+    CHECK_LOG_CTX("Invalid base substatement for the type \"mytype2\" not directly derived from identityref built-in type.", "/dd:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:ee;prefix ee; identity i; identity j;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:ee;prefix ee; identity i; identity j;"
             "leaf l {type identityref {base i;base j;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Multiple bases in identityref type are allowed only in YANG 1.1 modules. /ee:l");
+    CHECK_LOG_CTX("Multiple bases in identityref type are allowed only in YANG 1.1 modules.", "/ee:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff {namespace urn:ff;prefix ff; identity i;leaf l {type identityref {base j;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Unable to find base (j) of identityref. /ff:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff {namespace urn:ff;prefix ff; identity i;leaf l {type identityref {base j;}}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Unable to find base (j) of identityref.", "/ff:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {namespace urn:gg;prefix gg;leaf l {type identityref {base x:j;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid prefix used for base (x:j) of identityref. /gg:l");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {namespace urn:gg;prefix gg;leaf l {type identityref {base x:j;}}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Invalid prefix used for base (x:j) of identityref.", "/gg:l");
 }
 
 static void
 test_type_leafref(void **state)
 {
-    *state = test_type_leafref;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
     const char *path;
     struct lyxp_expr *expr;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
     /* lys_path_parse() */
     path = "invalid_path";
-    assert_int_equal(LY_EVALID, ly_path_parse(ctx, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
+    assert_int_equal(LY_EVALID, ly_path_parse(UTEST_LYCTX, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
             LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &expr));
     path = "..";
-    assert_int_equal(LY_EVALID, ly_path_parse(ctx, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
+    assert_int_equal(LY_EVALID, ly_path_parse(UTEST_LYCTX, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
             LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &expr));
     path = "..[";
-    assert_int_equal(LY_EVALID, ly_path_parse(ctx, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
+    assert_int_equal(LY_EVALID, ly_path_parse(UTEST_LYCTX, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
             LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &expr));
     path = "../";
-    assert_int_equal(LY_EVALID, ly_path_parse(ctx, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
+    assert_int_equal(LY_EVALID, ly_path_parse(UTEST_LYCTX, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
             LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &expr));
     path = "/";
-    assert_int_equal(LY_EVALID, ly_path_parse(ctx, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
+    assert_int_equal(LY_EVALID, ly_path_parse(UTEST_LYCTX, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
             LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &expr));
 
     path = "../../pref:id/xxx[predicate]/invalid!!!";
-    assert_int_equal(LY_EVALID, ly_path_parse(ctx, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
+    assert_int_equal(LY_EVALID, ly_path_parse(UTEST_LYCTX, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
             LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &expr));
-    logbuf_assert("Invalid character 0x21 ('!'), perhaps \"invalid\" is supposed to be a function call.");
+    CHECK_LOG_CTX("Invalid character 0x21 ('!'), perhaps \"invalid\" is supposed to be a function call.", NULL);
 
     path = "/absolute/prefix:path";
-    assert_int_equal(LY_SUCCESS, ly_path_parse(ctx, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
+    assert_int_equal(LY_SUCCESS, ly_path_parse(UTEST_LYCTX, NULL, path, strlen(path), LY_PATH_BEGIN_EITHER, LY_PATH_LREF_TRUE,
             LY_PATH_PREFIX_OPTIONAL, LY_PATH_PRED_LEAFREF, &expr));
     assert_int_equal(4, expr->used);
     assert_int_equal(LYXP_TOKEN_OPER_PATH, expr->tokens[0]);
     assert_int_equal(LYXP_TOKEN_NAMETEST, expr->tokens[1]);
     assert_int_equal(LYXP_TOKEN_OPER_PATH, expr->tokens[2]);
     assert_int_equal(LYXP_TOKEN_NAMETEST, expr->tokens[3]);
-    lyxp_expr_free(ctx, expr);
+    lyxp_expr_free(UTEST_LYCTX, expr);
 
     /* complete leafref paths */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {yang-version 1.1;namespace urn:a;prefix a;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {yang-version 1.1;namespace urn:a;prefix a;"
             "leaf ref1 {type leafref {path /a:target1;}} leaf ref2 {type leafref {path /a/target2; require-instance false;}}"
             "leaf target1 {type string;}container a {leaf target2 {type uint8;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_LEAFREF, type->basetype);
     assert_string_equal("/a:target1", ((struct lysc_type_leafref *)type)->path->expr);
-    assert_ptr_equal(mod, ly_resolve_prefix(ctx, "a", 1, LY_PREF_SCHEMA_RESOLVED, ((struct lysc_type_leafref *)type)->prefixes));
+    assert_ptr_equal(mod, ly_resolve_prefix(UTEST_LYCTX, "a", 1, LY_PREF_SCHEMA_RESOLVED, ((struct lysc_type_leafref *)type)->prefixes));
     assert_non_null(((struct lysc_type_leafref *)type)->realtype);
     assert_int_equal(LY_TYPE_STRING, ((struct lysc_type_leafref *)type)->realtype->basetype);
     assert_int_equal(1, ((struct lysc_type_leafref *)type)->require_instance);
@@ -1685,7 +1502,7 @@
     assert_int_equal(LY_TYPE_UINT8, ((struct lysc_type_leafref *)type)->realtype->basetype);
     assert_int_equal(0, ((struct lysc_type_leafref *)type)->require_instance);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b; typedef mytype {type leafref {path /b:target;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b; typedef mytype {type leafref {path /b:target;}}"
             "typedef mytype2 {type mytype;} typedef mytype3 {type leafref {path /target;}} leaf ref {type mytype2;}"
             "leaf target {type leafref {path ../realtarget;}} leaf realtarget {type string;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -1693,13 +1510,13 @@
     assert_int_equal(1, type->refcount);
     assert_int_equal(LY_TYPE_LEAFREF, type->basetype);
     assert_string_equal("/b:target", ((struct lysc_type_leafref *)type)->path->expr);
-    assert_ptr_equal(mod, ly_resolve_prefix(ctx, "b", 1, LY_PREF_SCHEMA_RESOLVED, ((struct lysc_type_leafref *)type)->prefixes));
+    assert_ptr_equal(mod, ly_resolve_prefix(UTEST_LYCTX, "b", 1, LY_PREF_SCHEMA_RESOLVED, ((struct lysc_type_leafref *)type)->prefixes));
     assert_non_null(((struct lysc_type_leafref *)type)->realtype);
     assert_int_equal(LY_TYPE_STRING, ((struct lysc_type_leafref *)type)->realtype->basetype);
     assert_int_equal(1, ((struct lysc_type_leafref *)type)->require_instance);
 
     /* prefixes are reversed to check using correct context of the path! */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {yang-version 1.1;namespace urn:c;prefix b; import b {prefix c;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {yang-version 1.1;namespace urn:c;prefix b; import b {prefix c;}"
             "typedef mytype3 {type c:mytype {require-instance false;}}"
             "leaf ref1 {type b:mytype3;}leaf ref2 {type c:mytype2;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -1707,7 +1524,7 @@
     assert_int_equal(1, type->refcount);
     assert_int_equal(LY_TYPE_LEAFREF, type->basetype);
     assert_string_equal("/b:target", ((struct lysc_type_leafref *)type)->path->expr);
-    assert_ptr_not_equal(mod, ly_resolve_prefix(ctx, "b", 1, LY_PREF_SCHEMA_RESOLVED, ((struct lysc_type_leafref *)type)->prefixes));
+    assert_ptr_not_equal(mod, ly_resolve_prefix(UTEST_LYCTX, "b", 1, LY_PREF_SCHEMA_RESOLVED, ((struct lysc_type_leafref *)type)->prefixes));
     assert_non_null(((struct lysc_type_leafref *)type)->realtype);
     assert_int_equal(LY_TYPE_STRING, ((struct lysc_type_leafref *)type)->realtype->basetype);
     assert_int_equal(0, ((struct lysc_type_leafref *)type)->require_instance);
@@ -1716,11 +1533,11 @@
     assert_int_equal(1, type->refcount);
     assert_int_equal(LY_TYPE_LEAFREF, type->basetype);
     assert_string_equal("/b:target", ((struct lysc_type_leafref *)type)->path->expr);
-    assert_ptr_not_equal(mod, ly_resolve_prefix(ctx, "b", 1, LY_PREF_SCHEMA_RESOLVED, ((struct lysc_type_leafref *)type)->prefixes));
+    assert_ptr_not_equal(mod, ly_resolve_prefix(UTEST_LYCTX, "b", 1, LY_PREF_SCHEMA_RESOLVED, ((struct lysc_type_leafref *)type)->prefixes));
     assert_int_equal(1, ((struct lysc_type_leafref *)type)->require_instance);
 
     /* non-prefixed nodes in path are supposed to be from the module where the leafref type is instantiated */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {namespace urn:d;prefix d; import b {prefix b;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {namespace urn:d;prefix d; import b {prefix b;}"
             "leaf ref {type b:mytype3;}leaf target {type int8;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -1733,7 +1550,7 @@
     assert_int_equal(1, ((struct lysc_type_leafref *)type)->require_instance);
 
     /* conditional leafrefs */
-    /*assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module e {yang-version 1.1;namespace urn:e;prefix e;feature f1; feature f2;"
+    /*assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module e {yang-version 1.1;namespace urn:e;prefix e;feature f1; feature f2;"
                                         "leaf ref1 {if-feature 'f1 and f2';type leafref {path /target;}}"
                                         "leaf target {if-feature f1; type boolean;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf*)mod->compiled->data)->type;
@@ -1745,7 +1562,7 @@
     assert_non_null(((struct lysc_type_leafref*)type)->realtype);
     assert_int_equal(LY_TYPE_BOOL, ((struct lysc_type_leafref*)type)->realtype->basetype);*/
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module f {namespace urn:f;prefix f;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module f {namespace urn:f;prefix f;"
             "list interface{key name;leaf name{type string;}list address {key ip;leaf ip {type string;}}}"
             "container default-address{leaf ifname{type leafref{ path \"../../interface/name\";}}"
             "leaf address {type leafref{ path \"../../interface[  name = current()/../ifname ]/address/ip\";}}}}",
@@ -1760,7 +1577,7 @@
     assert_non_null(((struct lysc_type_leafref *)type)->realtype);
     assert_int_equal(LY_TYPE_STRING, ((struct lysc_type_leafref *)type)->realtype->basetype);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module g {namespace urn:g;prefix g;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module g {namespace urn:g;prefix g;"
             "leaf source {type leafref {path \"/endpoint-parent[id=current()/../field]/endpoint/name\";}}"
             "leaf field {type int32;}list endpoint-parent {key id;leaf id {type int32;}"
             "list endpoint {key name;leaf name {type string;}}}}", LYS_IN_YANG, &mod));
@@ -1774,21 +1591,21 @@
     assert_int_equal(LY_TYPE_STRING, ((struct lysc_type_leafref *)type)->realtype->basetype);
 
     /* leafref to imported (not yet implemented) module */
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module h {namespace urn:h;prefix h; leaf h  {type uint16;}}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module i {namespace urn:i;prefix i;import h {prefix h;}"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module h {namespace urn:h;prefix h; leaf h  {type uint16;}}");
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module i {namespace urn:i;prefix i;import h {prefix h;}"
             "leaf i {type leafref {path /h:h;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_LEAFREF, type->basetype);
     assert_non_null(((struct lysc_type_leafref *)type)->realtype);
     assert_int_equal(LY_TYPE_UINT16, ((struct lysc_type_leafref *)type)->realtype->basetype);
-    assert_non_null(mod = ly_ctx_get_module_implemented(ctx, "h"));
+    assert_non_null(mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "h"));
     assert_int_equal(1, mod->implemented);
     assert_non_null(mod->compiled->data);
     assert_string_equal("h", mod->compiled->data->name);
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module j {namespace urn:j;prefix j; leaf j  {type string;}}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module k {namespace urn:k;prefix k;import j {prefix j;}"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module j {namespace urn:j;prefix j; leaf j  {type string;}}");
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module k {namespace urn:k;prefix k;import j {prefix j;}"
             "leaf i {type leafref {path \"/ilist[name = current()/../j:j]/value\";}}"
             "list ilist {key name; leaf name {type string;} leaf value {type uint16;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -1796,13 +1613,13 @@
     assert_int_equal(LY_TYPE_LEAFREF, type->basetype);
     assert_non_null(((struct lysc_type_leafref *)type)->realtype);
     assert_int_equal(LY_TYPE_UINT16, ((struct lysc_type_leafref *)type)->realtype->basetype);
-    assert_non_null(mod = ly_ctx_get_module_implemented(ctx, "j"));
+    assert_non_null(mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "j"));
     assert_int_equal(1, mod->implemented);
     assert_non_null(mod->compiled->data);
     assert_string_equal("j", mod->compiled->data->name);
 
     /* leafref with a default value */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module l {namespace urn:l;prefix l;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module l {namespace urn:l;prefix l;"
             "leaf source {type leafref {path \"../target\";}default true;}"
             "leaf target {type boolean;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -1817,208 +1634,192 @@
     assert_int_equal(1, ((struct lysc_node_leaf *)mod->compiled->data)->dflt->boolean);
 
     /* invalid paths */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;container a {leaf target2 {type uint8;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;container a {leaf target2 {type uint8;}}"
             "leaf ref1 {type leafref {path ../a/invalid;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Not found node \"invalid\" in path. /aa:ref1");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;container a {leaf target2 {type uint8;}}"
+    CHECK_LOG_CTX("Not found node \"invalid\" in path.", "/aa:ref1");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;container a {leaf target2 {type uint8;}}"
             "leaf ref1 {type leafref {path ../../toohigh;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Too many parent references in path. /bb:ref1");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc;container a {leaf target2 {type uint8;}}"
+    CHECK_LOG_CTX("Too many parent references in path.", "/bb:ref1");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc;container a {leaf target2 {type uint8;}}"
             "leaf ref1 {type leafref {path /a:invalid;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("No module connected with the prefix \"a\" found (prefix format schema stored mapping). /cc:ref1");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {namespace urn:dd;prefix dd;leaf target1 {type string;}"
+    CHECK_LOG_CTX("No module connected with the prefix \"a\" found (prefix format schema stored mapping).", "/cc:ref1");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {namespace urn:dd;prefix dd;leaf target1 {type string;}"
             "container a {leaf target2 {type uint8;}} leaf ref1 {type leafref {"
             "path '/a[target2 = current()/../target1]/target2';}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("List predicate defined for container \"a\" in path. /dd:ref1");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:ee;prefix ee;container a {leaf target2 {type uint8;}}"
+    CHECK_LOG_CTX("List predicate defined for container \"a\" in path.", "/dd:ref1");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:ee;prefix ee;container a {leaf target2 {type uint8;}}"
             "leaf ref1 {type leafref {path /a!invalid;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid character 0x21 ('!'), perhaps \"a\" is supposed to be a function call.");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff {namespace urn:ff;prefix ff;container a {leaf target2 {type uint8;}}"
+    CHECK_LOG_CTX("Invalid character 0x21 ('!'), perhaps \"a\" is supposed to be a function call.", NULL);
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff {namespace urn:ff;prefix ff;container a {leaf target2 {type uint8;}}"
             "leaf ref1 {type leafref {path /a;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid leafref path \"/a\" - target node is container instead of leaf or leaf-list. /ff:ref1");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {namespace urn:gg;prefix gg;container a {leaf target2 {type uint8;"
+    CHECK_LOG_CTX("Invalid leafref path \"/a\" - target node is container instead of leaf or leaf-list.", "/ff:ref1");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {namespace urn:gg;prefix gg;container a {leaf target2 {type uint8;"
             "status deprecated;}} leaf ref1 {type leafref {path /a/target2;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("A current definition \"ref1\" is not allowed to reference deprecated definition \"target2\". /gg:ref1");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module hh {namespace urn:hh;prefix hh;"
+    CHECK_LOG_CTX("A current definition \"ref1\" is not allowed to reference deprecated definition \"target2\".", "/gg:ref1");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module hh {namespace urn:hh;prefix hh;"
             "leaf ref1 {type leafref;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing path substatement for leafref type. /hh:ref1");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ii {namespace urn:ii;prefix ii;typedef mytype {type leafref;}"
+    CHECK_LOG_CTX("Missing path substatement for leafref type.", "/hh:ref1");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ii {namespace urn:ii;prefix ii;typedef mytype {type leafref;}"
             "leaf ref1 {type mytype;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing path substatement for leafref type mytype. /ii:ref1");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj {namespace urn:jj;prefix jj;feature f;"
+    CHECK_LOG_CTX("Missing path substatement for leafref type mytype.", "/ii:ref1");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj {namespace urn:jj;prefix jj;feature f;"
             "leaf ref {type leafref {path /target;}}leaf target {if-feature f;type string;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Not found node \"target\" in path. /jj:ref");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module kk {namespace urn:kk;prefix kk;"
+    CHECK_LOG_CTX("Not found node \"target\" in path.", "/jj:ref");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module kk {namespace urn:kk;prefix kk;"
             "leaf ref {type leafref {path /target;}}leaf target {type string;config false;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid leafref path \"/target\" - target is supposed to represent configuration data (as the leafref does), but it does not. /kk:ref");
+    CHECK_LOG_CTX("Invalid leafref path \"/target\" - target is supposed to represent configuration data (as the leafref does), but it does not.", "/kk:ref");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ll {namespace urn:ll;prefix ll;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ll {namespace urn:ll;prefix ll;"
             "leaf ref {type leafref {path /target; require-instance true;}}leaf target {type string;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Leafref type can be restricted by require-instance statement only in YANG 1.1 modules. /ll:ref");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm {namespace urn:mm;prefix mm;typedef mytype {type leafref {path /target;require-instance false;}}"
+    CHECK_LOG_CTX("Leafref type can be restricted by require-instance statement only in YANG 1.1 modules.", "/ll:ref");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm {namespace urn:mm;prefix mm;typedef mytype {type leafref {path /target;require-instance false;}}"
             "leaf ref {type mytype;}leaf target {type string;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Leafref type \"mytype\" can be restricted by require-instance statement only in YANG 1.1 modules. /mm:ref");
+    CHECK_LOG_CTX("Leafref type \"mytype\" can be restricted by require-instance statement only in YANG 1.1 modules.", "/mm:ref");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module nn {namespace urn:nn;prefix nn;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module nn {namespace urn:nn;prefix nn;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}"
             "leaf address {type leafref{ path \"/interface[name is current()/../ifname]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid character 0x69 ('i'), perhaps \"name\" is supposed to be a function call.");
+    CHECK_LOG_CTX("Invalid character 0x69 ('i'), perhaps \"name\" is supposed to be a function call.", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module oo {namespace urn:oo;prefix oo;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module oo {namespace urn:oo;prefix oo;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}"
             "leaf address {type leafref{ path \"/interface[name=current()/../ifname/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Unexpected XPath expression end.");
+    CHECK_LOG_CTX("Unexpected XPath expression end.", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module pp {namespace urn:pp;prefix pp;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module pp {namespace urn:pp;prefix pp;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}"
             "leaf address {type leafref{ path \"/interface[x:name=current()/../ifname]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("No module connected with the prefix \"x\" found (prefix format schema stored mapping). /pp:address");
+    CHECK_LOG_CTX("No module connected with the prefix \"x\" found (prefix format schema stored mapping).", "/pp:address");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module qq {namespace urn:qq;prefix qq;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module qq {namespace urn:qq;prefix qq;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}"
             "leaf address {type leafref{ path \"/interface[id=current()/../ifname]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Not found node \"id\" in path. /qq:address");
+    CHECK_LOG_CTX("Not found node \"id\" in path.", "/qq:address");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module rr {namespace urn:rr;prefix rr;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module rr {namespace urn:rr;prefix rr;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}leaf test{type string;}"
             "leaf address {type leafref{ path \"/interface[name=current() /  .. / ifname][name=current()/../test]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Duplicate predicate key \"name\" in path.");
+    CHECK_LOG_CTX("Duplicate predicate key \"name\" in path.", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ss {namespace urn:ss;prefix ss;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ss {namespace urn:ss;prefix ss;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}leaf test{type string;}"
             "leaf address {type leafref{ path \"/interface[name = ../ifname]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Unexpected XPath token \"..\" (\"../ifname]/ip\"), expected \"FunctionName\".");
+    CHECK_LOG_CTX("Unexpected XPath token \"..\" (\"../ifname]/ip\"), expected \"FunctionName\".", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module tt {namespace urn:tt;prefix tt;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module tt {namespace urn:tt;prefix tt;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}leaf test{type string;}"
             "leaf address {type leafref{ path \"/interface[name = current()../ifname]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Unexpected XPath token \"..\" (\"../ifname]/ip\"), expected \"]\".");
+    CHECK_LOG_CTX("Unexpected XPath token \"..\" (\"../ifname]/ip\"), expected \"]\".", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module uu {namespace urn:uu;prefix uu;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module uu {namespace urn:uu;prefix uu;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}leaf test{type string;}"
             "leaf address {type leafref{ path \"/interface[name = current()/..ifname]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid character number 31 of expression '/interface[name = current()/..ifname]/ip'.");
+    CHECK_LOG_CTX("Invalid character number 31 of expression '/interface[name = current()/..ifname]/ip'.", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module vv {namespace urn:vv;prefix vv;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module vv {namespace urn:vv;prefix vv;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}leaf test{type string;}"
             "leaf address {type leafref{ path \"/interface[name = current()/ifname]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Unexpected XPath token \"NameTest\" (\"ifname]/ip\"), expected \"..\".");
+    CHECK_LOG_CTX("Unexpected XPath token \"NameTest\" (\"ifname]/ip\"), expected \"..\".", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ww {namespace urn:ww;prefix ww;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ww {namespace urn:ww;prefix ww;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}leaf test{type string;}"
             "leaf address {type leafref{ path \"/interface[name = current()/../]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Unexpected XPath token \"]\" (\"]/ip\").");
+    CHECK_LOG_CTX("Unexpected XPath token \"]\" (\"]/ip\").", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module xx {namespace urn:xx;prefix xx;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module xx {namespace urn:xx;prefix xx;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}leaf test{type string;}"
             "leaf address {type leafref{ path \"/interface[name = current()/../$node]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid character 0x24 ('$'), perhaps \"\" is supposed to be a function call.");
+    CHECK_LOG_CTX("Invalid character 0x24 ('$'), perhaps \"\" is supposed to be a function call.", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module yy {namespace urn:yy;prefix yy;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module yy {namespace urn:yy;prefix yy;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}"
             "leaf address {type leafref{ path \"/interface[name=current()/../x:ifname]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("No module connected with the prefix \"x\" found (prefix format schema stored mapping). /yy:address");
+    CHECK_LOG_CTX("No module connected with the prefix \"x\" found (prefix format schema stored mapping).", "/yy:address");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module zz {namespace urn:zz;prefix zz;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module zz {namespace urn:zz;prefix zz;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}"
             "leaf address {type leafref{ path \"/interface[name=current()/../xxx]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Not found node \"xxx\" in path. /zz:address");
+    CHECK_LOG_CTX("Not found node \"xxx\" in path.", "/zz:address");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module zza {namespace urn:zza;prefix zza;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module zza {namespace urn:zza;prefix zza;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}container c;"
             "leaf address {type leafref{ path \"/interface[name=current()/../c]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Leaf expected instead of container \"c\" in leafref predicate in path. /zza:address");
+    CHECK_LOG_CTX("Leaf expected instead of container \"c\" in leafref predicate in path.", "/zza:address");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module zzb {namespace urn:zzb;prefix zzb;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module zzb {namespace urn:zzb;prefix zzb;"
             "list interface{key name;leaf name{type string;}leaf ip {type string;}container c;}"
             "leaf ifname{type leafref{ path \"../interface/name\";}}"
             "leaf address {type leafref{ path \"/interface[c=current()/../ifname]/ip\";}}}",
             LYS_IN_YANG, &mod));
-    logbuf_assert("Key expected instead of container \"c\" in path. /zzb:address");
+    CHECK_LOG_CTX("Key expected instead of container \"c\" in path.", "/zzb:address");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module zzc {namespace urn:zzc;prefix zzc;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module zzc {namespace urn:zzc;prefix zzc;"
             "leaf source {type leafref {path \"../target\";}default true;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Not found node \"target\" in path. /zzc:source");
+    CHECK_LOG_CTX("Not found node \"target\" in path.", "/zzc:source");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module zzd {namespace urn:zzd;prefix zzd;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module zzd {namespace urn:zzd;prefix zzd;"
             "leaf source {type leafref {path \"../target\";}default true;}"
             "leaf target {type uint8;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid default - value does not fit the type (Invalid uint8 value \"true\".). /zzd:source");
+    CHECK_LOG_CTX("Invalid default - value does not fit the type (Invalid uint8 value \"true\".).", "/zzd:source");
 
     /* circular chain */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aaa {namespace urn:aaa;prefix aaa;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aaa {namespace urn:aaa;prefix aaa;"
             "leaf ref1 {type leafref {path /ref2;}}"
             "leaf ref2 {type leafref {path /ref3;}}"
             "leaf ref3 {type leafref {path /ref4;}}"
             "leaf ref4 {type leafref {path /ref1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid leafref path \"/ref1\" - circular chain of leafrefs detected. /aaa:ref4");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Invalid leafref path \"/ref1\" - circular chain of leafrefs detected.", "/aaa:ref4");
 }
 
 static void
 test_type_empty(void **state)
 {
-    *state = test_type_empty;
-
-    struct ly_ctx *ctx;
-
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
 
     /* invalid */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;"
             "leaf l {type empty; default x;}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid default - value does not fit the type (Invalid empty value \"x\".). /aa:l");
+    CHECK_LOG_CTX("Invalid default - value does not fit the type (Invalid empty value \"x\".).", "/aa:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;typedef mytype {type empty; default x;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;typedef mytype {type empty; default x;}"
             "leaf l {type mytype;}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid type \"mytype\" - \"empty\" type must not have a default value (x). /bb:l");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Invalid type \"mytype\" - \"empty\" type must not have a default value (x).", "/bb:l");
 }
 
 static void
 test_type_union(void **state)
 {
-    *state = test_type_union;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {yang-version 1.1;namespace urn:a;prefix a; typedef mybasetype {type string;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {yang-version 1.1;namespace urn:a;prefix a; typedef mybasetype {type string;}"
             "typedef mytype {type union {type int8; type mybasetype;}}"
             "leaf l {type mytype;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -2030,7 +1831,7 @@
     assert_int_equal(LY_TYPE_INT8, ((struct lysc_type_union *)type)->types[0]->basetype);
     assert_int_equal(LY_TYPE_STRING, ((struct lysc_type_union *)type)->types[1]->basetype);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {yang-version 1.1;namespace urn:b;prefix b; typedef mybasetype {type string;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {yang-version 1.1;namespace urn:b;prefix b; typedef mybasetype {type string;}"
             "typedef mytype {type union {type int8; type mybasetype;}}"
             "leaf l {type union {type decimal64 {fraction-digits 2;} type mytype;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
@@ -2043,7 +1844,7 @@
     assert_int_equal(LY_TYPE_INT8, ((struct lysc_type_union *)type)->types[1]->basetype);
     assert_int_equal(LY_TYPE_STRING, ((struct lysc_type_union *)type)->types[2]->basetype);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {yang-version 1.1;namespace urn:c;prefix c; typedef mybasetype {type string;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {yang-version 1.1;namespace urn:c;prefix c; typedef mybasetype {type string;}"
             "typedef mytype {type union {type leafref {path ../target;} type mybasetype;}}"
             "leaf l {type union {type decimal64 {fraction-digits 2;} type mytype;}}"
             "leaf target {type leafref {path ../realtarget;}} leaf realtarget {type int8;}}",
@@ -2061,47 +1862,39 @@
     assert_int_equal(LY_TYPE_INT8, ((struct lysc_type_leafref *)((struct lysc_type_union *)type)->types[1])->realtype->basetype);
 
     /* invalid unions */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;typedef mytype {type union;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;typedef mytype {type union;}"
             "leaf l {type mytype;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing type substatement for union type mytype. /aa:l");
+    CHECK_LOG_CTX("Missing type substatement for union type mytype.", "/aa:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;leaf l {type union;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Missing type substatement for union type. /bb:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;leaf l {type union;}}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Missing type substatement for union type.", "/bb:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc;typedef mytype {type union{type int8; type string;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc;typedef mytype {type union{type int8; type string;}}"
             "leaf l {type mytype {type string;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid type substatement for the type not directly derived from union built-in type. /cc:l");
+    CHECK_LOG_CTX("Invalid type substatement for the type not directly derived from union built-in type.", "/cc:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {namespace urn:dd;prefix dd;typedef mytype {type union{type int8; type string;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {namespace urn:dd;prefix dd;typedef mytype {type union{type int8; type string;}}"
             "typedef mytype2 {type mytype {type string;}}leaf l {type mytype2;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid type substatement for the type \"mytype2\" not directly derived from union built-in type. /dd:l");
+    CHECK_LOG_CTX("Invalid type substatement for the type \"mytype2\" not directly derived from union built-in type.", "/dd:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:ee;prefix ee;typedef mytype {type union{type mytype; type string;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:ee;prefix ee;typedef mytype {type union{type mytype; type string;}}"
             "leaf l {type mytype;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid \"mytype\" type reference - circular chain of types detected. /ee:l");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ef {namespace urn:ef;prefix ef;typedef mytype {type mytype2;}"
+    CHECK_LOG_CTX("Invalid \"mytype\" type reference - circular chain of types detected.", "/ee:l");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ef {namespace urn:ef;prefix ef;typedef mytype {type mytype2;}"
             "typedef mytype2 {type mytype;} leaf l {type mytype;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid \"mytype\" type reference - circular chain of types detected. /ef:l");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Invalid \"mytype\" type reference - circular chain of types detected.", "/ef:l");
 }
 
 static void
 test_type_dflt(void **state)
 {
-    *state = test_type_union;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_type *type;
     struct lysc_node_leaf *leaf;
     uint8_t dynamic;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
     /* default is not inherited from union's types */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a; typedef mybasetype {type string;default hello;units xxx;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a; typedef mybasetype {type string;default hello;units xxx;}"
             "leaf l {type union {type decimal64 {fraction-digits 2;} type mybasetype;}}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
@@ -2114,34 +1907,34 @@
     assert_null(((struct lysc_node_leaf *)mod->compiled->data)->dflt);
     assert_null(((struct lysc_node_leaf *)mod->compiled->data)->units);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b; typedef mybasetype {type string;default hello;units xxx;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b; typedef mybasetype {type string;default hello;units xxx;}"
             "leaf l {type mybasetype;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
-    assert_int_equal(3, type->refcount); /* 2x type reference, 1x default value's reference (typedf's default does not reference own type)*/
+    assert_int_equal(3, type->refcount);     /* 2x type reference, 1x default value's reference (typedf's default does not reference own type)*/
     assert_int_equal(LY_TYPE_STRING, type->basetype);
     assert_non_null(leaf = (struct lysc_node_leaf *)mod->compiled->data);
     assert_string_equal("hello", leaf->dflt->realtype->plugin->print(leaf->dflt, LY_PREF_SCHEMA, NULL, &dynamic));
     assert_int_equal(0, dynamic);
     assert_string_equal("xxx", leaf->units);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {namespace urn:c;prefix c; typedef mybasetype {type string;default hello;units xxx;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {namespace urn:c;prefix c; typedef mybasetype {type string;default hello;units xxx;}"
             "leaf l {type mybasetype; default goodbye;units yyy;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
-    assert_int_equal(3, type->refcount); /* 2x type reference, 1x default value's reference */
+    assert_int_equal(3, type->refcount);     /* 2x type reference, 1x default value's reference */
     assert_int_equal(LY_TYPE_STRING, type->basetype);
     leaf = (struct lysc_node_leaf *)mod->compiled->data;
     assert_string_equal("goodbye", leaf->dflt->realtype->plugin->print(leaf->dflt, LY_PREF_SCHEMA, NULL, &dynamic));
     assert_int_equal(0, dynamic);
     assert_string_equal("yyy", leaf->units);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {namespace urn:d;prefix d; typedef mybasetype {type string;default hello;units xxx;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {namespace urn:d;prefix d; typedef mybasetype {type string;default hello;units xxx;}"
             "typedef mytype {type mybasetype;}leaf l1 {type mytype; default goodbye;units yyy;}"
             "leaf l2 {type mytype;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
-    assert_int_equal(6, type->refcount); /* 4x type reference, 2x default value's reference (1 shared compiled type of typedefs which default does not reference own type) */
+    assert_int_equal(6, type->refcount);     /* 4x type reference, 2x default value's reference (1 shared compiled type of typedefs which default does not reference own type) */
     assert_int_equal(LY_TYPE_STRING, type->basetype);
     leaf = (struct lysc_node_leaf *)mod->compiled->data;
     assert_string_equal("goodbye", leaf->dflt->realtype->plugin->print(leaf->dflt, LY_PREF_SCHEMA, NULL, &dynamic));
@@ -2149,18 +1942,18 @@
     assert_string_equal("yyy", leaf->units);
     type = ((struct lysc_node_leaf *)mod->compiled->data->next)->type;
     assert_non_null(type);
-    assert_int_equal(6, type->refcount); /* 4x type reference, 2x default value's reference (1 shared compiled type of typedefs which default does not reference own type) */
+    assert_int_equal(6, type->refcount);     /* 4x type reference, 2x default value's reference (1 shared compiled type of typedefs which default does not reference own type) */
     assert_int_equal(LY_TYPE_STRING, type->basetype);
     leaf = (struct lysc_node_leaf *)mod->compiled->data->next;
     assert_string_equal("hello", leaf->dflt->realtype->plugin->print(leaf->dflt, LY_PREF_SCHEMA, NULL, &dynamic));
     assert_int_equal(0, dynamic);
     assert_string_equal("xxx", leaf->units);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module e {namespace urn:e;prefix e; typedef mybasetype {type string;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module e {namespace urn:e;prefix e; typedef mybasetype {type string;}"
             "typedef mytype {type mybasetype; default hello;units xxx;}leaf l {type mytype;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
-    assert_int_equal(4, type->refcount); /* 3x type reference, 1x default value's reference (typedef's default does not reference own type) */
+    assert_int_equal(4, type->refcount);     /* 3x type reference, 1x default value's reference (typedef's default does not reference own type) */
     assert_int_equal(LY_TYPE_STRING, type->basetype);
     leaf = (struct lysc_node_leaf *)mod->compiled->data;
     assert_string_equal("hello", leaf->dflt->realtype->plugin->print(leaf->dflt, LY_PREF_SCHEMA, NULL, &dynamic));
@@ -2168,99 +1961,75 @@
     assert_string_equal("xxx", leaf->units);
 
     /* mandatory leaf does not takes default value from type */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module f {namespace urn:f;prefix f;typedef mytype {type string; default hello;units xxx;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module f {namespace urn:f;prefix f;typedef mytype {type string; default hello;units xxx;}"
             "leaf l {type mytype; mandatory true;}}", LYS_IN_YANG, &mod));
     type = ((struct lysc_node_leaf *)mod->compiled->data)->type;
     assert_non_null(type);
     assert_int_equal(LY_TYPE_STRING, type->basetype);
     assert_null(((struct lysc_node_leaf *)mod->compiled->data)->dflt);
     assert_string_equal("xxx", ((struct lysc_node_leaf *)mod->compiled->data)->units);
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
 }
 
 static void
 test_status(void **state)
 {
-    *state = test_status;
 
-    struct ly_ctx *ctx;
-
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;"
             "container c {status deprecated; leaf l {status current; type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("A \"current\" status is in conflict with the parent's \"deprecated\" status. /aa:c/l");
+    CHECK_LOG_CTX("A \"current\" status is in conflict with the parent's \"deprecated\" status.", "/aa:c/l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;"
             "container c {status obsolete; leaf l {status current; type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("A \"current\" status is in conflict with the parent's \"obsolete\" status. /bb:c/l");
+    CHECK_LOG_CTX("A \"current\" status is in conflict with the parent's \"obsolete\" status.", "/bb:c/l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc;"
             "container c {status obsolete; leaf l {status deprecated; type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("A \"deprecated\" status is in conflict with the parent's \"obsolete\" status. /cc:c/l");
+    CHECK_LOG_CTX("A \"deprecated\" status is in conflict with the parent's \"obsolete\" status.", "/cc:c/l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:dd;prefix d;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:dd;prefix d;"
             "container c {leaf l {status obsolete; type string;}}"
             "container d {leaf m {when \"../../c/l\"; type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("A current definition \"m\" is not allowed to reference obsolete definition \"l\". /cc:d/m");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("A current definition \"m\" is not allowed to reference obsolete definition \"l\".", "/cc:d/m");
 }
 
 static void
 test_grouping(void **state)
 {
-    *state = test_grouping;
-
-    struct ly_ctx *ctx;
-
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
 
     /* result ok, but a warning about not used locally scoped grouping printed */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a; grouping grp1 {leaf a1 {type string;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a; grouping grp1 {leaf a1 {type string;}}"
             "container a {leaf x {type string;} grouping grp2 {leaf a2 {type string;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Locally scoped grouping \"grp2\" not used.");
-    logbuf_clean();
+    CHECK_LOG_CTX("Locally scoped grouping \"grp2\" not used.", NULL);
+    UTEST_LOG_CLEAN;
 
     /* result ok - when statement or leafref target must be checked only at the place where the grouping is really instantiated */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b; grouping grp {"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b; grouping grp {"
             "leaf ref {type leafref {path \"../name\";}}"
             "leaf cond {type string; when \"../name = 'specialone'\";}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("");
+    CHECK_LOG_CTX(NULL, NULL);
 
     /* invalid - error in a non-instantiated grouping */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;"
             "grouping grp {leaf x {type leafref;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Missing path substatement for leafref type. /aa:{grouping='grp'}/x");
-    logbuf_clean();
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;"
+    CHECK_LOG_CTX("Missing path substatement for leafref type.", "/aa:{grouping='grp'}/x");
+    UTEST_LOG_CLEAN;
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;"
             "container a {grouping grp {leaf x {type leafref;}}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Missing path substatement for leafref type. /aa:a/{grouping='grp'}/x");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Missing path substatement for leafref type.", "/aa:a/{grouping='grp'}/x");
 }
 
 static void
 test_uses(void **state)
 {
-    *state = test_uses;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     const struct lysc_node *parent, *child;
     const struct lysc_node_container *cont;
     const struct lysc_node_choice *choice;
     const struct lysc_node_case *cs;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module grp {namespace urn:grp;prefix g; typedef mytype {type string;} feature f;"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module grp {namespace urn:grp;prefix g; typedef mytype {type string;} feature f;"
             "grouping grp {leaf x {type mytype;} leaf y {type string; if-feature f;}}}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module a {namespace urn:a;prefix a;import grp {prefix g;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module a {namespace urn:a;prefix a;import grp {prefix g;}"
             "grouping grp_a_top {leaf a1 {type int8;}}"
             "container a {uses grp_a; uses grp_a_top; uses g:grp; grouping grp_a {leaf a2 {type uint8;}}}}", LYS_IN_YANG, &mod));
     assert_non_null((parent = mod->compiled->data));
@@ -2276,8 +2045,8 @@
     assert_ptr_equal(mod, child->module);
     assert_null((child = child->next));
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule bsub {belongs-to b {prefix b;} grouping grp {leaf b {when 1; type string;} leaf c {type string;}}}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;include bsub;uses grp {when 2;}}", LYS_IN_YANG, &mod));
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "submodule bsub {belongs-to b {prefix b;} grouping grp {leaf b {when 1; type string;} leaf c {type string;}}}");
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;include bsub;uses grp {when 2;}}", LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled->data);
     assert_int_equal(LYS_LEAF, mod->compiled->data->nodetype);
     assert_string_equal("b", mod->compiled->data->name);
@@ -2294,8 +2063,8 @@
     assert_int_equal(2, mod->compiled->data->next->when[0]->refcount);
     assert_null(mod->compiled->data->next->when[0]->context);
 
-    logbuf_clean();
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {namespace urn:ii;prefix ii;"
+    UTEST_LOG_CLEAN;
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {namespace urn:ii;prefix ii;"
             "grouping grp {leaf l {type string;}leaf k {type string; status obsolete;}}"
             "uses grp {status deprecated;}}", LYS_IN_YANG, &mod));
     assert_int_equal(LYS_LEAF, mod->compiled->data->nodetype);
@@ -2304,9 +2073,9 @@
     assert_int_equal(LYS_LEAF, mod->compiled->data->next->nodetype);
     assert_string_equal("k", mod->compiled->data->next->name);
     assert_true(LYS_STATUS_OBSLT & mod->compiled->data->next->flags);
-    logbuf_assert(""); /* no warning about inheriting deprecated flag from uses */
+    CHECK_LOG(NULL, NULL);     /* no warning about inheriting deprecated flag from uses */
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {namespace urn:d;prefix d; grouping grp {container g;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {namespace urn:d;prefix d; grouping grp {container g;}"
             "container top {uses grp {augment g {leaf x {type int8;}}}}}", LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled->data);
     assert_non_null(child = lysc_node_children(mod->compiled->data, 0));
@@ -2314,7 +2083,7 @@
     assert_non_null(child = lysc_node_children(child, 0));
     assert_string_equal("x", child->name);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module e {yang-version 1.1;namespace urn:e;prefix e; grouping grp {action g { description \"super g\";}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module e {yang-version 1.1;namespace urn:e;prefix e; grouping grp {action g { description \"super g\";}}"
             "container top {action e; uses grp {refine g {description \"ultra g\";}}}}", LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled->data);
     cont = (const struct lysc_node_container *)mod->compiled->data;
@@ -2324,7 +2093,7 @@
     assert_string_equal("g", cont->actions[0].name);
     assert_string_equal("ultra g", cont->actions[0].dsc);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module f {yang-version 1.1;namespace urn:f;prefix f; grouping grp {notification g { description \"super g\";}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module f {yang-version 1.1;namespace urn:f;prefix f; grouping grp {notification g { description \"super g\";}}"
             "container top {notification f; uses grp {refine g {description \"ultra g\";}}}}", LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled->data);
     cont = (const struct lysc_node_container *)mod->compiled->data;
@@ -2335,11 +2104,11 @@
     assert_string_equal("ultra g", cont->notifs[0].dsc);
 
     /* empty grouping */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module g {namespace urn:g;prefix g; grouping grp; uses grp;}", LYS_IN_YANG, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module g {namespace urn:g;prefix g; grouping grp; uses grp;}", LYS_IN_YANG, &mod));
     assert_null(mod->compiled->data);
 
     /* choice in uses */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module h {yang-version 1.1;namespace urn:h;prefix h; grouping grp {choice gch {case gc1 { leaf y { type string;}} case gc2 {leaf z {type string;}}}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module h {yang-version 1.1;namespace urn:h;prefix h; grouping grp {choice gch {case gc1 { leaf y { type string;}} case gc2 {leaf z {type string;}}}}"
             "choice ch {case one { leaf x {type string;}} case two { uses grp;}}}", LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled->data);
     choice = (const struct lysc_node_choice *)mod->compiled->data;
@@ -2357,7 +2126,7 @@
     assert_string_equal("gch", cs->child->name);
 
     /* top-level uses with augment and refine */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module i {namespace urn:i;prefix i; grouping grp {container g;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module i {namespace urn:i;prefix i; grouping grp {container g;}"
             "uses grp {augment g {leaf x {type int8;}} refine g {description \"dsc\";}}}",
             LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled->data);
@@ -2369,63 +2138,57 @@
     assert_string_equal("x", child->name);
 
     /* invalid */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;uses missinggrp;}", LYS_IN_YANG, &mod));
-    logbuf_assert("Grouping \"missinggrp\" referenced by a uses statement not found. /aa:{uses='missinggrp'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;uses missinggrp;}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Grouping \"missinggrp\" referenced by a uses statement not found.", "/aa:{uses='missinggrp'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;uses grp;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;uses grp;"
             "grouping grp {leaf a{type string;}uses grp1;}"
             "grouping grp1 {leaf b {type string;}uses grp2;}"
             "grouping grp2 {leaf c {type string;}uses grp;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Grouping \"grp\" references itself through a uses statement. /bb:{uses='grp'}/{uses='grp1'}/{uses='grp2'}/{uses='grp'}");
+    CHECK_LOG_CTX("Grouping \"grp\" references itself through a uses statement.", "/bb:{uses='grp'}/{uses='grp1'}/{uses='grp2'}/{uses='grp'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc;uses a:missingprefix;}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid prefix used for grouping reference. /cc:{uses='a:missingprefix'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc;uses a:missingprefix;}", LYS_IN_YANG, &mod));
+    CHECK_LOG_CTX("Invalid prefix used for grouping reference.", "/cc:{uses='a:missingprefix'}");
 
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module dd {namespace urn:dd;prefix dd;grouping grp{leaf a{type string;}}"
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module dd {namespace urn:dd;prefix dd;grouping grp{leaf a{type string;}}"
             "leaf a {type string;}uses grp;}", LYS_IN_YANG, &mod));
-    logbuf_assert("Duplicate identifier \"a\" of data definition/RPC/action/notification statement. /dd:{uses='grp'}/dd:a");
+    CHECK_LOG_CTX("Duplicate identifier \"a\" of data definition/RPC/action/notification statement.", "/dd:{uses='grp'}/dd:a");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:ee;prefix ee;grouping grp {leaf l {type string; status deprecated;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:ee;prefix ee;grouping grp {leaf l {type string; status deprecated;}}"
             "uses grp {status obsolete;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("A \"deprecated\" status is in conflict with the parent's \"obsolete\" status. /ee:{uses='grp'}/ee:l");
+    CHECK_LOG_CTX("A \"deprecated\" status is in conflict with the parent's \"obsolete\" status.", "/ee:{uses='grp'}/ee:l");
 
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module ff {namespace urn:ff;prefix ff;grouping grp {leaf l {type string;}}"
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module ff {namespace urn:ff;prefix ff;grouping grp {leaf l {type string;}}"
             "leaf l {type int8;}uses grp;}", LYS_IN_YANG, &mod));
-    logbuf_assert("Duplicate identifier \"l\" of data definition/RPC/action/notification statement. /ff:{uses='grp'}/ff:l");
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module fg {namespace urn:fg;prefix fg;grouping grp {leaf m {type string;}}"
+    CHECK_LOG_CTX("Duplicate identifier \"l\" of data definition/RPC/action/notification statement.", "/ff:{uses='grp'}/ff:l");
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module fg {namespace urn:fg;prefix fg;grouping grp {leaf m {type string;}}"
             "uses grp;leaf m {type int8;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Duplicate identifier \"m\" of data definition/RPC/action/notification statement. /fg:m");
+    CHECK_LOG_CTX("Duplicate identifier \"m\" of data definition/RPC/action/notification statement.", "/fg:m");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {namespace urn:gg;prefix gg; grouping grp {container g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {namespace urn:gg;prefix gg; grouping grp {container g;}"
             "leaf g {type string;}"
             "container top {uses grp {augment /g {leaf x {type int8;}}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid descendant-schema-nodeid value \"/g\" - name test expected instead of \"/\". /gg:top/{uses='grp'}/{augment='/g'}");
+    CHECK_LOG_CTX("Invalid descendant-schema-nodeid value \"/g\" - name test expected instead of \"/\".", "/gg:top/{uses='grp'}/{augment='/g'}");
 
-    assert_int_equal(LY_ENOTFOUND, lys_parse_mem(ctx, "module hh {yang-version 1.1;namespace urn:hh;prefix hh;"
+    assert_int_equal(LY_ENOTFOUND, lys_parse_mem(UTEST_LYCTX, "module hh {yang-version 1.1;namespace urn:hh;prefix hh;"
             "grouping grp {notification g { description \"super g\";}}"
             "container top {notification h; uses grp {refine h {description \"ultra h\";}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Refine(s) target node \"h\" in grouping \"grp\" was not found. /hh:top/{uses='grp'}");
+    CHECK_LOG_CTX("Refine(s) target node \"h\" in grouping \"grp\" was not found.", "/hh:top/{uses='grp'}");
 
-    assert_int_equal(LY_ENOTFOUND, lys_parse_mem(ctx, "module ii {yang-version 1.1;namespace urn:ii;prefix ii;"
+    assert_int_equal(LY_ENOTFOUND, lys_parse_mem(UTEST_LYCTX, "module ii {yang-version 1.1;namespace urn:ii;prefix ii;"
             "grouping grp {action g { description \"super g\";}}"
             "container top {action i; uses grp {refine i {description \"ultra i\";}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Refine(s) target node \"i\" in grouping \"grp\" was not found. /ii:top/{uses='grp'}");
+    CHECK_LOG_CTX("Refine(s) target node \"i\" in grouping \"grp\" was not found.", "/ii:top/{uses='grp'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj {yang-version 1.1;namespace urn:jj;prefix jj;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj {yang-version 1.1;namespace urn:jj;prefix jj;"
             "grouping grp {leaf j { when \"1\"; type invalid;}}"
             "container top {uses grp;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Referenced type \"invalid\" not found. /jj:top/{uses='grp'}/j");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Referenced type \"invalid\" not found.", "/jj:top/{uses='grp'}/j");
 }
 
 static void
 test_refine(void **state)
 {
-    *state = test_refine;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     struct lysc_node *parent, *child;
     struct lysc_node_leaf *leaf;
@@ -2434,8 +2197,6 @@
     struct ly_in *in;
     const char *data, *feats1[] = {"f", NULL}, *feats2[] = {"fa", NULL};
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
     data = "module grp {yang-version 1.1;namespace urn:grp;prefix g; feature f;typedef mytype {type string; default cheers!;}"
             "grouping grp {container c {leaf l {type mytype; default goodbye;}"
             "leaf-list ll {type mytype; default goodbye; max-elements 6;}"
@@ -2444,7 +2205,7 @@
             "anydata a {mandatory false; if-feature f; description original; reference original;}"
             "container c {config false; leaf l {type string;}}}}}";
     assert_int_equal(LY_SUCCESS, ly_in_new_memory(data, &in));
-    assert_int_equal(LY_SUCCESS, lys_parse(ctx, in, LYS_IN_YANG, feats1, NULL));
+    assert_int_equal(LY_SUCCESS, lys_parse(UTEST_LYCTX, in, LYS_IN_YANG, feats1, NULL));
 
     data = "module a {yang-version 1.1;namespace urn:a;prefix a;import grp {prefix g;}feature fa;"
             "uses g:grp {refine c/l {default hello; config false;}"
@@ -2455,7 +2216,7 @@
             "refine c/ll {max-elements 5;}"
             "refine c/c {config true;presence indispensable;}}}";
     ly_in_memory(in, data);
-    assert_int_equal(LY_SUCCESS, lys_parse(ctx, in, LYS_IN_YANG, feats2, &mod));
+    assert_int_equal(LY_SUCCESS, lys_parse(UTEST_LYCTX, in, LYS_IN_YANG, feats2, &mod));
     ly_in_free(in, 0);
 
     assert_non_null((parent = mod->compiled->data));
@@ -2507,7 +2268,7 @@
     assert_true(LYS_CONFIG_W & child->flags);
     assert_true(LYS_CONFIG_W & ((struct lysc_node_container *)child)->child->flags);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {yang-version 1.1;namespace urn:b;prefix b;import grp {prefix g;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {yang-version 1.1;namespace urn:b;prefix b;import grp {prefix g;}"
             "uses g:grp {status deprecated; refine c/x {default hello; mandatory false;}}}", LYS_IN_YANG, &mod));
     assert_non_null((leaf = (struct lysc_node_leaf *)((struct lysc_node_container *)mod->compiled->data)->child->prev->prev->prev));
     assert_int_equal(LYS_LEAF, leaf->nodetype);
@@ -2517,77 +2278,71 @@
     assert_int_equal(0, dynamic);
 
     /* invalid */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa;import grp {prefix g;}"
             "uses g:grp {refine c {default hello;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid refine of container node - it is not possible to replace \"default\" property. /aa:{uses='g:grp'}/aa:c/{refine='c'}");
+    CHECK_LOG_CTX("Invalid refine of container node - it is not possible to replace \"default\" property.", "/aa:{uses='g:grp'}/aa:c/{refine='c'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;import grp {prefix g;}"
             "uses g:grp {refine c/l {default hello; default world;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid refine of leaf with too many (2) default properties. /bb:{uses='g:grp'}/bb:c/l/{refine='c/l'}");
+    CHECK_LOG_CTX("Invalid refine of leaf with too many (2) default properties.", "/bb:{uses='g:grp'}/bb:c/l/{refine='c/l'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc;import grp {prefix g;}"
             "uses g:grp {refine c/ll {default hello; default world;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid refine of default in leaf-list - the default statement is allowed only in YANG 1.1 modules. /cc:{uses='g:grp'}/cc:c/ll/{refine='c/ll'}");
+    CHECK_LOG_CTX("Invalid refine of default in leaf-list - the default statement is allowed only in YANG 1.1 modules.", "/cc:{uses='g:grp'}/cc:c/ll/{refine='c/ll'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {namespace urn:dd;prefix dd;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {namespace urn:dd;prefix dd;import grp {prefix g;}"
             "uses g:grp {refine c/ll {mandatory true;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid refine of leaf-list node - it is not possible to replace \"mandatory\" property. /dd:{uses='g:grp'}/dd:c/ll/{refine='c/ll'}");
+    CHECK_LOG_CTX("Invalid refine of leaf-list node - it is not possible to replace \"mandatory\" property.", "/dd:{uses='g:grp'}/dd:c/ll/{refine='c/ll'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:ee;prefix ee;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:ee;prefix ee;import grp {prefix g;}"
             "uses g:grp {refine c/l {mandatory true;}}}", LYS_IN_YANG, &mod));
-    // logbuf_assert("Invalid refine of mandatory - leaf already has \"default\" statement. /ee:{uses='g:grp'}/{refine='c/l'}");
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /ee:{uses='g:grp'}/ee:c/l");
+    // CHECK_LOG_CTX("Invalid refine of mandatory - leaf already has \"default\" statement.", "/ee:{uses='g:grp'}/{refine='c/l'}");
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/ee:{uses='g:grp'}/ee:c/l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ef {namespace urn:ef;prefix ef;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ef {namespace urn:ef;prefix ef;import grp {prefix g;}"
             "uses g:grp {refine c/ch {mandatory true;}}}", LYS_IN_YANG, &mod));
-    // logbuf_assert("Invalid refine of mandatory - choice already has \"default\" statement. /ef:{uses='g:grp'}/{refine='c/ch'}");
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /ef:{uses='g:grp'}/ef:c/ch");
+    // CHECK_LOG_CTX("Invalid refine of mandatory - choice already has \"default\" statement.", "/ef:{uses='g:grp'}/{refine='c/ch'}");
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/ef:{uses='g:grp'}/ef:c/ch");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff {namespace urn:ff;prefix ff;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff {namespace urn:ff;prefix ff;import grp {prefix g;}"
             "uses g:grp {refine c/ch/ca/ca {mandatory true;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Mandatory node \"ca\" under the default case \"ca\". /ff:{uses='g:grp'}/ff:c/ch");
+    CHECK_LOG_CTX("Mandatory node \"ca\" under the default case \"ca\".", "/ff:{uses='g:grp'}/ff:c/ch");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {namespace urn:gg;prefix gg;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {namespace urn:gg;prefix gg;import grp {prefix g;}"
             "uses g:grp {refine c/x {default hello;}}}", LYS_IN_YANG, &mod));
-    // logbuf_assert("Invalid refine of default - the node is mandatory. /gg:{uses='g:grp'}/{refine='c/x'}");
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /gg:{uses='g:grp'}/gg:c/x");
+    // CHECK_LOG_CTX("Invalid refine of default - the node is mandatory.", "/gg:{uses='g:grp'}/{refine='c/x'}");
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/gg:{uses='g:grp'}/gg:c/x");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module hh {namespace urn:hh;prefix hh;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module hh {namespace urn:hh;prefix hh;import grp {prefix g;}"
             "uses g:grp {refine c/c/l {config true;}}}", LYS_IN_YANG, &mod));
-    // logbuf_assert("Invalid refine of config - configuration node cannot be child of any state data node. /hh:{uses='g:grp'}/{refine='c/c/l'}");
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /hh:{uses='g:grp'}/hh:c/c/l");
+    // CHECK_LOG_CTX("Invalid refine of config - configuration node cannot be child of any state data node.", "/hh:{uses='g:grp'}/{refine='c/c/l'}");
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/hh:{uses='g:grp'}/hh:c/c/l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ii {namespace urn:ii;prefix ii;grouping grp {leaf l {type string; status deprecated;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ii {namespace urn:ii;prefix ii;grouping grp {leaf l {type string; status deprecated;}}"
             "uses grp {status obsolete;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("A \"deprecated\" status is in conflict with the parent's \"obsolete\" status. /ii:{uses='grp'}/ii:l");
+    CHECK_LOG_CTX("A \"deprecated\" status is in conflict with the parent's \"obsolete\" status.", "/ii:{uses='grp'}/ii:l");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj {namespace urn:jj;prefix jj;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj {namespace urn:jj;prefix jj;import grp {prefix g;}"
             "uses g:grp {refine c/x {presence nonsence;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid refine of leaf node - it is not possible to replace \"presence\" property. /jj:{uses='g:grp'}/jj:c/x/{refine='c/x'}");
+    CHECK_LOG_CTX("Invalid refine of leaf node - it is not possible to replace \"presence\" property.", "/jj:{uses='g:grp'}/jj:c/x/{refine='c/x'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module kk {namespace urn:kk;prefix kk;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module kk {namespace urn:kk;prefix kk;import grp {prefix g;}"
             "uses g:grp {refine c/ch {must 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid refine of choice node - it is not possible to add \"must\" property. /kk:{uses='g:grp'}/kk:c/ch/{refine='c/ch'}");
+    CHECK_LOG_CTX("Invalid refine of choice node - it is not possible to add \"must\" property.", "/kk:{uses='g:grp'}/kk:c/ch/{refine='c/ch'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ll {namespace urn:ll;prefix ll;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ll {namespace urn:ll;prefix ll;import grp {prefix g;}"
             "uses g:grp {refine c/x {min-elements 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid refine of leaf node - it is not possible to replace \"min-elements\" property. /ll:{uses='g:grp'}/ll:c/x/{refine='c/x'}");
+    CHECK_LOG_CTX("Invalid refine of leaf node - it is not possible to replace \"min-elements\" property.", "/ll:{uses='g:grp'}/ll:c/x/{refine='c/x'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm {namespace urn:mm;prefix mm;import grp {prefix g;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm {namespace urn:mm;prefix mm;import grp {prefix g;}"
             "uses g:grp {refine c/ll {min-elements 10;}}}", LYS_IN_YANG, &mod));
-    // logbuf_assert("Invalid refine of min-elements statement - \"min-elements\" is bigger than \"max-elements\". /mm:{uses='g:grp'}/{refine='c/ll'}");
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /mm:{uses='g:grp'}/mm:c/ll");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    // CHECK_LOG_CTX("Invalid refine of min-elements statement - \"min-elements\" is bigger than \"max-elements\".", "/mm:{uses='g:grp'}/{refine='c/ll'}");
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/mm:{uses='g:grp'}/mm:c/ll");
 }
 
 static void
 test_augment(void **state)
 {
-    *state = test_augment;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     const struct lysc_node *node;
     const struct lysc_node_choice *ch;
@@ -2596,20 +2351,18 @@
     const struct lysc_action *rpc;
     const struct lysc_notif *notif;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module a {namespace urn:a;prefix a; typedef atype {type string;}"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module a {namespace urn:a;prefix a; typedef atype {type string;}"
             "container top {leaf a {type string;}}}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;import a {prefix a;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;import a {prefix a;}"
             "leaf b {type a:atype;}}", LYS_IN_YANG, &mod));
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module c {namespace urn:c;prefix c; import a {prefix a;}"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module c {namespace urn:c;prefix c; import a {prefix a;}"
             "augment /a:top { container c {leaf c {type a:atype;}}}}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {namespace urn:d;prefix d;import a {prefix a;} import c {prefix c;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {namespace urn:d;prefix d;import a {prefix a;} import c {prefix c;}"
             "augment /a:top/c:c { leaf d {type a:atype;} leaf c {type string;}}}", LYS_IN_YANG, &mod));
-    assert_non_null((mod = ly_ctx_get_module_implemented(ctx, "a")));
-    assert_non_null(ly_ctx_get_module_implemented(ctx, "b"));
-    assert_non_null(ly_ctx_get_module_implemented(ctx, "c"));
-    assert_non_null(ly_ctx_get_module_implemented(ctx, "d"));
+    assert_non_null((mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "a")));
+    assert_non_null(ly_ctx_get_module_implemented(UTEST_LYCTX, "b"));
+    assert_non_null(ly_ctx_get_module_implemented(UTEST_LYCTX, "c"));
+    assert_non_null(ly_ctx_get_module_implemented(UTEST_LYCTX, "d"));
     assert_non_null(node = mod->compiled->data);
     assert_string_equal(node->name, "top");
     assert_non_null(node = lysc_node_children(node, 0));
@@ -2623,7 +2376,7 @@
     assert_non_null(node = node->next);
     assert_string_equal(node->name, "c");
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module e {namespace urn:e;prefix e;choice ch {leaf a {type string;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module e {namespace urn:e;prefix e;choice ch {leaf a {type string;}}"
             "augment /ch/c {when 1; leaf lc2 {type uint16;}}"
             "augment /ch { when 1; leaf b {type int8;} case c {leaf lc1 {type uint8;}}}}", LYS_IN_YANG, &mod));
     assert_non_null((ch = (const struct lysc_node_choice *)mod->compiled->data));
@@ -2649,15 +2402,15 @@
     assert_string_equal("a", c->child->name);
     assert_null(c->next);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module f {namespace urn:f;prefix f;grouping g {leaf a {type string;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module f {namespace urn:f;prefix f;grouping g {leaf a {type string;}}"
             "container c;"
             "augment /c {uses g;}}", LYS_IN_YANG, &mod));
     assert_non_null(node = lysc_node_children(mod->compiled->data, 0));
     assert_string_equal(node->name, "a");
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule gsub {belongs-to g {prefix g;}"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "submodule gsub {belongs-to g {prefix g;}"
             "augment /c {container sub;}}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module g {namespace urn:g;prefix g;include gsub; container c;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module g {namespace urn:g;prefix g;include gsub; container c;"
             "augment /c/sub {leaf main {type string;}}}", LYS_IN_YANG, &mod));
     assert_non_null(mod->compiled->data);
     assert_string_equal("c", mod->compiled->data->name);
@@ -2666,8 +2419,8 @@
     assert_non_null(node = ((struct lysc_node_container *)node)->child);
     assert_string_equal("main", node->name);
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module himp {namespace urn:hi;prefix hi;container top; rpc func;}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module h {namespace urn:h;prefix h;import himp {prefix hi;}container top;"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module himp {namespace urn:hi;prefix hi;container top; rpc func;}");
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module h {namespace urn:h;prefix h;import himp {prefix hi;}container top;"
             "augment /hi:top {container p {presence XXX; leaf x {mandatory true;type string;}}}"
             "augment /hi:top {list ll {key x;leaf x {type string;}leaf y {mandatory true; type string;}}}"
             "augment /hi:top {leaf l {type string; mandatory true; config false;}}"
@@ -2676,7 +2429,7 @@
     assert_non_null(node = ((struct lysc_node_container *)node)->child);
     assert_string_equal("l", node->name);
     assert_true(node->flags & LYS_MAND_TRUE);
-    assert_non_null(mod = ly_ctx_get_module_implemented(ctx, "himp"));
+    assert_non_null(mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "himp"));
     assert_non_null(node = mod->compiled->data);
     assert_non_null(node = ((struct lysc_node_container *)node)->child);
     assert_string_equal("p", node->name);
@@ -2686,10 +2439,10 @@
     assert_string_equal("l", node->name);
     assert_true(node->flags & LYS_CONFIG_R);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module i {namespace urn:i;prefix i;import himp {prefix hi;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module i {namespace urn:i;prefix i;import himp {prefix hi;}"
             "augment /hi:func/hi:input {leaf x {type string;}}"
             "augment /hi:func/hi:output {leaf y {type string;}}}", LYS_IN_YANG, NULL));
-    assert_non_null(mod = ly_ctx_get_module_implemented(ctx, "himp"));
+    assert_non_null(mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "himp"));
     assert_non_null(rpc = mod->compiled->rpcs);
     assert_int_equal(1, LY_ARRAY_COUNT(rpc));
     assert_non_null(rpc->input.data);
@@ -2699,7 +2452,7 @@
     assert_string_equal("y", rpc->output.data->name);
     assert_null(rpc->output.data->next);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module j {namespace urn:j;prefix j;yang-version 1.1; container root;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module j {namespace urn:j;prefix j;yang-version 1.1; container root;"
             "grouping grp {notification grp-notif;}"
             "augment /root {uses grp;}}", LYS_IN_YANG, &mod));
     assert_non_null(cont = (const struct lysc_node_container *)mod->compiled->data);
@@ -2707,53 +2460,47 @@
     assert_non_null(notif = cont->notifs);
     assert_int_equal(1, LY_ARRAY_COUNT(notif));
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; container c {leaf a {type string;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; container c {leaf a {type string;}}"
             "augment /x/ {leaf a {type int8;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid absolute-schema-nodeid value \"/x/\" - unexpected end of expression. /aa:{augment='/x/'}");
+    CHECK_LOG_CTX("Invalid absolute-schema-nodeid value \"/x/\" - unexpected end of expression.", "/aa:{augment='/x/'}");
 
-    assert_int_equal(LY_ENOTFOUND, lys_parse_mem(ctx, "module aa {namespace urn:aa;prefix aa; container c {leaf a {type string;}}"
+    assert_int_equal(LY_ENOTFOUND, lys_parse_mem(UTEST_LYCTX, "module aa {namespace urn:aa;prefix aa; container c {leaf a {type string;}}"
             "augment /x {leaf a {type int8;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Augment target node \"/x\" from module \"aa\" was not found.");
+    CHECK_LOG_CTX("Augment target node \"/x\" from module \"aa\" was not found.", NULL);
 
-    assert_int_equal(LY_EEXIST, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb; container c {leaf a {type string;}}"
+    assert_int_equal(LY_EEXIST, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb; container c {leaf a {type string;}}"
             "augment /c {leaf a {type int8;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Duplicate identifier \"a\" of data definition/RPC/action/notification statement. /bb:c/a");
+    CHECK_LOG_CTX("Duplicate identifier \"a\" of data definition/RPC/action/notification statement.", "/bb:c/a");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc; container c {leaf a {type string;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc; container c {leaf a {type string;}}"
             "augment /c/a {leaf a {type int8;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Augment's absolute-schema-nodeid \"/c/a\" refers to a leaf node which is not an allowed augment's target. /cc:{augment='/c/a'}");
+    CHECK_LOG_CTX("Augment's absolute-schema-nodeid \"/c/a\" refers to a leaf node which is not an allowed augment's target.", "/cc:{augment='/c/a'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd {namespace urn:dd;prefix dd; container c {leaf a {type string;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd {namespace urn:dd;prefix dd; container c {leaf a {type string;}}"
             "augment /c {case b {leaf d {type int8;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid augment of container node which is not allowed to contain case node \"b\". /dd:{augment='/c'}");
+    CHECK_LOG_CTX("Invalid augment of container node which is not allowed to contain case node \"b\".", "/dd:{augment='/c'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee {namespace urn:ee;prefix ee; import himp {prefix hi;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee {namespace urn:ee;prefix ee; import himp {prefix hi;}"
             "augment /hi:top {container c {leaf d {mandatory true; type int8;}}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid augment adding mandatory node \"c\" without making it conditional via when statement. /ee:{augment='/hi:top'}");
+    CHECK_LOG_CTX("Invalid augment adding mandatory node \"c\" without making it conditional via when statement.", "/ee:{augment='/hi:top'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff {namespace urn:ff;prefix ff; container top;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff {namespace urn:ff;prefix ff; container top;"
             "augment ../top {leaf x {type int8;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid absolute-schema-nodeid value \"../top\" - \"/\" expected instead of \"..\". /ff:{augment='../top'}");
+    CHECK_LOG_CTX("Invalid absolute-schema-nodeid value \"../top\" - \"/\" expected instead of \"..\".", "/ff:{augment='../top'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg {namespace urn:gg;prefix gg; rpc func;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg {namespace urn:gg;prefix gg; rpc func;"
             "augment /func {leaf x {type int8;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Augment's absolute-schema-nodeid \"/func\" refers to a RPC node which is not an allowed augment's target. /gg:{augment='/func'}");
+    CHECK_LOG_CTX("Augment's absolute-schema-nodeid \"/func\" refers to a RPC node which is not an allowed augment's target.", "/gg:{augment='/func'}");
 
-    assert_int_equal(LY_ENOTFOUND, lys_parse_mem(ctx, "module hh {namespace urn:i;prefix i;import himp {prefix hi;}"
+    assert_int_equal(LY_ENOTFOUND, lys_parse_mem(UTEST_LYCTX, "module hh {namespace urn:i;prefix i;import himp {prefix hi;}"
             "augment /hi:func/input {leaf x {type string;}}"
             "augment /hi:func/output {leaf y {type string;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Invalid absolute-schema-nodeid value \"/hi:func/input\" - target node not found. /hh:{augment='/hi:func/input'}");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Invalid absolute-schema-nodeid value \"/hi:func/input\" - target node not found.", "/hh:{augment='/hi:func/input'}");
 }
 
 static void
 test_deviation(void **state)
 {
-    *state = test_deviation;
-
-    struct ly_ctx *ctx;
     const struct lys_module *mod;
     const struct lysc_node *node;
     const struct lysc_node_list *list;
@@ -2762,15 +2509,13 @@
     const char *str;
     uint8_t dynamic;
 
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module a {namespace urn:a;prefix a;"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module a {namespace urn:a;prefix a;"
             "container top {leaf a {type string;} leaf b {type string;} leaf c {type string;}}"
             "choice ch {default c; case b {leaf b{type string;}} case a {leaf a{type string;} leaf x {type string;}}"
             " case c {leaf c{type string;}}}"
             "rpc func1 { input { leaf x {type int8;}} output {leaf y {type int8;}}}"
             "rpc func2;}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module b {namespace urn:b;prefix b;import a {prefix a;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module b {namespace urn:b;prefix b;import a {prefix a;}"
             "deviation /a:top/a:b {deviate not-supported;}"
             "deviation /a:ch/a:a/a:x {deviate not-supported;}"
             "deviation /a:ch/a:c {deviate not-supported;}"
@@ -2780,7 +2525,7 @@
             "deviation /a:func1/a:input {deviate not-supported;}"
             "deviation /a:func1/a:output {deviate not-supported;}"
             "deviation /a:func2 {deviate not-supported;}}", LYS_IN_YANG, NULL));
-    assert_non_null((mod = ly_ctx_get_module_implemented(ctx, "a")));
+    assert_non_null((mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "a")));
     assert_non_null(node = mod->compiled->data);
     assert_string_equal(node->name, "top");
     assert_non_null(node = lysc_node_children(node, 0));
@@ -2797,7 +2542,7 @@
     assert_null(mod->compiled->rpcs[0].input.data);
     assert_null(mod->compiled->rpcs[0].output.data);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module c {namespace urn:c;prefix c; typedef mytype {type string; units kilometers;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module c {namespace urn:c;prefix c; typedef mytype {type string; units kilometers;}"
             "leaf c1 {type mytype;} leaf c2 {type mytype; units meters;} leaf c3 {type mytype; units meters;}"
             "deviation /c1 {deviate add {units meters;}}"
             "deviation /c2 {deviate delete {units meters;}}"
@@ -2812,7 +2557,7 @@
     assert_string_equal("c3", node->name);
     assert_string_equal("centimeters", ((struct lysc_node_leaf *)node)->units);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module d {namespace urn:d;prefix d; leaf c1 {type string; must 1;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module d {namespace urn:d;prefix d; leaf c1 {type string; must 1;}"
             "container c2 {presence yes; must 1; must 2;} leaf c3 {type string; must 1; must 3;}"
             "deviation /c1 {deviate add {must 3;}}"
             "deviation /c2 {deviate delete {must 2;}}"
@@ -2829,18 +2574,18 @@
     assert_string_equal("c3", node->name);
     assert_null(((struct lysc_node_leaf *)node)->musts);
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module e {yang-version 1.1; namespace urn:e;prefix e; typedef mytype {type string; default nothing;}"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module e {yang-version 1.1; namespace urn:e;prefix e; typedef mytype {type string; default nothing;}"
             "choice a {default aa;leaf aa {type string;} leaf ab {type string;} leaf ac {type string; mandatory true;}}"
             "choice b {default ba;leaf ba {type string;} leaf bb {type string;}}"
             "leaf c {default hello; type string;}"
             "leaf-list d {default hello; default world; type string;}"
             "leaf c2 {type mytype;} leaf-list d2 {type mytype;}}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module f {yang-version 1.1; namespace urn:f;prefix f;import e {prefix x;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module f {yang-version 1.1; namespace urn:f;prefix f;import e {prefix x;}"
             "deviation /x:a {deviate delete {default aa;}}"
             "deviation /x:b {deviate delete {default ba;}}"
             "deviation /x:c {deviate delete {default hello;}}"
             "deviation /x:d {deviate delete {default world;}}}", LYS_IN_YANG, NULL));
-    assert_non_null((mod = ly_ctx_get_module_implemented(ctx, "e")));
+    assert_non_null((mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "e")));
     assert_non_null(node = mod->compiled->data);
     assert_null(((struct lysc_node_choice *)node)->dflt);
     assert_non_null(node = node->next);
@@ -2854,19 +2599,19 @@
     assert_non_null(leaf = (struct lysc_node_leaf *)llist->next);
     assert_string_equal("nothing", leaf->dflt->realtype->plugin->print(leaf->dflt, LY_PREF_SCHEMA, NULL, &dynamic));
     assert_int_equal(0, dynamic);
-    assert_int_equal(5, leaf->dflt->realtype->refcount); /* 3x type reference, 2x default value reference (typedef's default does not reference own type) */
+    assert_int_equal(5, leaf->dflt->realtype->refcount);     /* 3x type reference, 2x default value reference (typedef's default does not reference own type) */
     assert_non_null(llist = (struct lysc_node_leaflist *)leaf->next);
     assert_int_equal(1, LY_ARRAY_COUNT(llist->dflts));
     assert_string_equal("nothing", llist->dflts[0]->realtype->plugin->print(llist->dflts[0], LY_PREF_SCHEMA, NULL, &dynamic));
     assert_int_equal(0, dynamic);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module g {yang-version 1.1; namespace urn:g;prefix g;import e {prefix x;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module g {yang-version 1.1; namespace urn:g;prefix g;import e {prefix x;}"
             "deviation /x:b {deviate add {default x:ba;}}"
             "deviation /x:c {deviate add {default bye;}}"
             "deviation /x:d {deviate add {default all; default people;}}"
             "deviation /x:c2 {deviate add {default hi; must 1;}}"
             "deviation /x:d2 {deviate add {default hi; default all;}}}", LYS_IN_YANG, NULL));
-    assert_non_null((mod = ly_ctx_get_module_implemented(ctx, "e")));
+    assert_non_null((mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "e")));
     assert_non_null(node = mod->compiled->data);
     assert_null(((struct lysc_node_choice *)node)->dflt);
     assert_non_null(node = node->next);
@@ -2888,7 +2633,7 @@
     assert_non_null(leaf->dflt);
     assert_string_equal("hi", leaf->dflt->realtype->plugin->print(leaf->dflt, LY_PREF_SCHEMA, NULL, &dynamic));
     assert_int_equal(0, dynamic);
-    assert_int_equal(6, leaf->dflt->realtype->refcount); /* 3x type reference, 3x default value reference
+    assert_int_equal(6, leaf->dflt->realtype->refcount);     /* 3x type reference, 3x default value reference
     - previous type's default values were replaced by node's default values where d2 now has 2 default values */
     assert_int_equal(1, LY_ARRAY_COUNT(leaf->musts));
     assert_int_equal(0, LY_ARRAY_COUNT(leaf->musts[0].prefixes));
@@ -2899,10 +2644,10 @@
     assert_string_equal("all", llist->dflts[1]->realtype->plugin->print(llist->dflts[1], LY_PREF_SCHEMA, NULL, &dynamic));
     assert_int_equal(0, dynamic);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module h {yang-version 1.1; namespace urn:h;prefix h;import e {prefix x;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module h {yang-version 1.1; namespace urn:h;prefix h;import e {prefix x;}"
             "deviation /x:b {deviate replace {default x:ba;}}"
             "deviation /x:c {deviate replace {default hello;}}}", LYS_IN_YANG, NULL));
-    assert_non_null((mod = ly_ctx_get_module_implemented(ctx, "e")));
+    assert_non_null((mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "e")));
     assert_non_null(node = mod->compiled->data);
     assert_null(((struct lysc_node_choice *)node)->dflt);
     assert_non_null(node = node->next);
@@ -2913,16 +2658,16 @@
     assert_string_equal("hello", leaf->dflt->realtype->plugin->print(leaf->dflt, LY_PREF_SCHEMA, NULL, &dynamic));
     assert_int_equal(0, dynamic);
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module i {namespace urn:i;prefix i;"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module i {namespace urn:i;prefix i;"
             "list l1 {key a; leaf a {type string;} leaf b {type string;} leaf c {type string;}}"
             "list l2 {key a; unique \"b c\"; unique \"d\"; leaf a {type string;} leaf b {type string;}"
             "         leaf c {type string;} leaf d {type string;}}}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module j {namespace urn:j;prefix j;import i {prefix i;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module j {namespace urn:j;prefix j;import i {prefix i;}"
             "augment /i:l1 {leaf j_c {type string;}}"
             "deviation /i:l1 {deviate add {unique \"i:b j_c\"; }}"
             "deviation /i:l1 {deviate add {unique \"i:c\";}}"
             "deviation /i:l2 {deviate delete {unique \"d\"; unique \"b c\";}}}", LYS_IN_YANG, NULL));
-    assert_non_null((mod = ly_ctx_get_module_implemented(ctx, "i")));
+    assert_non_null((mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "i")));
     assert_non_null(list = (struct lysc_node_list *)mod->compiled->data);
     assert_string_equal("l1", list->name);
     assert_int_equal(2, LY_ARRAY_COUNT(list->uniques));
@@ -2935,7 +2680,7 @@
     assert_string_equal("l2", list->name);
     assert_null(list->uniques);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module k {namespace urn:k;prefix k; leaf a {type string;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module k {namespace urn:k;prefix k; leaf a {type string;}"
             "container top {leaf x {type string;} leaf y {type string; config false;}}"
             "deviation /a {deviate add {config false; }}"
             "deviation /top {deviate add {config false;}}}", LYS_IN_YANG, &mod));
@@ -2952,7 +2697,7 @@
     assert_string_equal("y", node->name);
     assert_true(node->flags & LYS_CONFIG_R);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module l {namespace urn:l;prefix l; leaf a {config false; type string;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module l {namespace urn:l;prefix l; leaf a {config false; type string;}"
             "container top {config false; leaf x {type string;}}"
             "deviation /a {deviate replace {config true;}}"
             "deviation /top {deviate replace {config true;}}}", LYS_IN_YANG, &mod));
@@ -2966,7 +2711,7 @@
     assert_string_equal("x", node->name);
     assert_true(node->flags & LYS_CONFIG_W);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module m {namespace urn:m;prefix m;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module m {namespace urn:m;prefix m;"
             "container a {leaf a {type string;}}"
             "container b {leaf b {mandatory true; type string;}}"
             "deviation /a/a {deviate add {mandatory true;}}"
@@ -2977,10 +2722,10 @@
     assert_true((lysc_node_children(node, 0)->flags & LYS_MAND_MASK) == LYS_MAND_TRUE);
     assert_non_null(node = node->next);
     assert_string_equal("b", node->name);
-    assert_false(node->flags & LYS_MAND_MASK); /* just unset on container */
+    assert_false(node->flags & LYS_MAND_MASK);     /* just unset on container */
     assert_true((lysc_node_children(node, 0)->flags & LYS_MAND_MASK) == LYS_MAND_FALSE);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module n {yang-version 1.1; namespace urn:n;prefix n;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module n {yang-version 1.1; namespace urn:n;prefix n;"
             "leaf a {default test; type string;}"
             "leaf b {mandatory true; type string;}"
             "deviation /a {deviate add {mandatory true;} deviate delete {default test;}}"
@@ -2994,7 +2739,7 @@
     assert_non_null(((struct lysc_node_leaf *)node)->dflt);
     assert_true((node->flags & LYS_MAND_MASK) == LYS_MAND_FALSE);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module o {namespace urn:o;prefix o;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module o {namespace urn:o;prefix o;"
             "leaf-list a {type string;}"
             "list b {config false;}"
             "leaf-list c {min-elements 1; max-elements 10; type string;}"
@@ -3020,7 +2765,7 @@
     assert_int_equal(1, ((struct lysc_node_list *)node)->min);
     assert_int_equal(10, ((struct lysc_node_list *)node)->max);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module p {yang-version 1.1; namespace urn:p;prefix p; typedef mytype {type int8; default 1;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module p {yang-version 1.1; namespace urn:p;prefix p; typedef mytype {type int8; default 1;}"
             "leaf a {type string; default 10;} leaf-list b {type string;}"
             "deviation /a {deviate replace {type mytype;}}"
             "deviation /b {deviate replace {type mytype;}}}", LYS_IN_YANG, &mod));
@@ -3039,10 +2784,10 @@
     assert_int_equal(1, llist->dflts[0]->uint8);
 
     /* instance-identifiers with NULL canonical are changed to string types with a canonical value equal to the original value */
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module q {yang-version 1.1; namespace urn:q;prefix q; import e {prefix e;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module q {yang-version 1.1; namespace urn:q;prefix q; import e {prefix e;}"
             "leaf q {type instance-identifier; default \"/e:d2[.='a']\";}"
             "leaf-list ql {type instance-identifier; default \"/e:d[.='b']\"; default \"/e:d2[.='c']\";}}", LYS_IN_YANG, &mod));
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module qdev {yang-version 1.1; namespace urn:qdev;prefix qd; import q {prefix q;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module qdev {yang-version 1.1; namespace urn:qdev;prefix qd; import q {prefix q;}"
             "deviation /q:q { deviate replace {type string;}}"
             "deviation /q:ql { deviate replace {type string;}}}", LYS_IN_YANG, NULL));
     assert_non_null(leaf = (struct lysc_node_leaf *)mod->compiled->data);
@@ -3056,7 +2801,7 @@
     assert_int_equal(LY_TYPE_STRING, llist->dflts[0]->realtype->basetype);
     assert_string_equal("/e:d2[.='c']", llist->dflts[1]->canonical);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module r {yang-version 1.1; namespace urn:r;prefix r;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module r {yang-version 1.1; namespace urn:r;prefix r;"
             "typedef mytype {type uint8; default 200;}"
             "leaf r {type mytype;} leaf-list lr {type mytype;}"
             "deviation /r:r {deviate replace {type string;}}"
@@ -3068,7 +2813,7 @@
     assert_string_equal("lr", llist->name);
     assert_null(llist->dflts);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module s {yang-version 1.1; namespace urn:s;prefix s;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module s {yang-version 1.1; namespace urn:s;prefix s;"
             "leaf s {type instance-identifier {require-instance true;} default /s:x;}"
             "leaf x {type string;} leaf y {type string;}"
             "deviation /s:s {deviate replace {default /s:y;}}}", LYS_IN_YANG, &mod));
@@ -3081,29 +2826,29 @@
         free((char *)str);
     }
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module t {namespace urn:t;prefix t;"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module t {namespace urn:t;prefix t;"
             "leaf l {type string;}}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module u {namespace urn:u;prefix u;import t {prefix t;}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module u {namespace urn:u;prefix u;import t {prefix t;}"
             "identity ident;"
             "deviation /t:l {deviate replace {type identityref {base ident;}}}"
             "}", LYS_IN_YANG, NULL));
-    assert_non_null((mod = ly_ctx_get_module_implemented(ctx, "t")));
+    assert_non_null((mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "t")));
     assert_non_null(leaf = (struct lysc_node_leaf *)mod->compiled->data);
     assert_string_equal("l", leaf->name);
     assert_int_equal(LY_TYPE_IDENT, leaf->type->basetype);
     assert_string_equal("ident", ((struct lysc_type_identityref *)leaf->type)->bases[0]->name);
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module v {namespace urn:v;prefix v;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module v {namespace urn:v;prefix v;"
             "identity ident; identity ident2 { base ident; }"
             "}", LYS_IN_YANG, NULL));
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule w-sub { belongs-to w { prefix w; }"
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "submodule w-sub { belongs-to w { prefix w; }"
             "import v { prefix v_pref; }"
             "leaf l { type string; default \"v_pref:ident2\"; }"
             "}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module w {namespace urn:w;prefix w;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module w {namespace urn:w;prefix w;"
             "include w-sub;"
             "}", LYS_IN_YANG, &mod));
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module x {namespace urn:x;prefix x;"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module x {namespace urn:x;prefix x;"
             "import w { prefix w_pref; } import v { prefix v_pref; }"
             "deviation /w_pref:l { deviate replace { type identityref { base v_pref:ident; } } }"
             "}", LYS_IN_YANG, NULL));
@@ -3111,246 +2856,237 @@
     assert_string_equal("l", leaf->name);
     assert_int_equal(LY_TYPE_IDENT, leaf->type->basetype);
 
-    ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "module y {namespace urn:y;prefix y;"
-                                  "container cont {leaf l {type string;}}"
-                                  "leaf bl2 {type string;}"
-                                  "}");
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module z {namespace urn:z;prefix z;"
-                                  "import y {prefix y;}"
-                                  "deviation \"/y:cont/y:l\" {deviate replace {type leafref {path \"/al\";}}}"
-                                  "leaf al {type string;}"
-                                  "leaf al2 {type leafref {path \"/y:bl2\";}}"
-                                  "}", LYS_IN_YANG, NULL));
-    assert_non_null((mod = ly_ctx_get_module_implemented(ctx, "y")));
+    ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module y {namespace urn:y;prefix y;"
+            "container cont {leaf l {type string;}}"
+            "leaf bl2 {type string;}"
+            "}");
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module z {namespace urn:z;prefix z;"
+            "import y {prefix y;}"
+            "deviation \"/y:cont/y:l\" {deviate replace {type leafref {path \"/al\";}}}"
+            "leaf al {type string;}"
+            "leaf al2 {type leafref {path \"/y:bl2\";}}"
+            "}", LYS_IN_YANG, NULL));
+    assert_non_null((mod = ly_ctx_get_module_implemented(UTEST_LYCTX, "y")));
     assert_non_null(leaf = (struct lysc_node_leaf *)lysc_node_children(mod->compiled->data, 0));
     assert_string_equal("l", leaf->name);
     assert_int_equal(LY_TYPE_LEAFREF, leaf->type->basetype);
 
-    assert_int_equal(LY_ENOTFOUND, lys_parse_mem(ctx, "module aa1 {namespace urn:aa1;prefix aa1;import a {prefix a;}"
+    assert_int_equal(LY_ENOTFOUND, lys_parse_mem(UTEST_LYCTX, "module aa1 {namespace urn:aa1;prefix aa1;import a {prefix a;}"
             "deviation /a:top/a:z {deviate not-supported;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Deviation(s) target node \"/a:top/a:z\" from module \"aa1\" was not found.");
+    CHECK_LOG_CTX("Deviation(s) target node \"/a:top/a:z\" from module \"aa1\" was not found.", NULL);
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module aa2 {namespace urn:aa2;prefix aa2;import a {prefix a;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module aa2 {namespace urn:aa2;prefix aa2;import a {prefix a;}"
             "deviation /a:top/a:a {deviate not-supported;}"
             "deviation /a:top/a:a {deviate add {default error;}}}", LYS_IN_YANG, NULL));
-    logbuf_assert("Multiple deviations of \"/a:top/a:a\" with one of them being \"not-supported\". /");
+    CHECK_LOG_CTX("Multiple deviations of \"/a:top/a:a\" with one of them being \"not-supported\".", "/");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module bb {namespace urn:bb;prefix bb;import a {prefix a;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module bb {namespace urn:bb;prefix bb;import a {prefix a;}"
             "deviation a:top/a:a {deviate not-supported;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid absolute-schema-nodeid value \"a:top/a:a\" - \"/\" expected instead of \"a:top\". /bb:{deviation='a:top/a:a'}");
+    CHECK_LOG_CTX("Invalid absolute-schema-nodeid value \"a:top/a:a\" - \"/\" expected instead of \"a:top\".", "/bb:{deviation='a:top/a:a'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cc {namespace urn:cc;prefix cc; container c;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cc {namespace urn:cc;prefix cc; container c;"
             "deviation /c {deviate add {units meters;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of container node - it is not possible to add \"units\" property. /cc:{deviation='/c'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module cd {namespace urn:cd;prefix cd; leaf c {type string; units centimeters;}"
+    CHECK_LOG_CTX("Invalid deviation of container node - it is not possible to add \"units\" property.", "/cc:{deviation='/c'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module cd {namespace urn:cd;prefix cd; leaf c {type string; units centimeters;}"
             "deviation /c {deviate add {units meters;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation adding \"units\" property which already exists (with value \"centimeters\"). /cd:{deviation='/c'}");
+    CHECK_LOG_CTX("Invalid deviation adding \"units\" property which already exists (with value \"centimeters\").", "/cd:{deviation='/c'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd1 {namespace urn:dd1;prefix dd1; container c;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd1 {namespace urn:dd1;prefix dd1; container c;"
             "deviation /c {deviate delete {units meters;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of container node - it is not possible to delete \"units\" property. /dd1:{deviation='/c'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd2 {namespace urn:dd2;prefix dd2; leaf c {type string;}"
+    CHECK_LOG_CTX("Invalid deviation of container node - it is not possible to delete \"units\" property.", "/dd1:{deviation='/c'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd2 {namespace urn:dd2;prefix dd2; leaf c {type string;}"
             "deviation /c {deviate delete {units meters;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation deleting \"units\" property \"meters\" which is not present. /dd2:{deviation='/c'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module dd3 {namespace urn:dd3;prefix dd3; leaf c {type string; units centimeters;}"
+    CHECK_LOG_CTX("Invalid deviation deleting \"units\" property \"meters\" which is not present.", "/dd2:{deviation='/c'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module dd3 {namespace urn:dd3;prefix dd3; leaf c {type string; units centimeters;}"
             "deviation /c {deviate delete {units meters;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation deleting \"units\" property \"meters\" which does not match the target's property value \"centimeters\"."
-            " /dd3:{deviation='/c'}");
+    CHECK_LOG_CTX("Invalid deviation deleting \"units\" property \"meters\" which does not match the target's property value \"centimeters\".",
+            "/dd3:{deviation='/c'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee1 {namespace urn:ee1;prefix ee1; container c;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee1 {namespace urn:ee1;prefix ee1; container c;"
             "deviation /c {deviate replace {units meters;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of container node - it is not possible to replace \"units\" property. /ee1:{deviation='/c'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ee2 {namespace urn:ee2;prefix ee2; leaf c {type string;}"
+    CHECK_LOG_CTX("Invalid deviation of container node - it is not possible to replace \"units\" property.", "/ee1:{deviation='/c'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ee2 {namespace urn:ee2;prefix ee2; leaf c {type string;}"
             "deviation /c {deviate replace {units meters;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation replacing \"units\" property \"meters\" which is not present. /ee2:{deviation='/c'}");
+    CHECK_LOG_CTX("Invalid deviation replacing \"units\" property \"meters\" which is not present.", "/ee2:{deviation='/c'}");
 
     /* the default is already deleted in /e:a byt module f */
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff1 {namespace urn:ff1;prefix ff1; import e {prefix e;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff1 {namespace urn:ff1;prefix ff1; import e {prefix e;}"
             "deviation /e:a {deviate delete {default x:aa;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation deleting \"default\" property \"x:aa\" which is not present. /ff1:{deviation='/e:a'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff3 {namespace urn:ff3;prefix ff3; import e {prefix e;}"
+    CHECK_LOG_CTX("Invalid deviation deleting \"default\" property \"x:aa\" which is not present.", "/ff1:{deviation='/e:a'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff3 {namespace urn:ff3;prefix ff3; import e {prefix e;}"
             "deviation /e:b {deviate delete {default e:b;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation deleting \"default\" property \"e:b\" which does not match the target's property value \"x:ba\". /ff3:{deviation='/e:b'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff5 {namespace urn:ff5;prefix ff5; anyxml a;"
+    CHECK_LOG_CTX("Invalid deviation deleting \"default\" property \"e:b\" which does not match the target's property value \"x:ba\".", "/ff3:{deviation='/e:b'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff5 {namespace urn:ff5;prefix ff5; anyxml a;"
             "deviation /a {deviate delete {default x;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of anyxml node - it is not possible to delete \"default\" property. /ff5:{deviation='/a'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff6 {namespace urn:ff6;prefix ff6; import e {prefix e;}"
+    CHECK_LOG_CTX("Invalid deviation of anyxml node - it is not possible to delete \"default\" property.", "/ff5:{deviation='/a'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff6 {namespace urn:ff6;prefix ff6; import e {prefix e;}"
             "deviation /e:c {deviate delete {default hi;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation deleting \"default\" property \"hi\" which does not match the target's property value \"hello\". /ff6:{deviation='/e:c'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ff7 {namespace urn:ff7;prefix ff7; import e {prefix e;}"
+    CHECK_LOG_CTX("Invalid deviation deleting \"default\" property \"hi\" which does not match the target's property value \"hello\".", "/ff6:{deviation='/e:c'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ff7 {namespace urn:ff7;prefix ff7; import e {prefix e;}"
             "deviation /e:d {deviate delete {default hi;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation deleting \"default\" property \"hi\" which does not match any of the target's property values. /ff7:{deviation='/e:d'}");
+    CHECK_LOG_CTX("Invalid deviation deleting \"default\" property \"hi\" which does not match any of the target's property values.", "/ff7:{deviation='/e:d'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg1 {namespace urn:gg1;prefix gg1; import e {prefix e;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg1 {namespace urn:gg1;prefix gg1; import e {prefix e;}"
             "deviation /e:b {deviate add {default e:a;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation adding \"default\" property which already exists (with value \"x:ba\"). /gg1:{deviation='/e:b'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg2 {namespace urn:gg2;prefix gg2; import e {prefix e;}"
+    CHECK_LOG_CTX("Invalid deviation adding \"default\" property which already exists (with value \"x:ba\").", "/gg1:{deviation='/e:b'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg2 {namespace urn:gg2;prefix gg2; import e {prefix e;}"
             "deviation /e:a {deviate add {default x:a;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid deviation adding \"default\" property \"x:a\" of choice. "
+    /*CHECK_LOG_CTX("Invalid deviation adding \"default\" property \"x:a\" of choice. "
                   "The prefix does not match any imported module of the deviation module. /gg2:{deviation='/e:a'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /e:a");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg3 {namespace urn:gg3;prefix gg3; import e {prefix e;}"
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/e:a");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg3 {namespace urn:gg3;prefix gg3; import e {prefix e;}"
             "deviation /e:a {deviate add {default a;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid deviation adding \"default\" property \"a\" of choice - the specified case does not exists. /gg3:{deviation='/e:a'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /e:a");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg4 {namespace urn:gg4;prefix gg4; import e {prefix e;}"
+    /*CHECK_LOG_CTX("Invalid deviation adding \"default\" property \"a\" of choice - the specified case does not exists.", "/gg3:{deviation='/e:a'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/e:a");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg4 {namespace urn:gg4;prefix gg4; import e {prefix e;}"
             "deviation /e:c {deviate add {default hi;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation adding \"default\" property which already exists (with value \"hello\"). /gg4:{deviation='/e:c'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg4 {namespace urn:gg4;prefix gg4; import e {prefix e;}"
+    CHECK_LOG_CTX("Invalid deviation adding \"default\" property which already exists (with value \"hello\").", "/gg4:{deviation='/e:c'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg4 {namespace urn:gg4;prefix gg4; import e {prefix e;}"
             "deviation /e:a {deviate add {default e:ac;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid deviation adding \"default\" property \"e:ac\" of choice - mandatory node \"ac\" under the default case. /gg4:{deviation='/e:a'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /e:a");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module gg5 {namespace urn:gg5;prefix gg5; leaf x {type string; mandatory true;}"
+    /*CHECK_LOG_CTX("Invalid deviation adding \"default\" property \"e:ac\" of choice - mandatory node \"ac\" under the default case.", "/gg4:{deviation='/e:a'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/e:a");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module gg5 {namespace urn:gg5;prefix gg5; leaf x {type string; mandatory true;}"
             "deviation /x {deviate add {default error;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid deviation combining default value and mandatory leaf. /gg5:{deviation='/x'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /gg5:x");
+    /*CHECK_LOG_CTX("Invalid deviation combining default value and mandatory leaf.", "/gg5:{deviation='/x'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/gg5:x");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module hh1 {yang-version 1.1; namespace urn:hh1;prefix hh1; import e {prefix e;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module hh1 {yang-version 1.1; namespace urn:hh1;prefix hh1; import e {prefix e;}"
             "deviation /e:d {deviate replace {default hi;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of leaf-list node - it is not possible to replace \"default\" property. /hh1:{deviation='/e:d'}");
+    CHECK_LOG_CTX("Invalid deviation of leaf-list node - it is not possible to replace \"default\" property.", "/hh1:{deviation='/e:d'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ii1 {namespace urn:ii1;prefix ii1; import i {prefix i;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ii1 {namespace urn:ii1;prefix ii1; import i {prefix i;}"
             "deviation /i:l1 {deviate delete {unique x;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation deleting \"unique\" property \"x\" which does not match any of the target's property values. /ii1:{deviation='/i:l1'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ii2 {namespace urn:ii2;prefix ii2; import i {prefix i;} leaf x { type string;}"
+    CHECK_LOG_CTX("Invalid deviation deleting \"unique\" property \"x\" which does not match any of the target's property values.", "/ii1:{deviation='/i:l1'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ii2 {namespace urn:ii2;prefix ii2; import i {prefix i;} leaf x { type string;}"
             "deviation /i:l2 {deviate delete {unique d;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation deleting \"unique\" property \"d\" which does not match any of the target's property values. /ii2:{deviation='/i:l2'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ii3 {namespace urn:ii3;prefix ii3; leaf x { type string;}"
+    CHECK_LOG_CTX("Invalid deviation deleting \"unique\" property \"d\" which does not match any of the target's property values.", "/ii2:{deviation='/i:l2'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ii3 {namespace urn:ii3;prefix ii3; leaf x { type string;}"
             "deviation /x {deviate delete {unique d;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of leaf node - it is not possible to delete \"unique\" property. /ii3:{deviation='/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ii4 {namespace urn:ii4;prefix ii4; leaf x { type string;}"
+    CHECK_LOG_CTX("Invalid deviation of leaf node - it is not possible to delete \"unique\" property.", "/ii3:{deviation='/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ii4 {namespace urn:ii4;prefix ii4; leaf x { type string;}"
             "deviation /x {deviate add {unique d;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of leaf node - it is not possible to add \"unique\" property. /ii4:{deviation='/x'}");
+    CHECK_LOG_CTX("Invalid deviation of leaf node - it is not possible to add \"unique\" property.", "/ii4:{deviation='/x'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj1 {namespace urn:jj1;prefix jj1; choice ch {case a {leaf a{type string;}}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj1 {namespace urn:jj1;prefix jj1; choice ch {case a {leaf a{type string;}}}"
             "deviation /ch/a {deviate add {config false;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of case node - it is not possible to add \"config\" property. /jj1:{deviation='/ch/a'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj2 {namespace urn:jj2;prefix jj2; container top {config false; leaf x {type string;}}"
+    CHECK_LOG_CTX("Invalid deviation of case node - it is not possible to add \"config\" property.", "/jj1:{deviation='/ch/a'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj2 {namespace urn:jj2;prefix jj2; container top {config false; leaf x {type string;}}"
             "deviation /top/x {deviate add {config true;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid deviation of config - configuration node cannot be child of any state data node. /jj2:{deviation='/top/x'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /jj2:top/x");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj3 {namespace urn:jj3;prefix jj3; container top {leaf x {type string;}}"
+    /*CHECK_LOG_CTX("Invalid deviation of config - configuration node cannot be child of any state data node.", "/jj2:{deviation='/top/x'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/jj2:top/x");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj3 {namespace urn:jj3;prefix jj3; container top {leaf x {type string;}}"
             "deviation /top/x {deviate replace {config false;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation replacing \"config\" property \"config false\" which is not present. /jj3:{deviation='/top/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj4 {namespace urn:jj4;prefix jj4; choice ch {case a {leaf a{type string;}}}"
+    CHECK_LOG_CTX("Invalid deviation replacing \"config\" property \"config false\" which is not present.", "/jj3:{deviation='/top/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj4 {namespace urn:jj4;prefix jj4; choice ch {case a {leaf a{type string;}}}"
             "deviation /ch/a {deviate replace {config false;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of case node - it is not possible to replace \"config\" property. /jj4:{deviation='/ch/a'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj5 {namespace urn:jj5;prefix jj5; container top {leaf x {type string; config true;}}"
+    CHECK_LOG_CTX("Invalid deviation of case node - it is not possible to replace \"config\" property.", "/jj4:{deviation='/ch/a'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj5 {namespace urn:jj5;prefix jj5; container top {leaf x {type string; config true;}}"
             "deviation /top {deviate add {config false;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid deviation of config - configuration node cannot be child of any state data node. /jj5:{deviation='/top'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /jj5:top");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module jj6 {namespace urn:jj6;prefix jj6; leaf x {config false; type string;}"
+    /*CHECK_LOG_CTX("Invalid deviation of config - configuration node cannot be child of any state data node.", "/jj5:{deviation='/top'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/jj5:top");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module jj6 {namespace urn:jj6;prefix jj6; leaf x {config false; type string;}"
             "deviation /x {deviate add {config true;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation adding \"config\" property which already exists (with value \"config false\"). /jj6:{deviation='/x'}");
+    CHECK_LOG_CTX("Invalid deviation adding \"config\" property which already exists (with value \"config false\").", "/jj6:{deviation='/x'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module kk1 {namespace urn:kk1;prefix kk1; container top {leaf a{type string;}}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module kk1 {namespace urn:kk1;prefix kk1; container top {leaf a{type string;}}"
             "deviation /top {deviate add {mandatory true;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of container node - it is not possible to add \"mandatory\" property. /kk1:{deviation='/top'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module kk2 {namespace urn:kk2;prefix kk2; container top {leaf a{type string;}}"
+    CHECK_LOG_CTX("Invalid deviation of container node - it is not possible to add \"mandatory\" property.", "/kk1:{deviation='/top'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module kk2 {namespace urn:kk2;prefix kk2; container top {leaf a{type string;}}"
             "deviation /top {deviate replace {mandatory true;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of container node - it is not possible to replace \"mandatory\" property. /kk2:{deviation='/top'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module kk3 {namespace urn:kk3;prefix kk3; container top {leaf x {type string;}}"
+    CHECK_LOG_CTX("Invalid deviation of container node - it is not possible to replace \"mandatory\" property.", "/kk2:{deviation='/top'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module kk3 {namespace urn:kk3;prefix kk3; container top {leaf x {type string;}}"
             "deviation /top/x {deviate replace {mandatory true;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation replacing \"mandatory\" property \"mandatory true\" which is not present. /kk3:{deviation='/top/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module kk4 {namespace urn:kk4;prefix kk4; leaf x {mandatory true; type string;}"
+    CHECK_LOG_CTX("Invalid deviation replacing \"mandatory\" property \"mandatory true\" which is not present.", "/kk3:{deviation='/top/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module kk4 {namespace urn:kk4;prefix kk4; leaf x {mandatory true; type string;}"
             "deviation /x {deviate add {mandatory false;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation adding \"mandatory\" property which already exists (with value \"mandatory true\"). /kk4:{deviation='/x'}");
+    CHECK_LOG_CTX("Invalid deviation adding \"mandatory\" property which already exists (with value \"mandatory true\").", "/kk4:{deviation='/x'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ll1 {namespace urn:ll1;prefix ll1; leaf x {default test; type string;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ll1 {namespace urn:ll1;prefix ll1; leaf x {default test; type string;}"
             "deviation /x {deviate add {mandatory true;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid deviation combining default value and mandatory leaf. /ll1:{deviation='/x'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /ll1:x");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ll2 {yang-version 1.1; namespace urn:ll2;prefix ll2; leaf-list x {default test; type string;}"
+    /*CHECK_LOG_CTX("Invalid deviation combining default value and mandatory leaf.", "/ll1:{deviation='/x'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/ll1:x");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ll2 {yang-version 1.1; namespace urn:ll2;prefix ll2; leaf-list x {default test; type string;}"
             "deviation /x {deviate add {min-elements 1;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid deviation combining default value and mandatory leaf-list. /ll2:{deviation='/x'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /ll2:x");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module ll2 {namespace urn:ll2;prefix ll2; choice ch {default a; leaf a {type string;} leaf b {type string;}}"
+    /*CHECK_LOG_CTX("Invalid deviation combining default value and mandatory leaf-list.", "/ll2:{deviation='/x'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/ll2:x");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module ll2 {namespace urn:ll2;prefix ll2; choice ch {default a; leaf a {type string;} leaf b {type string;}}"
             "deviation /ch {deviate add {mandatory true;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid deviation combining default case and mandatory choice. /ll2:{deviation='/ch'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /ll2:ch");
+    /*CHECK_LOG_CTX("Invalid deviation combining default case and mandatory choice.", "/ll2:{deviation='/ch'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/ll2:ch");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm1 {namespace urn:mm1;prefix mm1; leaf-list x {min-elements 10; type string;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm1 {namespace urn:mm1;prefix mm1; leaf-list x {min-elements 10; type string;}"
             "deviation /x {deviate add {max-elements 5;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid combination of min-elements and max-elements after deviation: min value 10 is bigger than max value 5. /mm1:{deviation='/x'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /mm1:x");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm2 {namespace urn:mm2;prefix mm2; leaf-list x {max-elements 10; type string;}"
+    /*CHECK_LOG_CTX("Invalid combination of min-elements and max-elements after deviation: min value 10 is bigger than max value 5.", "/mm1:{deviation='/x'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/mm1:x");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm2 {namespace urn:mm2;prefix mm2; leaf-list x {max-elements 10; type string;}"
             "deviation /x {deviate add {min-elements 20;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid combination of min-elements and max-elements after deviation: min value 20 is bigger than max value 10. /mm2:{deviation='/x'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /mm2:x");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm3 {namespace urn:mm3;prefix mm3; list x {min-elements 5; max-elements 10; config false;}"
+    /*CHECK_LOG_CTX("Invalid combination of min-elements and max-elements after deviation: min value 20 is bigger than max value 10.", "/mm2:{deviation='/x'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/mm2:x");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm3 {namespace urn:mm3;prefix mm3; list x {min-elements 5; max-elements 10; config false;}"
             "deviation /x {deviate replace {max-elements 1;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid combination of min-elements and max-elements after deviation: min value 5 is bigger than max value 1. /mm3:{deviation='/x'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /mm3:x");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm4 {namespace urn:mm4;prefix mm4; list x {min-elements 5; max-elements 10; config false;}"
+    /*CHECK_LOG_CTX("Invalid combination of min-elements and max-elements after deviation: min value 5 is bigger than max value 1.", "/mm3:{deviation='/x'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/mm3:x");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm4 {namespace urn:mm4;prefix mm4; list x {min-elements 5; max-elements 10; config false;}"
             "deviation /x {deviate replace {min-elements 20;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Invalid combination of min-elements and max-elements after deviation: min value 20 is bigger than max value 10. /mm4:{deviation='/x'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /mm4:x");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm5 {namespace urn:mm5;prefix mm5; leaf-list x {type string; min-elements 5;}"
+    /*CHECK_LOG_CTX("Invalid combination of min-elements and max-elements after deviation: min value 20 is bigger than max value 10.", "/mm4:{deviation='/x'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/mm4:x");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm5 {namespace urn:mm5;prefix mm5; leaf-list x {type string; min-elements 5;}"
             "deviation /x {deviate add {min-elements 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation adding \"min-elements\" property which already exists (with value \"5\"). /mm5:{deviation='/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm6 {namespace urn:mm6;prefix mm6; list x {config false; min-elements 5;}"
+    CHECK_LOG_CTX("Invalid deviation adding \"min-elements\" property which already exists (with value \"5\").", "/mm5:{deviation='/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm6 {namespace urn:mm6;prefix mm6; list x {config false; min-elements 5;}"
             "deviation /x {deviate add {min-elements 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation adding \"min-elements\" property which already exists (with value \"5\"). /mm6:{deviation='/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm7 {namespace urn:mm7;prefix mm7; leaf-list x {type string; max-elements 5;}"
+    CHECK_LOG_CTX("Invalid deviation adding \"min-elements\" property which already exists (with value \"5\").", "/mm6:{deviation='/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm7 {namespace urn:mm7;prefix mm7; leaf-list x {type string; max-elements 5;}"
             "deviation /x {deviate add {max-elements 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation adding \"max-elements\" property which already exists (with value \"5\"). /mm7:{deviation='/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm8 {namespace urn:mm8;prefix mm8; list x {config false; max-elements 5;}"
+    CHECK_LOG_CTX("Invalid deviation adding \"max-elements\" property which already exists (with value \"5\").", "/mm7:{deviation='/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm8 {namespace urn:mm8;prefix mm8; list x {config false; max-elements 5;}"
             "deviation /x {deviate add {max-elements 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation adding \"max-elements\" property which already exists (with value \"5\"). /mm8:{deviation='/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm9 {namespace urn:mm9;prefix mm9; leaf-list x {type string;}"
+    CHECK_LOG_CTX("Invalid deviation adding \"max-elements\" property which already exists (with value \"5\").", "/mm8:{deviation='/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm9 {namespace urn:mm9;prefix mm9; leaf-list x {type string;}"
             "deviation /x {deviate replace {min-elements 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation replacing \"min-elements\" property which is not present. /mm9:{deviation='/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm10 {namespace urn:mm10;prefix mm10; list x {config false;}"
+    CHECK_LOG_CTX("Invalid deviation replacing \"min-elements\" property which is not present.", "/mm9:{deviation='/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm10 {namespace urn:mm10;prefix mm10; list x {config false;}"
             "deviation /x {deviate replace {min-elements 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation replacing \"min-elements\" property which is not present. /mm10:{deviation='/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm11 {namespace urn:mm11;prefix mm11; leaf-list x {type string;}"
+    CHECK_LOG_CTX("Invalid deviation replacing \"min-elements\" property which is not present.", "/mm10:{deviation='/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm11 {namespace urn:mm11;prefix mm11; leaf-list x {type string;}"
             "deviation /x {deviate replace {max-elements 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation replacing \"max-elements\" property which is not present. /mm11:{deviation='/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module mm12 {namespace urn:mm12;prefix mm12; list x {config false; }"
+    CHECK_LOG_CTX("Invalid deviation replacing \"max-elements\" property which is not present.", "/mm11:{deviation='/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module mm12 {namespace urn:mm12;prefix mm12; list x {config false; }"
             "deviation /x {deviate replace {max-elements 1;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation replacing \"max-elements\" property which is not present. /mm12:{deviation='/x'}");
+    CHECK_LOG_CTX("Invalid deviation replacing \"max-elements\" property which is not present.", "/mm12:{deviation='/x'}");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module nn1 {namespace urn:nn1;prefix nn1; anyxml x;"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module nn1 {namespace urn:nn1;prefix nn1; anyxml x;"
             "deviation /x {deviate replace {type string;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid deviation of anyxml node - it is not possible to replace \"type\" property. /nn1:{deviation='/x'}");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module nn2 {namespace urn:nn2;prefix nn2; leaf-list x {type string;}"
+    CHECK_LOG_CTX("Invalid deviation of anyxml node - it is not possible to replace \"type\" property.", "/nn1:{deviation='/x'}");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module nn2 {namespace urn:nn2;prefix nn2; leaf-list x {type string;}"
             "deviation /x {deviate replace {type empty;}}}", LYS_IN_YANG, &mod));
-    /*logbuf_assert("Leaf-list of type \"empty\" is allowed only in YANG 1.1 modules. /nn2:{deviation='/x'}");*/
-    logbuf_assert("Compilation of a deviated and/or refined node failed. /nn2:x");
+    /*CHECK_LOG_CTX("Leaf-list of type \"empty\" is allowed only in YANG 1.1 modules.", "/nn2:{deviation='/x'}");*/
+    CHECK_LOG_CTX("Compilation of a deviated and/or refined node failed.", "/nn2:x");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module oo1 {namespace urn:oo1;prefix oo1; leaf x {type uint16; default 300;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module oo1 {namespace urn:oo1;prefix oo1; leaf x {type uint16; default 300;}"
             "deviation /x {deviate replace {type uint8;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid default - value does not fit the type "
-            "(Value \"300\" is out of uint8's min/max bounds.). /oo1:x");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module oo2 {yang-version 1.1;namespace urn:oo2;prefix oo2; leaf-list x {type uint16; default 10; default 300;}"
+    CHECK_LOG_CTX("Invalid default - value does not fit the type "
+            "(Value \"300\" is out of uint8's min/max bounds.).", "/oo1:x");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module oo2 {yang-version 1.1;namespace urn:oo2;prefix oo2; leaf-list x {type uint16; default 10; default 300;}"
             "deviation /x {deviate replace {type uint8;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid default - value does not fit the type "
-            "(Value \"300\" is out of uint8's min/max bounds.). /oo2:x");
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module oo3 {namespace urn:oo3;prefix oo3; leaf x {type uint8;}"
+    CHECK_LOG_CTX("Invalid default - value does not fit the type "
+            "(Value \"300\" is out of uint8's min/max bounds.).", "/oo2:x");
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module oo3 {namespace urn:oo3;prefix oo3; leaf x {type uint8;}"
             "deviation /x {deviate add {default 300;}}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Invalid default - value does not fit the type "
-            "(Value \"300\" is out of uint8's min/max bounds.). /oo3:x");
+    CHECK_LOG_CTX("Invalid default - value does not fit the type "
+            "(Value \"300\" is out of uint8's min/max bounds.).", "/oo3:x");
 
-    assert_int_equal(LY_SUCCESS, lys_parse_mem(ctx, "module pp {namespace urn:pp;prefix pp; leaf l { type leafref {path /c/x;}}"
+    assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module pp {namespace urn:pp;prefix pp; leaf l { type leafref {path /c/x;}}"
             "container c {leaf x {type string;} leaf y {type string;}}}", LYS_IN_YANG, &mod));
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx, "module pp1 {namespace urn:pp1;prefix pp1; import pp {prefix pp;}"
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, "module pp1 {namespace urn:pp1;prefix pp1; import pp {prefix pp;}"
             "deviation /pp:c/pp:x {deviate not-supported;}}", LYS_IN_YANG, &mod));
-    logbuf_assert("Not found node \"x\" in path. /pp:l");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("Not found node \"x\" in path.", "/pp:l");
 }
 
 static void
 test_when(void **state)
 {
-    *state = test_when;
-
-    struct ly_ctx *ctx;
-
-    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx));
-
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx,
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX,
             "module a {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
@@ -3376,9 +3112,9 @@
             "    }\n"
             "}",
             LYS_IN_YANG, NULL));
-    logbuf_assert("When condition of \"val\" includes a self-reference (referenced by when of \"cont2\"). /a:cont/lst/val");
+    CHECK_LOG_CTX("When condition of \"val\" includes a self-reference (referenced by when of \"cont2\").", "/a:cont/lst/val");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx,
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX,
             "module a {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
@@ -3404,9 +3140,9 @@
             "    }\n"
             "}",
             LYS_IN_YANG, NULL));
-    logbuf_assert("When condition of \"val\" includes a self-reference (referenced by when of \"cont2\"). /a:cont/lst/val");
+    CHECK_LOG_CTX("When condition of \"val\" includes a self-reference (referenced by when of \"cont2\").", "/a:cont/lst/val");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx,
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX,
             "module a {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
@@ -3416,9 +3152,9 @@
             "    }\n"
             "}",
             LYS_IN_YANG, NULL));
-    logbuf_assert("When condition of \"val\" is accessing its own conditional node. /a:val");
+    CHECK_LOG_CTX("When condition of \"val\" is accessing its own conditional node.", "/a:val");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx,
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX,
             "module a {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
@@ -3432,9 +3168,9 @@
             "    }\n"
             "}",
             LYS_IN_YANG, NULL));
-    logbuf_assert("When condition of \"val\" is accessing its own conditional node. /a:val");
+    CHECK_LOG_CTX("When condition of \"val\" is accessing its own conditional node.", "/a:val");
 
-    assert_int_equal(LY_EVALID, lys_parse_mem(ctx,
+    assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX,
             "module a {\n"
             "    namespace urn:a;\n"
             "    prefix a;\n"
@@ -3447,44 +3183,41 @@
             "    container cont;\n"
             "}",
             LYS_IN_YANG, NULL));
-    logbuf_assert("When condition of \"val\" is accessing its own conditional node. /a:cont/val");
-
-    *state = NULL;
-    ly_ctx_destroy(ctx, NULL);
+    CHECK_LOG_CTX("When condition of \"val\" is accessing its own conditional node.", "/a:cont/val");
 }
 
 int
 main(void)
 {
     const struct CMUnitTest tests[] = {
-        cmocka_unit_test_setup_teardown(test_module, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_name_collisions, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_length, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_range, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_pattern, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_enum, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_bits, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_dec64, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_instanceid, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_identityref, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_leafref, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_empty, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_union, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_type_dflt, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_status, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_node_container, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_node_leaflist, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_node_list, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_node_choice, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_node_anydata, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_action, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_notification, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_grouping, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_uses, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_refine, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_augment, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_deviation, logger_setup, logger_teardown),
-        cmocka_unit_test_setup_teardown(test_when, logger_setup, logger_teardown),
+        UTEST(test_module, setup),
+        UTEST(test_name_collisions, setup),
+        UTEST(test_type_length, setup),
+        UTEST(test_type_range, setup),
+        UTEST(test_type_pattern, setup),
+        UTEST(test_type_enum, setup),
+        UTEST(test_type_bits, setup),
+        UTEST(test_type_dec64, setup),
+        UTEST(test_type_instanceid, setup),
+        UTEST(test_type_identityref, setup),
+        UTEST(test_type_leafref, setup),
+        UTEST(test_type_empty, setup),
+        UTEST(test_type_union, setup),
+        UTEST(test_type_dflt, setup),
+        UTEST(test_status, setup),
+        UTEST(test_node_container, setup),
+        UTEST(test_node_leaflist, setup),
+        UTEST(test_node_list, setup),
+        UTEST(test_node_choice, setup),
+        UTEST(test_node_anydata, setup),
+        UTEST(test_action, setup),
+        UTEST(test_notification, setup),
+        UTEST(test_grouping, setup),
+        UTEST(test_uses, setup),
+        UTEST(test_refine, setup),
+        UTEST(test_augment, setup),
+        UTEST(test_deviation, setup),
+        UTEST(test_when, setup),
     };
 
     return cmocka_run_group_tests(tests, NULL, NULL);
