[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 04/16] mg-debug-fail: New utility script for debugging
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- v2: Use "egrep ''" rather than "egrep .". Both sanitise missing-final-newline but "egrep ''" will print blank lines, which is desirable here. --- mg-debug-fail | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 mg-debug-fail diff --git a/mg-debug-fail b/mg-debug-fail new file mode 100755 index 0000000..a163aef --- /dev/null +++ b/mg-debug-fail @@ -0,0 +1,13 @@ +#!/bin/sh +# +# This script can be provided anywhere an executable or command name is +# wanted. It prints its arguments, and its stdin, to its stderr, and +# then exits nonzero. +# +# When using this it may be useful to provide </dev/null as a +# redirection for the whole program under test. Otherwise things +# can mysteriously hang. + +bash -xc ': mg-debug-fail "$@"' x "$@" +egrep '' >&2 +exit 127 -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |