[{"id":3358,"web_url":"https://patchwork.libcamera.org/comment/3358/","msgid":"<20200107185456.GC533370@oden.dyn.berto.se>","date":"2020-01-07T18:54:56","subject":"Re: [libcamera-devel] [PATCH 01/14] test: object-invoke: Test\n\tdirect invocation","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your patch.\n\nOn 2020-01-04 07:09:34 +0200, Laurent Pinchart wrote:\n> Test the ConnectionTypeDirect type when the object lives in a different\n> thread. This test passes but generates a memory leak.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  test/object-invoke.cpp | 21 +++++++++++++++++++++\n>  1 file changed, 21 insertions(+)\n> \n> diff --git a/test/object-invoke.cpp b/test/object-invoke.cpp\n> index f9a8bea9dce2..ed16de99ef5e 100644\n> --- a/test/object-invoke.cpp\n> +++ b/test/object-invoke.cpp\n> @@ -123,6 +123,27 @@ protected:\n>  \t\t\treturn TestFail;\n>  \t\t}\n>  \n> +\t\t/* Test that direct method invocation bypasses threads. */\n> +\t\tobject_.reset();\n> +\t\tobject_.invokeMethod(&InvokedObject::method,\n> +\t\t\t\t     ConnectionTypeDirect, 42);\n> +\n> +\t\tswitch (object_.status()) {\n> +\t\tcase InvokedObject::NoCall:\n> +\t\t\tcout << \"Method not invoked for custom thread\" << endl;\n> +\t\t\treturn TestFail;\n> +\t\tcase InvokedObject::CallReceived:\n> +\t\t\tcout << \"Method invoked in incorrect thread for direct call\" << endl;\n> +\t\t\treturn TestFail;\n> +\t\tdefault:\n> +\t\t\tbreak;\n> +\t\t}\n> +\n> +\t\tif (object_.value() != 42) {\n> +\t\t\tcout << \"Method invoked with incorrect value for direct call\" << endl;\n> +\t\t\treturn TestFail;\n> +\t\t}\n> +\n>  \t\t/*\n>  \t\t * Test invoking a method that takes reference arguments. This\n>  \t\t * targets compilation, there's no need to check runtime\n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lj1-x244.google.com (mail-lj1-x244.google.com\n\t[IPv6:2a00:1450:4864:20::244])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B98F36063B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  7 Jan 2020 19:54:58 +0100 (CET)","by mail-lj1-x244.google.com with SMTP id j26so615089ljc.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 07 Jan 2020 10:54:58 -0800 (PST)","from localhost (h-93-159.A463.priv.bahnhof.se. [46.59.93.159])\n\tby smtp.gmail.com with ESMTPSA id\n\ts13sm207733lje.35.2020.01.07.10.54.56\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 07 Jan 2020 10:54:57 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=xTXl0mI1aJsLZ69MTNo/3++36FPrTP1v35dB5Z1HX2c=;\n\tb=GAUW/BjzGEeEHjMyuEVVmeztRHXVh/cAkTxw2YBafK0q+QAwuzEqcpKs0fKrPxANiZ\n\t6Di94ngj7Yp++I6euZA4zpxhzo8uqSnaoNvDozwewsF5cRsXgQAIVugE4HluDM/BIDyM\n\tVpzcZBzicoVY8TLcBnGNK3IzaZaiB8lDT02eRdENgJdi+OVHWv6Lts68rgqc9MFbLCfV\n\tmDEdygxQz8i8oo1tcLGsTK5d+FraFr7iQqgbYabEm8QOnCw2PRuZIcvgKSMgEKCE2349\n\tnaWnRyzKFOMDezOgsmgJ9fo6e5Tg2gXPE2n5zZNGVJXdaewmu9/BMYE/gdGcaWpdkkS9\n\tuqzQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=xTXl0mI1aJsLZ69MTNo/3++36FPrTP1v35dB5Z1HX2c=;\n\tb=jCjWVsBKUIGfvvWtcatOK0ydVjzeyZRtHQtUQNOi6KpFdw7uZczdAUOhewPc0Ltc0M\n\t0/MbgwFG/xc9Hbj0G+MxRFDH5JDfN1hCEmRVnllAlh4JcTqdtrODmlZa12ZHznfTKaYC\n\tJYeJePPwexg4f0LQsHlCLcUFhnEVYwvY9R1hA1jzc++dKneTlxJ+ESt+DUzaPIfS9Eby\n\tLjGhJz+JvdKU76SWy/PQ4Wd058vQgB/UKK7gC2t+NqDDjOVFdQIEHLK9h5/wbHnxOizE\n\tM/APMNiOVyFnQK8Ha9WO0QAMjf497Vmv3oQ8UIJU+mEusPRS+FuJErkrI1HUdUaZ4SG6\n\tmgNA==","X-Gm-Message-State":"APjAAAUkC2v5zPO8yayfK3MBYg4hXNC4Q+NhAuI2x55beJZyyD04kYTx\n\tz7izSqfI0XR9WBDuTa+KpirOYHf+76dJsg==","X-Google-Smtp-Source":"APXvYqyF4qMGQbDWdKKXIUVOBeV51aV+XlmnmjoK1i22vvNlzftZxKHomRmcRtOfY+uJNNNiwwE6Sw==","X-Received":"by 2002:a2e:6f19:: with SMTP id k25mr528985ljc.84.1578423298130; \n\tTue, 07 Jan 2020 10:54:58 -0800 (PST)","Date":"Tue, 7 Jan 2020 19:54:56 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20200107185456.GC533370@oden.dyn.berto.se>","References":"<20200104050947.7673-1-laurent.pinchart@ideasonboard.com>\n\t<20200104050947.7673-2-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200104050947.7673-2-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 01/14] test: object-invoke: Test\n\tdirect invocation","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>","X-List-Received-Date":"Tue, 07 Jan 2020 18:54:58 -0000"}}]