Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] pTest-tcl fail fixed
@ 2016-03-01  9:37 Dengke Du
  2016-03-01  9:37 ` [PATCH 1/1] " Dengke Du
  0 siblings, 1 reply; 4+ messages in thread
From: Dengke Du @ 2016-03-01  9:37 UTC (permalink / raw)
  Cc: openembedded-core

The following changes since commit 23056103c949b498c23b47579e8dd57ce78e6ed9:

  uclibc: Do not use immediate expansion operator (2016-02-22 20:42:48 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib dengke/pTest-tcl-fail-fixed
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=dengke/pTest-tcl-fail-fixed

Dengke Du (1):
  pTest-tcl fail fixed

 meta/recipes-core/initscripts/initscripts-1.0/hostname.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1



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

* [PATCH 1/1] pTest-tcl fail fixed
  2016-03-01  9:37 [PATCH 0/1] pTest-tcl fail fixed Dengke Du
@ 2016-03-01  9:37 ` Dengke Du
  2016-03-07 17:42   ` Burton, Ross
  0 siblings, 1 reply; 4+ messages in thread
From: Dengke Du @ 2016-03-01  9:37 UTC (permalink / raw)
  Cc: openembedded-core

http.test httpold.test socket.test failed when run the pTest-tcl,because
the tcl script "info hostname" in /usr/lib/tcl/ptest/tests/http.test on
target fail. When run the "info hostname" get the hostname,but it can find
the IP in the /etc/hosts, so it failed. We need to add the IP and hostname
pair in the /etc/hosts. In order to add the IP and hostname pair in the
/etc/hosts, we need to add the pair when the target start, so I add the
"echo "127.0.0.1 `cat /etc/hostname`" >> /etc/hosts" to the hostname.sh in
"meta/recipes-core/initscripts/initscripts-1.0/", when the system invoke
the hostname.sh in "/etc/init.d/", it add the IP and hostname pair in the
/etc/hosts.

Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
 meta/recipes-core/initscripts/initscripts-1.0/hostname.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
index 95287cc..8866d87 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/hostname.sh
@@ -13,7 +13,7 @@ hostname -b -F /etc/hostname 2> /dev/null
 if [ $? -eq 0 ]; then
 	exit
 fi
-
+echo "127.0.0.1 `cat /etc/hostname`" >> /etc/hosts
 # Busybox hostname doesn't support -b so we need implement it on our own
 if [ -f /etc/hostname ];then
 	hostname `cat /etc/hostname`
-- 
1.9.1



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

* Re: [PATCH 1/1] pTest-tcl fail fixed
  2016-03-01  9:37 ` [PATCH 1/1] " Dengke Du
@ 2016-03-07 17:42   ` Burton, Ross
  0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2016-03-07 17:42 UTC (permalink / raw)
  To: Dengke Du; +Cc: OE-core

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

On 1 March 2016 at 09:37, Dengke Du <dengke.du@windriver.com> wrote:

> http.test httpold.test socket.test failed when run the pTest-tcl,because
> the tcl script "info hostname" in /usr/lib/tcl/ptest/tests/http.test on
> target fail. When run the "info hostname" get the hostname,but it can find
> the IP in the /etc/hosts, so it failed. We need to add the IP and hostname
> pair in the /etc/hosts. In order to add the IP and hostname pair in the
> /etc/hosts, we need to add the pair when the target start, so I add the
> "echo "127.0.0.1 `cat /etc/hostname`" >> /etc/hosts" to the hostname.sh in
> "meta/recipes-core/initscripts/initscripts-1.0/", when the system invoke
> the hostname.sh in "/etc/init.d/", it add the IP and hostname pair in the
> /etc/hosts.
>

First, the shortlog should accurately reflect the change.  You haven't
fixed a ptest-tcl failure, you've added a missing host entry in /etc/hosts
which had the side-effect of fixing a failure in tcl-ptest.

So what you've done is add a call to write "127.0.0.1   <hostname>" to
/etc/hosts on boot.  On every boot.  Every time that script runs a new
entry will be written to /etc/hosts.  If the hostname changes then hosts
will contain incorrect entries.  If / is read-only then this operation will
fail.

Instead netbase should write the hostname entry at build time so the rootfs
is correct when it is created, fixing the problem at source and ensuring it
works with read-only rootfs.  The problem you've now got to solve is
getting the hostname from the base-files recipe, so clearly the hostname
needs to be promoted to distro-level variable.

Ross

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

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

* [PATCH 0/1] pTest-tcl fail fixed
@ 2016-03-16  9:43 Dengke Du
  0 siblings, 0 replies; 4+ messages in thread
From: Dengke Du @ 2016-03-16  9:43 UTC (permalink / raw)
  Cc: openembedded-core

The following changes since commit 8debfea81e69d038bd2d56314b272cb74f5582ed:

  local.conf.sample: Disable prelink by default (2016-03-13 22:09:05 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib dengke/pTest-tcl-fail-fixed
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=dengke/pTest-tcl-fail-fixed

Dengke Du (1):
  pTest-tcl fail fixed

 meta/recipes-core/netbase/netbase_5.3.bb | 1 +
 1 file changed, 1 insertion(+)

-- 
1.9.1



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

end of thread, other threads:[~2016-03-16  9:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01  9:37 [PATCH 0/1] pTest-tcl fail fixed Dengke Du
2016-03-01  9:37 ` [PATCH 1/1] " Dengke Du
2016-03-07 17:42   ` Burton, Ross
  -- strict thread matches above, loose matches on Subject: below --
2016-03-16  9:43 [PATCH 0/1] " Dengke Du

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