mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-10-23 08:22:00 +00:00
tests: SocketsTest: Fail test on write fail
Change-Id: Ib6b778a2225339ebd2eaa80b3fca6ee8d8646b23
This commit is contained in:
@@ -61,6 +61,7 @@ void *testReaderIP(void *param)
|
|||||||
|
|
||||||
int main(int argc, char * argv[] )
|
int main(int argc, char * argv[] )
|
||||||
{
|
{
|
||||||
|
int count;
|
||||||
|
|
||||||
if (signal(SIGALRM, sigalarm_handler) == SIG_ERR) {
|
if (signal(SIGALRM, sigalarm_handler) == SIG_ERR) {
|
||||||
perror("signal");
|
perror("signal");
|
||||||
@@ -82,7 +83,12 @@ int main(int argc, char * argv[] )
|
|||||||
sleep(1);
|
sleep(1);
|
||||||
|
|
||||||
for (int i=0; i<gNumToSend; i++) {
|
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);
|
sleep(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user