From 0f9d3f2d3d7e09cccf7ee8cb2499cfc1d68cd92d Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Tue, 21 Feb 2023 13:20:50 +0800 Subject: [PATCH] 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 --- qa/tasks/cephfs/test_acls.py | 4 ++-- qa/tasks/cephfs/test_fscrypt.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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') -- 2.39.5