Bug 1907 - (YOCTO 1.2)LSB 4.1: /tset/LSB.os/network/gethostbyaddr/T.gethostbyaddr 2
Summary: (YOCTO 1.2)LSB 4.1: /tset/LSB.os/network/gethostbyaddr/T.gethostbyaddr 2
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.2
Hardware: All Multiple
: Medium normal
Target Milestone: 1.2 M3
Assignee: Xiaofeng Yan
QA Contact:
URL:
Whiteboard: (P2)Development 100%
Depends on:
Blocks:
 
Reported: 2012-01-17 01:45 UTC by Xiaofeng Yan
Modified: 2012-03-13 07:38 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xiaofeng Yan 2012-01-17 01:45:02 UTC
LSB test suite(4.1) complain "Checks gethostbyaddr for h_errno value HOST_NOT_FOUND
h_errno was set to 3
"
A part of codes about this error is as follow:
......
h_errno=0;
    if((host=gethostbyaddr((struct in_addr *)&myaddr.sin_addr.s_addr,(socklen_t)sizeof(myaddr),AF_INET)) == NULL)
    {
......
Comment 1 Xiaofeng Yan 2012-01-17 01:56:35 UTC
LSB want to get value of h_errno as "1" but get "3".

Cause:
No daemon progress "avahi-daemon" when system starting up.
"gethostbyaddr" will search file "/var/run/avahi-daemon/socket" but there is no this file which is created by avahi-daemon. 

Solution:
Method 1:
Create a link to daemon progress "avahi-daemon" in /etc/rc5.d.
Problem:
All image will include this progress when starting up.

Method 2:
Start "avahi-daemon" in LSB_Setup.sh.
Problem:
This progress will exist when only running LSB_Setup.sh but this image will not meet lsb requirement.
Comment 2 Xiaofeng Yan 2012-01-17 02:07:00 UTC
Hi Saul,

Do you think which method is better above? If I select method 1, then I didn't know whether people like it really or not?