From: Xiubo Li Date: Tue, 21 Feb 2023 05:20:50 +0000 (+0800) Subject: qa: export DIFF_LENGTH env parameter to print the full git diff X-Git-Tag: v18.1.0~309^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F50196%2Fhead;p=ceph.git qa: export DIFF_LENGTH env parameter to print the full git diff From the xfstests-dev's README doc set DIFF_LENGTH to 0 will print the full diff instead of the default 10. This will be very helpful to debug the test failures, or we will lose many valuable debug infomation. Signed-off-by: Xiubo Li --- diff --git a/qa/tasks/cephfs/test_acls.py b/qa/tasks/cephfs/test_acls.py index 6e19e55c3731c..a03f15693c2bc 100644 --- a/qa/tasks/cephfs/test_acls.py +++ b/qa/tasks/cephfs/test_acls.py @@ -27,8 +27,8 @@ class TestACLs(XFSTestsDev): # failure on our own (since this command doesn't set right error code # and error message in some cases) and print custom log messages # accordingly. - proc = self.mount_a.client_remote.run(args=['sudo', './check', - 'generic/099'], cwd=self.xfstests_repo_path, stdout=StringIO(), + proc = self.mount_a.client_remote.run(args=['sudo', 'env', 'DIFF_LENGTH=0', + './check', 'generic/099'], cwd=self.xfstests_repo_path, stdout=StringIO(), stderr=StringIO(), timeout=30, check_status=False,omit_sudo=False, label='running tests for ACLs from xfstests-dev') diff --git a/qa/tasks/cephfs/test_fscrypt.py b/qa/tasks/cephfs/test_fscrypt.py index 3af9df3cb255c..11dd2038f9288 100644 --- a/qa/tasks/cephfs/test_fscrypt.py +++ b/qa/tasks/cephfs/test_fscrypt.py @@ -32,8 +32,8 @@ class TestFscrypt(XFSTestsDev): # failure on our own (since this command doesn't set right error code # and error message in some cases) and print custom log messages # accordingly. - proc = self.mount_a.client_remote.run(args=['sudo', './check', - '-g', 'encrypt'], cwd=self.xfstests_repo_path, stdout=StringIO(), + proc = self.mount_a.client_remote.run(args=['sudo', 'env', 'DIFF_LENGTH=0', + './check', '-g', 'encrypt'], cwd=self.xfstests_repo_path, stdout=StringIO(), stderr=StringIO(), timeout=900, check_status=False, omit_sudo=False, label='running tests for encrypt from xfstests-dev') @@ -59,8 +59,8 @@ class TestFscrypt(XFSTestsDev): # failure on our own (since this command doesn't set right error code # and error message in some cases) and print custom log messages # accordingly. This will take a long time and set the timeout to 3 hours. - proc = self.mount_a.client_remote.run(args=['sudo', './check', - '-g', 'quick', '-E', './ceph.exclude'], cwd=self.xfstests_repo_path, + proc = self.mount_a.client_remote.run(args=['sudo', 'env', 'DIFF_LENGTH=0', + './check', '-g', 'quick', '-E', './ceph.exclude'], cwd=self.xfstests_repo_path, stdout=StringIO(), stderr=StringIO(), timeout=10800, check_status=False, omit_sudo=False, label='running tests for dummy_encryption from xfstests-dev')