Skip to content
Snippets Groups Projects
Commit f846aaf4 authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

Merge pull request #4928 from jtattermusch/fix_32bit_linux_tests

Fix 32bit linux tests
parents bdaea022 9a4010da
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,9 @@ static void *fake_malloc(size_t size) { return (void *)size; } ...@@ -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_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() { static void test_custom_allocs() {
const gpr_allocation_functions default_fns = gpr_get_allocation_functions(); const gpr_allocation_functions default_fns = gpr_get_allocation_functions();
...@@ -52,7 +54,7 @@ static void test_custom_allocs() { ...@@ -52,7 +54,7 @@ static void test_custom_allocs() {
GPR_ASSERT((void *)(size_t)0xcafed00d == gpr_realloc(0, 0xcafed00d)); GPR_ASSERT((void *)(size_t)0xcafed00d == gpr_realloc(0, 0xcafed00d));
gpr_free(&addr_to_free); 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 */ /* Restore and check we don't get funky values and that we don't leak */
gpr_set_allocation_functions(default_fns); gpr_set_allocation_functions(default_fns);
......
/* /*
* *
* 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
...@@ -236,7 +236,7 @@ static void test_find(void) { ...@@ -236,7 +236,7 @@ static void test_find(void) {
/* overflow the string buffer, check find still works */ /* overflow the string buffer, check find still works */
for (i = 0; i < 10000; i++) { for (i = 0; i < 10000; i++) {
gpr_ltoa(i, buffer); int64_ttoa(i, buffer);
elem = grpc_mdelem_from_strings("test", buffer); elem = grpc_mdelem_from_strings("test", buffer);
GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem));
GRPC_MDELEM_UNREF(elem); GRPC_MDELEM_UNREF(elem);
...@@ -256,7 +256,7 @@ static void test_find(void) { ...@@ -256,7 +256,7 @@ static void test_find(void) {
for (i = 0; i < tbl.num_ents; i++) { for (i = 0; i < tbl.num_ents; i++) {
uint32_t expect = 9999 - i; uint32_t expect = 9999 - i;
gpr_ltoa(expect, buffer); int64_ttoa(expect, buffer);
r = find_simple(&tbl, "test", buffer); r = find_simple(&tbl, "test", buffer);
GPR_ASSERT(r.index == i + 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY); GPR_ASSERT(r.index == i + 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY);
......
...@@ -48,12 +48,10 @@ curr_arch=${parts[1]} ...@@ -48,12 +48,10 @@ curr_arch=${parts[1]}
curr_compiler=${parts[2]} curr_compiler=${parts[2]}
config='dbg' config='dbg'
maybe_build_only='--build_only'
if [ "$curr_platform" == "windows" ] if [ "$curr_platform" == "linux" ]
then 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 $@ USE_DOCKER_MAYBE="--use_docker"
else
echo "Unsupported scenario."
exit 1
fi 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 $@
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment