lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b4b23ce-316e-b998-7faf-e529b121a8b4@gmail.com>
Date:   Wed, 14 Jun 2023 22:03:33 -0300
From:   Martin Rodriguez Reboredo <yakoyoku@...il.com>
To:     Miguel Ojeda <ojeda@...nel.org>, David Gow <davidgow@...gle.com>,
        Brendan Higgins <brendan.higgins@...ux.dev>,
        Wedson Almeida Filho <wedsonaf@...il.com>,
        Alex Gaynor <alex.gaynor@...il.com>
Cc:     Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
        Björn Roy Baron <bjorn3_gh@...tonmail.com>,
        Benno Lossin <benno.lossin@...ton.me>,
        Alice Ryhl <aliceryhl@...gle.com>,
        Andreas Hindborg <nmi@...aspace.dk>,
        Philip Li <philip.li@...el.com>, kunit-dev@...glegroups.com,
        linux-kselftest@...r.kernel.org, rust-for-linux@...r.kernel.org,
        linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH 1/6] rust: init: make doctests compilable/testable

On 6/14/23 15:08, Miguel Ojeda wrote:
> Rust documentation tests are going to be build/run-tested
> with the KUnit integration added in a future patch, thus
> update them to make them compilable/testable so that we
> may start enforcing it.
> 
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
> ---
> [...]
>   //! #     pub unsafe fn destroy_foo(_ptr: *mut foo) {}
>   //! #     pub unsafe fn enable_foo(_ptr: *mut foo, _flags: u32) -> i32 { 0 }
>   //! # }
> +//! # trait FromErrno {
> +//! #     fn from_errno(errno: core::ffi::c_int) -> Error {
> +//! #         // Dummy error that can be constructed outside the `kernel` crate.
> +//! #         Error::from(core::fmt::Error)
> +//! #     }
> +//! # }
> +//! # impl FromErrno for Error {}
>   //! /// # Invariants
>   //! ///
>   //! /// `foo` is always initialized
> [...]

Little question, what's the purpose of `FromErrno` here?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ