All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 0/2] API tests cleanup
@ 2021-07-01  5:03 Petr Vorel
  2021-07-01  5:03 ` [LTP] [PATCH 1/2] lib/tests: Rename test tst_print_result.c Petr Vorel
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Petr Vorel @ 2021-07-01  5:03 UTC (permalink / raw)
  To: ltp

From: Petr Vorel <pvorel@suse.cz>

Hi,

preparation for v4 test API cleanup.

Kind regards,
Petr

Petr Vorel (2):
  lib/tests: Rename test tst_print_result.c
  lib/tests: Rename test to tst_fuzzy_sync03.c

 lib/newlib_tests/.gitignore                       |  4 ++--
 lib/newlib_tests/Makefile                         |  4 ++--
 lib/newlib_tests/{test16.c => tst_fuzzy_sync03.c} |  0
 lib/newlib_tests/{test17.c => tst_print_result.c} | 10 ++++------
 4 files changed, 8 insertions(+), 10 deletions(-)
 rename lib/newlib_tests/{test16.c => tst_fuzzy_sync03.c} (100%)
 rename lib/newlib_tests/{test17.c => tst_print_result.c} (80%)

-- 
2.32.0.rc0


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

* [LTP] [PATCH 1/2] lib/tests: Rename test tst_print_result.c
  2021-07-01  5:03 [LTP] [PATCH 0/2] API tests cleanup Petr Vorel
@ 2021-07-01  5:03 ` Petr Vorel
  2021-07-01  5:50   ` Richard Palethorpe
  2021-07-01  5:03 ` [LTP] [PATCH 2/2] lib/tests: Rename test to tst_fuzzy_sync03.c Petr Vorel
  2021-07-01  5:55 ` [LTP] [PATCH 0/2] API tests cleanup xuyang2018.jy
  2 siblings, 1 reply; 10+ messages in thread
From: Petr Vorel @ 2021-07-01  5:03 UTC (permalink / raw)
  To: ltp

From: Petr Vorel <pvorel@suse.cz>

Also:
* remove copy pasted test description
* fix author in the copyright

Fixes: cecbd0cb3 ("Fix buffer overflow in print_result() function")

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 lib/newlib_tests/.gitignore                       |  2 +-
 lib/newlib_tests/{test17.c => tst_print_result.c} | 10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)
 rename lib/newlib_tests/{test17.c => tst_print_result.c} (80%)

diff --git a/lib/newlib_tests/.gitignore b/lib/newlib_tests/.gitignore
index 83a240223..9f53bbb99 100644
--- a/lib/newlib_tests/.gitignore
+++ b/lib/newlib_tests/.gitignore
@@ -22,7 +22,7 @@ tst_device
 tst_safe_fileops
 tst_res_hexd
 tst_strstatus
-test17
+tst_print_result
 test18
 test19
 test20
diff --git a/lib/newlib_tests/test17.c b/lib/newlib_tests/tst_print_result.c
similarity index 80%
rename from lib/newlib_tests/test17.c
rename to lib/newlib_tests/tst_print_result.c
index c0fc0bc30..0a2ca5af1 100644
--- a/lib/newlib_tests/test17.c
+++ b/lib/newlib_tests/tst_print_result.c
@@ -1,12 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 /*
- * Copyright (c) 2017 Richard Palethorpe <rpalethorpe@suse.com>
+ * Copyright (c) 2017 Veronika Kabatova <vkabatov@redhat.com>
  */
-/* Basic functionality test for tst_fuzzy_sync.h similar to the atomic tests
- * (test15.c). One thread writes to the odd indexes of an array while the
- * other writes to the even. If the threads are not synchronised then they
- * will probably write to the wrong indexes as they share an index variable
- * which they should take it in turns to update.
+
+/*
+ * Test for cecbd0cb3 ("Fix buffer overflow in print_result() function")
  */
 
 #include <stdlib.h>
-- 
2.32.0.rc0


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

* [LTP] [PATCH 2/2] lib/tests: Rename test to tst_fuzzy_sync03.c
  2021-07-01  5:03 [LTP] [PATCH 0/2] API tests cleanup Petr Vorel
  2021-07-01  5:03 ` [LTP] [PATCH 1/2] lib/tests: Rename test tst_print_result.c Petr Vorel
@ 2021-07-01  5:03 ` Petr Vorel
  2021-07-01  5:51   ` Richard Palethorpe
  2021-07-01  5:55 ` [LTP] [PATCH 0/2] API tests cleanup xuyang2018.jy
  2 siblings, 1 reply; 10+ messages in thread
From: Petr Vorel @ 2021-07-01  5:03 UTC (permalink / raw)
  To: ltp

From: Petr Vorel <pvorel@suse.cz>

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 lib/newlib_tests/.gitignore                       | 2 +-
 lib/newlib_tests/Makefile                         | 4 ++--
 lib/newlib_tests/{test16.c => tst_fuzzy_sync03.c} | 0
 3 files changed, 3 insertions(+), 3 deletions(-)
 rename lib/newlib_tests/{test16.c => tst_fuzzy_sync03.c} (100%)

diff --git a/lib/newlib_tests/.gitignore b/lib/newlib_tests/.gitignore
index 9f53bbb99..b51f6a679 100644
--- a/lib/newlib_tests/.gitignore
+++ b/lib/newlib_tests/.gitignore
@@ -13,7 +13,6 @@ test12
 test13
 test14
 test15
-test16
 tst_capability01
 tst_capability02
 tst_cgroup01
@@ -44,3 +43,4 @@ test_macros03
 test_macros04
 tst_fuzzy_sync01
 tst_fuzzy_sync02
+tst_fuzzy_sync03
diff --git a/lib/newlib_tests/Makefile b/lib/newlib_tests/Makefile
index 5bd68e95e..1fbf7649a 100644
--- a/lib/newlib_tests/Makefile
+++ b/lib/newlib_tests/Makefile
@@ -6,8 +6,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
 CFLAGS			+= -W -Wall
 LDLIBS			+= -lltp
 
-test08 test09 test15 test16 tst_fuzzy_sync01 tst_fuzzy_sync02: CFLAGS += -pthread
-test16 tst_expiration_timer: LDLIBS += -lrt
+test08 test09 test15 tst_fuzzy_sync01 tst_fuzzy_sync02 tst_fuzzy_sync03: CFLAGS += -pthread
+tst_expiration_timer tst_fuzzy_sync03: LDLIBS += -lrt
 
 ifeq ($(ANDROID),1)
 FILTER_OUT_MAKE_TARGETS	+= test08
diff --git a/lib/newlib_tests/test16.c b/lib/newlib_tests/tst_fuzzy_sync03.c
similarity index 100%
rename from lib/newlib_tests/test16.c
rename to lib/newlib_tests/tst_fuzzy_sync03.c
-- 
2.32.0.rc0


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

* [LTP] [PATCH 1/2] lib/tests: Rename test tst_print_result.c
  2021-07-01  5:03 ` [LTP] [PATCH 1/2] lib/tests: Rename test tst_print_result.c Petr Vorel
@ 2021-07-01  5:50   ` Richard Palethorpe
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Palethorpe @ 2021-07-01  5:50 UTC (permalink / raw)
  To: ltp

Hello Petr,
Petr Vorel <petr.vorel@gmail.com> writes:

> From: Petr Vorel <pvorel@suse.cz>
>
> Also:
> * remove copy pasted test description
> * fix author in the copyright
>
> Fixes: cecbd0cb3 ("Fix buffer overflow in print_result() function")
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

Acked-by: Richard Palethorpe <rpalethorpe@suse.com>

> ---
>  lib/newlib_tests/.gitignore                       |  2 +-
>  lib/newlib_tests/{test17.c => tst_print_result.c} | 10 ++++------
>  2 files changed, 5 insertions(+), 7 deletions(-)
>  rename lib/newlib_tests/{test17.c => tst_print_result.c} (80%)
>
> diff --git a/lib/newlib_tests/.gitignore b/lib/newlib_tests/.gitignore
> index 83a240223..9f53bbb99 100644
> --- a/lib/newlib_tests/.gitignore
> +++ b/lib/newlib_tests/.gitignore
> @@ -22,7 +22,7 @@ tst_device
>  tst_safe_fileops
>  tst_res_hexd
>  tst_strstatus
> -test17
> +tst_print_result
>  test18
>  test19
>  test20
> diff --git a/lib/newlib_tests/test17.c b/lib/newlib_tests/tst_print_result.c
> similarity index 80%
> rename from lib/newlib_tests/test17.c
> rename to lib/newlib_tests/tst_print_result.c
> index c0fc0bc30..0a2ca5af1 100644
> --- a/lib/newlib_tests/test17.c
> +++ b/lib/newlib_tests/tst_print_result.c
> @@ -1,12 +1,10 @@
>  // SPDX-License-Identifier: GPL-2.0-or-later
>  /*
> - * Copyright (c) 2017 Richard Palethorpe <rpalethorpe@suse.com>
> + * Copyright (c) 2017 Veronika Kabatova <vkabatov@redhat.com>
>   */
> -/* Basic functionality test for tst_fuzzy_sync.h similar to the atomic tests
> - * (test15.c). One thread writes to the odd indexes of an array while the
> - * other writes to the even. If the threads are not synchronised then they
> - * will probably write to the wrong indexes as they share an index variable
> - * which they should take it in turns to update.
> +
> +/*
> + * Test for cecbd0cb3 ("Fix buffer overflow in print_result() function")
>   */
>  
>  #include <stdlib.h>


-- 
Thank you,
Richard.

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

* [LTP] [PATCH 2/2] lib/tests: Rename test to tst_fuzzy_sync03.c
  2021-07-01  5:03 ` [LTP] [PATCH 2/2] lib/tests: Rename test to tst_fuzzy_sync03.c Petr Vorel
@ 2021-07-01  5:51   ` Richard Palethorpe
  2021-07-01  6:53     ` Petr Vorel
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Palethorpe @ 2021-07-01  5:51 UTC (permalink / raw)
  To: ltp

Hello Petr,

Petr Vorel <petr.vorel@gmail.com> writes:

> From: Petr Vorel <pvorel@suse.cz>
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

Acked-by: Richard Palethorpe <rpalethorpe@suse.com>

> ---
>  lib/newlib_tests/.gitignore                       | 2 +-
>  lib/newlib_tests/Makefile                         | 4 ++--
>  lib/newlib_tests/{test16.c => tst_fuzzy_sync03.c} | 0
>  3 files changed, 3 insertions(+), 3 deletions(-)
>  rename lib/newlib_tests/{test16.c => tst_fuzzy_sync03.c} (100%)
>
> diff --git a/lib/newlib_tests/.gitignore b/lib/newlib_tests/.gitignore
> index 9f53bbb99..b51f6a679 100644
> --- a/lib/newlib_tests/.gitignore
> +++ b/lib/newlib_tests/.gitignore
> @@ -13,7 +13,6 @@ test12
>  test13
>  test14
>  test15
> -test16
>  tst_capability01
>  tst_capability02
>  tst_cgroup01
> @@ -44,3 +43,4 @@ test_macros03
>  test_macros04
>  tst_fuzzy_sync01
>  tst_fuzzy_sync02
> +tst_fuzzy_sync03
> diff --git a/lib/newlib_tests/Makefile b/lib/newlib_tests/Makefile
> index 5bd68e95e..1fbf7649a 100644
> --- a/lib/newlib_tests/Makefile
> +++ b/lib/newlib_tests/Makefile
> @@ -6,8 +6,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
>  CFLAGS			+= -W -Wall
>  LDLIBS			+= -lltp
>  
> -test08 test09 test15 test16 tst_fuzzy_sync01 tst_fuzzy_sync02: CFLAGS += -pthread
> -test16 tst_expiration_timer: LDLIBS += -lrt
> +test08 test09 test15 tst_fuzzy_sync01 tst_fuzzy_sync02 tst_fuzzy_sync03: CFLAGS += -pthread
> +tst_expiration_timer tst_fuzzy_sync03: LDLIBS += -lrt
>  
>  ifeq ($(ANDROID),1)
>  FILTER_OUT_MAKE_TARGETS	+= test08
> diff --git a/lib/newlib_tests/test16.c b/lib/newlib_tests/tst_fuzzy_sync03.c
> similarity index 100%
> rename from lib/newlib_tests/test16.c
> rename to lib/newlib_tests/tst_fuzzy_sync03.c


-- 
Thank you,
Richard.

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

* [LTP] [PATCH 0/2] API tests cleanup
  2021-07-01  5:03 [LTP] [PATCH 0/2] API tests cleanup Petr Vorel
  2021-07-01  5:03 ` [LTP] [PATCH 1/2] lib/tests: Rename test tst_print_result.c Petr Vorel
  2021-07-01  5:03 ` [LTP] [PATCH 2/2] lib/tests: Rename test to tst_fuzzy_sync03.c Petr Vorel
@ 2021-07-01  5:55 ` xuyang2018.jy
  2021-07-01  6:11   ` Li Wang
  2021-07-01  6:27   ` Petr Vorel
  2 siblings, 2 replies; 10+ messages in thread
From: xuyang2018.jy @ 2021-07-01  5:55 UTC (permalink / raw)
  To: ltp

Hi Petr

Why only rename these two tests?

ps:IMO, test01-test21 also can ben rename to a meaningful name.

Best Regards
Yang Xu
> From: Petr Vorel<pvorel@suse.cz>
>
> Hi,
>
> preparation for v4 test API cleanup.
>
> Kind regards,
> Petr
>
> Petr Vorel (2):
>    lib/tests: Rename test tst_print_result.c
>    lib/tests: Rename test to tst_fuzzy_sync03.c
>
>   lib/newlib_tests/.gitignore                       |  4 ++--
>   lib/newlib_tests/Makefile                         |  4 ++--
>   lib/newlib_tests/{test16.c =>  tst_fuzzy_sync03.c} |  0
>   lib/newlib_tests/{test17.c =>  tst_print_result.c} | 10 ++++------
>   4 files changed, 8 insertions(+), 10 deletions(-)
>   rename lib/newlib_tests/{test16.c =>  tst_fuzzy_sync03.c} (100%)
>   rename lib/newlib_tests/{test17.c =>  tst_print_result.c} (80%)
>

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

* [LTP] [PATCH 0/2] API tests cleanup
  2021-07-01  5:55 ` [LTP] [PATCH 0/2] API tests cleanup xuyang2018.jy
@ 2021-07-01  6:11   ` Li Wang
  2021-07-01  6:27   ` Petr Vorel
  1 sibling, 0 replies; 10+ messages in thread
From: Li Wang @ 2021-07-01  6:11 UTC (permalink / raw)
  To: ltp

On Thu, Jul 1, 2021 at 1:55 PM xuyang2018.jy@fujitsu.com <
xuyang2018.jy@fujitsu.com> wrote:

> Hi Petr
>
> Why only rename these two tests?
>

I guess Petr is recently working on investigating the tst_fuzzy_sync01 fail
(I haven't got a chance to look into that issue) and do this by the
opportunity.

Anyway, the rename looks good at this point:).
Acked-by: Li Wang <liwang@redhat.com>


>
> ps:IMO, test01-test21 also can ben rename to a meaningful name.
>

+1, someone will be appreciated if they complete that in separate patches.

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210701/2fd24b11/attachment-0001.htm>

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

* [LTP] [PATCH 0/2] API tests cleanup
  2021-07-01  5:55 ` [LTP] [PATCH 0/2] API tests cleanup xuyang2018.jy
  2021-07-01  6:11   ` Li Wang
@ 2021-07-01  6:27   ` Petr Vorel
  2021-07-01  6:32     ` xuyang2018.jy
  1 sibling, 1 reply; 10+ messages in thread
From: Petr Vorel @ 2021-07-01  6:27 UTC (permalink / raw)
  To: ltp

Hi Xu,

> Hi Petr

> Why only rename these two tests?
There have been other tst_fuzzy_sync* tests, test17 had other issues to be
fixed.

> ps:IMO, test01-test21 also can ben rename to a meaningful name.

Sure, feel free to rename more.

Kind regards,
Petr

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

* [LTP] [PATCH 0/2] API tests cleanup
  2021-07-01  6:27   ` Petr Vorel
@ 2021-07-01  6:32     ` xuyang2018.jy
  0 siblings, 0 replies; 10+ messages in thread
From: xuyang2018.jy @ 2021-07-01  6:32 UTC (permalink / raw)
  To: ltp

Hi Petr, Li
> Hi Xu,
>
>> Hi Petr
>
>> Why only rename these two tests?
> There have been other tst_fuzzy_sync* tests, test17 had other issues to be
> fixed.
I see. Anyway, this rename patchset is ok.
Acked-by: Yang Xu <xuyang2018.jy@fujitsu.com>

Best Regards
Yang Xu
>
>> ps:IMO, test01-test21 also can ben rename to a meaningful name.
>
> Sure, feel free to rename more.
>
> Kind regards,
> Petr

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

* [LTP] [PATCH 2/2] lib/tests: Rename test to tst_fuzzy_sync03.c
  2021-07-01  5:51   ` Richard Palethorpe
@ 2021-07-01  6:53     ` Petr Vorel
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Vorel @ 2021-07-01  6:53 UTC (permalink / raw)
  To: ltp

Hi all,

thanks for your review, both patches merged.

Kind regards,
Petr

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

end of thread, other threads:[~2021-07-01  6:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01  5:03 [LTP] [PATCH 0/2] API tests cleanup Petr Vorel
2021-07-01  5:03 ` [LTP] [PATCH 1/2] lib/tests: Rename test tst_print_result.c Petr Vorel
2021-07-01  5:50   ` Richard Palethorpe
2021-07-01  5:03 ` [LTP] [PATCH 2/2] lib/tests: Rename test to tst_fuzzy_sync03.c Petr Vorel
2021-07-01  5:51   ` Richard Palethorpe
2021-07-01  6:53     ` Petr Vorel
2021-07-01  5:55 ` [LTP] [PATCH 0/2] API tests cleanup xuyang2018.jy
2021-07-01  6:11   ` Li Wang
2021-07-01  6:27   ` Petr Vorel
2021-07-01  6:32     ` xuyang2018.jy

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.