From: Petr Vorel <pvorel@suse.cz>
To: Richard Palethorpe <rpalethorpe@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/2] Refactoring aio-stress.c using LTP API
Date: Tue, 4 Jan 2022 13:22:35 +0100 [thread overview]
Message-ID: <YdQ8C32kJun/AnUK@pevik> (raw)
In-Reply-To: <87a6gbogos.fsf@suse.de>
Hi Richie,
> Hello Petr,
> Petr Vorel <pvorel@suse.cz> writes:
> > Hi Andrea,
> > ...
> >> for (i = 0; i < io->io_oper->reclen; i++) {
> >> if (io->buf[i] != verify_buf[i]) {
> >> - fprintf(stderr, "%d:%c:%c ", i,
> >> - io->buf[i], verify_buf[i]);
> >> + ret = asprintf(&msg, "%d:%c:%c ", i, io->buf[i], verify_buf[i]);
> >> + if (ret < 0)
> >> + tst_brk(TBROK, "asprintf memory allocation error");
> >> + ptr += sprintf(ptr, msg);
> > Actually, this is problematic for -Werror=format-security which we use in CI.
> > Simple "%s" fixes that. It can be done before merge.
> > ptr += sprintf(ptr, "%s", msg);
> > @Richie: I wonder if make check could also actually compile the code with
> > extra CFLAGS from build.sh.
> Compiling during make-check may confuse things; we don't want make-check
> to produce build artifacts. Although I guess you could skip the later
> compilation steps. Also then we could add -fanalyzer on gcc which I have
> done in a test project[1]. Possibly Clang has something similar,
> hhmmmm...
FYI the point is for me to avoid manually pushing changes to github repository,
to speedup review by catching early (and without additional effort from reviewer
side) mostly trivial error detection.
But OTOH we cannot expect users to have it running, thus I should probably force
myself to implement pachwork REST API
https://github.com/linux-test-project/ltp/issues/599
i.e. either we ask patch authors to watch the build status on patchwork or to
run make check (or even both).
Kind regards,
Petr
> Probably this would require different flags on GCC and Clang. We could
> also run both GCC and Clang if they are present. It's probably worth
> experimenting with.
> [1]: https://richiejp.com/zc-data#meson
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2022-01-04 12:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 7:37 [LTP] [PATCH v2 0/2] aio-stress.c refactoring Andrea Cervesato via ltp
2022-01-04 7:37 ` [LTP] [PATCH v2 1/2] Refactoring aio-stress.c using LTP API Andrea Cervesato via ltp
2022-01-04 8:27 ` Petr Vorel
2022-01-04 8:34 ` Petr Vorel
2022-01-04 11:49 ` Richard Palethorpe
2022-01-04 12:22 ` Petr Vorel [this message]
2022-01-04 7:37 ` [LTP] [PATCH v2 2/2] Update ltp-aio-stress suites using new options Andrea Cervesato via ltp
2022-01-04 8:35 ` Petr Vorel
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=YdQ8C32kJun/AnUK@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@suse.de \
/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