0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 23:51:04 +08:00

69 Commits

Author SHA1 Message Date
Simon Giesecke
3033b1ef18 Problem: coverage build is using old distro
Solution: update to default distro
2020-09-04 11:10:37 +02:00
Simon Giesecke
1d62d7c94a Problem: coverage is not measured with all features
Solution: enable all features on coverage build
2020-09-04 10:58:16 +02:00
Simon Giesecke
3135f6b503 Problem: clang-tidy job is failing because package dependencies are outdated
Solution: update to llvm-toolchain-10
2020-06-19 17:58:26 +02:00
Luca Boccassi
3770937de3 Problem: we want to check for undefined behaviour in the CI
Solution: enable GCC's UBSAN in the sanitizer job
2020-05-05 12:58:39 +01:00
Luca Boccassi
cdd9e9d1f4 Problem: Travis uses old-old-old-stable Ubuntu by default
Solution: set default to bionic, and leave a few jobs that manually
set Trusty/Xenial to have more coverage
This is especially useful to get newer gcc for address sanitizer support
2020-05-05 11:48:55 +01:00
Luca Boccassi
5a78bad2a8 Problem: coverage CI job fails
Solution: bump OS to Xenial for newer python libraries
2020-04-18 11:06:58 +01:00
Luca Boccassi
21f763c872 Problem: libbsd not used on Travis
Solution: add it to one build to exercise all the code paths
2019-12-28 21:17:09 +01:00
Simon Giesecke
b88b12c77c Problem: sonar has no access to git history
Solution: unshallow clone in analysis job
2019-12-09 09:48:21 +01:00
Simon Giesecke
76460c5e17 Problem: clang-format outdated
Solution: update to clang-format 8
2019-12-08 16:08:16 +01:00
Simon Giesecke
18edd28955 Problem: clang version used for analysis is outdated
Solution: update to clang 8
2019-12-08 15:24:48 +01:00
Simon Giesecke
d2fbfa7bd8 Problem: sonar-scanner binary is outdated and no longer available
Solution: Update to version 4.2.0.1873
2019-12-07 10:38:22 +01:00
somdoron
7296fb5b15 problem: unsecured websocket is rarely used in production
Solution: support websocket with tls (wss)
2019-10-02 08:58:26 +03:00
Luca Boccassi
79535f39ca Problem: there are already many Travis builds
Solution: do not add one specifically for nss, but use the existing
catch-all build
2019-09-11 15:46:00 +01:00
somdoron
2fb9e93cfa problem: ci doesn't build with nss
Solution: add an nss build to CI
2019-09-11 15:01:28 +03:00
fanquake
abe26f0dc3
problem: sudo:false has been deprecated by Travis CI
solution: remove sudo:false usage from travis.yml

Travis has deprecated the usage of sudo:false in travis.yml.
See this blog post for more details: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
Also: https://docs.travis-ci.com/user/reference/trusty/#container-based-infrastructure
2019-08-10 19:54:41 +08:00
Luca Boccassi
5de3aa1555 Problem: clang-tidy 6 has issues with comments
Solution: bump CI to version 7
2019-05-18 17:09:17 +01:00
Luca Boccassi
f9b0945c1b Problem: have to check ABI compatibility manually
Solution: automate it on Travis
2019-01-20 16:38:17 +00:00
Luca Boccassi
1402f7727e Problem: no automated way to enforce C++98 compatibility
Solution: if the compiler supports it, pass C++98-compat flags.
Currently Clang supports this flag but GCC does not.

Add a new flag to enable it, as building with C++98-compat but also
with -std=gnu++11 will cause a lot of warnings due to the backward
compat ifdefs.

Add a CI job to run it and ensure we don't break compatibility.
2018-11-09 20:51:20 +00:00
Simon Giesecke
3cb4754602 Problem: analysis job prolongs overall build
Solution: start analysis job first, if enabled, since it takes the longest time
2018-05-31 11:23:04 +02:00
Luca Boccassi
cf41aed29d Problem: missing sonarqube token
Solution: add it
2018-05-24 16:06:08 +01:00
Simon Giesecke
6afa1cee3a Problem: travis-ci analysis build is always run
Solution: configure to run only on scheduled runs or on specifically named branches
2018-05-24 16:15:58 +02:00
Simon Giesecke
4d3516f634 Problem: no static analysis under Linux
Solution: activate clang-tidy, scan-build and sonar-scanner
2018-05-24 13:44:46 +02:00
Luca Boccassi
19060345e4 Problem: TIPC availability check is too strict (#2977)
* Problem: TIPC availability check is too strict

Solution: at build time only check if the API is available. In the tests
do a first check and a skip if the functionality is not available.

TIPC needs an in-tree but not loaded by default kernel module, tipc.ko
to be loaded, which requires root, so it is unlikely to be available on
any build system by default.
This will allow most distributions to ship with TIPC support built in,
and to avoid tests failure if the module is not there.

* Problem: no Travis tests for TIPC

Solution: mark one job with sudo: required and load the kernel module

* Problem: CMake fails when test returns 77 (skip)

Solution: set property to let it mark the test as skipped as intended
2018-03-09 17:47:42 +01:00
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 531b3bf7c3ed5f29760c89b7152a2c85a4a9d8bd.
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