public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] shell: Add checkpoints api for new lib
Date: Wed, 11 Aug 2021 14:44:12 +0200	[thread overview]
Message-ID: <YRPGHBuKHnvARkn+@yuki> (raw)
In-Reply-To: <20210809121238.1585673-1-lkml@jv-coder.de>

Hi!
> diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
> index c6aa2c487..d4a1ab736 100644
> --- a/testcases/lib/tst_test.sh
> +++ b/testcases/lib/tst_test.sh
> @@ -253,6 +253,27 @@ TST_RTNL_CHK()
>  	tst_brk TBROK "$@ failed: $output"
>  }
>  
> +TST_CHECKPOINT_WAIT()
> +{
> +	ROD tst_checkpoint wait 10000 "$1"
> +}
> +
> +TST_CHECKPOINT_WAKE()
> +{
> +	ROD tst_checkpoint wake 10000 "$1" 1
> +}
> +
> +TST_CHECKPOINT_WAKE2()
> +{
> +	ROD tst_checkpoint wake 10000 "$1" "$2"
> +}
> +
> +TST_CHECKPOINT_WAKE_AND_WAIT()
> +{
> +	TST_CHECKPOINT_WAKE "$1"
> +	TST_CHECKPOINT_WAIT "$1"
> +}
> +
>  tst_mount()
>  {
>  	local mnt_opt mnt_err
> @@ -558,6 +579,20 @@ tst_set_timeout()
>  	_tst_setup_timer
>  }
>  
> +_tst_init_checkpoints()
> +{
> +	local pagesize
> +
> +	LTP_IPC_PATH="/dev/shm/ltp_${TCID}_$$"
> +	pagesize=$(tst_getconf PAGESIZE)
> +	if [ $? -ne 0 ]; then
> +		tst_brk TBROK "tst_getconf PAGESIZE failed"
> +	fi
> +	ROD_SILENT dd if=/dev/zero of="$LTP_IPC_PATH" bs="$pagesize" count=1
> +	ROD_SILENT chmod 600 "$LTP_IPC_PATH"
> +	export LTP_IPC_PATH
> +}

Shouldn't we also delete the /dev/shm/ltp_${TCID}_$$ in the
_tst_do_exit() if LTP_IPC_PATH was set?

Other than that it looks fine.

-- 
Cyril Hrubis
chrubis@suse.cz

  parent reply	other threads:[~2021-08-11 12:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 12:12 [LTP] [PATCH 1/2] shell: Add checkpoints api for new lib Joerg Vehlow
2021-08-09 12:12 ` [LTP] [PATCH 2/2] pec: Improve reliability Joerg Vehlow
2021-08-11 12:44 ` Cyril Hrubis [this message]
2021-08-11 15:19   ` [LTP] [PATCH 1/2] shell: Add checkpoints api for new lib Joerg Vehlow

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=YRPGHBuKHnvARkn+@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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