FSTests Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] common/rc: fix false positives due to leaked mkfs output to stderr
@ 2020-07-10 14:13 Vladimir Zapolskiy
  0 siblings, 0 replies; only message in thread
From: Vladimir Zapolskiy @ 2020-07-10 14:13 UTC (permalink / raw)
  To: Eryu Guan; +Cc: fstests

The change fixes false positives reported by a few generic tests under
circumstances, when an mkfs utility prints its output to stderr and then it
appears in produced *.out files. The change is intended to fix such issues
in the tests, which utilize _require_scratch_swapfile().

Signed-off-by: Vladimir Zapolskiy <vladimir@tuxera.com>
---
 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index f17b19f2d4cb..1b7b25758d25 100644
--- a/common/rc
+++ b/common/rc
@@ -2311,7 +2311,7 @@ _require_scratch_swapfile()
 	_require_scratch
 	_require_command "$MKSWAP_PROG" "mkswap"
 
-	_scratch_mkfs >/dev/null
+	_scratch_mkfs >/dev/null 2>&1
 
 	# With mounting SELinux context(e.g. system_u:object_r:root_t:s0),
 	# standard mkswap tried to reset the type of default context to
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 14:13 [PATCH] common/rc: fix false positives due to leaked mkfs output to stderr Vladimir Zapolskiy

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git