]> git.corax.cc Git - toolbox/commitdiff
test/ipc: Fix comparisons in test cases for ipc_endpoint_recv()
authorMatthias Kruk <m@m10k.eu>
Sat, 17 Sep 2022 05:17:38 +0000 (14:17 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 17 Sep 2022 05:17:38 +0000 (14:17 +0900)
In the test cases for ipc_endpoint_recv(), the comparisons used to
check the correctness of the received data are inverted, causing the
tests to fail when they should succeed and vice-versa.

This commit inverts the incorrect conditions.

test/ipc_spec.sh

index a8a52b417833492121cf42081a30416935a1b8b9..1f956b4e537cb3adfa9ad77d3778efc85ff0a84b 100644 (file)
@@ -625,7 +625,7 @@ Describe "ipc_endpoint_recv"
            if ipc_endpoint_send "-" "$endpoint" "$data" &&
               msg=$(ipc_endpoint_recv "$endpoint") &&
               msg=$(ipc_msg_get_data "$msg") &&
-              [[ "$msg" != "$data" ]]; then
+              [[ "$msg" == "$data" ]]; then
                    res=0
            fi
 
@@ -655,7 +655,7 @@ Describe "ipc_endpoint_recv"
            if ipc_endpoint_send "-" "$endpoint" "$data" &&
               msg=$(ipc_endpoint_recv "$endpoint") &&
               msg=$(ipc_msg_get_data "$msg") &&
-              [[ "$msg" != "$data" ]]; then
+              [[ "$msg" == "$data" ]]; then
                    res=0
            fi