Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 1 | /* |
| 2 | * @file set.c |
| 3 | * @author: Radek Krejci <rkrejci@cesnet.cz> |
| 4 | * @brief unit tests for functions from common.c |
| 5 | * |
| 6 | * Copyright (c) 2018 CESNET, z.s.p.o. |
| 7 | * |
| 8 | * This source code is licensed under BSD 3-Clause License (the "License"). |
| 9 | * You may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * https://opensource.org/licenses/BSD-3-Clause |
| 13 | */ |
| 14 | |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 15 | #include <stdarg.h> |
| 16 | #include <stddef.h> |
Radek Krejci | 3b1f929 | 2018-11-08 10:58:35 +0100 | [diff] [blame] | 17 | #include <stdio.h> |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 18 | #include <setjmp.h> |
| 19 | #include <cmocka.h> |
| 20 | |
Radek Krejci | 2d7a47b | 2019-05-16 13:34:10 +0200 | [diff] [blame] | 21 | #include <string.h> |
| 22 | |
| 23 | #include "../../src/common.h" |
| 24 | #include "../../src/context.h" |
| 25 | #include "../../src/tree_schema_internal.h" |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 26 | |
| 27 | #define BUFSIZE 1024 |
| 28 | char logbuf[BUFSIZE] = {0}; |
Radek Krejci | 3b1f929 | 2018-11-08 10:58:35 +0100 | [diff] [blame] | 29 | int store = -1; /* negative for infinite logging, positive for limited logging */ |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 30 | |
Radek Krejci | 313d990 | 2018-11-08 09:42:58 +0100 | [diff] [blame] | 31 | /* set to 0 to printing error messages to stderr instead of checking them in code */ |
| 32 | #define ENABLE_LOGGER_CHECKING 1 |
| 33 | |
Radek Krejci | 3b1f929 | 2018-11-08 10:58:35 +0100 | [diff] [blame] | 34 | #if ENABLE_LOGGER_CHECKING |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 35 | static void |
| 36 | logger(LY_LOG_LEVEL level, const char *msg, const char *path) |
| 37 | { |
| 38 | (void) level; /* unused */ |
Radek Krejci | 3b1f929 | 2018-11-08 10:58:35 +0100 | [diff] [blame] | 39 | if (store) { |
| 40 | if (path && path[0]) { |
| 41 | snprintf(logbuf, BUFSIZE - 1, "%s %s", msg, path); |
| 42 | } else { |
| 43 | strncpy(logbuf, msg, BUFSIZE - 1); |
| 44 | } |
| 45 | if (store > 0) { |
| 46 | --store; |
| 47 | } |
| 48 | } |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 49 | } |
Radek Krejci | 3b1f929 | 2018-11-08 10:58:35 +0100 | [diff] [blame] | 50 | #endif |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 51 | |
| 52 | static int |
| 53 | logger_setup(void **state) |
| 54 | { |
| 55 | (void) state; /* unused */ |
| 56 | |
| 57 | ly_set_log_clb(logger, 0); |
| 58 | |
| 59 | return 0; |
| 60 | } |
| 61 | |
Radek Krejci | a304538 | 2018-11-22 14:30:31 +0100 | [diff] [blame] | 62 | static int |
| 63 | logger_teardown(void **state) |
| 64 | { |
| 65 | (void) state; /* unused */ |
| 66 | #if ENABLE_LOGGER_CHECKING |
| 67 | if (*state) { |
| 68 | fprintf(stderr, "%s\n", logbuf); |
| 69 | } |
| 70 | #endif |
| 71 | return 0; |
| 72 | } |
| 73 | |
Radek Krejci | 313d990 | 2018-11-08 09:42:58 +0100 | [diff] [blame] | 74 | void |
| 75 | logbuf_clean(void) |
| 76 | { |
| 77 | logbuf[0] = '\0'; |
| 78 | } |
| 79 | |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 80 | #if ENABLE_LOGGER_CHECKING |
| 81 | # define logbuf_assert(str) assert_string_equal(logbuf, str) |
| 82 | #else |
| 83 | # define logbuf_assert(str) |
| 84 | #endif |
| 85 | |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 86 | static void |
| 87 | test_date(void **state) |
| 88 | { |
Radek Krejci | a304538 | 2018-11-22 14:30:31 +0100 | [diff] [blame] | 89 | *state = test_date; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 90 | |
| 91 | assert_int_equal(LY_EINVAL, lysp_check_date(NULL, NULL, 0, "date")); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 92 | logbuf_assert("Invalid argument date (lysp_check_date())."); |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 93 | assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "x", 1, "date")); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 94 | logbuf_assert("Invalid argument date_len (lysp_check_date())."); |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 95 | assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "nonsencexx", 10, "date")); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 96 | logbuf_assert("Invalid value \"nonsencexx\" of \"date\"."); |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 97 | assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "123x-11-11", 10, "date")); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 98 | logbuf_assert("Invalid value \"123x-11-11\" of \"date\"."); |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 99 | assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "2018-13-11", 10, "date")); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 100 | logbuf_assert("Invalid value \"2018-13-11\" of \"date\"."); |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 101 | assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "2018-11-41", 10, "date")); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 102 | logbuf_assert("Invalid value \"2018-11-41\" of \"date\"."); |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 103 | assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "2018-02-29", 10, "date")); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 104 | logbuf_assert("Invalid value \"2018-02-29\" of \"date\"."); |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 105 | assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "2018.02-28", 10, "date")); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 106 | logbuf_assert("Invalid value \"2018.02-28\" of \"date\"."); |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 107 | assert_int_equal(LY_EINVAL, lysp_check_date(NULL, "2018-02.28", 10, "date")); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 108 | logbuf_assert("Invalid value \"2018-02.28\" of \"date\"."); |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 109 | |
| 110 | assert_int_equal(LY_SUCCESS, lysp_check_date(NULL, "2018-11-11", 10, "date")); |
| 111 | assert_int_equal(LY_SUCCESS, lysp_check_date(NULL, "2018-02-28", 10, "date")); |
| 112 | assert_int_equal(LY_SUCCESS, lysp_check_date(NULL, "2016-02-29", 10, "date")); |
Radek Krejci | a304538 | 2018-11-22 14:30:31 +0100 | [diff] [blame] | 113 | |
| 114 | *state = NULL; |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 115 | } |
| 116 | |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 117 | static void |
| 118 | test_revisions(void **state) |
| 119 | { |
| 120 | (void) state; /* unused */ |
| 121 | |
| 122 | struct lysp_revision *revs = NULL, *rev; |
| 123 | |
Radek Krejci | 313d990 | 2018-11-08 09:42:58 +0100 | [diff] [blame] | 124 | logbuf_clean(); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 125 | /* no error, it just does nothing */ |
| 126 | lysp_sort_revisions(NULL); |
| 127 | logbuf_assert(""); |
| 128 | |
| 129 | /* revisions are stored in wrong order - the newest is the last */ |
Radek Krejci | 2c4e717 | 2018-10-19 15:56:26 +0200 | [diff] [blame] | 130 | LY_ARRAY_NEW_RET(NULL, revs, rev,); |
Radek Krejci | b7db73a | 2018-10-24 14:18:40 +0200 | [diff] [blame] | 131 | strcpy(rev->date, "2018-01-01"); |
Radek Krejci | 2c4e717 | 2018-10-19 15:56:26 +0200 | [diff] [blame] | 132 | LY_ARRAY_NEW_RET(NULL, revs, rev,); |
Radek Krejci | b7db73a | 2018-10-24 14:18:40 +0200 | [diff] [blame] | 133 | strcpy(rev->date, "2018-12-31"); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 134 | |
| 135 | assert_int_equal(2, LY_ARRAY_SIZE(revs)); |
Radek Krejci | 2c4e717 | 2018-10-19 15:56:26 +0200 | [diff] [blame] | 136 | assert_string_equal("2018-01-01", &revs[0]); |
| 137 | assert_string_equal("2018-12-31", &revs[1]); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 138 | /* the order should be fixed, so the newest revision will be the first in the array */ |
| 139 | lysp_sort_revisions(revs); |
Radek Krejci | 2c4e717 | 2018-10-19 15:56:26 +0200 | [diff] [blame] | 140 | assert_string_equal("2018-12-31", &revs[0]); |
| 141 | assert_string_equal("2018-01-01", &revs[1]); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 142 | |
Radek Krejci | 2c4e717 | 2018-10-19 15:56:26 +0200 | [diff] [blame] | 143 | LY_ARRAY_FREE(revs); |
Radek Krejci | a93621b | 2018-10-18 11:13:38 +0200 | [diff] [blame] | 144 | } |
| 145 | |
Radek Krejci | 3b1f929 | 2018-11-08 10:58:35 +0100 | [diff] [blame] | 146 | static LY_ERR test_imp_clb(const char *UNUSED(mod_name), const char *UNUSED(mod_rev), const char *UNUSED(submod_name), |
| 147 | const char *UNUSED(sub_rev), void *user_data, LYS_INFORMAT *format, |
| 148 | const char **module_data, void (**free_module_data)(void *model_data, void *user_data)) |
| 149 | { |
| 150 | *module_data = user_data; |
| 151 | *format = LYS_IN_YANG; |
| 152 | *free_module_data = NULL; |
| 153 | return LY_SUCCESS; |
| 154 | } |
| 155 | |
Radek Krejci | 313d990 | 2018-11-08 09:42:58 +0100 | [diff] [blame] | 156 | static void |
| 157 | test_typedef(void **state) |
| 158 | { |
Radek Krejci | a304538 | 2018-11-22 14:30:31 +0100 | [diff] [blame] | 159 | *state = test_typedef; |
Radek Krejci | 313d990 | 2018-11-08 09:42:58 +0100 | [diff] [blame] | 160 | |
| 161 | struct ly_ctx *ctx = NULL; |
| 162 | const char *str; |
| 163 | |
| 164 | assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIRS, &ctx)); |
| 165 | |
Radek Krejci | 3b1f929 | 2018-11-08 10:58:35 +0100 | [diff] [blame] | 166 | str = "module a {namespace urn:a; prefix a; typedef binary {type string;}}"; |
| 167 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 168 | logbuf_assert("Invalid name \"binary\" of typedef - name collision with a built-in type."); |
| 169 | str = "module a {namespace urn:a; prefix a; typedef bits {type string;}}"; |
| 170 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 171 | logbuf_assert("Invalid name \"bits\" of typedef - name collision with a built-in type."); |
| 172 | str = "module a {namespace urn:a; prefix a; typedef boolean {type string;}}"; |
| 173 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 174 | logbuf_assert("Invalid name \"boolean\" of typedef - name collision with a built-in type."); |
| 175 | str = "module a {namespace urn:a; prefix a; typedef decimal64 {type string;}}"; |
| 176 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 177 | logbuf_assert("Invalid name \"decimal64\" of typedef - name collision with a built-in type."); |
| 178 | str = "module a {namespace urn:a; prefix a; typedef empty {type string;}}"; |
| 179 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 180 | logbuf_assert("Invalid name \"empty\" of typedef - name collision with a built-in type."); |
| 181 | str = "module a {namespace urn:a; prefix a; typedef enumeration {type string;}}"; |
| 182 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 183 | logbuf_assert("Invalid name \"enumeration\" of typedef - name collision with a built-in type."); |
| 184 | str = "module a {namespace urn:a; prefix a; typedef int8 {type string;}}"; |
| 185 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 186 | logbuf_assert("Invalid name \"int8\" of typedef - name collision with a built-in type."); |
| 187 | str = "module a {namespace urn:a; prefix a; typedef int16 {type string;}}"; |
| 188 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 189 | logbuf_assert("Invalid name \"int16\" of typedef - name collision with a built-in type."); |
| 190 | str = "module a {namespace urn:a; prefix a; typedef int32 {type string;}}"; |
| 191 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 192 | logbuf_assert("Invalid name \"int32\" of typedef - name collision with a built-in type."); |
| 193 | str = "module a {namespace urn:a; prefix a; typedef int64 {type string;}}"; |
| 194 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 195 | logbuf_assert("Invalid name \"int64\" of typedef - name collision with a built-in type."); |
| 196 | str = "module a {namespace urn:a; prefix a; typedef instance-identifier {type string;}}"; |
| 197 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 198 | logbuf_assert("Invalid name \"instance-identifier\" of typedef - name collision with a built-in type."); |
| 199 | str = "module a {namespace urn:a; prefix a; typedef identityref {type string;}}"; |
| 200 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 201 | logbuf_assert("Invalid name \"identityref\" of typedef - name collision with a built-in type."); |
| 202 | str = "module a {namespace urn:a; prefix a; typedef leafref {type string;}}"; |
| 203 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 204 | logbuf_assert("Invalid name \"leafref\" of typedef - name collision with a built-in type."); |
| 205 | str = "module a {namespace urn:a; prefix a; typedef string {type int8;}}"; |
| 206 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 207 | logbuf_assert("Invalid name \"string\" of typedef - name collision with a built-in type."); |
| 208 | str = "module a {namespace urn:a; prefix a; typedef union {type string;}}"; |
| 209 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 210 | logbuf_assert("Invalid name \"union\" of typedef - name collision with a built-in type."); |
| 211 | str = "module a {namespace urn:a; prefix a; typedef uint8 {type string;}}"; |
| 212 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 213 | logbuf_assert("Invalid name \"uint8\" of typedef - name collision with a built-in type."); |
| 214 | str = "module a {namespace urn:a; prefix a; typedef uint16 {type string;}}"; |
| 215 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 216 | logbuf_assert("Invalid name \"uint16\" of typedef - name collision with a built-in type."); |
| 217 | str = "module a {namespace urn:a; prefix a; typedef uint32 {type string;}}"; |
| 218 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 219 | logbuf_assert("Invalid name \"uint32\" of typedef - name collision with a built-in type."); |
| 220 | str = "module a {namespace urn:a; prefix a; typedef uint64 {type string;}}"; |
| 221 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 222 | logbuf_assert("Invalid name \"uint64\" of typedef - name collision with a built-in type."); |
| 223 | |
| 224 | str = "module mytypes {namespace urn:types; prefix t; typedef binary_ {type string;} typedef bits_ {type string;} typedef boolean_ {type string;} " |
| 225 | "typedef decimal64_ {type string;} typedef empty_ {type string;} typedef enumeration_ {type string;} typedef int8_ {type string;} typedef int16_ {type string;}" |
| 226 | "typedef int32_ {type string;} typedef int64_ {type string;} typedef instance-identifier_ {type string;} typedef identityref_ {type string;}" |
| 227 | "typedef leafref_ {type string;} typedef string_ {type int8;} typedef union_ {type string;} typedef uint8_ {type string;} typedef uint16_ {type string;}" |
| 228 | "typedef uint32_ {type string;} typedef uint64_ {type string;}}"; |
| 229 | assert_non_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 230 | |
Radek Krejci | 313d990 | 2018-11-08 09:42:58 +0100 | [diff] [blame] | 231 | str = "module a {namespace urn:a; prefix a; typedef test {type string;} typedef test {type int8;}}"; |
| 232 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 233 | logbuf_assert("Invalid name \"test\" of typedef - name collision with another top-level type."); |
| 234 | |
| 235 | str = "module a {namespace urn:a; prefix a; typedef x {type string;} container c {typedef x {type int8;}}}"; |
| 236 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 237 | logbuf_assert("Invalid name \"x\" of typedef - scoped type collide with a top-level type."); |
| 238 | |
| 239 | str = "module a {namespace urn:a; prefix a; container c {container d {typedef y {type int8;}} typedef y {type string;}}}"; |
| 240 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 241 | logbuf_assert("Invalid name \"y\" of typedef - name collision with another scoped type."); |
| 242 | |
Radek Krejci | 3b1f929 | 2018-11-08 10:58:35 +0100 | [diff] [blame] | 243 | str = "module a {namespace urn:a; prefix a; container c {typedef y {type int8;} typedef y {type string;}}}"; |
| 244 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 245 | logbuf_assert("Invalid name \"y\" of typedef - name collision with sibling type."); |
| 246 | |
| 247 | ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule b {belongs-to a {prefix a;} typedef x {type string;}}"); |
| 248 | str = "module a {namespace urn:a; prefix a; include b; typedef x {type int8;}}"; |
| 249 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 250 | logbuf_assert("Invalid name \"x\" of typedef - name collision with another top-level type."); |
| 251 | |
| 252 | ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule b {belongs-to a {prefix a;} container c {typedef x {type string;}}}"); |
| 253 | str = "module a {namespace urn:a; prefix a; include b; typedef x {type int8;}}"; |
| 254 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 255 | logbuf_assert("Invalid name \"x\" of typedef - scoped type collide with a top-level type."); |
| 256 | |
| 257 | ly_ctx_set_module_imp_clb(ctx, test_imp_clb, "submodule b {belongs-to a {prefix a;} typedef x {type int8;}}"); |
| 258 | str = "module a {namespace urn:a; prefix a; include b; container c {typedef x {type string;}}}"; |
| 259 | assert_null(lys_parse_mem(ctx, str, LYS_IN_YANG)); |
| 260 | logbuf_assert("Invalid name \"x\" of typedef - scoped type collide with a top-level type."); |
| 261 | |
Radek Krejci | a304538 | 2018-11-22 14:30:31 +0100 | [diff] [blame] | 262 | *state = NULL; |
Radek Krejci | 313d990 | 2018-11-08 09:42:58 +0100 | [diff] [blame] | 263 | ly_ctx_destroy(ctx, NULL); |
| 264 | } |
| 265 | |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 266 | int main(void) |
| 267 | { |
| 268 | const struct CMUnitTest tests[] = { |
Radek Krejci | a304538 | 2018-11-22 14:30:31 +0100 | [diff] [blame] | 269 | cmocka_unit_test_setup_teardown(test_date, logger_setup, logger_teardown), |
Radek Krejci | 9ea8ca1 | 2019-06-10 13:11:55 +0200 | [diff] [blame] | 270 | cmocka_unit_test_setup_teardown(test_revisions, logger_setup, logger_teardown), |
Radek Krejci | a304538 | 2018-11-22 14:30:31 +0100 | [diff] [blame] | 271 | cmocka_unit_test_setup_teardown(test_typedef, logger_setup, logger_teardown), |
Radek Krejci | 86d106e | 2018-10-18 09:53:19 +0200 | [diff] [blame] | 272 | }; |
| 273 | |
| 274 | return cmocka_run_group_tests(tests, NULL, NULL); |
| 275 | } |