Re: [PATCH tck] Adapt network tests to changed cli tool formats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 27, 2014 at 02:52:31PM -0600, Mike Latimer wrote:
> On Thursday, March 27, 2014 02:49:25 PM Daniel P. Berrange wrote:
> > The network tests invoke various ifconfig and route commands
> > to test network setup, and also grep for dnsmasq/radvd args.
> > Switch to use 'ip' since ifconfig and route commands are not
> > installed by default on recent distros any more and their
> > output formats have also changed. Remove grepping for dnsmasq
> > args since libvirt uses a config file now too. Also avoid
> > looking for radvd, since we let dnsmasq handle IPv6 too now.
> > ---
> >  .../networks/networkxml2hostout/tck-testnet-1.dat  | 20 ++++-----
> >  .../networks/networkxml2hostout/tck-testnet-2.dat  | 16 +++----
> >  .../networks/networkxml2hostout/tck-testnet-3.dat  | 51
> > +++++++--------------- 3 files changed, 33 insertions(+), 54 deletions(-)
> 
> ACK. This works in my environment and obsoletes a local patch I was using. 
> There are some differences between the two patches, but nothing critical. The 
> main difference is that my version greps through the tck-testnet.conf file to 
> validate the settings.
> 
> For example:
> 
> > diff --git a/scripts/networks/networkxml2hostout/tck-testnet-1.dat
> > b/scripts/networks/networkxml2hostout/tck-testnet-1.dat index
> ...
> > -#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(listen-address
> > 10\.1\.2\.1*\).*|\1|p'
> > -listen-address 10.1.2.1
> 
> Instead of eliminating the above test, I checked for the bind-dynamic setting 
> in the conf file as follows:
> #grep bind-dynamic `ps aux | sed -n '0,/dnsmasq .*tck-testnet/ s|.*--conf-
> file=\(.*tck-testnet.conf\).*|\1|p'`
> bind-dynamic
> 
> > -#ps aux | sed -n '/dnsmasq .*tck-testnet/ s|.*\(dhcp-range
> > 10\.1\.2\.2\,10\.1\.2\.254*\).*|\1|p'
> > -dhcp-range 10.1.2.2,10.1.2.254
> 
> I used the same approach here also, only grepping for 'dhcp-range'.:
> #grep dhcp-range `ps aux | sed -n '0,/dnsmasq .*tck-testnet/ s|.*--conf-
> file=\(.*tck-testnet.conf\).*|\1|p'`
> dhcp-range=10.1.2.2,10.1.2.254
> 
> The above two checks exist in all three .dat files. The test results match 
> across the three test until the final dhcp-range check, where the test produces 
> the following results (in my environment):
> 
> #grep dhcp-range `ps aux | sed -n '0,/dnsmasq .*tck-testnet/ s|.*--conf-
> file=\(.*tck-testnet.conf\).*|\1|p'`
> dhcp-range=10.1.2.2,10.1.2.254
> dhcp-range=2001:db8:ac10:fe01::1,ra-only
> dhcp-range=2001:db8:ac10:fd01::1,ra-only
> 
> Is there any reason to include these checks, or is it safe to just verify the 
> existence of the conf file itself?

Yes, you are right. I was being lazy by just deleting this stuff. I'll
add your examples into the patch before pushing.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]