subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1728463 - /subversion/trunk/subversion/tests/svn_test_main.c
Date Thu, 04 Feb 2016 13:02:39 GMT
Author: philip
Date: Thu Feb  4 13:02:39 2016
New Revision: 1728463

URL: http://svn.apache.org/viewvc?rev=1728463&view=rev
Log:
Revert r1728324 in preparation for fix that works.

* subversion/tests/svn_test_main.c
  (call_setjmp, do_test_num): Revert.

Modified:
    subversion/trunk/subversion/tests/svn_test_main.c

Modified: subversion/trunk/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_main.c?rev=1728463&r1=1728462&r2=1728463&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/svn_test_main.c (original)
+++ subversion/trunk/subversion/tests/svn_test_main.c Thu Feb  4 13:02:39 2016
@@ -393,16 +393,6 @@ log_results(const char *progname,
   return test_failed;
 }
 
-/* This function exists so that automatic variables in the calling
-   function are peserved.  At the time of writing 'err' and 'test_num'
-   in 'do_test_num()' were in danger of being clobbered by a direct
-   setjmp() call. */
-static int call_setjmp(jmp_buf env)
-{
-  return setjmp(env);
-}
-
-
 /* Execute a test number TEST_NUM.  Pretty-print test name and dots
    according to our test-suite spec, and return the result code.
    If HEADER_MSG and *HEADER_MSG are not NULL, print *HEADER_MSG prior
@@ -424,11 +414,9 @@ do_test_num(const char *progname,
   svn_boolean_t run_this_test; /* This test's mode matches DESC->MODE. */
   enum svn_test_mode_t test_mode;
 
-  /* This allows './some-test -- -1' to run the last test. */
+  /* Check our array bounds! */
   if (test_num < 0)
     test_num += array_size + 1;
-
-  /* Check our array bounds! */
   if ((test_num > array_size) || (test_num <= 0))
     {
       if (header_msg && *header_msg)
@@ -470,7 +458,7 @@ do_test_num(const char *progname,
      so we don't end up in an infinite loop.
 
      If we've got non-zero from setjmp(), we know we've crashed. */
-  if (call_setjmp(jump_buffer) == 0)
+  if (setjmp(jump_buffer) == 0)
     {
       /* Do test */
       if (msg_only || skip || !run_this_test)



Mime
View raw message