Patch Detail
Show a patch.
GET /api/1.1/patches/19744/?format=api
{ "id": 19744, "url": "https://patchwork.libcamera.org/api/1.1/patches/19744/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19744/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20240319120517.362082-5-stefan.klug@ideasonboard.com>", "date": "2024-03-19T12:05:05", "name": "[v3,04/16] libcamera: delayed_controls: Update unit tests to expected semantics", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2ef476b3c85e7de375a9aaff07f331d942c981b4", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/19744/mbox/", "series": [ { "id": 4230, "url": "https://patchwork.libcamera.org/api/1.1/series/4230/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4230", "date": "2024-03-19T12:05:01", "name": "Preparation for per-frame-controls and initial tests", "version": 3, "mbox": "https://patchwork.libcamera.org/series/4230/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19744/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19744/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BBFE7C32C3\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Mar 2024 12:05:38 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 896FF62CAD;\n\tTue, 19 Mar 2024 13:05:32 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5C12962CAA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Mar 2024 13:05:28 +0100 (CET)", "from jasper.fritz.box (unknown\n\t[IPv6:2a00:6020:448c:6c00:1478:344b:8fcb:baf5])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AEF61F02;\n\tTue, 19 Mar 2024 13:05:01 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"LR+zJ+Jm\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1710849901;\n\tbh=3VNlfSy6nh7wgteyGedv5lEr64KZZ2UQ7/gy8dme1p4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=LR+zJ+JmCQzDfWj8P2u/HEh3qNG4CJfye8DECGkye62fbUYknqmCPBaAwlzZ/p+Kk\n\tGyZzeKTDG6sJNmTNFXNWIcJpygXq1tWSojDkF2ouA3BdPD0UUHP/FncytTEZ4D1uSe\n\tUdhHKGk75Lq2dbha5WcULOLKplmDsCBp6VAcDvIg=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v3 04/16] libcamera: delayed_controls: Update unit tests to\n\texpected semantics", "Date": "Tue, 19 Mar 2024 13:05:05 +0100", "Message-Id": "<20240319120517.362082-5-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.40.1", "In-Reply-To": "<20240319120517.362082-1-stefan.klug@ideasonboard.com>", "References": "<20240319120517.362082-1-stefan.klug@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "This patches changes the tests in a way DelayedControls is expected to\nwork. It does not require a interface change in DelayedControls.\n\nThe changes are:\n- It is expected that for every apply() there was a previous push().\n- When a control is pushed for frame 0, that request is not lost, but\n applied as soon as possible\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n test/delayed_controls.cpp | 256 +++++++++++++++++++++++++++++++-------\n 1 file changed, 209 insertions(+), 47 deletions(-)", "diff": "diff --git a/test/delayed_controls.cpp b/test/delayed_controls.cpp\nindex a8ce9828..fe183de5 100644\n--- a/test/delayed_controls.cpp\n+++ b/test/delayed_controls.cpp\n@@ -84,11 +84,8 @@ protected:\n \t\tdev_->setControls(&ctrls);\n \t\tdelayed->reset();\n \n-\t\t/* Trigger the first frame start event */\n-\t\tdelayed->applyControls(0);\n-\n \t\t/* Test control without delay are set at once. */\n-\t\tfor (unsigned int i = 1; i < 100; i++) {\n+\t\tfor (unsigned int i = 0; i < 100; i++) {\n \t\t\tint32_t value = 100 + i;\n \n \t\t\tctrls.set(V4L2_CID_BRIGHTNESS, value);\n@@ -121,25 +118,30 @@ protected:\n \t\tControlList ctrls;\n \n \t\t/* Reset control to value that will be first in test. */\n-\t\tint32_t expected = 4;\n-\t\tctrls.set(V4L2_CID_BRIGHTNESS, expected);\n+\t\tint32_t initial = 4;\n+\t\tctrls.set(V4L2_CID_BRIGHTNESS, initial);\n \t\tdev_->setControls(&ctrls);\n \t\tdelayed->reset();\n \n-\t\t/* Trigger the first frame start event */\n-\t\tdelayed->applyControls(0);\n+\t\t/* Push a request for frame 0 */\n+\t\tctrls.set(V4L2_CID_BRIGHTNESS, 10);\n+\t\tdelayed->push(ctrls);\n \n \t\t/* Test single control with delay. */\n-\t\tfor (unsigned int i = 1; i < 100; i++) {\n+\t\tfor (unsigned int i = 0; i < 100; i++) {\n \t\t\tint32_t value = 10 + i;\n+\t\t\tint32_t expected = i < 1 ? initial : value;\n \n-\t\t\tctrls.set(V4L2_CID_BRIGHTNESS, value);\n+\t\t\t/* push the request for frame i+1 */\n+\t\t\tctrls.set(V4L2_CID_BRIGHTNESS, value + 1);\n \t\t\tdelayed->push(ctrls);\n \n \t\t\tdelayed->applyControls(i);\n \n \t\t\tControlList result = delayed->get(i);\n \t\t\tint32_t brightness = result.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n+\t\t\tControlList ctrlsV4L = dev_->getControls({ V4L2_CID_BRIGHTNESS });\n+\t\t\tint32_t brightnessV4L = ctrlsV4L.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n \t\t\tif (brightness != expected) {\n \t\t\t\tcerr << \"Failed single control with delay\"\n \t\t\t\t << \" frame \" << i\n@@ -149,7 +151,121 @@ protected:\n \t\t\t\treturn TestFail;\n \t\t\t}\n \n-\t\t\texpected = value;\n+\t\t\tif (i > 0 && brightnessV4L != value + 1) {\n+\t\t\t\tcerr << \"Failed single control with delay\"\n+\t\t\t\t << \" frame \" << i\n+\t\t\t\t << \" expected V4L \" << value + 1\n+\t\t\t\t << \" got \" << brightnessV4L\n+\t\t\t\t << endl;\n+\t\t\t\treturn TestFail;\n+\t\t\t}\n+\t\t}\n+\n+\t\treturn TestPass;\n+\t}\n+\n+\t/* This fails on the old delayed controls implementation */\n+\tint singleControlWithDelayStartUp()\n+\t{\n+\t\tstd::unordered_map<uint32_t, DelayedControls::ControlParams> delays = {\n+\t\t\t{ V4L2_CID_BRIGHTNESS, { 1, false } },\n+\t\t};\n+\t\tstd::unique_ptr<DelayedControls> delayed =\n+\t\t\tstd::make_unique<DelayedControls>(dev_.get(), delays);\n+\t\tControlList ctrls;\n+\n+\t\t/* Reset control to value that will be first in test. */\n+\t\tint32_t initial = 4;\n+\t\tctrls.set(V4L2_CID_BRIGHTNESS, initial);\n+\t\tdev_->setControls(&ctrls);\n+\t\tdelayed->reset();\n+\n+\t\t/* push a request for frame 0 */\n+\t\tctrls.set(V4L2_CID_BRIGHTNESS, 10);\n+\t\tdelayed->push(ctrls);\n+\n+\t\t/* Test single control with delay. */\n+\t\tfor (unsigned int i = 0; i < 100; i++) {\n+\t\t\tint32_t value = 10 + i;\n+\t\t\tint32_t expected = i < 1 ? initial : value;\n+\n+\t\t\t/* push the request for frame i+1 */\n+\t\t\tctrls.set(V4L2_CID_BRIGHTNESS, value + 1);\n+\t\t\tdelayed->push(ctrls);\n+\n+\t\t\tdelayed->applyControls(i);\n+\n+\t\t\tControlList result = delayed->get(i);\n+\t\t\tint32_t brightness = result.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n+\t\t\tControlList ctrlsV4L = dev_->getControls({ V4L2_CID_BRIGHTNESS });\n+\t\t\tint32_t brightnessV4L = ctrlsV4L.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n+\n+\t\t\tif (brightness != expected) {\n+\t\t\t\tcerr << \"Failed single control with delay start up\"\n+\t\t\t\t << \" frame \" << i\n+\t\t\t\t << \" expected \" << expected\n+\t\t\t\t << \" got \" << brightness\n+\t\t\t\t << endl;\n+\t\t\t\treturn TestFail;\n+\t\t\t}\n+\n+\t\t\tif (i > 0 && brightnessV4L != value + 1) {\n+\t\t\t\tcerr << \"Failed single control with delay start up\"\n+\t\t\t\t << \" frame \" << i\n+\t\t\t\t << \" expected V4L \" << value + 1\n+\t\t\t\t << \" got \" << brightnessV4L\n+\t\t\t\t << endl;\n+\t\t\t\treturn TestFail;\n+\t\t\t}\n+\t\t}\n+\n+\t\treturn TestPass;\n+\t}\n+\n+\t/* This fails on the old delayed controls implementation */\n+\tint doNotLoseFirstRequest()\n+\t{\n+\t\t/* no delay at all */\n+\t\tstd::unordered_map<uint32_t, DelayedControls::ControlParams> delays = {\n+\t\t\t{ V4L2_CID_BRIGHTNESS, { 0, false } },\n+\t\t};\n+\t\tstd::unique_ptr<DelayedControls> delayed =\n+\t\t\tstd::make_unique<DelayedControls>(dev_.get(), delays);\n+\t\tControlList ctrls;\n+\n+\t\t/* Reset control to value that will be first in test. */\n+\t\tint32_t initial = 4;\n+\t\tctrls.set(V4L2_CID_BRIGHTNESS, initial);\n+\t\tdev_->setControls(&ctrls);\n+\t\tdelayed->reset();\n+\n+\t\t/* push a request for frame 0 */\n+\t\tint32_t expected = 10;\n+\t\tctrls.set(V4L2_CID_BRIGHTNESS, expected);\n+\t\tdelayed->push(ctrls);\n+\t\tdelayed->applyControls(0);\n+\n+\t\tControlList result = delayed->get(0);\n+\t\tint32_t brightness = result.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n+\t\tControlList ctrlsV4L = dev_->getControls({ V4L2_CID_BRIGHTNESS });\n+\t\tint32_t brightnessV4L = ctrlsV4L.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n+\n+\t\tif (brightness != expected) {\n+\t\t\tcerr << \"Failed doNotLoseFirstRequest\"\n+\t\t\t << \" frame \" << 0\n+\t\t\t << \" expected \" << expected\n+\t\t\t << \" got \" << brightness\n+\t\t\t << endl;\n+\t\t\treturn TestFail;\n+\t\t}\n+\n+\t\tif (brightnessV4L != expected) {\n+\t\t\tcerr << \"Failed doNotLoseFirstRequest\"\n+\t\t\t << \" frame \" << 0\n+\t\t\t << \" expected V4L \" << expected\n+\t\t\t << \" got \" << brightnessV4L\n+\t\t\t << endl;\n+\t\t\treturn TestFail;\n \t\t}\n \n \t\treturn TestPass;\n@@ -157,7 +273,7 @@ protected:\n \n \tint dualControlsWithDelay()\n \t{\n-\t\tstatic const unsigned int maxDelay = 2;\n+\t\tstatic const int maxDelay = 2;\n \n \t\tstd::unordered_map<uint32_t, DelayedControls::ControlParams> delays = {\n \t\t\t{ V4L2_CID_BRIGHTNESS, { 1, false } },\n@@ -174,15 +290,21 @@ protected:\n \t\tdev_->setControls(&ctrls);\n \t\tdelayed->reset();\n \n-\t\t/* Trigger the first frame start event */\n-\t\tdelayed->applyControls(0);\n+\t\t/* push two requests into the queue */\n+\t\tctrls.set(V4L2_CID_BRIGHTNESS, 10);\n+\t\tctrls.set(V4L2_CID_CONTRAST, 10);\n+\t\tdelayed->push(ctrls);\n+\t\tctrls.set(V4L2_CID_BRIGHTNESS, 11);\n+\t\tctrls.set(V4L2_CID_CONTRAST, 11);\n+\t\tdelayed->push(ctrls);\n \n \t\t/* Test dual control with delay. */\n-\t\tfor (unsigned int i = 1; i < 100; i++) {\n+\t\tfor (unsigned int i = 0; i < 100; i++) {\n \t\t\tint32_t value = 10 + i;\n \n-\t\t\tctrls.set(V4L2_CID_BRIGHTNESS, value);\n-\t\t\tctrls.set(V4L2_CID_CONTRAST, value + 1);\n+\t\t\t/* we are pushing 2 frames ahead */\n+\t\t\tctrls.set(V4L2_CID_BRIGHTNESS, value + 2);\n+\t\t\tctrls.set(V4L2_CID_CONTRAST, value + 2);\n \t\t\tdelayed->push(ctrls);\n \n \t\t\tdelayed->applyControls(i);\n@@ -190,17 +312,32 @@ protected:\n \t\t\tControlList result = delayed->get(i);\n \t\t\tint32_t brightness = result.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n \t\t\tint32_t contrast = result.get(V4L2_CID_CONTRAST).get<int32_t>();\n-\t\t\tif (brightness != expected || contrast != expected + 1) {\n-\t\t\t\tcerr << \"Failed dual controls\"\n-\t\t\t\t << \" frame \" << i\n-\t\t\t\t << \" brightness \" << brightness\n-\t\t\t\t << \" contrast \" << contrast\n-\t\t\t\t << \" expected \" << expected\n-\t\t\t\t << endl;\n-\t\t\t\treturn TestFail;\n-\t\t\t}\n \n-\t\t\texpected = i < maxDelay ? expected : value - 1;\n+\t\t\tControlList ctrlsV4L = dev_->getControls({ V4L2_CID_BRIGHTNESS, V4L2_CID_CONTRAST });\n+\t\t\tint32_t brightnessV4L = ctrlsV4L.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n+\t\t\tint32_t contrastV4L = ctrlsV4L.get(V4L2_CID_CONTRAST).get<int32_t>();\n+\n+\t\t\tif (i > maxDelay) {\n+\t\t\t\tif (brightness != value || contrast != value) {\n+\t\t\t\t\tcerr << \"Failed dual controls\"\n+\t\t\t\t\t << \" frame \" << i\n+\t\t\t\t\t << \" brightness \" << brightness\n+\t\t\t\t\t << \" contrast \" << contrast\n+\t\t\t\t\t << \" expected \" << value\n+\t\t\t\t\t << endl;\n+\t\t\t\t\treturn TestFail;\n+\t\t\t\t}\n+\t\t\t\tif (brightnessV4L != value + 1 || contrastV4L != value + maxDelay) {\n+\t\t\t\t\tcerr << \"Failed dual controls\"\n+\t\t\t\t\t << \" frame \" << i\n+\t\t\t\t\t << \" brightnessV4L \" << brightnessV4L\n+\t\t\t\t\t << \" expected \" << value + 1\n+\t\t\t\t\t << \" contrastV4L \" << contrastV4L\n+\t\t\t\t\t << \" expected \" << value + maxDelay\n+\t\t\t\t\t << endl;\n+\t\t\t\t\treturn TestFail;\n+\t\t\t\t}\n+\t\t\t}\n \t\t}\n \n \t\treturn TestPass;\n@@ -208,7 +345,7 @@ protected:\n \n \tint dualControlsMultiQueue()\n \t{\n-\t\tstatic const unsigned int maxDelay = 2;\n+\t\tstatic const int maxDelay = 2;\n \n \t\tstd::unordered_map<uint32_t, DelayedControls::ControlParams> delays = {\n \t\t\t{ V4L2_CID_BRIGHTNESS, { 1, false } },\n@@ -218,22 +355,19 @@ protected:\n \t\t\tstd::make_unique<DelayedControls>(dev_.get(), delays);\n \t\tControlList ctrls;\n \n-\t\t/* Reset control to value that will be first two frames in test. */\n-\t\tint32_t expected = 100;\n-\t\tctrls.set(V4L2_CID_BRIGHTNESS, expected);\n-\t\tctrls.set(V4L2_CID_CONTRAST, expected);\n+\t\t/* Reset control to a value that will be first two frames in test. */\n+\t\tint32_t initial = 100;\n+\t\tctrls.set(V4L2_CID_BRIGHTNESS, initial);\n+\t\tctrls.set(V4L2_CID_CONTRAST, initial);\n \t\tdev_->setControls(&ctrls);\n \t\tdelayed->reset();\n \n-\t\t/* Trigger the first frame start event */\n-\t\tdelayed->applyControls(0);\n-\n \t\t/*\n-\t\t * Queue all controls before any fake frame start. Note we\n+\t\t * Queue all controls before applyControls(). Note we\n \t\t * can't queue up more then the delayed controls history size\n-\t\t * which is 16. Where one spot is used by the reset control.\n+\t\t * which is 16.\n \t\t */\n-\t\tfor (unsigned int i = 0; i < 15; i++) {\n+\t\tfor (unsigned int i = 0; i < 14; i++) {\n \t\t\tint32_t value = 10 + i;\n \n \t\t\tctrls.set(V4L2_CID_BRIGHTNESS, value);\n@@ -241,9 +375,9 @@ protected:\n \t\t\tdelayed->push(ctrls);\n \t\t}\n \n-\t\t/* Process all queued controls. */\n-\t\tfor (unsigned int i = 1; i < 16; i++) {\n-\t\t\tint32_t value = 10 + i - 1;\n+\t\t/* Process 2 frames less than queued, so that the V4L controls are correct */\n+\t\tfor (unsigned int i = 0; i < 12; i++) {\n+\t\t\tint32_t expected = i < maxDelay ? initial : 10 + i;\n \n \t\t\tdelayed->applyControls(i);\n \n@@ -251,6 +385,11 @@ protected:\n \n \t\t\tint32_t brightness = result.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n \t\t\tint32_t contrast = result.get(V4L2_CID_CONTRAST).get<int32_t>();\n+\n+\t\t\tControlList ctrlsV4L = dev_->getControls({ V4L2_CID_BRIGHTNESS, V4L2_CID_CONTRAST });\n+\t\t\tint32_t brightnessV4L = ctrlsV4L.get(V4L2_CID_BRIGHTNESS).get<int32_t>();\n+\t\t\tint32_t contrastV4L = ctrlsV4L.get(V4L2_CID_CONTRAST).get<int32_t>();\n+\n \t\t\tif (brightness != expected || contrast != expected) {\n \t\t\t\tcerr << \"Failed multi queue\"\n \t\t\t\t << \" frame \" << i\n@@ -261,7 +400,17 @@ protected:\n \t\t\t\treturn TestFail;\n \t\t\t}\n \n-\t\t\texpected = i < maxDelay ? expected : value - 1;\n+\t\t\t/* Check v4l values after they've settled */\n+\t\t\tif (i >= maxDelay && (brightnessV4L != expected + 1 || contrastV4L != expected + maxDelay)) {\n+\t\t\t\tcerr << \"Failed multi queue\"\n+\t\t\t\t << \" frame \" << i\n+\t\t\t\t << \" brightnessV4L \" << brightnessV4L\n+\t\t\t\t << \" expected \" << expected + 1\n+\t\t\t\t << \" contrastV4L \" << contrastV4L\n+\t\t\t\t << \" expected \" << expected + maxDelay\n+\t\t\t\t << endl;\n+\t\t\t\treturn TestFail;\n+\t\t\t}\n \t\t}\n \n \t\treturn TestPass;\n@@ -269,27 +418,40 @@ protected:\n \n \tint run() override\n \t{\n-\t\tint ret;\n+\t\tint ret = 0;\n+\t\tbool failed = false;\n \n \t\t/* Test single control without delay. */\n \t\tret = singleControlNoDelay();\n \t\tif (ret)\n-\t\t\treturn ret;\n+\t\t\tfailed = true;\n \n \t\t/* Test single control with delay. */\n \t\tret = singleControlWithDelay();\n \t\tif (ret)\n-\t\t\treturn ret;\n+\t\t\tfailed = true;\n+\n+\t\t/* Test single control with delay. */\n+\t\tret = singleControlWithDelayStartUp();\n+\t\tif (ret)\n+\t\t\tfailed = true;\n+\n+\t\tret = doNotLoseFirstRequest();\n+\t\tif (ret)\n+\t\t\tfailed = true;\n \n \t\t/* Test dual controls with different delays. */\n \t\tret = dualControlsWithDelay();\n \t\tif (ret)\n-\t\t\treturn ret;\n+\t\t\tfailed = true;\n \n \t\t/* Test control values produced faster than consumed. */\n \t\tret = dualControlsMultiQueue();\n \t\tif (ret)\n-\t\t\treturn ret;\n+\t\t\tfailed = true;\n+\n+\t\tif (failed)\n+\t\t\treturn TestFail;\n \n \t\treturn TestPass;\n \t}\n", "prefixes": [ "v3", "04/16" ] }