test BUGFIX skip access test if executed as root
Fixes
#include <setjmp.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <unistd.h>
+#include <sys/types.h>
#include <cmocka.h>
#include <libyang/libyang.h>
@@ -156,6 +158,11 @@ test_no_read_access(void **state)
struct lyd_node *data;
int ret;
+ if (!geteuid()) {
+ /* test does not work for root */
+ return;
+ }
+
/* set no permissions for default module */
ret = sr_set_module_access(st->conn, "defaults", NULL, NULL, 00200);
assert_int_equal(ret, SR_ERR_OK);
