tests: SocketsTest: Fail test on write fail

Change-Id: Ib6b778a2225339ebd2eaa80b3fca6ee8d8646b23
This commit is contained in:
Pau Espin 2018-01-15 10:43:31 +01:00
parent 57a66c2f1b
commit 33320f7be5
1 changed files with 6 additions and 1 deletions

View File

@ -83,7 +83,12 @@ int main(int argc, char * argv[] )
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);
}