From 4f87e24f603653cdf7013074e100b54df3468065 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 10 Feb 2022 14:08:52 +0100 Subject: [PATCH 1/4] increase test limit --- tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp b/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp index d2a15137b..a63603387 100644 --- a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp +++ b/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp @@ -72,7 +72,7 @@ TEST_CASE("Command Executor", "[cmd-exec]") { result = cmdExecutor.check(bytesHaveBeenRead); REQUIRE(result != CommandExecutor::COMMAND_ERROR); usleep(500); - REQUIRE(limitIdx < 20); + REQUIRE(limitIdx < 50); } limitIdx = 0; CHECK(bytesHaveBeenRead == true); @@ -102,7 +102,7 @@ TEST_CASE("Command Executor", "[cmd-exec]") { result = cmdExecutor.check(bytesHaveBeenRead); REQUIRE(result != CommandExecutor::COMMAND_ERROR); usleep(500); - REQUIRE(limitIdx < 20); + REQUIRE(limitIdx < 50); } REQUIRE(result == HasReturnvaluesIF::RETURN_FAILED); REQUIRE(cmdExecutor.getLastError() == 1); From d53c7e119036665013d32f59fea46ffbd926a693 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Feb 2022 16:00:43 +0100 Subject: [PATCH 2/4] increase test limit --- tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp b/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp index a63603387..5ced030b3 100644 --- a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp +++ b/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp @@ -71,8 +71,9 @@ TEST_CASE("Command Executor", "[cmd-exec]") { limitIdx++; result = cmdExecutor.check(bytesHaveBeenRead); REQUIRE(result != CommandExecutor::COMMAND_ERROR); + // This ensures that the tests do not block indefinitely usleep(500); - REQUIRE(limitIdx < 50); + REQUIRE(limitIdx < 500); } limitIdx = 0; CHECK(bytesHaveBeenRead == true); @@ -101,8 +102,9 @@ TEST_CASE("Command Executor", "[cmd-exec]") { limitIdx++; result = cmdExecutor.check(bytesHaveBeenRead); REQUIRE(result != CommandExecutor::COMMAND_ERROR); + // This ensures that the tests do not block indefinitely usleep(500); - REQUIRE(limitIdx < 50); + REQUIRE(limitIdx < 500); } REQUIRE(result == HasReturnvaluesIF::RETURN_FAILED); REQUIRE(cmdExecutor.getLastError() == 1); From 0d38ac62d8e5e3a51bc456f60810abebc9a19c83 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Feb 2022 16:12:48 +0100 Subject: [PATCH 3/4] this should work an ALL systems --- tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp b/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp index 5ced030b3..e2e1e9d7d 100644 --- a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp +++ b/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp @@ -90,7 +90,7 @@ TEST_CASE("Command Executor", "[cmd-exec]") { std::string allTheReply(reinterpret_cast(largerReadBuffer)); // I am just going to assume that this string is the same across ping implementations // of different Linux systems - REQUIRE(allTheReply.find("localhost ping statistics") != std::string::npos); + REQUIRE(allTheReply.find("PING localhost") != std::string::npos); // Now check failing command result = cmdExecutor.load("false", false, false); From 22bc300902b134f36b01fe71ae4d85c4a03dbcec Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 14 Feb 2022 16:14:14 +0100 Subject: [PATCH 4/4] increase other limits --- tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp b/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp index e2e1e9d7d..3ad26876c 100644 --- a/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp +++ b/tests/src/fsfw_tests/unit/hal/testCommandExecutor.cpp @@ -45,7 +45,7 @@ TEST_CASE("Command Executor", "[cmd-exec]") { result = cmdExecutor.check(bytesHaveBeenRead); REQUIRE(result != CommandExecutor::COMMAND_ERROR); usleep(500); - REQUIRE(limitIdx < 5); + REQUIRE(limitIdx < 500); } limitIdx = 0;