Subject: Re: [PATCH v1 net 02/11] selftest: af_unix: Add msg_oob.c.

From: Jakub Kicinski <[email-masked]>
Date: Tue, 25 Jun 2024 17:44:49 -0700

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(...
	}