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 <[email protected]>