Issue #17487 has been updated by Alex Harvey.

Here are some shell script unit tests in lieu of proper RSpec tests.

<pre>
myhost# uname -a |sed -e 's/ [^ ]* / myhost /'
HP-UX myhost B.11.23 U ia64 0991360873 unlimited-user license
</pre>

<pre>
myhost# cat tests.sh
#!/usr/bin/ksh

fixture1() {
cat <<'EOF'
Name           Mtu Network            Address                 Ipkts      Opkts
lan1          1500 10.1.1.0           10.1.1.6            435347580    1287271
lan0          1500 192.168.3.0        192.168.3.10         28101904 3569941319
lo0           4136 127.0.0.0          127.0.0.1             5071536    5071539
EOF
}

fixture2() {
cat <<'EOF'
Name      Mtu  Network         Address         Ipkts   Ierrs Opkts   Oerrs Coll
lan1      1500 10.1.54.0       10.1.54.36      117489535 0     1681709 0     79
lan0      1500 192.168.30.0    192.168.30.152  964843646 0     1668475345 0     0
lo0       4136 127.0.0.0       127.0.0.1       4658855 0     4658855 0     0
EOF
}

fixture3() {
cat <<'EOF'
Name      Mtu  Network         Address         Ipkts   Ierrs Opkts   Oerrs Coll
lan1*     1500 10.10.0.0       10.10.0.5       786     0     240     0     0
lan0      1500 192.168.3.0     192.168.3.9     1823744990 0     23598735 0     0
lo0       4136 127.0.0.0       127.0.0.1       7048047 0     7048047 0     0
EOF
}

fixture4() {
cat <<'EOF'
Name      Mtu  Network         Address         Ipkts   Ierrs Opkts   Oerrs Coll
lan4:1    1500 192.168.1.0     192.168.1.197   121     0     6       0     0
lan3*     1500 none            none            0       0     0       0     0
lan1      1500 192.168.30.0    192.168.30.32   211188606 0     132070934 0     0
lo0       4136 127.0.0.0       127.0.0.1       513508160 0     513509185 0     0
lan4      1500 192.168.32.0    192.168.32.75   2640827721 0     2257447701 0    
 0
EOF
}

for i in 1 2 3 4
do
    echo "testing fixture $i:"
    fixture$i
    echo "filtered through sed -e '1d; /none/d; s/*//g'"
    fixture$i |sed -e '1d; /none/d; s/*//g'
    echo ''
done

# end of script
</pre>

<pre>
myhost# ./tests.sh
testing fixture 1:
Name           Mtu Network            Address                 Ipkts      Opkts
lan1          1500 10.1.1.0           10.1.1.6            435347580    1287271
lan0          1500 192.168.3.0        192.168.3.10         28101904 3569941319
lo0           4136 127.0.0.0          127.0.0.1             5071536    5071539
filtered through sed -e '1d; /none/d; s/*//g'
lan1          1500 10.1.1.0           10.1.1.6            435347580    1287271
lan0          1500 192.168.3.0        192.168.3.10         28101904 3569941319
lo0           4136 127.0.0.0          127.0.0.1             5071536    5071539

testing fixture 2:
Name      Mtu  Network         Address         Ipkts   Ierrs Opkts   Oerrs Coll
lan1      1500 10.1.54.0       10.1.54.36      117489535 0     1681709 0     79
lan0      1500 192.168.30.0    192.168.30.152  964843646 0     1668475345 0     0
lo0       4136 127.0.0.0       127.0.0.1       4658855 0     4658855 0     0
filtered through sed -e '1d; /none/d; s/*//g'
lan1      1500 10.1.54.0       10.1.54.36      117489535 0     1681709 0     79
lan0      1500 192.168.30.0    192.168.30.152  964843646 0     1668475345 0     0
lo0       4136 127.0.0.0       127.0.0.1       4658855 0     4658855 0     0

testing fixture 3:
Name      Mtu  Network         Address         Ipkts   Ierrs Opkts   Oerrs Coll
lan1*     1500 10.10.0.0       10.10.0.5       786     0     240     0     0
lan0      1500 192.168.3.0     192.168.3.9     1823744990 0     23598735 0     0
lo0       4136 127.0.0.0       127.0.0.1       7048047 0     7048047 0     0
filtered through sed -e '1d; /none/d; s/*//g'
lan1     1500 10.10.0.0       10.10.0.5       786     0     240     0     0
lan0      1500 192.168.3.0     192.168.3.9     1823744990 0     23598735 0     0
lo0       4136 127.0.0.0       127.0.0.1       7048047 0     7048047 0     0

testing fixture 4:
Name      Mtu  Network         Address         Ipkts   Ierrs Opkts   Oerrs Coll
lan4:1    1500 192.168.1.0     192.168.1.197   121     0     6       0     0
lan3*     1500 none            none            0       0     0       0     0
lan1      1500 192.168.30.0    192.168.30.32   211188606 0     132070934 0     0
lo0       4136 127.0.0.0       127.0.0.1       513508160 0     513509185 0     0
lan4      1500 192.168.32.0    192.168.32.75   2640827721 0     2257447701 0    
 0
filtered through sed -e '1d; /none/d; s/*//g'
lan4:1    1500 192.168.1.0     192.168.1.197   121     0     6       0     0
lan1      1500 192.168.30.0    192.168.30.32   211188606 0     132070934 0     0
lo0       4136 127.0.0.0       127.0.0.1       513508160 0     513509185 0     0
lan4      1500 192.168.32.0    192.168.32.75   2640827721 0     2257447701 0    
 0
</pre>

I repeated the test on HP-UX 11.31 and 11.11 with the same result.
----------------------------------------
Bug #17487: 'no such interface' sometimes printed on HP-UX platforms
https://projects.puppetlabs.com/issues/17487#change-76839

Author: Alex Harvey
Status: In Topic Branch Pending Review
Priority: Normal
Assignee: Jeff McCune
Category: hpux
Target version: 1.6.x
Keywords: 
Branch: https://github.com/puppetlabs/facter/pull/357
Affected Facter version: 1.6.14


On HP-UX platforms facter sometimes prints errors -

<pre>
$ facter
ifconfig: no such interface
ifconfig: no such interface
ifconfig: no such interface
ifconfig: no such interface
ifconfig: no such interface
ifconfig: no such interface
ifconfig: no such interface
ifconfig: no such interface
ifconfig: no such interface
ifconfig: no such interface
ifconfig: no such interface
ifconfig: no such interface
architecture => ia64
...
</pre>

This was identified by Hongbo Hu who submitted a patch in #11612.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to