浏览代码

test: get out of the endless while loop, when bind failed

When bind() fails in this test, then /tmp get filled up with
temp files and upcoming tests will fail, because they need to create
temp files, too. Better exit from the loop.
Test still needs to be investigated to fix the failing bind().

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Waldemar Brodkorb 10 年之前
父节点
当前提交
697dbb016e
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      test/nptl/tst-cancel4.c

+ 2 - 0
test/nptl/tst-cancel4.c

@@ -1015,6 +1015,8 @@ tf_accept (void *arg)
       if (++tries > 10)
       if (++tries > 10)
 	{
 	{
 	  printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__);
 	  printf ("%s: too many unsuccessful bind calls\n", __FUNCTION__);
+	  /* prevent endless loop, when bind fails forever */
+	  exit (1);
 	}
 	}
 
 
       strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-1-XXXXXX");
       strcpy (sun.sun_path, "/tmp/tst-cancel4-socket-1-XXXXXX");