You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Madan U Sreenivasan <ma...@collab.net> on 2005/02/14 12:53:32 UTC

[patch] Issue #601 regression tests in trans_tests.py


Re: [patch] Issue #601 regression tests in trans_tests.py

Posted by kf...@collab.net.
Madan U Sreenivasan <ma...@collab.net> writes:
> > +def propset_commit_otherwc_checkout(sbox):
> [...]
> > +def propset_revert(sbox):
> [...]
> 
> Pl. note : The function names given in the logs and the functions in
> trans_tests.py differ....

Thank you -- that's my fault, I changed them in trans_tests.py but
didn't update the log.

Fixed now.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [patch] Issue #601 regression tests in trans_tests.py

Posted by Madan U Sreenivasan <ma...@collab.net>.
> +def propset_commit_otherwc_checkout(sbox):
[...]
> +def propset_revert(sbox):
[...]

Pl. note : The function names given in the logs and the functions in
trans_tests.py differ....


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [patch] Issue #601 regression tests in trans_tests.py

Posted by kf...@collab.net.
Madan U Sreenivasan <ma...@collab.net> writes:
> Sure, Karl.... thanks for the inputs, Philip.
> > btw, Karl... the below is from the comments removed in r13027
> > -#   1. Ben encountered this:
> > -#      Create a greek tree, commit a keyword into one file,
> > -#      then commit a keyword property (i.e., turn on keywords), then
> > -#      try to check out head somewhere else.  See seg fault.
> > I wanted to use try: .... except OSError:... for this. But this has
> > not gone into r13027... I think the last line of the above comment
> > would need to use the try...except block. What do you think?

(I think there's an extra level of quoting in your mail?)

Well, Ben's comment doesn't say whether the seg fault happens before
or after the checkout succeeds in creating a working copy.  If after,
then it's going to be hard to detect -- we don't have a portable way
to detect a seg fault in the test suite, as I understand it.  But if
you look for the correct wc on disk, and the correct output from
checkout, I think that would be a pretty good indication that things
had gone okay.

-Karl


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [patch] Issue #601 regression tests in trans_tests.py

Posted by Madan U Sreenivasan <ma...@collab.net>.
kfogel@collab.net wrote:

>Philip Martin <ph...@codematters.co.uk> writes:
>  
>
>>Madan U Sreenivasan <ma...@collab.net> writes:
>>
>>    
>>
>>>+#----------------------------------------------------------------------
>>>+# Regression test described in issue #601.  
>>>+#      Add the keyword property to a file, svn revert the file, see
>>>+#      error.
>>>+def propset_revert(sbox):
>>>+  "propset, revert"
>>>+
>>>+  sbox.build()
>>>+  wc_dir = sbox.wc_dir
>>>+  mu_path = os.path.join(wc_dir, 'A', 'mu')
>>>+
>>>+  # Set the Rev keyword for the mu file
>>>+  svntest.actions.run_and_verify_svn(None, None, [],
>>>+                                     'propset', 'svn:keywords', 'Rev', mu_path)
>>>+
>>>+  # Revert the propset
>>>+  svntest.actions.run_and_verify_svn(None, None, [], 'revert', mu_path)
>>>      
>>>
>>As written it's a bit of a weak test, I'd prefer to see a call to
>>run_and_verify_status after the propset and another one after the
>>revert, that would provide a stronger guarantee that the revert is
>>making a change.  You could also check the revert output message.
>>    
>>
>
>Madan, want to write a patch against the test as committed in r13027?
>
>(I agree with Philip's comments; I should have said the same thing
>myself when I reviewed it in fact.)
>
>-Karl
>  
>

Sure, Karl.... thanks for the inputs, Philip.
> btw, Karl... the below is from the comments removed in r13027
> 
> -#   1. Ben encountered this:
> -#      Create a greek tree, commit a keyword into one file,
> -#      then commit a keyword property (i.e., turn on keywords), then
> -#      try to check out head somewhere else.  See seg fault.
> 
> I wanted to use try: .... except OSError:... for this. But this has
> not gone into r13027... I think the last line of the above comment
> would need to use the try...except block. What do you think?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [patch] Issue #601 regression tests in trans_tests.py

Posted by kf...@collab.net.
Philip Martin <ph...@codematters.co.uk> writes:
> Madan U Sreenivasan <ma...@collab.net> writes:
> 
> > +#----------------------------------------------------------------------
> > +# Regression test described in issue #601.  
> > +#      Add the keyword property to a file, svn revert the file, see
> > +#      error.
> > +def propset_revert(sbox):
> > +  "propset, revert"
> > +
> > +  sbox.build()
> > +  wc_dir = sbox.wc_dir
> > +  mu_path = os.path.join(wc_dir, 'A', 'mu')
> > +
> > +  # Set the Rev keyword for the mu file
> > +  svntest.actions.run_and_verify_svn(None, None, [],
> > +                                     'propset', 'svn:keywords', 'Rev', mu_path)
> > +
> > +  # Revert the propset
> > +  svntest.actions.run_and_verify_svn(None, None, [], 'revert', mu_path)
> 
> As written it's a bit of a weak test, I'd prefer to see a call to
> run_and_verify_status after the propset and another one after the
> revert, that would provide a stronger guarantee that the revert is
> making a change.  You could also check the revert output message.

Madan, want to write a patch against the test as committed in r13027?

(I agree with Philip's comments; I should have said the same thing
myself when I reviewed it in fact.)

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [patch] Issue #601 regression tests in trans_tests.py

Posted by Philip Martin <ph...@codematters.co.uk>.
Madan U Sreenivasan <ma...@collab.net> writes:

> +#----------------------------------------------------------------------
> +# Regression test described in issue #601.  
> +#      Add the keyword property to a file, svn revert the file, see
> +#      error.
> +def propset_revert(sbox):
> +  "propset, revert"
> +
> +  sbox.build()
> +  wc_dir = sbox.wc_dir
> +  mu_path = os.path.join(wc_dir, 'A', 'mu')
> +
> +  # Set the Rev keyword for the mu file
> +  svntest.actions.run_and_verify_svn(None, None, [],
> +                                     'propset', 'svn:keywords', 'Rev', mu_path)
> +
> +  # Revert the propset
> +  svntest.actions.run_and_verify_svn(None, None, [], 'revert', mu_path)

As written it's a bit of a weak test, I'd prefer to see a call to
run_and_verify_status after the propset and another one after the
revert, that would provide a stronger guarantee that the revert is
making a change.  You could also check the revert output message.

> +
>  ########################################################################
>  # Run the tests
>  
> @@ -668,6 +730,8 @@
>                keyword_expanded_on_checkout,
>                cat_keyword_expansion,
>                copy_propset_commit,
> +              propset_commit_otherwc_checkout,
> +              propset_revert, 
>               ]

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org