sonic-linux-kernel icon indicating copy to clipboard operation
sonic-linux-kernel copied to clipboard

Fix manage-config option comparison issue

Open kuanyu99 opened this issue 4 years ago • 4 comments

  • What I did

To make manage-config able to compare string type kernel options.

  • How I did it

Use sed to remove the double quote at prefix and suffix of the option value if it exists.

  • How to verify it

Take CONFIG_MODULE_SIG_KEY="debian/certs/test.pem" in kconfig-inclusions for example. Originally, if I give a kernel options with a double quoted string type value, it will return comparison failure.

Checking added kernel options...
Option CONFIG_MODULE_SIG_KEY should be set to ["debian/certs/test.pem"] instead of [debian/certs/test.pem]

After modification, it can pass the verification.

kuanyu99 avatar Dec 17 '20 04:12 kuanyu99

are we expecting to have quote in the kconfig? why do you need to pass the quote?

lguohan avatar Dec 17 '20 04:12 lguohan

are we expecting to have quote in the kconfig? why do you need to pass the quote?

If there is no quote between the string, it will be come like this.

Checking added kernel options...
Option CONFIG_MODULE_SIG_KEY should be set to [debian/certs/test.pem] instead of []

The debian/build/build_amd64_none_amd64/.config can't correctly generated. It will become like CONFIG_MODULE_SIG_KEY="". Seems the slash inside the string mess up the script if no double quote it.

kuanyu99 avatar Dec 17 '20 06:12 kuanyu99

If you added the example from the merge/pull request description to the commit message, that would be awesome.

paulmenzel avatar Dec 17 '20 16:12 paulmenzel

/easycla

jarias-lfx avatar Jul 19 '23 19:07 jarias-lfx