From: Geliang Tang <geliang@kernel.org>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v14 00/14] dump for userspace pm
Date: Wed, 21 Feb 2024 09:06:09 +0800 [thread overview]
Message-ID: <ZdVMgQEqbhO+e0fY@t480> (raw)
In-Reply-To: <682134fb-8893-4ee0-9ddd-c0a4a4f5650b@kernel.org>
On Tue, Feb 20, 2024 at 12:50:49PM +0100, Matthieu Baerts wrote:
> Hi Geliang,
>
> On 20/02/2024 10:58, Geliang Tang wrote:
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> >
> > v14:
> > - address Matt's comments in v13.
>
> Thank you for the new version!
>
> I didn't look at it yet, but:
>
> > - I have to use these lines in patch #8:
> >
> > local cmd_ret=0
> > local out=$(${cmd} 2>${err}) || cmd_ret=${?}
> >
> > The following expected code breaks pm_netlink.sh, I don't know why:
> >
> > local out cmd_ret=0
> > out=$(${cmd} 2>${err}) || cmd_ret=${?}
> >
> > If this is still a problem, I'll send a squash-to patch to fix it.
>
> Yes, we should either fix warnings or explicitly mark the false positive
> ones as ignored.
>
> Can you try with the attached patch please? It is not clear to me why
> the second block doesn't do the same as the first one.
Thanks Matt, the attached patch works well. It fixes the issue I
mentioned perfectly.
>
> I can squash it when applying the series if there are no other comments.
Great, thanks.
-Geliang
>
> Cheers,
> Matt
> --
> Sponsored by the NGI0 Core fund.
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> index aca35376006b..556a7d9784d7 100644
> --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
> @@ -352,20 +352,24 @@ mptcp_lib_check_tools() {
> }
>
> mptcp_lib_check_output() {
> - local err="$1"
> - local cmd="$2"
> - local expected="$3"
> + local err="${1}"
> + local cmd="${2}"
> + local expected="${3}"
> local cmd_ret=0
> - local out=$(${cmd} 2>${err}) || cmd_ret=${?}
> + local out
>
> - if [ $cmd_ret -ne 0 ]; then
> - mptcp_lib_print_err "[FAIL] command execution '$cmd' stderr"
> + if ! out=$(${cmd} 2>"${err}"); then
> + cmd_ret=${?}
> + fi
> +
> + if [ ${cmd_ret} -ne 0 ]; then
> + mptcp_lib_print_err "[FAIL] command execution '${cmd}' stderr"
> cat "${err}"
> return 2
> - elif [ "$out" = "$expected" ]; then
> + elif [ "${out}" = "${expected}" ]; then
> return 0
> else
> - mptcp_lib_print_err "[FAIL] expected '$expected' got '$out'"
> + mptcp_lib_print_err "[FAIL] expected '${expected}' got '${out}'"
> return 1
> fi
> }
next prev parent reply other threads:[~2024-02-21 1:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 9:58 [PATCH mptcp-next v14 00/14] dump for userspace pm Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 01/14] mptcp: export mptcp_genl_family & mptcp_nl_fill_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 02/14] mptcp: implement mptcp_userspace_pm_dump_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 03/14] mptcp: add token for get-addr in yaml Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 04/14] mptcp: dump addrs in userspace pm list Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 05/14] mptcp: check userspace pm flags Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 06/14] selftests: mptcp: add userspace pm subflow flag Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 07/14] selftests: mptcp: add token for dump_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 08/14] selftests: mptcp: add mptcp_lib_check_output helper Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 09/14] selftests: mptcp: dump userspace addrs list Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 10/14] mptcp: add userspace_pm_lookup_addr_by_id helper Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 11/14] mptcp: implement mptcp_userspace_pm_get_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 12/14] mptcp: get addr in userspace pm list Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 13/14] selftests: mptcp: add token for get_addr Geliang Tang
2024-02-20 9:58 ` [PATCH mptcp-next v14 14/14] selftests: mptcp: userspace pm get addr tests Geliang Tang
2024-02-20 10:51 ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
2024-02-20 18:27 ` MPTCP CI
2024-02-20 18:46 ` MPTCP CI
2024-02-20 11:50 ` [PATCH mptcp-next v14 00/14] dump for userspace pm Matthieu Baerts
2024-02-20 17:37 ` Matthieu Baerts
2024-02-20 17:48 ` Mat Martineau
2024-02-21 1:06 ` Geliang Tang [this message]
2024-02-21 11:46 ` Matthieu Baerts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZdVMgQEqbhO+e0fY@t480 \
--to=geliang@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox