From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] lib: Add safe timerfd macros
Date: Wed, 4 Mar 2020 17:03:31 +0100 [thread overview]
Message-ID: <20200304160330.GA7516@rei> (raw)
In-Reply-To: <b42e93cb-b06d-538c-a5ff-1d110ed8ce74@suse.cz>
Hi!
> Don't forget to clear errno when you're not using the TEST() macro.
Hmm, I'm not sure how useful is this. Generally the syscalls in libc
have single macro definition that is used everywhere to copy the error
from the errno variable. If that piece of code is buggy half of the test
in LTP would fail anyway.
...
> > + if (tst_kvercmp(2, 6, 26) <= 0)
> > + flags = 0;
>
> I think tst_brk(TCONF) would be better here. Or at least tst_res(TWARN),
> since resetting flags to 0 may render some tests useless.
I think that it's completely wrong to put kernel version comparsion to
the safe_macros. If the test needs specific kernel version it should be
either put into the tst_test structure of handled in the test setup.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2020-03-04 16:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 15:12 [LTP] [PATCH 1/2] lib: Add safe timerfd macros Petr Vorel
2020-03-04 15:12 ` [LTP] [PATCH 2/2] timerfd: Use safe macros Petr Vorel
2020-03-04 16:03 ` Martin Doucha
2020-03-04 15:22 ` [LTP] [PATCH 1/2] lib: Add safe timerfd macros Cyril Hrubis
2020-03-04 15:56 ` Martin Doucha
2020-03-04 16:02 ` Martin Doucha
2020-03-04 16:45 ` Petr Vorel
2020-03-05 10:11 ` Cyril Hrubis
2020-03-05 11:54 ` Petr Vorel
2020-03-05 12:21 ` Petr Vorel
2020-03-04 16:03 ` Cyril Hrubis [this message]
2020-03-04 16:04 ` Cyril Hrubis
2020-03-04 16:49 ` Petr Vorel
2020-03-04 16:28 ` Petr Vorel
-- strict thread matches above, loose matches on Subject: below --
2020-03-04 18:38 Petr Vorel
2020-03-04 18:49 ` Petr Vorel
2020-03-05 10:28 ` Cyril Hrubis
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=20200304160330.GA7516@rei \
--to=chrubis@suse.cz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.