Merge pull request #4928 from jtattermusch/fix_32bit_linux_tests

Fix 32bit linux tests
pull/4924/head^2
Jan Tattermusch 9 years ago
commit f846aaf41b
  1. 6
      test/core/support/alloc_test.c
  2. 6
      test/core/transport/chttp2/hpack_table_test.c
  3. 10
      tools/jenkins/run_portability.sh

@ -39,7 +39,9 @@ static void *fake_malloc(size_t size) { return (void *)size; }
static void *fake_realloc(void *addr, size_t size) { return (void *)size; }
static void fake_free(void *addr) { *((intptr_t *)addr) = 0xdeadd00d; }
static void fake_free(void *addr) {
*((intptr_t *)addr) = (intptr_t)0xdeadd00d;
}
static void test_custom_allocs() {
const gpr_allocation_functions default_fns = gpr_get_allocation_functions();
@ -52,7 +54,7 @@ static void test_custom_allocs() {
GPR_ASSERT((void *)(size_t)0xcafed00d == gpr_realloc(0, 0xcafed00d));
gpr_free(&addr_to_free);
GPR_ASSERT(addr_to_free == 0xdeadd00d);
GPR_ASSERT(addr_to_free == (intptr_t)0xdeadd00d);
/* Restore and check we don't get funky values and that we don't leak */
gpr_set_allocation_functions(default_fns);

@ -1,6 +1,6 @@
/*
*
* Copyright 2015, Google Inc.
* Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -236,7 +236,7 @@ static void test_find(void) {
/* overflow the string buffer, check find still works */
for (i = 0; i < 10000; i++) {
gpr_ltoa(i, buffer);
int64_ttoa(i, buffer);
elem = grpc_mdelem_from_strings("test", buffer);
GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem));
GRPC_MDELEM_UNREF(elem);
@ -256,7 +256,7 @@ static void test_find(void) {
for (i = 0; i < tbl.num_ents; i++) {
uint32_t expect = 9999 - i;
gpr_ltoa(expect, buffer);
int64_ttoa(expect, buffer);
r = find_simple(&tbl, "test", buffer);
GPR_ASSERT(r.index == i + 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY);

@ -48,12 +48,10 @@ curr_arch=${parts[1]}
curr_compiler=${parts[2]}
config='dbg'
maybe_build_only='--build_only'
if [ "$curr_platform" == "windows" ]
if [ "$curr_platform" == "linux" ]
then
python tools/run_tests/run_tests.py -t -l $language -c $config --arch ${curr_arch} --compiler ${curr_compiler} ${maybe_build_only} -x report.xml $@
else
echo "Unsupported scenario."
exit 1
USE_DOCKER_MAYBE="--use_docker"
fi
python tools/run_tests/run_tests.py $USE_DOCKER_MAYBE -t -l $language -c $config --arch ${curr_arch} --compiler ${curr_compiler} -x report.xml -j 3 $@
Loading…
Cancel
Save