{"id":13427,"url":"https://patchwork.libcamera.org/api/patches/13427/?format=json","web_url":"https://patchwork.libcamera.org/patch/13427/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210821144145.3077223-1-vedantparanjape160201@gmail.com>","date":"2021-08-21T14:41:45","name":"[libcamera-devel,v2] test: gstreamer: Disable gstreamer registry forks","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"e8ac90de283c4efb670637beb2c3c5720e9c4069","submitter":{"id":85,"url":"https://patchwork.libcamera.org/api/people/85/?format=json","name":"Vedant Paranjape","email":"vedantparanjape160201@gmail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13427/mbox/","series":[{"id":2381,"url":"https://patchwork.libcamera.org/api/series/2381/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2381","date":"2021-08-21T14:41:45","name":"[libcamera-devel,v2] test: gstreamer: Disable gstreamer registry forks","version":2,"mbox":"https://patchwork.libcamera.org/series/2381/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13427/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13427/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 13075BD87D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 21 Aug 2021 14:42:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6799868895;\n\tSat, 21 Aug 2021 16:42:14 +0200 (CEST)","from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com\n\t[IPv6:2607:f8b0:4864:20::1034])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 842096025E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 21 Aug 2021 16:42:12 +0200 (CEST)","by mail-pj1-x1034.google.com with SMTP id j1so9152569pjv.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 21 Aug 2021 07:42:12 -0700 (PDT)","from localhost.localdomain ([110.226.224.21])\n\tby smtp.googlemail.com with ESMTPSA id\n\tb20sm10199456pfl.9.2021.08.21.07.42.09\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 21 Aug 2021 07:42:10 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"b1UQjcy1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=PMNJWnJyzUTvcBmB3vK9FpV0+s/r993rcOkFR6rhk00=;\n\tb=b1UQjcy1eNNUjo9zw9Lm8SD9+4r+nCmSfiSg7MPgsXpFC/nTxS4cqBSm7crihtAYDq\n\tStQIHYVlJo7Xt7RY5DzgtMComnwVp/YwVuFOtHkP/4Az2Q8YYpbc0lBWjTn7sY2qndqb\n\tTEkKVYzg8zx9q1o8FpnlcZAQts4OsmC4iZmwjHHK+klgozW8yY7Prz/n1MmKqTqh8OiD\n\tier2miqSxKYLp5hBtJEm6lzWpOI0TG2tlytBk5aA/v9Gi6HNR7yh64IANxr9RfiAJ5LC\n\t/W+OcKY4Mu9f/E9I0k6AA0nf7hvK9WqbWp+c8C9APq+4D7TEDSXMbqtPk0m/wMeKaoRl\n\tx2NA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=PMNJWnJyzUTvcBmB3vK9FpV0+s/r993rcOkFR6rhk00=;\n\tb=kSaUY/efWYN2eEV8yAvRBpsfYJq6kFIjLKA7b2JIGWH9X8uxr1E/rts+93b+JwPFX5\n\tHGipsjXp2g7OqW/s4alGvK1v/PNO/zAWy4J8GojHFsEil+0Hbik3OBpkGBTJpODopQAX\n\tD1GW/UWvXvzOa5+u6VNGeFIO5jkE2IWhVg2ogUMg7qiYfJjoKRHyTtK4cdM0OrMIwLcc\n\t455GokfBBZ4o4AcUaSarEFlWXPlQvB6vGy5rxG0OWQsFdFsgUlFPsyJBsY9VpkV5EWHO\n\tA8B2eqdc8ZMUOA9o8Mx69f+UQp2MyLy9U3DBEHcrdbYJ3+REG9TLKLDbTVGwxJG/IYA9\n\t1vIQ==","X-Gm-Message-State":"AOAM530zbaVR5cx1k37YskOy3/XsvoLD4oRT+nJn8I2o4lUs//SL9szZ\n\tkXx8S1xjUSy3VLhCNh1F1vf7i2j2bdIZHA==","X-Google-Smtp-Source":"ABdhPJyTA4CRnxWFYSb1QrnD1jcLvWVZHHU/2v7sQcxgMqiMYLAltYO2Pg0LVhh+AwHxbPoV7UeHGQ==","X-Received":"by 2002:a17:90b:3ec3:: with SMTP id\n\trm3mr10005528pjb.7.1629556930663; \n\tSat, 21 Aug 2021 07:42:10 -0700 (PDT)","From":"Vedant Paranjape <vedantparanjape160201@gmail.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Sat, 21 Aug 2021 20:11:45 +0530","Message-Id":"<20210821144145.3077223-1-vedantparanjape160201@gmail.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2] test: gstreamer: Disable gstreamer\n\tregistry forks","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>","Cc":"Vedant Paranjape <vedantparanjape160201@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"ASan needs to be loaded first before gstreamer is loaded. This was not\npossible, so verify_asan_link_order was disabled. Better way to tackle\nthis issue was disabling forks on the gstreamer side.\n\nverify_asan_link_order=0 disables the check on ASan side which checks if\nASan was loaded before any other DLLs. Since, gstreamer spawns a child\nhelper process while building the registry, we needed to disable this\ncheck. But with gst_registry_fork_set_enabled() it is possible to\ndisable spawning this child helper process, so this ensures that ASan is\nloaded before any other DLL is loaded.\n\nSigned-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n---\n test/gstreamer/gstreamer_single_stream_test.cpp | 17 ++++++-----------\n 1 file changed, 6 insertions(+), 11 deletions(-)","diff":"diff --git a/test/gstreamer/gstreamer_single_stream_test.cpp b/test/gstreamer/gstreamer_single_stream_test.cpp\nindex 349dcfa4..80e652eb 100644\n--- a/test/gstreamer/gstreamer_single_stream_test.cpp\n+++ b/test/gstreamer/gstreamer_single_stream_test.cpp\n@@ -41,18 +41,13 @@ protected:\n \t\t * GStreamer is most likely not, this will cause the ASan link\n \t\t * order check to fail when gst-plugin-scanner dlopen()s the\n \t\t * plugin as many libraries will have already been loaded by\n-\t\t * then. Work around this issue by disabling the link order\n-\t\t * check. This will only affect child processes, as ASan is\n-\t\t * already loaded for this process by the time this code is\n-\t\t * executed, and should thus hopefully be safe.\n-\t\t *\n-\t\t * This option is not available in gcc older than 8, the only\n-\t\t * option in that case is to skip the test.\n+\t\t * then. Work around this issue by disabling spawning of a\n+\t\t * child helper process when rebuilding the registry. This will\n+\t\t * only affect child processes, as ASan is already loaded for\n+\t\t * this process by the time this code is executed, and should\n+\t\t * thus hopefully be safe.\n \t\t */\n-#if defined(__SANITIZE_ADDRESS__) && !defined(__clang__) && __GNUC__ < 8\n-\t\treturn TestSkip;\n-#endif\n-\t\tsetenv(\"ASAN_OPTIONS\", \"verify_asan_link_order=0\", 1);\n+\t\tgst_registry_fork_set_enabled(false);\n \n \t\t/* Initialize GStreamer */\n \t\tg_autoptr(GError) errInit = NULL;\n","prefixes":["libcamera-devel","v2"]}