Change in docker-playground[master]: sctp-test: fix build and pin to specific commits

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Sep 4 13:07:07 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10758 )

Change subject: sctp-test: fix build and pin to specific commits
......................................................................

sctp-test: fix build and pin to specific commits

Changes:
* install ca-certificates, so "git clone" doesn't fail
* checkout specific commits (the most recent ones right now), so we
  will get the same code every time we build the container and the
  patches won't fail to apply in the future
* rebase patch "disable the use of scheduler priorities and mlockall"
  on top of master (I couldn't find the commit it was supposed to be
  based on)
* delete obsolete patch that fixed compilation

Change-Id: I7cd647684b983384f419b5cfbea0f8dfc7fee70e
---
D sctp-test/0001-Fix-compilation-on-Linux.patch
M sctp-test/0001-disable-the-use-of-scheduler-priorities-and-mlockall.patch
M sctp-test/Dockerfile
3 files changed, 23 insertions(+), 49 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/sctp-test/0001-Fix-compilation-on-Linux.patch b/sctp-test/0001-Fix-compilation-on-Linux.patch
deleted file mode 100644
index 7ccf3e0..0000000
--- a/sctp-test/0001-Fix-compilation-on-Linux.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3ed7dcf137c7ec53077faf31aae40b3c04cbedad Mon Sep 17 00:00:00 2001
-From: Harald Welte <laforge at gnumonks.org>
-Date: Wed, 3 May 2017 22:13:54 +0200
-Subject: [PATCH] Fix compilation on Linux
-
-DEBUG_LOGGING is a #define, we have to use the preprocessor to check for
-it.
----
- gtests/net/packetdrill/packet_socket_linux.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gtests/net/packetdrill/packet_socket_linux.c b/gtests/net/packetdrill/packet_socket_linux.c
-index 8abf106..572b5b8 100644
---- a/gtests/net/packetdrill/packet_socket_linux.c
-+++ b/gtests/net/packetdrill/packet_socket_linux.c
-@@ -175,12 +175,12 @@ void packet_socket_set_filter(struct packet_socket *psock,
- 	bpfcode.filter[3].k = ((client_ether[0] << 8)  |
- 			       (client_ether[1]));
- 
--	if (DEBUG_LOGGING) {
-+#ifdef DEBUG_LOGGING
- 		int i;
- 		DEBUGP("filter constants:\n");
- 		for (i = 0; i < bpfcode.len; ++i)
- 			DEBUGP("0x%x\n", bpfcode.filter[i].k);
--	}
-+#endif
- 
- 	/* Attach the filter. */
- 	if (setsockopt(psock->packet_fd, SOL_SOCKET, SO_ATTACH_FILTER,
--- 
-2.11.0
-
diff --git a/sctp-test/0001-disable-the-use-of-scheduler-priorities-and-mlockall.patch b/sctp-test/0001-disable-the-use-of-scheduler-priorities-and-mlockall.patch
index 9a12116..b337c6d 100644
--- a/sctp-test/0001-disable-the-use-of-scheduler-priorities-and-mlockall.patch
+++ b/sctp-test/0001-disable-the-use-of-scheduler-priorities-and-mlockall.patch
@@ -1,37 +1,38 @@
-From f3635ca581643f489836f6c603c9888ab7595c36 Mon Sep 17 00:00:00 2001
-From: Harald Welte <laforge at gnumonks.org>
-Date: Wed, 3 May 2017 22:31:53 +0200
+From 9f4fc59acf3df854da790da3824c1a3af497c40b Mon Sep 17 00:00:00 2001
+From: Oliver Smith <osmith at sysmocom.de>
+Date: Tue, 4 Sep 2018 14:24:52 +0200
 Subject: [PATCH] disable the use of scheduler priorities and mlockall
 
 This doesn't work inside of docker, so let's disable it
+
+(This is the same patch as the one by laforge, just re-applied to
+current master)
 ---
- gtests/net/packetdrill/run.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+ gtests/net/packetdrill/run.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/gtests/net/packetdrill/run.c b/gtests/net/packetdrill/run.c
-index 54f4ebb..66a4c07 100644
+index 8467bb7..9268b50 100644
 --- a/gtests/net/packetdrill/run.c
 +++ b/gtests/net/packetdrill/run.c
-@@ -439,7 +439,7 @@ void set_scheduling_priority(void)
+@@ -454,7 +454,7 @@ void set_scheduling_priority(void)
  	if (num_cpus <= 1)
  		return;
  
--#if !defined(__OpenBSD__)
+-#if !defined(__OpenBSD__) && !defined(__APPLE__)
 +#if 0
  	/* Chose a real-time policy, but use SCHED_RR instead of
  	 * SCHED_FIFO, so that we round-robin among real-time threads
  	 * of the same priority. In practice this shouldn't matter,
-@@ -466,8 +466,10 @@ void set_scheduling_priority(void)
+@@ -481,7 +481,7 @@ void set_scheduling_priority(void)
   */
  void lock_memory(void)
  {
+-#if !defined(__APPLE__)
 +#if 0
  	if (mlockall(MCL_CURRENT | MCL_FUTURE))
- 		die_perror("lockall(MCL_CURRENT | MCL_FUTURE)");
-+#endif
- }
- 
- /* Wait for and return the wall time at which we should start the
+ 		die_perror("mlockall(MCL_CURRENT | MCL_FUTURE)");
+ #endif
 -- 
-2.11.0
+2.17.1
 
diff --git a/sctp-test/Dockerfile b/sctp-test/Dockerfile
index 9719953..b39a459 100644
--- a/sctp-test/Dockerfile
+++ b/sctp-test/Dockerfile
@@ -4,6 +4,7 @@
 
 RUN	apt-get update && \
 	apt-get install -y --no-install-recommends \
+		ca-certificates \
 		bison \
 		flex && \
 	apt-get clean
@@ -15,15 +16,20 @@
 
 WORKDIR	/tmp
 
+# Commit from 2018-08-28
 RUN	git clone https://github.com/nplab/packetdrill && \
 	cd packetdrill && \
+	git checkout 89bb4f35393187d0d34a84170de529d688421be7 && \
 	git am /tmp/*.patch && \
 	cd gtests/net/packetdrill && \
 	./configure && \
 	make && \
 	cp packetdrill /usr/bin/
 
-RUN	git clone https://github.com/nplab/ETSI-SCTP-Conformance-Testsuite.git
+# Commit from 2018-06-03
+RUN	git clone https://github.com/nplab/ETSI-SCTP-Conformance-Testsuite.git && \
+	cd "ETSI-SCTP-Conformance-Testsuite" && \
+	git checkout 24768461f9b9be36a2a5e4b767c7afb749e3243f
 
 COPY	run /tmp/run
 

-- 
To view, visit https://gerrit.osmocom.org/10758
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7cd647684b983384f419b5cfbea0f8dfc7fee70e
Gerrit-Change-Number: 10758
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180904/e399391f/attachment.htm>


More information about the gerrit-log mailing list