[CRIU] [PATCH] check: Do not print "Looks good" message regardless of loglevel

Pavel Emelyanov xemul at parallels.com
Fri Jan 23 06:51:04 PST 2015


Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
 cr-check.c   |  4 +---
 test/zdtm.sh | 12 ++++++------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/cr-check.c b/cr-check.c
index c317998..badfefc 100644
--- a/cr-check.c
+++ b/cr-check.c
@@ -678,8 +678,6 @@ int cr_check(void)
 	struct ns_id ns = { .pid = getpid(), .nd = &mnt_ns_desc };
 	int ret = 0;
 
-	log_set_loglevel(LOG_WARN);
-
 	if (!is_root_user())
 		return -1;
 
@@ -728,7 +726,7 @@ int cr_check(void)
 
 out:
 	if (!ret)
-		pr_msg("Looks good.\n");
+		print_on_level(DEFAULT_LOGLEVEL, "Looks good.\n");
 
 	return ret;
 }
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 71e0760..d78029a 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -224,24 +224,24 @@ generate_test_list()
 		ns/static/tun
 	"
 
-	$CRIU check --feature "mnt_id"
+	$CRIU check -v0 --feature "mnt_id"
 	if [ $? -eq 0 ]; then
 		TEST_LIST="$TEST_LIST$TEST_MNTNS"
 	else
 		export ZDTM_NOSUBNS=1
 	fi
 
-	$CRIU check --feature "aio_remap"
+	$CRIU check -v0 --feature "aio_remap"
 	if [ $? -eq 0 ]; then
 		TEST_LIST="$TEST_LIST$TEST_AIO"
 	fi
 
-	$CRIU check --feature "timerfd"
+	$CRIU check -v0 --feature "timerfd"
 	if [ $? -eq 0 ]; then
 		TEST_LIST="$TEST_LIST$TEST_TIMERFD"
 	fi
 
-	$CRIU check --feature "tun"
+	$CRIU check -v0 --feature "tun"
 	if [ $? -eq 0 ]; then
 		TEST_LIST="$TEST_LIST$TEST_TUN"
 	fi
@@ -296,7 +296,7 @@ generate_test_list()
 	"
 
 	# Add tests which can be executed in an user namespace
-	$CRIU check --feature "userns"
+	$CRIU check -v0 --feature "userns"
 	if [ $? -eq 0 ]; then
 		blist=`mktemp /tmp/zdtm.black.XXXXXX`
 		echo "$BLACKLIST_FOR_USERNS" | tr -d "[:blank:]" | sort > $blist
@@ -399,7 +399,7 @@ check_mainstream()
 {
 	zdtm_sep "CRIU CHECK"
 
-	$CRIU check && return 0
+	$CRIU check -v1 && return 0
 	MAINSTREAM_KERNEL=1
 
 	cat >&2 <<EOF
-- 
1.8.4.2



More information about the CRIU mailing list