Re: [OE-core] [PATCH 6/8] busybox: remove three hostname test cases
On Thu, 22 Nov 2018 at 02:12, ChenQi wrote: > >> 2) hostname may set to some value, e.g. qemux86-64, which is not an entry > >> in /etc/hosts > >> This results in lookup failure when using `hostname -f' as there's no > >> entry in /etc/hosts. > > Let's fix the hostname setup so hosts is correct too. > > OK. > Currently, we set hostname to ${MACHINE}. To ensure it's also an entry > in /etc/hosts, it seems that we have to default it to 'localhost'. I'm > going to test with this change. If you have other candidates, please let > me know. What I mean is when we change hostname, we should update hosts so ${MACHINE} is an alias for localhost. Like my local machine has: 127.0.0.1 localhost 127.0.1.1 flashheart.burtonini.com flashheart Ross -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 6/8] busybox: remove three hostname test cases
On 11/21/2018 08:16 PM, Burton, Ross wrote: On Wed, 21 Nov 2018 at 05:35, Chen Qi wrote: These three test case are removed because of two reasons. 1) net-tools' hostname have different behaviour regarding some options So when net-tools is installed, test cases may fail. e.g. test x$(hostname -i) = x$(busybox hostname -i) This is just a specific instance of the problem where alternatives may not be what you want. The busybox test suite should be sure it's running busybox tools. Having spoken to a few people about this already, maybe busybox-ptest should contain a symlink farm for all the applets to the busybox binary that run-ptest can put at the front of $PATH. Very good idea! I'll try this out. 2) hostname may set to some value, e.g. qemux86-64, which is not an entry in /etc/hosts This results in lookup failure when using `hostname -f' as there's no entry in /etc/hosts. Let's fix the hostname setup so hosts is correct too. OK. Currently, we set hostname to ${MACHINE}. To ensure it's also an entry in /etc/hosts, it seems that we have to default it to 'localhost'. I'm going to test with this change. If you have other candidates, please let me know. Best Regards, Chen Qi Ross -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 6/8] busybox: remove three hostname test cases
On Wed, 21 Nov 2018 at 12:16, Burton, Ross wrote: > On Wed, 21 Nov 2018 at 05:35, Chen Qi wrote: > > These three test case are removed because of two reasons. > > 1) net-tools' hostname have different behaviour regarding some options > >So when net-tools is installed, test cases may fail. > >e.g. > >test x$(hostname -i) = x$(busybox hostname -i) > > This is just a specific instance of the problem where alternatives may > not be what you want. The busybox test suite should be sure it's > running busybox tools. Having spoken to a few people about this > already, maybe busybox-ptest should contain a symlink farm for all the > applets to the busybox binary that run-ptest can put at the front of > $PATH. Something like this: https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=ross/mut=42ec5eaf3a6c512bffe03d20e7e512e8d87343ca Example package contents at https://pastebin.com/5FpY9xyE If run-ptest just puts that directory at the front of $PATH then you'll be sure to be run the busybox tool. Bonus points for making that a function in update-alternatives.bbclass so every recipe with this problem can use it, but that would have to happen at do_package time because of how that class works so I'm happy enough with this for now. Ross -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 6/8] busybox: remove three hostname test cases
On Wed, 21 Nov 2018 at 05:35, Chen Qi wrote: > These three test case are removed because of two reasons. > 1) net-tools' hostname have different behaviour regarding some options >So when net-tools is installed, test cases may fail. >e.g. >test x$(hostname -i) = x$(busybox hostname -i) This is just a specific instance of the problem where alternatives may not be what you want. The busybox test suite should be sure it's running busybox tools. Having spoken to a few people about this already, maybe busybox-ptest should contain a symlink farm for all the applets to the busybox binary that run-ptest can put at the front of $PATH. > 2) hostname may set to some value, e.g. qemux86-64, which is not an entry in > /etc/hosts >This results in lookup failure when using `hostname -f' as there's no > entry in /etc/hosts. Let's fix the hostname setup so hosts is correct too. Ross -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 6/8] busybox: remove three hostname test cases
These three test case are removed because of two reasons. 1) net-tools' hostname have different behaviour regarding some options So when net-tools is installed, test cases may fail. e.g. test x$(hostname -i) = x$(busybox hostname -i) 2) hostname may set to some value, e.g. qemux86-64, which is not an entry in /etc/hosts This results in lookup failure when using `hostname -f' as there's no entry in /etc/hosts. Signed-off-by: Chen Qi --- meta/recipes-core/busybox/busybox.inc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index b45d2b6..cc7246f 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -352,6 +352,12 @@ do_install_ptest () { cp -r ${B}/testsuite ${D}${PTEST_PATH}/ cp ${B}/.config ${D}${PTEST_PATH}/ ln -s /bin/busybox ${D}${PTEST_PATH}/busybox + # Remove some hostname test cases as they may fail because of two reasons + # 1) net-tools' hostname have different behaviour regarding some options + # 2) hostname may set to some value, e.g. qemux86-64, which is not an entry in /etc/hosts + rm ${D}${PTEST_PATH}/testsuite/hostname/hostname-i-works + rm ${D}${PTEST_PATH}/testsuite/hostname/hostname-d-works + rm ${D}${PTEST_PATH}/testsuite/hostname/hostname-s-works } inherit update-alternatives -- 1.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 6/8] busybox: remove three hostname test cases
These three test case are removed because of two reasons. 1) net-tools' hostname have different behaviour regarding some options So when net-tools is installed, test cases may fail. e.g. test x$(hostname -i) = x$(busybox hostname -i) 2) hostname may set to some value, e.g. qemux86-64, which is not an entry in /etc/hosts This results in lookup failure when using `hostname -f' as there's no entry in /etc/hosts. Signed-off-by: Chen Qi --- meta/recipes-core/busybox/busybox.inc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 228d41a..20c8b9d 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -352,6 +352,12 @@ do_install_ptest () { cp -r ${B}/testsuite ${D}${PTEST_PATH}/ cp ${B}/.config ${D}${PTEST_PATH}/ ln -s /bin/busybox ${D}${PTEST_PATH}/busybox + # Remove some hostname test cases as they may fail because of two reasons + # 1) net-tools' hostname have different behaviour regarding some options + # 2) hostname may set to some value, e.g. qemux86-64, which is not an entry in /etc/hosts + rm ${D}${PTEST_PATH}/testsuite/hostname/hostname-i-works + rm ${D}${PTEST_PATH}/testsuite/hostname/hostname-d-works + rm ${D}${PTEST_PATH}/testsuite/hostname/hostname-s-works } inherit update-alternatives -- 1.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core