Closed orhun closed 1 year ago
So the snapshot is correct, that should be the output, is there something that would prevent files being written to disk inside target/tmp
and/or restrict network access?
I am not sure, we're building packages in chroot but that shouldn't be a problem. (cc @freswa)
We're building in a systemd-nspawn container. There are limits to syscalls, but everything else should work as expected.
Ok, well, I'll get around to fixing this unless someone more familiar with the packaging makes a PR, but it will be low priority for me as the test is working properly for this projects CI, which is what I care about most.
It seems like this is fixed with the last release. https://gitlab.archlinux.org/archlinux/packaging/packages/cargo-deny/-/commit/02d98ce232dd9d0d7412d0015acc1d8c0a14d587
I'm still having two test failures on Alpine with 0.15.1, but only on these architectures:
The tests pass on the following:
I'm suspecting this is related to 32 vs 64 bits.
https://gitlab.alpinelinux.org/kpcyrd/aports/-/pipelines/250843
The two test failures are always:
running 4 tests
test clones_with_gix ... ok
test clones_with_git ... ok
test crates_io_source_replacement ... FAILED
test detects_yanked ... FAILED
failures:
---- crates_io_source_replacement stdout ----
thread 'crates_io_source_replacement' panicked at tests/advisories.rs:597:26:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- detects_yanked stdout ----
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Snapshot file: tests/snapshots/advisories__detects_yanked.snap
Snapshot: detects_yanked
Source: tests/advisories.rs:237
────────────────────────────────────────────────────────────────────────────────
Expression: diags
────────────────────────────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬───────────────────────────────────────────────────────────────────
0 │-[
1 │- {
2 │- "fields": {
3 │- "code": "yanked",
4 │- "graphs": [
5 │- {
6 │- "Krate": {
7 │- "name": "crate-two",
8 │- "version": "0.1.0"
9 │- },
10 │- "parents": [
11 │- {
12 │- "Krate": {
13 │- "name": "yank-check",
14 │- "version": "0.1.0"
15 │- }
16 │- }
17 │- ]
18 │- }
19 │- ],
20 │- "labels": [
21 │- {
22 │- "column": 1,
23 │- "line": 2,
24 │- "message": "yanked version",
25 │- "span": "crate-two 0.1.0 registry+https://github.com/EmbarkStudios/cargo-test-index"
26 │- }
27 │- ],
28 │- "message": "detected yanked crate (try `cargo update -p crate-two`)",
29 │- "severity": "error"
30 │- },
31 │- "type": "diagnostic"
32 │- },
33 │- {
34 │- "fields": {
35 │- "code": "yanked",
36 │- "graphs": [
37 │- {
38 │- "Krate": {
39 │- "name": "spdx",
40 │- "version": "0.3.1"
41 │- },
42 │- "parents": [
43 │- {
44 │- "Krate": {
45 │- "name": "yank-check",
46 │- "version": "0.1.0"
47 │- }
48 │- }
49 │- ]
50 │- }
51 │- ],
52 │- "labels": [
53 │- {
54 │- "column": 1,
55 │- "line": 7,
56 │- "message": "yanked version",
57 │- "span": "spdx 0.3.1 registry+https://github.com/rust-lang/crates.io-index"
58 │- }
59 │- ],
60 │- "message": "detected yanked crate (try `cargo update -p spdx`)",
61 │- "severity": "error"
62 │- },
63 │- "type": "diagnostic"
64 │- }
65 │-]
0 │+[]
────────────┴───────────────────────────────────────────────────────────────────
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
thread 'detects_yanked' panicked at /home/buildozer/.cargo/registry/src/index.crates.io-1cd66030c949c28d/insta-1.39.0/src/runtime.rs:562:9:
snapshot assertion for 'detects_yanked' failed in line 237
failures:
crates_io_source_replacement
detects_yanked
test result: FAILED. 2 passed; 2 failed; 0 ignored; 0 measured; 9 filtered out; finished in 1.65s
error: test failed, to rerun pass `--test advisories`
Edit: after adding those two to --skip, these tests fail next:
I'm suspecting it has to do with the crates index that is used on those targets.
Describe the bug
Hey, Arch packager of
cargo-deny
here 👋🏼I came across this test failure for the latest release (
0.14.0
):To Reproduce Steps to reproduce the behavior:
PKGBUILD
from Arch Linux repos.--skip "detects_yanked"
fromcargo test
command.Expected behavior Successful build.
Screenshots -
Device:
0.4.0
Additional context
See the packaging changes here: https://gitlab.archlinux.org/archlinux/packaging/packages/cargo-deny/-/commit/22991cfa2de301aa2289066b4281c8d2410d9d38