Skip to contentSkip to conversation

testcases/network/sctp: update sctp test to upstream version 1.0.15

PATCH In review Hangbin Liu 2 participants 5 messages Jul 23, 2013 – Aug 5, 2013 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testcases/network/sctp: update sctp test to upstream version 1.0.15

SCTP test in ltp is based on lksctp. But the last patch for sctp in ltp is 2006. It has changed a lot and fixed many bugs. Update sctp test to upstream version 1.0.15 now.

Format code with
for file in find ~/git/ltp/testcases/network/sctp -name *.c -o -name *.h; do

	~/git/linux/scripts/cleanfile $file
	~/git/linux/scripts/Lindent $file
	rm -f ${file}~

done

---
 .../sctp/func_tests/test_1_to_1_accept_close.c     |  26 +-
 .../network/sctp/func_tests/test_1_to_1_addrs.c    |  44 +-
 .../network/sctp/func_tests/test_1_to_1_connect.c  |  28 +-
 .../network/sctp/func_tests/test_1_to_1_connectx.c |  52 ++-
 .../network/sctp/func_tests/test_1_to_1_events.c   |   8 +-
 .../sctp/func_tests/test_1_to_1_initmsg_connect.c  |   6 +-
 .../network/sctp/func_tests/test_1_to_1_nonblock.c |  34 +-
 .../network/sctp/func_tests/test_1_to_1_recvfrom.c |  26 +-
 .../network/sctp/func_tests/test_1_to_1_recvmsg.c  |  27 +-
 .../network/sctp/func_tests/test_1_to_1_rtoinfo.c  |  16 +-
 .../network/sctp/func_tests/test_1_to_1_send.c     |  23 +-
 .../network/sctp/func_tests/test_1_to_1_sendmsg.c  |  50 +--
 .../network/sctp/func_tests/test_1_to_1_sendto.c   |  14 +-
 .../network/sctp/func_tests/test_1_to_1_shutdown.c |  30 +-
 .../func_tests/test_1_to_1_socket_bind_listen.c    |  38 +-
 .../network/sctp/func_tests/test_1_to_1_sockopt.c  |  72 +--
 .../network/sctp/func_tests/test_1_to_1_threads.c  |  46 +-
 .../network/sctp/func_tests/test_assoc_abort.c     |  17 +-
 .../network/sctp/func_tests/test_assoc_shutdown.c  |  12 +-
 testcases/network/sctp/func_tests/test_autoclose.c |  13 +-
 testcases/network/sctp/func_tests/test_basic.c     |  22 +-
 testcases/network/sctp/func_tests/test_connect.c   |  30 +-
 testcases/network/sctp/func_tests/test_connectx.c  |  45 +-
 testcases/network/sctp/func_tests/test_fragments.c |  26 +-
 testcases/network/sctp/func_tests/test_getname.c   |  44 +-
 .../network/sctp/func_tests/test_inaddr_any.c      |  16 +-
 testcases/network/sctp/func_tests/test_peeloff.c   |  16 +-
 testcases/network/sctp/func_tests/test_recvmsg.c   |   8 +-
 .../sctp/func_tests/test_sctp_sendrecvmsg.c        |  45 +-
 testcases/network/sctp/func_tests/test_sockopt.c   | 312 +++++++++++--
 testcases/network/sctp/func_tests/test_tcp_style.c |  50 +--
 .../network/sctp/func_tests/test_timetolive.c      |  32 +-
 testcases/network/sctp/include/netinet/sctp.h      | 491 ++++++++++++++-------
 testcases/network/sctp/lib/addrs.c                 |  98 ++--
 testcases/network/sctp/lib/bindx.c                 |   4 +-
 testcases/network/sctp/lib/connectx.c              | 136 +++++-
 testcases/network/sctp/lib/opt_info.c              |   7 +-
 testcases/network/sctp/lib/peeloff.c               |   4 +-
 testcases/network/sctp/lib/recvmsg.c               |   6 +-
 testcases/network/sctp/lib/sendmsg.c               |   6 +-
 testcases/network/sctp/testlib/sctputil.c          |  53 +--
 testcases/network/sctp/testlib/sctputil.h          | 104 +++--
 42 files changed, 1331 insertions(+), 806 deletions(-)
testcases/network/sctp/func_tests/test_1_to_1_accept_close.c +13 -13
index e9a13e7..8bfb1bd 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
@@ -21,13 +21,13 @@
  * TEST9: valid socket descriptor
  * TEST10: Closed socket descriptor
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -127,7 +127,7 @@ int main(int argc, char *argv[])
 	/* accept() TEST1: Bad socket descriptor EBADF, Expected error */
 	error = accept(-1, (struct sockaddr *)&acpt_addr, &len);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, NULL, "accept with a bad socket descriptor"
+		tst_brkm(TBROK, tst_exit, "accept with a bad socket descriptor"
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() with a bad socket descriptor - EBADF");
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
 	/*accept() TEST2: Invalid socket ENOTSOCK, Expected error */
 	error = accept(0, (struct sockaddr *)&acpt_addr, &len);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, NULL, "accept with invalid socket"
+		tst_brkm(TBROK, tst_exit, "accept with invalid socket"
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() with invalid socket - ENOTSOCK");
@@ -143,7 +143,7 @@ int main(int argc, char *argv[])
 	/*accept() TEST3: Invalid address EFAULT, Expected error */
 	error = accept(lstn_sk, (struct sockaddr *)-1, &len);
 	if (error != -1 || errno != EFAULT)
-		tst_brkm(TBROK, NULL, "accept with invalid address"
+		tst_brkm(TBROK, tst_exit, "accept with invalid address"
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() with invalid address - EFAULT");
@@ -153,7 +153,7 @@ int main(int argc, char *argv[])
 	/*accept() TEST4: on a non-listening socket EINVAL, Expected error */
 	error = accept(sk, (struct sockaddr *)&acpt_addr, &len);
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, NULL, "accept on a non-listening socket"
+		tst_brkm(TBROK, tst_exit, "accept on a non-listening socket"
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() on a non-listening socket - EINVAL");
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
 	/*accept() TEST5: On a established socket EINVAL, Expected error */
 	error = accept(acpt_sk, (struct sockaddr *)&acpt_addr, &len);
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, NULL, "accept on an established socket"
+		tst_brkm(TBROK, tst_exit, "accept on an established socket"
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() on an established socket - EINVAL");
@@ -179,7 +179,7 @@ int main(int argc, char *argv[])
 	/*accept() TEST6: On the CLOSED association should succeed */
 	acpt_sk = accept(lstn_sk, (struct sockaddr *)&acpt_addr, &len);
 	if (acpt_sk < 0)
-		tst_brkm(TBROK, NULL, "accept a closed association"
+		tst_brkm(TBROK, tst_exit, "accept a closed association"
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() a closed association - SUCCESS");
@@ -200,7 +200,7 @@ int main(int argc, char *argv[])
 	/*close() TEST8: Bad socket descriptor, EBADF Expected error */
 	error = close(-1);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, NULL, "close with a bad socket descriptor "
+		tst_brkm(TBROK, tst_exit, "close with a bad socket descriptor "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "close() with a bad socket descriptor - EBADF");
@@ -208,7 +208,7 @@ int main(int argc, char *argv[])
 	/*close() TEST9: valid socket descriptor should succeed */
 	error = close(sk);
 	if (error < 0)
-		tst_brkm(TBROK, NULL, "close with a valid socket descriptor"
+		tst_brkm(TBROK, tst_exit, "close with a valid socket descriptor"
 			 " error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "close() with a valid socket descriptor - SUCCESS");
@@ -216,7 +216,7 @@ int main(int argc, char *argv[])
 	/*close() TEST10: closed socket descriptor, EBADF Expected error */
 	error = close(sk);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, NULL, "close with a closed socket "
+		tst_brkm(TBROK, tst_exit, "close with a closed socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "close() with a closed socket descriptor - EBADF");
@@ -227,5 +227,5 @@ int main(int argc, char *argv[])
 		close(clnt2_sk[i]);
 	}
 
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_1_to_1_addrs.c +18 -26

167 lines not on this page · raw message

testcases/network/sctp/func_tests/test_1_to_1_connect.c +14 -14
index 93f2caa..8ef181d 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
@@ -15,13 +15,13 @@
  * TEST9: On established socket
  * TEST10: Connect to re-establish a closed association.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
 	len = sizeof(struct sockaddr_in);
 	error = connect(-1, (const struct sockaddr *)&conn_addr, len);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, NULL, "connect with bad socket "
+		tst_brkm(TBROK, tst_exit, "connect with bad socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with bad socket descriptor - EBADF");
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
 	/*connect () TEST2: Invalid socket, ENOTSOCK Expected error */
 	error = connect(0, (const struct sockaddr *)&conn_addr, len);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, NULL, "connect with invalid socket "
+		tst_brkm(TBROK, tst_exit, "connect with invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid socket - ENOTSOCK");
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
 	/*connect () TEST3: Invalid address, EFAULT Expected error */
 	error = connect(sk, (const struct sockaddr *)-1, len);
 	if (error != -1 || errno != EFAULT)
-		tst_brkm(TBROK, NULL, "connect with invalid address "
+		tst_brkm(TBROK, tst_exit, "connect with invalid address "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid address - EFAULT");
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
 	/*connect () TEST4: Invalid address length, EINVAL Expected error */
 	error = connect(sk, (const struct sockaddr *)&conn_addr, (len - 3));
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, NULL, "connect with invalid address length "
+		tst_brkm(TBROK, tst_exit, "connect with invalid address length "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid address length - EINVAL");
@@ -145,7 +145,7 @@ int main(int argc, char *argv[])
 	conn_addr.sin_family = 9090;	/*Assigning invalid address family */
 	error = connect(sk, (const struct sockaddr *)&conn_addr, len);
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, NULL, "connect with invalid address family "
+		tst_brkm(TBROK, tst_exit, "connect with invalid address family "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() with invalid address family - EINVAL");
@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
 		error = connect(clnt_sk[i], (const struct sockaddr *)&conn_addr,
 				len);
 		if (error < 0)
-			tst_brkm(TBROK, NULL, "valid blocking connect "
+			tst_brkm(TBROK, tst_exit, "valid blocking connect "
 				 "error:%d, errno:%d", error, errno);
 	}
 
@@ -170,7 +170,7 @@ int main(int argc, char *argv[])
 	/*Now that accept queue is full, the below connect should fail */
 	error = connect(clnt2_sk, (const struct sockaddr *)&conn_addr, len);
 	if (error != -1 || errno != ECONNREFUSED)
-		tst_brkm(TBROK, NULL, "connect when accept queue is full "
+		tst_brkm(TBROK, tst_exit, "connect when accept queue is full "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() when accept queue is full - ECONNREFUSED");
@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
 	/*connect () TEST8: from a listening socket, EISCONN Expect error */
 	error = connect(lstn_sk, (const struct sockaddr *)&lstn_addr, len);
 	if (error != -1 || errno != EISCONN)
-		tst_brkm(TBROK, NULL, "connect on a listening socket "
+		tst_brkm(TBROK, tst_exit, "connect on a listening socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() on a listening socket - EISCONN");
@@ -192,7 +192,7 @@ int main(int argc, char *argv[])
 	i = 0;
 	error = connect(acpt_sk[i], (const struct sockaddr *)&lstn_addr, len);
 	if (error != -1 || errno != EISCONN)
-		tst_brkm(TBROK, NULL, "connect on an established socket "
+		tst_brkm(TBROK, tst_exit, "connect on an established socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() on an established socket - EISCONN");
@@ -207,7 +207,7 @@ int main(int argc, char *argv[])
 	 */
 	error = connect(sk1, (const struct sockaddr *)&conn_addr, len);
 	if (error < 0)
-		tst_brkm(TBROK, NULL, "Re-establish an association that "
+		tst_brkm(TBROK, tst_exit, "Re-establish an association that "
 			 "is closed error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect() to re-establish a closed association - "
@@ -217,5 +217,5 @@ int main(int argc, char *argv[])
 	close(sk1);
 	close(lstn_sk);
 
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_1_to_1_connectx.c +28 -24

138 lines not on this page · raw message

testcases/network/sctp/func_tests/test_1_to_1_events.c +4 -4
index 514b25b..28056d7 100644
@@ -1,16 +1,16 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
  * This test tests the events for 1-1 style sockets.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -184,5 +184,5 @@ int main(int argc, char *argv[])
 	close(svr_sk);
 	close(acpt_sk);
 
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_1_to_1_initmsg_connect.c +3 -3
index 11b629a..bb60abf 100644
@@ -1,17 +1,17 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
  * When init timeout is set to zero, a connect () crashed the system. This case
  * tests the fix for the same.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
testcases/network/sctp/func_tests/test_1_to_1_nonblock.c +13 -21
index 7b66b20..1f15dd1 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
@@ -12,13 +12,13 @@
  * TEST5: recvmsg() should succeed if data present to receive in non blocking
  *	  mode
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -68,14 +68,11 @@ int main(int argc, char *argv[])
 	struct msghdr outmessage;
 	struct msghdr inmessage;
 	char *message = "hello, world!\n";
-	struct iovec iov;
 	struct iovec iov_rcv;
 	struct sctp_sndrcvinfo *sinfo;
-	int count;
 	char outcmsg[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))];
 	struct cmsghdr *cmsg;
 	struct iovec out_iov;
-	char *buffer_snd;
 	char *buffer_rcv;
 	char incmsg[CMSG_SPACE(sizeof(sctp_cmsg_data_t))];
 
@@ -113,18 +110,18 @@ int main(int argc, char *argv[])
 	/*Setting server socket non-blocking */
 	sflag = fcntl(lstn_sk, F_GETFL, 0);
 	if (sflag < 0)
-		tst_brkm(TBROK, NULL, "fcnt F_GETFL failed "
+		tst_brkm(TBROK, tst_exit, "fcnt F_GETFL failed "
 			 "sflag:%d, errno:%d", sflag, errno);
 
 	error = fcntl(lstn_sk, F_SETFL, sflag | O_NONBLOCK);
 	if (error < 0)
-		tst_brkm(TBROK, NULL, "fcnt F_SETFL failed "
+		tst_brkm(TBROK, tst_exit, "fcnt F_SETFL failed "
 			 "error:%d, errno:%d", error, errno);
 
 	/* TEST1: accept should return EAGAIN instead blocking. */
 	error = accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 	if (error != -1 || errno != EAGAIN)
-		tst_brkm(TBROK, NULL, "non-blocking accept "
+		tst_brkm(TBROK, tst_exit, "non-blocking accept "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking accept() - EAGAIN");
@@ -133,17 +130,17 @@ int main(int argc, char *argv[])
 	/*Set client socket as non-blocking */
 	cflag = fcntl(sk, F_GETFL, 0);
 	if (cflag < 0)
-		tst_brkm(TBROK, NULL, "fcnt F_GETFL failed "
+		tst_brkm(TBROK, tst_exit, "fcnt F_GETFL failed "
 			 "cflag:%d, errno:%d", cflag, errno);
 
 	error = fcntl(sk, F_SETFL, sflag | O_NONBLOCK);
 	if (error < 0)
-		tst_brkm(TBROK, NULL, "fcnt F_SETFL failed "
+		tst_brkm(TBROK, tst_exit, "fcnt F_SETFL failed "
 			 "error:%d, errno:%d", error, errno);
 
 	error = connect(sk, (const struct sockaddr *)&conn_addr, len);
 	if (error != -1 || errno != EINPROGRESS)
-		tst_brkm(TBROK, NULL, "non-blocking connect "
+		tst_brkm(TBROK, tst_exit, "non-blocking connect "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking connect() - EINPROGRESS");
@@ -151,14 +148,12 @@ int main(int argc, char *argv[])
 	/* TEST3: Now that connect() called, accept will succeed */
 	acpt_sk = accept(lstn_sk, (struct sockaddr *)&svr_addr, &len);
 	if (acpt_sk < 0)
-		tst_brkm(TBROK, NULL, "accept after a non-blocking connect "
+		tst_brkm(TBROK, tst_exit, "accept after a non-blocking connect "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "accept() after a non-blocking connect - SUCCESS");
 
 	memset(&outmessage, 0, sizeof(outmessage));
-	buffer_snd = malloc(REALLY_BIG);
-
 	outmessage.msg_name = &svr_addr;
 	outmessage.msg_namelen = sizeof(svr_addr);
 	outmessage.msg_iov = &out_iov;
@@ -175,10 +170,7 @@ int main(int argc, char *argv[])
 	sinfo = (struct sctp_sndrcvinfo *)CMSG_DATA(cmsg);
 	memset(sinfo, 0x00, sizeof(struct sctp_sndrcvinfo));
 
-	iov.iov_base = buffer_snd;
-	iov.iov_len = REALLY_BIG;
 	outmessage.msg_iov->iov_base = message;
-
 	outmessage.msg_iov->iov_len = strlen(message) + 1;
 
 	memset(&inmessage, 0, sizeof(inmessage));
@@ -196,12 +188,12 @@ int main(int argc, char *argv[])
 	/* TEST4: recvmsg() should return EAGAIN instead blocking */
 	error = recvmsg(sk, &inmessage, MSG_WAITALL);
 	if (error != -1 || errno != EAGAIN)
-		tst_brkm(TBROK, NULL, "non-blocking recvmsg "
+		tst_brkm(TBROK, tst_exit, "non-blocking recvmsg "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking recvmsg() - EAGAIN");
 
-	count = test_sendmsg(acpt_sk, &outmessage, flag, msg_count);
+	test_sendmsg(acpt_sk, &outmessage, flag, msg_count);
 
 	/* TEST5: recvmsg() should succeed now as data is available. */
 	error = test_recvmsg(sk, &inmessage, flag);
@@ -212,5 +204,5 @@ int main(int argc, char *argv[])
 
 	close(lstn_sk);
 	close(acpt_sk);
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_1_to_1_recvfrom.c +13 -13
index 658692b..b75016d 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
@@ -12,13 +12,13 @@
  * TEST6: Reading the pending message on socket that received SHUTDOWN
  * TEST7: No more message and association is shutdown
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -62,7 +62,7 @@ int TST_CNT = 0;
 
 int main(int argc, char *argv[])
 {
-	int ret, msg_count;
+	int msg_count;
 	socklen_t len;
 	int sk, pf_class, lstn_sk, acpt_sk, flag;
 	char *message = "hello, world!\n";
@@ -115,7 +115,7 @@ int main(int argc, char *argv[])
 	count = recvfrom(-1, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != EBADF)
-		tst_brkm(TBROK, NULL, "recvfrom with a bad socket "
+		tst_brkm(TBROK, tst_exit, "recvfrom with a bad socket "
 			 "descriptor count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvfrom() with a bad socket descriptor - EBADF");
@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
 	count = recvfrom(0, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, NULL, "recvfrom with invalid socket "
+		tst_brkm(TBROK, tst_exit, "recvfrom with invalid socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvfrom() with invalid socket - ENOTSOCK");
@@ -133,7 +133,7 @@ int main(int argc, char *argv[])
 	count = recvfrom(acpt_sk, (char *)-1, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != EFAULT)
-		tst_brkm(TBROK, NULL, "recvfrom with invalid message "
+		tst_brkm(TBROK, tst_exit, "recvfrom with invalid message "
 			 "pointer count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvfrom() with invalid message ptr - EFAULT");
@@ -142,20 +142,20 @@ int main(int argc, char *argv[])
 	count = recvfrom(lstn_sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != ENOTCONN)
-		tst_brkm(TBROK, NULL, "recvfrom on listening socket "
+		tst_brkm(TBROK, tst_exit, "recvfrom on listening socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvfrom() on listening socket - ENOTCONN");
 
 	count = test_send(acpt_sk, message, msg_count, flag);
 
-	ret = test_shutdown(sk, SHUT_WR);
+	test_shutdown(sk, SHUT_WR);
 
 	/*recvfrom () TEST5:reading on a socket that received SHUTDOWN */
 	count = recvfrom(acpt_sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count < 0)
-		tst_brkm(TBROK, NULL, "recvfrom on a socket that has "
+		tst_brkm(TBROK, tst_exit, "recvfrom on a socket that has "
 			 "received shutdown count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvfrom() on a socket that has received shutdown - "
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
 	count = recvfrom(sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count < 0)
-		tst_brkm(TBROK, NULL, "recvfrom on a socket with pending "
+		tst_brkm(TBROK, tst_exit, "recvfrom on a socket with pending "
 			 "message that has sent shutdown count:%d, errno:%d",
 			 count, errno);
 
@@ -178,7 +178,7 @@ int main(int argc, char *argv[])
 	count = recvfrom(sk, message_rcv, msg_count, flag,
 			 (struct sockaddr *)&svr_addr, &len);
 	if (count != -1 || errno != ENOTCONN)
-		tst_brkm(TBROK, NULL, "recvfrom on a socket with no "
+		tst_brkm(TBROK, tst_exit, "recvfrom on a socket with no "
 			 "pending messages and has sent shutdown count:%d, "
 			 "errno:%d", count, errno);
 
@@ -188,6 +188,6 @@ int main(int argc, char *argv[])
 	close(sk);
 	close(lstn_sk);
 	close(acpt_sk);
-	tst_exit();
+	return 0;
 
 }
testcases/network/sctp/func_tests/test_1_to_1_recvmsg.c +13 -14
index a40b16d..3e02678 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
@@ -13,13 +13,13 @@
  * TEST7: Reading the pending message socket that received SHUTDOWN
  * TEST8: No more message and association is shutdown
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -64,7 +64,6 @@ int TST_CNT = 0;
 int main(int argc, char *argv[])
 {
 	socklen_t len;
-	int ret;
 	int sk, pf_class, lstn_sk, acpt_sk;
 	int flag = 0;
 	struct msghdr inmessage;
@@ -122,7 +121,7 @@ int main(int argc, char *argv[])
 	/*recvmsg () TEST1: Bad socket descriptor, EBADF Expected error */
 	count = recvmsg(-1, &inmessage, flag);
 	if (count != -1 || errno != EBADF)
-		tst_brkm(TBROK, NULL, "recvmsg with a bad socket "
+		tst_brkm(TBROK, tst_exit, "recvmsg with a bad socket "
 			 "descriptor count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() with a bad socket descriptor - EBADF");
@@ -130,7 +129,7 @@ int main(int argc, char *argv[])
 	/*recvmsg () TEST2: Invalid socket , ENOTSOCK Expected error */
 	count = recvmsg(0, &inmessage, flag);
 	if (count != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, NULL, "recvmsg with invalid socket "
+		tst_brkm(TBROK, tst_exit, "recvmsg with invalid socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() with invalid socket - ENOTSOCK");
@@ -139,7 +138,7 @@ int main(int argc, char *argv[])
 	inmessage.msg_iov = (struct iovec *)-1;
 	count = recvmsg(acpt_sk, &inmessage, flag);
 	if (count != -1 || errno != EFAULT)
-		tst_brkm(TBROK, NULL, "recvmsg with invalid iovec "
+		tst_brkm(TBROK, tst_exit, "recvmsg with invalid iovec "
 			 "pointer count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() with invalid iovec ptr - EFAULT");
@@ -149,7 +148,7 @@ int main(int argc, char *argv[])
 	/*recvmsg () TEST4: Invalid msghdr pointer EFAULT, Expected error */
 	count = recvmsg(acpt_sk, (struct msghdr *)-1, flag);
 	if (count != -1 || errno != EFAULT)
-		tst_brkm(TBROK, NULL, "recvmsg with invalid msghdr "
+		tst_brkm(TBROK, tst_exit, "recvmsg with invalid msghdr "
 			 "pointer count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() with invalid msghdr ptr - EFAULT");
@@ -157,20 +156,20 @@ int main(int argc, char *argv[])
 	/*recvmsg () TEST5:recvmsg on listening socket,ENOTCONN Expected error */
 	count = recvmsg(lstn_sk, &inmessage, flag);
 	if (count != -1 || errno != ENOTCONN)
-		tst_brkm(TBROK, NULL, "recvmsg on listening socket "
+		tst_brkm(TBROK, tst_exit, "recvmsg on listening socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() on listening socket - ENOTCONN");
 
 	count = test_send(acpt_sk, message1, strlen(message), 0);
 
-	ret = test_shutdown(sk, SHUT_WR);
+	test_shutdown(sk, SHUT_WR);
 
 	flag = MSG_NOSIGNAL;
 	/*recvmsg () TEST6:reading on a socket that received SHUTDOWN */
 	count = recvmsg(acpt_sk, &inmessage, flag);
 	if (count < 0)
-		tst_brkm(TBROK, NULL, "recvmsg on a socket that has "
+		tst_brkm(TBROK, tst_exit, "recvmsg on a socket that has "
 			 "received shutdown count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "recvmsg() on a socket that has received shutdown - "
@@ -180,7 +179,7 @@ int main(int argc, char *argv[])
 	   SHUTDOWN */
 	count = recvmsg(sk, &inmessage, flag);
 	if (count < 0)
-		tst_brkm(TBROK, NULL, "recvmsg on a socket with pending "
+		tst_brkm(TBROK, tst_exit, "recvmsg on a socket with pending "
 			 "message that has sent shutdown count:%d, errno:%d",
 			 count, errno);
 
@@ -191,7 +190,7 @@ int main(int argc, char *argv[])
 	   ENOTCONN Expected error */
 	count = recvmsg(sk, &inmessage, flag);
 	if (count != -1 || errno != ENOTCONN)
-		tst_brkm(TBROK, NULL, "recvmsg on a socket with no "
+		tst_brkm(TBROK, tst_exit, "recvmsg on a socket with no "
 			 "pending messages and has sent shutdown count:%d, "
 			 "errno:%d", count, errno);
 
@@ -201,5 +200,5 @@ int main(int argc, char *argv[])
 	close(sk);
 	close(lstn_sk);
 	close(acpt_sk);
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_1_to_1_rtoinfo.c +8 -8
index c31bdd9..85293e8 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
@@ -9,13 +9,13 @@
  * the value using setsockopt() and gets the set value using getsockopt().
  * A comparison between set values and get values are performed.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -72,7 +72,7 @@ int main(void)
 	/*TEST1 Getting the default values using getsockopt() */
 	ret = getsockopt(sd, IPPROTO_SCTP, SCTP_RTOINFO, &grtoinfo, &len);
 	if (ret < 0)
-		tst_brkm(TBROK, NULL, "getsockopt SCTP_RTOINFO "
+		tst_brkm(TBROK, tst_exit, "getsockopt SCTP_RTOINFO "
 			 "ret:%d, errno:%d", ret, errno);
 
 	tst_resm(TPASS, "getsockopt() SCTP_RTOINFO - SUCCESS");
@@ -86,7 +86,7 @@ int main(void)
 	ret = setsockopt(sd, IPPROTO_SCTP, SCTP_RTOINFO, &srtoinfo,
 			 sizeof(struct sctp_rtoinfo));
 	if (ret < 0)
-		tst_brkm(TBROK, NULL, "setsockopt SCTP_RTOINFO "
+		tst_brkm(TBROK, tst_exit, "setsockopt SCTP_RTOINFO "
 			 "ret:%d, errno:%d", ret, errno);
 
 	tst_resm(TPASS, "setsockopt() SCTP_RTOINFO - SUCCESS");
@@ -94,14 +94,14 @@ int main(void)
 	/*Getting the values which are set using setsockopt() */
 	ret = getsockopt(sd, IPPROTO_SCTP, SCTP_RTOINFO, &grtoinfo, &len);
 	if (ret < 0)
-		tst_brkm(TBROK, NULL, "getsockopt SCTP_RTOINFO "
+		tst_brkm(TBROK, tst_exit, "getsockopt SCTP_RTOINFO "
 			 "ret:%d, errno:%d", ret, errno);
 
 	/* TEST3 Compare the get values with the set values. */
 	if (srtoinfo.srto_initial != grtoinfo.srto_initial &&
 	    srtoinfo.srto_max != grtoinfo.srto_max &&
 	    srtoinfo.srto_min != grtoinfo.srto_min)
-		tst_brkm(TBROK, NULL, "setsockopt/getsockopt SCTP_RTOINFO "
+		tst_brkm(TBROK, tst_exit, "setsockopt/getsockopt SCTP_RTOINFO "
 			 "compare failed");
 
 	tst_resm(TPASS, "setsockopt()/getsockopt SCTP_RTOINFO compare - "
@@ -109,5 +109,5 @@ int main(void)
 
 	close(sd);
 
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_1_to_1_send.c +12 -11
index a8dc8f5..5b47e74 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
@@ -13,13 +13,13 @@
  * TEST7: send from server to client
  * TEST8: sending partial data from a buffer
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -111,7 +111,7 @@ int main(int argc, char *argv[])
 	/*send () TEST1: Bad socket descriptor, EBADF Expected error */
 	count = send(-1, message, len_snd, flag);
 	if (count != -1 || errno != EBADF)
-		tst_brkm(TBROK, NULL, "send with a bad socket "
+		tst_brkm(TBROK, tst_exit, "send with a bad socket "
 			 "descriptor count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() with a bad socket descriptor - EBADF");
@@ -119,7 +119,7 @@ int main(int argc, char *argv[])
 	/*send () TEST2: Invalid socket, ENOTSOCK Expected error */
 	count = send(0, message, len_snd, flag);
 	if (count != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, NULL, "send with invalid socket "
+		tst_brkm(TBROK, tst_exit, "send with invalid socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() with invalid socket - ENOTSOCK");
@@ -127,7 +127,7 @@ int main(int argc, char *argv[])
 	/*send () TEST3: send on listening socket, EPIPE Expected error */
 	count = send(lstn_sk, message, len_snd, flag);
 	if (count != -1 || errno != EPIPE)
-		tst_brkm(TBROK, NULL, "send on a listening socket "
+		tst_brkm(TBROK, tst_exit, "send on a listening socket "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() on a listening socket - EPIPE");
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
 	/* FIXME this test should pass. Don't catch why...  */
 	count = send(sk, (char *)0x1, len_snd, flag);
 	if (count != -1 || errno != EFAULT)
-		tst_brkm(TBROK, NULL, "send with invalid message "
+		tst_brkm(TBROK, tst_exit, "send with invalid message "
 			 "pointer count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() with invalid message ptr - EFAULT");
@@ -153,11 +153,12 @@ int main(int argc, char *argv[])
 	/*send () TEST5: send on closed association, EPIPE Expected error */
 	count = send(acpt1_sk, message, len_snd, flag);
 	if (count != -1 || errno != EPIPE)
-		tst_brkm(TBROK, NULL, "send on a closed association "
+		tst_brkm(TBROK, tst_exit, "send on a closed association "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() on a closed association - EPIPE");
 
+	close(acpt1_sk);
 	close(sk);
 	close(lstn_sk);
 	close(acpt_sk);
@@ -189,7 +190,7 @@ int main(int argc, char *argv[])
 	/*send() TEST6: Sending data from client socket to server socket */
 	count = send(sk, message, msg_count, flag);
 	if (count != msg_count)
-		tst_brkm(TBROK, NULL, "send from client to server "
+		tst_brkm(TBROK, tst_exit, "send from client to server "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() from client to server - SUCCESS");
@@ -201,7 +202,7 @@ int main(int argc, char *argv[])
 	/*send() TEST7: Sending data from accept socket to client socket */
 	count = send(acpt_sk, message, msg_count, flag);
 	if (count != msg_count)
-		tst_brkm(TBROK, NULL, "send from accept socket to client "
+		tst_brkm(TBROK, tst_exit, "send from accept socket to client "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "send() from accept socket to client - SUCCESS");
@@ -224,5 +225,5 @@ int main(int argc, char *argv[])
 	close(lstn_sk);
 	close(acpt_sk);
 
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_1_to_1_sendmsg.c +19 -31

194 lines not on this page · raw message

testcases/network/sctp/func_tests/test_1_to_1_sendto.c +7 -7
index d576d77..1b88d88 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
@@ -10,13 +10,13 @@
  * TEST3: Sending data from unconnected client socket to server
  * TEST4: sending partial data from a buffer
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
 	count = sendto(sk, message, msg_count, flag,
 		       (const struct sockaddr *)&conn_addr, len);
 	if (count != msg_count)
-		tst_brkm(TBROK, NULL, "sendto from client to server "
+		tst_brkm(TBROK, tst_exit, "sendto from client to server "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendto() from client to server - SUCCESS");
@@ -121,7 +121,7 @@ int main(int argc, char *argv[])
 	count = sendto(acpt_sk, message, msg_count, flag,
 		       (const struct sockaddr *)&svr_addr, len);
 	if (count != msg_count)
-		tst_brkm(TBROK, NULL, "sendto from accept socket to client "
+		tst_brkm(TBROK, tst_exit, "sendto from accept socket to client "
 			 "count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendto() from accept socket to client - SUCCESS");
@@ -138,7 +138,7 @@ int main(int argc, char *argv[])
 	count = sendto(sk1, message, msg_count, flag,
 		       (const struct sockaddr *)&conn_addr, len);
 	if (count != msg_count)
-		tst_brkm(TBROK, NULL, "sendto from unconnected client to "
+		tst_brkm(TBROK, tst_exit, "sendto from unconnected client to "
 			 "server count:%d, errno:%d", count, errno);
 
 	tst_resm(TPASS, "sendto() from unconnected client to server - SUCCESS");
@@ -158,6 +158,6 @@ int main(int argc, char *argv[])
 	close(sk1);
 	close(lstn_sk);
 	close(acpt_sk);
-	tst_exit();
+	return 0;
 
 }
testcases/network/sctp/func_tests/test_1_to_1_shutdown.c +15 -15
index 02c8bf8..a9d1e9b 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
@@ -11,13 +11,13 @@
  * TEST5: shutdown with SHUT_RDWR flag to disable new receive/send
  * TEST6: Unconnected socket
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -105,7 +105,7 @@ int main(int argc, char *argv[])
 	/*shutdown() TEST1: Bad socket descriptor, EBADF Expected error */
 	error = shutdown(-1, SHUT_WR);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, NULL, "shutdown with a bad socket "
+		tst_brkm(TBROK, tst_exit, "shutdown with a bad socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() with a bad socket descriptor - EBADF");
@@ -113,7 +113,7 @@ int main(int argc, char *argv[])
 	/*shutdown() TEST2: Invalid socket, ENOTSOCK Expected error */
 	error = shutdown(0, SHUT_WR);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, NULL, "shutdown with an invalid socket "
+		tst_brkm(TBROK, tst_exit, "shutdown with an invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() with an invalid socket - ENOTSOCK");
@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
 	/*shutdown() TEST3: shutdown with SHUT_WR flag to disable new send */
 	error = shutdown(clnt_sk[0], SHUT_WR);
 	if (error < 0)
-		tst_brkm(TBROK, NULL, "shutdown with SHUT_WR flag "
+		tst_brkm(TBROK, tst_exit, "shutdown with SHUT_WR flag "
 			 "error:%d, errno:%d", error, errno);
 
 	/* Reading on a socket that has received SHUTDOWN should return 0
@@ -133,7 +133,7 @@ int main(int argc, char *argv[])
 	 */
 	error = recv(acpt_sk[0], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
-		tst_brkm(TBROK, NULL, "recv on a SHUTDOWN received socket "
+		tst_brkm(TBROK, tst_exit, "recv on a SHUTDOWN received socket "
 			 "error:%d, errno:%d", error, errno);
 
 	/* Read the pending message on clnt_sk[0] that was received before
@@ -144,7 +144,7 @@ int main(int argc, char *argv[])
 	/* No more messages and the association is SHUTDOWN, should fail. */
 	error = recv(clnt_sk[0], msgbuf, 100, 0);
 	if ((error != -1) || (errno != ENOTCONN))
-		tst_brkm(TBROK, NULL, "recv on a SHUT_WR socket with no "
+		tst_brkm(TBROK, tst_exit, "recv on a SHUT_WR socket with no "
 			 "messages error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() with SHUT_WR flag - SUCCESS");
@@ -156,13 +156,13 @@ int main(int argc, char *argv[])
 
 	error = recv(clnt_sk[1], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
-		tst_brkm(TBROK, NULL, "recv on a SHUT_RD socket "
+		tst_brkm(TBROK, tst_exit, "recv on a SHUT_RD socket "
 			 "error:%d, errno:%d", error, errno);
 
 	/* Sending a message on SHUT_RD socket. */
 	error = test_send(clnt_sk[1], message, strlen(message), 0);
 	if (error < 0)
-		tst_brkm(TBROK, NULL, "send on a SHUT_RD socket "
+		tst_brkm(TBROK, tst_exit, "send on a SHUT_RD socket "
 			 "error:%d, errno:%d", error, errno);
 
 	/* Receive the message sent on SHUT_RD socket. */
@@ -174,7 +174,7 @@ int main(int argc, char *argv[])
 	/* We should not receive the message as the socket is SHUT_RD */
 	error = recv(clnt_sk[1], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
-		tst_brkm(TBROK, NULL, "recv on a SHUT_RD socket "
+		tst_brkm(TBROK, tst_exit, "recv on a SHUT_RD socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() with SHUT_RD flag - SUCCESS");
@@ -185,12 +185,12 @@ int main(int argc, char *argv[])
 
 	error = recv(acpt_sk[2], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
-		tst_brkm(TBROK, NULL, "recv on a SHUTDOWN received socket "
+		tst_brkm(TBROK, tst_exit, "recv on a SHUTDOWN received socket "
 			 "error:%d, errno:%d", error, errno);
 
 	error = recv(clnt_sk[2], msgbuf, 100, 0);
 	if ((error != 0) || (errno != 0))
-		tst_brkm(TBROK, NULL, "recv on a SHUT_RDWR socket "
+		tst_brkm(TBROK, tst_exit, "recv on a SHUT_RDWR socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() with SHUT_RDWR flag - SUCCESS");
@@ -198,7 +198,7 @@ int main(int argc, char *argv[])
 	/*shutdown() TEST6: Unconnected socket, ENOTCONN Expected error */
 	error = shutdown(sk, SHUT_RD);
 	if ((error != -1) || (errno != ENOTCONN))
-		tst_brkm(TBROK, NULL, "shutdown on an unconnected socket "
+		tst_brkm(TBROK, tst_exit, "shutdown on an unconnected socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "shutdown() on an unconnected socket - SUCCESS");
@@ -211,5 +211,5 @@ int main(int argc, char *argv[])
 	close(lstn_sk);
 	close(sk);
 
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_1_to_1_socket_bind_listen.c +19 -19
index 086ce0b..a201117 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * Copyright (c) 2003 Hewlett-Packard Development Company, L.P
  * (C) Copyright IBM Corp. 2004
  *
@@ -29,13 +29,13 @@
  * TEST14: Invalid socket
  * TEST15: Listening a bound socket
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
 	/* socket() TEST1: Invalid domain, EAFNOSUPPORT Expected error */
 	sk = socket(-1, SOCK_STREAM, IPPROTO_SCTP);
 	if (sk != -1 || errno != EAFNOSUPPORT)
-		tst_brkm(TBROK, NULL, "socket() with invalid domain "
+		tst_brkm(TBROK, tst_exit, "socket() with invalid domain "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "socket() with invalid domain - EAFNOSUPPORT");
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
 	/*socket() TEST2 : Invalid type, EINVAL Expected error */
 	sk = socket(pf_class, -1, IPPROTO_SCTP);
 	if (sk != -1 || errno != EINVAL)
-		tst_brkm(TBROK, NULL, "socket() with invalid type "
+		tst_brkm(TBROK, tst_exit, "socket() with invalid type "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "socket() with invalid type - EINVAL");
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
 	/*socket() TEST3: opening a socket */
 	sk = socket(pf_class, SOCK_STREAM, IPPROTO_SCTP);
 	if (sk < 0)
-		tst_brkm(TBROK, NULL, "valid socket() call "
+		tst_brkm(TBROK, tst_exit, "valid socket() call "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "socket() - SUCCESS");
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
 	/*bind() TEST4: Invalid structure, EFAULT Expected error */
 	error = bind(sk, (struct sockaddr *)-1, sizeof(struct sockaddr_in));
 	if (error != -1 || errno != EFAULT)
-		tst_brkm(TBROK, NULL, "bind() with invalid address ptr "
+		tst_brkm(TBROK, tst_exit, "bind() with invalid address ptr "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid address ptr - EFAULT");
@@ -134,7 +134,7 @@ int main(int argc, char *argv[])
 
 	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr) - 2);
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, NULL, "bind() with invalid address length "
+		tst_brkm(TBROK, tst_exit, "bind() with invalid address length "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid address length - EINVAL");
@@ -142,7 +142,7 @@ int main(int argc, char *argv[])
 	/*bind() TEST6: Invalid socket descriptor, ENOTSOCK Expect Error */
 	error = bind(0, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, NULL, "bind() with invalid socket "
+		tst_brkm(TBROK, tst_exit, "bind() with invalid socket "
 			 "descriptor error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid socket descriptor - ENOTSOCK");
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
 	bind_addr.sin_addr.s_addr = inet_addr(SCTP_INV_LOOPBACK);
 	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error != -1 || errno != EADDRNOTAVAIL)
-		tst_brkm(TBROK, NULL, "bind() with invalid local "
+		tst_brkm(TBROK, tst_exit, "bind() with invalid local "
 			 "address error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with invalid local address - EADDRNOTAVAIL");
@@ -165,7 +165,7 @@ int main(int argc, char *argv[])
 
 	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error != -1 || errno != EINVAL)
-		tst_brkm(TBROK, NULL, "bind() on an already bound socket "
+		tst_brkm(TBROK, tst_exit, "bind() on an already bound socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() on an already bound socket - EINVAL");
@@ -184,7 +184,7 @@ int main(int argc, char *argv[])
 		error = bind(sk, (struct sockaddr *)&bind_addr,
 			     sizeof(bind_addr));
 		if (error != -1 || errno != EACCES)
-			tst_brkm(TBROK, NULL, "bind() on reserverd port "
+			tst_brkm(TBROK, tst_exit, "bind() on reserverd port "
 				 "error:%d, errno:%d", error, errno);
 
 		tst_resm(TPASS, "bind() on reserved port - EACCESS");
@@ -196,7 +196,7 @@ int main(int argc, char *argv[])
 	bind_addr.sin_port = htons(SCTP_TESTPORT_1);
 	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error < 0)
-		tst_brkm(TBROK, NULL, "bind() with INADDR_ANY address and "
+		tst_brkm(TBROK, tst_exit, "bind() with INADDR_ANY address and "
 			 "non-zero port error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with INADDR_ANY address and non-zero port - "
@@ -213,7 +213,7 @@ int main(int argc, char *argv[])
 	bind_addr.sin_port = 0;
 	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error < 0)
-		tst_brkm(TBROK, NULL, "bind() with INADDR_ANY address and "
+		tst_brkm(TBROK, tst_exit, "bind() with INADDR_ANY address and "
 			 "zero port error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with INADDR_ANY address and zero port - "
@@ -231,7 +231,7 @@ int main(int argc, char *argv[])
 	bind_addr.sin_port = 0;
 	error = bind(sk, (struct sockaddr *)&bind_addr, sizeof(bind_addr));
 	if (error < 0)
-		tst_brkm(TBROK, NULL, "bind() with local address and "
+		tst_brkm(TBROK, tst_exit, "bind() with local address and "
 			 "zero port error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "bind() with local address and zero port - " "SUCCESS");
@@ -239,7 +239,7 @@ int main(int argc, char *argv[])
 	/*listen() TEST13: Bad socket descriptor EBADF, Expected error */
 	error = listen(-1, 3);
 	if (error != -1 || errno != EBADF)
-		tst_brkm(TBROK, NULL, "listen() with bad socket descriptor "
+		tst_brkm(TBROK, tst_exit, "listen() with bad socket descriptor "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "listen() with bad socket descriptor - EBADF");
@@ -247,7 +247,7 @@ int main(int argc, char *argv[])
 	/*listen() TEST14: Invalid socket ENOTSOCK, Expected error */
 	error = listen(0, 3);
 	if (error != -1 || errno != ENOTSOCK)
-		tst_brkm(TBROK, NULL, "listen() with invalid socket "
+		tst_brkm(TBROK, tst_exit, "listen() with invalid socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "listen() with invalid socket - ENOTSOCK");
@@ -255,12 +255,12 @@ int main(int argc, char *argv[])
 	/*listen() TEST15:listen on a bound socket, should succeed */
 	error = listen(sk, 3);
 	if (error < 0)
-		tst_brkm(TBROK, NULL, "listen() on a bound socket "
+		tst_brkm(TBROK, tst_exit, "listen() on a bound socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "listen() on a bound socket - SUCCESS");
 
 	close(sk);
 
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_1_to_1_sockopt.c +36 -36

266 lines not on this page · raw message

testcases/network/sctp/func_tests/test_1_to_1_threads.c +22 -24

121 lines not on this page · raw message

testcases/network/sctp/func_tests/test_assoc_abort.c +9 -8
index 52d5ebd..9c68b61 100644
@@ -1,17 +1,17 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * (C) Copyright IBM Corp. 2001, 2003
  * Copyright (c) 1999-2000 Cisco, Inc.
  * Copyright (c) 1999-2001 Motorola, Inc.
  * Copyright (c) 2001 Intel Corp.
  * Copyright (c) 2001 Nokia, Inc.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -203,7 +203,7 @@ int main(int argc, char *argv[])
 		error = getsockopt(svr_sk, SOL_SCTP, SCTP_STATUS,
 				   &status, &status_len);
 		if (error)
-			tst_brkm(TBROK, NULL,
+			tst_brkm(TBROK, tst_exit,
 				 "getsockopt(SCTP_STATUS): %s",
 				 strerror(errno));
 
@@ -217,7 +217,7 @@ int main(int argc, char *argv[])
 		error = getsockopt(svr_sk, SOL_SCTP, SCTP_STATUS,
 				   &status, &status_len);
 		if ((error != -1) && (errno != EINVAL))
-			tst_brkm(TBROK, NULL,
+			tst_brkm(TBROK, tst_exit,
 				 "getsockopt(SCTP_STATUS) "
 				 "error:%d errno:%d", error, errno);
 	}
@@ -229,8 +229,9 @@ int main(int argc, char *argv[])
 		inmessage.msg_controllen = sizeof(incmsg);
 		error = test_recvmsg(clt_sk[i], &inmessage, MSG_WAITALL);
 		test_check_msg_notification(&inmessage, error,
-					    sizeof(struct sctp_assoc_change),
-					    SCTP_ASSOC_CHANGE, SCTP_COMM_LOST);
+					    sizeof(struct sctp_assoc_change) +
+					    4, SCTP_ASSOC_CHANGE,
+					    SCTP_COMM_LOST);
 
 		close(clt_sk[i]);
 	}
@@ -238,5 +239,5 @@ int main(int argc, char *argv[])
 	tst_resm(TPASS, "ABORT an association using SCTP_ABORT");
 
 	/* Indicate successful completion.  */
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_assoc_shutdown.c +6 -6
index a78e955..b5f1696 100644
@@ -1,17 +1,17 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * (C) Copyright IBM Corp. 2001, 2003
  * Copyright (c) 1999-2000 Cisco, Inc.
  * Copyright (c) 1999-2001 Motorola, Inc.
  * Copyright (c) 2001 Intel Corp.
  * Copyright (c) 2001 Nokia, Inc.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -204,7 +204,7 @@ int main(int argc, char *argv[])
 		error = getsockopt(svr_sk, SOL_SCTP, SCTP_STATUS,
 				   &status, &status_len);
 		if (error)
-			tst_brkm(TBROK, NULL,
+			tst_brkm(TBROK, tst_exit,
 				 "getsockopt(SCTP_STATUS): %s",
 				 strerror(errno));
 
@@ -218,7 +218,7 @@ int main(int argc, char *argv[])
 		error = getsockopt(svr_sk, SOL_SCTP, SCTP_STATUS,
 				   &status, &status_len);
 		if ((error != -1) && (errno != EINVAL))
-			tst_brkm(TBROK, NULL,
+			tst_brkm(TBROK, tst_exit,
 				 "getsockopt(SCTP_STATUS) "
 				 "error:%d errno:%d", error, errno);
 	}
@@ -240,5 +240,5 @@ int main(int argc, char *argv[])
 	tst_resm(TPASS, "Graceful shutdown of associations using SCTP_EOF");
 
 	/* Indicate successful completion.  */
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_autoclose.c +7 -6
index ef42fdc..e32efd1 100644
@@ -1,17 +1,17 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * (C) Copyright IBM Corp. 2001, 2003
  * Copyright (c) 1999-2000 Cisco, Inc.
  * Copyright (c) 1999-2001 Motorola, Inc.
  * Copyright (c) 2001 Intel Corp.
  * Copyright (c) 2001 Nokia, Inc.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
 	sockaddr_storage_t loop1, loop2;
 	struct msghdr inmessage, outmessage;
 	struct iovec iov, out_iov;
-	int error, bytes_sent;
+	int error;
 	char *big_buffer;
 	char *message = "hello, world!\n";
 	uint32_t autoclose;
@@ -111,7 +111,8 @@ int main(int argc, char *argv[])
 	outmessage.msg_iovlen = 1;
 	outmessage.msg_iov->iov_base = message;
 	outmessage.msg_iov->iov_len = strlen(message) + 1;
-	bytes_sent = test_sendmsg(sk1, &outmessage, 0, strlen(message) + 1);
+
+	test_sendmsg(sk1, &outmessage, 0, strlen(message) + 1);
 
 	/* Initialize inmessage for all receives. */
 	big_buffer = test_malloc(REALLY_BIG);
@@ -161,5 +162,5 @@ int main(int argc, char *argv[])
 	close(sk2);
 
 	/* Indicate successful completion.  */
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_basic.c +12 -10
index a5f60e2..0c3c16c 100644
@@ -1,17 +1,17 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * (C) Copyright IBM Corp. 2001, 2003
  * Copyright (c) 1999-2000 Cisco, Inc.
  * Copyright (c) 1999-2001 Motorola, Inc.
  * Copyright (c) 2001 Intel Corp.
  * Copyright (c) 2001 Nokia, Inc.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -40,7 +40,7 @@
  *    Sridhar Samudrala <[email protected]>
  */
 
-/* This is a basic functional test for the SCTP kernel reference
+/* This is a basic functional test for the SCTP kernel
  * implementation state machine.
  */
 
@@ -151,7 +151,7 @@ int main(void)
 	inmessage.msg_controllen = sizeof(incmsg);
 	error = recvmsg(sk2, &inmessage, MSG_WAITALL);
 	if (error > 0)
-		tst_brkm(TBROK, NULL, "recvmsg on a socket neither"
+		tst_brkm(TBROK, tst_exit, "recvmsg on a socket neither"
 			 "listening nor established error: %d", error);
 
 	tst_resm(TPASS, "recvmsg on a socket neither listening nor "
@@ -302,7 +302,7 @@ int main(void)
 	outmessage.msg_namelen = 0;
 	bytes_sent = sendmsg(sk1, &outmessage, MSG_NOSIGNAL);
 	if ((bytes_sent > 0) || (EPIPE != errno))
-		tst_brkm(TBROK, NULL, "sendmsg with NULL associd and "
+		tst_brkm(TBROK, tst_exit, "sendmsg with NULL associd and "
 			 "NULL msg_name error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "sendmsg with NULL associd and NULL msg_name");
@@ -311,7 +311,7 @@ int main(void)
 	sinfo->sinfo_assoc_id = associd2;
 	bytes_sent = sendmsg(sk1, &outmessage, MSG_NOSIGNAL);
 	if ((bytes_sent > 0) || (EPIPE != errno))
-		tst_brkm(TBROK, NULL, "sendmsg with incorrect associd "
+		tst_brkm(TBROK, tst_exit, "sendmsg with incorrect associd "
 			 "error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "sendmsg with incorrect associd");
@@ -344,7 +344,8 @@ int main(void)
 
 	n_laddrs = sctp_getladdrs(sk1, associd1, &laddrs);
 	if (n_laddrs <= 0)
-		tst_brkm(TBROK, NULL, "sctp_getladdrs: %s", strerror(errno));
+		tst_brkm(TBROK, tst_exit, "sctp_getladdrs: %s",
+			 strerror(errno));
 
 	tst_resm(TPASS, "sctp_getladdrs");
 
@@ -373,7 +374,8 @@ int main(void)
 
 	n_paddrs = sctp_getpaddrs(sk1, associd1, &paddrs);
 	if (n_paddrs <= 0)
-		tst_brkm(TBROK, NULL, "sctp_getpaddrs: %s", strerror(errno));
+		tst_brkm(TBROK, tst_exit, "sctp_getpaddrs: %s",
+			 strerror(errno));
 
 	tst_resm(TPASS, "sctp_getpaddrs");
 
@@ -449,5 +451,5 @@ int main(void)
 	close(sk2);
 
 	/* Indicate successful completion.  */
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_connect.c +18 -12
index 6fc788a..3cf5fb9 100644
@@ -1,14 +1,14 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * (C) Copyright IBM Corp. 2002, 2003
  * Copyright (c) 1999-2001 Motorola, Inc.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -57,12 +57,12 @@ int TST_CNT = 0;
 int main(int argc, char *argv[])
 {
 	int svr_sk, clt_sk1, clt_sk2, peeloff_sk;
-	sctp_assoc_t svr_associd1, svr_associd2, clt_associd1, clt_associd2;
+	sctp_assoc_t svr_associd1;
 	sockaddr_storage_t svr_loop, clt_loop1, clt_loop2, clt_loop3;
+	struct sctp_assoc_change *sac;
 	struct iovec iov;
 	struct msghdr inmessage;
 	int error;
-	struct sctp_assoc_change *sac;
 	char *big_buffer;
 	int flags;
 
@@ -106,15 +106,15 @@ int main(int argc, char *argv[])
 	/* Set clt_sk1 as non-blocking. */
 	flags = fcntl(clt_sk1, F_GETFL, 0);
 	if (flags < 0)
-		tst_brkm(TBROK, NULL, "fcntl F_GETFL: %s", strerror(errno));
+		tst_brkm(TBROK, tst_exit, "fcntl F_GETFL: %s", strerror(errno));
 	if (fcntl(clt_sk1, F_SETFL, flags | O_NONBLOCK) < 0)
-		tst_brkm(TBROK, NULL, "fcntl F_SETFL: %s", strerror(errno));
+		tst_brkm(TBROK, tst_exit, "fcntl F_SETFL: %s", strerror(errno));
 
 	/* Do a non-blocking connect from clt_sk1 to svr_sk */
 	error = connect(clt_sk1, &svr_loop.sa, sizeof(svr_loop));
 	/* Non-blocking connect should return immediately with EINPROGRESS. */
 	if ((error != -1) || (EINPROGRESS != errno))
-		tst_brkm(TBROK, NULL, "non-blocking connect error: %d"
+		tst_brkm(TBROK, tst_exit, "non-blocking connect error: %d"
 			 "errno:%d", error, errno);
 
 	tst_resm(TPASS, "non-blocking connect");
@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
 	 */
 	error = connect(clt_sk1, &svr_loop.sa, sizeof(svr_loop));
 	if ((error != -1) || (EISCONN != errno))
-		tst_brkm(TBROK, NULL, "connect on a socket to create an "
+		tst_brkm(TBROK, tst_exit, "connect on a socket to create an "
 			 "assoc that is already established error:%d errno:%d",
 			 error, errno);
 
@@ -145,8 +145,10 @@ int main(int argc, char *argv[])
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
+#if 0
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	clt_associd1 = sac->sac_assoc_id;
+#endif
 
 	/* Get COMM_UP on svr_sk */
 	error = test_recvmsg(svr_sk, &inmessage, MSG_WAITALL);
@@ -167,16 +169,20 @@ int main(int argc, char *argv[])
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
+#if 0
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	clt_associd2 = sac->sac_assoc_id;
+#endif
 
 	/* Get COMM_UP on svr_sk */
 	error = test_recvmsg(svr_sk, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
+#if 0
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	svr_associd2 = sac->sac_assoc_id;
+#endif
 
 	tst_resm(TPASS, "blocking connect");
 
@@ -185,7 +191,7 @@ int main(int argc, char *argv[])
 	/* Doing a connect on a peeled off socket should fail. */
 	error = connect(peeloff_sk, &clt_loop3.sa, sizeof(clt_loop3));
 	if ((error != -1) || (EISCONN != errno))
-		tst_brkm(TBROK, NULL, "connect on a peeled off socket "
+		tst_brkm(TBROK, tst_exit, "connect on a peeled off socket "
 			 "error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "connect on a peeled off socket");
@@ -195,7 +201,7 @@ int main(int argc, char *argv[])
 	 */
 	error = connect(svr_sk, &clt_loop1.sa, sizeof(clt_loop1));
 	if ((error != -1) || (EADDRNOTAVAIL != errno))
-		tst_brkm(TBROK, NULL, "connect to create an assoc that "
+		tst_brkm(TBROK, tst_exit, "connect to create an assoc that "
 			 "matches a peeled off assoc error:%d errno:%d",
 			 error, errno);
 
@@ -208,5 +214,5 @@ int main(int argc, char *argv[])
 	close(peeloff_sk);
 
 	/* Indicate successful completion.  */
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_connectx.c +29 -16

104 lines not on this page · raw message

testcases/network/sctp/func_tests/test_fragments.c +12 -14
index 4e92ac3..bea93c2 100644
@@ -1,17 +1,17 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * (C) Copyright IBM Corp. 2001, 2003
  * Copyright (c) 1999-2000 Cisco, Inc.
  * Copyright (c) 1999-2001 Motorola, Inc.
  * Copyright (c) 2001 Intel Corp.
  * Copyright (c) 2001 Nokia, Inc.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -84,11 +84,9 @@ int main(int argc, char *argv[])
 	struct sctp_sndrcvinfo *sinfo;
 	struct iovec out_iov;
 	int error, bytes_sent;
-	int pf_class, af_family;
+	int pf_class;
 	uint32_t ppid;
 	uint32_t stream;
-	sctp_assoc_t associd1, associd2;
-	struct sctp_assoc_change *sac;
 	char *big_buffer;
 	int msg_len, msg_cnt, i;
 	void *msg_buf;
@@ -103,7 +101,6 @@ int main(int argc, char *argv[])
 	/* Set some basic values which depend on the address family. */
 #if TEST_V6
 	pf_class = PF_INET6;
-	af_family = AF_INET6;
 
 	loop1.v6.sin6_family = AF_INET6;
 	loop1.v6.sin6_addr = in6addr_loopback;
@@ -114,7 +111,6 @@ int main(int argc, char *argv[])
 	loop2.v6.sin6_port = htons(SCTP_TESTPORT_2);
 #else
 	pf_class = PF_INET;
-	af_family = AF_INET;
 
 	loop1.v4.sin_family = AF_INET;
 	loop1.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
@@ -180,18 +176,20 @@ int main(int argc, char *argv[])
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
+#if 0
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	associd2 = sac->sac_assoc_id;
-
+#endif
 	/* Get the communication up message on sk1.  */
 	inmessage.msg_controllen = sizeof(incmsg);
 	error = test_recvmsg(sk1, &inmessage, MSG_WAITALL);
 	test_check_msg_notification(&inmessage, error,
 				    sizeof(struct sctp_assoc_change),
 				    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
+#if 0
 	sac = (struct sctp_assoc_change *)iov.iov_base;
 	associd1 = sac->sac_assoc_id;
-
+#endif
 	/* Get the first message which was sent.  */
 	inmessage.msg_controllen = sizeof(incmsg);
 	error = test_recvmsg(sk2, &inmessage, MSG_WAITALL);
@@ -212,7 +210,7 @@ int main(int argc, char *argv[])
 	error = test_getsockopt(sk1, SCTP_DISABLE_FRAGMENTS, &disable_frag,
 				&optlen);
 	if ((error != 0) && (disable_frag != 1))
-		tst_brkm(TBROK, NULL, "getsockopt(SCTP_DISABLE_FRAGMENTS) "
+		tst_brkm(TBROK, tst_exit, "getsockopt(SCTP_DISABLE_FRAGMENTS) "
 			 "error:%d errno:%d disable_frag:%d",
 			 error, errno, disable_frag);
 
@@ -221,13 +219,13 @@ int main(int argc, char *argv[])
 	/* Try to send a messsage that exceeds association fragmentation point
 	 * and verify that it fails.
 	 */
-	msg_len = 30000;
+	msg_len = 100000;
 	msg_buf = test_build_msg(msg_len);
 	outmessage.msg_iov->iov_base = msg_buf;
 	outmessage.msg_iov->iov_len = msg_len;
 	error = sendmsg(sk1, &outmessage, 0);
 	if ((error != -1) || (errno != EMSGSIZE))
-		tst_brkm(TBROK, NULL, "Send a message that exceeds "
+		tst_brkm(TBROK, tst_exit, "Send a message that exceeds "
 			 "assoc frag point error:%d errno:%d", error, errno);
 
 	tst_resm(TPASS, "Send a message that exceeds assoc frag point");
@@ -293,5 +291,5 @@ int main(int argc, char *argv[])
 	close(sk2);
 
 	/* Indicate successful completion.  */
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_getname.c +22 -22

154 lines not on this page · raw message

testcases/network/sctp/func_tests/test_inaddr_any.c +7 -9
index ac8a638..5ca458b 100644
@@ -1,4 +1,4 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * (C) Copyright IBM Corp. 2002, 2003
  * Copyright (c) 1999-2000 Cisco, Inc.
  * Copyright (c) 1999-2001 Motorola, Inc.
@@ -6,13 +6,13 @@
  * Copyright (c) 2001 Nokia, Inc.
  * Copyright (c) 2001 La Monte H.P. Yarroll
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -78,7 +78,7 @@ int main(void)
 	char *telephone = "Watson, come here!  I need you!\n";
 	char *telephone_resp = "I already brought your coffee...\n";
 	int error;
-	int pf_class, af_family;
+	int pf_class;
 	uint32_t ppid;
 	uint32_t stream;
 	socklen_t namelen;
@@ -91,7 +91,6 @@ int main(void)
 	/* Set some basic values which depend on the address family. */
 #if TEST_V6
 	pf_class = PF_INET6;
-	af_family = AF_INET6;
 
 	loop.v6.sin6_family = AF_INET6;
 	loop.v6.sin6_addr = (struct in6_addr)SCTP_IN6ADDR_LOOPBACK_INIT;
@@ -102,7 +101,6 @@ int main(void)
 	anyaddr.v6.sin6_port = 0;
 #else
 	pf_class = PF_INET;
-	af_family = AF_INET;
 
 	loop.v4.sin_family = AF_INET;
 	loop.v4.sin_addr.s_addr = SCTP_IP_LOOPBACK;
@@ -134,12 +132,12 @@ int main(void)
 	namelen = sizeof(loop);
 	error = getsockname(sk1, &loop.sa, &namelen);
 	if (error != 0)
-		tst_brkm(TBROK, NULL, "getsockname: %s", strerror(errno));
+		tst_brkm(TBROK, tst_exit, "getsockname: %s", strerror(errno));
 
 	namelen = sizeof(anyaddr);
 	error = getsockname(sk2, &anyaddr.sa, &namelen);
 	if (error != 0)
-		tst_brkm(TBROK, NULL, "getsockname: %s", strerror(errno));
+		tst_brkm(TBROK, tst_exit, "getsockname: %s", strerror(errno));
 
 #if TEST_V6
 	loop.v6.sin6_port = anyaddr.v6.sin6_port;
@@ -248,5 +246,5 @@ int main(void)
 	tst_resm(TPASS, "send msgs from a socket with INADDR_ANY bind address");
 
 	/* Indicate successful completion.  */
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_peeloff.c +9 -7
index 08db125..8eb3529 100644
@@ -1,17 +1,17 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * (C) Copyright IBM Corp. 2001, 2003
  * Copyright (c) 1999-2000 Cisco, Inc.
  * Copyright (c) 1999-2001 Motorola, Inc.
  * Copyright (c) 2001 Intel Corp.
  * Copyright (c) 2001 Nokia, Inc.
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -61,7 +61,7 @@ int TST_CNT = 0;
 int main(int argc, char *argv[])
 {
 	int svr_sk, clt_sk[MAX_CLIENTS], peeloff_sk[MAX_CLIENTS];
-	sctp_assoc_t svr_associd[MAX_CLIENTS], clt_associd[MAX_CLIENTS];
+	sctp_assoc_t svr_associd[MAX_CLIENTS];
 	sockaddr_storage_t svr_loop, clt_loop[MAX_CLIENTS];
 	struct iovec iov;
 	struct msghdr inmessage;
@@ -166,8 +166,10 @@ int main(int argc, char *argv[])
 		test_check_msg_notification(&inmessage, error,
 					    sizeof(struct sctp_assoc_change),
 					    SCTP_ASSOC_CHANGE, SCTP_COMM_UP);
+#if 0
 		sac = (struct sctp_assoc_change *)iov.iov_base;
 		clt_associd[i] = sac->sac_assoc_id;
+#endif
 	}
 
 	/* Get the communication up message and the data message on the
@@ -200,7 +202,7 @@ int main(int argc, char *argv[])
 	/* Verify that a peeled off socket is not allowed to do a listen().  */
 	error = listen(peeloff_sk[0], 1);
 	if (error != -1)
-		tst_brkm(TBROK, NULL, "listen on a peeled off socket "
+		tst_brkm(TBROK, tst_exit, "listen on a peeled off socket "
 			 "error: %d, errno: %d", error, errno);
 
 	tst_resm(TPASS, "listen on a peeled off socket");
@@ -211,7 +213,7 @@ int main(int argc, char *argv[])
 	 */
 	if ((-1 != sctp_peeloff(peeloff_sk[0], svr_associd[0])) ||
 	    (EINVAL != errno))
-		tst_brkm(TBROK, NULL, "sctp_peeloff on a peeled off "
+		tst_brkm(TBROK, tst_exit, "sctp_peeloff on a peeled off "
 			 "socket error:%d, errno:%d", error, errno);
 
 	tst_resm(TPASS, "sctp_peeloff on a peeled off socket");
@@ -291,5 +293,5 @@ int main(int argc, char *argv[])
 	}
 
 	/* Indicate successful completion.  */
-	tst_exit();
+	return 0;
 }
testcases/network/sctp/func_tests/test_recvmsg.c +4 -4
index b6314d8..9cd030b 100644
@@ -1,16 +1,16 @@
-/* SCTP kernel reference Implementation
+/* SCTP kernel Implementation
  * (C) Copyright IBM Corp. 2002, 2003
  * Copyright (c) 1999-2001 Motorola, Inc.
  *
- * This file is part of the SCTP kernel reference Implementation
+ * This file is part of the SCTP kernel Implementation
  *
- * The SCTP reference implementation is free software;
+ * The SCTP implementation is free software;
  * you can redistribute it and/or modify it under the terms of
  * the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
  *
- * The SCTP reference implementation is distributed in the hope that it
+ * The SCTP implementation is distributed in the hope that it
  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  *                 ************************
  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
testcases/network/sctp/func_tests/test_sctp_sendrecvmsg.c +27 -18

192 lines not on this page · raw message

testcases/network/sctp/func_tests/test_sockopt.c +280 -32

78 lines not on this page · raw message

testcases/network/sctp/func_tests/test_tcp_style.c +25 -25

50 lines not on this page · raw message

testcases/network/sctp/func_tests/test_timetolive.c +16 -16
index 05f5bb6..e0c68fb 100644

Lines of this file are not shown. View the raw message.

testcases/network/sctp/include/netinet/sctp.h +338 -153

491 lines not on this page · raw message

testcases/network/sctp/lib/addrs.c +32 -66

98 lines not on this page · raw message

testcases/network/sctp/lib/bindx.c +2 -2
index b89b31e..af3a68c 100644

Lines of this file are not shown. View the raw message.

testcases/network/sctp/lib/connectx.c +128 -8

136 lines not on this page · raw message

testcases/network/sctp/lib/opt_info.c +5 -2
index ba765ce..c048ab0f 100644

Lines of this file are not shown. View the raw message.

testcases/network/sctp/lib/peeloff.c +2 -2
index 04fe9bc..52ff534 100644

Lines of this file are not shown. View the raw message.

testcases/network/sctp/lib/recvmsg.c +3 -3
index 4efffae..c57de77 100644

Lines of this file are not shown. View the raw message.

testcases/network/sctp/lib/sendmsg.c +3 -3
index 82d98f5..bef2420 100644

Lines of this file are not shown. View the raw message.

testcases/network/sctp/testlib/sctputil.c +28 -25

53 lines not on this page · raw message

testcases/network/sctp/testlib/sctputil.h +50 -54

104 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 13 lines
1.8.1.4


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 6 lines · Hangbin Liu

SCTP test in ltp is based on lksctp. But the last patch for sctp in ltp is 2006. It has changed a lot and fixed many bugs. Update sctp test to upstream version 1.0.15 now.

Format code with
for file in find ~/git/ltp/testcases/network/sctp -name *.c -o -name *.h; do

Quoted 7 lines
	~/git/linux/scripts/cleanfile $file
	~/git/linux/scripts/Lindent $file
	rm -f ${file}~

done

---

Note: Some distros may fail test_sockopt, test_sockopt_v6, test_tcp_style and test_tcp_style_v6 because of bug https://bugzilla.redhat.com/show_bug.cgi?id=903296

Test result:

# ./test_1_to_1_accept_close
test_1_to_1_accept_close.c    1  TPASS  :  accept() with a bad socket descriptor - EBADF
test_1_to_1_accept_close.c    2  TPASS  :  accept() with invalid socket - ENOTSOCK
test_1_to_1_accept_close.c    3  TPASS  :  accept() with invalid address - EFAULT
test_1_to_1_accept_close.c    4  TPASS  :  accept() on a non-listening socket - EINVAL
test_1_to_1_accept_close.c    5  TPASS  :  accept() on an established socket - EINVAL
test_1_to_1_accept_close.c    6  TPASS  :  accept() a closed association - SUCCESS
test_1_to_1_accept_close.c    7  TPASS  :  accept() on a listening socket - SUCCESS
test_1_to_1_accept_close.c    8  TPASS  :  close() with a bad socket descriptor - EBADF
test_1_to_1_accept_close.c    9  TPASS  :  close() with a valid socket descriptor - SUCCESS
test_1_to_1_accept_close.c   10  TPASS  :  close() with a closed socket descriptor - EBADF
# ./test_1_to_1_addrs
test_1_to_1_addrs.c    1  TPASS  :  sctp_getladdrs() with a bad socket descriptor - EBADF
test_1_to_1_addrs.c    2  TPASS  :  sctp_getladdrs() with invalid socket - ENOTSOCK
test_1_to_1_addrs.c    3  TPASS  :  sctp_getladdrs() with socket of different protocol - EOPNOTSUPP
test_1_to_1_addrs.c    4  TPASS  :  sctp_getladdrs() - SUCCESS
test_1_to_1_addrs.c    5  TPASS  :  sctp_freeladdrs() - SUCCESS
test_1_to_1_addrs.c    6  TPASS  :  sctp_getpaddrs() with a bad socket descriptor - EBADF
test_1_to_1_addrs.c    7  TPASS  :  sctp_getpaddrs() with invalid socket - ENOTSOCK
test_1_to_1_addrs.c    8  TPASS  :  sctp_getpaddrs() with socket of different protocol - EOPNOTSUPP
test_1_to_1_addrs.c    9  TPASS  :  sctp_getpaddrs() - SUCCESS
test_1_to_1_addrs.c   10  TPASS  :  sctp_freepaddrs() - SUCCESS
# ./test_1_to_1_connect
test_1_to_1_connect.c    1  TPASS  :  connect() with bad socket descriptor - EBADF
test_1_to_1_connect.c    2  TPASS  :  connect() with invalid socket - ENOTSOCK
test_1_to_1_connect.c    3  TPASS  :  connect() with invalid address - EFAULT
test_1_to_1_connect.c    4  TPASS  :  connect() with invalid address length - EINVAL
test_1_to_1_connect.c    5  TPASS  :  connect() with invalid address family - EINVAL
test_1_to_1_connect.c    6  TPASS  :  valid blocking connect() - SUCCESS
test_1_to_1_connect.c    7  TPASS  :  connect() when accept queue is full - ECONNREFUSED
test_1_to_1_connect.c    8  TPASS  :  connect() on a listening socket - EISCONN
test_1_to_1_connect.c    9  TPASS  :  connect() on an established socket - EISCONN
test_1_to_1_connect.c   10  TPASS  :  connect() to re-establish a closed association - SUCCESS
# ./test_1_to_1_connectx
test_1_to_1_connectx.c    1  TPASS  :  sctp_connectx() with bad socket descriptor - EBADF
test_1_to_1_connectx.c    2  TPASS  :  sctp_connectx() with invalid socket - ENOTSOCK
test_1_to_1_connectx.c    3  TPASS  :  sctp_connectx() with invalid address - EINVAL
test_1_to_1_connectx.c    4  TPASS  :  sctp_connectx() with invalid address length - EINVAL
test_1_to_1_connectx.c    5  TPASS  :  sctp_connectx() with invalid address family - EINVAL
test_1_to_1_connectx.c    6  TPASS  :  valid blocking sctp_connectx() - SUCCESS
test_1_to_1_connectx.c    7  TPASS  :  sctp_connectx() when accept queue is full - ECONNREFUSED
test_1_to_1_connectx.c    8  TPASS  :  sctp_connectx() on a listening socket - EISCONN
test_1_to_1_connectx.c    9  TPASS  :  sctp_connectx() on an established socket - EISCONN
test_1_to_1_connectx.c   10  TPASS  :  sctp_connectx() to re-establish a closed association - SUCCESS
# ./test_1_to_1_events
test_1_to_1_events.c    1  TPASS  :  COMM_UP notification on client socket - SUCCESS
test_1_to_1_events.c    2  TPASS  :  COMM_UP notification on server socket - SUCCESS
test_1_to_1_events.c    3  TPASS  :  Data message on server socket - SUCCESS
test_1_to_1_events.c    4  TPASS  :  SHUTDOWN notification on accepted socket - SUCCESS
# ./test_1_to_1_initmsg_connect
test_1_to_1_initmsg_connect.c    1  TPASS  :  connect() with init timeout set to 0 - SUCCESS
# ./test_1_to_1_nonblock
test_1_to_1_nonblock.c    1  TPASS  :  non-blocking accept() - EAGAIN
test_1_to_1_nonblock.c    2  TPASS  :  non-blocking connect() - EINPROGRESS
test_1_to_1_nonblock.c    3  TPASS  :  accept() after a non-blocking connect - SUCCESS
test_1_to_1_nonblock.c    4  TPASS  :  non-blocking recvmsg() - EAGAIN
test_1_to_1_nonblock.c    5  TPASS  :  non-blocking recvmsg() when data is available - SUCCESS
# ./test_1_to_1_recvfrom
test_1_to_1_recvfrom.c    1  TPASS  :  recvfrom() with a bad socket descriptor - EBADF
test_1_to_1_recvfrom.c    2  TPASS  :  recvfrom() with invalid socket - ENOTSOCK
test_1_to_1_recvfrom.c    3  TPASS  :  recvfrom() with invalid message ptr - EFAULT
test_1_to_1_recvfrom.c    4  TPASS  :  recvfrom() on listening socket - ENOTCONN
test_1_to_1_recvfrom.c    5  TPASS  :  recvfrom() on a socket that has received shutdown - EOF
test_1_to_1_recvfrom.c    6  TPASS  :  recvfrom() on a socket with pending message that has sent shutdown - SUCCESS
test_1_to_1_recvfrom.c    7  TPASS  :  recvfrom() on a socket with no pending messages and  has sent shutdown - ENOTCONN
# ./test_1_to_1_recvmsg
test_1_to_1_recvmsg.c    1  TPASS  :  recvmsg() with a bad socket descriptor - EBADF
test_1_to_1_recvmsg.c    2  TPASS  :  recvmsg() with invalid socket - ENOTSOCK
test_1_to_1_recvmsg.c    3  TPASS  :  recvmsg() with invalid iovec ptr - EFAULT
test_1_to_1_recvmsg.c    4  TPASS  :  recvmsg() with invalid msghdr ptr - EFAULT
test_1_to_1_recvmsg.c    5  TPASS  :  recvmsg() on listening socket - ENOTCONN
test_1_to_1_recvmsg.c    6  TPASS  :  recvmsg() on a socket that has received shutdown - EOF
test_1_to_1_recvmsg.c    7  TPASS  :  recvmsg() on a socket with pending message that has sent shutdown - SUCCESS
test_1_to_1_recvmsg.c    8  TPASS  :  recvmsg() on a socket with no pending messages and  has sent shutdown - ENOTCONN
# ./test_1_to_1_rtoinfo
test_1_to_1_rtoinfo.c    1  TPASS  :  getsockopt() SCTP_RTOINFO - SUCCESS
test_1_to_1_rtoinfo.c    2  TPASS  :  setsockopt() SCTP_RTOINFO - SUCCESS
test_1_to_1_rtoinfo.c    3  TPASS  :  setsockopt()/getsockopt SCTP_RTOINFO compare - SUCCESS
# ./test_1_to_1_send
test_1_to_1_send.c    1  TPASS  :  send() with a bad socket descriptor - EBADF
test_1_to_1_send.c    2  TPASS  :  send() with invalid socket - ENOTSOCK
test_1_to_1_send.c    3  TPASS  :  send() on a listening socket - EPIPE
test_1_to_1_send.c    4  TPASS  :  send() on a closed association - EPIPE
test_1_to_1_send.c    5  TBROK  :  bind: Address already in use
test_1_to_1_send.c    6  TBROK  :  Remaining cases broken
# ./test_1_to_1_sendmsg
test_1_to_1_sendmsg.c    1  TPASS  :  sendmsg() with a bad socket descriptor - EBADF
test_1_to_1_sendmsg.c    2  TPASS  :  sendmsg() with invalid socket - ENOTSOCK
test_1_to_1_sendmsg.c    3  TPASS  :  sendmsg() on a listening socket - EPIPE
test_1_to_1_sendmsg.c    4  TPASS  :  sendmsg() with invalid iovec ptr - EFAULT
test_1_to_1_sendmsg.c    5  TPASS  :  sendmsg() with invalid iovec length - EINVAL
test_1_to_1_sendmsg.c    6  TPASS  :  sendmsg() with invalid msghdr ptr - EFAULT
test_1_to_1_sendmsg.c    7  TPASS  :  sendmsg() with invalid sinfo flags - EINVAL
test_1_to_1_sendmsg.c    8  TPASS  :  sendmsg() with SCTP_EOF flag - EINVAL
test_1_to_1_sendmsg.c    9  TPASS  :  sendmsg() with SCTP_ABORT flag - EINVAL
test_1_to_1_sendmsg.c   10  TPASS  :  sendmsg() on a closed association - EPIPE
test_1_to_1_sendmsg.c   11  TBROK  :  bind: Address already in use
test_1_to_1_sendmsg.c   12  TBROK  :  Remaining cases broken
# ./test_1_to_1_sendto
test_1_to_1_sendto.c    1  TPASS  :  sendto() from client to server - SUCCESS
test_1_to_1_sendto.c    2  TPASS  :  sendto() from accept socket to client - SUCCESS
test_1_to_1_sendto.c    3  TPASS  :  sendto() from unconnected client to server - SUCCESS
test_1_to_1_sendto.c    4  TPASS  :  sendto() partial data from a buffer - SUCCESS
# ./test_1_to_1_shutdown
test_1_to_1_shutdown.c    1  TPASS  :  shutdown() with a bad socket descriptor - EBADF
test_1_to_1_shutdown.c    2  TPASS  :  shutdown() with an invalid socket - ENOTSOCK
test_1_to_1_shutdown.c    3  TPASS  :  shutdown() with SHUT_WR flag - SUCCESS
test_1_to_1_shutdown.c    4  TPASS  :  shutdown() with SHUT_RD flag - SUCCESS
test_1_to_1_shutdown.c    5  TPASS  :  shutdown() with SHUT_RDWR flag - SUCCESS
test_1_to_1_shutdown.c    6  TPASS  :  shutdown() on an unconnected socket - SUCCESS
# ./test_1_to_1_socket_bind_listen
test_1_to_1_socket_bind_listen.c    1  TPASS  :  socket() with invalid domain - EAFNOSUPPORT
test_1_to_1_socket_bind_listen.c    2  TPASS  :  socket() with invalid type - EINVAL
test_1_to_1_socket_bind_listen.c    3  TPASS  :  socket() - SUCCESS
test_1_to_1_socket_bind_listen.c    4  TPASS  :  bind() with invalid address ptr - EFAULT
test_1_to_1_socket_bind_listen.c    5  TPASS  :  bind() with invalid address length - EINVAL
test_1_to_1_socket_bind_listen.c    6  TPASS  :  bind() with invalid socket descriptor - ENOTSOCK
test_1_to_1_socket_bind_listen.c    7  TPASS  :  bind() with invalid local address - EADDRNOTAVAIL
test_1_to_1_socket_bind_listen.c    8  TPASS  :  bind() on an already bound socket - EINVAL
test_1_to_1_socket_bind_listen.c    9  TPASS  :  bind() with INADDR_ANY address and non-zero port - SUCCESS
test_1_to_1_socket_bind_listen.c   10  TPASS  :  bind() with INADDR_ANY address and zero port - SUCCESS
test_1_to_1_socket_bind_listen.c   11  TPASS  :  bind() with local address and zero port - SUCCESS
test_1_to_1_socket_bind_listen.c   12  TPASS  :  listen() with bad socket descriptor - EBADF
test_1_to_1_socket_bind_listen.c   13  TPASS  :  listen() with invalid socket - ENOTSOCK
test_1_to_1_socket_bind_listen.c   14  TPASS  :  listen() on a bound socket - SUCCESS
# ./test_1_to_1_sockopt
test_1_to_1_sockopt.c    1  TPASS  :  setsockopt() with a bad socket descriptor - EBADF
test_1_to_1_sockopt.c    2  TPASS  :  setsockopt() with an invalid socket - ENOTSOCK
test_1_to_1_sockopt.c    3  TPASS  :  setsockopt() with an invalid level - ENOPROTOOPT
test_1_to_1_sockopt.c    4  TPASS  :  setsockopt() with invalid option buffer - EFAULT
test_1_to_1_sockopt.c    5  TPASS  :  setsockopt() with invalid option name - EOPNOTSUPP
test_1_to_1_sockopt.c    6  TPASS  :  getsockopt() with a bad socket descriptor - EBADF
test_1_to_1_sockopt.c    7  TPASS  :  getsockopt() with an invalid socket - ENOTSOCK
test_1_to_1_sockopt.c    8  TPASS  :  getsockopt() with invalid option buffer - EFAULT
test_1_to_1_sockopt.c    9  TPASS  :  getsockopt() with invalid option name - EOPNOTSUPP
test_1_to_1_sockopt.c   10  TPASS  :  getsockopt() SCTP_INITMSG - SUCCESS
test_1_to_1_sockopt.c   11  TPASS  :  setsockopt() SCTP_INITMSG - SUCCESS
test_1_to_1_sockopt.c   12  TPASS  :  setsockopt() SO_LINGER - SUCCESS
test_1_to_1_sockopt.c   13  TPASS  :  getsockopt() SO_LINGER - SUCCESS
test_1_to_1_sockopt.c   14  TPASS  :  getsockopt() SO_RCVBUF - SUCCESS
test_1_to_1_sockopt.c   15  TPASS  :  getsockopt() SCTP_STATUS - SUCCESS
test_1_to_1_sockopt.c   16  TPASS  :  setsockopt() SO_RCVBUF - SUCCESS
test_1_to_1_sockopt.c   17  TPASS  :  setsockopt() SO_SNDBUF - SUCCESS
test_1_to_1_sockopt.c   18  TPASS  :  getsockopt() SO_SNDBUF - SUCCESS
test_1_to_1_sockopt.c   19  TPASS  :  getsockopt() SCTP_PRIMARY_ADDR - SUCCESS
test_1_to_1_sockopt.c   20  TPASS  :  setsockopt() SCTP_PRIMARY_ADDR - SUCCESS
test_1_to_1_sockopt.c   21  TPASS  :  getsockopt() SCTP_ASSOCINFO - SUCCESS
test_1_to_1_sockopt.c   22  TPASS  :  setsockopt() SCTP_ASSOCINFO - SUCCESS
# ./test_1_to_1_threads
test_1_to_1_threads.c    1  TPASS  :  send and receive data across multiple threads - SUCCESS
# ./test_assoc_abort
test_assoc_abort.c    1  TPASS  :  ABORT an association using SCTP_ABORT
# ./test_assoc_shutdown
test_assoc_shutdown.c    1  TPASS  :  Graceful shutdown of associations using SCTP_EOF
# ./test_autoclose
test_autoclose.c    0  TINFO  :  Waiting for the associations to close automatically in 5 secs
test_autoclose.c    1  TPASS  :  Autoclose of associations
# ./test_basic
test_basic.c    1  TPASS  :  socket
test_basic.c    2  TPASS  :  bind
test_basic.c    3  TPASS  :  recvmsg on a socket neither listening nor established
test_basic.c    4  TPASS  :  listen
test_basic.c    5  TPASS  :  sendmsg with a valid msg_name
test_basic.c    6  TPASS  :  recvmsg COMM_UP notifications
test_basic.c    7  TPASS  :  sendmsg with NULL associd and NULL msg_name
test_basic.c    8  TPASS  :  sendmsg with incorrect associd
test_basic.c    9  TPASS  :  sendmsg with valid associd
test_basic.c   10  TPASS  :  recvmsg
test_basic.c   11  TPASS  :  sctp_getladdrs
test_basic.c    0  TINFO  :  LOCAL ADDR 127.0.0.1 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR 10.66.86.114 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR 192.168.0.20 PORT 1024
test_basic.c   12  TPASS  :  sctp_freeladdrs
test_basic.c   13  TPASS  :  sctp_getpaddrs
test_basic.c    0  TINFO  :  PEER ADDR 127.0.0.1 PORT 1025
test_basic.c   14  TPASS  :  sctp_freepaddrs
test_basic.c   15  TPASS  :  recvmsg SHUTDOWN_COMP notification
# ./test_basic_v6
test_basic.c    1  TPASS  :  socket
test_basic.c    2  TPASS  :  bind
test_basic.c    3  TPASS  :  recvmsg on a socket neither listening nor established
test_basic.c    4  TPASS  :  listen
test_basic.c    5  TPASS  :  sendmsg with a valid msg_name
test_basic.c    6  TPASS  :  recvmsg COMM_UP notifications
test_basic.c    7  TPASS  :  sendmsg with NULL associd and NULL msg_name
test_basic.c    8  TPASS  :  sendmsg with incorrect associd
test_basic.c    9  TPASS  :  sendmsg with valid associd
test_basic.c   10  TPASS  :  recvmsg
test_basic.c   11  TPASS  :  sctp_getladdrs
test_basic.c    0  TINFO  :  LOCAL ADDR 0000:0000:0000:0000:0000:ffff:7f00:0001 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR 0000:0000:0000:0000:0000:0000:0000:0001 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR 0000:0000:0000:0000:0000:ffff:0a42:5672 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR 2620:0052:0000:4257:2e76:8aff:fe56:ef28 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR fe80:0000:0000:0000:2e76:8aff:fe56:ef28 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR 0000:0000:0000:0000:0000:ffff:c0a8:0014 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR 3ffe:0501:ffff:0100:0000:0000:0000:0020 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR fe80:0000:0000:0000:2e76:8aff:fe56:ef29 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR 3ffe:0501:ffff:0101:0000:0000:0000:0020 PORT 1024
test_basic.c    0  TINFO  :  LOCAL ADDR fe80:0000:0000:0000:2e76:8aff:fe56:ef2b PORT 1024
test_basic.c   12  TPASS  :  sctp_freeladdrs
test_basic.c   13  TPASS  :  sctp_getpaddrs
test_basic.c    0  TINFO  :  PEER ADDR 0000:0000:0000:0000:0000:0000:0000:0001 PORT 1025
test_basic.c   14  TPASS  :  sctp_freepaddrs
test_basic.c   15  TPASS  :  recvmsg SHUTDOWN_COMP notification
# ./test_connect
test_connect.c    1  TPASS  :  non-blocking connect
test_connect.c    2  TPASS  :  connect on a socket to create an assoc that is already established
test_connect.c    3  TPASS  :  blocking connect
test_connect.c    4  TPASS  :  connect on a peeled off socket
test_connect.c    5  TPASS  :  connect to create an assoc that matches a peeled off assoc
# ./test_connectx
test_connectx.c    1  TPASS  :  non-blocking connectx
test_connectx.c    2  TPASS  :  connectx on a socket to create an assoc that is already established
test_connectx.c    3  TPASS  :  Association id match between sctp_connectx() and notification.
test_connectx.c    4  TPASS  :  blocking connectx
test_connectx.c    5  TPASS  :  connectx on a peeled off socket
test_connectx.c    6  TPASS  :  connectx to create an assoc that matches a peeled off assoc
test_connectx.c    7  TPASS  :  server association 1 peers ok
test_connectx.c    8  TPASS  :  server association 2 peers ok
test_connectx.c    9  TPASS  :  client association 1 peers ok
test_connectx.c   10  TPASS  :  client association 2 peers ok
# ./test_fragments
test_fragments.c    1  TPASS  :  setsockopt(SCTP_DISABLE_FRAGMENTS)
test_fragments.c    2  TPASS  :  getsockopt(SCTP_DISABLE_FRAGMENTS)
test_fragments.c    3  TPASS  :  Send a message that exceeds assoc frag point
test_fragments.c    0  TINFO  :  Sent 1353 byte message
test_fragments.c    0  TINFO  :  Received 1353 byte message
test_fragments.c    0  TINFO  :  Sent 2000 byte message
test_fragments.c    0  TINFO  :  Received 2000 byte message
test_fragments.c    0  TINFO  :  Sent 5000 byte message
test_fragments.c    0  TINFO  :  Received 5000 byte message
test_fragments.c    0  TINFO  :  Sent 10000 byte message
test_fragments.c    0  TINFO  :  Received 10000 byte message
test_fragments.c    0  TINFO  :  Sent 20000 byte message
test_fragments.c    0  TINFO  :  Received 20000 byte message
test_fragments.c    0  TINFO  :  Sent 32768 byte message
test_fragments.c    0  TINFO  :  Received 32768 byte message
test_fragments.c    4  TPASS  :  Send/Receive fragmented messages
# ./test_fragments_v6
test_fragments.c    1  TPASS  :  setsockopt(SCTP_DISABLE_FRAGMENTS)
test_fragments.c    2  TPASS  :  getsockopt(SCTP_DISABLE_FRAGMENTS)
test_fragments.c    3  TPASS  :  Send a message that exceeds assoc frag point
test_fragments.c    0  TINFO  :  Sent 1353 byte message
test_fragments.c    0  TINFO  :  Received 1353 byte message
test_fragments.c    0  TINFO  :  Sent 2000 byte message
test_fragments.c    0  TINFO  :  Received 2000 byte message
test_fragments.c    0  TINFO  :  Sent 5000 byte message
test_fragments.c    0  TINFO  :  Received 5000 byte message
test_fragments.c    0  TINFO  :  Sent 10000 byte message
test_fragments.c    0  TINFO  :  Received 10000 byte message
test_fragments.c    0  TINFO  :  Sent 20000 byte message
test_fragments.c    0  TINFO  :  Received 20000 byte message
test_fragments.c    0  TINFO  :  Sent 32768 byte message
test_fragments.c    0  TINFO  :  Received 32768 byte message
test_fragments.c    4  TPASS  :  Send/Receive fragmented messages
# ./test_getname
test_getname.c    1  TPASS  :  getsockname on an unconnected socket
test_getname.c    2  TPASS  :  getpeername on an unconnected socket
test_getname.c    3  TPASS  :  getsockname on a connected client socket
test_getname.c    4  TPASS  :  getpeername on a connected client socket
test_getname.c    5  TPASS  :  getsockname on a connected server socket
test_getname.c    6  TPASS  :  getpeername on a connected server socket
test_getname.c    7  TPASS  :  getsockname/getpeername server/client match
test_getname.c    8  TPASS  :  getsockname on a bad socket descriptor - EBADF
test_getname.c    9  TPASS  :  getsockname on an invalid socket - ENOTSOCK
test_getname.c   10  TPASS  :  getsockname with invalid buffer - EFAULT
test_getname.c   11  TPASS  :  getpeername on a bad socket descriptor - EBADF
test_getname.c   12  TPASS  :  getpeername on an invalid socket - ENOTSOCK
test_getname.c   13  TPASS  :  getpeername with invalid buffer - EFAULT
# ./test_getname_v6
test_getname.c    1  TPASS  :  getsockname on an unconnected socket
test_getname.c    2  TPASS  :  getpeername on an unconnected socket
test_getname.c    3  TPASS  :  getsockname on a connected client socket
test_getname.c    4  TPASS  :  getpeername on a connected client socket
test_getname.c    5  TPASS  :  getsockname on a connected server socket
test_getname.c    6  TPASS  :  getpeername on a connected server socket
test_getname.c    7  TPASS  :  getsockname/getpeername server/client match
test_getname.c    8  TPASS  :  getsockname on a bad socket descriptor - EBADF
test_getname.c    9  TPASS  :  getsockname on an invalid socket - ENOTSOCK
test_getname.c   10  TPASS  :  getsockname with invalid buffer - EFAULT
test_getname.c   11  TPASS  :  getpeername on a bad socket descriptor - EBADF
test_getname.c   12  TPASS  :  getpeername on an invalid socket - ENOTSOCK
test_getname.c   13  TPASS  :  getpeername with invalid buffer - EFAULT
# ./test_inaddr_any
test_inaddr_any.c    1  TPASS  :  bind INADDR_ANY address
test_inaddr_any.c    2  TPASS  :  send msgs from a socket with INADDR_ANY bind address
# ./test_inaddr_any_v6
test_inaddr_any.c    1  TPASS  :  bind INADDR_ANY address
test_inaddr_any.c    2  TPASS  :  send msgs from a socket with INADDR_ANY bind address
# ./test_peeloff
test_peeloff.c    1  TPASS  :  sctp_peeloff
test_peeloff.c    2  TPASS  :  listen on a peeled off socket
test_peeloff.c    3  TPASS  :  sctp_peeloff on a peeled off socket
test_peeloff.c    4  TPASS  :  Receive msgs on peeled off sockets
test_peeloff.c    5  TPASS  :  Send msgs on peeled off sockets
test_peeloff.c    6  TPASS  :  peeled off socket cannot initialize a new assoc
# ./test_peeloff_v6
test_peeloff.c    1  TPASS  :  sctp_peeloff
test_peeloff.c    2  TPASS  :  listen on a peeled off socket
test_peeloff.c    3  TPASS  :  sctp_peeloff on a peeled off socket
test_peeloff.c    4  TPASS  :  Receive msgs on peeled off sockets
test_peeloff.c    5  TPASS  :  Send msgs on peeled off sockets
test_peeloff.c    6  TPASS  :  peeled off socket cannot initialize a new assoc
# ./test_recvmsg
test_recvmsg.c    1  TPASS  :  recvmsg with MSG_PEEK flag
test_recvmsg.c    2  TPASS  :  MSG_EOR in msg_flags set correctly
# ./test_sctp_sendrecvmsg
test_sctp_sendrecvmsg.c    1  TPASS  :  sctp_sendmsg
test_sctp_sendrecvmsg.c    2  TPASS  :  sctp_recvmsg SCTP_COMM_UP notification
test_sctp_sendrecvmsg.c    3  TPASS  :  sctp_recvmsg data
test_sctp_sendrecvmsg.c    0  TINFO  :  creating a fillmsg of size 3087
test_sctp_sendrecvmsg.c    4  TPASS  :  sctp_sendmsg with ttl
test_sctp_sendrecvmsg.c    5  TPASS  :  sctp_sendmsg with zero ttl
test_sctp_sendrecvmsg.c    6  TPASS  :  sctp_sendmsg fragmented msg with ttl
test_sctp_sendrecvmsg.c    0  TINFO  :  **  SLEEPING for 3 seconds **
test_sctp_sendrecvmsg.c    7  TPASS  :  sctp_recvmsg msg with zero ttl
test_sctp_sendrecvmsg.c    8  TPASS  :  sctp_recvmsg SEND_FAILED for message with ttl
test_sctp_sendrecvmsg.c    9  TPASS  :  sctp_recvmsg SEND_FAILED for fragmented message with ttl
test_sctp_sendrecvmsg.c   10  TPASS  :  sctp_send
# ./test_sctp_sendrecvmsg_v6
test_sctp_sendrecvmsg.c    1  TPASS  :  sctp_sendmsg
test_sctp_sendrecvmsg.c    2  TPASS  :  sctp_recvmsg SCTP_COMM_UP notification
test_sctp_sendrecvmsg.c    3  TPASS  :  sctp_recvmsg data
test_sctp_sendrecvmsg.c    0  TINFO  :  creating a fillmsg of size 3087
test_sctp_sendrecvmsg.c    4  TPASS  :  sctp_sendmsg with ttl
test_sctp_sendrecvmsg.c    5  TPASS  :  sctp_sendmsg with zero ttl
test_sctp_sendrecvmsg.c    6  TPASS  :  sctp_sendmsg fragmented msg with ttl
test_sctp_sendrecvmsg.c    0  TINFO  :  **  SLEEPING for 3 seconds **
test_sctp_sendrecvmsg.c    7  TPASS  :  sctp_recvmsg msg with zero ttl
test_sctp_sendrecvmsg.c    8  TPASS  :  sctp_recvmsg SEND_FAILED for message with ttl
test_sctp_sendrecvmsg.c    9  TPASS  :  sctp_recvmsg SEND_FAILED for fragmented message with ttl
test_sctp_sendrecvmsg.c   10  TPASS  :  sctp_send
# ./test_sockopt
test_sockopt.c  1 PASS : getsockopt(SCTP_STATUS) on a socket with no assoc
test_sockopt.c  2 PASS : getsockopt(SCTP_STATUS)
test_sockopt.c  3 PASS : getsockopt(SCTP_STATUS) with invalid associd
test_sockopt.c  4 PASS : getsockopt(SCTP_STATUS) with NULL associd
test_sockopt.c  5 PASS : getsockopt(SCTP_EVENTS)
test_sockopt.c  6 PASS : setsockopt(SCTP_EVENTS)
test_sockopt.c  7 PASS : setsockopt(SCTP_EVENTS) - SCTP_SHUTDOWN_EVENT
test_sockopt.c  8 PASS : sctp_opt_info(SCTP_STATUS)
test_sockopt.c  9 PASS : getsockopt(SCTP_INITMSG)
test_sockopt.c 10 PASS : setsockopt(SCTP_INITMSG)
test_sockopt.c 11 PASS : getsockopt(SCTP_PEER_ADDR_PARAMS)
test_sockopt.c 12 PASS : setsockopt(SCTP_DELAYED_ACK_TIME)
test_sockopt.c 13 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS)
test_sockopt.c 14 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid associd
test_sockopt.c 15 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style valid associd valid address
test_sockopt.c 16 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid transport
test_sockopt.c 17 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid parameter length
test_sockopt.c 18 PASS : setsockopt(SCTP_DELAYED_ACK_TIME) - one-to-many style invalid parameter length
test_sockopt.c 19 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid sack delay
test_sockopt.c 20 PASS : setsockopt(SCTP_DELAYED_ACK_TIME) - one-to-many style invalid sack delay
test_sockopt.c 21 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid path MTU
test_sockopt.c 22 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid hb enable flags
test_sockopt.c 23 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid PMTU discovery enable flags
test_sockopt.c 24 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid sack delay enable flags
test_sockopt.c 25 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid hb demand
test_sockopt.c 26 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style socket
test_sockopt.c 27 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style socket
test_sockopt.c 28 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style invalid associd
test_sockopt.c 29 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style associd belonging to another socket
test_sockopt.c 30 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style valid associd
test_sockopt.c 31 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style valid associd
test_sockopt.c 32 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style zero associd
test_sockopt.c 33 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style peeled off socket
test_sockopt.c 34 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-one style socket
test_sockopt.c 35 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-one style socket
test_sockopt.c 36 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-one style assoc
test_sockopt.c 37 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-one style assoc
test_sockopt.c 38 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-one style accepted socket
test_sockopt.c 39 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - null associd and null addr
test_sockopt.c 40 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - valid associd and null addr
test_sockopt.c 41 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - valid associd and invalid addr
test_sockopt.c 42 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - valid associd and valid addr
test_sockopt.c 43 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - valid associd and valid addr peeled off socket
test_sockopt.c 44 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - valid associd and valid addr accepted socket
# ./test_sockopt_v6
test_sockopt.c  1 PASS : getsockopt(SCTP_STATUS) on a socket with no assoc
test_sockopt.c  2 PASS : getsockopt(SCTP_STATUS)
test_sockopt.c  3 PASS : getsockopt(SCTP_STATUS) with invalid associd
test_sockopt.c  4 PASS : getsockopt(SCTP_STATUS) with NULL associd
test_sockopt.c  5 PASS : getsockopt(SCTP_EVENTS)
test_sockopt.c  6 PASS : setsockopt(SCTP_EVENTS)
test_sockopt.c  7 PASS : setsockopt(SCTP_EVENTS) - SCTP_SHUTDOWN_EVENT
test_sockopt.c  8 PASS : sctp_opt_info(SCTP_STATUS)
test_sockopt.c  9 PASS : getsockopt(SCTP_INITMSG)
test_sockopt.c 10 PASS : setsockopt(SCTP_INITMSG)
test_sockopt.c 11 PASS : getsockopt(SCTP_PEER_ADDR_PARAMS)
test_sockopt.c 12 PASS : setsockopt(SCTP_DELAYED_ACK_TIME)
test_sockopt.c 13 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS)
test_sockopt.c 14 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid associd
test_sockopt.c 15 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style valid associd valid address
test_sockopt.c 16 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid transport
test_sockopt.c 17 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid parameter length
test_sockopt.c 18 PASS : setsockopt(SCTP_DELAYED_ACK_TIME) - one-to-many style invalid parameter length
test_sockopt.c 19 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid sack delay
test_sockopt.c 20 PASS : setsockopt(SCTP_DELAYED_ACK_TIME) - one-to-many style invalid sack delay
test_sockopt.c 21 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid path MTU
test_sockopt.c 22 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid hb enable flags
test_sockopt.c 23 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid PMTU discovery enable flags
test_sockopt.c 24 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid sack delay enable flags
test_sockopt.c 25 PASS : setsockopt(SCTP_PEER_ADDR_PARAMS) - one-to-many style invalid hb demand
test_sockopt.c 26 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style socket
test_sockopt.c 27 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style socket
test_sockopt.c 28 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style invalid associd
test_sockopt.c 29 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style associd belonging to another socket
test_sockopt.c 30 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style valid associd
test_sockopt.c 31 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style valid associd
test_sockopt.c 32 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style zero associd
test_sockopt.c 33 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-many style peeled off socket
test_sockopt.c 34 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-one style socket
test_sockopt.c 35 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-one style socket
test_sockopt.c 36 PASS : setsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-one style assoc
test_sockopt.c 37 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-one style assoc
test_sockopt.c 38 PASS : getsockopt(SCTP_DEFAULT_SEND_PARAM) - one-to-one style accepted socket
test_sockopt.c 39 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - null associd and null addr
test_sockopt.c 40 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - valid associd and null addr
test_sockopt.c 41 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - valid associd and invalid addr
test_sockopt.c 42 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - valid associd and valid addr
test_sockopt.c 43 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - valid associd and valid addr peeled off socket
test_sockopt.c 44 PASS : getsockopt(SCTP_GET_PEER_ADDR_INFO) - valid associd and valid addr accepted socket
#  ./test_tcp_style
test_tcp_style.c  1 PASS : accept on non-listening socket
test_tcp_style.c  2 PASS : connect to non-listening socket
test_tcp_style.c  3 PASS : connect to listening socket
test_tcp_style.c  4 PASS : connect after max backlog
test_tcp_style.c  5 PASS : accept from listening socket
test_tcp_style.c  6 PASS : connect on an established socket
test_tcp_style.c  7 PASS : accept on an established socket
test_tcp_style.c  8 PASS : client sockets -> accepted sockets
test_tcp_style.c  9 PASS : accepted sockets -> client sockets
test_tcp_style.c 10 PASS : send on a listening socket
test_tcp_style.c 11 PASS : recv on a listening socket
test_tcp_style.c 12 PASS : recv on a SHUTDOWN received socket
test_tcp_style.c 13 PASS : recv SHUTDOWN_COMP notification on a SHUT_WR socket
test_tcp_style.c 14 PASS : recv on a SHUTDOWN sent socket
test_tcp_style.c 15 PASS : recv on a SHUT_RD socket
test_tcp_style.c 16 PASS : recv on a SHUT_RDWR socket
test_tcp_style.c 17 PASS : accept of a CLOSED association
test_tcp_style.c 18 PASS : send to a CLOSED association
test_tcp_style.c 19 PASS : auto-connect using sendto
test_tcp_style.c 20 PASS : sendmsg with SCTP_EOF flag
test_tcp_style.c 21 PASS : sendmsg with SCTP_ABORT flag
test_tcp_style.c 22 PASS : sendmsg with no flags
# ./test_tcp_style_v6
test_tcp_style.c  1 PASS : accept on non-listening socket
test_tcp_style.c  2 PASS : connect to non-listening socket
test_tcp_style.c  3 PASS : connect to listening socket
test_tcp_style.c  4 PASS : connect after max backlog
test_tcp_style.c  5 PASS : accept from listening socket
test_tcp_style.c  6 PASS : connect on an established socket
test_tcp_style.c  7 PASS : accept on an established socket
test_tcp_style.c  8 PASS : client sockets -> accepted sockets
test_tcp_style.c  9 PASS : accepted sockets -> client sockets
test_tcp_style.c 10 PASS : send on a listening socket
test_tcp_style.c 11 PASS : recv on a listening socket
test_tcp_style.c 12 PASS : recv on a SHUTDOWN received socket
test_tcp_style.c 13 PASS : recv SHUTDOWN_COMP notification on a SHUT_WR socket
test_tcp_style.c 14 PASS : recv on a SHUTDOWN sent socket
test_tcp_style.c 15 PASS : recv on a SHUT_RD socket
test_tcp_style.c 16 PASS : recv on a SHUT_RDWR socket
test_tcp_style.c 17 PASS : accept of a CLOSED association
test_tcp_style.c 18 PASS : send to a CLOSED association
test_tcp_style.c 19 PASS : auto-connect using sendto
test_tcp_style.c 20 PASS : sendmsg with SCTP_EOF flag
test_tcp_style.c 21 PASS : sendmsg with SCTP_ABORT flag
test_tcp_style.c 22 PASS : sendmsg with no flags
# ./test_timetolive
test_timetolive.c    0  TINFO  :  Creating fillmsg of size 3087
test_timetolive.c    1  TPASS  :  Send a message with timeout
test_timetolive.c    2  TPASS  :  Send a message with no timeout
test_timetolive.c    3  TPASS  :  Send a fragmented message with timeout
test_timetolive.c    0  TINFO  :   **  SLEEPING for 3 seconds **
test_timetolive.c    4  TPASS  :  Receive message with no timeout
test_timetolive.c    5  TPASS  :  Receive SEND_FAILED for message with timeout
test_timetolive.c    6  TPASS  :  Receive SEND_FAILED for fragmented message with timeout
# ./test_timetolive_v6
test_timetolive.c    0  TINFO  :  Creating fillmsg of size 3087
test_timetolive.c    1  TPASS  :  Send a message with timeout
test_timetolive.c    2  TPASS  :  Send a message with no timeout
test_timetolive.c    3  TPASS  :  Send a fragmented message with timeout
test_timetolive.c    0  TINFO  :   **  SLEEPING for 3 seconds **
test_timetolive.c    4  TPASS  :  Receive message with no timeout
test_timetolive.c    5  TPASS  :  Receive SEND_FAILED for message with timeout
test_timetolive.c    6  TPASS  :  Receive SEND_FAILED for fragmented message with timeout

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
In reply to Hangbin Liu

Hi!

Quoted 3 lines

SCTP test in ltp is based on lksctp. But the last patch for sctp in ltp is 2006. It has changed a lot and fixed many bugs. Update sctp test to upstream version 1.0.15 now.

I'm a bit confused here. Is the SCTP testsuite developed elsewhere? In that case it probably shouldn't be part of the LTP repo, perhaps a git submodule as mce-test is.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hi!

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

SCTP test in ltp is based on lksctp. But the last patch for sctp in ltp is 2006. It has changed a lot and fixed many bugs. Update sctp test to upstream version 1.0.15 now.

I'm a bit confused here. Is the SCTP testsuite developed elsewhere? In

Still at the old SF place: http://lksctp.org/
Git repo from the website: git://github.com/borkmann/lksctp-tools.git

So what about making it git submodule or including it only in the released tarballs leaving only a README with URL to the original project in the git?

It IMHO does not make much sense to have the code in two different git repos and synchronizing them from time to time with really big patch is even worse.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Hi!

Quoted 16 lines
Quoted 10 lines
Quoted 2 lines

Still at the old SF place: http://lksctp.org/
Git repo from the website: git://github.com/borkmann/lksctp-tools.git

So what about making it git submodule or including it only in the released tarballs leaving only a README with URL to the original project in the git?

It IMHO does not make much sense to have the code in two different git repos and synchronizing them from time to time with really big patch is even worse.

The lksctp-tools project provides a Linux user space library for SCTP (libsctp) including C language header files (netinet/sctp.h) for accessing SCTP specific application programming interfaces not provided by the standard sockets, and also some helper utilities around SCTP.

Quoted 4 lines

The sctp test case is only a little part of lksctp-tools and used for sctp protocol stack testing. LTP include these test cases from 2002 for networking test. It is just like TCP/UDP/ICMP/IGMP testing. I don't see any reason why we should remove it from network stack testing.

I haven't said we should remove them from LTP. I'm just trying to figure out if we can do better than having the sources maintained in two git repos at the same time which is more work and prone to mistakes.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list