From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 3/3] fsx-linux: Reduce log output with TDEBUG
Date: Tue, 12 Dec 2023 11:08:47 +0100 [thread overview]
Message-ID: <e9c67e52-e4e6-4a15-ae7d-31995c515ba6@suse.com> (raw)
In-Reply-To: <20231211161807.526714-4-pvorel@suse.cz>
Hi!
Acked-by: Andrea Cervesato <andrea.cervesato@suse.com>
Andrea
On 12/11/23 17:18, Petr Vorel wrote:
> Log output is very verbose thus silent with changing most verbose
> TINFO messages to TDEBUG. Given how many times the test tries it's a
> significant time spent for printing output. This change also helps to
> run on slower SUT without need to set LTP_TIMEOUT_MUL environment
> variable.
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> testcases/kernel/fs/fsx-linux/fsx-linux.c | 33 ++++++++---------------
> 1 file changed, 11 insertions(+), 22 deletions(-)
>
> diff --git a/testcases/kernel/fs/fsx-linux/fsx-linux.c b/testcases/kernel/fs/fsx-linux/fsx-linux.c
> index 23e608189..658fc99c3 100644
> --- a/testcases/kernel/fs/fsx-linux/fsx-linux.c
> +++ b/testcases/kernel/fs/fsx-linux/fsx-linux.c
> @@ -98,8 +98,7 @@ static void update_file_size(struct file_pos_t const *pos)
> {
> if (pos->offset + pos->size > file_size) {
> file_size = pos->offset + pos->size;
> -
> - tst_res(TINFO, "File size changed: %llu", file_size);
> + tst_res(TDEBUG, "File size changed: %llu", file_size);
> }
> }
>
> @@ -114,8 +113,7 @@ static int memory_compare(
> for (long long i = 0; i < size; i++) {
> diff = a[i] - b[i];
> if (diff) {
> - tst_res(TINFO,
> - "File memory differs at offset=%llu ('%c' != '%c')",
> + tst_res(TDEBUG, "File memory differs at offset=%llu ('%c' != '%c')",
> offset + i, a[i], b[i]);
> break;
> }
> @@ -135,10 +133,8 @@ static int op_read(void)
>
> op_file_position(file_size, op_read_align, &pos);
>
> - tst_res(TINFO,
> - "Reading at offset=%llu, size=%llu",
> - pos.offset,
> - pos.size);
> + tst_res(TDEBUG, "Reading at offset=%llu, size=%llu",
> + pos.offset, pos.size);
>
> memset(temp_buff, 0, file_max_size);
>
> @@ -176,10 +172,8 @@ static int op_write(void)
> temp_buff[i] = data;
> }
>
> - tst_res(TINFO,
> - "Writing at offset=%llu, size=%llu",
> - pos.offset,
> - pos.size);
> + tst_res(TDEBUG, "Writing at offset=%llu, size=%llu",
> + pos.offset, pos.size);
>
> SAFE_LSEEK(file_desc, (off_t)pos.offset, SEEK_SET);
> SAFE_WRITE(SAFE_WRITE_ALL, file_desc, temp_buff, pos.size);
> @@ -194,10 +188,9 @@ static int op_truncate(void)
> struct file_pos_t pos;
>
> op_file_position(file_max_size, op_trunc_align, &pos);
> -
> file_size = pos.offset + pos.size;
>
> - tst_res(TINFO, "Truncating to %llu", file_size);
> + tst_res(TDEBUG, "Truncating to %llu", file_size);
>
> SAFE_FTRUNCATE(file_desc, file_size);
> memset(file_buff + file_size, 0, file_max_size - file_size);
> @@ -218,10 +211,8 @@ static int op_map_read(void)
> op_file_position(file_size, op_read_align, &pos);
> op_align_pages(&pos);
>
> - tst_res(TINFO,
> - "Map reading at offset=%llu, size=%llu",
> - pos.offset,
> - pos.size);
> + tst_res(TDEBUG, "Map reading at offset=%llu, size=%llu",
> + pos.offset, pos.size);
>
> addr = SAFE_MMAP(
> 0, pos.size,
> @@ -261,10 +252,8 @@ static int op_map_write(void)
> if (file_size < pos.offset + pos.size)
> SAFE_FTRUNCATE(file_desc, pos.offset + pos.size);
>
> - tst_res(TINFO,
> - "Map writing at offset=%llu, size=%llu",
> - pos.offset,
> - pos.size);
> + tst_res(TDEBUG, "Map writing at offset=%llu, size=%llu",
> + pos.offset, pos.size);
>
> for (long long i = 0; i < pos.size; i++)
> file_buff[pos.offset + i] = random() % 10 + 'l';
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-12-12 10:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 16:18 [LTP] [PATCH v3 0/3] Add TDEBUG tst_res() flag Petr Vorel
2023-12-11 16:18 ` [LTP] [PATCH v3 1/3] lib/tests: Add test for testing tst_res() flags Petr Vorel
2023-12-13 19:04 ` Cyril Hrubis
2023-12-13 23:40 ` Petr Vorel
2023-12-14 9:09 ` Cyril Hrubis
2023-12-14 12:19 ` Petr Vorel
2023-12-14 12:26 ` Petr Vorel
2023-12-11 16:18 ` [LTP] [PATCH v3 2/3] lib: Add support for TDEBUG tst_res() flag Petr Vorel
2023-12-13 19:15 ` Cyril Hrubis
2023-12-13 23:11 ` Petr Vorel
2023-12-14 9:41 ` Cyril Hrubis
2023-12-14 12:08 ` Petr Vorel
2023-12-13 23:48 ` Petr Vorel
2023-12-14 9:39 ` Cyril Hrubis
2023-12-11 16:18 ` [LTP] [PATCH v3 3/3] fsx-linux: Reduce log output with TDEBUG Petr Vorel
2023-12-12 10:08 ` Andrea Cervesato via ltp [this message]
2023-12-13 19:18 ` Cyril Hrubis
2023-12-11 16:27 ` [LTP] [PATCH v3 0/3] Add TDEBUG tst_res() flag Jan Stancek
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=e9c67e52-e4e6-4a15-ae7d-31995c515ba6@suse.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
/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