[{"id":64,"web_url":"https://patchwork.libcamera.org/comment/64/","msgid":"<20181221151210.GK5597@w540>","date":"2018-12-21T15:12:10","subject":"Re: [libcamera-devel] [PATCH 3/5] test: libtest: Return all\n\tnon-zero init values","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Kieran,\n\nOn Fri, Dec 21, 2018 at 08:13:09AM +0000, Kieran Bingham wrote:\n> A skipped test is currently defined as returning 77. If this is returned\n> by the init stage, currently the execute call will continue on to the\n> run stage.\n>\n> Correct this such that any non-zero return code from the init phase will\n> abort the test.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  test/libtest/test.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/test/libtest/test.cpp b/test/libtest/test.cpp\n> index 1bb6ebcb9e8a..9d537ea08698 100644\n> --- a/test/libtest/test.cpp\n> +++ b/test/libtest/test.cpp\n> @@ -20,7 +20,7 @@ int Test::execute()\n>  \tint ret;\n>\n>  \tret = init();\n> -\tif (ret < 0)\n> +\tif (ret)\n\nTo make this more explicit, what about ?\n        if (ret != TEST_PASS)\n\nThanks\n   j\n\n>  \t\treturn ret;\n>\n>  \tret = run();\n> --\n> 2.17.1\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E443760B23\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Dec 2018 16:12:12 +0100 (CET)","from w540 (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id 7706824000E;\n\tFri, 21 Dec 2018 15:12:12 +0000 (UTC)"],"Date":"Fri, 21 Dec 2018 16:12:10 +0100","From":"jacopo mondi <jacopo@jmondi.org>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20181221151210.GK5597@w540>","References":"<20181221081311.3291-1-kieran.bingham@ideasonboard.com>\n\t<20181221081311.3291-4-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"wQ8ANTl3uYPVjUZt\"","Content-Disposition":"inline","In-Reply-To":"<20181221081311.3291-4-kieran.bingham@ideasonboard.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","Subject":"Re: [libcamera-devel] [PATCH 3/5] test: libtest: Return all\n\tnon-zero init values","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Fri, 21 Dec 2018 15:12:13 -0000"}},{"id":66,"web_url":"https://patchwork.libcamera.org/comment/66/","msgid":"<c0fb2d60-3934-01d6-600e-2d670e1261e1@ideasonboard.com>","date":"2018-12-21T15:17:07","subject":"Re: [libcamera-devel] [PATCH 3/5] test: libtest: Return all\n\tnon-zero init values","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Jacopo\n\nOn 21/12/2018 15:12, jacopo mondi wrote:\n> Hi Kieran,\n> \n> On Fri, Dec 21, 2018 at 08:13:09AM +0000, Kieran Bingham wrote:\n>> A skipped test is currently defined as returning 77. If this is returned\n>> by the init stage, currently the execute call will continue on to the\n>> run stage.\n>>\n>> Correct this such that any non-zero return code from the init phase will\n>> abort the test.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  test/libtest/test.cpp | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/test/libtest/test.cpp b/test/libtest/test.cpp\n>> index 1bb6ebcb9e8a..9d537ea08698 100644\n>> --- a/test/libtest/test.cpp\n>> +++ b/test/libtest/test.cpp\n>> @@ -20,7 +20,7 @@ int Test::execute()\n>>  \tint ret;\n>>\n>>  \tret = init();\n>> -\tif (ret < 0)\n>> +\tif (ret)\n> \n> To make this more explicit, what about ?\n>         if (ret != TEST_PASS)\n> \n\nI thought about that, and it's actually what I had written first, but\nthat's essentially:\n\n if (ret != 0)\n\nwhich is equally:\n\n if (ret)\n\nwhich we use commonly throughout the code base...\n\n\n\n> Thanks\n>    j\n> \n>>  \t\treturn ret;\n>>\n>>  \tret = run();\n>> --\n>> 2.17.1\n>>\n>> _______________________________________________\n>> libcamera-devel mailing list\n>> libcamera-devel@lists.libcamera.org\n>> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<kieran.bingham@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CB26F60B23\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Dec 2018 16:17:10 +0100 (CET)","from [192.168.0.21]\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 51A29558;\n\tFri, 21 Dec 2018 16:17:10 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1545405430;\n\tbh=/hiHzQvuF5iKOnk2mPZnFiSvvjQAwo6Ibm6AkU4hvkc=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=SygQEd2y/OwMClF03Cy5/o4LAJOoN+LjPotqsGOLGiNIRbLKuovZjDrXb4G+Zi5Nf\n\ttM2ycuFFiDvJGE6C5t52zqWdjlgbFwnqyRj5VVXPct0f4BK/najdSijMDU6MJ0yUa3\n\t8rAWxDpv3a3/AjuSe0ZUdcW4iFfVmgFhR4rZJsJU=","Reply-To":"kieran.bingham@ideasonboard.com","To":"jacopo mondi <jacopo@jmondi.org>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","References":"<20181221081311.3291-1-kieran.bingham@ideasonboard.com>\n\t<20181221081311.3291-4-kieran.bingham@ideasonboard.com>\n\t<20181221151210.GK5597@w540>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Openpgp":"preference=signencrypt","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8Zq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wT/fY75iVI+yD0ih/e6j8qYvP8pvGwMQfrmN9YB0zB39YzCSdaUaNrWGD3iCBxg6lwSO\n\tLKeRhxxfiXCIYEf3vwOsP3YMx2JkD5doseXmWBGW1U0T/oJF+DVfKB6mv5UfsTzpVhJRgee7\n\t4jkjqFq4qsUGxcvF2xtRkfHFpZDbRgRlVmiWkqDkT4qMA+4q1y/dWwshSKi/uwVZNycuLsz+\n\t+OD8xPNCsMTqeUkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8\n\tO0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU\n\tRCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<c0fb2d60-3934-01d6-600e-2d670e1261e1@ideasonboard.com>","Date":"Fri, 21 Dec 2018 15:17:07 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101\n\tThunderbird/60.2.1","MIME-Version":"1.0","In-Reply-To":"<20181221151210.GK5597@w540>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 3/5] test: libtest: Return all\n\tnon-zero init values","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Fri, 21 Dec 2018 15:17:11 -0000"}},{"id":69,"web_url":"https://patchwork.libcamera.org/comment/69/","msgid":"<20181221152934.GM5597@w540>","date":"2018-12-21T15:29:34","subject":"Re: [libcamera-devel] [PATCH 3/5] test: libtest: Return all\n\tnon-zero init values","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Kieran\n\nOn Fri, Dec 21, 2018 at 03:17:07PM +0000, Kieran Bingham wrote:\n> Hi Jacopo\n>\n> On 21/12/2018 15:12, jacopo mondi wrote:\n> > Hi Kieran,\n> >\n> > On Fri, Dec 21, 2018 at 08:13:09AM +0000, Kieran Bingham wrote:\n> >> A skipped test is currently defined as returning 77. If this is returned\n> >> by the init stage, currently the execute call will continue on to the\n> >> run stage.\n> >>\n> >> Correct this such that any non-zero return code from the init phase will\n> >> abort the test.\n> >>\n> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >> ---\n> >>  test/libtest/test.cpp | 2 +-\n> >>  1 file changed, 1 insertion(+), 1 deletion(-)\n> >>\n> >> diff --git a/test/libtest/test.cpp b/test/libtest/test.cpp\n> >> index 1bb6ebcb9e8a..9d537ea08698 100644\n> >> --- a/test/libtest/test.cpp\n> >> +++ b/test/libtest/test.cpp\n> >> @@ -20,7 +20,7 @@ int Test::execute()\n> >>  \tint ret;\n> >>\n> >>  \tret = init();\n> >> -\tif (ret < 0)\n> >> +\tif (ret)\n> >\n> > To make this more explicit, what about ?\n> >         if (ret != TEST_PASS)\n> >\n>\n> I thought about that, and it's actually what I had written first, but\n> that's essentially:\n>\n>  if (ret != 0)\n>\n> which is equally:\n>\n>  if (ret)\n>\n> which we use commonly throughout the code base...\n\nI know the behaviour is the same, my point was to make the TEST_PASS flag\nexplicit (which makes clear the returning TEST_SKIP from init() is\nfine). Up to you, this is very minor stuff.\n\n>\n>\n>\n> > Thanks\n> >    j\n> >\n> >>  \t\treturn ret;\n> >>\n> >>  \tret = run();\n> >> --\n> >> 2.17.1\n> >>\n> >> _______________________________________________\n> >> libcamera-devel mailing list\n> >> libcamera-devel@lists.libcamera.org\n> >> https://lists.libcamera.org/listinfo/libcamera-devel\n>\n> --\n> Regards\n> --\n> Kieran","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F2BE160B0B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Dec 2018 16:29:35 +0100 (CET)","from w540 (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 87FB560008;\n\tFri, 21 Dec 2018 15:29:35 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Fri, 21 Dec 2018 16:29:34 +0100","From":"jacopo mondi <jacopo@jmondi.org>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"LibCamera Devel <libcamera-devel@lists.libcamera.org>","Message-ID":"<20181221152934.GM5597@w540>","References":"<20181221081311.3291-1-kieran.bingham@ideasonboard.com>\n\t<20181221081311.3291-4-kieran.bingham@ideasonboard.com>\n\t<20181221151210.GK5597@w540>\n\t<c0fb2d60-3934-01d6-600e-2d670e1261e1@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"9/lmB/GmAksD4Nrg\"","Content-Disposition":"inline","In-Reply-To":"<c0fb2d60-3934-01d6-600e-2d670e1261e1@ideasonboard.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","Subject":"Re: [libcamera-devel] [PATCH 3/5] test: libtest: Return all\n\tnon-zero init values","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Fri, 21 Dec 2018 15:29:36 -0000"}}]