public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] settimeofday01: Convert doc to docparse
@ 2024-02-03  5:19 Yang Xu via ltp
  2024-02-03  5:19 ` [LTP] [PATCH 2/2] settimeofday02:Simplify test using TST_ macros Yang Xu via ltp
  2024-02-06 11:20 ` [LTP] [PATCH 1/2] settimeofday01: Convert doc to docparse Petr Vorel
  0 siblings, 2 replies; 7+ messages in thread
From: Yang Xu via ltp @ 2024-02-03  5:19 UTC (permalink / raw)
  To: ltp

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 testcases/kernel/syscalls/settimeofday/settimeofday01.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/settimeofday/settimeofday01.c b/testcases/kernel/syscalls/settimeofday/settimeofday01.c
index b7f84b00f..e523b5b97 100644
--- a/testcases/kernel/syscalls/settimeofday/settimeofday01.c
+++ b/testcases/kernel/syscalls/settimeofday/settimeofday01.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 the basic functionality of settimeofday().
+ * Copyright (c) Linux Test Project, 2001-2024
+ */
+
+/*\
+ * [Description]
+ *
+ * Check the basic functionality of settimeofday().
  */
 
 #include <sys/time.h>
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [LTP] [PATCH 2/2] settimeofday02:Simplify test using TST_ macros
  2024-02-03  5:19 [LTP] [PATCH 1/2] settimeofday01: Convert doc to docparse Yang Xu via ltp
@ 2024-02-03  5:19 ` Yang Xu via ltp
  2024-02-06 11:18   ` Petr Vorel
  2024-02-06 11:20 ` [LTP] [PATCH 1/2] settimeofday01: Convert doc to docparse Petr Vorel
  1 sibling, 1 reply; 7+ messages in thread
From: Yang Xu via ltp @ 2024-02-03  5:19 UTC (permalink / raw)
  To: ltp

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 .../syscalls/settimeofday/settimeofday02.c    | 20 ++++++++-----------
 1 file changed, 8 insertions(+), 12 deletions(-)

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 = {
-- 
2.43.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 2/2] settimeofday02:Simplify test using TST_ macros
  2024-02-03  5:19 ` [LTP] [PATCH 2/2] settimeofday02:Simplify test using TST_ macros Yang Xu via ltp
@ 2024-02-06 11:18   ` Petr Vorel
  2024-02-08  6:53     ` Yang Xu (Fujitsu) via ltp
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2024-02-06 11:18 UTC (permalink / raw)
  To: Yang Xu; +Cc: ltp

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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 1/2] settimeofday01: Convert doc to docparse
  2024-02-03  5:19 [LTP] [PATCH 1/2] settimeofday01: Convert doc to docparse Yang Xu via ltp
  2024-02-03  5:19 ` [LTP] [PATCH 2/2] settimeofday02:Simplify test using TST_ macros Yang Xu via ltp
@ 2024-02-06 11:20 ` Petr Vorel
  1 sibling, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2024-02-06 11:20 UTC (permalink / raw)
  To: Yang Xu; +Cc: ltp

Hi Yang Xu,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Obviously correct, thanks!

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 2/2] settimeofday02:Simplify test using TST_ macros
  2024-02-06 11:18   ` Petr Vorel
@ 2024-02-08  6:53     ` Yang Xu (Fujitsu) via ltp
  2024-02-08  8:46       ` Petr Vorel
  2024-02-08  8:56       ` Petr Vorel
  0 siblings, 2 replies; 7+ messages in thread
From: Yang Xu (Fujitsu) via ltp @ 2024-02-08  6:53 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp@lists.linux.it

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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 2/2] settimeofday02:Simplify test using TST_ macros
  2024-02-08  6:53     ` Yang Xu (Fujitsu) via ltp
@ 2024-02-08  8:46       ` Petr Vorel
  2024-02-08  8:56       ` Petr Vorel
  1 sibling, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2024-02-08  8:46 UTC (permalink / raw)
  To: Yang Xu (Fujitsu); +Cc: ltp@lists.linux.it

> 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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LTP] [PATCH 2/2] settimeofday02:Simplify test using TST_ macros
  2024-02-08  6:53     ` Yang Xu (Fujitsu) via ltp
  2024-02-08  8:46       ` Petr Vorel
@ 2024-02-08  8:56       ` Petr Vorel
  1 sibling, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2024-02-08  8:56 UTC (permalink / raw)
  To: Yang Xu (Fujitsu); +Cc: ltp@lists.linux.it

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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-08  8:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-03  5:19 [LTP] [PATCH 1/2] settimeofday01: Convert doc to docparse Yang Xu via ltp
2024-02-03  5:19 ` [LTP] [PATCH 2/2] settimeofday02:Simplify test using TST_ macros Yang Xu via ltp
2024-02-06 11:18   ` Petr Vorel
2024-02-08  6:53     ` Yang Xu (Fujitsu) via ltp
2024-02-08  8:46       ` Petr Vorel
2024-02-08  8:56       ` Petr Vorel
2024-02-06 11:20 ` [LTP] [PATCH 1/2] settimeofday01: Convert doc to docparse Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox