From patchwork Wed Jan 14 18:54:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 78744 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C681D39012 for ; Wed, 14 Jan 2026 18:55:47 +0000 (UTC) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.18034.1768416939937601719 for ; Wed, 14 Jan 2026 10:55:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MU+0Gokw; spf=pass (domain: gmail.com, ip: 209.85.128.45, mailfrom: uvv.mail@gmail.com) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-47ee3a63300so1398335e9.2 for ; Wed, 14 Jan 2026 10:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768416938; x=1769021738; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7S/Z3CFLXWb0zdsMUS/hHcAyrdwwwoC7n0a5vE+Ft/A=; b=MU+0GokwhAsldROxwz0G/iL4nHuw846Y9SpyX7iFq9ILl1pOTAbgrOQk7q3H+S/mt6 v4j6thcFgdakUx2thyz8iRi95zknwTJ63LjAd71AnXUJpJyKS3LllIQCAd1ltxUljw/u 2H0ja+1QQ3S1rLjMwtJkuWH8i0xT8V5b2069mVvm8PPsPAgtHcfA9YBGDHnQ5lzJqzfw EbbgXqGUX0mukqSuhnTit6QrJGTezg/9jaI0aun8/r3S5wGWBETFxTPEvCl8d5xspp4s 0y07qk6++w7YmAh0I27f+pZyAUkQrY89IdwFYqLW19p7wtctc5vHxklS3JKb5NbgDda0 zf+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768416938; x=1769021738; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7S/Z3CFLXWb0zdsMUS/hHcAyrdwwwoC7n0a5vE+Ft/A=; b=LnyadE6d9BBKd/AE5ClTUOfRpbkYnnkRkcbI/gmsY3f+VPTafSCMKbmSqrXNrQyiqW 3LilUZzZ38ZsHaIHcrBNc4qu7KVUhYqndKmFhnnFY7I3sXVArl0wrY+GZMod0cpi8iNu sG7gfJDrL1Tg0p/rBwCUfQj38pk9Qy+oFFLt+q6x9A2szGygRjhYMnhldK78iz9/yGmB Eu0i98q5afgbcvQRYV2QzzbIPV32o1zr/FGNdCd8euLhcaAFCIPTomGEnP1/UmPKQmHo vszmEs9IaupPagq8dsgZ+W0cHbz19HXU1LfrgUsbHqEPYkDb2jlVXG9V60EFmyjKasGB zAug== X-Gm-Message-State: AOJu0YwH5gMlEakb0hcRlkYPtxQceXPCNk70uS/nL4967mINJy2ijZHg ZS94hx+ndPqNGClKPs83m+bPjHAJhkK5hxSIXpx2Sd7qIfib/Ymle5Zp5+dTeSBS X-Gm-Gg: AY/fxX4i+ugbqAwmQXnNTSbuOZrvTcDBJ4IJwFcXKZGqAzc7VIe7g9lCyWn6MIvwjcg R27QFDghjgO9zN2A/TzAA1h7F/y8ajzD05VDbpn9m7f/Gtq40vuJvYCZoTwFZxXy55MfTUOmVOa gj54kUhdiiUP1CxD4L+ifWKu6IQSbWurvH9M9DpDCF+KdlO5S3Rn3i0UBPUiYEtmggB3JJTpwX7 ehE4SJSvAvTcOr5Tk2G6k9itHZNsx7c3pEq2NRx2X+0HQvrK/eQwgEMVfa/sVuZWCnXRenxaU6f VBYSb8q7rMrtmde/8JqZssMo9RCClahnO21IYhXD14J1N4d+ltOCogvhN+73yfrctIWeeWFs07b Qg37fgKtK4pUum0RQ7W6tSUZosR+H1frerkmEB/Pm0M5qhb8FMOwEfCHhV31zuB4zVMkNKD5neH aawIr0zzBazkBv X-Received: by 2002:a05:600c:548c:b0:477:fcb:2256 with SMTP id 5b1f17b1804b1-47ee3371876mr49079985e9.17.1768416937739; Wed, 14 Jan 2026 10:55:37 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f428be2b6sm5586085e9.9.2026.01.14.10.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jan 2026 10:55:37 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH v3 1/3] overlayfs: Fix the QA skip for ignored mounts Date: Wed, 14 Jan 2026 18:54:12 +0000 Message-ID: <20260114185508.380709-2-uvv.mail@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260114185508.380709-1-uvv.mail@gmail.com> References: <20260114185508.380709-1-uvv.mail@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Jan 2026 18:55:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/229369 From: Vyacheslav Yurkov The supressing of QA check for mounts should happens twice, at parsing stage and at rootfs postprocessing. If the mount point is configured to be skipped, but it is still present in the configuration (machine or distro), then the parsing would complain. Signed-off-by: Vyacheslav Yurkov --- meta/lib/oe/overlayfs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe/overlayfs.py b/meta/lib/oe/overlayfs.py index 5a5ea03d45..3805746d90 100644 --- a/meta/lib/oe/overlayfs.py +++ b/meta/lib/oe/overlayfs.py @@ -33,7 +33,8 @@ def unitFileList(d): # check that we have required mount points set first requiredMountPoints = d.getVarFlags('OVERLAYFS_WRITABLE_PATHS') for mountPoint in requiredMountPoints: - if mountPoint not in overlayMountPoints: + qaSkip = (d.getVarFlag("OVERLAYFS_QA_SKIP", mountPoint) or "").split() + if mountPoint not in overlayMountPoints and not "mount-configured" in qaSkip: bb.fatal("Missing required mount point for OVERLAYFS_MOUNT_POINT[%s] in your MACHINE configuration" % mountPoint) for mountPoint in overlayMountPoints: From patchwork Wed Jan 14 18:54:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 78743 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E630D3900B for ; Wed, 14 Jan 2026 18:55:47 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.18016.1768416940894856595 for ; Wed, 14 Jan 2026 10:55:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Q58Rm9t+; spf=pass (domain: gmail.com, ip: 209.85.128.47, mailfrom: uvv.mail@gmail.com) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-47f5c2283b6so740655e9.1 for ; Wed, 14 Jan 2026 10:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768416939; x=1769021739; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tf/d5/rNSFuUPZ1RytwlE3TNP/F1A9vwqZKBTyPL8kI=; b=Q58Rm9t+kuqQGiF8L9lnKSVI5lOtnpw1z8/bPKZ7KfHgmKuNectJNj2j8dFy4/yFA/ ztJR7HGWAvbKgT49Fj3VuCxQp99sNh/1UFrvkf3XRghc/Wv1aoSYGQjtKj7P/WlUqSOq IyumgXF73kvrggoMxxtLQ6y9fBYNr/OHcqH3fT5U+zKX+Hxx/qLVySEMCS12at6A3wXc Wgq9zUK1edAcd4m0S9zFh4fOB2WY1VUwfxPmHM2w5h6I4wCb1aEw9Iua6pPTd+Ht90ID 6LBDEiLCjaEKYtSOvRikoLODgMmXA5oHPxWpgUL2dwq7qoI4PDVL5+LlImG3nyYESDjy +xXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768416939; x=1769021739; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tf/d5/rNSFuUPZ1RytwlE3TNP/F1A9vwqZKBTyPL8kI=; b=vDVLH2VM1n1wMPKI1/cbvqXzuCpWluH8cXDRpJhPcSY+nbP6eUiEIhYqeuHjS2h9bI VeITGCptkvIUMRuUsaLA2EBmTCMHmVH/wOklEqIYlM0TKXzBghtavXKYKiOsoGoV6Qn1 ce0F+3+2kBo0fpJEg9ue7K6GWoVxHKDYvuYB5++bJNElXFlP/KAUCwoUL++jYxfVruxB rElZdoLisfBGadc4tG7RBZ1VNhYv32zpbH8OjB92OMTkZLRuB3FCb5/D/wWqBDEKE2nx XZh0+pnEZbcoeuxY1Vd+EurpN82/ydohpT1F1ArehlSx9IFeNjJcAlligcK0IWkyEy5k Cj9A== X-Gm-Message-State: AOJu0Yy/m6FVH+SgzkShJdtCf5Kf/yk0gn3c0gn9n2aJrTnuSVnILxd2 iTskmpF7QE6NAoXr7yfJoD4wxAaQ8iJdMt7rQzTT+Mpw//S/kKfW0WMcYfE9YxLf X-Gm-Gg: AY/fxX6v+NiNMBXCRsHqMIOy+CF2frTXCKI+ebTx329uUKiJvTfGj99hoKCaFLbVXqH QHVfZfTWIR+QjianvwoDjC08RO712GsVLrGWdBYLXgpAwGPgtu0W975yWKD3YPi1yp9a6mAaUbL GHMfU9HhT/9y6YD37yXUraQfTiqsbet0EeUz4bYGo3fceJ6KuM6PMhM5TGPWssqrImTXkwU5I9h SqOEzn4I2GLVZuyAS/FC1AA2FQhy5cyJ8pWoMx9Czl31fdSH8KYJC0el+gDTJNGkFmJuXcm0/h0 wqyN13AEsbIgk8oLcT3lkyinYbnNPgWdBTXkV1xxg2jF8DcFJn9+y4RTuULNVKOlP2dJ6n+W+Mi F82E/1lEcyUGDbTXmhDZ4wOqnjipQJCj2VrwErPOS95Jlgo4u+UOYmb3rfXyAC5oT2izDgUk2lT 1xCUhV7wm6cgCjfrsSYKsgZAg= X-Received: by 2002:a05:600c:34cd:b0:47d:403e:9cd5 with SMTP id 5b1f17b1804b1-47ee32fc8cdmr41699625e9.11.1768416938568; Wed, 14 Jan 2026 10:55:38 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f428be2b6sm5586085e9.9.2026.01.14.10.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jan 2026 10:55:38 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH v3 2/3] oe-selftest: overlayfs: Make the test more deterministic Date: Wed, 14 Jan 2026 18:54:13 +0000 Message-ID: <20260114185508.380709-3-uvv.mail@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260114185508.380709-1-uvv.mail@gmail.com> References: <20260114185508.380709-1-uvv.mail@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Jan 2026 18:55:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/229370 From: Vyacheslav Yurkov The test orignally was written under assumption that poky distro is used. When poky-altcft is used for example, then systemd is already set in DISTRO_FETURES, which the test did not expect. Signed-off-by: Vyacheslav Yurkov --- meta/lib/oeqa/selftest/cases/overlayfs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/overlayfs.py b/meta/lib/oeqa/selftest/cases/overlayfs.py index 580fbdcb9c..3e55e97927 100644 --- a/meta/lib/oeqa/selftest/cases/overlayfs.py +++ b/meta/lib/oeqa/selftest/cases/overlayfs.py @@ -5,7 +5,7 @@ # from oeqa.selftest.case import OESelftestTestCase -from oeqa.utils.commands import bitbake, runqemu, get_bb_vars +from oeqa.utils.commands import bitbake, runqemu, get_bb_vars, get_bb_var from oeqa.core.decorator import OETestTag from oeqa.core.decorator.data import skipIfNotMachine @@ -46,7 +46,8 @@ inherit overlayfs res = bitbake('core-image-minimal', ignore_status=True) line = getline(res, "overlayfs-user was skipped: missing required distro features") self.assertTrue("overlayfs" in res.output, msg=res.output) - self.assertTrue("systemd" in res.output, msg=res.output) + if not "systemd" in get_bb_var('DISTRO_FEATURES'): + self.assertTrue("systemd" in res.output, msg=res.output) self.assertTrue("ERROR: Required build target 'core-image-minimal' has no buildable providers." in res.output, msg=res.output) def test_not_all_units_installed(self): From patchwork Wed Jan 14 18:54:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vyacheslav Yurkov X-Patchwork-Id: 78745 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C8B2D3900E for ; Wed, 14 Jan 2026 18:55:47 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.18036.1768416941367005815 for ; Wed, 14 Jan 2026 10:55:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QLrs6Uen; spf=pass (domain: gmail.com, ip: 209.85.128.51, mailfrom: uvv.mail@gmail.com) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-47ee76e8656so2015445e9.0 for ; Wed, 14 Jan 2026 10:55:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768416939; x=1769021739; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L5kR8OSwbwbyvU1F65LcDbCo12d4ev5DGQDKNw20SI0=; b=QLrs6Uen2s1rRUFIyvHKQe7nuBmQ+iD+doRMpJYGytPjtKUJhsGUJvObgeF/32ASW1 YDvwPgy+BosAfWne2LKZB2+E7DenfinnSiY+LfzmOwDwmmqI/fCFSEHaN5ftwmzOLc/f /Wk4yCw2vrHFsv584UsGpwiI1uHAxegUdXVbukTA+v6rCXJXMPEC6fXApFpq3fCfyT/4 yPs03RXnGZCwkm9GZIHaRXV4kXFPAQe5yIlxjxPJx0td4sHHnWmjPZiGoholyBcfCE/3 4M+vrbqwppY77tqWzbc7fF68VRibCmrZeX+e9V3rxPaoeBrYHc0N78Li/19t0Csi+cmX LN7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768416939; x=1769021739; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=L5kR8OSwbwbyvU1F65LcDbCo12d4ev5DGQDKNw20SI0=; b=Mx9bT9ZP61KDUNh4qBPKcPDKWlB+Y7C6OmSIglixCI9UI3rXVtIfKaJOCzfHxKEs5n lsKajm+Lya72XTta51UifmsFw01Bj5kc3CzVjWqCj4vB5ipUQskwZlgouP5yMre9WXod LTxF5jJWrqvj+asQ5VVe1z8Nhvkw7l4CXaQX7ciaRn0gElMlod1u+xc+X39Gyu1eDrmX wayq7bmlM4yq5WYz0Ahee+6qXGOuA6XxkHE/Eg4v8wcPV4wV52/lA7Mjlt2vApg43qGg PCMU7yTXpmPfMoOkeaxrisQtYmmYo4GXyfsOkEWO8RqxB0G95jfQYdXZVCIi+AUwbgMT DcdQ== X-Gm-Message-State: AOJu0Yy5I0Y9X17pngb1vC4fXkkrk65EOzOXiFhgjBqE9/RUx5m9gsbw aVo1J2xp31MJz+/UyENhgbTyiNnl5138zKCK6kIB3ScuWIEPjQa3S3o87IHHqs/2 X-Gm-Gg: AY/fxX4+FWEm64L+eJ6MaK8yWDMVg74ez3m/CGr9R2Qp1W23oeOMBxscMerCnoNzTzB J1vPDBFViPX2aCnpV4OWeURvXhJZQK02ui71xvmiU5b98zcNPq5IsUd15uy7IxCcLuhus3g6Igj Tm+A+LuNh3ZAsn5qtyNpyFUFuhZw/xmP8xRfqw5WGIXOapBVs/nK/N1/xdlh/It1e9wJTdT9wRW mb9fvkczi393oTwxe17B+rAEGf6kx1zLmXoU5GfD3XKctkrpGLEF8aOQc+8Ra+dEO67cdvsGGjO 4jZSJuKztMjWmhp6R/z6RHvqGtoLLCf31vVWvOnLg+3d0T+Oz6iQ/nh8g77cpxdiSGKNb2Ol+tI IMopuFiznFVaxZ900crFHavbnTKfjK9w+2VQ69VJPED8ur4KN0cZ7Fma0APITLMts6qeqKV6KZr yu45YcFC/LGQFqVmLuWZBNdQI= X-Received: by 2002:a05:600c:548c:b0:477:fcb:2256 with SMTP id 5b1f17b1804b1-47ee3371876mr49080885e9.17.1768416939325; Wed, 14 Jan 2026 10:55:39 -0800 (PST) Received: from Ubuntu-2204-jammy-amd64-base.. ([2a01:4f8:272:3f67::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f428be2b6sm5586085e9.9.2026.01.14.10.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jan 2026 10:55:38 -0800 (PST) From: uvv.mail@gmail.com To: openembedded-core@lists.openembedded.org Cc: Vyacheslav Yurkov Subject: [PATCH v3 3/3] oe-selftest: overlayfs: Add a demo case for /etc Date: Wed, 14 Jan 2026 18:54:14 +0000 Message-ID: <20260114185508.380709-4-uvv.mail@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260114185508.380709-1-uvv.mail@gmail.com> References: <20260114185508.380709-1-uvv.mail@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 14 Jan 2026 18:55:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/229371 From: Vyacheslav Yurkov /etc is a special directory. It's possible to create a mount unit for it, but many system services that start early at boot time will not rescan its content when you mount overlay on top. The added test case demonstrates this by adding a sample systemd service and enabling it in overlay. Signed-off-by: Vyacheslav Yurkov --- meta/lib/oeqa/selftest/cases/overlayfs.py | 98 +++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/overlayfs.py b/meta/lib/oeqa/selftest/cases/overlayfs.py index 3e55e97927..426b4ccee3 100644 --- a/meta/lib/oeqa/selftest/cases/overlayfs.py +++ b/meta/lib/oeqa/selftest/cases/overlayfs.py @@ -263,6 +263,104 @@ EOT self._test_correct_image('systemd-machine-units', systemd_machine_unit_append) + @skipIfNotMachine("qemux86-64", "tests are qemux86-64 specific currently") + def test_etc_mount(self): + """ + Summary: /etc is not supposed to be used with overlayfs.bbclass + Expected: Observe inconsistencies after using etc overlay with a mount unit + Author: Vyacheslav Yurkov + """ + systemd_machine_unit_append = """ +SYSTEMD_SERVICE:${PN} += " \ + data.mount \ + etc.mount \ +" + +do_install:append() { + install -d ${D}${systemd_system_unitdir} + install -d ${D}${ROOT_HOME} + cat < ${D}${systemd_system_unitdir}/etc.mount +[Unit] +Description=OverlayFS mount for /etc directory +DefaultDependencies=no +RequiresMountsFor=/data + +[Mount] +What=overlay +Where=/etc +Type=overlay +Options=lowerdir=/etc,upperdir=/data/overlay/etc,workdir=/data/overlay-workdir/etc +[Install] +WantedBy=local-fs.target +EOT + + cat <${D}${systemd_system_unitdir}/data.mount +[Unit] +Description=Persistent storage partition + +[Mount] +What=/dev/sda3 +Where=/data +Type=ext4 +Options=defaults + +[Install] +WantedBy=local-fs.target +EOT + cat < ${D}${ROOT_HOME}/test-daemon.service +[Unit] +Description=My one-shot task +After=local-fs.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/echo test +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target +EOT +} + +FILES:${PN} += "${ROOT_HOME}" +""" + + config = """ +IMAGE_INSTALL:append = " systemd-machine-units" +DISTRO_FEATURES:append = " overlayfs" + +# Use systemd as init manager +INIT_MANAGER = "systemd" + +# enable overlayfs in the kernel +KERNEL_EXTRA_FEATURES:append = " features/overlayfs/overlayfs.scc" + +IMAGE_FSTYPES += "wic" +WKS_FILE = "overlayfs_etc.wks.in" +OVERLAYFS_ROOTFS_TYPE = "ext4" +""" + + self.write_config(config) + + machine_inc = """ +OVERLAYFS_MOUNT_POINT[etc] = "/etc" +OVERLAYFS_QA_SKIP[mnt-overlay] = "mount-configured" +""" + self.set_machine_config(machine_inc) + self.write_recipeinc('systemd-machine-units', systemd_machine_unit_append) + bitbake('core-image-minimal') + with runqemu('core-image-minimal', image_fstype='wic', discard_writes=False) as qemu: + test_daemon_path = get_bb_var('ROOT_HOME') + '/test-daemon.service' + status, output = qemu.run_serial('cp -f ' + test_daemon_path + ' /etc/systemd/system/') + status, output = qemu.run_serial("systemctl enable test-daemon") + status, output = qemu.run_serial("sync") + with runqemu('core-image-minimal', image_fstype='wic') as qemu: + # Check the test service status. It's enabled and supposed to start, but it didn't + status, output = qemu.run_serial("systemctl is-enabled test-daemon") + self.assertTrue("enabled" in output, msg=output) + status, output = qemu.run_serial("systemctl is-active test-daemon") + self.assertTrue("inactive" in output, msg=output) + @OETestTag("runqemu") class OverlayFSEtcRunTimeTests(OESelftestTestCase): """overlayfs-etc class tests"""