All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] tst_test.sh: Fix missing cleanup run from setup
Date: Fri, 30 Sep 2022 13:30:04 +0200	[thread overview]
Message-ID: <YzbTPONk9wuv5S97@pevik> (raw)
In-Reply-To: <20220930112434.13038-1-pvorel@suse.cz>

Hi,

NOTE: we could add cleanup function call to at least one test
to have at least visual check that it's run and only once.

Kind regards,
Petr


diff --git lib/newlib_tests/shell/tst_mount_device.sh lib/newlib_tests/shell/tst_mount_device.sh
index 70f80f84a..4f387014f 100755
--- lib/newlib_tests/shell/tst_mount_device.sh
+++ lib/newlib_tests/shell/tst_mount_device.sh
@@ -6,8 +6,14 @@ TST_MOUNT_DEVICE=1
 TST_NEEDS_ROOT=1
 TST_FS_TYPE=ext4
 TST_TESTFUNC=test
+TST_CLEANUP=do_cleanup
 TST_CNT=3
 
+do_cleanup()
+{
+	tst_res TINFO "run cleanup"
+}
+
 test1()
 {
 	EXPECT_PASS "cd $TST_MNTPOINT"

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

  reply	other threads:[~2022-09-30 11:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30 11:24 [LTP] [PATCH 1/1] tst_test.sh: Fix missing cleanup run from setup Petr Vorel
2022-09-30 11:30 ` Petr Vorel [this message]
2022-09-30 11:41 ` Cyril Hrubis
2022-09-30 12:05   ` Petr Vorel
2022-09-30 14:27     ` Petr Vorel
2022-09-30 14:38       ` Cyril Hrubis
2022-09-30 14:51         ` Petr Vorel

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=YzbTPONk9wuv5S97@pevik \
    --to=pvorel@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.