On Mon, 2010-10-18 at 07:58 -0400, Jason Wang wrote:
> ----- "Amos Kong" <[email protected]> wrote:
> 
> > Linux IPv4 addresses are host attributes, not interface attributes.
> > When guest has multi-nics in same LAN, we could not verify ip and
> > macaddress by arp entries, just return True. If the ip is
> > ineffective,
> > login will be failed of timeout.
> 
> Looks like verify_ip_address_ownership() can handle the case when using 
> multiple
> macs. I guess the problem may existed in get_address():
> 
>                 macs = [kvm_utils.get_mac_ip_pair_from_dict(dict)[0]
>                         for dict in nic_dicts]
>                 if not kvm_utils.verify_ip_address_ownership(ip, macs):
> 
> We need to get macs from mac address pool.

Hmm, true. I guess I forgot to work on this function when I was working
on the network patchset. Let's fix this and see if it works.

> 
> > 
> > Signed-off-by: Amos Kong <[email protected]>
> > ---
> >  0 files changed, 0 insertions(+), 0 deletions(-)
> > 
> > diff --git a/client/tests/kvm/kvm_utils.py
> > b/client/tests/kvm/kvm_utils.py
> > index a2b0a3f..914cbb8 100644
> > --- a/client/tests/kvm/kvm_utils.py
> > +++ b/client/tests/kvm/kvm_utils.py
> > @@ -376,6 +376,10 @@ def verify_ip_address_ownership(ip, macs,
> > timeout=10.0):
> >      if regex.search(o):
> >          return True
> >  
> > +    if len(macs) > 1:
> > +        print "Guest has more than 1 nic, could not verify by arp
> > entries"
> > +        return True
> > +
> >      # Get the name of the bridge device for arping
> >      o = commands.getoutput("%s route get %s" % (find_command("ip"),
> > ip))
> >      dev = re.findall("dev\s+\S+", o, re.IGNORECASE)


_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to