You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2012/01/06 19:51:52 UTC
svn commit: r1228340 -
/subversion/trunk/subversion/tests/cmdline/externals_tests.py
Author: pburba
Date: Fri Jan 6 18:51:51 2012
New Revision: 1228340
URL: http://svn.apache.org/viewvc?rev=1228340&view=rev
Log:
Add test for issue #4093 'remapping a file external can segfault due to
"deleted" props'.
* subversion/tests/cmdline/externals_tests.py
(remap_file_external_with_prop_del): New.
Modified:
subversion/trunk/subversion/tests/cmdline/externals_tests.py
Modified: subversion/trunk/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/externals_tests.py?rev=1228340&r1=1228339&r2=1228340&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Fri Jan 6 18:51:51 2012
@@ -2670,6 +2670,40 @@ def shadowing(sbox):
if not raised:
raise svntest.Failure("Creating conflicting child 'C' of 'A' didn't error")
+# Test for issue #4093 'remapping a file external can segfault due to
+# "deleted" props'.
+@Issue(4093)
+@XFail()
+def remap_file_external_with_prop_del(sbox):
+ "file external remap segfaults due to deleted props"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ A_path = os.path.join(wc_dir, "A")
+ mu_path = os.path.join(wc_dir, "A", "mu")
+
+ # Add a property to A/mu
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'ps', 'propname', 'propval', mu_path)
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'commit', '-m', 'New property on a file',
+ wc_dir)
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+
+ # Add a new file external A/external pointing to ^/A/mu
+ externals_prop = "^/A/mu external\n"
+ change_external(A_path, externals_prop)
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
+
+ # Change A/external to point to ^/iota
+ externals_prop = "^/iota external\n"
+ change_external(A_path, externals_prop)
+
+ # Now update to bring the new external down.
+ # This currently segfaults as described in
+ # http://subversion.tigris.org/issues/show_bug.cgi?id=4093#desc1
+ svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir)
########################################################################
# Run the tests
@@ -2715,6 +2749,7 @@ test_list = [ None,
include_externals,
include_immediate_dir_externals,
shadowing,
+ remap_file_external_with_prop_del,
]
if __name__ == '__main__':