Hi Kamesh,
I have created a new thread in order to prevent the confusion about the
test case. I have tweaked the test case as you mentioned in the previous
thread.
Here is the link for the same...
http://mail-archives.apache.org/mod_mbox/subversion-dev/201102.mbox/%3c0213965108dead48960ce83455e07dff0192b...@maa-exchmb.maa.corp.collab.net%3E
Thank you for your valuable suggestions.
I hope this test case would make things a bit more clear.
I have attached the patch and the log message with this mail. Please
share your views.
Thanks and regards
Prabhu
Index: subversion/tests/cmdline/authz_tests.py
===================================================================
--- subversion/tests/cmdline/authz_tests.py (revision 1067090)
+++ subversion/tests/cmdline/authz_tests.py (working copy)
@@ -1060,6 +1060,98 @@
[], 'ls', '-R',
sbox.repo_url)
+def case_sensitive_authz(sbox):
+ "authz issue #3781, check case sensitiveness"
+
+ sbox.build()
+
+ wc_dir = sbox.wc_dir
+ write_restrictive_svnserve_conf(sbox.repo_dir)
+
+ mu_path = os.path.join(wc_dir, 'A', 'mu')
+ mu_url = sbox.repo_url + '/A/mu'
+ mu_repo_path = sbox.repo_dir + "/A/mu"
+ svntest.main.file_append(mu_path, "hi")
+
+ # Create expected output tree.
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/mu' : Item(verb='Sending'),
+ })
+
+ # error messages
+ expected_error_for_commit = "Commit failed"
+ expected_error_for_cat = "svn: E175013: Unable to connect to a repository" + \
+ " at URL '" + mu_url + "'\n" + \
+ "svn: E175013: Access to '/" + mu_repo_path + \
+ "' forbidden\n" + \
+ "svn: E175009: XML parsing failed: (403 Forbidden)"
+
+ # test the case-sensitivity of the path inside the repo
+ write_authz_file(sbox, {"/": "jrandom = r",
+ "/A/mu": "jrandom =", "/a/Mu": "jrandom = rw"})
+ svntest.actions.run_and_verify_svn2(None, None,
+ expected_error_for_cat,
+ 1, 'cat', mu_url)
+
+ write_authz_file(sbox, {"/": "jrandom = r",
+ "/A": "jrandom = r",
+ "/a/Mu": "jrandom = rw"})
+ # Commit the file.
+ svntest.actions.run_and_verify_commit(wc_dir,
+ None,
+ None,
+ expected_error_for_commit,
+ mu_path)
+
+ def mixcases(repo_name):
+ mixed_repo_name = ''
+ for i in range(0, len(repo_name)):
+ if i % 2 == 0:
+ mixed_val = repo_name[i].upper()
+ mixed_repo_name = mixed_repo_name + mixed_val
+ else:
+ mixed_val = repo_name[i].lower()
+ mixed_repo_name = mixed_repo_name + mixed_val
+ return mixed_repo_name
+
+ mixed_case_repo_dir = mixcases(os.path.basename(sbox.repo_dir))
+
+ # test the case-sensitivity of the repo name
+ write_authz_file(sbox, {}, sections = {mixed_case_repo_dir + ":/": "jrandom = r",
+ mixed_case_repo_dir + ":/A": "jrandom = r",
+ sbox.repo_dir + ":/A/mu": "jrandom =",
+ mixed_case_repo_dir + ":/A/mu": "jrandom = rw"})
+ svntest.actions.run_and_verify_svn2(None, None,
+ expected_error_for_cat,
+ 1, 'cat', mu_url)
+
+ write_authz_file(sbox, {}, sections = {mixed_case_repo_dir + ":/": "jrandom = r",
+ mixed_case_repo_dir + ":/A": "jrandom = r",
+ mixed_case_repo_dir + ":/A/mu": "jrandom = rw"})
+
+ svntest.main.file_append(mu_path, "hi")
+ # Commit the file again.
+ svntest.actions.run_and_verify_commit(wc_dir,
+ None,
+ None,
+ expected_error_for_commit,
+ mu_path)
+
+ # test the case-sensitivity
+ write_authz_file(sbox, {"/": "jrandom = r",
+ "/A": "jrandom = r", "/A/mu": "jrandom = rw"})
+
+ svntest.main.file_append(mu_path, "hi")
+ svntest.actions.run_and_verify_svn2('No error',
+ svntest.verify.AnyOutput, [],
+ 0, 'cat', mu_url)
+ # Commit the file.
+ svntest.actions.run_and_verify_commit(wc_dir,
+ expected_output,
+ None,
+ None,
+ mu_path)
+
########################################################################
# Run the tests
@@ -1092,6 +1184,8 @@
Skip(wc_wc_copy_revert, svntest.main.is_ra_type_file),
Skip(authz_recursive_ls,
svntest.main.is_ra_type_file),
+ XFail(Skip(case_sensitive_authz,
+ svntest.main.is_ra_type_file)),
]
serial_only = True
[[[
XFail testcase for the issue 3781
* subversion/tests/cmdline/authz_tests.py
(case_sensitive_authz, test_list): New XFail test for the issue 3781
Patch by: Prabhu Gnana Sundar <prabhugs{_AT_}collab.net>
Reviewed by: Kamesh Jayachandran <kamesh{_AT_}collab.net>
]]]