[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240625174449.796bc9a0@kernel.org>
Date: Tue, 25 Jun 2024 17:44:49 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Rao Shoaib
<Rao.Shoaib@...cle.com>, Kuniyuki Iwashima <kuni1840@...il.com>,
<netdev@...r.kernel.org>
Subject: Re: [PATCH v1 net 02/11] selftest: af_unix: Add msg_oob.c.
On Mon, 24 Jun 2024 18:36:36 -0700 Kuniyuki Iwashima wrote:
> + if (ret[0] != expected_len || recv_errno[0] != expected_errno) {
> + TH_LOG("AF_UNIX :%s", ret[0] < 0 ? strerror(recv_errno[0]) : recv_buf[0]);
> + TH_LOG("Expected:%s", expected_errno ? strerror(expected_errno) : expected_buf);
> +
> + ASSERT_EQ(ret[0], expected_len);
> + ASSERT_EQ(recv_errno[0], expected_errno);
> + }
repeating the conditions feels slightly imperfect.
Would it be possible to modify EXPECT_* to return the condition?
Then we could:
if (EXPECT(...)) {
TH_LOG(...
TH_LOG(...
}
Powered by blists - more mailing lists