Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
Dear reviewers, Please, have a look at v3 series. TIA! Best regards, Eugeniu. On Wed, May 16, 2018 at 01:27:02PM +0200, Eugeniu Rosca wrote: > Hi Petr, Masahiro, Simon, > > On Wed, May 16, 2018 at 10:24:41AM +0200, Eugeniu Rosca wrote: > > Hi Petr, > > > > On Wed, May 16, 2018 at 07:09:05AM +0200, Petr Vorel wrote: > > > Hi Eugeniu, > > > > > > > 2018-05-13 2:13 GMT+09:00 Eugeniu Rosca: > > > > > Align Kconfig to Linux 4.17-rc4 with minimal impact on non-kconfig > > > > > files. > > > > > > > > Previous Kconfig sync was done by commit bf7ab1e70fd762 ("kconfig: > > > > > re-sync with Linux 4.10") and it achieved almost perfect alignment > > > > > with > > > > > a few (intended) exceptions, caused by below U-boot commits: > > > > > > Maybe it's again something wrong with my patch, but it broke 2 builds in > > > travis: > > > https://travis-ci.org/pevik/u-boot/builds/379302139 > > > > > > It's this branch (make testconfig works on it): > > > https://github.com/pevik/u-boot/commits/eugeniu/kconfig.v2.test > > > > Our branches match, so it's not the root cause this time. > > I will start looking into this. Thanks for reporting. > > I hope we provide a flawless Kconfig update to the users. > > What I see both in [1] and [2] is failure of `ut dm fdt_translation` > unit test in sandbox/sandbox_flattree environments. I can reproduce > it myself with the delivered patch-set (see [3]), but cannot reproduce > it on u-boot/master. > > Doing basic bisecting, I can easily figure out that the issue is > introduced by the last patch in the series, specifically commit > ("sandbox: dts: test: Fix wrong aliases property names"). The patch > fixing the issue is shown in [4]. The problem is no more reproduced > afterwards, as seen in [5]. > > Please, feedback if you are fine with this level of analysis and the > fix itself or maybe I should go deeper with investigation. > > Anyway, based on above, the problem seems to be unrelated to the > Kconfig/DTC update. Special thanks to Petr for reporting it. > > Best regards, > Eugeniu. > > [1] https://travis-ci.org/pevik/u-boot/jobs/379302204 > [2] https://travis-ci.org/pevik/u-boot/jobs/379302206 > > [3] Reproducing the issue seen in [1] and [2] in sandbox: > $ ./u-boot -d arch/sandbox/dts/test.dtb > > U-Boot 2018.05-00230-ge8e03803af5b (May 16 2018 - 13:09:51 +0200) > > Model: sandbox > DRAM: 128 MiB > MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD) > In:serial > Out: vidconsole > Err: vidconsole > Model: sandbox > SCSI: Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: > eth@10004000 > IDE: Bus 0: not available > Hit any key to stop autoboot: 0 > => ut dm fdt_translation > Test: dm_test_fdt_translation: test-fdt.c > test/dm/test-fdt.c:444, dm_test_fdt_translation(): 0 == > uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, 1, ): Expected 0, got -19 > Test: dm_test_fdt_translation: test-fdt.c (flat tree) > test/dm/test-fdt.c:444, dm_test_fdt_translation(): 0 == > uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, 1, ): Expected 0, got -19 > Failures: 2 > => > > [4] Patch fixing [3]. > diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c > index 8196844e89a7..66d0df5629a2 100644 > --- a/test/dm/test-fdt.c > +++ b/test/dm/test-fdt.c > @@ -425,7 +425,7 @@ static const struct udevice_id fdt_dummy_ids[] = { > }; > > UCLASS_DRIVER(fdt_dummy) = { > - .name = "fdt_dummy", > + .name = "fdt-dummy", > .id = UCLASS_TEST_DUMMY, > .flags = DM_UC_FLAG_SEQ_ALIAS, > }; > > [5] The issue is healed after applying [4]: > $ ./u-boot -d arch/sandbox/dts/test.dtb > > U-Boot 2018.05-00230-ge8e03803af5b-dirty (May 16 2018 - 13:15:13 +0200) > > Model: sandbox > DRAM: 128 MiB > MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD) > In:serial > Out: vidconsole > Err: vidconsole > Model: sandbox > SCSI: Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: > eth@10004000 > IDE: Bus 0: not available > Hit any key to stop autoboot: 0 > => ut dm fdt_translation > Test: dm_test_fdt_translation: test-fdt.c > Test: dm_test_fdt_translation: test-fdt.c (flat tree) > Failures: 0 > => ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
Hi Petr, Masahiro, Simon, On Wed, May 16, 2018 at 10:24:41AM +0200, Eugeniu Rosca wrote: > Hi Petr, > > On Wed, May 16, 2018 at 07:09:05AM +0200, Petr Vorel wrote: > > Hi Eugeniu, > > > > > 2018-05-13 2:13 GMT+09:00 Eugeniu Rosca: > > > > Align Kconfig to Linux 4.17-rc4 with minimal impact on non-kconfig > > > > files. > > > > > > Previous Kconfig sync was done by commit bf7ab1e70fd762 ("kconfig: > > > > re-sync with Linux 4.10") and it achieved almost perfect alignment with > > > > a few (intended) exceptions, caused by below U-boot commits: > > > > Maybe it's again something wrong with my patch, but it broke 2 builds in > > travis: > > https://travis-ci.org/pevik/u-boot/builds/379302139 > > > > It's this branch (make testconfig works on it): > > https://github.com/pevik/u-boot/commits/eugeniu/kconfig.v2.test > > Our branches match, so it's not the root cause this time. > I will start looking into this. Thanks for reporting. > I hope we provide a flawless Kconfig update to the users. What I see both in [1] and [2] is failure of `ut dm fdt_translation` unit test in sandbox/sandbox_flattree environments. I can reproduce it myself with the delivered patch-set (see [3]), but cannot reproduce it on u-boot/master. Doing basic bisecting, I can easily figure out that the issue is introduced by the last patch in the series, specifically commit ("sandbox: dts: test: Fix wrong aliases property names"). The patch fixing the issue is shown in [4]. The problem is no more reproduced afterwards, as seen in [5]. Please, feedback if you are fine with this level of analysis and the fix itself or maybe I should go deeper with investigation. Anyway, based on above, the problem seems to be unrelated to the Kconfig/DTC update. Special thanks to Petr for reporting it. Best regards, Eugeniu. [1] https://travis-ci.org/pevik/u-boot/jobs/379302204 [2] https://travis-ci.org/pevik/u-boot/jobs/379302206 [3] Reproducing the issue seen in [1] and [2] in sandbox: $ ./u-boot -d arch/sandbox/dts/test.dtb U-Boot 2018.05-00230-ge8e03803af5b (May 16 2018 - 13:09:51 +0200) Model: sandbox DRAM: 128 MiB MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD) In:serial Out: vidconsole Err: vidconsole Model: sandbox SCSI: Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000 IDE: Bus 0: not available Hit any key to stop autoboot: 0 => ut dm fdt_translation Test: dm_test_fdt_translation: test-fdt.c test/dm/test-fdt.c:444, dm_test_fdt_translation(): 0 == uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, 1, ): Expected 0, got -19 Test: dm_test_fdt_translation: test-fdt.c (flat tree) test/dm/test-fdt.c:444, dm_test_fdt_translation(): 0 == uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, 1, ): Expected 0, got -19 Failures: 2 => [4] Patch fixing [3]. diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index 8196844e89a7..66d0df5629a2 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -425,7 +425,7 @@ static const struct udevice_id fdt_dummy_ids[] = { }; UCLASS_DRIVER(fdt_dummy) = { - .name = "fdt_dummy", + .name = "fdt-dummy", .id = UCLASS_TEST_DUMMY, .flags = DM_UC_FLAG_SEQ_ALIAS, }; [5] The issue is healed after applying [4]: $ ./u-boot -d arch/sandbox/dts/test.dtb U-Boot 2018.05-00230-ge8e03803af5b-dirty (May 16 2018 - 13:15:13 +0200) Model: sandbox DRAM: 128 MiB MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD) In:serial Out: vidconsole Err: vidconsole Model: sandbox SCSI: Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000 IDE: Bus 0: not available Hit any key to stop autoboot: 0 => ut dm fdt_translation Test: dm_test_fdt_translation: test-fdt.c Test: dm_test_fdt_translation: test-fdt.c (flat tree) Failures: 0 => ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
Hi Petr, On Wed, May 16, 2018 at 07:09:05AM +0200, Petr Vorel wrote: > Hi Eugeniu, > > > 2018-05-13 2:13 GMT+09:00 Eugeniu Rosca: > > > Align Kconfig to Linux 4.17-rc4 with minimal impact on non-kconfig files. > > > > Previous Kconfig sync was done by commit bf7ab1e70fd762 ("kconfig: > > > re-sync with Linux 4.10") and it achieved almost perfect alignment with > > > a few (intended) exceptions, caused by below U-boot commits: > > Maybe it's again something wrong with my patch, but it broke 2 builds in > travis: > https://travis-ci.org/pevik/u-boot/builds/379302139 > > It's this branch (make testconfig works on it): > https://github.com/pevik/u-boot/commits/eugeniu/kconfig.v2.test Our branches match, so it's not the root cause this time. I will start looking into this. Thanks for reporting. I hope we provide a flawless Kconfig update to the users. > Kind regards, > Petr Best regards, Eugeniu. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
Hi Eugeniu, > 2018-05-13 2:13 GMT+09:00 Eugeniu Rosca: > > Align Kconfig to Linux 4.17-rc4 with minimal impact on non-kconfig files. > > Previous Kconfig sync was done by commit bf7ab1e70fd762 ("kconfig: > > re-sync with Linux 4.10") and it achieved almost perfect alignment with > > a few (intended) exceptions, caused by below U-boot commits: Maybe it's again something wrong with my patch, but it broke 2 builds in travis: https://travis-ci.org/pevik/u-boot/builds/379302139 It's this branch (make testconfig works on it): https://github.com/pevik/u-boot/commits/eugeniu/kconfig.v2.test Kind regards, Petr ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
2018-05-13 2:13 GMT+09:00 Eugeniu Rosca: > Align Kconfig to Linux 4.17-rc4 with minimal impact on non-kconfig files. > > Previous Kconfig sync was done by commit bf7ab1e70fd762 ("kconfig: > re-sync with Linux 4.10") and it achieved almost perfect alignment with > a few (intended) exceptions, caused by below U-boot commits: > > [A] v2015.04 5f9eb2207500 ("kbuild: remove scripts/multiconfig.sh") > [B] v2015.07 20c20826efab ("Kconfig: Enable usage of escape char '\' in > string values") > [C] v2016.01 da58dec86616 ("Various Makefiles: Add SPDX-License-Identifier > tags") > [D] v2016.03 5b8031ccb4ed ("Add more SPDX-License-Identifier tags") > [E] v2016.03 192bc6948b02 ("Fix GCC format-security errors and convert > sprintfs.") > > Here is the list of Kconfig commits which followed the v4.10 alignment: > > [F] v2018.01 0931ed3c0d0f ("kconfig/symbol.c: use correct pointer type > argument for sizeof") > [G] v2018.03 1414e09b4f25 ("kconfig: revert change that was not needed for > -Wformat-security") > [H] v2018.05 83d290c56fab ("SPDX: Convert all of our single license tags to > Linux Kernel style") > > Commit [F] was subsequently applied to Linux kernel as commit [I] > with the same patch id, so it won't contribute to further misalignment. > > [I] v4.15-rc1 88127dae6ed9 ("kconfig/symbol.c: use correct pointer type > argument for sizeof") > > Commit [G] is a Kconfig-specific revert of commit [E]. > Commit [H] relocated and reformatted the license doing no functional change. > > In summary, the only functional change that makes U-boot Kconfig > diverge from Linux Kconfig is commit [B]. After a brief analysis, > the purpose of [B] seems to be placing "\n" literals in string symbols > like CONFIG_AUTOBOOT_PROMPT="autoboot in %d seconds\n" in order to pass > them directly to printf and expect correct output at runtime. Currently, > Linux doesn't seem to have this requirement, so for the moment [B] looks > like a U-boot specific feature/fix. From point of view of further Kconfig > alignment and backporting efforts, it is highly desired that commits > like [B] are propagated to Linux and any Kconfig fixes/features are > contributed to Linux kernel first. This specific Kconfig re-sync just > keeps [B] in place. > > Contrary to 4.10 Kconfig re-sync (which achieves zero non-kconfig > changes), 4.17-rc4 re-sync does some amount of updates in Kbuild > (striving to keep them at minimum), due to a number of reasons: > * Kbuild is affected by the removal of Kconfig "*shipped" files and now > requires flex and bison pre-installed on the host. > * PYTHON{2,3} variables are defined in top-level Makefile as > prerequisite for running the newly developed Kconfig unit tests. > * silentoldconfig becomes an "internal implementation detail" deprecated > for external use, being renamed to syncconfig. > > The exact non-kconfig files touched by this commit are: > > $ git show --format="" --stat -- ':!scripts/kconfig' > .gitignore | 2 ++ > Makefile | 9 +++-- > scripts/Makefile.build | 11 +++ > scripts/Makefile.lib | 41 - > > The imported Linux commits touching the above files are: > > c054be10ffdbd5 ("remove gperf left-overs from build system") > 73a4f6dbe70a1b ("kbuild: add LEX and YACC variables") > 033dba2ec06c47 ("kbuild: prepare to remove C files pre-generated by flex > and bison") > eea199b445f64c ("kbuild: remove unnecessary LEX_PREFIX and YACC_PREFIX") > e71de5ee08dcb0 ("kbuild: remove remaining use of undefined YACC_PREFIX") > d59fbbd09d5d6b ("kbuild: replace hardcoded bison in cmd_bison_h with > $(YACC)") > 911a91c39cabcb H ("kconfig: rename silentoldconfig to syncconfig") > 59889300274569 (".gitignore: move *.lex.c *.tab.[ch] patterns to the > top-level .gitignore") > 9a8dfb394c0467 ("kbuild: clean up *.lex.c and *.tab.[ch] patterns from > top-level Makefile") > 833e622459432e H ("genksyms: generate lexer and parser during build instead > of shipping") > b23d1a241f4eb4 H ("kbuild: add %.lex.c and %.tab.[ch] to 'targets' > automatically") > e9781b52d4e0e3 H ("kbuild: add PYTHON2 and PYTHON3 variables") > > The commits marked with 'H' are assessed as "hard" (build will fail) > prerequisites and the rest of them are assessed as "soft" prerequisites > for the re-sync. In spite of relatively high number of non-H commits, > they belong to this Kconfig update topic-wise and decrease the number of > cherry pick conflicts for many commits in this series. Additional effort > can be put in eliminating the soft prerequisites, if really needed. > > The commits which contributed to this Kconfig re-sync are listed below. > Whenever a conflict resolution has been performed (mostly by hand, but > sometimes automatically by git), it is revealed by the '!' sign in the > second column, which means a patch id mismatch between Linux and U-boot > commits: > > 9be3213b14d44f ("gconfig: remove misleading
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
Hi Eugeniu, Masahiro, > > So, it seems like all the trailing white-space from above files > > disappeared on your branch, after applying the patches from the > > email client (who did this?...). > > I didn't expect that trailing white-space to be of any value for the > > test results, but it turns out it is! With the whitespace removed, I can > > also reproduce the failures of "make testconfig". > Right. > Whitespaces are precious in the expected_stdout files. > Do not rip them off. > > I am not familiar with pytest, but, based on what we see here, it looks > > like every single character stored in *xpected_stdout files (including > > whitespace at the end of lines) matters for the test to pass. > > I wonder if Kconfig could avoid printing whitespace in command line > > user dialogs. Then maybe those space characters could be removed from > > the "*xpected_stdout" files. BTW this topic is more for linux-kbuild, than u-boot. > 'make config' display a space at the end of line > when prompting user input. > This makes the input readable, like follows: > * > * Linux/x86 4.17.0-rc4 Kernel Configuration > * > 64-bit kernel (64BIT) [Y/n/?] y > * > * General setup > * > Cross-compiler tool prefix (CROSS_COMPILE) [] > Compile also drivers which will not load (COMPILE_TEST) [N/y/?] y > I think you are suggesting to remove a space, like follows: > * > * Linux/x86 4.17.0-rc4 Kernel Configuration > * > 64-bit kernel (64BIT) [Y/n/?]y > * > * General setup > * > Cross-compiler tool prefix (CROSS_COMPILE) [] > Compile also drivers which will not load (COMPILE_TEST) [N/y/?]y > I believe we should not do this > just for unit-testing. Yes, that wouldn't make sense. I just have to be careful when applying patches :) > > Masahiro? > > Thanks again! > > Best regards, > > Eugeniu. Kind regards, Petr ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
On Sun, May 13, 2018 at 10:52:07PM +0900, Masahiro Yamada wrote: > 2018-05-13 4:17 GMT+09:00 Eugeniu Rosca: > > I wonder if Kconfig could avoid printing whitespace in command line > > user dialogs. Then maybe those space characters could be removed from > > the "*xpected_stdout" files. > > > 'make config' display a space at the end of line > when prompting user input. > > This makes the input readable, like follows: > > * > * Linux/x86 4.17.0-rc4 Kernel Configuration > * > 64-bit kernel (64BIT) [Y/n/?] y > * > * General setup > * > Cross-compiler tool prefix (CROSS_COMPILE) [] > Compile also drivers which will not load (COMPILE_TEST) [N/y/?] y > > > > I think you are suggesting to remove a space, like follows: > > * > * Linux/x86 4.17.0-rc4 Kernel Configuration > * > 64-bit kernel (64BIT) [Y/n/?]y > * > * General setup > * > Cross-compiler tool prefix (CROSS_COMPILE) [] > Compile also drivers which will not load (COMPILE_TEST) [N/y/?]y > > > I believe we should not do this > just for unit-testing. Chopped output will hurt user experience, so I agree it's not a solution to eliminate trailing whitespace in predefined stdout files for pytest. Thank you, Eugeniu. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
2018-05-13 4:17 GMT+09:00 Eugeniu Rosca: > > Hello Petr, > > On Sat, May 12, 2018 at 08:25:56PM +0200, Petr Vorel wrote: >> Hi Eugeniu, >> >> > My testing was limited to: >> > - make defconfig all >> > - make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- r8a7795_ulcb_defconfig all >> > - comparing .config before and after the re-sync >> > - running the newly imported Kconfig unit tests as seen below: >> >> I tested whole patch-set with the other options: >> make config >> make defconfig >> make menuconfig >> make xconfig >> make gconfig >> make oldconfig >> >> > Reviewed-by: Masahiro Yamada >> > Signed-off-by: Eugeniu Rosca >> Tested-by: Petr Vorel > > Many thanks for testing! > >> >> > $ make testconfig >> >> > = test session starts >> > = >> > scripts/kconfig/tests/auto_submenu/__init__.py::test PASSED [ >> > 7%] >> > scripts/kconfig/tests/choice/__init__.py::test_oldask0 PASSED [ >> > 14%] >> > scripts/kconfig/tests/choice/__init__.py::test_oldask1 PASSED [ >> > 21%] >> > scripts/kconfig/tests/choice/__init__.py::test_allyes PASSED[ >> > 28%] >> > scripts/kconfig/tests/choice/__init__.py::test_allmod PASSED[ >> > 35%] >> > scripts/kconfig/tests/choice/__init__.py::test_allno PASSED [ >> > 42%] >> > scripts/kconfig/tests/choice/__init__.py::test_alldef PASSED[ >> > 50%] >> > scripts/kconfig/tests/choice_value_with_m_dep/__init__.py::test PASSED [ >> > 57%] >> > scripts/kconfig/tests/err_recursive_inc/__init__.py::test PASSED[ >> > 64%] >> > scripts/kconfig/tests/inter_choice/__init__.py::test PASSED [ >> > 71%] >> > scripts/kconfig/tests/new_choice_with_dep/__init__.py::test PASSED [ >> > 78%] >> > scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py::test PASSED[ >> > 85%] >> > scripts/kconfig/tests/rand_nested_choice/__init__.py::test PASSED [ >> > 92%] >> > scripts/kconfig/tests/warn_recursive_dep/__init__.py::test PASSED >> > [100%] >> > == 14 passed in 0.34 seconds >> > == >> >> When applied all 6 patches, I got several errors (see bellow). >> I tested in on 2 distros (Debian unstable and openSUSE Tumbleweed). >> The code I applied is here, did I make error when applying patches? >> https://github.com/pevik/u-boot/tree/eugeniu/kconfig.v2 > > I checked your branch and got some interesting conclusions. > Here is the diff between my and your version of commit ("kconfig: > re-sync with Linux 4.17-rc4"): > > $ git diff > scripts/kconfig/tests/auto_submenu/expected_stdout| 14 +++--- > scripts/kconfig/tests/choice/oldask0_expected_stdout | 14 +++--- > scripts/kconfig/tests/choice/oldask1_expected_stdout | 12 ++-- > scripts/kconfig/tests/new_choice_with_dep/expected_stdout | 4 ++-- > 4 files changed, 22 insertions(+), 22 deletions(-) > > Here is the same diff ignoring whitespace: > > $ git diff -w > scripts/kconfig/tests/auto_submenu/expected_stdout| 0 > scripts/kconfig/tests/choice/oldask0_expected_stdout | 0 > scripts/kconfig/tests/choice/oldask1_expected_stdout | 0 > scripts/kconfig/tests/new_choice_with_dep/expected_stdout | 0 > 4 files changed, 0 insertions(+), 0 deletions(-) > > So, it seems like all the trailing white-space from above files > disappeared on your branch, after applying the patches from the > email client (who did this?...). > > I didn't expect that trailing white-space to be of any value for the > test results, but it turns out it is! With the whitespace removed, I can > also reproduce the failures of "make testconfig". Right. Whitespaces are precious in the expected_stdout files. Do not rip them off. > I am not familiar with pytest, but, based on what we see here, it looks > like every single character stored in *xpected_stdout files (including > whitespace at the end of lines) matters for the test to pass. > > I wonder if Kconfig could avoid printing whitespace in command line > user dialogs. Then maybe those space characters could be removed from > the "*xpected_stdout" files. 'make config' display a space at the end of line when prompting user input. This makes the input readable, like follows: * * Linux/x86 4.17.0-rc4 Kernel Configuration * 64-bit kernel (64BIT) [Y/n/?] y * * General setup * Cross-compiler tool prefix (CROSS_COMPILE) [] Compile also drivers which will not load (COMPILE_TEST) [N/y/?] y I think you are suggesting to remove a space, like follows: * * Linux/x86 4.17.0-rc4 Kernel Configuration * 64-bit kernel (64BIT) [Y/n/?]y * * General setup * Cross-compiler tool prefix (CROSS_COMPILE) [] Compile also drivers which will not load (COMPILE_TEST) [N/y/?]y I believe we should not do this just for unit-testing. > Masahiro? > > Thanks
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
Hi Petr, On Sat, May 12, 2018 at 09:31:48PM +0200, Petr Vorel wrote: > Hi Eugeniu, > > > Hello Petr, > > > On Sat, May 12, 2018 at 08:25:56PM +0200, Petr Vorel wrote: > > > > When applied all 6 patches, I got several errors (see bellow). > > > I tested in on 2 distros (Debian unstable and openSUSE Tumbleweed). > > > The code I applied is here, did I make error when applying patches? > > > https://github.com/pevik/u-boot/tree/eugeniu/kconfig.v2 > > > I checked your branch and got some interesting conclusions. > > Here is the diff between my and your version of commit ("kconfig: > > re-sync with Linux 4.17-rc4"): > > > $ git diff > > scripts/kconfig/tests/auto_submenu/expected_stdout| 14 > > +++--- > > scripts/kconfig/tests/choice/oldask0_expected_stdout | 14 > > +++--- > > scripts/kconfig/tests/choice/oldask1_expected_stdout | 12 ++-- > > scripts/kconfig/tests/new_choice_with_dep/expected_stdout | 4 ++-- > > 4 files changed, 22 insertions(+), 22 deletions(-) > > > Here is the same diff ignoring whitespace: > > > $ git diff -w > > scripts/kconfig/tests/auto_submenu/expected_stdout| 0 > > scripts/kconfig/tests/choice/oldask0_expected_stdout | 0 > > scripts/kconfig/tests/choice/oldask1_expected_stdout | 0 > > scripts/kconfig/tests/new_choice_with_dep/expected_stdout | 0 > > 4 files changed, 0 insertions(+), 0 deletions(-) > > > So, it seems like all the trailing white-space from above files > > disappeared on your branch, after applying the patches from the > > email client (who did this?...). I hope I wasn't too harsh here. By "who" I meant the exact component or script in your workflow which dropped the trailing spaces. By knowing it, we could also improve our own workflows, which is a positive of going through this issue IMHO. > OK, my fault, I'm sorry. Applying first patch as 'git am --whitespace=warn > 1.mbox' fixes > that => make testconfig works. No worries. > Yes I applied patches with mutt (I usually use pwclient, but somehow I didn't > find your v2 > in patchwork [1], nor even in ML [2]. Have I overlook something. > > [1] https://patchwork.ozlabs.org/project/uboot/list/ > [2] https://lists.denx.de/pipermail/u-boot/2018-May/date.html I think I'm subscribed to U-boot mailing list with only one of my email addresses. The messages arriving from another one are delayed a bit since they have to be approved by moderators. Thanks, Eugeniu. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
Hi Eugeniu, > My testing was limited to: > - make defconfig all > - make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- r8a7795_ulcb_defconfig all > - comparing .config before and after the re-sync > - running the newly imported Kconfig unit tests as seen below: I tested whole patch-set with the other options: make config make defconfig make menuconfig make xconfig make gconfig make oldconfig > Reviewed-by: Masahiro Yamada> Signed-off-by: Eugeniu Rosca Tested-by: Petr Vorel > $ make testconfig > = test session starts > = > scripts/kconfig/tests/auto_submenu/__init__.py::test PASSED [ 7%] > scripts/kconfig/tests/choice/__init__.py::test_oldask0 PASSED [ 14%] > scripts/kconfig/tests/choice/__init__.py::test_oldask1 PASSED [ 21%] > scripts/kconfig/tests/choice/__init__.py::test_allyes PASSED[ 28%] > scripts/kconfig/tests/choice/__init__.py::test_allmod PASSED[ 35%] > scripts/kconfig/tests/choice/__init__.py::test_allno PASSED [ 42%] > scripts/kconfig/tests/choice/__init__.py::test_alldef PASSED[ 50%] > scripts/kconfig/tests/choice_value_with_m_dep/__init__.py::test PASSED [ 57%] > scripts/kconfig/tests/err_recursive_inc/__init__.py::test PASSED[ 64%] > scripts/kconfig/tests/inter_choice/__init__.py::test PASSED [ 71%] > scripts/kconfig/tests/new_choice_with_dep/__init__.py::test PASSED [ 78%] > scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py::test PASSED[ 85%] > scripts/kconfig/tests/rand_nested_choice/__init__.py::test PASSED [ 92%] > scripts/kconfig/tests/warn_recursive_dep/__init__.py::test PASSED [100%] > == 14 passed in 0.34 seconds > == When applied all 6 patches, I got several errors (see bellow). I tested in on 2 distros (Debian unstable and openSUSE Tumbleweed). The code I applied is here, did I make error when applying patches? https://github.com/pevik/u-boot/tree/eugeniu/kconfig.v2 Kind regards, Petr $ make testconfig python3 -B -m pytest ./scripts/kconfig/tests \ -o cache_dir=/home/pevik/install/src/u-boot.git/scripts/kconfig/tests/.cache \ = test session starts == platform linux -- Python 3.6.5, pytest-3.3.2, py-1.5.3, pluggy-0.6.0 -- /usr/bin/python3 cachedir: scripts/kconfig/tests/.cache rootdir: /home/pevik/install/src/u-boot.git/scripts/kconfig/tests, inifile: pytest.ini collecting ... collected 14 items scripts/kconfig/tests/auto_submenu/__init__.py::test FAILED [ 7%] scripts/kconfig/tests/choice/__init__.py::test_oldask0 FAILED[ 14%] scripts/kconfig/tests/choice/__init__.py::test_oldask1 FAILED[ 21%] scripts/kconfig/tests/choice/__init__.py::test_allyes PASSED [ 28%] scripts/kconfig/tests/choice/__init__.py::test_allmod PASSED [ 35%] scripts/kconfig/tests/choice/__init__.py::test_allno PASSED [ 42%] scripts/kconfig/tests/choice/__init__.py::test_alldef PASSED [ 50%] scripts/kconfig/tests/choice_value_with_m_dep/__init__.py::test PASSED [ 57%] scripts/kconfig/tests/err_recursive_inc/__init__.py::test PASSED [ 64%] scripts/kconfig/tests/inter_choice/__init__.py::test PASSED [ 71%] scripts/kconfig/tests/new_choice_with_dep/__init__.py::test FAILED [ 78%] scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py::test PASSED [ 85%] scripts/kconfig/tests/rand_nested_choice/__init__.py::test PASSED[ 92%] scripts/kconfig/tests/warn_recursive_dep/__init__.py::test PASSED[100%] === FAILURES === _ test _ conf = def test(conf): assert conf.oldaskconfig() == 0 > assert conf.stdout_contains('expected_stdout') E AssertionError scripts/kconfig/tests/auto_submenu/__init__.py:12: AssertionError - Captured stdout call - [command] /home/pevik/install/src/u-boot.git/scripts/kconfig/conf --oldaskconfig Kconfig [retcode] 0 [stdout] * * Linux Kernel Configuration * A (A) [Y/n/?] (NEW) A0 (A0) [Y/n/?] (NEW) A1_0 (A0_0) [N/y/?] (NEW) A1 (A1) [Y/n/?] (NEW) choice > 1. A1_0 (A1_0) (NEW) 2. A1_1 (A1_1) (NEW) choice[1-2?]: B (B) [N/y/?] (NEW) C (C) [N/y/?] (NEW) # # configuration written to .config # [stderr] [output for '.config'] # # Automatically generated file; DO NOT EDIT. # Linux Kernel Configuration # CONFIG_A=y CONFIG_A0=y # CONFIG_A0_0 is not set CONFIG_A1=y CONFIG_A1_0=y # CONFIG_A1_1 is not set # CONFIG_B is not set # CONFIG_C is not set _ test_oldask0 _ conf = def
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
Hello Petr, On Sat, May 12, 2018 at 08:25:56PM +0200, Petr Vorel wrote: > Hi Eugeniu, > > > My testing was limited to: > > - make defconfig all > > - make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- r8a7795_ulcb_defconfig all > > - comparing .config before and after the re-sync > > - running the newly imported Kconfig unit tests as seen below: > > I tested whole patch-set with the other options: > make config > make defconfig > make menuconfig > make xconfig > make gconfig > make oldconfig > > > Reviewed-by: Masahiro Yamada> > Signed-off-by: Eugeniu Rosca > Tested-by: Petr Vorel Many thanks for testing! > > > $ make testconfig > > > = test session starts > > = > > scripts/kconfig/tests/auto_submenu/__init__.py::test PASSED [ > > 7%] > > scripts/kconfig/tests/choice/__init__.py::test_oldask0 PASSED [ > > 14%] > > scripts/kconfig/tests/choice/__init__.py::test_oldask1 PASSED [ > > 21%] > > scripts/kconfig/tests/choice/__init__.py::test_allyes PASSED[ > > 28%] > > scripts/kconfig/tests/choice/__init__.py::test_allmod PASSED[ > > 35%] > > scripts/kconfig/tests/choice/__init__.py::test_allno PASSED [ > > 42%] > > scripts/kconfig/tests/choice/__init__.py::test_alldef PASSED[ > > 50%] > > scripts/kconfig/tests/choice_value_with_m_dep/__init__.py::test PASSED [ > > 57%] > > scripts/kconfig/tests/err_recursive_inc/__init__.py::test PASSED[ > > 64%] > > scripts/kconfig/tests/inter_choice/__init__.py::test PASSED [ > > 71%] > > scripts/kconfig/tests/new_choice_with_dep/__init__.py::test PASSED [ > > 78%] > > scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py::test PASSED[ > > 85%] > > scripts/kconfig/tests/rand_nested_choice/__init__.py::test PASSED [ > > 92%] > > scripts/kconfig/tests/warn_recursive_dep/__init__.py::test PASSED > > [100%] > > == 14 passed in 0.34 seconds > > == > > When applied all 6 patches, I got several errors (see bellow). > I tested in on 2 distros (Debian unstable and openSUSE Tumbleweed). > The code I applied is here, did I make error when applying patches? > https://github.com/pevik/u-boot/tree/eugeniu/kconfig.v2 I checked your branch and got some interesting conclusions. Here is the diff between my and your version of commit ("kconfig: re-sync with Linux 4.17-rc4"): $ git diff scripts/kconfig/tests/auto_submenu/expected_stdout| 14 +++--- scripts/kconfig/tests/choice/oldask0_expected_stdout | 14 +++--- scripts/kconfig/tests/choice/oldask1_expected_stdout | 12 ++-- scripts/kconfig/tests/new_choice_with_dep/expected_stdout | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) Here is the same diff ignoring whitespace: $ git diff -w scripts/kconfig/tests/auto_submenu/expected_stdout| 0 scripts/kconfig/tests/choice/oldask0_expected_stdout | 0 scripts/kconfig/tests/choice/oldask1_expected_stdout | 0 scripts/kconfig/tests/new_choice_with_dep/expected_stdout | 0 4 files changed, 0 insertions(+), 0 deletions(-) So, it seems like all the trailing white-space from above files disappeared on your branch, after applying the patches from the email client (who did this?...). I didn't expect that trailing white-space to be of any value for the test results, but it turns out it is! With the whitespace removed, I can also reproduce the failures of "make testconfig". I am not familiar with pytest, but, based on what we see here, it looks like every single character stored in *xpected_stdout files (including whitespace at the end of lines) matters for the test to pass. I wonder if Kconfig could avoid printing whitespace in command line user dialogs. Then maybe those space characters could be removed from the "*xpected_stdout" files. Masahiro? Thanks again! Best regards, Eugeniu. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/6] kconfig: re-sync with Linux 4.17-rc4
Hi Eugeniu, > Hello Petr, > On Sat, May 12, 2018 at 08:25:56PM +0200, Petr Vorel wrote: > > When applied all 6 patches, I got several errors (see bellow). > > I tested in on 2 distros (Debian unstable and openSUSE Tumbleweed). > > The code I applied is here, did I make error when applying patches? > > https://github.com/pevik/u-boot/tree/eugeniu/kconfig.v2 > I checked your branch and got some interesting conclusions. > Here is the diff between my and your version of commit ("kconfig: > re-sync with Linux 4.17-rc4"): > $ git diff > scripts/kconfig/tests/auto_submenu/expected_stdout| 14 +++--- > scripts/kconfig/tests/choice/oldask0_expected_stdout | 14 +++--- > scripts/kconfig/tests/choice/oldask1_expected_stdout | 12 ++-- > scripts/kconfig/tests/new_choice_with_dep/expected_stdout | 4 ++-- > 4 files changed, 22 insertions(+), 22 deletions(-) > Here is the same diff ignoring whitespace: > $ git diff -w > scripts/kconfig/tests/auto_submenu/expected_stdout| 0 > scripts/kconfig/tests/choice/oldask0_expected_stdout | 0 > scripts/kconfig/tests/choice/oldask1_expected_stdout | 0 > scripts/kconfig/tests/new_choice_with_dep/expected_stdout | 0 > 4 files changed, 0 insertions(+), 0 deletions(-) > So, it seems like all the trailing white-space from above files > disappeared on your branch, after applying the patches from the > email client (who did this?...). OK, my fault, I'm sorry. Applying first patch as 'git am --whitespace=warn 1.mbox' fixes that => make testconfig works. Yes I applied patches with mutt (I usually use pwclient, but somehow I didn't find your v2 in patchwork [1], nor even in ML [2]. Have I overlook something. [1] https://patchwork.ozlabs.org/project/uboot/list/ [2] https://lists.denx.de/pipermail/u-boot/2018-May/date.html Kind regards, Petr > I didn't expect that trailing white-space to be of any value for the > test results, but it turns out it is! With the whitespace removed, I can > also reproduce the failures of "make testconfig". > I am not familiar with pytest, but, based on what we see here, it looks > like every single character stored in *xpected_stdout files (including > whitespace at the end of lines) matters for the test to pass. > I wonder if Kconfig could avoid printing whitespace in command line > user dialogs. Then maybe those space characters could be removed from > the "*xpected_stdout" files. > Masahiro? > Thanks again! > Best regards, > Eugeniu. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot