Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Issue 435353002: Subzero: Fix and clean up some cross tests. (Closed)

Created:
6 years, 4 months ago by Jim Stichnoth
Modified:
6 years, 4 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Subzero: Fix and clean up some cross tests. 1. It turns out that the crosstest scripts mix different versions of clang - build_pnacl_ir.py uses pnacl-clang from the NaCl SDK for the tests, while crosstest.py uses clang/clang++ from LLVM_BIN_PATH for the driver. The SDK has been updated to use a different version of the standard library, and now there is a mismatch as to whether int8_t is typedef'd to 'char' or 'signed char', leading to name mangling mismatches. (char, signed char, and unsigned char are distinct types.) We deal with this by using myint8_t which is explicitly defined as signed char. 2. Some ugly function pointer casting in test_arith_main.cpp is fixed/removed. 3. std::endl is replaced with "\n". 4. License text is added to tests that were touched by the above items. BUG= none R=wala@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=7da431b

Patch Set 1 #

Total comments: 10

Patch Set 2 : Fix newlines and filename #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -56 lines) Patch
M crosstest/test_arith.h View 1 chunk +1 line, -1 line 0 comments Download
M crosstest/test_arith.cpp View 2 chunks +14 lines, -1 line 0 comments Download
M crosstest/test_arith.def View 1 chunk +13 lines, -0 lines 0 comments Download
M crosstest/test_arith_main.cpp View 12 chunks +51 lines, -29 lines 0 comments Download
M crosstest/test_cast.h View 1 chunk +21 lines, -0 lines 0 comments Download
M crosstest/test_cast.cpp View 3 chunks +15 lines, -2 lines 0 comments Download
M crosstest/test_cast_main.cpp View 4 chunks +17 lines, -4 lines 0 comments Download
M crosstest/test_fcmp.def View 1 chunk +13 lines, -0 lines 0 comments Download
M crosstest/test_global.h View 1 chunk +21 lines, -0 lines 0 comments Download
M crosstest/test_global.cpp View 1 1 chunk +13 lines, -0 lines 0 comments Download
M crosstest/test_global_main.cpp View 3 chunks +15 lines, -2 lines 0 comments Download
M crosstest/test_icmp.h View 1 chunk +1 line, -1 line 0 comments Download
M crosstest/test_icmp.cpp View 1 chunk +1 line, -1 line 0 comments Download
M crosstest/test_icmp.def View 1 chunk +13 lines, -0 lines 0 comments Download
M crosstest/test_icmp_main.cpp View 6 chunks +6 lines, -6 lines 0 comments Download
M crosstest/test_vector_ops.def View 1 chunk +14 lines, -0 lines 0 comments Download
M crosstest/test_vector_ops_main.cpp View 1 4 chunks +8 lines, -8 lines 0 comments Download
M crosstest/vectors.h View 1 chunk +7 lines, -0 lines 0 comments Download
M crosstest/vectors.def View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Jim Stichnoth
6 years, 4 months ago (2014-08-04 23:59:43 UTC) #1
wala
lgtm https://codereview.chromium.org/435353002/diff/1/crosstest/test_global.cpp File crosstest/test_global.cpp (right): https://codereview.chromium.org/435353002/diff/1/crosstest/test_global.cpp#newcode1 crosstest/test_global.cpp:1: //===- subzero/crosstest/test_arith.cpp - Global variable access tests ----===// ...
6 years, 4 months ago (2014-08-05 05:16:34 UTC) #2
Jim Stichnoth
Committed patchset #2 manually as r7da431b (presubmit successful).
6 years, 4 months ago (2014-08-05 18:22:41 UTC) #3
Jim Stichnoth
6 years, 4 months ago (2014-08-06 16:14:26 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/435353002/diff/1/crosstest/test_global.cpp
File crosstest/test_global.cpp (right):

https://codereview.chromium.org/435353002/diff/1/crosstest/test_global.cpp#ne...
crosstest/test_global.cpp:1: //===- subzero/crosstest/test_arith.cpp - Global
variable access tests ----===//
On 2014/08/05 05:16:34, wala wrote:
> test_global.cpp

Done.

https://codereview.chromium.org/435353002/diff/1/crosstest/test_vector_ops_ma...
File crosstest/test_vector_ops_main.cpp (right):

https://codereview.chromium.org/435353002/diff/1/crosstest/test_vector_ops_ma...
crosstest/test_vector_ops_main.cpp:56: std::cerr << "memory allocation error" <<
"\n";
On 2014/08/05 05:16:34, wala wrote:
> Nit: Could fold the last two string arguments to "memory allocation error\n".
> Two adjacent string literals as stream arguments look somewhat unnecessary.
LLVM
> code seems to de facto prefer "...\n" or "..." << '\n'.

Thanks.  This was the result of blind search/replace, and I didn't notice the
redundancy.

https://codereview.chromium.org/435353002/diff/1/crosstest/test_vector_ops_ma...
crosstest/test_vector_ops_main.cpp:92: << ", Pos=" << I << ")" << "\n";
On 2014/08/05 05:16:34, wala wrote:
> See above.

Done.

https://codereview.chromium.org/435353002/diff/1/crosstest/test_vector_ops_ma...
crosstest/test_vector_ops_main.cpp:123: std::cout << vectAsString<T>(Vect) << ",
Pos=" << I << ")" << "\n";
On 2014/08/05 05:16:34, wala wrote:
> See above.

Done.

https://codereview.chromium.org/435353002/diff/1/crosstest/test_vector_ops_ma...
crosstest/test_vector_ops_main.cpp:169: std::cerr << "\"unreachable\"
instruction encountered" << "\n";
On 2014/08/05 05:16:34, wala wrote:
> See above.

Done.

Powered by Google App Engine
This is Rietveld 408576698