summaryrefslogtreecommitdiff
path: root/subversion/tests/libsvn_repos
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/tests/libsvn_repos')
-rw-r--r--subversion/tests/libsvn_repos/authz-test.c39
-rw-r--r--subversion/tests/libsvn_repos/dump-load-test.c4
-rw-r--r--subversion/tests/libsvn_repos/repos-test.c2
3 files changed, 40 insertions, 5 deletions
diff --git a/subversion/tests/libsvn_repos/authz-test.c b/subversion/tests/libsvn_repos/authz-test.c
index 6ee2448..1f6a4dd 100644
--- a/subversion/tests/libsvn_repos/authz-test.c
+++ b/subversion/tests/libsvn_repos/authz-test.c
@@ -277,9 +277,9 @@ test_authz_parse(const svn_test_opts_t *opts,
printf("[users]\n");
if (authz->has_anon_rights)
- print_user_rights(NULL, NULL, 0, &authz->anon_rights, pool);
+ SVN_ERR(print_user_rights(NULL, NULL, 0, &authz->anon_rights, pool));
if (authz->has_authn_rights)
- print_user_rights(NULL, NULL, 0, &authz->authn_rights, pool);
+ SVN_ERR(print_user_rights(NULL, NULL, 0, &authz->authn_rights, pool));
SVN_ERR(svn_iter_apr_hash(NULL, authz->user_rights,
print_user_rights, NULL, pool));
printf("\n\n");
@@ -478,6 +478,39 @@ issue_4741_groups(apr_pool_t *pool)
return SVN_NO_ERROR;
}
+static svn_error_t *
+reposful_reposless_stanzas_inherit(apr_pool_t *pool)
+{
+ const char rules[] =
+ "[groups]" NL
+ "company = user1, user2, user3" NL
+ "customer = customer1, customer2" NL
+ "" NL
+ "# company can read-write on everything" NL
+ "[/]" NL
+ "@company = rw" NL
+ "" NL
+ "[project1:/]" NL
+ "@customer = r" NL
+ "" NL
+ "[project2:/]" NL;
+
+ svn_stringbuf_t *buf = svn_stringbuf_create(rules, pool);
+ svn_stream_t *stream = svn_stream_from_stringbuf(buf, pool);
+ svn_authz_t *authz;
+ svn_boolean_t access_granted;
+
+ SVN_ERR(svn_repos_authz_parse(&authz, stream, NULL, pool));
+
+ SVN_ERR(svn_repos_authz_check_access(authz, "project1", "/foo", "user1",
+ svn_authz_write | svn_authz_recursive,
+ &access_granted,
+ pool));
+ SVN_TEST_ASSERT(access_granted == TRUE);
+
+ return SVN_NO_ERROR;
+}
+
static int max_threads = 4;
static struct svn_test_descriptor_t test_funcs[] =
@@ -489,6 +522,8 @@ static struct svn_test_descriptor_t test_funcs[] =
"test svn_authz__get_global_rights"),
SVN_TEST_PASS2(issue_4741_groups,
"issue 4741 groups"),
+ SVN_TEST_XFAIL2(reposful_reposless_stanzas_inherit,
+ "[foo:/] inherits [/]"),
SVN_TEST_NULL
};
diff --git a/subversion/tests/libsvn_repos/dump-load-test.c b/subversion/tests/libsvn_repos/dump-load-test.c
index 6940c85..e7450df 100644
--- a/subversion/tests/libsvn_repos/dump-load-test.c
+++ b/subversion/tests/libsvn_repos/dump-load-test.c
@@ -81,7 +81,7 @@ test_dump_bad_props(svn_stringbuf_t **dump_data_p,
notify_func, notify_baton,
NULL, NULL, NULL, NULL,
pool));
- svn_stream_close(stream);
+ SVN_ERR(svn_stream_close(stream));
/* Check that the property appears in the dump data */
expected_str = apr_psprintf(pool, "K %d\n%s\n"
@@ -131,7 +131,7 @@ test_load_bad_props(svn_stringbuf_t *dump_data,
notify_func, notify_baton,
NULL, NULL, /*cancellation*/
pool));
- svn_stream_close(stream);
+ SVN_ERR(svn_stream_close(stream));
/* Check the loaded property */
fs = svn_repos_fs(repos);
diff --git a/subversion/tests/libsvn_repos/repos-test.c b/subversion/tests/libsvn_repos/repos-test.c
index 8d5472c..63b76e1 100644
--- a/subversion/tests/libsvn_repos/repos-test.c
+++ b/subversion/tests/libsvn_repos/repos-test.c
@@ -4461,7 +4461,7 @@ test_list(const svn_test_opts_t *opts,
SVN_ERR(svn_repos_list(rev_root, "/A", patterns, svn_depth_infinity, FALSE,
NULL, NULL, list_callback, &counter, NULL, NULL,
pool));
- SVN_TEST_ASSERT(counter == 6);
+ SVN_TEST_ASSERT(counter == 7);
return SVN_NO_ERROR;
}