From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 6/6] fs: rewrite stream05 test using new API
Date: Mon, 2 Mar 2026 14:52:08 +0100 [thread overview]
Message-ID: <aaWWCLu7iS3GlcLn@yuki.lan> (raw)
In-Reply-To: <20260123-stream_refactoring-v1-6-281b85f6ab02@suse.com>
Hi!
> +// SPDX-License-Identifier: GPL-2.0-or-later
> /*
> - *
> - * Copyright (c) International Business Machines Corp., 2002
Shouldn't this copyright stay?
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
> - * the GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + * Copyright (c) 2026 Andrea Cervesato <andrea.cervesato@suse.com>
> */
>
...
> + stream = SAFE_FOPEN(FILENAME, "a+");
> + SAFE_FWRITE(data, 1, DATASIZE, stream);
Shouldn't this be SAFE_FFLUSH(stream) here?
The previous test closed and opened the stream before, which explicitly
flushed the buffers.
> - local_flag = PASSED;
> - /*--------------------------------------------------------------------*/
> - //block2:
> + fd = TST_EXP_FD(SAFE_FILENO(stream));
This is wrong, either we use SAFE_MACRO or TST_EXP macro. Using both of
them like this does not make any sense since the SAFE_FILENO() does not
return on a failure.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-03-02 13:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 16:18 [LTP] [PATCH 0/6] Rewrite fs stream testing suite Andrea Cervesato
2026-01-23 16:18 ` [LTP] [PATCH 1/6] Add safe macros for " Andrea Cervesato
2026-02-19 12:31 ` Cyril Hrubis
2026-03-04 9:49 ` Andrea Cervesato via ltp
2026-03-04 10:06 ` Cyril Hrubis
2026-03-04 10:11 ` Andrea Cervesato via ltp
2026-03-04 10:30 ` Cyril Hrubis
2026-03-04 12:20 ` Andrea Cervesato via ltp
2026-01-23 16:18 ` [LTP] [PATCH 2/6] fs: rewrite stream01 test using new API Andrea Cervesato
2026-02-19 13:05 ` Cyril Hrubis
2026-01-23 16:18 ` [LTP] [PATCH 3/6] fs: rewrite stream02 " Andrea Cervesato
2026-03-02 12:01 ` Cyril Hrubis
2026-01-23 16:18 ` [LTP] [PATCH 4/6] fs: rewrite stream03 " Andrea Cervesato
2026-03-02 13:02 ` Cyril Hrubis
2026-01-23 16:18 ` [LTP] [PATCH 5/6] fs: rewrite stream04 " Andrea Cervesato
2026-03-02 13:14 ` Cyril Hrubis
2026-01-23 16:18 ` [LTP] [PATCH 6/6] fs: rewrite stream05 " Andrea Cervesato
2026-03-02 13:52 ` Cyril Hrubis [this message]
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=aaWWCLu7iS3GlcLn@yuki.lan \
--to=chrubis@suse.cz \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
/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