<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/10758">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Harald Welte: Looks good to me, approved; Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sctp-test: fix build and pin to specific commits<br><br>Changes:<br>* install ca-certificates, so "git clone" doesn't fail<br>* checkout specific commits (the most recent ones right now), so we<br>  will get the same code every time we build the container and the<br>  patches won't fail to apply in the future<br>* rebase patch "disable the use of scheduler priorities and mlockall"<br>  on top of master (I couldn't find the commit it was supposed to be<br>  based on)<br>* delete obsolete patch that fixed compilation<br><br>Change-Id: I7cd647684b983384f419b5cfbea0f8dfc7fee70e<br>---<br>D sctp-test/0001-Fix-compilation-on-Linux.patch<br>M sctp-test/0001-disable-the-use-of-scheduler-priorities-and-mlockall.patch<br>M sctp-test/Dockerfile<br>3 files changed, 23 insertions(+), 49 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/sctp-test/0001-Fix-compilation-on-Linux.patch b/sctp-test/0001-Fix-compilation-on-Linux.patch</span><br><span>deleted file mode 100644</span><br><span>index 7ccf3e0..0000000</span><br><span>--- a/sctp-test/0001-Fix-compilation-on-Linux.patch</span><br><span>+++ /dev/null</span><br><span>@@ -1,33 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-From 3ed7dcf137c7ec53077faf31aae40b3c04cbedad Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(0, 100%, 40%);">-From: Harald Welte <laforge@gnumonks.org></span><br><span style="color: hsl(0, 100%, 40%);">-Date: Wed, 3 May 2017 22:13:54 +0200</span><br><span style="color: hsl(0, 100%, 40%);">-Subject: [PATCH] Fix compilation on Linux</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-DEBUG_LOGGING is a #define, we have to use the preprocessor to check for</span><br><span style="color: hsl(0, 100%, 40%);">-it.</span><br><span>----</span><br><span style="color: hsl(0, 100%, 40%);">- gtests/net/packetdrill/packet_socket_linux.c | 4 ++--</span><br><span style="color: hsl(0, 100%, 40%);">- 1 file changed, 2 insertions(+), 2 deletions(-)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-diff --git a/gtests/net/packetdrill/packet_socket_linux.c b/gtests/net/packetdrill/packet_socket_linux.c</span><br><span style="color: hsl(0, 100%, 40%);">-index 8abf106..572b5b8 100644</span><br><span>---- a/gtests/net/packetdrill/packet_socket_linux.c</span><br><span style="color: hsl(0, 100%, 40%);">-+++ b/gtests/net/packetdrill/packet_socket_linux.c</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -175,12 +175,12 @@ void packet_socket_set_filter(struct packet_socket *psock,</span><br><span style="color: hsl(0, 100%, 40%);">-   bpfcode.filter[3].k = ((client_ether[0] << 8)  |</span><br><span style="color: hsl(0, 100%, 40%);">-                         (client_ether[1]));</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">--    if (DEBUG_LOGGING) {</span><br><span style="color: hsl(0, 100%, 40%);">-+#ifdef DEBUG_LOGGING</span><br><span style="color: hsl(0, 100%, 40%);">-               int i;</span><br><span style="color: hsl(0, 100%, 40%);">-          DEBUGP("filter constants:\n");</span><br><span style="color: hsl(0, 100%, 40%);">-                for (i = 0; i < bpfcode.len; ++i)</span><br><span style="color: hsl(0, 100%, 40%);">-                    DEBUGP("0x%x\n", bpfcode.filter[i].k);</span><br><span style="color: hsl(0, 100%, 40%);">--       }</span><br><span style="color: hsl(0, 100%, 40%);">-+#endif</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">-       /* Attach the filter. */</span><br><span style="color: hsl(0, 100%, 40%);">-        if (setsockopt(psock->packet_fd, SOL_SOCKET, SO_ATTACH_FILTER,</span><br><span>--- </span><br><span style="color: hsl(0, 100%, 40%);">-2.11.0</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>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</span><br><span>index 9a12116..b337c6d 100644</span><br><span>--- a/sctp-test/0001-disable-the-use-of-scheduler-priorities-and-mlockall.patch</span><br><span>+++ b/sctp-test/0001-disable-the-use-of-scheduler-priorities-and-mlockall.patch</span><br><span>@@ -1,37 +1,38 @@</span><br><span style="color: hsl(0, 100%, 40%);">-From f3635ca581643f489836f6c603c9888ab7595c36 Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(0, 100%, 40%);">-From: Harald Welte <laforge@gnumonks.org></span><br><span style="color: hsl(0, 100%, 40%);">-Date: Wed, 3 May 2017 22:31:53 +0200</span><br><span style="color: hsl(120, 100%, 40%);">+From 9f4fc59acf3df854da790da3824c1a3af497c40b Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(120, 100%, 40%);">+From: Oliver Smith <osmith@sysmocom.de></span><br><span style="color: hsl(120, 100%, 40%);">+Date: Tue, 4 Sep 2018 14:24:52 +0200</span><br><span> Subject: [PATCH] disable the use of scheduler priorities and mlockall</span><br><span> </span><br><span> This doesn't work inside of docker, so let's disable it</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+(This is the same patch as the one by laforge, just re-applied to</span><br><span style="color: hsl(120, 100%, 40%);">+current master)</span><br><span> ---</span><br><span style="color: hsl(0, 100%, 40%);">- gtests/net/packetdrill/run.c | 4 +++-</span><br><span style="color: hsl(0, 100%, 40%);">- 1 file changed, 3 insertions(+), 1 deletion(-)</span><br><span style="color: hsl(120, 100%, 40%);">+ gtests/net/packetdrill/run.c | 4 ++--</span><br><span style="color: hsl(120, 100%, 40%);">+ 1 file changed, 2 insertions(+), 2 deletions(-)</span><br><span> </span><br><span> diff --git a/gtests/net/packetdrill/run.c b/gtests/net/packetdrill/run.c</span><br><span style="color: hsl(0, 100%, 40%);">-index 54f4ebb..66a4c07 100644</span><br><span style="color: hsl(120, 100%, 40%);">+index 8467bb7..9268b50 100644</span><br><span> --- a/gtests/net/packetdrill/run.c</span><br><span> +++ b/gtests/net/packetdrill/run.c</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -439,7 +439,7 @@ void set_scheduling_priority(void)</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -454,7 +454,7 @@ void set_scheduling_priority(void)</span><br><span>          if (num_cpus <= 1)</span><br><span>                return;</span><br><span>  </span><br><span style="color: hsl(0, 100%, 40%);">--#if !defined(__OpenBSD__)</span><br><span style="color: hsl(120, 100%, 40%);">+-#if !defined(__OpenBSD__) && !defined(__APPLE__)</span><br><span> +#if 0</span><br><span>          /* Chose a real-time policy, but use SCHED_RR instead of</span><br><span>      * SCHED_FIFO, so that we round-robin among real-time threads</span><br><span>         * of the same priority. In practice this shouldn't matter,</span><br><span style="color: hsl(0, 100%, 40%);">-@@ -466,8 +466,10 @@ void set_scheduling_priority(void)</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -481,7 +481,7 @@ void set_scheduling_priority(void)</span><br><span>   */</span><br><span>  void lock_memory(void)</span><br><span>  {</span><br><span style="color: hsl(120, 100%, 40%);">+-#if !defined(__APPLE__)</span><br><span> +#if 0</span><br><span>          if (mlockall(MCL_CURRENT | MCL_FUTURE))</span><br><span style="color: hsl(0, 100%, 40%);">-                 die_perror("lockall(MCL_CURRENT | MCL_FUTURE)");</span><br><span style="color: hsl(0, 100%, 40%);">-+#endif</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">- </span><br><span style="color: hsl(0, 100%, 40%);">- /* Wait for and return the wall time at which we should start the</span><br><span style="color: hsl(120, 100%, 40%);">+                die_perror("mlockall(MCL_CURRENT | MCL_FUTURE)");</span><br><span style="color: hsl(120, 100%, 40%);">+ #endif</span><br><span> -- </span><br><span style="color: hsl(0, 100%, 40%);">-2.11.0</span><br><span style="color: hsl(120, 100%, 40%);">+2.17.1</span><br><span> </span><br><span>diff --git a/sctp-test/Dockerfile b/sctp-test/Dockerfile</span><br><span>index 9719953..b39a459 100644</span><br><span>--- a/sctp-test/Dockerfile</span><br><span>+++ b/sctp-test/Dockerfile</span><br><span>@@ -4,6 +4,7 @@</span><br><span> </span><br><span> RUN apt-get update && \</span><br><span>  apt-get install -y --no-install-recommends \</span><br><span style="color: hsl(120, 100%, 40%);">+          ca-certificates \</span><br><span>            bison \</span><br><span>              flex && \</span><br><span>    apt-get clean</span><br><span>@@ -15,15 +16,20 @@</span><br><span> </span><br><span> WORKDIR      /tmp</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+# Commit from 2018-08-28</span><br><span> RUN       git clone https://github.com/nplab/packetdrill && \</span><br><span>  cd packetdrill && \</span><br><span style="color: hsl(120, 100%, 40%);">+   git checkout 89bb4f35393187d0d34a84170de529d688421be7 && \</span><br><span>   git am /tmp/*.patch && \</span><br><span>     cd gtests/net/packetdrill && \</span><br><span>       ./configure && \</span><br><span>     make && \</span><br><span>    cp packetdrill /usr/bin/</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-RUN git clone https://github.com/nplab/ETSI-SCTP-Conformance-Testsuite.git</span><br><span style="color: hsl(120, 100%, 40%);">+# Commit from 2018-06-03</span><br><span style="color: hsl(120, 100%, 40%);">+RUN   git clone https://github.com/nplab/ETSI-SCTP-Conformance-Testsuite.git && \</span><br><span style="color: hsl(120, 100%, 40%);">+   cd "ETSI-SCTP-Conformance-Testsuite" && \</span><br><span style="color: hsl(120, 100%, 40%);">+   git checkout 24768461f9b9be36a2a5e4b767c7afb749e3243f</span><br><span> </span><br><span> COPY       run /tmp/run</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10758">change 10758</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/10758"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: docker-playground </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I7cd647684b983384f419b5cfbea0f8dfc7fee70e </div>
<div style="display:none"> Gerrit-Change-Number: 10758 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>