[PATCH BlueZ 2/5] shared/tester: retain test failure status

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

 



If a test has called tester_test_failed, consider the test failed, even
if the test also called tester_test_passed/abort.

This avoids reporting success for misbehaving tests that call the
status report functions multiple times.
---
 src/shared/tester.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/shared/tester.c b/src/shared/tester.c
index 34f807556..a1ee5b687 100644
--- a/src/shared/tester.c
+++ b/src/shared/tester.c
@@ -622,6 +622,9 @@ static void test_result(enum test_result result)
 		test->timeout_id = 0;
 	}
 
+	if (test->result == TEST_RESULT_FAILED)
+		result = TEST_RESULT_FAILED;
+
 	test->result = result;
 	switch (result) {
 	case TEST_RESULT_PASSED:
-- 
2.40.1




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux