Commit Graph

46 Commits

Author SHA1 Message Date
Luca Boccassi
d0e01b4bb2 Problem: regression with "select" on *nix (#2940)
* Problem: build failure with select as polling mechanism

Solution: cast mailbox_handle argument to (poller_t::handle_t) like in
the reaper thread class.

* Problem: build failure due to INT_MAX use without include

Solution: include limits and climits in src/select.cpp where INT_MAX is
used

* Problem: build failure due to unused variable in select.cpp

Solution: move the declaration of int rc inside the ifdef block where
it is actually used

* Problem: reference to wrong variable in select.cpp breaks build

Solution: fix it

* Problem: family_entry_t constructor has no body, build fails on *nix

Solution: add empty inline function in the struct

* Problem: no test coverage for poll and select

Solution: add Travis jobs for them on Linux

* Problem: Travis jobs cannot run in container infra

Solution: set sudo: false as it is not required anymore
2018-02-12 03:01:03 -05:00
sigiesec
749a85cb21 Problem: travis-ci is using outdated clang(-format)
Solution: explicitly select clang-5.0
2018-02-02 15:47:43 +01:00
sigiesec
4161793d19 Problem: clang-format not run on CI
Solution: add clang-format to cmake, and add another travis-ci build type
2018-02-02 15:47:43 +01:00
Omer Katz
befe62674c
Enable ccache for faster builds. 2018-01-27 11:01:35 +02:00
Luca Boccassi
574d72b0e2 Problem: Travis builds with brew fail
Solution: add workaround until Travis really fixes the issue:
https://github.com/travis-ci/travis-ci/issues/8552
2017-11-20 15:55:35 +00:00
Luca Boccassi
5311aa9cd9 Problem: Travis does not build with NORM
Solution: install package and enable the build on some Linux jobs
2017-10-17 11:17:13 +01:00
Luca Boccassi
68ba6d17be Problem: Travis does not test PGM
Solution: enable option and install build-dependency for the jobs that
already install packages only, to minimise marginal cost in term of
runtime
2017-08-19 17:54:42 +01:00
Luca Boccassi
f979ed4f35 Problem: Travis does not test GSSAPI
Solution: enable option and install build-dependency for the jobs that
already install packages only, to minimise marginal cost in term of
runtime
2017-08-19 17:53:57 +01:00
Luca Boccassi
067b7b0d27 Problem: Android build on Travis OSX takes 10 minutes+
Solution: remove it, and test it only on Linux, as the toolchain and
build process is the same.
2017-08-04 16:29:11 +01:00
Luca Boccassi
5b91eb549b Problem: OSX builds are very slow
Solution: avoid running brew update and brew install binutils unless
it's for the android cross-compilation, where it's necessary for
greadelf.
2017-08-03 23:35:51 +01:00
Luca Boccassi
0c5731ac00 Problem: 2 OSX libsodium Travis runs
Solution: remove the non-draft test run, as OSX is very slow and
overcrowded on Travis
2017-08-03 14:43:36 +01:00
Luca Boccassi
d96b0f42a6 Problem: additional doc-build test on Travis
Solution: remove it, as it takes time and it's enough to test once
2017-08-03 14:42:14 +01:00
Simon Giesecke
5d4e30eb13 Replace console output by monitoring events for curve security issues (#2645)
* Fixing #2002 one way of doing it

 * Mechanisms can implement a new method `error_detail()`
 * This error detail have three values for the moment: no_detail
 (default), protocol, encryption.
    + generic enough to make sense for all mechanisms.
    - low granularity level on information.

* Fixing #2002: implementation of the error details

The ZMQ_EVENT_HANDSHAKE_FAILED event carries the error details
as value.

* Removed Microsoft extenstion for enum member access

This was leading to compilation error under linux.

* Adaptation of CURVE test cases

* Monitoring event: changed API for detailed events

Removed ZMQ_EVENT_HANDSHAKE_FAILED and replaced it by:
- ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL,
- ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL,
- ZMQ_EVENT_HANDSHAKE_FAILED_ENCRYPTION

Adaptation of text case `security_curve`

* Removed event value comparison

This was introduced for the previous API model adaptation

* Removed the prints in std output and added missing details

`current_error_detail` was not set in every protocol error cases

* Fixed initialization of current_error_detail

* Fixed error in greeting test case

The handshake failure due to mechanism mismatch in greeting is actually
a protocol error. The error handling method consider it like so and
send a protocol handshake failure monitoring event instead of no_detail.

Fixed the test_security_curve expectation as well.

* Upgraded tests of monitoring events

The tests check the number of monitoring events received

* Problem: does not build under Linux or without ZMQ_DRAFT_API

Solution:
- properly use ZMQ_DRAFT_API conditional compilation
- use receive timeouts instead of Sleep

* Problem: duplicate definition of variable 'timeout'

Solution: merged definitions

* Problem: inconsistent timing dependencies

Solution: reduce timing dependency by using timeouts at more places

* Problem: assertion failure under Linux due to unexpected monitor event

Solution: output event type to aid debugging

* Problem: erroneous assertion code

* Problem: assertion failure with a garbage server key due to an extra third event

Solution: changed assertion to expect three events (needs to be checked)

* Problem: extra include directive to non-existent file

Solution: removed include directive

* Problem: assertion failure on appveyor for unknown reason

Solution: improve debug output

* Problem: no build with libsodium and draft api

Solution: add build configurations with libsodium and draft api

* Problem: assertion failure on CI

Solution: change assertion to reflect actual behaviour on CI (at least temporarily)

* Problem: error in condition in assertion code

* Problem: assertion failure on CI

Solution: generalize assertion to match behavior on CI

* Problem: assertion failures on CI

Solution: removed inconsistent assertion on no monitor events before flushing
improved debuggability by converting function into macro

* Problem: diverging test code for three analogous test cases with garbage key

Solution: extract common code into function

* Problem: does not build without ZMQ_BUILD_DRAFT_API

Solution: introduce dummy variable

* Attempt to remove workaround regarding ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL again

* Problem: EAGAIN error after handshake complete if there is no more data in inbuffer

Solution: Skip tcp_read attempt in that case

* Problem: handshaking event emitted after handshaking failed

Solution: use stream_engine_t::handshaking instead of mechanism_t::status() to determine whether still handshaking

* Include error code in debug output

* Improve debugging output: output flushed events

* Split up ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL into ZMQ_EVENT_HANDSHAKE_FAILED_ZMTP and ZMQ_EVENT_HANDSHAKE_FAILED_ZAP

* Fixed compilation without ZMQ_BUILD_DRAFT_API

* Renamed ZMQ_EVENT_HANDSHAKE_SUCCEED to ZMQ_EVENT_HANDSHAKE_SUCCEEDED for language consistency

* Renamed ZMQ_EVENT_HANDSHAKE_SUCCEED to ZMQ_EVENT_HANDSHAKE_SUCCEEDED for language consistency

* Renamed ZMQ_EVENT_HANDSHAKE_SUCCEED to ZMQ_EVENT_HANDSHAKE_SUCCEEDED for language consistency

* Fixed assert_monitor_event (require event instead of allowing no event)
Reverted erroneous change to handshaking condition
Renamed test_wrong_key to test_garbage_key
Generalized assumption in test_garbage_key to allow for ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL with error == EPIPE

* Better isolate test cases from each other by providing a fresh context & server for each

* Added diagnostic output

* Changed assertion to reflect actual behavior on CI

* Fixed formatting, observe maximum line length

* Fixed formatting, observe maximum line length

* Increase timeout to check if this fixes valgrind run

* Close server with close_zero_linger

* Increase timeout to check if this fixes valgrind run

* Increase timeout to check if this fixes valgrind run

* Generalize assertion to also work with valgrind

* Fixed formatting

* Add more diagnostic output

* Generalize assertion to also work with valgrind
2017-08-03 14:15:56 +01:00
Luca Boccassi
655fbfc399 Problem: ASAN test doesn't print good traces with GCC 4.8
Solution: add Ubuntu toolchain PPA and use GCC 6
2017-05-01 22:57:05 +01:00
Luca Boccassi
f126da8b22 Problem: no way to deploy releases to OBS
Solution: add new tokens to .travis.yml and change ci_deploy.sh
script to use Github APIs to create a temporary branch at the tag,
and the OBS APIs to trigger a source service run in the stable and
draft release projects:
network:messaging:zeromq:release-stable
network:messaging:zeromq:release-draft

The branch hack is unfortunately necessary as it is not possible to
modify OBS sources with the token APIs, and it is also not possible
to automatically fetch the latest tag in the service files.
The temporary branch is immediately deleted.
2017-04-30 16:15:15 +01:00
Luca Boccassi
d3ca23502f Problem: lack of out-of-bound memory checks in tests
Solution: add a CI build run with GCC's Address Sanitizer enabled.
This compiler flag will make the unit test programs abort if it
detects errors such as out-of-bound memory access or use-after-free.
2017-03-30 15:33:51 +01:00
Luca Boccassi
05a967fa1b Problem: Travis using deprecated OBS project
Solution: switch to shiny new one in the network:messaging namespace
2017-03-03 18:04:26 +00:00
Luca Boccassi
b1137b7672 Problem: documentation build not tested on Travis
Solution: install asciidoc and xmlto in the libsodium build run, since
it already refreshes APT to download other packages, so the delay is
smaller
2016-12-27 12:20:18 +01:00
Luca Boccassi
822def9b2b Problem: Travis rebuilds libsodium every time
Solution: use packages on Ubuntu and brews on OSX. The packages and
the brews are always kept up to date, so it's no use to rebuild the
libsodium stable branch manually everytime.
2016-12-27 11:48:38 +01:00
Luca Boccassi
a1220b7fd4 Problem: Travis OSX workaround for libtool no longer needed
Solution: Revert "Problem: Travis CI OSX builds are broken"

This reverts commit 531b3bf7c3.
2016-12-27 11:28:09 +01:00
Luca Boccassi
1f86019e3f Problem: Travis installs packages when not needed
Solution: narrow down the matrix to install valgrind and lcov only
for the test runs that use them.
CMake is part of the default image so no need to install it at all.
2016-12-27 11:27:33 +01:00
Luca Boccassi
531b3bf7c3 Problem: Travis CI OSX builds are broken
Solution: add a workaround to reinstall libtool. Travis hasn't fixed
the issue in a month, so time for a little hack until they sort it.
2016-07-24 14:24:24 +01:00
Kevin Sapper
b22558119d Problem: Deploying release artifacts is a manual process
Solution: Use travis to deploy these artifacts automatically.

The deployment is triggered by tagging on the zeromq/libzmq repository.
Of the many builds travis is checking only the default one with
libsodium and drafts disabled is used for deployment.

For now the results of `make distcheck` are deployed as well as their
md5 and sha1 hash sums. Further changes may upload a generated
Changelog as well.
2016-05-09 10:30:13 +02:00
Luca Boccassi
a782be73ac Problem: no CI tests with DRAFT enabled
Solution: do default test with DRAFT APIs enabled
2016-05-02 22:51:30 +01:00
Luca Boccassi
58c4e7e6b6 Problem: IPv6 is disabled on Travis Precise/Trusty
Solution: add one test run in a docket container environment, which
is currently the only environment where it's possibile to bind a
socket to ::1.
2016-04-18 18:43:36 +01:00
Luca Boccassi
0eca822b8f Problem: Valgrind in Ubuntu Precise is too old
Solution: run Travis CI in newer Trusty (14.04 LTS) release.
2016-03-19 21:55:03 +00:00
Luca Boccassi
ebc7316069 Problem: CI doesn't run Valgrind
Solution: run Valgrind only on the default Linux build to avoid
increasing the runtime.
2016-03-19 21:54:52 +00:00
Luca Boccassi
0cd7c0f807 Problem: no code coverage in CI
Solution: add new coverage build, and upload results to coveralls.io
2016-03-13 22:23:56 +00:00
Luca Boccassi
9a6e10406d Problem: too many CI builds
Solution: remove libsodium and no curve builds from cmake and android
2016-02-12 23:22:51 +00:00
Luca Boccassi
9393f06381 Problem: CI use of sodium or nacl is confusing
Solution: establish a matrix of CI options. On one axis we have the
build system (autotools, cmake, android) and on the other axis we
have the encryption options (tweetnacl, libsodium or none).
2016-02-11 22:39:36 +00:00
Luca Boccassi
3420e6e0dd Problem: CI still thinks libsodium is default
Solution: build by default with tweetnacl, and add sub-build project
to test libsodium
2016-02-11 20:16:17 +00:00
Luca Boccassi
c23cc65735 Problem: no CMake Travis CI build
Solution: add builds/cmake/ci_build.sh and call it from travis.yml
2016-02-08 13:30:25 +00:00
Luca Boccassi
84544ca6e2 Problem: no CI build with tweetnacl
Solution: add builds/tweetnacl/ci_build.sh and add it in travis.yml
2016-02-08 12:31:05 +00:00
Luca Boccassi
bd222d9206 Problem: travis CI tries to build "qt-android"
Solution: change .travis.yml to build "android" instead of "qt-android"
2015-12-16 13:11:45 +00:00
Luca Boccassi
0c4032b5af CI run on OSX needs binutils
OSX does not ship with binutils, need to install it before the script
run via brew in order to be able to use greadelf, needed by the
qt-android CI script.
2015-08-17 17:06:56 +01:00
Luca Boccassi
f6b0eaddb5 Set sudo: false to force container build 2015-08-16 20:20:59 +01:00
Luca Boccassi
85da2ea42f Increase file limit in travis config
Test cases occasionally fail, especially on OSX, due to socket limit.
Part of fix for #1502
2015-08-02 19:20:34 +01:00
Luca Boccassi
270a1ac577 Add OSX build to travis config. Fixes #1502 2015-08-02 18:59:34 +01:00
Joe McIlvain
5b6293c57e Problem: qt-android build doesn't fully work for downstream builds
Solution: Fix the qt-android build
2014-11-04 13:55:48 -08:00
Joe McIlvain
eae679718e Problem: No builtin way to build for qt-android
Solution: Add qt-android build system and add to travis-ci
2014-11-02 17:33:23 -08:00
Phillip Mienk
7c33d91a78 Update travis script to configure with libsodium. 2014-10-18 19:23:37 -07:00
Pieter Hintjens
a7fed989a6 Minor changes to Travis CI script 2014-08-12 12:37:49 +02:00
Pieter Hintjens
785aebc6a8 Reworking Travis script 2014-08-12 12:37:49 +02:00
Pieter Hintjens
097c2c8f8b Temporary workaround for broken libsodium install 2013-10-13 14:45:58 +02:00
Pieter Hintjens
d1ba8a50d2 Extended TravisCI build to use libsodium 2013-09-12 12:46:43 +02:00
Pieter Hintjens
bf96cb44e2 Fixed name of Travis file 2013-05-21 09:32:13 +02:00