Re: [PATCH] lib-httpd.sh: print error.log on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 13, 2016 at 06:40:14PM +0700, Duy Nguyen wrote:

> I like the verbose route, so here's v2

I think this is OK, though...

> diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
> index f9f3e5f..67bc7ad 100644
> --- a/t/lib-httpd.sh
> +++ b/t/lib-httpd.sh
> @@ -180,6 +180,8 @@ start_httpd() {
>  	if test $? -ne 0
>  	then
>  		trap 'die' EXIT
> +		test "$verbose" = t && \
> +			cat "$HTTPD_ROOT_PATH"/error.log 2>/dev/null

I think you can just spell this:

  cat >&4 ...

(I had originally thought that we set up those fds only inside the
test_expect blocks, but it is the redirection 2>&4 that we set up there;
you can always use fd 4 as necessary).

It does incur a useless "cat" when we are not verbose, but I don't think
that's a big deal for the error path like this.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]