All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 3/4] kernel: Fix tst_brk TFAIL
Date: Wed, 24 Jan 2024 13:02:12 +0100	[thread overview]
Message-ID: <20240124120212.GA279463@pevik> (raw)
In-Reply-To: <ZbDrDZ7DWsLuyzDw@yuki>

> Hi!
> > diff --git a/testcases/kernel/device-drivers/zram/zram01.sh b/testcases/kernel/device-drivers/zram/zram01.sh
> > index 6bc305f2c..234bf06dd 100755
> > --- a/testcases/kernel/device-drivers/zram/zram01.sh
> > +++ b/testcases/kernel/device-drivers/zram/zram01.sh
> > @@ -82,7 +82,8 @@ zram_makefs()
> >  		mkfs.$fs /dev/zram$i > err.log 2>&1
> >  		if [ $? -ne 0 ]; then
> >  			cat err.log
> > -			tst_brk TFAIL "failed to make $fs on /dev/zram$i"
> > +			tst_res TFAIL "failed to make $fs on /dev/zram$i"
> > +			return

> I do not think that this one is correct, unlike other tests the steps in
> zram depends on each other if this fails and we attempt to continue we
> will get failues from zram_mount and zram_fill_fs as well.

> The zram tests are unfortunatelly messy in a sense that a testcase is
> a setup for the next one so we really need to exit the whole test if one
> of the testcases fails. I guess the clearest solution would be TFAIL
> followed by a TBROK in this case. Something as:

> 	tst_res TFAIL "Failed to make $fs on /dev/zram$i"
> 	tst_brk TBROK "Can't continue with mounting the FS"

You're right! I'll just slightly modify
	tst_brk TBROK "Can't continue with mounting $fs"


> > diff --git a/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh b/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh
> > index b675a20a1..2a28562e6 100755
> > --- a/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh
> > +++ b/testcases/kernel/security/integrity/ima/tests/ima_tpm.sh
> > @@ -159,7 +159,8 @@ get_pcr10_aggregate()
> >  		$cmd > hash.txt 2>&1
> >  		ret=$?
> >  	elif [ $ret -ne 0 -a "$MISSING_EVMCTL" = 1 ]; then
> > -		tst_brk TFAIL "evmctl failed $msg"
> > +		tst_res TFAIL "evmctl failed $msg"
> > +		return
> >  	fi

> Again here, I'm not sure if it's safe to continue with the rest of the
> test.

Yes, this is safe, because the output of get_pcr10_aggregate() is later checked:

	get_pcr10_aggregate > tmp.txt
	pcr_aggregate="$(cat tmp.txt)"
	if [ -z "$pcr_aggregate" ]; then
		return
	fi

I made ima_tpm.sh quite hard to understand. I guess soon I should drop support
for older evmctl to make test easier to understand.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-01-24 12:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 16:26 [LTP] [PATCH 0/4] shell: fix regression since 1878502f6 Petr Vorel
2024-01-23 16:26 ` [LTP] [PATCH 1/4] tst_test.sh: Improve info on wrong tst_brk param Petr Vorel
2024-01-23 16:26 ` [LTP] [PATCH 2/4] commands: Fix tst_brk TFAIL Petr Vorel
2024-01-23 16:26 ` [LTP] [PATCH 3/4] kernel: " Petr Vorel
2024-01-24 10:57   ` Cyril Hrubis
2024-01-24 12:02     ` Petr Vorel [this message]
2024-01-24 12:19       ` Cyril Hrubis
2024-01-24 17:18         ` Petr Vorel
2024-01-23 16:26 ` [LTP] [PATCH 4/4] network: " Petr Vorel
2024-01-24 12:34   ` Martin Doucha
2024-01-24 13:48     ` Petr Vorel
2024-01-24  9:31 ` [LTP] [PATCH 0/4] shell: fix regression since 1878502f6 Li Wang

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=20240124120212.GA279463@pevik \
    --to=pvorel@suse.cz \
    --cc=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 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.