All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-devel] [PATCH 1/2] multipath-tools tests: unversioned .so for valgrind tests
@ 2020-12-18 22:27 mwilck
  2020-12-18 22:27 ` [dm-devel] [PATCH 2/2] multipath-tools unit tests: fix memory leaks in mpathvalid tests mwilck
  2020-12-18 23:19 ` [dm-devel] [PATCH 1/2] multipath-tools tests: unversioned .so for valgrind tests Benjamin Marzinski
  0 siblings, 2 replies; 4+ messages in thread
From: mwilck @ 2020-12-18 22:27 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

From: Martin Wilck <mwilck@suse.com>

We need to the same thing for valgrind tests as we did in
448752f ("libmultipath: create separate .so for unit tests").

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/Makefile b/tests/Makefile
index 54da774..50673fa 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -76,7 +76,7 @@ lib/libchecktur.so:
 
 %.vgr:  %-test lib/libchecktur.so
 	@echo == running valgrind for $< ==
-	@LD_LIBRARY_PATH=$(multipathdir):$(mpathcmddir) \
+	@LD_LIBRARY_PATH=.:$(mpathcmddir) \
 		valgrind --leak-check=full --error-exitcode=128 ./$< >$@ 2>&1
 
 OBJS = $(TESTS:%=%.o) $(HELPERS)
-- 
2.29.0


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


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

* [dm-devel] [PATCH 2/2] multipath-tools unit tests: fix memory leaks in mpathvalid tests
  2020-12-18 22:27 [dm-devel] [PATCH 1/2] multipath-tools tests: unversioned .so for valgrind tests mwilck
@ 2020-12-18 22:27 ` mwilck
  2020-12-18 23:20   ` Benjamin Marzinski
  2020-12-18 23:19 ` [dm-devel] [PATCH 1/2] multipath-tools tests: unversioned .so for valgrind tests Benjamin Marzinski
  1 sibling, 1 reply; 4+ messages in thread
From: mwilck @ 2020-12-18 22:27 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

From: Martin Wilck <mwilck@suse.com>

They break "make valgrind-test".

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 tests/mpathvalid.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/mpathvalid.c b/tests/mpathvalid.c
index 5ffabb9..cfe4bae 100644
--- a/tests/mpathvalid.c
+++ b/tests/mpathvalid.c
@@ -381,6 +381,7 @@ static void test_mpathvalid_is_path_good2(void **state)
 	assert_int_equal(mpathvalid_is_path(test_dev, MPATH_DEFAULT, &wwid,
 					    wwids, 4), MPATH_IS_VALID);
 	assert_string_equal(wwid, TEST_WWID);
+	free(wwid);
 }
 
 static void test_mpathvalid_is_path_good3(void **state)
@@ -395,6 +396,7 @@ static void test_mpathvalid_is_path_good3(void **state)
 	assert_int_equal(mpathvalid_is_path(test_dev, MPATH_SMART, &wwid,
 					    wwids, 4), MPATH_IS_VALID);
 	assert_string_equal(wwid, TEST_WWID);
+	free(wwid);
 }
 
 /* mabybe valid with no matching paths */
@@ -410,6 +412,7 @@ static void test_mpathvalid_is_path_good4(void **state)
 	assert_int_equal(mpathvalid_is_path(test_dev, MPATH_DEFAULT, &wwid,
 					    wwids, 4), MPATH_IS_MAYBE_VALID);
 	assert_string_equal(wwid, TEST_WWID);
+	free(wwid);
 }
 
 /* maybe valid with matching paths */
@@ -425,6 +428,7 @@ static void test_mpathvalid_is_path_good5(void **state)
 	assert_int_equal(mpathvalid_is_path(test_dev, MPATH_DEFAULT, &wwid,
 					    wwids, 4), MPATH_IS_VALID);
 	assert_string_equal(wwid, TEST_WWID);
+	free(wwid);
 }
 
 #define setup_test(name) \
-- 
2.29.0


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


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

* Re: [dm-devel] [PATCH 1/2] multipath-tools tests: unversioned .so for valgrind tests
  2020-12-18 22:27 [dm-devel] [PATCH 1/2] multipath-tools tests: unversioned .so for valgrind tests mwilck
  2020-12-18 22:27 ` [dm-devel] [PATCH 2/2] multipath-tools unit tests: fix memory leaks in mpathvalid tests mwilck
@ 2020-12-18 23:19 ` Benjamin Marzinski
  1 sibling, 0 replies; 4+ messages in thread
From: Benjamin Marzinski @ 2020-12-18 23:19 UTC (permalink / raw)
  To: mwilck; +Cc: dm-devel

On Fri, Dec 18, 2020 at 11:27:13PM +0100, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
> 
> We need to the same thing for valgrind tests as we did in
> 448752f ("libmultipath: create separate .so for unit tests").
> 
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
>  tests/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/Makefile b/tests/Makefile
> index 54da774..50673fa 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -76,7 +76,7 @@ lib/libchecktur.so:
>  
>  %.vgr:  %-test lib/libchecktur.so
>  	@echo == running valgrind for $< ==
> -	@LD_LIBRARY_PATH=$(multipathdir):$(mpathcmddir) \
> +	@LD_LIBRARY_PATH=.:$(mpathcmddir) \
>  		valgrind --leak-check=full --error-exitcode=128 ./$< >$@ 2>&1
>  
>  OBJS = $(TESTS:%=%.o) $(HELPERS)
> -- 
> 2.29.0

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


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

* Re: [dm-devel] [PATCH 2/2] multipath-tools unit tests: fix memory leaks in mpathvalid tests
  2020-12-18 22:27 ` [dm-devel] [PATCH 2/2] multipath-tools unit tests: fix memory leaks in mpathvalid tests mwilck
@ 2020-12-18 23:20   ` Benjamin Marzinski
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Marzinski @ 2020-12-18 23:20 UTC (permalink / raw)
  To: mwilck; +Cc: dm-devel

On Fri, Dec 18, 2020 at 11:27:14PM +0100, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
> 
> They break "make valgrind-test".
> 
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> Signed-off-by: Martin Wilck <mwilck@suse.com>
> ---
>  tests/mpathvalid.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/mpathvalid.c b/tests/mpathvalid.c
> index 5ffabb9..cfe4bae 100644
> --- a/tests/mpathvalid.c
> +++ b/tests/mpathvalid.c
> @@ -381,6 +381,7 @@ static void test_mpathvalid_is_path_good2(void **state)
>  	assert_int_equal(mpathvalid_is_path(test_dev, MPATH_DEFAULT, &wwid,
>  					    wwids, 4), MPATH_IS_VALID);
>  	assert_string_equal(wwid, TEST_WWID);
> +	free(wwid);
>  }
>  
>  static void test_mpathvalid_is_path_good3(void **state)
> @@ -395,6 +396,7 @@ static void test_mpathvalid_is_path_good3(void **state)
>  	assert_int_equal(mpathvalid_is_path(test_dev, MPATH_SMART, &wwid,
>  					    wwids, 4), MPATH_IS_VALID);
>  	assert_string_equal(wwid, TEST_WWID);
> +	free(wwid);
>  }
>  
>  /* mabybe valid with no matching paths */
> @@ -410,6 +412,7 @@ static void test_mpathvalid_is_path_good4(void **state)
>  	assert_int_equal(mpathvalid_is_path(test_dev, MPATH_DEFAULT, &wwid,
>  					    wwids, 4), MPATH_IS_MAYBE_VALID);
>  	assert_string_equal(wwid, TEST_WWID);
> +	free(wwid);
>  }
>  
>  /* maybe valid with matching paths */
> @@ -425,6 +428,7 @@ static void test_mpathvalid_is_path_good5(void **state)
>  	assert_int_equal(mpathvalid_is_path(test_dev, MPATH_DEFAULT, &wwid,
>  					    wwids, 4), MPATH_IS_VALID);
>  	assert_string_equal(wwid, TEST_WWID);
> +	free(wwid);
>  }
>  
>  #define setup_test(name) \
> -- 
> 2.29.0

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


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

end of thread, other threads:[~2020-12-18 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18 22:27 [dm-devel] [PATCH 1/2] multipath-tools tests: unversioned .so for valgrind tests mwilck
2020-12-18 22:27 ` [dm-devel] [PATCH 2/2] multipath-tools unit tests: fix memory leaks in mpathvalid tests mwilck
2020-12-18 23:20   ` Benjamin Marzinski
2020-12-18 23:19 ` [dm-devel] [PATCH 1/2] multipath-tools tests: unversioned .so for valgrind tests Benjamin Marzinski

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.