public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH v3 4/7] rust: Fix assertion failure error on oe-selftest
  2024-01-23  8:10 Yash.Shinde
@ 2024-01-23  8:10 ` Yash.Shinde
  0 siblings, 0 replies; 13+ messages in thread
From: Yash.Shinde @ 2024-01-23  8:10 UTC (permalink / raw)
  To: openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa, Yash.Shinde

From: Yash Shinde <Yash.Shinde@windriver.com>

    Fixes: thread 'main' panicked at 'assertion failed: `(left == right)`
    left: `x86_64-unknown-linux-gnu`,
    right: `x86_64-poky-linux-gnu`: Cannot obtain compiler for non-native build triple at stage 0', compile.rs:1474:13

    Add correct target value for cross-compiled targets on stage1 during rust oe-selfest.

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
 .../rust/files/target-build-value.patch       | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 meta/recipes-devtools/rust/files/target-build-value.patch

diff --git a/meta/recipes-devtools/rust/files/target-build-value.patch b/meta/recipes-devtools/rust/files/target-build-value.patch
new file mode 100644
index 0000000000..23e8c76801
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/target-build-value.patch
@@ -0,0 +1,26 @@
+Add correct build value for cross-compiled targets on stage1 when
+bootstapping rustc.
+
+Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/119619/commits/b888e2f82b9dbe81875f50d13adbc0271a9401ff]
+
+Signed-off-by: onur-ozkan <work@onurozkan.dev>
+Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
+---
+diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
+--- a/src/bootstrap/test.rs
++++ b/src/bootstrap/test.rs
+@@ -1489,8 +1489,12 @@
+         // NOTE: Only stage 1 is special cased because we need the rustc_private artifacts to match the
+         // running compiler in stage 2 when plugins run.
+         let stage_id = if suite == "ui-fulldeps" && compiler.stage == 1 {
+-            compiler = builder.compiler(compiler.stage - 1, target);
+-            format!("stage{}-{}", compiler.stage + 1, target)
++            // At stage 0 (stage - 1) we are using the beta compiler. Using `self.target` can lead finding
++            // an incorrect compiler path on cross-targets, as the stage 0 beta compiler is always equal
++            // to `build.build` in the configuration.
++            let build = builder.build.build;
++            compiler = builder.compiler(compiler.stage - 1, build);
++            format!("stage{}-{}", compiler.stage + 1, build)
+         } else {
+             format!("stage{}-{}", compiler.stage, target)
+         };
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir.
@ 2024-01-23 13:16 Yash.Shinde
  2024-01-23 13:16 ` [PATCH v3 2/7] rust: detect user-specified custom targets in compiletest Yash.Shinde
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Yash.Shinde @ 2024-01-23 13:16 UTC (permalink / raw)
  To: openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa, Yash.Shinde

From: Yash Shinde <Yash.Shinde@windriver.com>

    Fixes: Exception: no cargo executable found at
           `${B}/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo`

    Fix the cargo binary path error on oe-selftest and path set to rust-snapshot dir.

    Patch sent to upstream- https://github.com/rust-lang/rust/pull/120125

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
 .../rust/files/cargo-path.patch               | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 meta/recipes-devtools/rust/files/cargo-path.patch

diff --git a/meta/recipes-devtools/rust/files/cargo-path.patch b/meta/recipes-devtools/rust/files/cargo-path.patch
new file mode 100644
index 0000000000..547df353d2
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/cargo-path.patch
@@ -0,0 +1,37 @@
+Fix the cargo binary path error and ensure that it is fetched 
+during rustc bootstrap in rust oe-selftest. 
+
+======================================================================
+ERROR: test_cargoflags (bootstrap_test.BuildBootstrap)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "/home/build-st/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/src/bootstrap/bootstrap_test.py", line 157, in test_cargoflags
+    args, _ = self.build_args(env={"CARGOFLAGS": "--timings"})
+  File "/home/build-st/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/src/bootstrap/bootstrap_test.py", line 154, in build_args
+    return build.build_bootstrap_cmd(env), env
+  File "/home/build-st/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/src/bootstrap/bootstrap.py", line 960, in build_bootstrap_cmd
+    raise Exception("no cargo executable found at `{}`".format(
+Exception: no cargo executable found at `/home/build-st/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo`
+
+Upstream-Status: Submitted [https://github.com/rust-lang/rust/pull/120125]
+
+Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
+---
+diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
+--- a/src/bootstrap/bootstrap.py
++++ b/src/bootstrap/bootstrap.py
+@@ -954,9 +954,11 @@
+         if deny_warnings:
+             env["RUSTFLAGS"] += " -Dwarnings"
+
+-        env["PATH"] = os.path.join(self.bin_root(), "bin") + \
+-            os.pathsep + env["PATH"]
+-        if not os.path.isfile(self.cargo()):
++        cargo_bin_path = os.path.join(self.bin_root(), "bin", "cargo")
++        if not os.path.isfile(cargo_bin_path):
++            cargo_bin_path = os.getenv("RUST_TARGET_PATH") + "rust-snapshot/bin/cargo"
++            env["PATH"] = os.path.dirname(cargo_bin_path) + os.pathsep + env["PATH"]
++        else:
+             raise Exception("no cargo executable found at `{}`".format(
+                 self.cargo()))
+         args = [self.cargo(), "build", "--manifest-path",
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 2/7] rust: detect user-specified custom targets in compiletest
  2024-01-23 13:16 [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Yash.Shinde
@ 2024-01-23 13:16 ` Yash.Shinde
  2024-01-23 13:16 ` [PATCH v3 3/7] rust: Enable RUSTC_BOOTSTRAP to use nightly features during rust oe-selftest Yash.Shinde
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Yash.Shinde @ 2024-01-23 13:16 UTC (permalink / raw)
  To: openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa, Yash.Shinde

From: Yash Shinde <Yash.Shinde@windriver.com>

    Fixes: thread 'main' panicked at 'failed to gather the target spec
           for '<arch>-unknown-linux-gnu', synthetic_targets.rs:66:9

    Detect and fetch custom target configurations when rustc is
    bootstrapped in rust oe-selftest.

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
 .../rust/files/custom-target-cfg.patch        | 90 +++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100644 meta/recipes-devtools/rust/files/custom-target-cfg.patch

diff --git a/meta/recipes-devtools/rust/files/custom-target-cfg.patch b/meta/recipes-devtools/rust/files/custom-target-cfg.patch
new file mode 100644
index 0000000000..15a7f252cc
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/custom-target-cfg.patch
@@ -0,0 +1,90 @@
+Detect and fetch custom target configurations when rustc is
+bootstrapped in rust oe-selftest.
+
+Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/119619/commits/26c71cbcf1a9bce6ceb962d753c467d098f63cf6]
+
+Signed-off-by: onur-ozkan <work@onurozkan.dev>
+Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
+---
+diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
+index e85f6319936..c45c0b3c652 100644
+--- a/src/tools/compiletest/src/common.rs
++++ b/src/tools/compiletest/src/common.rs
+@@ -479,6 +479,7 @@ fn new(config: &Config) -> TargetCfgs {
+         let mut targets: HashMap<String, TargetCfg> = serde_json::from_str(&rustc_output(
+             config,
+             &["--print=all-target-specs-json", "-Zunstable-options"],
++            Default::default(),
+         ))
+         .unwrap();
+
+@@ -491,16 +492,33 @@ fn new(config: &Config) -> TargetCfgs {
+         let mut all_families = HashSet::new();
+         let mut all_pointer_widths = HashSet::new();
+
+-        // Handle custom target specs, which are not included in `--print=all-target-specs-json`.
+-        if config.target.ends_with(".json") {
+-            targets.insert(
+-                config.target.clone(),
+-                serde_json::from_str(&rustc_output(
+-                    config,
+-                    &["--print=target-spec-json", "-Zunstable-options", "--target", &config.target],
+-                ))
+-                .unwrap(),
+-            );
++        // If current target is not included in the `--print=all-target-specs-json` output,
++        // we check whether it is a custom target from the user or a synthetic target from bootstrap.
++        if !targets.contains_key(&config.target) {
++            let mut envs: HashMap<String, String> = HashMap::new();
++
++            if let Ok(t) = std::env::var("RUST_TARGET_PATH") {
++                envs.insert("RUST_TARGET_PATH".into(), t);
++            }
++
++            // This returns false only when the target is neither a synthetic target
++            // nor a custom target from the user, indicating it is most likely invalid.
++            if config.target.ends_with(".json") || !envs.is_empty() {
++                targets.insert(
++                    config.target.clone(),
++                    serde_json::from_str(&rustc_output(
++                        config,
++                        &[
++                            "--print=target-spec-json",
++                            "-Zunstable-options",
++                            "--target",
++                            &config.target,
++                        ],
++                        envs,
++                    ))
++                    .unwrap(),
++                );
++            }
+         }
+
+         for (target, cfg) in targets.iter() {
+@@ -545,7 +563,9 @@ fn get_current_target_config(
+         // code below extracts them from `--print=cfg`: make sure to only override fields that can
+         // actually be changed with `-C` flags.
+         for config in
+-            rustc_output(config, &["--print=cfg", "--target", &config.target]).trim().lines()
++            rustc_output(config, &["--print=cfg", "--target", &config.target], Default::default())
++                .trim()
++                .lines()
+         {
+             let (name, value) = config
+                 .split_once("=\"")
+@@ -624,11 +644,12 @@ pub enum Endian {
+     Big,
+ }
+
+-fn rustc_output(config: &Config, args: &[&str]) -> String {
++fn rustc_output(config: &Config, args: &[&str], envs: HashMap<String, String>) -> String {
+     let mut command = Command::new(&config.rustc_path);
+     add_dylib_path(&mut command, iter::once(&config.compile_lib_path));
+     command.args(&config.target_rustcflags).args(args);
+     command.env("RUSTC_BOOTSTRAP", "1");
++    command.envs(envs);
+
+     let output = match command.output() {
+         Ok(output) => output,
+
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 3/7] rust: Enable RUSTC_BOOTSTRAP to use nightly features during rust oe-selftest.
  2024-01-23 13:16 [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Yash.Shinde
  2024-01-23 13:16 ` [PATCH v3 2/7] rust: detect user-specified custom targets in compiletest Yash.Shinde
@ 2024-01-23 13:16 ` Yash.Shinde
  2024-01-23 13:16 ` [PATCH v3 4/7] rust: Fix assertion failure error on oe-selftest Yash.Shinde
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Yash.Shinde @ 2024-01-23 13:16 UTC (permalink / raw)
  To: openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa, Yash.Shinde

From: Yash Shinde <Yash.Shinde@windriver.com>

    Fixes: error: the option `Z` is only accepted on the nightly compiler

    When rust.channel is set to either beta or stable, we can't use
    nightly features on bootstrap without RUSTC_BOOTSTRAP.
    Set RUSTC_BOOTSTRAP=1 to use nightly features on stable or beta.

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
 .../rust/files/rustc-bootstrap.patch          | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 meta/recipes-devtools/rust/files/rustc-bootstrap.patch

diff --git a/meta/recipes-devtools/rust/files/rustc-bootstrap.patch b/meta/recipes-devtools/rust/files/rustc-bootstrap.patch
new file mode 100644
index 0000000000..406fc610bb
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/rustc-bootstrap.patch
@@ -0,0 +1,21 @@
+When rust.channel is set to either beta or stable, we can't use
+nightly features on bootstrap without RUSTC_BOOTSTRAP. Set RUSTC_BOOTSTRAP=1
+to use nightly features on stable or beta.
+
+Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/119619/commits/8aa7dd06f6e50621dc10f9f9490681be8a45876f]
+
+Signed-off-by: onur-ozkan <work@onurozkan.dev>
+Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
+---
+diff --git a/src/bootstrap/synthetic_targets.rs b/ src/bootstrap/synthetic_targets.rs
+index d2c65b740da..45baf56f46b 100644
+--- a/src/bootstrap/synthetic_targets.rs
++++ b/src/bootstrap/synthetic_targets.rs
+@@ -59,6 +59,7 @@ fn create_synthetic_target(
+     let mut cmd = Command::new(builder.rustc(compiler));
+     cmd.arg("--target").arg(base.rustc_target_arg());
+     cmd.args(["-Zunstable-options", "--print", "target-spec-json"]);
++    cmd.env("RUSTC_BOOTSTRAP", "1");
+     cmd.stdout(Stdio::piped());
+
+     let output = cmd.spawn().unwrap().wait_with_output().unwrap();
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 4/7] rust: Fix assertion failure error on oe-selftest
  2024-01-23 13:16 [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Yash.Shinde
  2024-01-23 13:16 ` [PATCH v3 2/7] rust: detect user-specified custom targets in compiletest Yash.Shinde
  2024-01-23 13:16 ` [PATCH v3 3/7] rust: Enable RUSTC_BOOTSTRAP to use nightly features during rust oe-selftest Yash.Shinde
@ 2024-01-23 13:16 ` Yash.Shinde
  2024-01-23 13:16 ` [PATCH v3 5/7] rust: Add new tests in the exclude list for rust oe-selftest Yash.Shinde
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Yash.Shinde @ 2024-01-23 13:16 UTC (permalink / raw)
  To: openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa, Yash.Shinde

From: Yash Shinde <Yash.Shinde@windriver.com>

    Fixes: thread 'main' panicked at 'assertion failed: `(left == right)`
    left: `x86_64-unknown-linux-gnu`,
    right: `x86_64-poky-linux-gnu`: Cannot obtain compiler for non-native build triple at stage 0', compile.rs:1474:13

    Add correct target value for cross-compiled targets on stage1 during rust oe-selfest.

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
 .../rust/files/target-build-value.patch       | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 meta/recipes-devtools/rust/files/target-build-value.patch

diff --git a/meta/recipes-devtools/rust/files/target-build-value.patch b/meta/recipes-devtools/rust/files/target-build-value.patch
new file mode 100644
index 0000000000..23e8c76801
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/target-build-value.patch
@@ -0,0 +1,26 @@
+Add correct build value for cross-compiled targets on stage1 when
+bootstapping rustc.
+
+Upstream-Status: Backport [https://github.com/rust-lang/rust/pull/119619/commits/b888e2f82b9dbe81875f50d13adbc0271a9401ff]
+
+Signed-off-by: onur-ozkan <work@onurozkan.dev>
+Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
+---
+diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
+--- a/src/bootstrap/test.rs
++++ b/src/bootstrap/test.rs
+@@ -1489,8 +1489,12 @@
+         // NOTE: Only stage 1 is special cased because we need the rustc_private artifacts to match the
+         // running compiler in stage 2 when plugins run.
+         let stage_id = if suite == "ui-fulldeps" && compiler.stage == 1 {
+-            compiler = builder.compiler(compiler.stage - 1, target);
+-            format!("stage{}-{}", compiler.stage + 1, target)
++            // At stage 0 (stage - 1) we are using the beta compiler. Using `self.target` can lead finding
++            // an incorrect compiler path on cross-targets, as the stage 0 beta compiler is always equal
++            // to `build.build` in the configuration.
++            let build = builder.build.build;
++            compiler = builder.compiler(compiler.stage - 1, build);
++            format!("stage{}-{}", compiler.stage + 1, build)
+         } else {
+             format!("stage{}-{}", compiler.stage, target)
+         };
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 5/7] rust: Add new tests in the exclude list for rust oe-selftest
  2024-01-23 13:16 [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Yash.Shinde
                   ` (2 preceding siblings ...)
  2024-01-23 13:16 ` [PATCH v3 4/7] rust: Fix assertion failure error on oe-selftest Yash.Shinde
@ 2024-01-23 13:16 ` Yash.Shinde
  2024-01-23 13:16 ` [PATCH v3 6/7] rust: Remove the test cases whose parent dir is also present in the exclude list Yash.Shinde
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Yash.Shinde @ 2024-01-23 13:16 UTC (permalink / raw)
  To: openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa, Yash.Shinde

From: Yash Shinde <Yash.Shinde@windriver.com>

    Add newly failing tests cases in the exclude list for
    rust oe-selftest.

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
 meta/lib/oeqa/selftest/cases/rust.py | 37 +++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py
index 6dbc517006..7ad6cd6be7 100644
--- a/meta/lib/oeqa/selftest/cases/rust.py
+++ b/meta/lib/oeqa/selftest/cases/rust.py
@@ -262,7 +262,42 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
                             'tests/ui/process/process-panic-after-fork.rs',
                             'tests/ui/process/process-sigpipe.rs',
                             'tests/ui/simd/target-feature-mixup.rs',
-                            'tests/ui/structs-enums/multiple-reprs.rs'
+                            'tests/ui/structs-enums/multiple-reprs.rs',
+                            'tests/mir-opt/',
+                            'tests/codegen/abi-sysv64.rs',
+                            'tests/codegen/call-metadata.rs',
+                            'tests/codegen/async-fn-debug-awaitee-field.rs',
+                            'tests/codegen/issues/issue-77812.rs',
+                            'tests/codegen/debug-column.rs',
+                            'tests/codegen/inline-function-args-debug-info.rs',
+                            'tests/codegen/binary-search-index-no-bound-check.rs',
+                            'tests/codegen/fn-impl-trait-self.rs',
+                            'tests/codegen/enum/enum-u128.rs',
+                            'tests/codegen/abi-efiapi.rs',
+                            'tests/codegen/issues/issue-73258.rs',
+                            'tests/codegen/llvm-ident.rs',
+                            'tests/codegen/drop.rs',
+                            'tests/codegen/intrinsics/transmute-niched.rs',
+                            'tests/codegen/issues/issue-75546.rs',
+                            'tests/codegen/debuginfo-generic-closure-env-names.rs',
+                            'tests/codegen/inherit_overflow.rs',
+                            'tests/codegen/asm-powerpc-clobbers.rs',
+                            'tests/codegen/align-byval.rs',
+                            'tests/codegen/inherit_overflow.rs',
+                            'tests/codegen/dst-vtable-align-nonzero.rs',
+                            'tests/codegen/move-operands.rs',
+                            'tests/codegen/align-fn.rs',
+                            'tests/codegen/abi-efiapi.rs',
+                            'tests/codegen/issues/issue-98156-const-arg-temp-lifetime.rs',
+                            'tests/codegen/debug-limited.rs',
+                            'tests/codegen/mainsubprogram.rs',
+                            'tests/codegen/enable-lto-unit-splitting.rs',
+                            'tests/codegen/intrinsics/mask.rs',
+                            'tests/ui-fulldeps/',
+                            'src/tools/replace-version-placeholder',
+                            'src/tools/jsondoclint',
+                            'tests/ui/numbers-arithmetic/u128.rs',
+                            'tests/codegen/repr/transparent-mips64.rs'
                         ]
 
         exclude_fail_tests = " ".join([" --exclude " + item for item in exclude_list])
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 6/7] rust: Remove the test cases whose parent dir is also present in the exclude list
  2024-01-23 13:16 [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Yash.Shinde
                   ` (3 preceding siblings ...)
  2024-01-23 13:16 ` [PATCH v3 5/7] rust: Add new tests in the exclude list for rust oe-selftest Yash.Shinde
@ 2024-01-23 13:16 ` Yash.Shinde
  2024-01-23 13:16 ` [PATCH v3 7/7] rust: Enable rust oe-selftest Yash.Shinde
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Yash.Shinde @ 2024-01-23 13:16 UTC (permalink / raw)
  To: openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa, Yash.Shinde

From: Yash Shinde <Yash.Shinde@windriver.com>

To avoid overlap and redundancy of rust tests, remove the test cases whose
parent dir is already excluded.

Tests which are failing from below dirs are removed as these dirs are
already present in exclude list
            tests/run-make
            tests/rustdoc
            tests/mir-opt
            tests/ui-fulldeps

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
 meta/lib/oeqa/selftest/cases/rust.py | 122 ---------------------------
 1 file changed, 122 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py
index 7ad6cd6be7..0ec2e422f9 100644
--- a/meta/lib/oeqa/selftest/cases/rust.py
+++ b/meta/lib/oeqa/selftest/cases/rust.py
@@ -102,108 +102,8 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
                             'tests/codegen/uninit-consts.rs',
                             'tests/pretty/raw-str-nonexpr.rs',
                             'tests/run-make',
-                            'tests/run-make/cdylib-fewer-symbols/foo.rs',
-                            'tests/run-make/doctests-keep-binaries/t.rs',
                             'tests/run-make-fulldeps',
-                            'tests/run-make/issue-22131/foo.rs',
-                            'tests/run-make/issue-36710/Makefile',
-                            'tests/run-make/issue-47551',
-                            'tests/run-make/pgo-branch-weights',
-                            'tests/run-make/pgo-gen',
-                            'tests/run-make/pgo-gen-lto',
-                            'tests/run-make/pgo-indirect-call-promotion',
-                            'tests/run-make/pgo-use',
-                            'tests/run-make/pointer-auth-link-with-c/Makefile',
-                            'tests/run-make/profile',
-                            'tests/run-make/static-pie',
-                            'tests/run-make/sysroot-crates-are-unstable',
-                            'tests/run-make/target-specs',
                             'tests/rustdoc',
-                            'tests/rustdoc/async-move-doctest.rs',
-                            'tests/rustdoc/async-trait.rs',
-                            'tests/rustdoc/auto-traits.rs',
-                            'tests/rustdoc/check-source-code-urls-to-def.rs',
-                            'tests/rustdoc/comment-in-doctest.rs',
-                            'tests/rustdoc/const-generics/const-generics-docs.rs',
-                            'tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs',
-                            'tests/rustdoc/cross-crate-hidden-impl-parameter.rs',
-                            'tests/rustdoc/cross-crate-links.rs',
-                            'tests/rustdoc/cross-crate-primitive-doc.rs',
-                            'tests/rustdoc/doctest-manual-crate-name.rs',
-                            'tests/rustdoc/edition-doctest.rs',
-                            'tests/rustdoc/edition-flag.rs',
-                            'tests/rustdoc/elided-lifetime.rs',
-                            'tests/rustdoc/external-macro-src.rs',
-                            'tests/rustdoc/extern-html-root-url.rs',
-                            'tests/rustdoc/extern-impl-trait.rs',
-                            'tests/rustdoc/hide-unstable-trait.rs',
-                            'tests/rustdoc/inline_cross/add-docs.rs',
-                            'tests/rustdoc/inline_cross/default-trait-method.rs',
-                            'tests/rustdoc/inline_cross/dyn_trait.rs',
-                            'tests/rustdoc/inline_cross/impl_trait.rs',
-                            'tests/rustdoc/inline_cross/issue-24183.rs',
-                            'tests/rustdoc/inline_cross/macros.rs',
-                            'tests/rustdoc/inline_cross/trait-vis.rs',
-                            'tests/rustdoc/inline_cross/use_crate.rs',
-                            'tests/rustdoc/intra-doc-crate/self.rs',
-                            'tests/rustdoc/intra-doc/cross-crate/additional_doc.rs',
-                            'tests/rustdoc/intra-doc/cross-crate/basic.rs',
-                            'tests/rustdoc/intra-doc/cross-crate/crate.rs',
-                            'tests/rustdoc/intra-doc/cross-crate/hidden.rs',
-                            'tests/rustdoc/intra-doc/cross-crate/macro.rs',
-                            'tests/rustdoc/intra-doc/cross-crate/module.rs',
-                            'tests/rustdoc/intra-doc/cross-crate/submodule-inner.rs',
-                            'tests/rustdoc/intra-doc/cross-crate/submodule-outer.rs',
-                            'tests/rustdoc/intra-doc/cross-crate/traits.rs',
-                            'tests/rustdoc/intra-doc/extern-builtin-type-impl.rs',
-                            'tests/rustdoc/intra-doc/extern-crate-only-used-in-link.rs',
-                            'tests/rustdoc/intra-doc/extern-crate.rs',
-                            'tests/rustdoc/intra-doc/extern-inherent-impl.rs',
-                            'tests/rustdoc/intra-doc/extern-reference-link.rs',
-                            'tests/rustdoc/intra-doc/issue-103463.rs',
-                            'tests/rustdoc/intra-doc/issue-104145.rs',
-                            'tests/rustdoc/intra-doc/issue-66159.rs',
-                            'tests/rustdoc/intra-doc/pub-use.rs',
-                            'tests/rustdoc/intra-doc/reexport-additional-docs.rs',
-                            'tests/rustdoc/issue-18199.rs',
-                            'tests/rustdoc/issue-23106.rs',
-                            'tests/rustdoc/issue-23744.rs',
-                            'tests/rustdoc/issue-25944.rs',
-                            'tests/rustdoc/issue-30252.rs',
-                            'tests/rustdoc/issue-38129.rs',
-                            'tests/rustdoc/issue-40936.rs',
-                            'tests/rustdoc/issue-43153.rs',
-                            'tests/rustdoc/issue-46727.rs',
-                            'tests/rustdoc/issue-48377.rs',
-                            'tests/rustdoc/issue-48414.rs',
-                            'tests/rustdoc/issue-53689.rs',
-                            'tests/rustdoc/issue-54478-demo-allocator.rs',
-                            'tests/rustdoc/issue-57180.rs',
-                            'tests/rustdoc/issue-61592.rs',
-                            'tests/rustdoc/issue-73061-cross-crate-opaque-assoc-type.rs',
-                            'tests/rustdoc/issue-75588.rs',
-                            'tests/rustdoc/issue-85454.rs',
-                            'tests/rustdoc/issue-86620.rs',
-                            'tests/rustdoc-json',
-                            'tests/rustdoc-js-std',
-                            'tests/rustdoc/macro_pub_in_module.rs',
-                            'tests/rustdoc/masked.rs',
-                            'tests/rustdoc/normalize-assoc-item.rs',
-                            'tests/rustdoc/no-stack-overflow-25295.rs',
-                            'tests/rustdoc/primitive-reexport.rs',
-                            'tests/rustdoc/process-termination.rs',
-                            'tests/rustdoc/pub-extern-crate.rs',
-                            'tests/rustdoc/pub-use-extern-macros.rs',
-                            'tests/rustdoc/reexport-check.rs',
-                            'tests/rustdoc/reexport-dep-foreign-fn.rs',
-                            'tests/rustdoc/reexport-doc.rs',
-                            'tests/rustdoc/reexports-priv.rs',
-                            'tests/rustdoc/reexports.rs',
-                            'tests/rustdoc/rustc,-incoherent-impls.rs',
-                            'tests/rustdoc/test_option_check/bar.rs',
-                            'tests/rustdoc/test_option_check/test.rs',
-                            'tests/rustdoc/trait-alias-mention.rs',
-                            'tests/rustdoc/trait-visibility.rs',
                             'tests/rustdoc-ui/cfg-test.rs',
                             'tests/rustdoc-ui/check-cfg-test.rs',
                             'tests/rustdoc-ui/display-output.rs',
@@ -233,28 +133,6 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
                             'tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs',
                             'tests/ui/drop/dynamic-drop.rs',
                             'tests/ui/empty_global_asm.rs',
-                            'tests/ui-fulldeps/deriving-encodable-decodable-box.rs',
-                            'tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs',
-                            'tests/ui-fulldeps/deriving-global.rs',
-                            'tests/ui-fulldeps/deriving-hygiene.rs',
-                            'tests/ui-fulldeps/dropck_tarena_sound_drop.rs',
-                            'tests/ui-fulldeps/empty-struct-braces-derive.rs',
-                            'tests/ui-fulldeps/internal-lints/bad_opt_access.rs',
-                            'tests/ui-fulldeps/internal-lints/bad_opt_access.stderr',
-                            'tests/ui-fulldeps/internal-lints/default_hash_types.rs',
-                            'tests/ui-fulldeps/internal-lints/diagnostics.rs',
-                            'tests/ui-fulldeps/internal-lints/lint_pass_impl_without_macro.rs',
-                            'tests/ui-fulldeps/internal-lints/qualified_ty_ty_ctxt.rs',
-                            'tests/ui-fulldeps/internal-lints/query_stability.rs',
-                            'tests/ui-fulldeps/internal-lints/rustc_pass_by_value.rs',
-                            'tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs',
-                            'tests/ui-fulldeps/issue-14021.rs',
-                            'tests/ui-fulldeps/lint-group-denied-lint-allowed.rs',
-                            'tests/ui-fulldeps/lint-group-forbid-always-trumps-cli.rs',
-                            'tests/ui-fulldeps/lint-pass-macros.rs',
-                            'tests/ui-fulldeps/regions-mock-tcx.rs',
-                            'tests/ui-fulldeps/rustc_encodable_hygiene.rs',
-                            'tests/ui-fulldeps/session-diagnostic/enforce_slug_naming.rs',
                             'tests/ui/functions-closures/fn-help-with-err.rs',
                             'tests/ui/linkage-attr/issue-10755.rs',
                             'tests/ui/macros/restricted-shadowing-legacy.rs',
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v3 7/7] rust: Enable rust oe-selftest.
  2024-01-23 13:16 [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Yash.Shinde
                   ` (4 preceding siblings ...)
  2024-01-23 13:16 ` [PATCH v3 6/7] rust: Remove the test cases whose parent dir is also present in the exclude list Yash.Shinde
@ 2024-01-23 13:16 ` Yash.Shinde
  2024-01-23 20:07 ` [OE-core] [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Richard Purdie
       [not found] ` <17AD12BD124D26C8.31068@lists.openembedded.org>
  7 siblings, 0 replies; 13+ messages in thread
From: Yash.Shinde @ 2024-01-23 13:16 UTC (permalink / raw)
  To: openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa, Yash.Shinde

From: Yash Shinde <Yash.Shinde@windriver.com>

* Enable rust oe-selftest.

* Include the dependent patches for rust oe-selftest in
  meta/recipes-devtools/rust/rust-source.inc

* Disable rust oe-selftest for mips32 target (Rust upstream has classified it into tier 3 target,
  for which the Rust project does not build or test automatically) as it is unstable with rust tests.
  https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-3

* The testing is done on arm32, arm64, mips64, x86 and  x86_64 targets.

Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
---
 meta/lib/oeqa/selftest/cases/rust.py       | 7 ++++++-
 meta/recipes-devtools/rust/rust-source.inc | 4 ++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py
index 0ec2e422f9..b451d00b37 100644
--- a/meta/lib/oeqa/selftest/cases/rust.py
+++ b/meta/lib/oeqa/selftest/cases/rust.py
@@ -40,7 +40,12 @@ def parse_results(filename):
 class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
     def test_rust(self, *args, **kwargs):
         # Disable Rust Oe-selftest
-        self.skipTest("The Rust Oe-selftest is disabled.")
+        #self.skipTest("The Rust Oe-selftest is disabled.")
+
+        # Skip mips32 target since it is unstable with rust tests
+        machine = get_bb_var('MACHINE')
+        if machine == "qemumips":
+            self.skipTest("The mips32 target is skipped for Rust Oe-selftest.")
 
         # build remote-test-server before image build
         recipe = "rust"
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index 83a0dbc15f..e02829e6b3 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -10,6 +10,10 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n
             file://0004-musl-Define-O_LARGEFILE-for-riscv32.patch;patchdir=${RUSTSRC} \
             file://0005-musl-Define-SOCK_SEQPACKET-in-common-place.patch;patchdir=${RUSTSRC} \
             file://0001-Revert-Map-source-absolute-paths-to-OUT_DIR-as-relat.patch;patchdir=${RUSTSRC} \
+            file://cargo-path.patch;patchdir=${RUSTSRC} \
+            file://custom-target-cfg.patch;patchdir=${RUSTSRC} \
+            file://rustc-bootstrap.patch;patchdir=${RUSTSRC} \
+            file://target-build-value.patch;patchdir=${RUSTSRC} \
 "
 SRC_URI[rust.sha256sum] = "b98c09d968529212fb29eec7d6d3e9bdaa869810679b7fb86a1ca69469d75f5e"
 
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [OE-core] [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir.
  2024-01-23 13:16 [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Yash.Shinde
                   ` (5 preceding siblings ...)
  2024-01-23 13:16 ` [PATCH v3 7/7] rust: Enable rust oe-selftest Yash.Shinde
@ 2024-01-23 20:07 ` Richard Purdie
  2024-01-24  6:48   ` Yash Shinde
       [not found] ` <17AD12BD124D26C8.31068@lists.openembedded.org>
  7 siblings, 1 reply; 13+ messages in thread
From: Richard Purdie @ 2024-01-23 20:07 UTC (permalink / raw)
  To: Yash.Shinde, openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa

On Tue, 2024-01-23 at 05:16 -0800, Shinde, Yash via
lists.openembedded.org wrote:
> From: Yash Shinde <Yash.Shinde@windriver.com>
> 
>     Fixes: Exception: no cargo executable found at
>            `${B}/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo`
> 
>     Fix the cargo binary path error on oe-selftest and path set to rust-snapshot dir.
> 
>     Patch sent to upstream- https://github.com/rust-lang/rust/pull/120125
> 
> Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
> ---
>  .../rust/files/cargo-path.patch               | 37 +++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 meta/recipes-devtools/rust/files/cargo-path.patch

Unlike earlier versions of this series, there were a lot of failures:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6482

Basically every machine except qemumips failed on the toolchain tests.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [OE-core] [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir.
       [not found] ` <17AD12BD124D26C8.31068@lists.openembedded.org>
@ 2024-01-23 21:17   ` Richard Purdie
  2024-01-24  6:50     ` Yash Shinde
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Purdie @ 2024-01-23 21:17 UTC (permalink / raw)
  To: Yash.Shinde, openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa

On Tue, 2024-01-23 at 20:07 +0000, Richard Purdie via
lists.openembedded.org wrote:
> On Tue, 2024-01-23 at 05:16 -0800, Shinde, Yash via
> lists.openembedded.org wrote:
> > From: Yash Shinde <Yash.Shinde@windriver.com>
> > 
> >     Fixes: Exception: no cargo executable found at
> >            `${B}/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo`
> > 
> >     Fix the cargo binary path error on oe-selftest and path set to rust-snapshot dir.
> > 
> >     Patch sent to upstream- https://github.com/rust-lang/rust/pull/120125
> > 
> > Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
> > ---
> >  .../rust/files/cargo-path.patch               | 37 +++++++++++++++++++
> >  1 file changed, 37 insertions(+)
> >  create mode 100644 meta/recipes-devtools/rust/files/cargo-path.patch
> 
> Unlike earlier versions of this series, there were a lot of failures:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6482
> 
> Basically every machine except qemumips failed on the toolchain tests.

I also meant to mention, we need to improve the test output when it
fails. It is currently near useless :(

Cheers,

Richard


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [OE-core] [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir.
  2024-01-23 20:07 ` [OE-core] [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Richard Purdie
@ 2024-01-24  6:48   ` Yash Shinde
  0 siblings, 0 replies; 13+ messages in thread
From: Yash Shinde @ 2024-01-24  6:48 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa


On 24-01-2024 01:37, Richard Purdie wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Tue, 2024-01-23 at 05:16 -0800, Shinde, Yash via
> lists.openembedded.org wrote:
>> From: Yash Shinde <Yash.Shinde@windriver.com>
>>
>>      Fixes: Exception: no cargo executable found at
>>             `${B}/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo`
>>
>>      Fix the cargo binary path error on oe-selftest and path set to rust-snapshot dir.
>>
>>      Patch sent to upstream- https://github.com/rust-lang/rust/pull/120125
>>
>> Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
>> ---
>>   .../rust/files/cargo-path.patch               | 37 +++++++++++++++++++
>>   1 file changed, 37 insertions(+)
>>   create mode 100644 meta/recipes-devtools/rust/files/cargo-path.patch
> Unlike earlier versions of this series, there were a lot of failures:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6482
>
> Basically every machine except qemumips failed on the toolchain tests.

I investigated and found the cause of the failures.

Actually, some test cases were additionally missed while removing them 
from exclude list when
making changes for "rust: Remove the test cases whose parent dir is also 
present in the exclude list" patch.
(Maybe, the automated tool used to remove tests didn't work properly...)

I fixed those and after successful tests, I will send the patch.

Regards,
Yash

>
> Cheers,
>
> Richard


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [OE-core] [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir.
  2024-01-23 21:17   ` Richard Purdie
@ 2024-01-24  6:50     ` Yash Shinde
  2024-01-24 10:21       ` Richard Purdie
  0 siblings, 1 reply; 13+ messages in thread
From: Yash Shinde @ 2024-01-24  6:50 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa

[-- Attachment #1: Type: text/plain, Size: 3414 bytes --]


On 24-01-2024 02:47, Richard Purdie wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Tue, 2024-01-23 at 20:07 +0000, Richard Purdie via
> lists.openembedded.org wrote:
>> On Tue, 2024-01-23 at 05:16 -0800, Shinde, Yash via
>> lists.openembedded.org wrote:
>>> From: Yash Shinde<Yash.Shinde@windriver.com>
>>>
>>>      Fixes: Exception: no cargo executable found at
>>>             `${B}/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo`
>>>
>>>      Fix the cargo binary path error on oe-selftest and path set to rust-snapshot dir.
>>>
>>>      Patch sent to upstream-https://github.com/rust-lang/rust/pull/120125
>>>
>>> Signed-off-by: Yash Shinde<Yash.Shinde@windriver.com>
>>> ---
>>>   .../rust/files/cargo-path.patch               | 37 +++++++++++++++++++
>>>   1 file changed, 37 insertions(+)
>>>   create mode 100644 meta/recipes-devtools/rust/files/cargo-path.patch
>> Unlike earlier versions of this series, there were a lot of failures:
>>
>> https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6482
>>
>> Basically every machine except qemumips failed on the toolchain tests.
> I also meant to mention, we need to improve the test output when it
> fails. It is currently near useless :(

The test output log is redirected to '${B}/rustc-1.74.1-src/summary.txt' 
file which has
test results and error logs for failed test cases, if any.

I assume you are asking for more details in the cmd window of oe-selftest?

$ oe-selftest -r rust

cmdline output:
/
/

/2024-01-23 20:08:39,227 - oe-selftest - INFO - Changing cwd to 
/home/poky/build
2024-01-23 20:08:39,228 - oe-selftest - INFO - Adding layer libraries:
2024-01-23 20:08:39,228 - oe-selftest - INFO - /home/poky/meta/lib
2024-01-23 20:08:39,228 - oe-selftest - INFO - /home/poky/meta-yocto-bsp/lib
2024-01-23 20:08:39,228 - oe-selftest - INFO - /home/poky/meta-selftest/lib
2024-01-23 20:08:39,229 - oe-selftest - INFO - Checking base 
configuration is valid/parsable
2024-01-23 20:08:40,757 - oe-selftest - INFO - Adding: "include 
selftest.inc" in /home/poky/build-st/conf/local.conf
2024-01-23 20:08:40,757 - oe-selftest - INFO - Adding: "include 
bblayers.inc" in bblayers.conf
2024-01-23 20:08:40,758 - oe-selftest - INFO - test_rust 
(rust.RustSelfTestSystemEmulated)
2024-01-23 21:22:50,600 - oe-selftest - INFO -  ... ok
2024-01-23 21:22:50,622 - oe-selftest - INFO - 
----------------------------------------------------------------------
2024-01-23 21:22:50,622 - oe-selftest - INFO - Ran 1 test in 4450.264s
2024-01-23 21:22:50,622 - oe-selftest - INFO - OK
2024-01-23 21:23:08,292 - oe-selftest - INFO - RESULTS:
2024-01-23 21:23:08,292 - oe-selftest - INFO - RESULTS - 
rust.RustSelfTestSystemEmulated.test_rust: PASSED (4449.86s)
2024-01-23 21:23:08,477 - oe-selftest - INFO - SUMMARY:
2024-01-23 21:23:08,478 - oe-selftest - INFO - oe-selftest () - Ran 1 
test in 4450.264s
2024-01-23 21:23:08,478 - oe-selftest - INFO - oe-selftest - OK - All 
required tests passed (successes=1, skipped=0, failures=0, errors=0)
/
Currently, it shows above info which is similar to other toolchain 
oe-selftests.
Let me know how the output log should look like?


Regards,
Yash

> Cheers,
>
> Richard

[-- Attachment #2: Type: text/html, Size: 5123 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [OE-core] [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir.
  2024-01-24  6:50     ` Yash Shinde
@ 2024-01-24 10:21       ` Richard Purdie
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Purdie @ 2024-01-24 10:21 UTC (permalink / raw)
  To: Yash Shinde, openembedded-core
  Cc: Randy.MacLeod, Umesh.Kallapa, Naveen.Gowda, Sundeep.Kokkonda,
	Shivaprasad.Moodalappa

On Wed, 2024-01-24 at 12:20 +0530, Yash Shinde wrote:
>  On 24-01-2024 02:47, Richard Purdie wrote:
>  CAUTION: This email comes from a non Wind River email account!
> > Do not click links or open attachments unless you recognize the sender and know the content is safe.
> > 
> > On Tue, 2024-01-23 at 20:07 +0000, Richard Purdie via
> > lists.openembedded.org wrote:
> >  
> > > On Tue, 2024-01-23 at 05:16 -0800, Shinde, Yash via
> > > lists.openembedded.org wrote:
> > >  
> > > > 
> > > > From: Yash Shinde <Yash.Shinde@windriver.com>
> > > > 
> > > >     Fixes: Exception: no cargo executable found at
> > > >            `${B}/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo`
> > > > 
> > > >     Fix the cargo binary path error on oe-selftest and path set to rust-snapshot dir.
> > > > 
> > > >     Patch sent to upstream- https://github.com/rust-lang/rust/pull/120125
> > > > 
> > > > Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
> > > > ---
> > > >  .../rust/files/cargo-path.patch               | 37 +++++++++++++++++++
> > > >  1 file changed, 37 insertions(+)
> > > >  create mode 100644 meta/recipes-devtools/rust/files/cargo-path.patch
> > > >  
> > > Unlike earlier versions of this series, there were a lot of failures:
> > > 
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/6482
> > > 
> > > Basically every machine except qemumips failed on the toolchain tests.
> > >  
> > I also meant to mention, we need to improve the test output when it
> > fails. It is currently near useless :(
> >  
> 
> The test output log is redirected to '${B}/rustc-1.74.1-src/summary.txt' file which has 
>  test results and error logs for failed test cases, if any.
>  
> 
>  I assume you are asking for more details in the cmd window of oe-selftest?
>  
>  $ oe-selftest -r rust
>   cmdline output:
>  
> 2024-01-23 20:08:39,227 - oe-selftest - INFO - Changing cwd to /home/poky/build
>  2024-01-23 20:08:39,228 - oe-selftest - INFO - Adding layer libraries:
>  2024-01-23 20:08:39,228 - oe-selftest - INFO -  /home/poky/meta/lib
>  2024-01-23 20:08:39,228 - oe-selftest - INFO -  /home/poky/meta-yocto-bsp/lib
>  2024-01-23 20:08:39,228 - oe-selftest - INFO -  /home/poky/meta-selftest/lib
>  2024-01-23 20:08:39,229 - oe-selftest - INFO - Checking base configuration is valid/parsable
>  2024-01-23 20:08:40,757 - oe-selftest - INFO - Adding: "include selftest.inc" in /home/poky/build-st/conf/local.conf
>  2024-01-23 20:08:40,757 - oe-selftest - INFO - Adding: "include bblayers.inc" in bblayers.conf
>  2024-01-23 20:08:40,758 - oe-selftest - INFO - test_rust (rust.RustSelfTestSystemEmulated)
>  2024-01-23 21:22:50,600 - oe-selftest - INFO -  ... ok
>  2024-01-23 21:22:50,622 - oe-selftest - INFO - ----------------------------------------------------------------------
>  2024-01-23 21:22:50,622 - oe-selftest - INFO - Ran 1 test in 4450.264s
>  2024-01-23 21:22:50,622 - oe-selftest - INFO - OK
>  2024-01-23 21:23:08,292 - oe-selftest - INFO - RESULTS:
>  2024-01-23 21:23:08,292 - oe-selftest - INFO - RESULTS - rust.RustSelfTestSystemEmulated.test_rust: PASSED (4449.86s)
>  2024-01-23 21:23:08,477 - oe-selftest - INFO - SUMMARY:
>  2024-01-23 21:23:08,478 - oe-selftest - INFO - oe-selftest () - Ran 1 test in 4450.264s
>  2024-01-23 21:23:08,478 - oe-selftest - INFO - oe-selftest - OK - All required tests passed (successes=1, skipped=0, failures=0, errors=0)
>  
> 
> 
> 
>  Currently, it shows above info which is similar to other toolchain oe-selftests.
>  Let me know how the output log should look like?
>  

When it passes, this output is fine, we don't need to know the details.
The issue is that when it fails, we can't see why it fails since the
output is buried in summary.txt.

I'm therefore asking when it fails, we see the output in summary.txt
but only when it fails.

I think if you remove the redirection to a file it should work since
selftest only displays the output upon failure.

Cheers,

RIchard


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-01-24 10:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-23 13:16 [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Yash.Shinde
2024-01-23 13:16 ` [PATCH v3 2/7] rust: detect user-specified custom targets in compiletest Yash.Shinde
2024-01-23 13:16 ` [PATCH v3 3/7] rust: Enable RUSTC_BOOTSTRAP to use nightly features during rust oe-selftest Yash.Shinde
2024-01-23 13:16 ` [PATCH v3 4/7] rust: Fix assertion failure error on oe-selftest Yash.Shinde
2024-01-23 13:16 ` [PATCH v3 5/7] rust: Add new tests in the exclude list for rust oe-selftest Yash.Shinde
2024-01-23 13:16 ` [PATCH v3 6/7] rust: Remove the test cases whose parent dir is also present in the exclude list Yash.Shinde
2024-01-23 13:16 ` [PATCH v3 7/7] rust: Enable rust oe-selftest Yash.Shinde
2024-01-23 20:07 ` [OE-core] [PATCH v3 1/7] rust: Fetch cargo from rust-snapshot dir Richard Purdie
2024-01-24  6:48   ` Yash Shinde
     [not found] ` <17AD12BD124D26C8.31068@lists.openembedded.org>
2024-01-23 21:17   ` Richard Purdie
2024-01-24  6:50     ` Yash Shinde
2024-01-24 10:21       ` Richard Purdie
  -- strict thread matches above, loose matches on Subject: below --
2024-01-23  8:10 Yash.Shinde
2024-01-23  8:10 ` [PATCH v3 4/7] rust: Fix assertion failure error on oe-selftest Yash.Shinde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox