Skip to content
New issue

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

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

Already on GitHub? # to your account

cargo test --test fs-test fails on main #726

Closed
n0toose opened this issue Jul 6, 2024 · 4 comments
Closed

cargo test --test fs-test fails on main #726

n0toose opened this issue Jul 6, 2024 · 4 comments

Comments

@n0toose
Copy link
Member

n0toose commented Jul 6, 2024

To reproduce, run cargo test new_file_test or cargo test --test fs-test: #725 (review)

~ cargo test new_file_test
    Finished test [unoptimized + debuginfo] target(s) in 0.06s
     Running unittests src/lib.rs (target/debug/deps/uhyvelib-bc3acb47a2075c26)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 5 filtered out; finished in 0.00s

     Running unittests src/bin/uhyve.rs (target/debug/deps/uhyve-84a7e3d5e6db36b8)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/common.rs (target/debug/deps/common-e049bf123cef4ec3)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/fs-test.rs (target/debug/deps/fs_test-dc7c558e0c2546f0)

running 1 test
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s
[0][INFO] Welcome to Hermit 0.8.0
[0][INFO] Kernel starts at 400000
[0][INFO] BSS starts at 0x9e5a70
[0][INFO] tls_info = Some(
    TlsInfo {
        start: 0x8950f0,
        filesz: 0x28,
        memsz: 0xc8,
        align: 0x8,
    },
)
[0][INFO] Total memory size: 32 MB
[0][INFO] Kernel region: [400000 - a00000]
[0][INFO] A pure Rust application is running on top of Hermit!
[0][INFO] Heap: size 14 MB, start address a00000
[0][INFO] Heap is located at 0xa00000..0x1800000 (0 Bytes unmapped)
[0][INFO] Physical memory free list:
         0x1800000..         0x2000000 (len =           0x800000, pages =             2048)
[0][INFO] Virtual memory free list:
         0x1800000..    0x800000000000 (len =     0x7ffffe800000, pages =      34359732224)
[0][INFO] 
[0][INFO] ========================== CPU INFORMATION ===========================
[0][INFO] Model:                   uhyve - unikernel hypervisor
[0][INFO] Frequency:               [...]
[0][INFO] SpeedStep Technology:    Not Available
[0][INFO] Features:                [...]
[0][INFO] Physical Address Width:  48 bits
[0][INFO] Linear Address Width:    48 bits
[0][INFO] Supports 1GiB Pages:     Yes
[0][INFO] ======================================================================
[0][INFO] 
[0][INFO] Hermit booted on 2024-07-06 18:13:49.964760794 +00:00:00
[0][WARN] Try to use default APIC address
[1][PANIC] panicked at /rustc/ada5e2c7b5427a591e30baeeee2698a5eb6db0bd/library/alloc/src/vec/mod.rs:1572:13:
insertion index (is 1) should be <= len (is 0)
Number of interrupts
[1][INFO] shutting down with code 1
test new_file_test ... FAILED

failures:

---- new_file_test stdout ----
Building Kernel create_file
thread 'new_file_test' panicked at tests/common.rs:52:5:
assertion `left == right` failed
  left: 0
 right: 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    new_file_test

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.37s

error: test failed, to rerun pass `--test fs-test`
@jounathaen
Copy link
Member

@n0toose
Copy link
Member Author

n0toose commented Nov 21, 2024

temporary workaround: decrease the CPUs used from 2 to 1.

@mkroening
Copy link
Member

This was fixed in hermit-os/kernel#1372. I'll do a kernel release soon. :)

@n0toose
Copy link
Member Author

n0toose commented Dec 6, 2024

then I'll close this (despite it not being 100% officially resolved) because tracking this here is probably not worth it

@n0toose n0toose closed this as completed Dec 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants