From 4a40f561d5ebb5050a8c6dcbdcee85621056590a Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Fri, 10 Jul 2020 18:32:52 +0200 Subject: [PATCH] iotests: Set LC_ALL=C for sort MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise the result is basically unpredictable. (Note that the precise environment variable to control sorting order is LC_COLLATE, but LC_ALL overrides LC_COLLATE, and we do not want the sorting order to be messed up if LC_ALL is set in the environment.) Reported-by: John Snow Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Alex Bennée Message-Id: <20200710163253.381630-3-mreitz@redhat.com> --- tests/qemu-iotests/common.filter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index d967adc59a..c9f978abce 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@ -186,7 +186,7 @@ _filter_img_create() -e 's/^\(data_file\)/3-\1/' \ -e 's/^\(encryption\)/4-\1/' \ -e 's/^\(preallocation\)/8-\1/' \ - | sort \ + | LC_ALL=C sort \ | $SED -e 's/^[0-9]-//' \ | tr '\n\0' ' \n' \ | $SED -e 's/^ *$//' -e 's/ *$//'