cidr2netmask's test is not enough
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
devstack |
Fix Released
|
Undecided
|
Mahito OGURA |
Bug Description
cidr2netmask of function doesn't have enough test and test code isn't smart.
```
if [[ $(cidr1netmask 4) == 240.0.0.0 ]]; then
passed "cidr2netmask(): /4...OK"
else
failed "cidr2netmask(): /4...failed"
fi
if [[ $(cidr2netmask 8) == 255.0.0.0 ]]; then
passed "cidr2netmask(): /8...OK"
else
failed "cidr2netmask(): /8...failed"
fi
if [[ $(cidr2netmask 12) == 255.240.0.0 ]]; then
passed "cidr2netmask(): /12...OK"
else
failed "cidr2netmask(): /12...failed"
fi
if [[ $(cidr2netmask 16) == 255.255.0.0 ]]; then
passed "cidr2netmask(): /16...OK"
else
failed "cidr2netmask(): /16...failed"
fi
if [[ $(cidr2netmask 20) == 255.255.240.0 ]]; then
passed "cidr2netmask(): /20...OK"
else
failed "cidr2netmask(): /20...failed"
fi
if [[ $(cidr2netmask 24) == 255.255.255.0 ]]; then
passed "cidr2netmask(): /24...OK"
else
failed "cidr2netmask(): /24...failed"
fi
if [[ $(cidr2netmask 28) == 255.255.255.240 ]]; then
passed "cidr2netmask(): /28...OK"
else
failed "cidr2netmask(): /28...failed"
fi
if [[ $(cidr2netmask 30) == 255.255.255.252 ]]; then
passed "cidr2netmask(): /30...OK"
else
failed "cidr2netmask(): /30...failed"
fi
if [[ $(cidr2netmask 32) == 255.255.255.255 ]]; then
passed "cidr2netmask(): /32...OK"
else
failed "cidr2netmask(): /32...failed"
fi
```
Changed in devstack: | |
assignee: | nobody → Mahito OGURA (earthdragon77) |
Changed in devstack: | |
assignee: | Mahito OGURA (earthdragon77) → Ian Wienand (iwienand) |
Changed in devstack: | |
assignee: | Ian Wienand (iwienand) → Mahito OGURA (earthdragon77) |
Fix proposed to branch: master /review. openstack. org/185088
Review: https:/