Skip to content

[CI failed] [test-unit] thread 'fetch::test_fetch_with_hsts' panicked at 'called Option::unwrap() on a None value' #19634

Closed

Description

@tigercosmos

./mach test-unit in current master bcdb82b

This make all CI failed!

---- fetch::test_fetch_with_hsts stdout ----
	thread 'fetch::test_fetch_with_hsts' panicked at 'called `Option::unwrap()` on a `None` value', /checkout/src/libcore/option.rs:335:20
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:68
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:57
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:391
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:577
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:538
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:522
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:498
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:71
   9: core::panicking::panic
             at /checkout/src/libcore/panicking.rs:51
  10: <core::option::Option<T>>::unwrap
             at /checkout/src/libcore/macros.rs:20
  11: net_tests::fetch::test_fetch_with_hsts
             at ./fetch.rs:558
  12: <F as test::FnBox<T>>::call_box
             at /checkout/src/libtest/lib.rs:1491
             at /checkout/src/libcore/ops/function.rs:223
             at /checkout/src/libtest/lib.rs:142
  13: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:99


failures:
    fetch::test_fetch_with_hsts

test result: FAILED. 421 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

Activity

  1. tigercosmos commented on Dec 23, 2017

    @tigercosmos
    ContributorAuthor

    cc @jdm

  2. changed the title [-]thread 'fetch::test_fetch_with_hsts' panicked at 'called `Option::unwrap()` on a `None` value'[/-] [+][test-unit] thread 'fetch::test_fetch_with_hsts' panicked at 'called `Option::unwrap()` on a `None` value'[/+] on Dec 23, 2017
  3. changed the title [-][test-unit] thread 'fetch::test_fetch_with_hsts' panicked at 'called `Option::unwrap()` on a `None` value'[/-] [+][CI failed] [test-unit] thread 'fetch::test_fetch_with_hsts' panicked at 'called `Option::unwrap()` on a `None` value'[/+] on Dec 23, 2017
  4. jonleighton commented on Dec 23, 2017

    @jonleighton
    Contributor

    The certificate used in that test has expired:

    $ openssl x509 -in resources/self_signed_certificate_for_testing.crt -noout -text | grep "Not After"
                Not After : Dec 23 05:32:31 2017 GMT
    
  5. jonleighton commented on Dec 23, 2017

    @jonleighton
    Contributor

    The self-signed cert was added in 6020b4c, where the failing test was also added. I guess it would be better to dynamically generate a self-signed cert in the tests so that there isn't a fixed expiry date.

  6. tigercosmos commented on Dec 24, 2017

    @tigercosmos
    ContributorAuthor

    I found a command. What's ./mach update-hsts-preload?

  7. jdm commented on Dec 24, 2017

    @jdm
    Member

    That only updates the HSTS preload list - it is used to automatically upgrade HTTP connections to HTTPS before the connection is started.

  8. tigercosmos commented on Dec 24, 2017

    @tigercosmos
    ContributorAuthor

    @jdm How do you think to solve the issue.
    Change to dynamically generate a self-signed cert as @jonleighton suggested?
    or just modify the file?

  9. jdm commented on Dec 24, 2017

    @jdm
    Member

    It would be nice to switch to dynamic generation at some point, but modifying the file would allow us to deal with the problem quickly.

  10. emilio commented on Dec 24, 2017

    @emilio
    Member

    Yeah, I'm on it right now.

  11. self-assigned this
    on Dec 24, 2017
  12. added a commit that references this issue on Dec 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions