Zhou Zheng Sheng has uploaded a new change for review.
Change subject: Let LC_ALL=C when running tests ......................................................................
Let LC_ALL=C when running tests
The function validateDDBytes() in vdsm/storage/misc.py needs C locale. When vdsm runs /bin/dd, the stderr output of /bin/dd is inspected by validateDDBytes(). Then the last line of the output is splitted by space and the 0th word is the total count of bytes transferred. In a locale like zh_CN.utf8(Chinese), the stderr output message is different from that in C locale. Although dd runs successfully, validateDDBytes() can not take out the count of the bytes transferred, and an exception will be raised.
When vdsmd is started by vdsmd.init, LC_ALL is set to C to provide a compatible locale for vdsmd. However, when running tests, the locale is not set to C. So "make check" will fail in a zh_CN.utf8 locale in all tests related to dd, and this causes "autobuild.sh" and "make rpm" fail as well. So, set LC_ALL=C will provide a standard locale for running the tests.
Change-Id: I93176e8948aea11cb6adf11d8dc295e43bb1dfee Signed-off-by: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com --- M tests/run_tests.sh.in 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/43/4243/1 -- To view, visit http://gerrit.ovirt.org/4243 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I93176e8948aea11cb6adf11d8dc295e43bb1dfee Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Mark Wu has posted comments on this change.
Change subject: Let LC_ALL=C when running tests ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
If you have already tested your patch, please mark it as "verified".
-- To view, visit http://gerrit.ovirt.org/4243 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I93176e8948aea11cb6adf11d8dc295e43bb1dfee Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
ShaoHe Feng has posted comments on this change.
Change subject: Let LC_ALL=C when running tests ......................................................................
Patch Set 1: Looks good to me, but someone else must approve
it is useful for the developer whose locale LANG is not en.
surely vdsm can also run in different locale LANG. vdsm/vdsm/vdsmd.init.in set LC_ALL=C when run respawn.
So I think, when run test, the LC_ALL should also be set to C
-- To view, visit http://gerrit.ovirt.org/4243 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I93176e8948aea11cb6adf11d8dc295e43bb1dfee Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com
Zhou Zheng Sheng has posted comments on this change.
Change subject: Let LC_ALL=C when running tests ......................................................................
Patch Set 1: Verified
The change is tested on my Fedora 16 x86_64 SMP machine.
My locale is
LANG=zh_CN.utf8 LC_CTYPE="zh_CN.utf8" LC_NUMERIC="zh_CN.utf8" LC_TIME="zh_CN.utf8" LC_COLLATE="zh_CN.utf8" LC_MONETARY="zh_CN.utf8" LC_MESSAGES="zh_CN.utf8" LC_PAPER="zh_CN.utf8" LC_NAME="zh_CN.utf8" LC_ADDRESS="zh_CN.utf8" LC_TELEPHONE="zh_CN.utf8" LC_MEASUREMENT="zh_CN.utf8" LC_IDENTIFICATION="zh_CN.utf8" LC_ALL=
And the tests ran succesfully.
-- To view, visit http://gerrit.ovirt.org/4243 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I93176e8948aea11cb6adf11d8dc295e43bb1dfee Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: Let LC_ALL=C when running tests ......................................................................
Patch Set 1: Looks good to me, approved
Yeah, we are too Anglo-centric. 谢谢!
-- To view, visit http://gerrit.ovirt.org/4243 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I93176e8948aea11cb6adf11d8dc295e43bb1dfee Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Let LC_ALL=C when running tests ......................................................................
Let LC_ALL=C when running tests
The function validateDDBytes() in vdsm/storage/misc.py needs C locale. When vdsm runs /bin/dd, the stderr output of /bin/dd is inspected by validateDDBytes(). Then the last line of the output is splitted by space and the 0th word is the total count of bytes transferred. In a locale like zh_CN.utf8(Chinese), the stderr output message is different from that in C locale. Although dd runs successfully, validateDDBytes() can not take out the count of the bytes transferred, and an exception will be raised.
When vdsmd is started by vdsmd.init, LC_ALL is set to C to provide a compatible locale for vdsmd. However, when running tests, the locale is not set to C. So "make check" will fail in a zh_CN.utf8 locale in all tests related to dd, and this causes "autobuild.sh" and "make rpm" fail as well. So, set LC_ALL=C will provide a standard locale for running the tests.
Change-Id: I93176e8948aea11cb6adf11d8dc295e43bb1dfee Signed-off-by: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com --- M tests/run_tests.sh.in 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: ShaoHe Feng: Looks good to me, but someone else must approve Mark Wu: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved Zhou Zheng Sheng: Verified
-- To view, visit http://gerrit.ovirt.org/4243 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I93176e8948aea11cb6adf11d8dc295e43bb1dfee Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: ShaoHe Feng shaohef@linux.vnet.ibm.com Gerrit-Reviewer: Zhou Zheng Sheng zhshzhou@linux.vnet.ibm.com
vdsm-patches@lists.fedorahosted.org