Pradipta Banerjee has uploaded a new change for review. Change subject: test_getIfaceByIP changes for IBM POWER(ppc64) architecture ......................................................................
test_getIfaceByIP changes for IBM POWER(ppc64) architecture /proc/net/route o/p is dependent on endianness and existing test case only handles x86 arch. This patchset adds support for ppc64 architecture Change-Id: I40178f44b5ab2602769aa4c70a5e54564f9f360e Signed-off-by: Pradipta Kr. Banerjee <[email protected]> --- M tests/Makefile.am M tests/capsTests.py A tests/route_info_ppc64.out M vdsm.spec.in 4 files changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/81/10181/1 diff --git a/tests/Makefile.am b/tests/Makefile.am index 8ad34e2..afa37a6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -68,6 +68,7 @@ lvs_3386c6f2-926f-42c4-839c-38287fac8998.out \ netmaskconversions \ route_info.out \ + route_info_ppc64.out \ tc_filter_show.out \ $(NULL) diff --git a/tests/capsTests.py b/tests/capsTests.py index f0d6b54..195661d 100644 --- a/tests/capsTests.py +++ b/tests/capsTests.py @@ -23,6 +23,7 @@ from testrunner import VdsmTestCase as TestCaseBase import caps +import platform class TestCaps(TestCaseBase): @@ -82,5 +83,10 @@ def test_getIfaceByIP(self): expectedRes = ["wlan0", "virbr0"] ip = ["10.201.129.37", "192.168.122.90"] + arch = platform.machine() + if arch == 'x86_64': + route_file = 'route_info.out' + elif arch == 'ppc64': + route_file = 'route_info_ppc64.out' for res, i in zip(expectedRes, ip): - self.assertEqual(res, caps._getIfaceByIP(i, "route_info.out")) + self.assertEqual(res, caps._getIfaceByIP(i, route_file)) diff --git a/tests/route_info_ppc64.out b/tests/route_info_ppc64.out new file mode 100644 index 0000000..59fedb8 --- /dev/null +++ b/tests/route_info_ppc64.out @@ -0,0 +1,4 @@ +Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT +wlan0 0AC98100 00000000 0001 0 0 0 FFFFFF00 0 0 0 +virbr0 C0A87A00 00000000 0001 0 0 0 FFFFFF00 0 0 0 +eth0 0A230000 00000000 0001 0 0 0 FFFFFE00 0 0 0 diff --git a/vdsm.spec.in b/vdsm.spec.in index 68126fd..a6ce969 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -805,6 +805,7 @@ %{_datadir}/%{vdsm_name}/tests/netmaskconversions %{_datadir}/%{vdsm_name}/tests/run_tests.sh %{_datadir}/%{vdsm_name}/tests/route_info.out +%{_datadir}/%{vdsm_name}/tests/route_info_ppc64.out %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfo.xml %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml -- To view, visit http://gerrit.ovirt.org/10181 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40178f44b5ab2602769aa4c70a5e54564f9f360e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Pradipta Banerjee <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
