[PATCH] osmo-trx[master]: tests: SocketsTest: Fail test on write fail

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Jan 15 09:44:33 UTC 2018


Review at  https://gerrit.osmocom.org/5782

tests: SocketsTest: Fail test on write fail

Change-Id: Ib6b778a2225339ebd2eaa80b3fca6ee8d8646b23
---
M tests/CommonLibs/SocketsTest.cpp
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/82/5782/1

diff --git a/tests/CommonLibs/SocketsTest.cpp b/tests/CommonLibs/SocketsTest.cpp
index 43c0616..c4e31d8 100644
--- a/tests/CommonLibs/SocketsTest.cpp
+++ b/tests/CommonLibs/SocketsTest.cpp
@@ -83,7 +83,12 @@
   sleep(1);
 
   for (int i=0; i<gNumToSend; i++) {
-    socket1.write("Hello IP land");
+    CERR("write");
+    count = socket1.write("Hello IP land");
+    if (count < 0) {
+      COUT("FAIL: write");
+      exit(EXIT_FAILURE);
+    }
     sleep(1);
   }
 

-- 
To view, visit https://gerrit.osmocom.org/5782
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib6b778a2225339ebd2eaa80b3fca6ee8d8646b23
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list