<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in .gitignore</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>a66d733d - rust: support running Rust documentation tests as KUnit ones</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/rust/.gitignore#a66d733d</link>
        <description>rust: support running Rust documentation tests as KUnit onesRust has documentation tests: these are typically examples ofusage of any item (e.g. function, struct, module...).They are very convenient because they are just writtenalongside the documentation. For instance:    /// Sums two numbers.    ///    /// ```    /// assert_eq!(mymod::f(10, 20), 30);    /// ```    pub fn f(a: i32, b: i32) -&gt; i32 {        a + b    }In userspace, the tests are collected and run via `rustdoc`.Using the tool as-is would be useful already, since it allowsto compile-test most tests (thus enforcing they are keptin sync with the code they document) and run those that do notdepend on in-kernel APIs.However, by transforming the tests into a KUnit test suite,they can also be run inside the kernel. Moreover, the testsget to be compiled as other Rust kernel objects instead oftargeting userspace.On top of that, the integration with KUnit means the Rustsupport gets to reuse the existing testing facilities. Forinstance, the kernel log would look like:    KTAP version 1    1..1        KTAP version 1        # Subtest: rust_doctests_kernel        1..59        # rust_doctest_kernel_build_assert_rs_0.location: rust/kernel/build_assert.rs:13        ok 1 rust_doctest_kernel_build_assert_rs_0        # rust_doctest_kernel_build_assert_rs_1.location: rust/kernel/build_assert.rs:56        ok 2 rust_doctest_kernel_build_assert_rs_1        # rust_doctest_kernel_init_rs_0.location: rust/kernel/init.rs:122        ok 3 rust_doctest_kernel_init_rs_0        ...        # rust_doctest_kernel_types_rs_2.location: rust/kernel/types.rs:150        ok 59 rust_doctest_kernel_types_rs_2    # rust_doctests_kernel: pass:59 fail:0 skip:0 total:59    # Totals: pass:59 fail:0 skip:0 total:59    ok 1 rust_doctests_kernelTherefore, add support for running Rust documentation testsin KUnit. Some other notes about the current implementationand support follow.The transformation is performed by a couple scripts writtenas Rust hostprogs.Tests using the `?` operator are also supported as usual, e.g.:    /// ```    /// # use kernel::{spawn_work_item, workqueue};    /// spawn_work_item!(workqueue::system(), || pr_info!(&quot;x&quot;))?;    /// # Ok::&lt;(), Error&gt;(())    /// ```The tests are also compiled with Clippy under `CLIPPY=1`, justlike normal code, thus also benefitting from extra linting.The names of the tests are currently automatically generated.This allows to reduce the burden for documentation writers,while keeping them fairly stable for bisection. This is animprovement over the `rustdoc`-generated names, which includethe line number; but ideally we would like to get `rustdoc` toprovide the Rust item path and a number (for multiple examplesin a single documented Rust item).In order for developers to easily see from which original linea failed doctests came from, a KTAP diagnostic line is printedto the log, containing the location (file and line) of theoriginal test (i.e. instead of the location in the generatedRust file):    # rust_doctest_kernel_types_rs_2.location: rust/kernel/types.rs:150This line follows the syntax for declaring test metadata in theproposed KTAP v2 spec [1], which may be used for the proposedKUnit test attributes API [2]. Thus hopefully this will makemigration easier later on (suggested by David [3]).The original line in that test attribute is figured out byproviding an anchor (suggested by Boqun [4]). The original fileis found by walking the filesystem, checking directory prefixesto reduce the amount of combinations to check, and it is onlydone once per file. Ambiguities are detected and reported.A notable difference from KUnit C tests is that the Rust testsappear to assert using the usual `assert!` and `assert_eq!`macros from the Rust standard library (`core`). We providea custom version that forwards the call to KUnit instead.Importantly, these macros do not require passing context,unlike the KUnit C ones (i.e. `struct kunit *`). This makesthem easier to use, and readers of the documentation do not needto care about which testing framework is used. In addition, itmay allow us to test third-party code more easily in the future.However, a current limitation is that KUnit does not supportassertions in other tasks. Thus we presently simply print anerror to the kernel log if an assertion actually failed. Thisshould be revisited to properly fail the test, perhaps savingthe context somewhere else, or letting KUnit handle it.Link: https://lore.kernel.org/lkml/20230420205734.1288498-1-rmoar@google.com/ [1]Link: https://lore.kernel.org/linux-kselftest/20230707210947.1208717-1-rmoar@google.com/ [2]Link: https://lore.kernel.org/rust-for-linux/CABVgOSkOLO-8v6kdAGpmYnZUb+LKOX0CtYCo-Bge7r_2YTuXDQ@mail.gmail.com/ [3]Link: https://lore.kernel.org/rust-for-linux/ZIps86MbJF%2FiGIzd@boqun-archlinux/ [4]Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;Reviewed-by: David Gow &lt;davidgow@google.com&gt;Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;

            List of files:
            /linux-6.15/rust/.gitignore</description>
        <pubDate>Tue, 18 Jul 2023 05:27:51 +0000</pubDate>
        <dc:creator>Miguel Ojeda &lt;ojeda@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>4e174665 - rust: uapi: Add UAPI crate</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/rust/.gitignore#4e174665</link>
        <description>rust: uapi: Add UAPI crateThis crate mirrors the `bindings` crate, but will contain only UAPIbindings. Unlike the bindings crate, drivers may directly use this crateif they have to interface with userspace.Initially, just bind the generic ioctl stuff.In the future, we would also like to add additional checks to ensurethat all types exposed by this crate satisfy UAPI-safety guarantees(that is, they are safely castable to/from a &quot;bag of bits&quot;).[ Miguel: added support for the `rustdoc` and `rusttest` targets,  since otherwise they fail, and we want to keep them working. ]Reviewed-by: Martin Rodriguez Reboredo &lt;yakoyoku@gmail.com&gt;Signed-off-by: Asahi Lina &lt;lina@asahilina.net&gt;Link: https://lore.kernel.org/r/20230329-rust-uapi-v2-1-bca5fb4d4a12@asahilina.netSigned-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;

            List of files:
            /linux-6.15/rust/.gitignore</description>
        <pubDate>Mon, 03 Apr 2023 09:33:52 +0000</pubDate>
        <dc:creator>Asahi Lina &lt;lina@asahilina.net&gt;</dc:creator>
    </item>
<item>
        <title>c83b16ce - kbuild: rust: move rust/target.json to scripts/</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/rust/.gitignore#c83b16ce</link>
        <description>kbuild: rust: move rust/target.json to scripts/scripts/ is a better place to generate files used treewide.With target.json moved to scripts/, you do not need to add target.jsonto no-clean-files or MRPROPER_FILES.&apos;make clean&apos; does not visit scripts/, but &apos;make mrproper&apos; does.Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;Reviewed-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;Tested-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;

            List of files:
            /linux-6.15/rust/.gitignore</description>
        <pubDate>Sat, 07 Jan 2023 09:45:45 +0000</pubDate>
        <dc:creator>Masahiro Yamada &lt;masahiroy@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>2f7ab126 - Kbuild: add Rust support</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/rust/.gitignore#2f7ab126</link>
        <description>Kbuild: add Rust supportHaving most of the new files in place, we now enable Rust supportin the build system, including `Kconfig` entries related to Rust,the Rust configuration printer and a few other bits.Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;Tested-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;Co-developed-by: Alex Gaynor &lt;alex.gaynor@gmail.com&gt;Signed-off-by: Alex Gaynor &lt;alex.gaynor@gmail.com&gt;Co-developed-by: Finn Behrens &lt;me@kloenk.de&gt;Signed-off-by: Finn Behrens &lt;me@kloenk.de&gt;Co-developed-by: Adam Bratschi-Kaye &lt;ark.email@gmail.com&gt;Signed-off-by: Adam Bratschi-Kaye &lt;ark.email@gmail.com&gt;Co-developed-by: Wedson Almeida Filho &lt;wedsonaf@google.com&gt;Signed-off-by: Wedson Almeida Filho &lt;wedsonaf@google.com&gt;Co-developed-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;Co-developed-by: Sven Van Asbroeck &lt;thesven73@gmail.com&gt;Signed-off-by: Sven Van Asbroeck &lt;thesven73@gmail.com&gt;Co-developed-by: Gary Guo &lt;gary@garyguo.net&gt;Signed-off-by: Gary Guo &lt;gary@garyguo.net&gt;Co-developed-by: Boris-Chengbiao Zhou &lt;bobo1239@web.de&gt;Signed-off-by: Boris-Chengbiao Zhou &lt;bobo1239@web.de&gt;Co-developed-by: Boqun Feng &lt;boqun.feng@gmail.com&gt;Signed-off-by: Boqun Feng &lt;boqun.feng@gmail.com&gt;Co-developed-by: Douglas Su &lt;d0u9.su@outlook.com&gt;Signed-off-by: Douglas Su &lt;d0u9.su@outlook.com&gt;Co-developed-by: Dariusz Sosnowski &lt;dsosnowski@dsosnowski.pl&gt;Signed-off-by: Dariusz Sosnowski &lt;dsosnowski@dsosnowski.pl&gt;Co-developed-by: Antonio Terceiro &lt;antonio.terceiro@linaro.org&gt;Signed-off-by: Antonio Terceiro &lt;antonio.terceiro@linaro.org&gt;Co-developed-by: Daniel Xu &lt;dxu@dxuuu.xyz&gt;Signed-off-by: Daniel Xu &lt;dxu@dxuuu.xyz&gt;Co-developed-by: Bj&#246;rn Roy Baron &lt;bjorn3_gh@protonmail.com&gt;Signed-off-by: Bj&#246;rn Roy Baron &lt;bjorn3_gh@protonmail.com&gt;Co-developed-by: Martin Rodriguez Reboredo &lt;yakoyoku@gmail.com&gt;Signed-off-by: Martin Rodriguez Reboredo &lt;yakoyoku@gmail.com&gt;Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;

            List of files:
            /linux-6.15/rust/.gitignore</description>
        <pubDate>Sat, 03 Jul 2021 14:42:57 +0000</pubDate>
        <dc:creator>Miguel Ojeda &lt;ojeda@kernel.org&gt;</dc:creator>
    </item>
</channel>
</rss>
