From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it, Avinesh Kumar <avinesh.kumar@suse.com>,
Wei Gao <wegao@suse.com>, Mimi Zohar <zohar@linux.ibm.com>,
linux-integrity@vger.kernel.org, Martin Doucha <mdoucha@suse.cz>
Subject: Re: [PATCH 1/2] ima_violations.sh: Wait for ima_mmap to exit
Date: Thu, 30 Apr 2026 11:03:15 +0200 [thread overview]
Message-ID: <afMa06pb1En8apsu@yuki.lan> (raw)
In-Reply-To: <20260428161034.947614-1-pvorel@suse.cz>
Hi!
> test3()
> {
> + local pid
> +
> tst_res TINFO "verify open_writers using mmapped files"
>
> local search="open_writers"
> @@ -168,6 +170,7 @@ test3()
> echo 'testing testing' > $FILE
>
> ima_mmap -f $FILE &
> + pid=$!
> # wait for violations appear in logs
> tst_sleep 1s
>
> @@ -177,7 +180,10 @@ test3()
> validate $num_violations $count $search
>
> # wait for ima_mmap to exit, so we can umount
> - tst_sleep 2s
> + wait $pid
You can simplify this just by doing 'wait' that will wait for all
background jobs (we have only one here).
Either way:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
> + if [ $? -ne 0 ]; then
> + tst_brk TBROK "failed to execute ima_mmap"
> + fi
> }
>
> test4()
> --
> 2.54.0
>
--
Cyril Hrubis
chrubis@suse.cz
prev parent reply other threads:[~2026-04-30 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 16:10 [PATCH 1/2] ima_violations.sh: Wait for ima_mmap to exit Petr Vorel
2026-04-28 16:10 ` [PATCH 2/2] ima_violations.sh: ima_mmap.c: Replace sleep with checkpoints Petr Vorel
2026-04-29 11:15 ` [LTP] " Martin Doucha
2026-04-29 12:00 ` Petr Vorel
2026-04-30 9:16 ` Cyril Hrubis
2026-04-30 9:03 ` Cyril Hrubis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=afMa06pb1En8apsu@yuki.lan \
--to=chrubis@suse.cz \
--cc=avinesh.kumar@suse.com \
--cc=linux-integrity@vger.kernel.org \
--cc=ltp@lists.linux.it \
--cc=mdoucha@suse.cz \
--cc=pvorel@suse.cz \
--cc=wegao@suse.com \
--cc=zohar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox