Skip to contentSkip to conversation

selftests: rust: config: add trailing newline

PATCH In review Anders Roxell 3 participants 6 messages Aug 2, 2024 – Aug 11, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 selftests: rust: config: add trailing newline

If adding multiple config files to the merge_config.sh script and rust/config is the fist one, then the last config fragment in this file and the first config fragment in the second file wont be set, since there isn't a newline in this file, so those two fragements end up at the same row like:
CONFIG_SAMPLE_RUST_PRINT=mCONFIG_FRAGMENT=y

And non of those will be enabled when running 'olddefconfig' after.

Fixing the issue by adding a newline to the file.

---
 tools/testing/selftests/rust/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/rust/config +1 -1
index b4002acd40bc..fa06cebae232 100644
@@ -2,4 +2,4 @@ CONFIG_RUST=y
 CONFIG_SAMPLES=y
 CONFIG_SAMPLES_RUST=y
 CONFIG_SAMPLE_RUST_MINIMAL=m
-CONFIG_SAMPLE_RUST_PRINT=m
\ No newline at end of file
+CONFIG_SAMPLE_RUST_PRINT=m
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 selftests: rust: config: disable GCC_PLUGINS

CONFIG_RUST depends on !CONFIG_GCC_PLUGINS. Disable CONFIG_GCC_PLUGINS in rust/config file to make sure it doesn't get enabled.

---
 tools/testing/selftests/rust/config | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/rust/config +1 -0
index fa06cebae232..5f942b5c8c17 100644
@@ -1,3 +1,4 @@
+# CONFIG_GCC_PLUGINS is not set
 CONFIG_RUST=y
 CONFIG_SAMPLES=y
 CONFIG_SAMPLES_RUST=y
Signature · 1 line
2.43.0
maintainer
#3 lore raw

Re: [PATCH 2/2] selftests: rust: config: disable GCC_PLUGINS

Quoted 9 lines · Miguel Ojeda
Quoted 5 lines · Anders Roxell

CONFIG_RUST depends on !CONFIG_GCC_PLUGINS. Disable CONFIG_GCC_PLUGINS in rust/config file to make sure it doesn't get enabled.

Quoted 7 lines

When https://lore.kernel.org/rust-for-linux/[email protected]/
goes in, this could also be relaxed.

Thanks!

Cheers,
Miguel

Applied to linux-kselftest next for Linux 6.12-rc1.

thanks,
-- Shuah

Acked-by on v1 1/2
#4 lore raw
In reply to Anders Roxell
Quoted 11 lines · Anders Roxell

If adding multiple config files to the merge_config.sh script and rust/config is the fist one, then the last config fragment in this file and the first config fragment in the second file wont be set, since there isn't a newline in this file, so those two fragements end up at the same row like:
CONFIG_SAMPLE_RUST_PRINT=mCONFIG_FRAGMENT=y

And non of those will be enabled when running 'olddefconfig' after.

Fixing the issue by adding a newline to the file.

Could merge_config.sh be improved too?

Shuah, if you plan to pick this:

Thanks!

Cheers,
Miguel

maintainer
#5 lore raw
Quoted 15 lines · Miguel Ojeda
Quoted 11 lines · Anders Roxell

If adding multiple config files to the merge_config.sh script and rust/config is the fist one, then the last config fragment in this file and the first config fragment in the second file wont be set, since there isn't a newline in this file, so those two fragements end up at the same row like:
CONFIG_SAMPLE_RUST_PRINT=mCONFIG_FRAGMENT=y

And non of those will be enabled when running 'olddefconfig' after.

Fixing the issue by adding a newline to the file.

Could merge_config.sh be improved too?

Quoted 8 lines

Shuah, if you plan to pick this:

Thanks!

Cheers,
Miguel

Applied to linux-kselftest next for Linux 6.12-rc1.

thanks,
-- Shuah