Re: [PATCH 01/11] t: prevent '-x' tracing from interfering with test helpers' stderr

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

 



On Sat, Feb 24, 2018 at 12:39 AM, SZEDER Gábor <szeder.dev@xxxxxxxxx> wrote:

>   - Duplicate stderr of the tested command executed in the test helper
>     function from the function's fd 7 (see next point), to ensure that
>     the tested command's error messages go to a different fd than the
>     '-x' trace of the commands executed in the function.
>
>   - Duplicate the test helper function's fd 7 from the function's
>     original stderr, meaning that, after taking a detour through fd 7,
>     the error messages of the tested command do end up on the
>     function's original stderr.

> diff --git a/t/lib-terminal.sh b/t/lib-terminal.sh
> index cd220e378e..b3acb4c6f8 100644
> --- a/t/lib-terminal.sh
> +++ b/t/lib-terminal.sh
> @@ -9,8 +9,8 @@ test_terminal () {
>                 echo >&4 "test_terminal: need to declare TTY prerequisite"
>                 return 127
>         fi
> -       perl "$TEST_DIRECTORY"/test-terminal.perl "$@"
> -}
> +       perl "$TEST_DIRECTORY"/test-terminal.perl "$@" 2>&9
> +} 9>&2 2>&4

Oops, these should duplicate from/to fd 7, not fd 9.




[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]

  Powered by Linux