On Fri, 2015-12-04 at 19:35 +0000, Ian Jackson wrote:
> Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
> ---
>  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..64fa235
> --- /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.

"egrep . - /dev/null" is too noisy, it adds a "(standard input):" prefix
which I don't think you want. But "egrep -h . - /dev/null" seems to remedy
this without the possibility of these mysterious hangs.

What do you think?

Also, what does egrep give us here over just cat?

> +
> +bash -xc ': mg-debug-fail "$@"' x "$@"
> +egrep . >&2
> +exit 127

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to