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

Side by Side Diff: test/NaCl/Bitcode/invalid.test

Issue 1310883003: Install notion of diagnostic handler into PNaCl bitcode readers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Fix issues in patch set 2. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/IRReader/IRReader.cpp ('k') | test/NaCl/Bitcode/pnacl-bcdis/invalid.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; Check when separator(,) not followed by a value. 1 ; Check when separator(,) not followed by a value.
2 2
3 RUN: not pnacl-bcfuzz -bitcode-as-text %p/Inputs/bad-separator.tbc \ 3 RUN: not pnacl-bcfuzz -bitcode-as-text %p/Inputs/bad-separator.tbc \
4 RUN: -output - 2>&1 | FileCheck --check-prefix=BAD-SEP %s 4 RUN: -output - 2>&1 | FileCheck --check-prefix=BAD-SEP %s
5 5
6 BAD-SEP: Value expected after separator, but not found 6 BAD-SEP: Value expected after separator, but not found
7 7
8 ; Check that comparison operator of branch is i1. 8 ; Check that comparison operator of branch is i1.
9 9
10 RUN: pnacl-bcfuzz -bitcode-as-text %p/Inputs/bad-branch-compare.tbc \ 10 RUN: pnacl-bcfuzz -bitcode-as-text %p/Inputs/bad-branch-compare.tbc \
11 RUN: -output - | not pnacl-bcdis | FileCheck --check-prefix=BAD-BC-BR-CMP %s 11 RUN: -output - | not pnacl-bcdis | FileCheck --check-prefix=BAD-BC-BR-CMP %s
12 12
13 BAD-BC-BR-CMP: br i32 %p0, label %b1, label %b2; 13 BAD-BC-BR-CMP: br i32 %p0, label %b1, label %b2;
14 BAD-BC-BR-CMP-NEXT: Branch condition not i1 14 BAD-BC-BR-CMP-NEXT: Branch condition not i1
15 15
16 RUN: pnacl-bcfuzz -bitcode-as-text %p/Inputs/bad-branch-compare.tbc \ 16 RUN: pnacl-bcfuzz -bitcode-as-text %p/Inputs/bad-branch-compare.tbc \
17 RUN: -output - | not pnacl-thaw -verbose-parse-errors -o /dev/null 2>&1 \ 17 RUN: -output - | not pnacl-thaw -o /dev/null 2>&1 \
18 RUN: | FileCheck --check-prefix=BAD-BR-CMP %s 18 RUN: | FileCheck --check-prefix=BAD-BR-CMP %s
19 19
20 BAD-BR-CMP: Type of branch condition not i1. Found: i32 20 BAD-BR-CMP: Type of branch condition not i1. Found: i32
21 21
22 ; Tests that we recognize wrong abbreviation index bitsize in a blockinfo block, 22 ; Tests that we recognize wrong abbreviation index bitsize in a blockinfo block,
23 ; and properly exit with an appropriate error message. 23 ; and properly exit with an appropriate error message.
24 ; Tests issue: https://code.google.com/p/nativeclient/issues/detail?id=4215 24 ; Tests issue: https://code.google.com/p/nativeclient/issues/detail?id=4215
25 RUN: not pnacl-bcfuzz -bitcode-as-text %p/Inputs/bad-blockinfo-numbits.tbc \ 25 RUN: not pnacl-bcfuzz -bitcode-as-text %p/Inputs/bad-blockinfo-numbits.tbc \
26 RUN: -output - 2>&1 | FileCheck --check-prefix=BAD-BLKINFO_BITS %s 26 RUN: -output - 2>&1 | FileCheck --check-prefix=BAD-BLKINFO_BITS %s
27 27
28 BAD-BLKINFO_BITS: Numbits entry for abbreviations in blockinfo block not 2. 28 BAD-BLKINFO_BITS: Numbits entry for abbreviations in blockinfo block not 2.
29 BAD-BLKINFO_BITS: Failed to write bitcode 29 BAD-BLKINFO_BITS: Failed to write bitcode
30 30
31 ; Check that we catch error where line doesn't begin with a record code. 31 ; Check that we catch error where line doesn't begin with a record code.
32 32
33 RUN: not pnacl-bcfuzz -bitcode-as-text %p/Inputs/bad-code.tbc \ 33 RUN: not pnacl-bcfuzz -bitcode-as-text %p/Inputs/bad-code.tbc \
34 RUN: -output - 2>&1 | FileCheck --check-prefix=BAD-CODE %s 34 RUN: -output - 2>&1 | FileCheck --check-prefix=BAD-CODE %s
35 35
36 BAD-CODE: Bitcode record doesn't begin with a record code 36 BAD-CODE: Bitcode record doesn't begin with a record code
OLDNEW
« no previous file with comments | « lib/IRReader/IRReader.cpp ('k') | test/NaCl/Bitcode/pnacl-bcdis/invalid.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698