[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180327.105222.1915196048004252156.davem@davemloft.net>
Date: Tue, 27 Mar 2018 10:52:22 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: lucasb@...atatu.com
Cc: netdev@...r.kernel.org, kernel@...atatu.com, jhs@...atatu.com,
xiyou.wangcong@...il.com, jiri@...nulli.us
Subject: Re: [PATCH net-next 1/1] tc-testing: Correct compound statements
for namespace execution
From: Lucas Bates <lucasb@...atatu.com>
Date: Mon, 26 Mar 2018 10:46:14 -0400
> If tdc is executing test cases inside a namespace, only the
> first command in a compound statement will be executed inside
> the namespace by tdc. As a result, the subsequent commands
> are not executed inside the namespace and the test will fail.
>
> Example:
>
> for i in {x..y}; do args="foo"; done && tc actions add $args
>
> The namespace execution feature will prepend 'ip netns exec'
> to the command:
>
> ip netns exec tcut for i in {x..y}; do args="foo"; done && \
> tc actions add $args
>
> So the actual tc command is not parsed by the shell as being
> part of the namespace execution.
>
> Enclosing these compound statements inside a bash invocation
> with proper escape characters resolves the problem by creating
> a subshell inside the namespace.
>
> Signed-off-by: Lucas Bates <lucasb@...atatu.com>
Applied, thank you.
Powered by blists - more mailing lists