From: Markus Elfring <Markus.Elfring@web.de>
To: Yohei Kojima <yk@y-koj.net>,
linux-kselftest@vger.kernel.org, netdev@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH net-next v2 2/2] selftests: net: improve error handling in passive TFO test
Date: Tue, 13 Jan 2026 15:48:11 +0100 [thread overview]
Message-ID: <607a0338-5e84-4aaf-b705-18dcd4aca05f@web.de> (raw)
In-Reply-To: <24707c8133f7095c0e5a94afa69e75c3a80bf6e7.1768312014.git.yk@y-koj.net>
…
> +++ b/tools/testing/selftests/net/tfo.c
> @@ -82,8 +82,10 @@ static void run_server(void)
…
> if (read(connfd, buf, 64) < 0)
> - perror("read()");
> - fprintf(outfile, "%d\n", opt);
> + error(1, errno, "read()");
> +
> + if (fprintf(outfile, "%d\n", opt) < 0)
> + error(1, errno, "fprintf()");
>
> fclose(outfile);
> close(connfd);
…
Why was error detection omitted for close() calls here so far?
https://pubs.opengroup.org/onlinepubs/9799919799/functions/fclose.html
Regards,
Markus
next prev parent reply other threads:[~2026-01-13 14:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 14:11 [PATCH net-next v2 0/2] selftests: net: improve error handling in passive TFO test Yohei Kojima
2026-01-13 14:11 ` [PATCH net-next v2 1/2] selftests: net: fix passive TFO test to fail if child processes failed Yohei Kojima
2026-01-13 14:11 ` [PATCH net-next v2 2/2] selftests: net: improve error handling in passive TFO test Yohei Kojima
2026-01-13 14:48 ` Markus Elfring [this message]
2026-01-13 15:57 ` Yohei Kojima
2026-01-14 8:33 ` Markus Elfring
2026-01-15 16:21 ` Yohei Kojima
2026-01-19 14:19 ` [PATCH net-next v2 0/2] " patchwork-bot+netdevbpf
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=607a0338-5e84-4aaf-b705-18dcd4aca05f@web.de \
--to=markus.elfring@web.de \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=yk@y-koj.net \
/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