[PATCH v2 1/2] check: disable HAVE_PRIVATENS by default

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



Currently we have 3 ways to run a test case in _run_seq():

  if [ -n "${HAVE_PRIVATENS}" ]; then
      ./tools/run_privatens "./$seq"
      ...
  elif [ -n "${HAVE_SYSTEMD_SCOPES}" ]; then
      systemd-run --quiet --unit "${unit}" --scope \
             ./tools/run_setsid "./$seq" &
      ...
  else
      ./tools/run_setsid "./$seq" &
      ...
  fi

The "privatens" way brings in some regressions. We need more time
to develop and test this way, it's not time let it to be the
first default choice, so isolate the HAVE_PRIVATENS initialization
by a TRY_PRIVATENS parameter, and disable it by default.

Set TRY_PRIVATENS=yes to give "privatens" a try, otherwise run in
old ways. This patch can be removed after "privatens" way is stable.

Signed-off-by: Zorro Lang <zlang@xxxxxxxxxx>
Reviewed-by: "Darrick J. Wong" <djwong@xxxxxxxxxx>
---
 check | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/check b/check
index ea92b0d62..cb2f19d08 100755
--- a/check
+++ b/check
@@ -674,10 +674,13 @@ _stash_test_status() {
 	esac
 }
 
-# Can we run in a private pid/mount namespace?
-HAVE_PRIVATENS=
-./tools/run_privatens bash -c "exit 77"
-test $? -eq 77 && HAVE_PRIVATENS=yes
+# Don't try "privatens" by default, it's experimental for now.
+if [ "$TRY_PRIVATENS" = "yes" ];then
+	# Can we run in a private pid/mount namespace?
+	HAVE_PRIVATENS=
+	./tools/run_privatens bash -c "exit 77"
+	test $? -eq 77 && HAVE_PRIVATENS=yes
+fi
 
 # Can we run systemd scopes?
 HAVE_SYSTEMD_SCOPES=
-- 
2.47.1





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux