[{"id":169,"web_url":"https://patchwork.libcamera.org/comment/169/","msgid":"<2325826.GxQroJkNAk@avalon>","date":"2019-01-02T09:23:25","subject":"Re: [libcamera-devel] [PATCH 4/5] test: media_device: Convert to\n\tforeach","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Tuesday, 1 January 2019 23:29:46 EET Kieran Bingham wrote:\n> Prevent duplication of boilerplate code as the suite grows by\n> establishing the foreach pattern in the media_device test suite.\n\nThis results in duplicating the code for the foreach pattern though. I wonder \nwhether we could do better. How about something like\n\ndiff --git a/test/media_device/meson.build b/test/media_device/meson.build\nindex a7ebed102e24..5f14197b005f 100644\n--- a/test/media_device/meson.build\n+++ b/test/media_device/meson.build\n@@ -1,5 +1,3 @@\n-media_device_test = executable('media_device_test', 'media_device_test.cpp',\n-                               link_with : test_libraries,\n-                               include_directories : test_includes_internal)\n-\n-test('Media Device Test', media_device_test)\n+internal_tests += [\n+    ['media_device_test',   files(['media_device_test.cpp'])],\n+]\ndiff --git a/test/meson.build b/test/meson.build\nindex 184a7eeb5e27..69e4855013ec 100644\n--- a/test/meson.build\n+++ b/test/meson.build\n@@ -1,7 +1,5 @@\n subdir('libtest')\n \n-subdir('media_device')\n-\n public_tests = [\n     ['list',            'list.cpp'],\n ]\n@@ -9,6 +7,8 @@ public_tests = [\n internal_tests = [\n ]\n \n+subdir('media_device')\n+\n foreach t : public_tests\n     exe = executable(t[0], t[1],\n                      link_with : test_libraries,\n\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  test/media_device/meson.build | 14 ++++++++++----\n>  1 file changed, 10 insertions(+), 4 deletions(-)\n> \n> diff --git a/test/media_device/meson.build b/test/media_device/meson.build\n> index a7ebed102e24..d9394b0545d8 100644\n> --- a/test/media_device/meson.build\n> +++ b/test/media_device/meson.build\n> @@ -1,5 +1,11 @@\n> -media_device_test = executable('media_device_test',\n> 'media_device_test.cpp', -                               link_with :\n> test_libraries,\n> -                               include_directories :\n> test_includes_internal) +media_device_tests = [\n> +    ['media_device_test',   'media_device_test.cpp'],\n> +]\n> \n> -test('Media Device Test', media_device_test)\n> +foreach t : media_device_tests\n> +    exe = executable(t[0], t[1],\n> +                     link_with : test_libraries,\n> +                     include_directories : test_includes_internal)\n> +\n> +    test(t[0], exe, suite: 'media_device', is_parallel: false)\n> +endforeach","headers":{"Return-Path":"<laurent.pinchart@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 9778560B30\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  2 Jan 2019 10:22:27 +0100 (CET)","from avalon.localnet (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C0A08505;\n\tWed,  2 Jan 2019 10:22:24 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1546420944;\n\tbh=Jzyu6CHr94zcRxnZMClzUl/9Sf0+wmKLKZ+WDk/ehOQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=tfJMF5YhxWMg2TJP0TzatFMUZjj0HXii7U8UF1XihC1bjGBgVz1MQXkP+M7gO6l0G\n\tyq7w7rsBi8pD6l81j8WNK6K1LwcdfSvQ+G3rfr0oYDIkY54RjYEzEIh6YHznYR//Df\n\t/elZIeq1Wcx1/RTpNRqLCOzQCGKWZ6BF3HUfVnIc=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 02 Jan 2019 11:23:25 +0200","Message-ID":"<2325826.GxQroJkNAk@avalon>","Organization":"Ideas on Board Oy","In-Reply-To":"<20190101212947.28098-5-kieran.bingham@ideasonboard.com>","References":"<20190101212947.28098-1-kieran.bingham@ideasonboard.com>\n\t<20190101212947.28098-5-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"7Bit","Content-Type":"text/plain; charset=\"us-ascii\"","Subject":"Re: [libcamera-devel] [PATCH 4/5] test: media_device: Convert to\n\tforeach","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":"Wed, 02 Jan 2019 09:22:27 -0000"}},{"id":182,"web_url":"https://patchwork.libcamera.org/comment/182/","msgid":"<2e14ad56-bf93-f1ca-6321-30b2cc88935e@ideasonboard.com>","date":"2019-01-02T13:52:31","subject":"Re: [libcamera-devel] [PATCH 4/5] test: media_device: Convert to\n\tforeach","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 02/01/2019 09:23, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Tuesday, 1 January 2019 23:29:46 EET Kieran Bingham wrote:\n>> Prevent duplication of boilerplate code as the suite grows by\n>> establishing the foreach pattern in the media_device test suite.\n> \n> This results in duplicating the code for the foreach pattern though. I wonder \n> whether we could do better. How about something like\n\nI appreciate there is duplication of the foreach pattern ... however\nthis should be constant per 'test suite', and allows tests to be added\nwith a single line as opposed to duplicating the 4/5 lines of\nexecutable()/test() specifications.\n\n\n\n> diff --git a/test/media_device/meson.build b/test/media_device/meson.build\n> index a7ebed102e24..5f14197b005f 100644\n> --- a/test/media_device/meson.build\n> +++ b/test/media_device/meson.build\n> @@ -1,5 +1,3 @@\n> -media_device_test = executable('media_device_test', 'media_device_test.cpp',\n> -                               link_with : test_libraries,\n> -                               include_directories : test_includes_internal)\n> -\n> -test('Media Device Test', media_device_test)\n> +internal_tests += [\n> +    ['media_device_test',   files(['media_device_test.cpp'])],\n> +]\n\nIMO this isn't better.\n\nEither, the media_device_test is a single file test, in which case it\ncan live in the test/ directory and be added directly to the\ninternal_tests in test/meson.build, without the need for the\ntest/media_device directory or the media_device will have multiple tests\nwhich will be part of a suite, and should have the\n  \"suite: 'media_device'\" parameter added to test().\n\nLooking at the media_device_test.cpp I think it should already be split\nup into unit tests, as at the moment it just 'does a bunch of arbitrary\nstuff' - so while it exercises the code - it doesn't really 'unit-test'.\n\nWe could add this to the array, perhaps - but I expect 'suite specific'\nhelpers would be added (please see my kbingham/v4l2 branch for how I\nhave added extra tests to the suite there).\n\nSo either we have every parameter in the array, or we have suite\nspecific implementations.\n\nAt the moment I prefer the suite specific ... what is your take?\n\n\n> diff --git a/test/meson.build b/test/meson.build\n> index 184a7eeb5e27..69e4855013ec 100644\n> --- a/test/meson.build\n> +++ b/test/meson.build\n> @@ -1,7 +1,5 @@\n>  subdir('libtest')\n>  \n> -subdir('media_device')\n> -\n>  public_tests = [\n>      ['list',            'list.cpp'],\n>  ]\n> @@ -9,6 +7,8 @@ public_tests = [\n>  internal_tests = [\n>  ]\n>  \n> +subdir('media_device')\n> +\n>  foreach t : public_tests\n>      exe = executable(t[0], t[1],\n>                       link_with : test_libraries,\n> \n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  test/media_device/meson.build | 14 ++++++++++----\n>>  1 file changed, 10 insertions(+), 4 deletions(-)\n>>\n>> diff --git a/test/media_device/meson.build b/test/media_device/meson.build\n>> index a7ebed102e24..d9394b0545d8 100644\n>> --- a/test/media_device/meson.build\n>> +++ b/test/media_device/meson.build\n>> @@ -1,5 +1,11 @@\n>> -media_device_test = executable('media_device_test',\n>> 'media_device_test.cpp', -                               link_with :\n>> test_libraries,\n>> -                               include_directories :\n>> test_includes_internal) +media_device_tests = [\n>> +    ['media_device_test',   'media_device_test.cpp'],\n>> +]\n>>\n>> -test('Media Device Test', media_device_test)\n>> +foreach t : media_device_tests\n>> +    exe = executable(t[0], t[1],\n>> +                     link_with : test_libraries,\n>> +                     include_directories : test_includes_internal)\n>> +\n>> +    test(t[0], exe, suite: 'media_device', is_parallel: false)\n>> +endforeach\n>","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 5844660B0C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  2 Jan 2019 14:52:36 +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 907F7505;\n\tWed,  2 Jan 2019 14:52:35 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1546437155;\n\tbh=h6NnTI/5PO8LZhl/MsUo1Sw+5xF8kitpKf3wSp6P9IA=;\n\th=Reply-To:Subject:To:References:From:Date:In-Reply-To:From;\n\tb=OPRfgBynsMLtP0wHVvhG/Cm5R4jfiXeftoPx3PTS2ogR2cojy6IjxlVH9dBeTaYIE\n\tzh3pslw4KoT9e0QP14vu869nRbCbcR0XHijVsWJ8YvhAHNkeEa+zV35fxk0zFZrc2T\n\t2xxxR8qAINtKf0ym7NKrOGOuAhp57zHyuOafwI8g=","Reply-To":"kieran.bingham@ideasonboard.com","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20190101212947.28098-1-kieran.bingham@ideasonboard.com>\n\t<20190101212947.28098-5-kieran.bingham@ideasonboard.com>\n\t<2325826.GxQroJkNAk@avalon>","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\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAkAEEwEKACoCGwMFCwkI\n\tBwIGFQgJCgsCBBYCA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YaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA\n\tJxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q\n\tsbsRB8KNNvVXBOVNwko86rQqF9drZuw=","Organization":"Ideas on Board","Message-ID":"<2e14ad56-bf93-f1ca-6321-30b2cc88935e@ideasonboard.com>","Date":"Wed, 2 Jan 2019 13:52:31 +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":"<2325826.GxQroJkNAk@avalon>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 4/5] test: media_device: Convert to\n\tforeach","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":"Wed, 02 Jan 2019 13:52:36 -0000"}},{"id":286,"web_url":"https://patchwork.libcamera.org/comment/286/","msgid":"<2242616.KMaOTZFIXP@avalon>","date":"2019-01-11T15:15:35","subject":"Re: [libcamera-devel] [PATCH 4/5] test: media_device: Convert to\n\tforeach","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Wednesday, 2 January 2019 15:52:31 EET Kieran Bingham wrote:\n> On 02/01/2019 09:23, Laurent Pinchart wrote:\n> > On Tuesday, 1 January 2019 23:29:46 EET Kieran Bingham wrote:\n> >> Prevent duplication of boilerplate code as the suite grows by\n> >> establishing the foreach pattern in the media_device test suite.\n> > \n> > This results in duplicating the code for the foreach pattern though. I\n> > wonder whether we could do better. How about something like\n> \n> I appreciate there is duplication of the foreach pattern ... however\n> this should be constant per 'test suite', and allows tests to be added\n> with a single line as opposed to duplicating the 4/5 lines of\n> executable()/test() specifications.\n> \n> > diff --git a/test/media_device/meson.build b/test/media_device/meson.build\n> > index a7ebed102e24..5f14197b005f 100644\n> > --- a/test/media_device/meson.build\n> > +++ b/test/media_device/meson.build\n> > @@ -1,5 +1,3 @@\n> > -media_device_test = executable('media_device_test',\n> > 'media_device_test.cpp',\n> > -                               link_with : test_libraries,\n> > -                               include_directories :\n> > test_includes_internal)\n> > -\n> > -test('Media Device Test', media_device_test)\n> > +internal_tests += [\n> > +    ['media_device_test',   files(['media_device_test.cpp'])],\n> > +]\n> \n> IMO this isn't better.\n> \n> Either, the media_device_test is a single file test, in which case it\n> can live in the test/ directory and be added directly to the\n> internal_tests in test/meson.build, without the need for the\n> test/media_device directory or the media_device will have multiple tests\n> which will be part of a suite, and should have the\n>   \"suite: 'media_device'\" parameter added to test().\n> \n> Looking at the media_device_test.cpp I think it should already be split\n> up into unit tests, as at the moment it just 'does a bunch of arbitrary\n> stuff' - so while it exercises the code - it doesn't really 'unit-test'.\n> \n> We could add this to the array, perhaps - but I expect 'suite specific'\n> helpers would be added (please see my kbingham/v4l2 branch for how I\n> have added extra tests to the suite there).\n> \n> So either we have every parameter in the array, or we have suite\n> specific implementations.\n> \n> At the moment I prefer the suite specific ... what is your take?\n\nWe could do something like\n\ninternal_tests += [\n    ['media_device_test', 'media_device_test', \nfiles(['media_device_test.cpp'])],\n]\n\nwhere arg[0] is the suite name, arg[1] the test name, and arg[2] the files(). \nThis would allow having a single foreach loop in test/meson.build.\n\nOn the other hand it wouldn't work if we have to link with a suite-specific \nlibrary.\n\nI'd really prefer if all tests from a single suite were compiled as a single \nbinary. This would avoid duplicating instances of helpers in all test \nbinaries. That's something that could be fixed later though, we're still \nmissing proper infrastructure for this. We should however not delay this \ndevelopment for too long otherwise we'll have too many \"legacy\" tests to port.\n\n> > diff --git a/test/meson.build b/test/meson.build\n> > index 184a7eeb5e27..69e4855013ec 100644\n> > --- a/test/meson.build\n> > +++ b/test/meson.build\n> > @@ -1,7 +1,5 @@\n> > \n> >  subdir('libtest')\n> > \n> > -subdir('media_device')\n> > -\n> >  public_tests = [\n> >      ['list',            'list.cpp'],\n> >  ]\n> > @@ -9,6 +7,8 @@ public_tests = [\n> >  internal_tests = [\n> >  ]\n> > \n> > +subdir('media_device')\n> > +\n> >  foreach t : public_tests\n> >      exe = executable(t[0], t[1],\n> >                       link_with : test_libraries,\n> >> \n> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >> ---\n> >> \n> >>  test/media_device/meson.build | 14 ++++++++++----\n> >>  1 file changed, 10 insertions(+), 4 deletions(-)\n> >> \n> >> diff --git a/test/media_device/meson.build\n> >> b/test/media_device/meson.build\n> >> index a7ebed102e24..d9394b0545d8 100644\n> >> --- a/test/media_device/meson.build\n> >> +++ b/test/media_device/meson.build\n> >> @@ -1,5 +1,11 @@\n> >> -media_device_test = executable('media_device_test',\n> >> 'media_device_test.cpp',\n> >> -                               link_with : test_libraries,\n> >> -                               include_directories :\n> >> test_includes_internal)\n> >> +media_device_tests = [\n> >> +    ['media_device_test',   'media_device_test.cpp'],\n> >> +]\n> >> \n> >> -test('Media Device Test', media_device_test)\n> >> +foreach t : media_device_tests\n> >> +    exe = executable(t[0], t[1],\n> >> +                     link_with : test_libraries,\n> >> +                     include_directories : test_includes_internal)\n> >> +\n> >> +    test(t[0], exe, suite: 'media_device', is_parallel: false)\n> >> +endforeach","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 79C1560B31\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 11 Jan 2019 16:14:24 +0100 (CET)","from avalon.localnet (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi\n\t[IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DE64C53E;\n\tFri, 11 Jan 2019 16:14:23 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1547219664;\n\tbh=9pEB07Rs6av7vBMI8KmYB7xMQSJ7Ht8ny2O8reeN/ZI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=I4mBffcew72xv0ciiMt35tMsJzKf+ozIiEkvE3psnlbjhC4z8wmHW/timPpnyares\n\tpk/QrJsoJ13Me9kOUzs2OsiLaSqjtvOrOvL9IzIR4q3Ct2hsNJ7XkxBxwtnYzDhVYO\n\t85L8c0+7SqYjqCvThfWljjBW4vDDGnBXMtGfBeoc=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"kieran.bingham@ideasonboard.com","Cc":"libcamera-devel@lists.libcamera.org","Date":"Fri, 11 Jan 2019 17:15:35 +0200","Message-ID":"<2242616.KMaOTZFIXP@avalon>","Organization":"Ideas on Board Oy","In-Reply-To":"<2e14ad56-bf93-f1ca-6321-30b2cc88935e@ideasonboard.com>","References":"<20190101212947.28098-1-kieran.bingham@ideasonboard.com>\n\t<2325826.GxQroJkNAk@avalon>\n\t<2e14ad56-bf93-f1ca-6321-30b2cc88935e@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"7Bit","Content-Type":"text/plain; charset=\"us-ascii\"","Subject":"Re: [libcamera-devel] [PATCH 4/5] test: media_device: Convert to\n\tforeach","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, 11 Jan 2019 15:14:24 -0000"}}]