Skip to contentSkip to conversation

fuse3: Add missing runtime deps for ptests

PATCH In review Khem Raj 3 participants 11 messages Feb 22, 2024 – Mar 1, 2024 1 message not in the archive

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 fuse3: Add missing runtime deps for ptests

---
 meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb +4 -2
index 5e532ba7ed..321851da5c 100644
@@ -29,8 +29,10 @@ SRC_URI += " \
 "
 
 RDEPENDS:${PN}-ptest += " \
-        python3-pytest \
-	bash \
+    python3-pytest \
+    python3-looseversion \
+    kernel-module-cuse \
+    bash \
 "
 
 do_install_ptest() {
Signature · 1 line
2.43.2
author
#1 lore raw

PATCH 2/4 python3-looseversion: Add recipe

Needed by fuse3 ptests

---
 .../python3-looseversion_1.3.0.bb                  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 meta-filesystems/recipes-support/python3-looseversion/python3-looseversion_1.3.0.bb
meta-filesystems/recipes-support/python3-looseversion/python3-looseversion_1.3.0.bb new file +14 -0
new file mode 100644
index 0000000000..323ddb4157
@@ -0,0 +1,14 @@
+# Copyright (C) 2024 Khem Raj <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Version numbering for anarchists and software realists"
+HOMEPAGE = "https://github.com/effigies/looseversion"
+LICENSE = "PSF-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d5605fc335ce1bab614032468d0a1e00"
+
+DEPENDS = "python3-hatchling-native"
+SRC_URI[sha256sum] = "ebde65f3f6bb9531a81016c6fef3eb95a61181adc47b7f949e9c0ea47911669e"
+
+inherit pypi python_hatchling
+
+PYPI_PACKAGE = "looseversion"
Signature · 1 line
2.43.2
author
#2 lore raw

PATCH 3/4 sshfs-fuse: Fix ptest builds with python 3.12

In reply to Khem Raj
---
 ...1f8aa0899268ec02b2f54849352df92a3a1d.patch | 34 +++++++++++++++++++
 ...8ae1be99571a88b8439b027abe6349b74658.patch | 31 +++++++++++++++++
 .../sshfs-fuse/sshfs-fuse_3.7.3.bb            |  6 +++-
 3 files changed, 70 insertions(+), 1 deletion(-)
 create mode 100644 meta-filesystems/recipes-filesystems/sshfs-fuse/sshfs-fuse/03ee1f8aa0899268ec02b2f54849352df92a3a1d.patch
 create mode 100644 meta-filesystems/recipes-filesystems/sshfs-fuse/sshfs-fuse/a1d58ae1be99571a88b8439b027abe6349b74658.patch
meta-filesystems/recipes-filesystems/sshfs-fuse/sshfs-fuse/03ee1f8aa0899268ec02b2f54849352df92a3a1d.patch new file +34 -0
new file mode 100644
index 0000000000..63cdc57b44
@@ -0,0 +1,34 @@
+From 03ee1f8aa0899268ec02b2f54849352df92a3a1d Mon Sep 17 00:00:00 2001
+From: Gabriel Staples <[email protected]>
+Date: Tue, 22 Dec 2020 23:33:55 -0800
+Subject: [PATCH] pytest.ini: fix test warning
+
+Warning:
+
+```
+test/util.py:99
+  sshfs/build/test/util.py:99: PytestUnknownMarkWarning: Unknown pytest.mark.uses_fuse - is this a typo?
+  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
+    return pytest.mark.uses_fuse()
+```
+
+References for the fix:
+
+1. https://stackoverflow.com/questions/60806473/pytestunknownmarkwarning-unknown-pytest-mark-xxx-is-this-a-typo/60813297#60813297
+1. https://docs.pytest.org/en/stable/mark.html
+
+Upstream-Status: Submitted [https://github.com/libfuse/sshfs/pull/238]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ test/pytest.ini | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/test/pytest.ini b/test/pytest.ini
+index 95161546..7a7efed4 100644
+--- a/test/pytest.ini
++++ b/test/pytest.ini
+@@ -1,2 +1,4 @@
+ [pytest]
+ addopts = --verbose --assert=rewrite --tb=native -x -r a
++markers =
++    uses_fuse
meta-filesystems/recipes-filesystems/sshfs-fuse/sshfs-fuse/a1d58ae1be99571a88b8439b027abe6349b74658.patch new file +31 -0
new file mode 100644
index 0000000000..e76dbd5059
@@ -0,0 +1,31 @@
+From a1d58ae1be99571a88b8439b027abe6349b74658 Mon Sep 17 00:00:00 2001
+From: Gabriel Staples <[email protected]>
+Date: Tue, 22 Dec 2020 23:26:40 -0800
+Subject: [PATCH] Fix deprecated warning in conftest.py
+
+```
+test/conftest.py:66
+  sshfs/build/test/conftest.py:66: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
+  Use @pytest.fixture instead; they are the same.
+    @pytest.yield_fixture(autouse=True)
+```
+
+Upstream-Status: Submitted [https://github.com/libfuse/sshfs/pull/238]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ test/conftest.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/conftest.py b/test/conftest.py
+index 70cd0c62..d58d45b2 100644
+--- a/test/conftest.py
++++ b/test/conftest.py
+@@ -63,7 +63,7 @@ def register_output(self, pattern, count=1, flags=re.MULTILINE):
+ # relies on tests running sequential (i.e., don't dare to use e.g. the xdist
+ # plugin)
+ current_capfd = None
[email protected]_fixture(autouse=True)
[email protected](autouse=True)
+ def save_cap_fixtures(request, capfd):
+     global current_capfd
+     capfd.false_positives = []
meta-filesystems/recipes-filesystems/sshfs-fuse/sshfs-fuse_3.7.3.bb +5 -1
index c85483759e..5a926dac0c 100644
@@ -5,7 +5,10 @@ LICENSE = "GPL-2.0-only"
 DEPENDS = "glib-2.0 fuse3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-SRC_URI = "git://github.com/libfuse/sshfs;branch=master;protocol=https"
+SRC_URI = "git://github.com/libfuse/sshfs;branch=master;protocol=https \
+           file://03ee1f8aa0899268ec02b2f54849352df92a3a1d.patch \
+           file://a1d58ae1be99571a88b8439b027abe6349b74658.patch \
+"
 SRCREV = "c91eb9a9a992f1a36c49a8e6f1146e45b5e1c8e7"
 S = "${WORKDIR}/git"
 
@@ -18,6 +21,7 @@ SRC_URI += " \
 RDEPENDS:${PN}-ptest += " \
         python3-pytest \
         bash \
+        fuse \
 "
 
 do_install_ptest() {
Signature · 1 line
2.43.2
author
#3 lore raw

PATCH 4/4 meta-filesystems: Add meta-filesystems-image-ptest

In reply to Khem Raj

This will help in running ptests like core layer, right now there are just 3 but I hope to get more contributions now that infra is in place

to run all ptests

bitbake meta-filesystems-image-ptest-all

to run a single recipe ptests

bitbake meta-filesystems-image-ptest-fuse3

---
 .../ptest-packagelists-meta-filesystems.inc   | 18 +++++++++
 .../meta-filesystems-image-ptest-all.bb       | 25 ++++++++++++
 .../meta-filesystems-image-ptest-fast.bb      |  5 +++
 .../images/meta-filesystems-image-ptest.bb    | 40 +++++++++++++++++++
 4 files changed, 88 insertions(+)
 create mode 100644 meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc
 create mode 100644 meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-all.bb
 create mode 100644 meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-fast.bb
 create mode 100644 meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest.bb
meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc new file +18 -0
new file mode 100644
index 0000000000..f57bbab930
@@ -0,0 +1,18 @@
+#
+# Lists of the ptest in meta-filesystems, sorted into two sets by the time they take
+# Please keep these sorted in alphabetical order
+#
+# A first pass at getting all meta-filesystems recipes which inherit ptest
+# meta_filesystems_ptest_recipes=$(bitbake-layers show-recipes --recipes-only --layer meta-filesystems --inherits ptest --bare | sed -e '1,/=== Matching recipes: ===/d')
+# ptests which take less than ~30s each
+
+PTESTS_FAST_META_FILESYSTEMS = "\
+    e2tools \
+    fuse3 \
+"
+
+PTESTS_SLOW_META_FILESYSTEMS = "\
+"
+PTESTS_PROBLEMS_META_FILESYSTEMS = "\
+    sshfs-fuse \
+"
meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-all.bb new file +25 -0
new file mode 100644
index 0000000000..ffbfa1a3f6
@@ -0,0 +1,25 @@
+DESCRIPTION = "Recipe to trigger execution of all meta-filesystems ptest images."
+HOMEPAGE = "https://www.openembedded.org/"
+
+LICENSE = "MIT"
+
+inherit features_check nopackages
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require conf/include/ptest-packagelists-meta-filesystems.inc
+
+# Include the full set of ptests
+PTESTS_META_FILESYSTEMS = "${PTESTS_FAST_META_FILESYSTEMS} ${PTESTS_SLOW_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}"
+
+do_testimage[noexec] = "1"
+do_testimage[depends] = "${@' '.join(['meta-filesystems-image-ptest-'+x+':do_testimage' for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"
+
+do_build[depends] = "${@' '.join(['meta-filesystems-image-ptest-'+x+':do_build' for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"
+
+# normally image.bbclass would do this
+EXCLUDE_FROM_WORLD = "1"
+
+python () {
+    if bb.utils.contains('IMAGE_CLASSES', 'testimage', True, False, d):
+        bb.build.addtask("do_testimage", "", "", d)
+}
meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-fast.bb new file +5 -0
new file mode 100644
index 0000000000..0eb5344d9e
@@ -0,0 +1,5 @@
+require meta-filesystems-image-ptest-all.bb
+
+DESCRIPTION = "Recipe to trigger execution of all fast meta-filesystems ptest images."
+
+PTESTS_META_OE = "${PTESTS_FAST_META_FILESYSTEMS}"
meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest.bb new file +40 -0
new file mode 100644
index 0000000000..90d6a92c1b
@@ -0,0 +1,40 @@
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require recipes-core/images/core-image-minimal.bb
+require conf/include/ptest-packagelists-meta-filesystems.inc
+
+SUMMARY = "meta-filesystems ptest test image"
+
+DESCRIPTION += "Also including the ${MCNAME} ptest package."
+HOMEPAGE = "https://www.openembedded.org/"
+
+PTESTS_META_FILESYSTEMS = "${PTESTS_SLOW_META_FILESYSTEMS} ${PTESTS_FAST_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}"
+
+IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh"
+
+BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"
+
+# The image can be sufficiently large (~1.8GB) that we need to be careful that it fits in a live
+# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
+# box) and explicitly add up to 1500MB.
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "324288"
+# If a particular ptest needs more space, it can be customized:
+#IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-<pn> = "1024288"
+
+# ptests need more memory than standard to avoid the OOM killer
+QB_MEM = "-m 1024"
+# If a particular ptest needs more memroy, it can be customized:
+#QB_MEM:virtclass-mcextend-<pn> = "-m 4096"
+
+TEST_SUITES = "ping ssh parselogs ptest"
+
+# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places
+PTEST_EXPECT_FAILURE = "1"
+
+python () {
+    if not d.getVar("MCNAME"):
+        raise bb.parse.SkipRecipe("No class extension set")
+}
+
Signature · 1 line
2.43.2
#4 lore raw

Re: [oe] [meta-filesystems][PATCH 4/4] meta-filesystems: Add meta-filesystems-image-ptest

Quoted 111 lines · Khem Raj

This will help in running ptests like core layer, right now there are just 3 but I hope to get more contributions now that infra is in place

to run all ptests

bitbake meta-filesystems-image-ptest-all

to run a single recipe ptests

bitbake meta-filesystems-image-ptest-fuse3

---
 .../ptest-packagelists-meta-filesystems.inc   | 18 +++++++++
 .../meta-filesystems-image-ptest-all.bb       | 25 ++++++++++++
 .../meta-filesystems-image-ptest-fast.bb      |  5 +++
 .../images/meta-filesystems-image-ptest.bb    | 40 +++++++++++++++++++
 4 files changed, 88 insertions(+)
 create mode 100644
meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc
 create mode 100644 meta-filesystems/recipes-filesystems/images/
meta-filesystems-image-ptest-all.bb
 create mode 100644 meta-filesystems/recipes-filesystems/images/
meta-filesystems-image-ptest-fast.bb
 create mode 100644 meta-filesystems/recipes-filesystems/images/

meta-filesystems-image-ptest.bb

diff --git a/meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc b/meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc new file mode 100644
index 0000000000..f57bbab930

meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc new file +2 -0
@@ -0,0 +1,18 @@
+#
+# Lists of the ptest in meta-filesystems, sorted into two sets by the

time they take

meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc new file +4 -1
+# Please keep these sorted in alphabetical order
+#
+# A first pass at getting all meta-filesystems recipes which inherit ptest
+# meta_filesystems_ptest_recipes=$(bitbake-layers show-recipes
--recipes-only --layer meta-filesystems --inherits ptest --bare | sed -e

'1,/=== Matching recipes: ===/d')

meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc new file +12 -0
+# ptests which take less than ~30s each
+
+PTESTS_FAST_META_FILESYSTEMS = "\
+    e2tools \
+    fuse3 \
+"
+
+PTESTS_SLOW_META_FILESYSTEMS = "\
+"
+PTESTS_PROBLEMS_META_FILESYSTEMS = "\
+    sshfs-fuse \
+"
(quoted diff) +0 -0

meta-filesystems-image-ptest-all.bb
b/meta-filesystems/recipes-filesystems/images/
meta-filesystems-image-ptest-all.bb
new file mode 100644
index 0000000000..ffbfa1a3f6

meta-filesystems/recipes-filesystems/images/ new file +0 -0

meta-filesystems-image-ptest-all.bb

meta-filesystems/recipes-filesystems/images/ new file +1 -0
@@ -0,0 +1,25 @@
+DESCRIPTION = "Recipe to trigger execution of all meta-filesystems ptest

images."

meta-filesystems/recipes-filesystems/images/ new file +11 -0
+HOMEPAGE = "https://www.openembedded.org/"
+
+LICENSE = "MIT"
+
+inherit features_check nopackages
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require conf/include/ptest-packagelists-meta-filesystems.inc
+
+# Include the full set of ptests
+PTESTS_META_FILESYSTEMS = "${PTESTS_FAST_META_FILESYSTEMS}

${PTESTS_SLOW_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}"

meta-filesystems/recipes-filesystems/images/ new file +3 -0
+
+do_testimage[noexec] = "1"
+do_testimage[depends] = "${@'

'.join(['meta-filesystems-image-ptest-'+x+':do_testimage' for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"

meta-filesystems/recipes-filesystems/images/ new file +2 -0
+
+do_build[depends] = "${@'

'.join(['meta-filesystems-image-ptest-'+x+':do_build' for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"

meta-filesystems/recipes-filesystems/images/ new file +8 -0
+
+# normally image.bbclass would do this
+EXCLUDE_FROM_WORLD = "1"
+
+python () {
+    if bb.utils.contains('IMAGE_CLASSES', 'testimage', True, False, d):
+        bb.build.addtask("do_testimage", "", "", d)
+}
(quoted diff) +0 -0

meta-filesystems-image-ptest-fast.bb
b/meta-filesystems/recipes-filesystems/images/
meta-filesystems-image-ptest-fast.bb
new file mode 100644
index 0000000000..0eb5344d9e

meta-filesystems/recipes-filesystems/images/ new file +0 -0

meta-filesystems-image-ptest-fast.bb

meta-filesystems/recipes-filesystems/images/ new file +3 -0
@@ -0,0 +1,5 @@
+require meta-filesystems-image-ptest-all.bb
+
+DESCRIPTION = "Recipe to trigger execution of all fast meta-filesystems

ptest images."

meta-filesystems/recipes-filesystems/images/

Quoted 2 lines
meta-filesystems/recipes-filesystems/images/ new file +2 -0
+
+PTESTS_META_OE = "${PTESTS_FAST_META_FILESYSTEMS}"

this should probably be PTESTS_META_FILESYSTEMS =
Unless we want to expand the scope.

Quoted 71 lines
(quoted diff) +0 -0

meta-filesystems-image-ptest.bb
b/meta-filesystems/recipes-filesystems/images/
meta-filesystems-image-ptest.bb
new file mode 100644
index 0000000000..90d6a92c1b

meta-filesystems/recipes-filesystems/images/ new file +0 -0

meta-filesystems-image-ptest.bb

meta-filesystems/recipes-filesystems/images/ new file +12 -0
@@ -0,0 +1,40 @@
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require recipes-core/images/core-image-minimal.bb
+require conf/include/ptest-packagelists-meta-filesystems.inc
+
+SUMMARY = "meta-filesystems ptest test image"
+
+DESCRIPTION += "Also including the ${MCNAME} ptest package."
+HOMEPAGE = "https://www.openembedded.org/"
+
+PTESTS_META_FILESYSTEMS = "${PTESTS_SLOW_META_FILESYSTEMS}

${PTESTS_FAST_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}"

meta-filesystems/recipes-filesystems/images/ new file +4 -0
+
+IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh"
+
+BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in

d.getVar('PTESTS_META_FILESYSTEMS').split()])}"

meta-filesystems/recipes-filesystems/images/ new file +2 -0
+
+# The image can be sufficiently large (~1.8GB) that we need to be careful

that it fits in a live
+# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the

meta-filesystems/recipes-filesystems/images/ new file +14 -0
+# box) and explicitly add up to 1500MB.
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "324288"
+# If a particular ptest needs more space, it can be customized:
+#IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-<pn> = "1024288"
+
+# ptests need more memory than standard to avoid the OOM killer
+QB_MEM = "-m 1024"
+# If a particular ptest needs more memroy, it can be customized:
+#QB_MEM:virtclass-mcextend-<pn> = "-m 4096"
+
+TEST_SUITES = "ping ssh parselogs ptest"
+
+# Sadly at the moment the full set of ptests is not robust enough and

sporadically fails in random places

meta-filesystems/recipes-filesystems/images/ new file +7 -1
+PTEST_EXPECT_FAILURE = "1"
+
+python () {
+    if not d.getVar("MCNAME"):
+        raise bb.parse.SkipRecipe("No class extension set")
+}
+
--

2.43.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#108997):
https://lists.openembedded.org/g/openembedded-devel/message/108997
Mute This Topic: https://lists.openembedded.org/mt/104516897/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Re: [oe] [meta-filesystems][PATCH 4/4] meta-filesystems: Add meta-filesystems-image-ptest

Quoted 114 lines · Tim Orling via lists.openembedded.org
Quoted 110 lines · Khem Raj

This will help in running ptests like core layer, right now there are just 3 but I hope to get more contributions now that infra is in place

to run all ptests

bitbake meta-filesystems-image-ptest-all

to run a single recipe ptests

bitbake meta-filesystems-image-ptest-fuse3

---
 .../ptest-packagelists-meta-filesystems.inc   | 18 +++++++++
 .../meta-filesystems-image-ptest-all.bb       | 25 ++++++++++++
 .../meta-filesystems-image-ptest-fast.bb      |  5 +++
 .../images/meta-filesystems-image-ptest.bb    | 40 +++++++++++++++++++
 4 files changed, 88 insertions(+)
 create mode 100644
meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc
 create mode 100644 meta-filesystems/recipes-filesystems/images/
meta-filesystems-image-ptest-all.bb
 create mode 100644 meta-filesystems/recipes-filesystems/images/
meta-filesystems-image-ptest-fast.bb
 create mode 100644 meta-filesystems/recipes-filesystems/images/

meta-filesystems-image-ptest.bb

diff --git a/meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc b/meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc new file mode 100644
index 0000000000..f57bbab930
--- /dev/null
+++
b/meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc

(quoted diff) +2 -0
@@ -0,0 +1,18 @@
+#
+# Lists of the ptest in meta-filesystems, sorted into two sets by the

time they take

meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc new file +3 -0
+# Please keep these sorted in alphabetical order
+#
+# A first pass at getting all meta-filesystems recipes which inherit

ptest
+# meta_filesystems_ptest_recipes=$(bitbake-layers show-recipes --recipes-only --layer meta-filesystems --inherits ptest --bare | sed -e '1,/=== Matching recipes: ===/d')

meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc new file +12 -0
+# ptests which take less than ~30s each
+
+PTESTS_FAST_META_FILESYSTEMS = "\
+    e2tools \
+    fuse3 \
+"
+
+PTESTS_SLOW_META_FILESYSTEMS = "\
+"
+PTESTS_PROBLEMS_META_FILESYSTEMS = "\
+    sshfs-fuse \
+"
(quoted diff) +0 -0

meta-filesystems-image-ptest-all.bb
b/meta-filesystems/recipes-filesystems/images/
meta-filesystems-image-ptest-all.bb
new file mode 100644
index 0000000000..ffbfa1a3f6

meta-filesystems/recipes-filesystems/images/ new file +0 -0

meta-filesystems-image-ptest-all.bb

meta-filesystems/recipes-filesystems/images/ new file +1 -0
@@ -0,0 +1,25 @@
+DESCRIPTION = "Recipe to trigger execution of all meta-filesystems ptest

images."

meta-filesystems/recipes-filesystems/images/ new file +11 -0
+HOMEPAGE = "https://www.openembedded.org/"
+
+LICENSE = "MIT"
+
+inherit features_check nopackages
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require conf/include/ptest-packagelists-meta-filesystems.inc
+
+# Include the full set of ptests
+PTESTS_META_FILESYSTEMS = "${PTESTS_FAST_META_FILESYSTEMS}

${PTESTS_SLOW_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}"

meta-filesystems/recipes-filesystems/images/ new file +3 -0
+
+do_testimage[noexec] = "1"
+do_testimage[depends] = "${@'

'.join(['meta-filesystems-image-ptest-'+x+':do_testimage' for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"

meta-filesystems/recipes-filesystems/images/ new file +2 -0
+
+do_build[depends] = "${@'

'.join(['meta-filesystems-image-ptest-'+x+':do_build' for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"

meta-filesystems/recipes-filesystems/images/ new file +8 -0
+
+# normally image.bbclass would do this
+EXCLUDE_FROM_WORLD = "1"
+
+python () {
+    if bb.utils.contains('IMAGE_CLASSES', 'testimage', True, False, d):
+        bb.build.addtask("do_testimage", "", "", d)
+}
(quoted diff) +0 -0

meta-filesystems-image-ptest-fast.bb
b/meta-filesystems/recipes-filesystems/images/
meta-filesystems-image-ptest-fast.bb
new file mode 100644
index 0000000000..0eb5344d9e

meta-filesystems/recipes-filesystems/images/ new file +0 -0

meta-filesystems-image-ptest-fast.bb

meta-filesystems/recipes-filesystems/images/ new file +1 -0
@@ -0,0 +1,5 @@
+require meta-filesystems-image-ptest-all.bb
Quoted 9 lines

meta-filesystems/recipes-filesystems/images/

Quoted 5 lines
meta-filesystems/recipes-filesystems/images/ new file +2 -0
+
+DESCRIPTION = "Recipe to trigger execution of all fast meta-filesystems

ptest images."

meta-filesystems/recipes-filesystems/images/ new file +2 -0
+
+PTESTS_META_OE = "${PTESTS_FAST_META_FILESYSTEMS}"

this should probably be PTESTS_META_FILESYSTEMS =
Unless we want to expand the scope.

Also, THANK YOU for taking the example of meta-oe, meta-perl and meta-python to another layer. I would love to see this extend to every layer.

Quoted 73 lines
Quoted 56 lines
(quoted diff) +0 -0

meta-filesystems-image-ptest.bb
b/meta-filesystems/recipes-filesystems/images/
meta-filesystems-image-ptest.bb
new file mode 100644
index 0000000000..90d6a92c1b

meta-filesystems/recipes-filesystems/images/ new file +0 -0

meta-filesystems-image-ptest.bb

meta-filesystems/recipes-filesystems/images/ new file +12 -0
@@ -0,0 +1,40 @@
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require recipes-core/images/core-image-minimal.bb
+require conf/include/ptest-packagelists-meta-filesystems.inc
+
+SUMMARY = "meta-filesystems ptest test image"
+
+DESCRIPTION += "Also including the ${MCNAME} ptest package."
+HOMEPAGE = "https://www.openembedded.org/"
+
+PTESTS_META_FILESYSTEMS = "${PTESTS_SLOW_META_FILESYSTEMS}

${PTESTS_FAST_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}"

meta-filesystems/recipes-filesystems/images/ new file +4 -0
+
+IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh"
+
+BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in

d.getVar('PTESTS_META_FILESYSTEMS').split()])}"

meta-filesystems/recipes-filesystems/images/ new file +2 -0
+
+# The image can be sufficiently large (~1.8GB) that we need to be

careful that it fits in a live
+# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the

meta-filesystems/recipes-filesystems/images/ new file +14 -0
+# box) and explicitly add up to 1500MB.
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "324288"
+# If a particular ptest needs more space, it can be customized:
+#IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-<pn> = "1024288"
+
+# ptests need more memory than standard to avoid the OOM killer
+QB_MEM = "-m 1024"
+# If a particular ptest needs more memroy, it can be customized:
+#QB_MEM:virtclass-mcextend-<pn> = "-m 4096"
+
+TEST_SUITES = "ping ssh parselogs ptest"
+
+# Sadly at the moment the full set of ptests is not robust enough and

sporadically fails in random places

meta-filesystems/recipes-filesystems/images/ new file +7 -1
+PTEST_EXPECT_FAILURE = "1"
+
+python () {
+    if not d.getVar("MCNAME"):
+        raise bb.parse.SkipRecipe("No class extension set")
+}
+
--
Quoted 6 lines

2.43.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#108998):
https://lists.openembedded.org/g/openembedded-devel/message/108998
Mute This Topic: https://lists.openembedded.org/mt/104516897/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#7 lore raw

Re: [oe] [meta-filesystems][PATCH 4/4] meta-filesystems: Add meta-filesystems-image-ptest

Quoted 93 lines · Tim Orling
Quoted 89 lines · Tim Orling via lists.openembedded.org
Quoted 85 lines · Khem Raj

This will help in running ptests like core layer, right now there are just 3 but I hope to get more contributions now that infra is in place

to run all ptests

bitbake meta-filesystems-image-ptest-all

to run a single recipe ptests

bitbake meta-filesystems-image-ptest-fuse3

---
 .../ptest-packagelists-meta-filesystems.inc   | 18 +++++++++
 .../meta-filesystems-image-ptest-all.bb       | 25 ++++++++++++
 .../meta-filesystems-image-ptest-fast.bb      |  5 +++
 .../images/meta-filesystems-image-ptest.bb    | 40 +++++++++++++++++++
 4 files changed, 88 insertions(+)
 create mode 100644 meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc
 create mode 100644 meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-all.bb
 create mode 100644 meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-fast.bb
 create mode 100644 meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest.bb
meta-filesystems/conf/include/ptest-packagelists-meta-filesystems.inc new file +18 -0
new file mode 100644
index 0000000000..f57bbab930
@@ -0,0 +1,18 @@
+#
+# Lists of the ptest in meta-filesystems, sorted into two sets by the time they take
+# Please keep these sorted in alphabetical order
+#
+# A first pass at getting all meta-filesystems recipes which inherit ptest
+# meta_filesystems_ptest_recipes=$(bitbake-layers show-recipes --recipes-only --layer meta-filesystems --inherits ptest --bare | sed -e '1,/=== Matching recipes: ===/d')
+# ptests which take less than ~30s each
+
+PTESTS_FAST_META_FILESYSTEMS = "\
+    e2tools \
+    fuse3 \
+"
+
+PTESTS_SLOW_META_FILESYSTEMS = "\
+"
+PTESTS_PROBLEMS_META_FILESYSTEMS = "\
+    sshfs-fuse \
+"
meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-all.bb new file +25 -0
new file mode 100644
index 0000000000..ffbfa1a3f6
@@ -0,0 +1,25 @@
+DESCRIPTION = "Recipe to trigger execution of all meta-filesystems ptest images."
+HOMEPAGE = "https://www.openembedded.org/"
+
+LICENSE = "MIT"
+
+inherit features_check nopackages
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require conf/include/ptest-packagelists-meta-filesystems.inc
+
+# Include the full set of ptests
+PTESTS_META_FILESYSTEMS = "${PTESTS_FAST_META_FILESYSTEMS} ${PTESTS_SLOW_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}"
+
+do_testimage[noexec] = "1"
+do_testimage[depends] = "${@' '.join(['meta-filesystems-image-ptest-'+x+':do_testimage' for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"
+
+do_build[depends] = "${@' '.join(['meta-filesystems-image-ptest-'+x+':do_build' for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"
+
+# normally image.bbclass would do this
+EXCLUDE_FROM_WORLD = "1"
+
+python () {
+    if bb.utils.contains('IMAGE_CLASSES', 'testimage', True, False, d):
+        bb.build.addtask("do_testimage", "", "", d)
+}
meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-fast.bb new file +0 -0
new file mode 100644
index 0000000000..0eb5344d9e
@@ -0,0 +1,5 @@
Quoted 9 lines
Quoted 8 lines

meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-fast.bb line 5

Quoted 5 lines
meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest-fast.bb new file +5 -0
+require meta-filesystems-image-ptest-all.bb
+
+DESCRIPTION = "Recipe to trigger execution of all fast meta-filesystems ptest images."
+
+PTESTS_META_OE = "${PTESTS_FAST_META_FILESYSTEMS}"

this should probably be PTESTS_META_FILESYSTEMS =
Unless we want to expand the scope.

yeah thanks for catching this. I have fixed it in master-next.

Quoted 65 lines

Also, THANK YOU for taking the example of meta-oe, meta-perl and meta-python to another layer. I would love to see this extend to every layer.

Quoted 62 lines
Quoted 48 lines
meta-filesystems/recipes-filesystems/images/meta-filesystems-image-ptest.bb new file +40 -1
new file mode 100644
index 0000000000..90d6a92c1b
@@ -0,0 +1,40 @@
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require recipes-core/images/core-image-minimal.bb
+require conf/include/ptest-packagelists-meta-filesystems.inc
+
+SUMMARY = "meta-filesystems ptest test image"
+
+DESCRIPTION += "Also including the ${MCNAME} ptest package."
+HOMEPAGE = "https://www.openembedded.org/"
+
+PTESTS_META_FILESYSTEMS = "${PTESTS_SLOW_META_FILESYSTEMS} ${PTESTS_FAST_META_FILESYSTEMS} ${PTESTS_PROBLEMS_META_FILESYSTEMS}"
+
+IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh"
+
+BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('PTESTS_META_FILESYSTEMS').split()])}"
+
+# The image can be sufficiently large (~1.8GB) that we need to be careful that it fits in a live
+# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
+# box) and explicitly add up to 1500MB.
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "324288"
+# If a particular ptest needs more space, it can be customized:
+#IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-<pn> = "1024288"
+
+# ptests need more memory than standard to avoid the OOM killer
+QB_MEM = "-m 1024"
+# If a particular ptest needs more memroy, it can be customized:
+#QB_MEM:virtclass-mcextend-<pn> = "-m 4096"
+
+TEST_SUITES = "ping ssh parselogs ptest"
+
+# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places
+PTEST_EXPECT_FAILURE = "1"
+
+python () {
+    if not d.getVar("MCNAME"):
+        raise bb.parse.SkipRecipe("No class extension set")
+}
+
--
Quoted 5 lines

2.43.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#108998): https://lists.openembedded.org/g/openembedded-devel/message/108998
Mute This Topic: https://lists.openembedded.org/mt/104516897/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#8 lore raw
In reply to Khem Raj

does it need virtual/kernel dependency now?

in world build I've seen:
ERROR: QA Issue: fuse3-ptest rdepends on kernel-module-cuse, but it isn't a build dependency? [build-deps]

Quoted 35 lines · Khem Raj
---
 meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb +4 -3
index 5e532ba7ed..321851da5c 100644
@@ -29,8 +29,10 @@ SRC_URI += " \
 "
 
 RDEPENDS:${PN}-ptest += " \
-        python3-pytest \
-       bash \
+    python3-pytest \
+    python3-looseversion \
+    kernel-module-cuse \
+    bash \
 "
 
 do_install_ptest() {
--

2.43.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#108994): https://lists.openembedded.org/g/openembedded-devel/message/108994
Mute This Topic: https://lists.openembedded.org/mt/104516894/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#9 lore raw

or is it typo cuse -> fuse?

Quoted 43 lines · Martin Jansa

does it need virtual/kernel dependency now?

in world build I've seen:
ERROR: QA Issue: fuse3-ptest rdepends on kernel-module-cuse, but it isn't a build dependency? [build-deps]

Quoted 35 lines · Khem Raj
---
 meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb +4 -3
index 5e532ba7ed..321851da5c 100644
@@ -29,8 +29,10 @@ SRC_URI += " \
 "
 
 RDEPENDS:${PN}-ptest += " \
-        python3-pytest \
-       bash \
+    python3-pytest \
+    python3-looseversion \
+    kernel-module-cuse \
+    bash \
 "
 
 do_install_ptest() {
--

2.43.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#108994): https://lists.openembedded.org/g/openembedded-devel/message/108994
Mute This Topic: https://lists.openembedded.org/mt/104516894/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#10 lore raw
Quoted 14 lines · Martin Jansa

or is it typo cuse -> fuse?

Quoted 10 lines · Martin Jansa

does it need virtual/kernel dependency now?

in world build I've seen:
ERROR: QA Issue: fuse3-ptest rdepends on kernel-module-cuse, but it isn't a build dependency? [build-deps]

Yeah this should be a recommends not rdepends

Quoted 42 lines
Quoted 10 lines · Khem Raj

Review

Quoted 7 lines
---
 meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb

Quoted 15 lines
Quoted 15 lines

index 5e532ba7ed..321851da5c 100644

meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb +4 -2
@@ -29,8 +29,10 @@ SRC_URI += " \
 "
 
 RDEPENDS:${PN}-ptest += " \
-        python3-pytest \
-       bash \
+    python3-pytest \
+    python3-looseversion \
+    kernel-module-cuse \
+    bash \
 "
 
Quoted 8 lines
Quoted 8 lines
meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb +0 -1
 do_install_ptest() {
--

2.43.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#108994):

https://lists.openembedded.org/g/openembedded-devel/message/108994

Quoted 3 lines
Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/104516894/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub

[[email protected]]

Quoted 2 lines
Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-

author
#11 lore raw
In reply to Martin Jansa
Quoted 1 line · Martin Jansa

or is it typo cuse -> fuse?

No

Quoted 50 lines
Quoted 7 lines · Martin Jansa

does it need virtual/kernel dependency now?

in world build I've seen:
ERROR: QA Issue: fuse3-ptest rdepends on kernel-module-cuse, but it isn't a build dependency? [build-deps]

Quoted 8 lines

Review

Quoted 7 lines · Khem Raj
---
 meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb

Quoted 15 lines
Quoted 15 lines

index 5e532ba7ed..321851da5c 100644

meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb +4 -2
@@ -29,8 +29,10 @@ SRC_URI += " \
 "
 
 RDEPENDS:${PN}-ptest += " \
-        python3-pytest \
-       bash \
+    python3-pytest \
+    python3-looseversion \
+    kernel-module-cuse \
+    bash \
 "
 
Quoted 8 lines
Quoted 8 lines
meta-filesystems/recipes-support/fuse/fuse3_3.16.2.bb +0 -1
 do_install_ptest() {
--

2.43.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#108994):

https://lists.openembedded.org/g/openembedded-devel/message/108994

Quoted 3 lines
Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/104516894/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub

[[email protected]]

Quoted 2 lines
Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-