Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

[vectors] stdlib tests fail on CI #124

Closed
wrwg opened this issue May 12, 2022 · 1 comment
Closed

[vectors] stdlib tests fail on CI #124

wrwg opened this issue May 12, 2022 · 1 comment
Assignees

Comments

@wrwg
Copy link
Member

wrwg commented May 12, 2022

Possibly because Move unit test when embedded in Rust tests don't lead to a test failure, we have a few vector test failures which sneaked into the main branch. From running move-stdlib tests:

[ FAIL    ] 0x1::VectorTests::borrow_out_of_range
[ FAIL    ] 0x1::VectorTests::destroy_non_empty
[ FAIL    ] 0x1::VectorTests::pop_out_of_range
[ FAIL    ] 0x1::VectorTests::swap_empty
[ FAIL    ] 0x1::VectorTests::swap_out_of_range

Those failures do not need lead to Rust test failure, and therefore passed by CI.

The failures have this funny shape:

┌── borrow_out_of_range ──────
│ error[E11001]: test failure
│    ┌─ /home/wrwg/gh/move/language/move-stdlib/./tests/VectorTests.move:97:9
│    │
│ 94 │     fun borrow_out_of_range() {
│    │         ------------------- In this function in 0x1::VectorTests
│    ·
│ 97 │         V::borrow(&v, 1);
│    │         ^^^^^^^^^^^^^^^^ Test did not abort with expected code. Expected test to abort with 1 but instead it aborted with 1 here
│ 
│ 
└──────────────────

So 1 was expected as an abort code but 1 was found...

Perhaps the failures are related to the new vector operations introduced in #37.

I'm rolling up PR #125 to fix the issue that Move unit tests don't produce a test failure, but will have to disable some tests temporarily.

wrwg added a commit to wrwg/move-lang that referenced this issue May 12, 2022
Our logic to embed Move unit tests in a Rust test was systematically broken. When a Move unit test fails, the Rust test still succeeds. This lead to failing Move tests slipping through CI.

This PR fixes the unit testing logic. As a result, some unit tests which where already failing at main had to be temporarily disabled. See also issue move-language#124.
@wrwg
Copy link
Member Author

wrwg commented May 12, 2022

@tnowacki suspecting the vector opcodes for the failing tests, but the cause may also be older.

wrwg added a commit to wrwg/move-lang that referenced this issue May 12, 2022
Our logic to embed Move unit tests in a Rust test was systematically broken. When a Move unit test fails, the Rust test still succeeds. This lead to failing Move tests slipping through CI.

This PR fixes the unit testing logic. As a result, some unit tests which where already failing at main had to be temporarily disabled. See also issue move-language#124.
@wrwg wrwg changed the title [vectors] [vectors] stdlib tests fail on CI May 12, 2022
wrwg added a commit that referenced this issue May 12, 2022
…125)

Our logic to embed Move unit tests in a Rust test was systematically broken. When a Move unit test fails, the Rust test still succeeds. This lead to failing Move tests slipping through CI.

This PR fixes the unit testing logic. As a result, some unit tests which where already failing at main had to be temporarily disabled. See also issue #124.
@wrwg wrwg closed this as completed May 12, 2022
villesundell pushed a commit to villesundell/move that referenced this issue Jul 7, 2022
…ove-language#125)

Our logic to embed Move unit tests in a Rust test was systematically broken. When a Move unit test fails, the Rust test still succeeds. This lead to failing Move tests slipping through CI.

This PR fixes the unit testing logic. As a result, some unit tests which where already failing at main had to be temporarily disabled. See also issue move-language#124.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants