Skip to content

Commit a9a7bf6

Browse files
bdalrhmtedinski
authored andcommitted
Differentiate between check, codegen, and verification errors. (rust-lang#353)
* Differentiate between check, codegen, and verification errors. * Fix typo. * Rename tests. * Address concerns. * Remove unnecessary code and fix typos.
1 parent 93ae13d commit a9a7bf6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+229
-22
lines changed

src/test/cbmc/Assert/UninitValid/fixme_main_fail.rs renamed to src/test/cbmc/Assert/UninitValid/fixme_main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
// rmc-verify-fail
4+
35
use std::mem::{self, MaybeUninit};
46

57
fn main() {

src/test/cbmc/Assert/ZeroValid/fixme_main_fail.rs renamed to src/test/cbmc/Assert/ZeroValid/fixme_main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
// rmc-verify-fail
4+
35
// The function zeroed() calls assert_zero_valid to mark that it is only defined to assign an
46
// all-zero bit pattern to a type T if this is a valid value. So the following is undefined.
57

src/test/cbmc/BinOp_Offset/main_fail.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
// rmc-verify-fail
4+
35
include!("../../rmc-prelude.rs");
46

57
pub fn test_offset_in_double_array() {

src/test/cbmc/BitManipulation/Stable/fixme_main_fail.rs renamed to src/test/cbmc/BitManipulation/Stable/fixme_main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
// rmc-verify-fail
4+
35
fn main() {
46
// Intrinsics implemented as integer primitives
57
// https://doc.rust-lang.org/core/intrinsics/fn.cttz.html

src/test/cbmc/BitManipulation/Unstable/fixme_main_fail.rs renamed to src/test/cbmc/BitManipulation/Unstable/fixme_main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
// rmc-verify-fail
4+
35
#![feature(core_intrinsics)]
46
use std::intrinsics::{ctlz, cttz, cttz_nonzero};
57

src/test/cbmc/Count/Unstable/Ctlz/bounds_fail.rs renamed to src/test/cbmc/Count/Unstable/Ctlz/bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
3-
3+
// rmc-verify-fail
44
// cbmc-flags: --bounds-check
55

66
#![feature(core_intrinsics)]

src/test/cbmc/Count/Unstable/Cttz/bounds_fail.rs renamed to src/test/cbmc/Count/Unstable/Cttz/bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
3-
3+
// rmc-verify-fail
44
// cbmc-flags: --bounds-check
55

66
#![feature(core_intrinsics)]

src/test/cbmc/DynTrait/boxed_closure_fail_fixme.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
// rmc-verify-fail
34

45
// Check that we can codegen a boxed dyn closure and fail an inner assertion
56

67
// This current verifies "successfully" because the closure is not actually
7-
// called in the resulting CotoC code.
8+
// called in the resulting GotoC code.
89
// https://github.com/model-checking/rmc/issues/240
910

1011
include!("../../rmc-prelude.rs");

src/test/cbmc/DynTrait/boxed_trait_fail.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
// rmc-verify-fail
34

45
// Dynamic traits should work when used through a box
56
// _fail test; all assertions inverted.

src/test/cbmc/DynTrait/different_crates_fail.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
3+
// rmc-verify-fail
34

45
// This test uses a trait defined in a different crate (the standard library)
56
// and a test defined in the local crate. The goal is to test vtable resolution

0 commit comments

Comments
 (0)