Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Failed to run tests in clean chroot #2

Open
orhun opened this issue Apr 11, 2024 · 2 comments
Open

[BUG] Failed to run tests in clean chroot #2

orhun opened this issue Apr 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@orhun
Copy link
Contributor

orhun commented Apr 11, 2024

Describe the bug

In a clean Arch Linux chroot, I'm getting the following test failures:

failures:

---- terminal::print::tests::test_terminal_monochrome_false stdout ----
thread 'terminal::print::tests::test_terminal_monochrome_false' panicked at src/terminal/mod.rs:328:13:
assertion failed: result.contains("\x1b[33m443")

---- scanner::tests::test_scanner_1000_80_443 stdout ----
thread 'scanner::tests::test_scanner_1000_80_443' panicked at /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/warp-0.3.6/src/server.rs:217:27:
error binding to 127.0.0.1:80: error creating server listener: Permission denied (os error 13)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'scanner::tests::test_scanner_1000_80_443' panicked at /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/warp-0.3.6/src/server.rs:217:27:
error binding to 127.0.0.1:443: error creating server listener: Permission denied (os error 13)
thread 'scanner::tests::test_scanner_1000_80_443' panicked at src/scanner/mod.rs:360:9:
assertion `left == right` failed
  left: 999
 right: 998

---- scanner::tests::test_scanner_1000_empty stdout ----
thread 'scanner::tests::test_scanner_1000_empty' panicked at src/scanner/mod.rs:309:9:
assertion `left == right` failed
  left: 999
 right: 1000

---- scanner::tests::test_scanner_all_80 stdout ----
thread 'scanner::tests::test_scanner_all_80' panicked at /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/warp-0.3.6/src/server.rs:217:27:
error binding to 127.0.0.1:80: error creating server listener: Permission denied (os error 13)
thread 'scanner::tests::test_scanner_all_80' panicked at src/scanner/mod.rs:384:9:
assertion failed: result.contains(&(80, "http"))


failures:
    scanner::tests::test_scanner_1000_80_443
    scanner::tests::test_scanner_1000_empty
    scanner::tests::test_scanner_all_80
    terminal::print::tests::test_terminal_monochrome_false

test result: FAILED. 16 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.76s

error: test failed, to rerun pass `--bin havn`

To Reproduce

Build the Arch Linux package in a clean chroot via extra-x86_64-build.

Expected behavior
Successful tests.

Desktop (please complete the following information):

  • OS: Arch Linux

Additional context
None

@orhun orhun added the bug Something isn't working label Apr 11, 2024
@mrjackwills
Copy link
Owner

mrjackwills commented Apr 11, 2024

Thanks, I'll investigate.

Is the port 80/443 issue related to not having sudo (and/or root access). If so, I can probably re-jig the tests to make them use all ports over 1000.

edit: Actually that wouldn't make any sense, as other test use these ports and have passed your test run

@orhun
Copy link
Contributor Author

orhun commented Apr 11, 2024

Yeah, I think they are related to not having root access. The chroot has the builduser in the container and I don't think it has all the permissions. But I will double check to make sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants