rust icon indicating copy to clipboard operation
rust copied to clipboard

Exercise tests killed with SIGKILL, pass in playground

Open Redundancy opened this issue 3 years ago • 4 comments

I have a solution to the Forth exercise (https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=489be0f116db94aa85f2ff56dcd05b11) that I can't submit.

`error: test failed, to rerun pass '--test alloc-attack'

Caused by: process didn't exit successfully: /mnt/exercism-iteration/target/debug/deps/alloc_attack-15d39a8ca4ebef4b -Z unstable-options --include-ignored --format json (signal: 9, SIGKILL: kill)`

Tests pass locally and in the rust playground.

Redundancy avatar May 18 '22 03:05 Redundancy

Does the alloc-attack test pass on your local machine?

It's defined in a separate file because it requires a custom allocator to ensure that you're not eagerly expanding evaluations. I haven't looked super closely into your code, but it does kind of look like you are doing eager expansion. In that case, it is expected and desired that your code fails the test suite.

coriolinus avatar May 18 '22 07:05 coriolinus

I've typically worked by copying the code from the editor, then copying the tests from the editor tests tab. I don't think that the alloc-attack test shows up in either.

I also can't see eager evaluation called out in the instructions for this exercise, and the test result is presented in a way that makes it look like an internal platform failure.

I'm not sure that the user experience of this is ideal given what a user is presented with on the website.

Redundancy avatar May 18 '22 12:05 Redundancy

Hmm, it's present in the config file for the exercise:

https://github.com/exercism/rust/blob/54095bf1f536eaf8e989d066f7826dceea87566e/exercises/practice/forth/.meta/config.json#L36-L39

@ErikSchierboom I can confirm that despite both test files appearing in the config, the alloc-attack.rs content does not appear on the website. Is that a website bug?

coriolinus avatar May 18 '22 19:05 coriolinus

@coriolinus It is indeed. The good news: there is a PR to fix this.

@iHiD might be something to look at soon-ish?

ErikSchierboom avatar May 19 '22 06:05 ErikSchierboom

I just checked and alloc-attack.rs now shows up on the website :+1:

senekor avatar Dec 14 '23 22:12 senekor