Jan Smets (via #svn IRC)


Inspired
r1486046

r1486046 | stsp | 2013-05-24 13:16:40 +0000 (Fri, 24 May 2013)

Make the output of 'svnadmin crashtest' less misleading.

It used to print a message such as:

  $ svnadmin crashtest repos 
  subversion/svnadmin/svnadmin.c:631: (apr_err=SVN_ERR_ASSERTION_FAIL)
  svn: E235000: In file 'subversion/svnadmin/svnadmin.c' line 631: internal malfunction
  Abort trap (core dumped) 

This makes it hard to tell whether the program operated as expected.
It can also be surprising for users who don't know the purpose of
the crashtest command.

Instead, print the following:

  $ svnadmin crashtest repos 
  Successfully opened repository 'repos'.
  Will now crash to simulate a crashing server process.
  Abort trap (core dumped) 

Inspired by: Jan Smets (via #svn IRC)

* subversion/svnadmin/svnadmin.c
  (crashtest_malfunction_handler): New. Just calls abort() and unlike the
   default malfunction handler it doesn't print anything.
  (subcommand_crashtest): Install the new custom malfunction handler.
   Print an informative message after opening the repository, before crashing.