[26601] in CVS-changelog-for-Kerberos-V5
krb5 commit: Allow daemon debugging in k5test.py
daemon@ATHENA.MIT.EDU (Greg Hudson)
Wed Jun 6 11:23:47 2012
Date: Wed, 6 Jun 2012 11:23:44 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201206061523.q56FNiYh032441@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/dacb62f899329496f84e8b4bbc4c4dc94e585bd1
commit dacb62f899329496f84e8b4bbc4c4dc94e585bd1
Author: Greg Hudson <ghudson@mit.edu>
Date: Wed Jun 6 11:23:19 2012 -0400
Allow daemon debugging in k5test.py
Allow --debug to be used for commands which start daemons, to make it
easier to debug startup issues. After debugging a daemon, the script
will exit, since the daemon won't be running after the debugging
session is over.
src/util/k5test.py | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/util/k5test.py b/src/util/k5test.py
index 5adfc95..f60cb5d 100644
--- a/src/util/k5test.py
+++ b/src/util/k5test.py
@@ -395,10 +395,9 @@ def _onexit():
if not verbose:
print 'See testlog for details, or re-run with -v flag.'
print
- print 'Use --debug=NUM to run a command (other than a daemon) under a'
- print 'debugger. Use --stop-after=NUM to stop after a daemon is'
- print 'started in order to attach to it with a debugger. Use --help'
- print 'to see other options.'
+ print 'Use --debug=NUM to run a command under a debugger. Use'
+ print '--stop-after=NUM to stop after a daemon is started in order to'
+ print 'attach to it with a debugger. Use --help to see other options.'
# Find the parent of dir which is at the root of a build or source directory.
def _find_root(dir):
@@ -638,9 +637,12 @@ def _start_daemon(args, env, sentinel):
global null_input, _cmd_index, _debug
global _stop_before, _stop_after, _shell_before, _shell_after
- # Make this non-fatal so that --debug=all works.
if (_match_cmdnum(_debug, _cmd_index)):
- output('*** [%d] Cannot run daemon in debugger\n' % _cmd_index, True)
+ output('*** [%d] Warning: ' % _cmd_index, True)
+ output( 'test script cannot proceed after debugging a daemon\n', True)
+ _debug_cmd(args, env, None)
+ output('*** Exiting after debugging daemon\n', True)
+ sys.exit(1)
args = _valgrind(args)
output('*** [%d] Starting: %s\n' %
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5