Merge github.com:grpc/grpc into backoff2

Reintroduce flakiness flag for tests: lb_policies_test is inherently flaky and I don't have time to deflake this week
pull/5854/head
Craig Tiller 9 years ago
commit de7edf83cc
  1. 4
      Makefile
  2. 7
      build.yaml
  3. 6
      include/grpc/compression.h
  4. 47
      src/core/compression/compression_algorithm.c
  5. 8
      src/core/surface/call.c
  6. 9
      src/core/surface/call.h
  7. 3
      src/cpp/server/server_context.cc
  8. 2
      src/python/grpcio/grpc/_cython/imports.generated.h
  9. 2
      src/ruby/ext/grpc/rb_grpc_imports.generated.h
  10. 3
      templates/tools/dockerfile/apt_get_basic.include
  11. 3
      templates/tools/dockerfile/run_tests_addons.include
  12. 17
      templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template
  13. 0
      templates/tools/dockerfile/test/cxx_wheezy_x64/post-git-setup.sh.template
  14. 8
      templates/tools/dockerfile/test/sanity/Dockerfile.template
  15. 102
      test/core/compression/compression_test.c
  16. 7
      test/core/end2end/fixtures/h2_uchannel.c
  17. 2
      tools/distrib/check_nanopb_output.sh
  18. 21
      tools/dockerfile/test/cxx_wheezy_x64/Dockerfile
  19. 0
      tools/dockerfile/test/cxx_wheezy_x64/post-git-setup.sh
  20. 8
      tools/dockerfile/test/sanity/Dockerfile
  21. 4
      tools/openssl/use_openssl.sh
  22. 12
      tools/run_tests/run_tests.py
  23. 10
      tools/run_tests/tests.json

@ -1540,8 +1540,6 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/json_test || ( echo test json_test failed ; exit 1 ) $(Q) $(BINDIR)/$(CONFIG)/json_test || ( echo test json_test failed ; exit 1 )
$(E) "[RUN] Testing lame_client_test" $(E) "[RUN] Testing lame_client_test"
$(Q) $(BINDIR)/$(CONFIG)/lame_client_test || ( echo test lame_client_test failed ; exit 1 ) $(Q) $(BINDIR)/$(CONFIG)/lame_client_test || ( echo test lame_client_test failed ; exit 1 )
$(E) "[RUN] Testing lb_policies_test"
$(Q) $(BINDIR)/$(CONFIG)/lb_policies_test || ( echo test lb_policies_test failed ; exit 1 )
$(E) "[RUN] Testing message_compress_test" $(E) "[RUN] Testing message_compress_test"
$(Q) $(BINDIR)/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 ) $(Q) $(BINDIR)/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 )
$(E) "[RUN] Testing mlog_test" $(E) "[RUN] Testing mlog_test"
@ -1623,6 +1621,8 @@ test_c: buildtests_c
flaky_test_c: buildtests_c flaky_test_c: buildtests_c
$(E) "[RUN] Testing lb_policies_test"
$(Q) $(BINDIR)/$(CONFIG)/lb_policies_test || ( echo test lb_policies_test failed ; exit 1 )
test_cxx: test_zookeeper buildtests_cxx test_cxx: test_zookeeper buildtests_cxx

@ -1673,6 +1673,7 @@ targets:
- gpr - gpr
- name: lb_policies_test - name: lb_policies_test
cpu_cost: 0.1 cpu_cost: 0.1
flaky: true
build: test build: test
language: c language: c
src: src:
@ -2462,6 +2463,8 @@ targets:
- gpr_test_util - gpr_test_util
- gpr - gpr
- grpc++_test_config - grpc++_test_config
exclude_configs:
- tsan
platforms: platforms:
- mac - mac
- linux - linux
@ -2481,6 +2484,8 @@ targets:
- gpr_test_util - gpr_test_util
- gpr - gpr
- grpc++_test_config - grpc++_test_config
exclude_configs:
- tsan
platforms: platforms:
- mac - mac
- linux - linux
@ -2937,7 +2942,7 @@ node_modules:
- src/node/ext/server_credentials.cc - src/node/ext/server_credentials.cc
- src/node/ext/timeval.cc - src/node/ext/timeval.cc
openssl_fallback: openssl_fallback:
base_uri: http://openssl.org/source/ base_uri: https://openssl.org/source/old/1.0.2/
extraction_dir: openssl-1.0.2f extraction_dir: openssl-1.0.2f
tarball: openssl-1.0.2f.tar.gz tarball: openssl-1.0.2f.tar.gz
php_config_m4: php_config_m4:

@ -55,11 +55,13 @@ GRPCAPI int grpc_compression_algorithm_parse(
GRPCAPI int grpc_compression_algorithm_name( GRPCAPI int grpc_compression_algorithm_name(
grpc_compression_algorithm algorithm, char **name); grpc_compression_algorithm algorithm, char **name);
/** Returns the compression algorithm corresponding to \a level. /** Returns the compression algorithm corresponding to \a level for the
* compression algorithms encoded in the \a accepted_encodings bitset.
* *
* It abort()s for unknown levels . */ * It abort()s for unknown levels . */
GRPCAPI grpc_compression_algorithm GRPCAPI grpc_compression_algorithm
grpc_compression_algorithm_for_level(grpc_compression_level level); grpc_compression_algorithm_for_level(grpc_compression_level level,
uint32_t accepted_encodings);
GRPCAPI void grpc_compression_options_init(grpc_compression_options *opts); GRPCAPI void grpc_compression_options_init(grpc_compression_options *opts);

@ -128,20 +128,57 @@ grpc_mdelem *grpc_compression_encoding_mdelem(
/* TODO(dgq): Add the ability to specify parameters to the individual /* TODO(dgq): Add the ability to specify parameters to the individual
* compression algorithms */ * compression algorithms */
grpc_compression_algorithm grpc_compression_algorithm_for_level( grpc_compression_algorithm grpc_compression_algorithm_for_level(
grpc_compression_level level) { grpc_compression_level level, uint32_t accepted_encodings) {
GRPC_API_TRACE("grpc_compression_algorithm_for_level(level=%d)", 1, GRPC_API_TRACE("grpc_compression_algorithm_for_level(level=%d)", 1,
((int)level)); ((int)level));
if (level > GRPC_COMPRESS_LEVEL_HIGH) {
gpr_log(GPR_ERROR, "Unknown compression level %d.", (int)level);
abort();
}
const size_t num_supported =
GPR_BITCOUNT(accepted_encodings) - 1; /* discard NONE */
if (level == GRPC_COMPRESS_LEVEL_NONE || num_supported == 0) {
return GRPC_COMPRESS_NONE;
}
GPR_ASSERT(level > 0);
/* Establish a "ranking" or compression algorithms in increasing order of
* compression.
* This is simplistic and we will probably want to introduce other dimensions
* in the future (cpu/memory cost, etc). */
const grpc_compression_algorithm algos_ranking[] = {GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_DEFLATE};
/* intersect algos_ranking with the supported ones keeping the ranked order */
grpc_compression_algorithm
sorted_supported_algos[GRPC_COMPRESS_ALGORITHMS_COUNT];
size_t algos_supported_idx = 0;
for (size_t i = 0; i < GPR_ARRAY_SIZE(algos_ranking); i++) {
const grpc_compression_algorithm alg = algos_ranking[i];
for (size_t j = 0; j < num_supported; j++) {
if (GPR_BITGET(accepted_encodings, alg) == 1) {
/* if \a alg in supported */
sorted_supported_algos[algos_supported_idx++] = alg;
break;
}
}
if (algos_supported_idx == num_supported) break;
}
switch (level) { switch (level) {
case GRPC_COMPRESS_LEVEL_NONE: case GRPC_COMPRESS_LEVEL_NONE:
return GRPC_COMPRESS_NONE; abort(); /* should have been handled already */
case GRPC_COMPRESS_LEVEL_LOW: case GRPC_COMPRESS_LEVEL_LOW:
return sorted_supported_algos[0];
case GRPC_COMPRESS_LEVEL_MED: case GRPC_COMPRESS_LEVEL_MED:
return sorted_supported_algos[num_supported / 2];
case GRPC_COMPRESS_LEVEL_HIGH: case GRPC_COMPRESS_LEVEL_HIGH:
return GRPC_COMPRESS_DEFLATE; return sorted_supported_algos[num_supported - 1];
default: default:
gpr_log(GPR_ERROR, "Unknown compression level %d.", (int)level);
abort(); abort();
} };
} }
void grpc_compression_options_init(grpc_compression_options *opts) { void grpc_compression_options_init(grpc_compression_options *opts) {

@ -1481,3 +1481,11 @@ void *grpc_call_context_get(grpc_call *call, grpc_context_index elem) {
} }
uint8_t grpc_call_is_client(grpc_call *call) { return call->is_client; } uint8_t grpc_call_is_client(grpc_call *call) { return call->is_client; }
grpc_compression_algorithm grpc_call_compression_for_level(
grpc_call *call, grpc_compression_level level) {
gpr_mu_lock(&call->mu);
const uint32_t accepted_encodings = call->encodings_accepted_by_peer;
gpr_mu_unlock(&call->mu);
return grpc_compression_algorithm_for_level(level, accepted_encodings);
}

@ -1,6 +1,6 @@
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -38,7 +38,9 @@
#include "src/core/channel/context.h" #include "src/core/channel/context.h"
#include "src/core/surface/api_trace.h" #include "src/core/surface/api_trace.h"
#include "src/core/surface/surface_trace.h" #include "src/core/surface/surface_trace.h"
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/impl/codegen/compression_types.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -102,6 +104,11 @@ void *grpc_call_context_get(grpc_call *call, grpc_context_index elem);
uint8_t grpc_call_is_client(grpc_call *call); uint8_t grpc_call_is_client(grpc_call *call);
/* Return an appropriate compression algorithm for the requested compression \a
* level in the context of \a call. */
grpc_compression_algorithm grpc_call_compression_for_level(
grpc_call *call, grpc_compression_level level);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

@ -43,6 +43,7 @@
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include "src/core/channel/compress_filter.h" #include "src/core/channel/compress_filter.h"
#include "src/core/surface/call.h"
#include "src/cpp/common/create_auth_context.h" #include "src/cpp/common/create_auth_context.h"
namespace grpc { namespace grpc {
@ -197,7 +198,7 @@ bool ServerContext::IsCancelled() const {
void ServerContext::set_compression_level(grpc_compression_level level) { void ServerContext::set_compression_level(grpc_compression_level level) {
const grpc_compression_algorithm algorithm_for_level = const grpc_compression_algorithm algorithm_for_level =
grpc_compression_algorithm_for_level(level); grpc_call_compression_for_level(call_, level);
set_compression_algorithm(algorithm_for_level); set_compression_algorithm(algorithm_for_level);
} }

@ -166,7 +166,7 @@ extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_im
typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, char **name); typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, char **name);
extern grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; extern grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import;
#define grpc_compression_algorithm_name grpc_compression_algorithm_name_import #define grpc_compression_algorithm_name grpc_compression_algorithm_name_import
typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level); typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level, uint32_t accepted_encodings);
extern grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; extern grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import;
#define grpc_compression_algorithm_for_level grpc_compression_algorithm_for_level_import #define grpc_compression_algorithm_for_level grpc_compression_algorithm_for_level_import
typedef void(*grpc_compression_options_init_type)(grpc_compression_options *opts); typedef void(*grpc_compression_options_init_type)(grpc_compression_options *opts);

@ -166,7 +166,7 @@ extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_im
typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, char **name); typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, char **name);
extern grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; extern grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import;
#define grpc_compression_algorithm_name grpc_compression_algorithm_name_import #define grpc_compression_algorithm_name grpc_compression_algorithm_name_import
typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level); typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level, uint32_t accepted_encodings);
extern grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; extern grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import;
#define grpc_compression_algorithm_for_level grpc_compression_algorithm_for_level_import #define grpc_compression_algorithm_for_level grpc_compression_algorithm_for_level_import
typedef void(*grpc_compression_options_init_type)(grpc_compression_options *opts); typedef void(*grpc_compression_options_init_type)(grpc_compression_options *opts);

@ -1,4 +1,3 @@
<%page args="skip_golang=False"/>\
# Install Git and basic packages. # Install Git and basic packages.
RUN apt-get update && apt-get install -y ${'\\'} RUN apt-get update && apt-get install -y ${'\\'}
autoconf ${'\\'} autoconf ${'\\'}
@ -10,9 +9,7 @@ RUN apt-get update && apt-get install -y ${'\\'}
gcc ${'\\'} gcc ${'\\'}
gcc-multilib ${'\\'} gcc-multilib ${'\\'}
git ${'\\'} git ${'\\'}
% if not skip_golang:
golang ${'\\'} golang ${'\\'}
% endif
gyp ${'\\'} gyp ${'\\'}
lcov ${'\\'} lcov ${'\\'}
libc6 ${'\\'} libc6 ${'\\'}

@ -1,10 +1,7 @@
<%page args="skip_zookeeper=False"/>\
<%include file="ccache_setup.include"/> <%include file="ccache_setup.include"/>
% if not skip_zookeeper:
#====================== #======================
# Zookeeper dependencies # Zookeeper dependencies
# TODO(jtattermusch): is zookeeper still needed? # TODO(jtattermusch): is zookeeper still needed?
RUN apt-get install -y libzookeeper-mt-dev RUN apt-get install -y libzookeeper-mt-dev
% endif
RUN mkdir /var/local/jenkins RUN mkdir /var/local/jenkins

@ -29,20 +29,19 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FROM debian:squeeze FROM debian:wheezy
<%include file="../../apt_get_basic.include" args="skip_golang=True"/> <%include file="../../apt_get_basic.include"/>
<%include file="../../cxx_deps.include"/>
# libgflags-dev is not available on squeezy RUN apt-get update && apt-get install -y ${'\\'}
RUN apt-get update && apt-get -y install libgtest-dev libc++-dev clang && apt-get clean gcc-4.4 ${'\\'}
gcc-4.4-multilib
RUN apt-get update && apt-get -y install python-pip && apt-get clean
RUN pip install argparse
RUN wget ${openssl_fallback.base_uri + openssl_fallback.tarball} RUN wget ${openssl_fallback.base_uri + openssl_fallback.tarball}
ENV POST_GIT_STEP tools/dockerfile/test/cxx_squeeze_x64/post-git-setup.sh ENV POST_GIT_STEP tools/dockerfile/test/cxx_wheezy_x64/post-git-setup.sh
<%include file="../../run_tests_addons.include" args="skip_zookeeper=True"/> <%include file="../../run_tests_addons.include"/>
# Define the default command. # Define the default command.
CMD ["bash"] CMD ["bash"]

@ -34,7 +34,13 @@
<%include file="../../apt_get_basic.include"/> <%include file="../../apt_get_basic.include"/>
#======================== #========================
# Sanity test dependencies # Sanity test dependencies
RUN apt-get update && apt-get install -y python-pip RUN apt-get update && apt-get install -y ${"\\"}
python-pip ${"\\"}
autoconf ${"\\"}
automake ${"\\"}
libtool ${"\\"}
curl ${"\\"}
python-virtualenv
RUN pip install simplejson mako RUN pip install simplejson mako
#=================== #===================

@ -1,6 +1,6 @@
/* /*
* *
* Copyright 2015, Google Inc. * Copyright 2015-2016, Google Inc.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -93,18 +93,98 @@ static void test_compression_algorithm_name(void) {
} }
static void test_compression_algorithm_for_level(void) { static void test_compression_algorithm_for_level(void) {
size_t i;
grpc_compression_level levels[] = {
GRPC_COMPRESS_LEVEL_NONE, GRPC_COMPRESS_LEVEL_LOW,
GRPC_COMPRESS_LEVEL_MED, GRPC_COMPRESS_LEVEL_HIGH};
grpc_compression_algorithm algorithms[] = {
GRPC_COMPRESS_NONE, GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_DEFLATE,
GRPC_COMPRESS_DEFLATE};
gpr_log(GPR_DEBUG, "test_compression_algorithm_for_level"); gpr_log(GPR_DEBUG, "test_compression_algorithm_for_level");
for (i = 0; i < GPR_ARRAY_SIZE(levels); i++) { {
GPR_ASSERT(algorithms[i] == /* accept only identity (aka none) */
grpc_compression_algorithm_for_level(levels[i])); uint32_t accepted_encodings = 0;
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings));
}
{
/* accept only gzip */
uint32_t accepted_encodings = 0;
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP);
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_GZIP ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_GZIP ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_GZIP ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings));
}
{
/* accept only deflate */
uint32_t accepted_encodings = 0;
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE);
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings));
}
{
/* accept gzip and deflate */
uint32_t accepted_encodings = 0;
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP);
GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE);
GPR_ASSERT(GRPC_COMPRESS_NONE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_GZIP ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED,
accepted_encodings));
GPR_ASSERT(GRPC_COMPRESS_DEFLATE ==
grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH,
accepted_encodings));
} }
} }

@ -285,7 +285,7 @@ static void chttp2_init_client_micro_fullstack(grpc_end2end_test_fixture *f,
grpc_channel_args *client_args) { grpc_channel_args *client_args) {
micro_fullstack_fixture_data *ffd = f->fixture_data; micro_fullstack_fixture_data *ffd = f->fixture_data;
grpc_connectivity_state conn_state; grpc_connectivity_state conn_state;
grpc_connected_subchannel *connected; grpc_connected_subchannel *connected_subchannel;
char *ipv4_localaddr; char *ipv4_localaddr;
gpr_asprintf(&ipv4_localaddr, "ipv4:%s", ffd->localaddr); gpr_asprintf(&ipv4_localaddr, "ipv4:%s", ffd->localaddr);
@ -302,9 +302,10 @@ static void chttp2_init_client_micro_fullstack(grpc_end2end_test_fixture *f,
GPR_ASSERT(conn_state == GRPC_CHANNEL_IDLE); GPR_ASSERT(conn_state == GRPC_CHANNEL_IDLE);
GPR_ASSERT(ffd->sniffed_subchannel != NULL); GPR_ASSERT(ffd->sniffed_subchannel != NULL);
connected = connect_subchannel(ffd->sniffed_subchannel); connected_subchannel = connect_subchannel(ffd->sniffed_subchannel);
f->client = grpc_client_uchannel_create(ffd->sniffed_subchannel, client_args); f->client = grpc_client_uchannel_create(ffd->sniffed_subchannel, client_args);
grpc_client_uchannel_set_connected_subchannel(f->client, connected); grpc_client_uchannel_set_connected_subchannel(f->client,
connected_subchannel);
gpr_log(GPR_INFO, "CHANNEL WRAPPING SUBCHANNEL: %p(%p)", f->client, gpr_log(GPR_INFO, "CHANNEL WRAPPING SUBCHANNEL: %p(%p)", f->client,
ffd->sniffed_subchannel); ffd->sniffed_subchannel);

@ -30,8 +30,6 @@
set -ex set -ex
apt-get install -y autoconf automake libtool curl python-virtualenv
readonly NANOPB_TMP_OUTPUT="$(mktemp -d)" readonly NANOPB_TMP_OUTPUT="$(mktemp -d)"
# install protoc version 3 # install protoc version 3

@ -27,7 +27,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FROM debian:squeeze FROM debian:wheezy
# Install Git and basic packages. # Install Git and basic packages.
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
@ -40,6 +40,7 @@ RUN apt-get update && apt-get install -y \
gcc \ gcc \
gcc-multilib \ gcc-multilib \
git \ git \
golang \
gyp \ gyp \
lcov \ lcov \
libc6 \ libc6 \
@ -62,16 +63,18 @@ RUN apt-get update && apt-get install -y \
# Build profiling # Build profiling
RUN apt-get update && apt-get install -y time && apt-get clean RUN apt-get update && apt-get install -y time && apt-get clean
#=================
# C++ dependencies
RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
# libgflags-dev is not available on squeezy
RUN apt-get update && apt-get -y install libgtest-dev libc++-dev clang && apt-get clean
RUN apt-get update && apt-get -y install python-pip && apt-get clean RUN apt-get update && apt-get install -y \
RUN pip install argparse gcc-4.4 \
gcc-4.4-multilib
RUN wget http://openssl.org/source/openssl-1.0.2f.tar.gz RUN wget https://openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz
ENV POST_GIT_STEP tools/dockerfile/test/cxx_squeeze_x64/post-git-setup.sh ENV POST_GIT_STEP tools/dockerfile/test/cxx_wheezy_x64/post-git-setup.sh
# Prepare ccache # Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
@ -81,6 +84,10 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++
RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang
RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
#======================
# Zookeeper dependencies
# TODO(jtattermusch): is zookeeper still needed?
RUN apt-get install -y libzookeeper-mt-dev
RUN mkdir /var/local/jenkins RUN mkdir /var/local/jenkins

@ -65,7 +65,13 @@ RUN apt-get update && apt-get install -y time && apt-get clean
#======================== #========================
# Sanity test dependencies # Sanity test dependencies
RUN apt-get update && apt-get install -y python-pip RUN apt-get update && apt-get install -y \
python-pip \
autoconf \
automake \
libtool \
curl \
python-virtualenv
RUN pip install simplejson mako RUN pip install simplejson mako
#=================== #===================

@ -38,8 +38,8 @@ CC=${CC:-cc}
# allow openssl to be pre-downloaded # allow openssl to be pre-downloaded
if [ ! -e third_party/openssl-1.0.2f.tar.gz ] if [ ! -e third_party/openssl-1.0.2f.tar.gz ]
then then
echo "Downloading http://openssl.org/source/openssl-1.0.2f.tar.gz to third_party/openssl-1.0.2f.tar.gz" echo "Downloading https://openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz to third_party/openssl-1.0.2f.tar.gz"
wget http://openssl.org/source/openssl-1.0.2f.tar.gz -O third_party/openssl-1.0.2f.tar.gz wget https://openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz -O third_party/openssl-1.0.2f.tar.gz
fi fi
# clean openssl directory # clean openssl directory

@ -80,7 +80,7 @@ class Config(object):
self.timeout_multiplier = timeout_multiplier self.timeout_multiplier = timeout_multiplier
def job_spec(self, cmdline, hash_targets, timeout_seconds=5*60, def job_spec(self, cmdline, hash_targets, timeout_seconds=5*60,
shortname=None, environ={}, cpu_cost=1.0): shortname=None, environ={}, cpu_cost=1.0, flaky=False):
"""Construct a jobset.JobSpec for a test under this config """Construct a jobset.JobSpec for a test under this config
Args: Args:
@ -102,7 +102,7 @@ class Config(object):
timeout_seconds=(self.timeout_multiplier * timeout_seconds if timeout_seconds else None), timeout_seconds=(self.timeout_multiplier * timeout_seconds if timeout_seconds else None),
hash_targets=hash_targets hash_targets=hash_targets
if self.allow_hashing else None, if self.allow_hashing else None,
flake_retries=5 if args.allow_flakes else 0, flake_retries=5 if flaky or args.allow_flakes else 0,
timeout_retries=3 if args.allow_flakes else 0) timeout_retries=3 if args.allow_flakes else 0)
@ -189,6 +189,7 @@ class CLanguage(object):
out.append(self.config.job_spec(cmdline, [binary], out.append(self.config.job_spec(cmdline, [binary],
shortname=' '.join(cmdline), shortname=' '.join(cmdline),
cpu_cost=target['cpu_cost'], cpu_cost=target['cpu_cost'],
flaky=target.get('flaky', True),
environ={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': environ={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH':
_ROOT + '/src/core/tsi/test_creds/ca.pem'})) _ROOT + '/src/core/tsi/test_creds/ca.pem'}))
elif self.args.regex == '.*' or self.platform == 'windows': elif self.args.regex == '.*' or self.platform == 'windows':
@ -231,6 +232,9 @@ class CLanguage(object):
def _clang_make_options(self): def _clang_make_options(self):
return ['CC=clang', 'CXX=clang++', 'LD=clang', 'LDXX=clang++'] return ['CC=clang', 'CXX=clang++', 'LD=clang', 'LDXX=clang++']
def _gcc44_make_options(self):
return ['CC=gcc-4.4', 'CXX=g++-4.4', 'LD=gcc-4.4', 'LDXX=g++-4.4']
def _compiler_options(self, use_docker, compiler): def _compiler_options(self, use_docker, compiler):
"""Returns docker distro and make options to use for given compiler.""" """Returns docker distro and make options to use for given compiler."""
if _is_use_docker_child(): if _is_use_docker_child():
@ -241,7 +245,7 @@ class CLanguage(object):
if compiler == 'gcc4.9' or compiler == 'default': if compiler == 'gcc4.9' or compiler == 'default':
return ('jessie', []) return ('jessie', [])
elif compiler == 'gcc4.4': elif compiler == 'gcc4.4':
return ('squeeze', []) return ('wheezy', self._gcc44_make_options())
elif compiler == 'gcc5.3': elif compiler == 'gcc5.3':
return ('ubuntu1604', []) return ('ubuntu1604', [])
elif compiler == 'clang3.4': elif compiler == 'clang3.4':
@ -879,7 +883,7 @@ if args.use_docker:
sys.exit(1) sys.exit(1)
else: else:
dockerfile_dir = next(iter(dockerfile_dirs)) dockerfile_dir = next(iter(dockerfile_dirs))
child_argv = [ arg for arg in sys.argv if not arg == '--use_docker' ] child_argv = [ arg for arg in sys.argv if not arg == '--use_docker' ]
run_tests_cmd = 'python tools/run_tests/run_tests.py %s' % ' '.join(child_argv[1:]) run_tests_cmd = 'python tools/run_tests/run_tests.py %s' % ' '.join(child_argv[1:])

@ -1293,7 +1293,7 @@
], ],
"cpu_cost": 0.1, "cpu_cost": 0.1,
"exclude_configs": [], "exclude_configs": [],
"flaky": false, "flaky": true,
"gtest": false, "gtest": false,
"language": "c", "language": "c",
"name": "lb_policies_test", "name": "lb_policies_test",
@ -2317,7 +2317,9 @@
"posix" "posix"
], ],
"cpu_cost": 0.5, "cpu_cost": 0.5,
"exclude_configs": [], "exclude_configs": [
"tsan"
],
"flaky": false, "flaky": false,
"gtest": false, "gtest": false,
"language": "c++", "language": "c++",
@ -2336,7 +2338,9 @@
"posix" "posix"
], ],
"cpu_cost": 10, "cpu_cost": 10,
"exclude_configs": [], "exclude_configs": [
"tsan"
],
"flaky": false, "flaky": false,
"gtest": false, "gtest": false,
"language": "c++", "language": "c++",

Loading…
Cancel
Save