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

[PATCH v2] tools/tests: Make E2BIG non-fatal to xenstore unit test


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>
  • Date: Fri, 15 Oct 2021 13:14:09 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Fri, 15 Oct 2021 12:14:37 +0000
  • Ironport-data: A9a23:clFLQalkXiHsf+aZtimkWhfo5gxqIURdPkR7XQ2eYbSJt1+Wr1Gzt xJLCDzXP/6IZWOkedx0a4mw8R8HupXdydFjTwU4pS9kHiMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BClVlxJVF/fngqoDUUYYoAQgsA185IMsdoUg7wbdg2tc12YHR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 NZyvKaPRQ4OArfRwLRFSBZaPiRfFKITrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBOrmIoIZ/Ep8wD/QC/E4aZvCX7/L9ZlT2zJYasVmQKqOO 5ZCNmcHgBLoeiNhJkYtIb0HhsSaoFPQS2R3lXGyuv9ii4TU5FMoi+W8WDbPQfSVQe1Fk0Deo XjJl0z7HxUbOdq32TeDtHW2iYfnnyzhX5kJPKal7fMsi1qWrkQDBRtTWValrP2Rj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knxilNoERuA6qlfr OV7Y0mPHjP+XAssRAb6Je90ca7MBfhHPJOgLX5Xo3SBTUO2lHYS72KhLGKq1eMd0KRygc079 Y5T0EUMqySMbEOt7ee3ODOKadD/DDoysCVbbi09RxQpEpRGtldBk9Ce32m++dNNVN77NwCZc GhDjYsnUvoRZzpBP7LcEXsoYL41qr2fdvdEGQ772VO0njHsdt0gISKVyRxDn8lInZy6KZn/m 7fnwPj4KK/9/m91x/HzmfWq49bgd3717J4dbixY2cuW0vRYyuTFfZcsoe5zUUISK3F0idbrP Dc5xM7e8hj4XLYeW+45RH33RP7zToo43j+jVeFnHrqu6XCNXkHItsEgZgcfgrS6kImst052r lMxXiFu51eCg6FlDjh5sLPSwphmiOP0DAfead6tQ0RbWNpAIUh47D20ihuYdY99GOT0vFrLA EYZPusqMq/UTihHjDkVhoG+q3uYp0XJGb2fqEvgL3o79FmpgEL86JD/r1jop4pzuNDd3GSj9 60cJhVqA==
  • Ironport-sdr: 6DVR2/cz0CG6qbFLu3FmvdYkc15Eo/CKY93zqgCwgYJSPOQbtG1MalTK4Aa7MzX6U8NuEuRpk/ XuM239J+Wl4xBZ3IKW7vLxD2EaXlNAvLN3IG2NmgcEX8TW5o+1RBnsusQ6JPdkgdeE16LUzZxc OwbDelZgJEYH+00/qKAYFUo0uDkdl/8AelYiuFLeHjTUJkupT+2jtZtO+nvPkNd+x2p0Vgq0a1 c/IldJC23de/RXFVTwgoTrslIZ3LMO8PMbfsQ7+MsELCRQ6GV93blPNhE2Lcp0Re/4bxWbpZyV oj3o5HHUnXHrb7nhaLeJPB50
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Xenstore's unit test fails on read and write of big numbers if
quota-maxsize is set to a lower number than those test cases use.

Output a special warning instead of a failure message in such cases
and make the error non-fatal to the unit test.

Signed-off-by: Kevin Stefanov <kevin.stefanov@xxxxxxxxxx>
---
CC: Ian Jackson <iwj@xxxxxxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Juergen Gross <jgross@xxxxxxxx>
CC: Julien Grall <julien@xxxxxxx>
CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

v2: Adhere to coding style, use E2BIG instead of 7, set ret to 0
---
 tools/tests/xenstore/test-xenstore.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/tests/xenstore/test-xenstore.c 
b/tools/tests/xenstore/test-xenstore.c
index d3574b3fa2..f8423e568e 100644
--- a/tools/tests/xenstore/test-xenstore.c
+++ b/tools/tests/xenstore/test-xenstore.c
@@ -110,8 +110,17 @@ static int call_test(struct test *tst, int iters, bool 
no_clock)
             break;
     }
 
+    /* Make E2BIG non-fatal to the test */
     if ( ret )
-        printf("%-10s: failed (ret = %d, stage %s)\n", tst->name, ret, stage);
+    {
+       if ( ret == E2BIG )
+        {
+            printf("%-10s: Not run - argument list too long\n", tst->name);
+            ret = 0;
+        }
+        else      
+            printf("%-10s: failed (ret = %d, stage %s)\n", tst->name, ret, 
stage);
+    }
     else if ( !no_clock )
     {
         printf("%-10s:", tst->name);
-- 
2.25.1




 


Rackspace

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