Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mJJUn-0004za-2y for mharc-grub-devel@gnu.org; Thu, 26 Aug 2021 13:48:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJJUl-0004so-GG for grub-devel@gnu.org; Thu, 26 Aug 2021 13:48:55 -0400 Received: from mout.gmx.net ([212.227.17.20]:35345) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJJUj-0004z1-J9 for grub-devel@gnu.org; Thu, 26 Aug 2021 13:48:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1630000130; bh=ZZgtobaoxyqOgT0l2qlUH9MssXDozi0HMQD6ScBGz1o=; h=X-UI-Sender-Class:Date:From:To:Subject:Cc:References:In-Reply-To; b=RMtLrl2996JOBoiebUxJ+JiCY9F/9EeyM5o0GDvmOPuJ+uZd3DrBO2OqPJVXhiBjH aFDfiFKm1/28S8cU6OKq853gs4Nk36vis27WxIwzjA8MsmGuLlzfJQivMB1eC6vwxY QpON2D5cQdTg7Mo+OVIpSEqkyRJVHb7LLdZ7Acac= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from scdbackup.webframe.org ([84.179.233.243]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MvbG2-1n8Fim1EAg-00sgCi for ; Thu, 26 Aug 2021 19:48:50 +0200 Date: Thu, 26 Aug 2021 19:49:37 +0200 From: "Thomas Schmitt" To: grub-devel@gnu.org Subject: Re: [PATCH v2 1/8] tests: Make sure LANG is set properly for iso9660_test Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: development@efficientek.com References: <25689360845655887275@scdbackup.webframe.org> In-Reply-To: <25689360845655887275@scdbackup.webframe.org> Message-Id: <11704360906509513569@scdbackup.webframe.org> X-Provags-ID: V03:K1:ii1SGtguqCts6zF8z70ejjmMCzJpiU9cITKSAr9XTHxOanqwfbP /fl+QgGhO08+vBE4kkwQ0BrG+ETNan4Y8rfULHuG3iorRULtKrJ+n/cK8NwmKplmnQNftPT oFPNCgU4Ij9EsMcCeeaB7S1HPbduWUC+4VvybsmAy9rc15OvIcphcfjHeZZWEJnNvyCEAtP YpTcYvyAM0mxyO0eknGEg== X-UI-Out-Filterresults: notjunk:1;V03:K0:lPpnwThkObc=:jlZs4YG4D1nGaRrdKDdmrc 08/q0Qhe+fEUJDL/BJ3ZQSb0JzMPBUGFG5dOWH1yuyHspaUim7J0jdrotPM+tPPfE3mEz3Df0 1fINulqc2LUUeIl88Xi6ICFCKxwxU4hwNZXDmhIBlXWHhT4o8MqUh6J4y6uK5MZkzIncXeAHF GNNtTOynAqd0lLsBtj4msnIz2jlqKiz9hwKQO2v8UBfEdPmhhyqUVzZWNgeSIPAYJnAenL8b9 xutx5wQC+y3GpFnXsTLxtOPZ1jcmlntE6HDB18f/ttZ1HdaR/dS8ieii4LEui8IaL4/mYGTV0 ev0LPDK0sM64JRK3Obgyfp6j/5sHF0weyNjMIqcRERuCztmTwLldAYI1cyKaBxTtkQkodKW/h YlelbYQFU2lr4/n1kxl3A2wcF2O0459+f6p1xVjOvGdysQhp5sFZgJTKs9hlfdQUGRHUHu34L g8XakgA+vUI58b+r6GKNXpLkNQNsuHAxdTjRaXRm8rei7o9Lv0ZBTB65Bonkq6RYHmBV0DWpn cfBaMGNCaBQwnRrKYzrT5OVMJ8JvUZZ7rEFySqhI9Jk3yJTx6BQpt63KxTC6990hGlzn7DuNx PFlUO/RbZMRkX0kSUks70FOSfVCSIh0llFGya+DAs5tbYfGwuwAxpgmq/rbPByyFfImp2clfw fbbZjRfyF31Dbxqu+86rjx8c1+nyUja/Q5HhrOHpZi4J66sZbf7G+1I1a+K5V9uiAcBzRmjn/ 2BDVSmW6JYFnqdgfWx70Jc4YuWPSbbAby0prCxmuUq9qOjmcD0iLfyTsxceaDdvvN3fGgKDha 2iU88NnG4vWD0NluDP3TgCOc16uuGHuTC/7sJlgJ+UKXfkMRdogWICGcb60tGOoAE9v3yyyZH gobg2kK/+s3g1ljrOwE/fnuvcy/OygzweSBVnQm1ptE0YEEzLvMWsEm42gYtQ5/Q4vtH7L5Sv 2ggbMyEzYbVJyCnWNhXzzlqB+YRemaNn36uALe+SBGFBRY+rzQvZ4F3GvKSJZyptlbGQ+8Plb VgjDZumTM+dvHSgZe+jdoV6NYefIlsDqSi60O7Vx8w9YvisAm1KDFftHDBgp0GVLgHSS3KnAC fT/CE4QAIAAyGbTxWLZ82x9F9Ws6i9F9wDL0YbUM5TJeTqDo/eKTCf6EQ== Received-SPF: pass client-ip=212.227.17.20; envelope-from=scdbackup@gmx.net; helo=mout.gmx.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2021 17:48:55 -0000 Hi, now i know that i should have asked for the test-suite.log file. The problem turned out to be in Joliet, not in ISO 9660. Because Joliet gets its file names and other texts encoded as UCS-2 16-bit characters it is indeed inavoidable to define the meaning of the bytes in a Unix file name. The UTF-8 sequence \303\251 has no meaning as ANSI_X3.4-1968 characters (which are what we learned to love as 7-bit ASCII). So iconv fails. My remedy proposal xorriso ... -as mkisofs -input-charset UTF-8 -output-charset UTF-8 ... turned out to be a valid alternative to LANG=3Den_US.UTF-8 Using above charset options unconditionally would make obsolete the warning in Glenn Washburn's patch at least for the xorriso runs: +elif [ -n "${LANG##*UTF*}" ]; then + echo "WARNING: LANG=3D$LANG appears to not be unicode, international= file test may fail." It would still be beneficial to default LANG=3D"" to LANG=3Den_US.UTF-8 because 7-bit ASCII is really an odd character interpretation for Unix filenames. (HP-UX from 1986 maybe ...) =2D-----------------------------------------------------------------------= -- Noob question: How can i force "make check" to do something at its second run ? =2D-----------------------------------------------------------------------= -- Long story: On a Debian 10 with a freshly made GRUB git clone i see indeed a failure of iso9660_test with mutilated volume id and a mutilated exotic filename after make SUBDIRS=3D LANG=3D TESTS=3Diso9660_test check On the same machine with the same xorriso, the same file name from the log and the volume id taken from the script, i get with LANG=3D xorriso -as mkisofs -o test.iso -V "...exotic.characters..." tes= t_tree a somewhat confused xterm (or libreadline) but xorriso -indev test.iso -find / -- reports the exotic volume id and the exotic filename. The "make ... check" run says on the second try make[3]: 'iso9660_test' is up to date. but i can reproduce the problem by LANG=3D ./grub-fs-tester joliet The trigger for the file name mutilation seems to be the mkisofs emulation option for creating a Joliet tree -J With default settings of mount(8) or xorriso's file name display the problem becomes visible only if no Rock Ridge info was added to the ISO 9660 tree. This is caused by xorriso command --rockridge off Nevertheless file(1) and xorriso still see the exotic volume id. Binary inspection shows that the ISO 9660 volume id (at offset 32768 + 40) is originally exotic, but the Joliet volume id (at offset 34816 + 40) was mutilated. So obviously the problem sits in the Joliet name conversion to UCS-2. It is inavoidable if the file names do not match the input character set (defaulted from locale) because the Unix file names cannot be just copied to Joliet directory records. Now that i can reproduce the problem i can also confirm that my remedy proposal would work as expected. It preservies the exotic names in the Joliet tree and the exotic volume id in the Joliet supplementary volume descriptor. Have a nice day :) Thomas