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

[PATCH] tools/xl: fix vif and vcpupin parse tests


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 8 Apr 2022 15:31:46 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mycfYRjCuGQviAUZ42UDfke1LB0gXnoRC/rpO3Rwhhs=; b=nzB3cKjTwFd6oX1BVSYqsgqsdhbFvaz8BeDsgMz0D30lGtFrYEVnfWxEr8MpKd0RcRohcID1ImCtXUC43l2LKe0ST0VkX2HC8OtAgCEtFTnmU4X2JZZHca1mx8beqae+miZ9Kjp4z81CaAj03RwsdmsMhTkqHmJOETTE7qdVdOeeGw9BRwKtMsqmuqcfm7MzKZOZp2YW1T83zr99wRq4WnuGpwCH+1c9Yf/gYhqxT+n10VzsfDB31soNTUt+QGLyfiBdgUtoDuSMOBW9s8lhyBrTEhhRQx4jRz4cCcAR1oU+zVybw528wciZ10S02356NO+ePqvr4hzTHnSh+9L6hg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ih2orIlwBhK9/4YXOWTFIJ5ce/RAA/lL7hr51Zad0SmHTrtSi+0cFVQxHZ7v40e37YlzJxxPW1qt1gtNrOlWQinZFXhcL6XUW0gKk3KQeG8CStZrCUTWBNMC3zEn8WbmcvBob95S8qswQ0nZPh9P5zgcQGXSyHfGxc59qhEZztV8E51AO/4D1tcvNiVswtM2RrZ2aB4hOv01C5LFqX2mTtLpuZHEv7K8v0pVEm7oAmRkYABEPm29Qf8XP8I3HOGUuyyuJ3MZ/VKVaQMoqM1D1+RXYq5p2lQe+hXgoXQsNdjk1MNWaEXcoRtzRQQu2+lw6+2wHucyhgTz2LgKaN+7jw==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Fri, 08 Apr 2022 13:32:45 +0000
  • Ironport-data: A9a23:pg6FVKjruX5gnEX7lml3iI8CX161GxAKZh0ujC45NGQN5FlHY01je htvWDuHPffcY2Pzc9Byb4Wzph4PvsXVyoQ2GlRuqXoxFykb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6jefSLlbFILas1hpZHGeIcw98z0M78wIFqtQw24LhX1vd4 YmaT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YT4wF7fWvcNGajwGKysvAq8Z9pDbCGfq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmFK883azPL+GyVG8bkmtnwjzDS+4vXLjIQrnQ5M8e1zA17ixLNamGO JVAMGEzBPjGSwxmIGZOOsMgp+CpiGfOdXp7lUOql4NitgA/yyQuieOwYbI5YOeiWsF9jkue4 GXc8AzREhwccdCS1zeB2natnfPU2zP2XpoIE7+1/eIsh0ecrlH/EzVPCwH9+6PgzBfjBZQPc CT45xbCs4AL7WWxVPzaBCSd/kaO7yEeBNR/D8QlvVTlJrXv3y6VAW0NTzhkYdMgtdMrSTFC6 mJlj+8FFhQ07uTLFCv1GqO86GrrZHNLdTNqiTosF1Nt3jX1nG0kYvsjpP5HGbX9sND6ECqYL 9ui/Hln3OV7YSLmOsyGEbH7b9CE+8Chou0dvFy/soeZAuVRPtPNi2uAswWz0Bq4BNzFJmRtR VBd8yRk0MgADIuWiAuGS/gXEbei6p6taWOA0AQ/QsRxqGv0ohZPmLy8BhkkeS+F1e5eJ1fUj LL741sNtPe/wlP0BUOIX25BI5tzlvWxfTgUfvvVcsBPcvBMmPyvp0lTibqr9zm1yiAEyPhnU b/CKJrEJStKWMxPkWvtL89AgOBD+8zL7T6KLXwN50/8iuT2ib/8YeptDWZimchltPjU/1iPq 4832gnj40w3bdASqxL/qOY7BVsLMWI6FdbxrclWffSEOQ1oBCcqDPq5/F/rU9wNc3h9/gsQw kyAZw==
  • Ironport-hdrordr: A9a23:Lh+EcKuKnjm1PQyHO6Pa4XwZ7skCgIMji2hC6mlwRA09TyXGra +TdaUguSMc1gx9ZJhBo7G90KnpewK5yXcT2/hqAV7CZnichILMFu9fBOTZslvd8kHFh4xgPM RbAtdD4b/LfCFHZK/BiWHSebZQo+VvmJrY+ds2pE0dKj2CBZsQijuQXW2gYzBLrUR9dOwEPa vZwvACiyureHwRYMj+Ln4ZX9Lbr9mOsJ79exYJCzMu9QHL1FqTmfbHOind+i1bfyJEwL8k/2 SAuwvl5p+7u/X+7hPHzWfc47lfhdOk4NpeA86njNQTN1zX+0+VTbUkf4fHkCE+oemp5lpvuN 7Qoy04N8A20H/VdnHdm2qZ5yDQlBIVr1Pyw16RhnXu5ebjQighNsZHjYVFNjPE9ksJprhHoe 929lPck6ASIQLLnSz76dSNfQptjFCIrX0rlvNWp2BDULEZdKRaoeUkjQlo+a87bW3HAb0cYa dT5Jm23ocWTbraVQGTgoBX+q3hYpxpdS32AnTruaSuokprdT5CvgglLfck7wY9HaIGOud5Dt v/Q9RVfcl1P7crhIJGdZM8qJiMexvwqSylChPgHb2gLtBEB07w
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Current vif and vcpupin parse tests are out of sync.  First of all, xl
returns 1 on failure, so replace the expected error code.

Secondly fix the expected output from some vif tests, as xl will no
longer print the unpopulated fields.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
We should find a way for those tests to be run as part of osstest, or
else they will go stale again sooner or later.
---
 tools/xl/check-xl-vcpupin-parse |  2 +-
 tools/xl/check-xl-vif-parse     | 52 +--------------------------------
 2 files changed, 2 insertions(+), 52 deletions(-)

diff --git a/tools/xl/check-xl-vcpupin-parse b/tools/xl/check-xl-vcpupin-parse
index 21f8421ad0..633616a597 100755
--- a/tools/xl/check-xl-vcpupin-parse
+++ b/tools/xl/check-xl-vcpupin-parse
@@ -158,7 +158,7 @@ END
 RANDOM=$seed
 
 echo "# Testing a wrong configuration" >> $outfile
-write foo 255 ""
+write foo 1 ""
 
 echo "# Testing the 'all' syntax" >> $outfile
 write "all" 0 "cpumap: all"
diff --git a/tools/xl/check-xl-vif-parse b/tools/xl/check-xl-vif-parse
index 02c6dbaeb6..04bd9463d8 100755
--- a/tools/xl/check-xl-vif-parse
+++ b/tools/xl/check-xl-vif-parse
@@ -40,7 +40,7 @@ complete () {
     fi
 }
 
-e=255
+e=1
 
 
 #---------- test data ----------
@@ -62,16 +62,6 @@ one $e rate=10ZB/m
 # test b/s and B/s rate units
 expected <<END
 vif: {
-    "backend_domid": 0,
-    "devid": 0,
-    "mtu": 0,
-    "model": null,
-    "mac": "00:00:00:00:00:00",
-    "ip": null,
-    "bridge": null,
-    "ifname": null,
-    "script": null,
-    "nictype": null,
     "rate_bytes_per_interval": 100000,
     "rate_interval_usecs": 50000
 }
@@ -86,16 +76,6 @@ one 0 rate=2000000B/s@50ms
 # test Kb/s and KB/s rate units
 expected <<END
 vif: {
-    "backend_domid": 0,
-    "devid": 0,
-    "mtu": 0,
-    "model": null,
-    "mac": "00:00:00:00:00:00",
-    "ip": null,
-    "bridge": null,
-    "ifname": null,
-    "script": null,
-    "nictype": null,
     "rate_bytes_per_interval": 100,
     "rate_interval_usecs": 50000
 }
@@ -109,16 +89,6 @@ one 0 rate=2KB/s@50ms
 # test Mb/s and MB/s rate units
 expected <<END
 vif: {
-    "backend_domid": 0,
-    "devid": 0,
-    "mtu": 0,
-    "model": null,
-    "mac": "00:00:00:00:00:00",
-    "ip": null,
-    "bridge": null,
-    "ifname": null,
-    "script": null,
-    "nictype": null,
     "rate_bytes_per_interval": 100000,
     "rate_interval_usecs": 50000
 }
@@ -132,16 +102,6 @@ one 0 rate=2MB/s@50ms
 # test Gb/s and GB/s rate units
 expected <<END
 vif: {
-    "backend_domid": 0,
-    "devid": 0,
-    "mtu": 0,
-    "model": null,
-    "mac": "00:00:00:00:00:00",
-    "ip": null,
-    "bridge": null,
-    "ifname": null,
-    "script": null,
-    "nictype": null,
     "rate_bytes_per_interval": 50000000,
     "rate_interval_usecs": 50000
 }
@@ -173,16 +133,6 @@ one $e rate=10MB/s@10h
 # test replenishment interval in seconds
 expected <<END
 vif: {
-    "backend_domid": 0,
-    "devid": 0,
-    "mtu": 0,
-    "model": null,
-    "mac": "00:00:00:00:00:00",
-    "ip": null,
-    "bridge": null,
-    "ifname": null,
-    "script": null,
-    "nictype": null,
     "rate_bytes_per_interval": 10000000,
     "rate_interval_usecs": 1000000
 }
-- 
2.35.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.