* [meta-oe][scarthgap][PATCH] inotify-tools: add ptest support for inotify-tools
@ 2025-10-23 10:52 Virendra Thakur
2025-10-23 15:30 ` [oe] " Khem Raj
0 siblings, 1 reply; 3+ messages in thread
From: Virendra Thakur @ 2025-10-23 10:52 UTC (permalink / raw)
To: openembedded-devel; +Cc: Nikhil R
Add ptest support for inotify-tools by introducing a run-ptest script.
The ptest verifies the correct functioning of inotify event handling
and related utilities.
Test coverage includes:
- File creation, modification, and deletion event monitoring
- Event handling and command-line option parsing
- Basic consistency and behavior of inotify event queues
The ptest completes in under 20 seconds
Signed-off-by: Nikhil R <nikhil.r@bmwtechworks.in>
Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
---
.../inotify-tools/inotify-tools/run-ptest | 21 +++++++++++++++++++
.../inotify-tools/inotify-tools_3.22.6.0.bb | 16 +++++++++++++-
2 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-support/inotify-tools/inotify-tools/run-ptest
diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools/run-ptest b/meta-oe/recipes-support/inotify-tools/inotify-tools/run-ptest
new file mode 100644
index 0000000000..f3b23d86f0
--- /dev/null
+++ b/meta-oe/recipes-support/inotify-tools/inotify-tools/run-ptest
@@ -0,0 +1,21 @@
+#!/bin/sh
+# run-ptest for inotify-tools
+
+set -e
+
+# Run the test binary and capture output
+output=$(./test)
+
+# Print the output for logging
+echo "$output"
+
+# Extract the summary line
+summary=$(echo "$output" | tail -n 1)
+
+# Check if any tests failed
+if echo "$summary" | grep -q "0 failed"; then
+ exit 0
+else
+ echo "Some tests failed!"
+ exit 1
+fi
diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools_3.22.6.0.bb b/meta-oe/recipes-support/inotify-tools/inotify-tools_3.22.6.0.bb
index 8a0ae17ad7..3629ce45b2 100644
--- a/meta-oe/recipes-support/inotify-tools/inotify-tools_3.22.6.0.bb
+++ b/meta-oe/recipes-support/inotify-tools/inotify-tools_3.22.6.0.bb
@@ -10,11 +10,12 @@ SRC_URI = "git://github.com/${BPN}/${BPN};branch=master;protocol=https \
file://0002-libinotifytools-Bridge-differences-between-musl-glib.patch \
file://0002-configure-Add-AC_SYS_LARGEFILE-autoconf-macro.patch \
file://0003-replace-stat64-lstat64-with-stat-lstat.patch \
+ file://run-ptest \
"
S = "${WORKDIR}/git"
-inherit autotools
+inherit autotools ptest
EXTRA_OECONF = "--disable-doxygen"
@@ -25,3 +26,16 @@ CFLAGS += "-Wno-error"
PACKAGES =+ "libinotifytools"
FILES:libinotifytools = "${libdir}/lib*.so.*"
+
+do_compile_ptest() {
+ cd libinotifytools/src
+ oe_runmake
+ oe_runmake test
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}
+ cp -r ${B}/libinotifytools/src/.libs/test ${D}${PTEST_PATH}/
+}
+
+FILES:${PN}-ptest += "${PTEST_PATH}"
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [oe] [meta-oe][scarthgap][PATCH] inotify-tools: add ptest support for inotify-tools
2025-10-23 10:52 [meta-oe][scarthgap][PATCH] inotify-tools: add ptest support for inotify-tools Virendra Thakur
@ 2025-10-23 15:30 ` Khem Raj
2025-10-30 6:01 ` Mittal, Anuj
0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2025-10-23 15:30 UTC (permalink / raw)
To: thakur.virendra1810; +Cc: openembedded-devel, Nikhil R
[-- Attachment #1: Type: text/plain, Size: 3712 bytes --]
This should be in master as well and then back ported to release branches
please submit it against master first after making sure it works there
On Thu, Oct 23, 2025 at 3:52 AM virendra thakur via lists.openembedded.org
<thakur.virendra1810=gmail.com@lists.openembedded.org> wrote:
> Add ptest support for inotify-tools by introducing a run-ptest script.
> The ptest verifies the correct functioning of inotify event handling
> and related utilities.
>
> Test coverage includes:
> - File creation, modification, and deletion event monitoring
> - Event handling and command-line option parsing
> - Basic consistency and behavior of inotify event queues
>
> The ptest completes in under 20 seconds
>
> Signed-off-by: Nikhil R <nikhil.r@bmwtechworks.in>
> Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
> ---
> .../inotify-tools/inotify-tools/run-ptest | 21 +++++++++++++++++++
> .../inotify-tools/inotify-tools_3.22.6.0.bb | 16 +++++++++++++-
> 2 files changed, 36 insertions(+), 1 deletion(-)
> create mode 100644
> meta-oe/recipes-support/inotify-tools/inotify-tools/run-ptest
>
> diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools/run-ptest
> b/meta-oe/recipes-support/inotify-tools/inotify-tools/run-ptest
> new file mode 100644
> index 0000000000..f3b23d86f0
> --- /dev/null
> +++ b/meta-oe/recipes-support/inotify-tools/inotify-tools/run-ptest
> @@ -0,0 +1,21 @@
> +#!/bin/sh
> +# run-ptest for inotify-tools
> +
> +set -e
> +
> +# Run the test binary and capture output
> +output=$(./test)
> +
> +# Print the output for logging
> +echo "$output"
> +
> +# Extract the summary line
> +summary=$(echo "$output" | tail -n 1)
> +
> +# Check if any tests failed
> +if echo "$summary" | grep -q "0 failed"; then
> + exit 0
> +else
> + echo "Some tests failed!"
> + exit 1
> +fi
> diff --git a/meta-oe/recipes-support/inotify-tools/
> inotify-tools_3.22.6.0.bb b/meta-oe/recipes-support/inotify-tools/
> inotify-tools_3.22.6.0.bb
> index 8a0ae17ad7..3629ce45b2 100644
> --- a/meta-oe/recipes-support/inotify-tools/inotify-tools_3.22.6.0.bb
> +++ b/meta-oe/recipes-support/inotify-tools/inotify-tools_3.22.6.0.bb
> @@ -10,11 +10,12 @@ SRC_URI = "git://
> github.com/${BPN}/${BPN};branch=master;protocol=https
> <http://github.com/$%7BBPN%7D/$%7BBPN%7D;branch=master;protocol=https> \
>
> file://0002-libinotifytools-Bridge-differences-between-musl-glib.patch \
>
> file://0002-configure-Add-AC_SYS_LARGEFILE-autoconf-macro.patch \
> file://0003-replace-stat64-lstat64-with-stat-lstat.patch \
> + file://run-ptest \
> "
>
> S = "${WORKDIR}/git"
>
> -inherit autotools
> +inherit autotools ptest
>
> EXTRA_OECONF = "--disable-doxygen"
>
> @@ -25,3 +26,16 @@ CFLAGS += "-Wno-error"
> PACKAGES =+ "libinotifytools"
>
> FILES:libinotifytools = "${libdir}/lib*.so.*"
> +
> +do_compile_ptest() {
> + cd libinotifytools/src
> + oe_runmake
> + oe_runmake test
> +}
> +
> +do_install_ptest() {
> + install -d ${D}${PTEST_PATH}
> + cp -r ${B}/libinotifytools/src/.libs/test ${D}${PTEST_PATH}/
> +}
> +
> +FILES:${PN}-ptest += "${PTEST_PATH}"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#120932):
> https://lists.openembedded.org/g/openembedded-devel/message/120932
> Mute This Topic: https://lists.openembedded.org/mt/115908396/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 5475 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [oe] [meta-oe][scarthgap][PATCH] inotify-tools: add ptest support for inotify-tools
2025-10-23 15:30 ` [oe] " Khem Raj
@ 2025-10-30 6:01 ` Mittal, Anuj
0 siblings, 0 replies; 3+ messages in thread
From: Mittal, Anuj @ 2025-10-30 6:01 UTC (permalink / raw)
To: thakur.virendra1810@gmail.com, raj.khem@gmail.com
Cc: nikhil.r@bmwtechworks.in,
openembedded-devel@lists.openembedded.org
Yes, please also include the sample output, how many tests
run/pass/fail.
If this is really required for scarthgap, then please ensure that this
does not result in change in packaging for existing packages. It
doesn't look like the case here but please verify.
On Thu, 2025-10-23 at 08:30 -0700, Khem Raj via lists.openembedded.org
wrote:
> This should be in master as well and then back ported to release
> branches please submit it against master first after making sure it
> works there
>
> On Thu, Oct 23, 2025 at 3:52 AM virendra thakur via
> lists.openembedded.org
> <thakur.virendra1810=gmail.com@lists.openembedded.org> wrote:
> > Add ptest support for inotify-tools by introducing a run-ptest
> > script.
> > The ptest verifies the correct functioning of inotify event
> > handling
> > and related utilities.
> >
> > Test coverage includes:
> > - File creation, modification, and deletion event monitoring
> > - Event handling and command-line option parsing
> > - Basic consistency and behavior of inotify event queues
> >
> > The ptest completes in under 20 seconds
> >
> > Signed-off-by: Nikhil R <nikhil.r@bmwtechworks.in>
> > Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
> > ---
> > .../inotify-tools/inotify-tools/run-ptest | 21
> > +++++++++++++++++++
> > .../inotify-tools/inotify-tools_3.22.6.0.bb | 16 +++++++++++++-
> > 2 files changed, 36 insertions(+), 1 deletion(-)
> > create mode 100644 meta-oe/recipes-support/inotify-tools/inotify-
> > tools/run-ptest
> >
> > diff --git a/meta-oe/recipes-support/inotify-tools/inotify-
> > tools/run-ptest b/meta-oe/recipes-support/inotify-tools/inotify-
> > tools/run-ptest
> > new file mode 100644
> > index 0000000000..f3b23d86f0
> > --- /dev/null
> > +++ b/meta-oe/recipes-support/inotify-tools/inotify-tools/run-ptest
> > @@ -0,0 +1,21 @@
> > +#!/bin/sh
> > +# run-ptest for inotify-tools
> > +
> > +set -e
> > +
> > +# Run the test binary and capture output
> > +output=$(./test)
> > +
> > +# Print the output for logging
> > +echo "$output"
> > +
> > +# Extract the summary line
> > +summary=$(echo "$output" | tail -n 1)
> > +
> > +# Check if any tests failed
> > +if echo "$summary" | grep -q "0 failed"; then
> > + exit 0
> > +else
> > + echo "Some tests failed!"
> > + exit 1
> > +fi
> > diff --git a/meta-oe/recipes-support/inotify-tools/inotify-
> > tools_3.22.6.0.bb b/meta-oe/recipes-support/inotify-tools/inotify-
> > tools_3.22.6.0.bb
> > index 8a0ae17ad7..3629ce45b2 100644
> > --- a/meta-oe/recipes-support/inotify-tools/inotify-
> > tools_3.22.6.0.bb
> > +++ b/meta-oe/recipes-support/inotify-tools/inotify-
> > tools_3.22.6.0.bb
> > @@ -10,11 +10,12 @@ SRC_URI =
> > "git://github.com/${BPN}/${BPN};branch=master;protocol=https \
> >
> > file://0002-libinotifytools-Bridge-differences-between-musl-glib.patch
> > \
> >
> > file://0002-configure-Add-AC_SYS_LARGEFILE-autoconf-macro.patch \
> >
> > file://0003-replace-stat64-lstat64-with-stat-lstat.patch \
> > + file://run-ptest \
> > "
> >
> > S = "${WORKDIR}/git"
> >
> > -inherit autotools
> > +inherit autotools ptest
> >
> > EXTRA_OECONF = "--disable-doxygen"
> >
> > @@ -25,3 +26,16 @@ CFLAGS += "-Wno-error"
> > PACKAGES =+ "libinotifytools"
> >
> > FILES:libinotifytools = "${libdir}/lib*.so.*"
> > +
> > +do_compile_ptest() {
> > + cd libinotifytools/src
> > + oe_runmake
> > + oe_runmake test
> > +}
> > +
> > +do_install_ptest() {
> > + install -d ${D}${PTEST_PATH}
> > + cp -r ${B}/libinotifytools/src/.libs/test ${D}${PTEST_PATH}/
> > +}
> > +
> > +FILES:${PN}-ptest += "${PTEST_PATH}"
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#120937):
> > https://lists.openembedded.org/g/openembedded-devel/message/120937
> > Mute This Topic:
> > https://lists.openembedded.org/mt/115908396/3616702
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe:
> > https://lists.openembedded.org/g/openembedded-devel/unsub [
> > anuj.mittal@intel.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-30 6:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-23 10:52 [meta-oe][scarthgap][PATCH] inotify-tools: add ptest support for inotify-tools Virendra Thakur
2025-10-23 15:30 ` [oe] " Khem Raj
2025-10-30 6:01 ` Mittal, Anuj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.