[qpid-dispatch] branch master updated: DISPATCH-1883: Tcp self test helpers require python selectors

2020-12-16 Thread chug
This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
 new e0fa62c  DISPATCH-1883: Tcp self test helpers require python selectors
e0fa62c is described below

commit e0fa62c117557207239f603ff77ba68c4e2cee59
Author: Chuck Rolke 
AuthorDate: Wed Dec 16 10:37:05 2020 -0500

DISPATCH-1883: Tcp self test helpers require python selectors

* add requirement to README
* include selectors in github workflow, travis, and dockerfiles

This closes #949
---
 .github/workflows/build.yaml  | 2 +-
 .travis.yml   | 2 ++
 README| 7 ++-
 dockerfiles/Dockerfile-fedora | 1 +
 dockerfiles/Dockerfile-ubuntu | 1 +
 5 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index ae4790c..1e51d53 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -197,7 +197,7 @@ jobs:
   architecture: x64
 
   - name: Install Python runtime/test dependencies
-run: python -m pip install tox quart
+run: python -m pip install tox quart selectors
 
   - name: Install Linux runtime/test dependencies
 if: ${{ runner.os == 'Linux' }}
diff --git a/.travis.yml b/.travis.yml
index f334f6b..aee6913 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -69,6 +69,8 @@ jobs:
 - python -m pip install --user --upgrade tox virtualenv==20.0.23
 # Install quart to run the http2 tests.
 - python -m pip install --user quart
+# DISPATCH-1883: Install selectors to run tcp echo server/client tools
+- python -m pip install --user selectors
 env:
 - CC=clang-10
 - CXX=clang++-10
diff --git a/README b/README
index b394e2b..b0ff0fe 100644
--- a/README
+++ b/README
@@ -75,10 +75,15 @@ The HTTP2 system tests will run only if
2. Python Web Microframework Quart version >= 0.13
3. curl is available
 
-To install pip and Quart
+The TCP system tests (tests/system_tests_tcp_adaptor.py) use the
+Python selectors module when running echo clients and servers.
+The TCP system tests run only if Python selectors is available.
+
+To install pip, Quart, and selectors
  - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
  - python3 get-pip.py
  - pip3 install --user quart
+ - pip3 install --user selectors
 
 
 Test Suite Code Coverage (GNU tools only)
diff --git a/dockerfiles/Dockerfile-fedora b/dockerfiles/Dockerfile-fedora
index 72b7f18..5330e24 100644
--- a/dockerfiles/Dockerfile-fedora
+++ b/dockerfiles/Dockerfile-fedora
@@ -35,6 +35,7 @@ RUN dnf -y install gcc gcc-c++ cmake openssl-devel 
cyrus-sasl-devel cyrus-sasl-p
 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
 RUN python3 get-pip.py
 RUN pip3 install --user quart
+RUN pip3 install --user selectors
 
 # Create a main directory and clone the qpid-proton repo from github
 RUN mkdir /main && cd /main && git clone 
https://gitbox.apache.org/repos/asf/qpid-proton.git  && cd /main/qpid-proton && 
mkdir /main/qpid-proton/build
diff --git a/dockerfiles/Dockerfile-ubuntu b/dockerfiles/Dockerfile-ubuntu
index dde2c8b..ecbcd43 100644
--- a/dockerfiles/Dockerfile-ubuntu
+++ b/dockerfiles/Dockerfile-ubuntu
@@ -32,6 +32,7 @@ RUN apt-get update && \
 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
 RUN python3 get-pip.py
 RUN pip3 install --user quart
+RUN pip3 install --user selectors
 
 
 RUN git clone https://gitbox.apache.org/repos/asf/qpid-dispatch.git && cd 
/qpid-dispatch && git submodule add 
https://gitbox.apache.org/repos/asf/qpid-proton.git && git submodule update 
--init


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-dispatch] branch master updated: DISPATCH-1886 - Close race window on connection activate/close.

2020-12-16 Thread tross
This is an automated email from the ASF dual-hosted git repository.

tross pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
 new d7215f3  DISPATCH-1886 - Close race window on connection 
activate/close.
d7215f3 is described below

commit d7215f378e3a2f5bd8c01071fc6cd4cc1b5120a2
Author: Ted Ross 
AuthorDate: Mon Dec 14 13:16:53 2020 -0500

DISPATCH-1886 - Close race window on connection activate/close.
---
 include/qpid/dispatch/container.h |  1 -
 src/container.c   | 21 -
 src/router_node.c |  8 ++--
 src/server.c  |  2 ++
 4 files changed, 8 insertions(+), 24 deletions(-)

diff --git a/include/qpid/dispatch/container.h 
b/include/qpid/dispatch/container.h
index 6364ff0..2f2850b 100644
--- a/include/qpid/dispatch/container.h
+++ b/include/qpid/dispatch/container.h
@@ -224,7 +224,6 @@ pn_terminus_t *qd_link_source(qd_link_t *link);
 pn_terminus_t *qd_link_target(qd_link_t *link);
 pn_terminus_t *qd_link_remote_source(qd_link_t *link);
 pn_terminus_t *qd_link_remote_target(qd_link_t *link);
-void qd_link_activate(qd_link_t *link);
 void qd_link_close(qd_link_t *link);
 void qd_link_detach(qd_link_t *link);
 void qd_link_free(qd_link_t *link);
diff --git a/src/container.c b/src/container.c
index c535988..2989633 100644
--- a/src/container.c
+++ b/src/container.c
@@ -1093,27 +1093,6 @@ pn_terminus_t *qd_link_remote_target(qd_link_t *link)
 }
 
 
-void qd_link_activate(qd_link_t *link)
-{
-if (!link || !link->pn_link)
-return;
-
-pn_session_t *sess = pn_link_session(link->pn_link);
-if (!sess)
-return;
-
-pn_connection_t *conn = pn_session_connection(sess);
-if (!conn)
-return;
-
-qd_connection_t *ctx = pn_connection_get_context(conn);
-if (!ctx)
-return;
-
-qd_server_activate(ctx);
-}
-
-
 void qd_link_close(qd_link_t *link)
 {
 if (link->pn_link)
diff --git a/src/router_node.c b/src/router_node.c
index aa4cf04..cd4b94c 100644
--- a/src/router_node.c
+++ b/src/router_node.c
@@ -1407,10 +1407,14 @@ static int AMQP_outbound_opened_handler(void 
*type_context, qd_connection_t *con
 
 static int AMQP_closed_handler(void *type_context, qd_connection_t *conn, void 
*context)
 {
-qdr_connection_t *qdrc = (qdr_connection_t*) 
qd_connection_get_context(conn);
+qdr_connection_t *qdrc   = (qdr_connection_t*) 
qd_connection_get_context(conn);
+qd_router_t  *router = (qd_router_t*) type_context;
 
 if (qdrc) {
-qdr_connection_set_context(qdrc, NULL);
+sys_mutex_lock(qd_server_get_activation_lock(router->qd->server));
+qdr_connection_set_context(qdrc, 0);
+sys_mutex_unlock(qd_server_get_activation_lock(router->qd->server));
+
 qdr_connection_closed(qdrc);
 qd_connection_set_context(conn, 0);
 }
diff --git a/src/server.c b/src/server.c
index b51d0cd..6382025 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1578,7 +1578,9 @@ void qd_connection_invoke_deferred(qd_connection_t *conn, 
qd_deferred_t call, vo
 DEQ_INSERT_TAIL(conn->deferred_calls, dc);
 sys_mutex_unlock(conn->deferred_call_lock);
 
+sys_mutex_lock(conn->server->conn_activation_lock);
 qd_server_activate(conn);
+sys_mutex_unlock(conn->server->conn_activation_lock);
 }
 
 


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-dispatch] branch master updated: NO-JIRA - Removed --user parameter from pip install. It was causing the following error and preventing tests from executing WARNING: The script hypercorn is inst

2020-12-16 Thread gmurthy
This is an automated email from the ASF dual-hosted git repository.

gmurthy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
 new 8a1e6d7  NO-JIRA - Removed --user parameter from pip install. It was 
causing the following error and preventing tests from executing   WARNING: The 
script hypercorn is installed in '/root/.local/bin' which is not on PATH.   
Consider adding this directory to PATH or, if you prefer to suppress this 
warning, use --no-warn-script-location.   WARNING: The script quart is 
installed in '/root/.local/bin' which is not on PATH.   Consider adding this 
directory to PATH or, if you prefer to [...]
8a1e6d7 is described below

commit 8a1e6d78e62a167c3b8bfa5d9d4659fe2c56d5f4
Author: Ganesh Murthy 
AuthorDate: Wed Dec 16 13:48:29 2020 -0500

NO-JIRA - Removed --user parameter from pip install. It was causing the 
following error and preventing tests from executing
  WARNING: The script hypercorn is installed in '/root/.local/bin' which is 
not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this 
warning, use --no-warn-script-location.
  WARNING: The script quart is installed in '/root/.local/bin' which is not 
on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this 
warning, use --no-warn-script-location.
---
 dockerfiles/Dockerfile-fedora | 4 ++--
 dockerfiles/Dockerfile-ubuntu | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dockerfiles/Dockerfile-fedora b/dockerfiles/Dockerfile-fedora
index 5330e24..fcb702f 100644
--- a/dockerfiles/Dockerfile-fedora
+++ b/dockerfiles/Dockerfile-fedora
@@ -34,8 +34,8 @@ RUN dnf -y install gcc gcc-c++ cmake openssl-devel 
cyrus-sasl-devel cyrus-sasl-p
 
 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
 RUN python3 get-pip.py
-RUN pip3 install --user quart
-RUN pip3 install --user selectors
+RUN pip3 install quart
+RUN pip3 install selectors
 
 # Create a main directory and clone the qpid-proton repo from github
 RUN mkdir /main && cd /main && git clone 
https://gitbox.apache.org/repos/asf/qpid-proton.git  && cd /main/qpid-proton && 
mkdir /main/qpid-proton/build
diff --git a/dockerfiles/Dockerfile-ubuntu b/dockerfiles/Dockerfile-ubuntu
index ecbcd43..ac8ba19 100644
--- a/dockerfiles/Dockerfile-ubuntu
+++ b/dockerfiles/Dockerfile-ubuntu
@@ -31,8 +31,8 @@ RUN apt-get update && \
 
 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
 RUN python3 get-pip.py
-RUN pip3 install --user quart
-RUN pip3 install --user selectors
+RUN pip3 install quart
+RUN pip3 install selectors
 
 
 RUN git clone https://gitbox.apache.org/repos/asf/qpid-dispatch.git && cd 
/qpid-dispatch && git submodule add 
https://gitbox.apache.org/repos/asf/qpid-proton.git && git submodule update 
--init


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org