Message ID | 20240203051901.3000-2-xuyang2018.jy@fujitsu.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] settimeofday01: Convert doc to docparse | expand |
Hi Yang Xu,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
LGTM
nit: subject could be "settimeofday02: Simplify test using TST_ macros"
(missing space behind : - readability)
nit: git metadata as you as author have \ escapes:
Yang Xu \(Fujitsu\) <xuyang2018.jy@fujitsu.com>
It looks like you had it long time ago:
https://patchwork.ozlabs.org/project/ltp/list/?submitter=81371&state=*
Could you fix it as it breaks also credit counting before next release?
Kind regards,
Petr
Hi Petr, > Hi Yang Xu, > > Reviewed-by: Petr Vorel <pvorel@suse.cz> > LGTM > > nit: subject could be "settimeofday02: Simplify test using TST_ macros" > (missing space behind : - readability) > > nit: git metadata as you as author have \ escapes: > Yang Xu \(Fujitsu\) <xuyang2018.jy@fujitsu.com> > > It looks like you had it long time ago: > https://patchwork.ozlabs.org/project/ltp/list/?submitter=81371&state=* > > Could you fix it as it breaks also credit counting before next release? > This phenomenon did not occur in January yet. Did the patchwork rules change? I don't know what needs to be changed. Best Regards Yang Xu > Kind regards, > Petr
> Hi Petr, > > Hi Yang Xu, > > Reviewed-by: Petr Vorel <pvorel@suse.cz> > > LGTM > > nit: subject could be "settimeofday02: Simplify test using TST_ macros" > > (missing space behind : - readability) > > nit: git metadata as you as author have \ escapes: > > Yang Xu \(Fujitsu\) <xuyang2018.jy@fujitsu.com> > > It looks like you had it long time ago: > > https://patchwork.ozlabs.org/project/ltp/list/?submitter=81371&state=* > > Could you fix it as it breaks also credit counting before next release? > This phenomenon did not occur in January yet. Did the patchwork rules > change? I don't know what needs to be changed. I have no idea, patchwork we use is the same version 2.2.0. Maybe check user profil [1], but unlikely there is anything. But although I did not realize before, it's probably patchwork problem. If you want to fix it (feel free to ignore this, because you mostly merge your commits yourself, so you will use your commits with correct metadata), you could 1) report it to github issue [2] or to ML [3] or ask either the maintainer Jeremy Kerr (search kernel log for his email or ask me to send it). Kind regards, Petr [1] https://patchwork.ozlabs.org/user/ [2] https://github.com/getpatchwork/patchwork/issues [3] https://lists.ozlabs.org/listinfo/patchwork > Best Regards > Yang Xu > > Kind regards, > > Petr
Hi Yang Xu, > Hi Petr, > > Hi Yang Xu, > > Reviewed-by: Petr Vorel <pvorel@suse.cz> > > LGTM > > nit: subject could be "settimeofday02: Simplify test using TST_ macros" > > (missing space behind : - readability) > > nit: git metadata as you as author have \ escapes: > > Yang Xu \(Fujitsu\) <xuyang2018.jy@fujitsu.com> > > It looks like you had it long time ago: > > https://patchwork.ozlabs.org/project/ltp/list/?submitter=81371&state=* > > Could you fix it as it breaks also credit counting before next release? > This phenomenon did not occur in January yet. Did the patchwork rules > change? I don't know what needs to be changed. I have no idea, patchwork we use is the same version 2.2.0. Maybe check user profil [1], but unlikely there is anything. But although I did not realize before, it's probably patchwork problem. If you want to fix it (feel free to ignore this, because you mostly merge your commits yourself, so you will use your commits with correct metadata), you could 1) report it to github issue [2] or to ML [3] or ask either the maintainer Jeremy Kerr (search kernel log for his email or ask me to send it). Kind regards, Petr [1] https://patchwork.ozlabs.org/user/ [2] https://github.com/getpatchwork/patchwork/issues [3] https://lists.ozlabs.org/listinfo/patchwork > Best Regards > Yang Xu > > Kind regards, > > Petr
diff --git a/testcases/kernel/syscalls/settimeofday/settimeofday02.c b/testcases/kernel/syscalls/settimeofday/settimeofday02.c index 0fa8a147a..157f72cfc 100644 --- a/testcases/kernel/syscalls/settimeofday/settimeofday02.c +++ b/testcases/kernel/syscalls/settimeofday/settimeofday02.c @@ -1,8 +1,13 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) International Business Machines Corp., 2001 - * Ported to LTP 07/2001 John George - * Testcase to check that settimeofday() sets errnos correctly. + * Copyright (c) Linux Test Project, 2001-2024 + */ + +/*\ + * [Description] + * + * Check that settimeofday() sets errnos correctly. */ #include <stdio.h> @@ -27,16 +32,7 @@ static void verify_settimeofday(unsigned int n) struct tcase *tc = &tcases[n]; tst_res(TINFO, "%s", tc->message); - TEST(settimeofday(&tc->tv, NULL)); - if (TST_RET != -1) { - tst_res(TFAIL, "settimeofday() succeeded unexpectedly"); - return; - } - - if (TST_ERR != tc->exp_errno) - tst_res(TFAIL | TTERRNO, "Expected %s got ", tst_strerrno(tc->exp_errno)); - else - tst_res(TPASS | TTERRNO, "Received expected errno"); + TST_EXP_FAIL(settimeofday(&tc->tv, NULL), tc->exp_errno); } static struct tst_test test = {
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com> --- .../syscalls/settimeofday/settimeofday02.c | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-)