[libgpiod][PATCH] tests: remove debug asserts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove asserts that are a hangover from debugging test cases.

Signed-off-by: Kent Gibson <warthog618@xxxxxxxxx>
---

Those asserts were initially there to debug the test cases when they
were failing, and I forgot to remove them.  The are not part of the
test, as errno is indeterminate unless the function returns -1.
And that clearly isn't the case as the asserts immediately prior verify.
Having them there can cause spurious test failures and head scratching.

 tests/tests-line.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tests/tests-line.c b/tests/tests-line.c
index 97b7df9..334046f 100644
--- a/tests/tests-line.c
+++ b/tests/tests-line.c
@@ -980,7 +980,6 @@ GPIOD_TEST_CASE(misc_flags_work_together, 0, { 8 })
 
 	ret = gpiod_line_get_value(line);
 	g_assert_cmpint(ret, ==, 1);
-	g_assert_cmpint(errno, ==, 0);
 
 	gpiod_line_release(line);
 
@@ -1001,7 +1000,6 @@ GPIOD_TEST_CASE(misc_flags_work_together, 0, { 8 })
 
 	ret = gpiod_line_get_value(line);
 	g_assert_cmpint(ret, ==, 0);
-	g_assert_cmpint(errno, ==, 0);
 
 	gpiod_line_release(line);
 }
-- 
2.26.2




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux