From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mJMuG-0004yZ-Db for mharc-grub-devel@gnu.org; Thu, 26 Aug 2021 17:27:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJMuA-0004rD-4o for grub-devel@gnu.org; Thu, 26 Aug 2021 17:27:23 -0400 Received: from mout.gmx.net ([212.227.17.21]:51329) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJMu7-0007kr-5H for grub-devel@gnu.org; Thu, 26 Aug 2021 17:27:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1630013237; bh=77xidbSnP3qjACd9PnHnYw8C7d9//LD7EOJiiq4bffQ=; h=X-UI-Sender-Class:Date:From:To:Subject:Cc:References:In-Reply-To; b=h47VVqDNEXwNOQRuUVGkxAupOQn3onx8A/6QnMKlzxpl1Cy5vehdky8EEOXfTjThf hNz/746koFGZ+HUX6LhaTl8cM6GEt1HzSvkYqtBgePKzp0Ybj5uySYEYrIHK9T7cx3 xQIe8JA2FYX4/qRDWn5msX915ShbTULJeMKRMvY4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from scdbackup.webframe.org ([84.179.233.243]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MI5UN-1mGwBH3Mf9-00FCGO for ; Thu, 26 Aug 2021 23:27:16 +0200 Date: Thu, 26 Aug 2021 23:28:04 +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" Cc: development@efficientek.com References: <20210826151640.45f9fe81@crass-HP-ZBook-15-G2> In-Reply-To: <20210826151640.45f9fe81@crass-HP-ZBook-15-G2> Message-Id: <7863361573464381110@scdbackup.webframe.org> X-Provags-ID: V03:K1:g+Rcz9ItKs5Da2femWxuPrZkXsbAJ0R0hVDrGMz2jCVqOW4i6of ELXYxnhoCyZWssa7IMokMdw9GPUYsUrXsO7wyTMVQPt10MKIQxwVzBGqUqnQYQgYR8hZAH2 5b2rR4KaDYoyMaFuzShsdCwygR22U8HkQrsjDLFQBTAGJCPVOhGBFhROvwWYvWTjHmI8iPX pwsFcaXud0AcMrIKepIzw== X-UI-Out-Filterresults: notjunk:1;V03:K0:N1MLTk7Phas=:11amyFhJP6JU0tNC+3qPjr zXqMEV+nlJlnh15XNT4n3jTHzukcWPgeWp3RRKN8s2HDJF5zxAGzMOnCrEMyLZLw55MKsTc8Y s3LI00xbkrCpNXs7lnvst//4tZ/oeiCo78tgY+QXHZQ8obGTHPRPotHshiDrs9YUgJbwV9LbH CUfmFI+yo5A6MbdZrNPlYO8a6CD72ign0Zm6B4AMYvbyNn511bNDk/uHd0x4rvDiNn51Y7B6g ywu1793ib/l6EjPsZ7QJlab65ImNRJKtYIeeQrmCkR1Bf3MwKdFqeOsFCQ5/n21VxADeglDxV V9NbwDrBSJ7sALdrbloWdu1pN2JnFKDXz8X2+aNVg3lFesUXJbMnib0zBA6uleG86LuGUilBZ sCWRswOx5owtUbEnyyTPi5JWmHJf8CirFTCfWUWZ5qTebx1VARyuClCX8vI61mG5hI39xS4lw hFivztk4CZ1UrLVI3COd5mXSjbAFbcgc4S0KUi6DD5BeaWYiS/qiqhHt9A2ik6PYvqWbTdITb ZKScA51fSz6JBaCNfdsjfetcNjh+AysXfZ4h9l47HRX6wlD3eRLcW9SJlDug09X1tfkLPq2fw 4um04+XI48BENuiVZb6B9PZUSsbTlYPvfodhgrhILBCIub1qfE7JMMcGeVtok2ri7eeAge3Y3 YVYd5iK0lwfJCJR+djdaXoKfpfRf8VbAes5EY+f8S3L1xmpQMSgw94PnVyaGLgHMHw/wgk2/7 O2DXVAxDmA5MipDYGUy7PE+YkWK0ZjgrOJt94+F0M18DwtZpIumFMo59bIU6Y9UvuBIOkBU3c Y2DYP3RZM3fwFxVJWxbte5GM7m/P1ckQyo4+U7iOC7Qm9PRvL2Wdo0YFEY7zhlgQ++QQnm1q+ BlVy89fKUDGcVlCGKdQxY9gzvL6GoRSeM+WrBGTCnFim1Q6QgKk+kehlyjB8jIZjv/3UNw77Z pZJoplRammZUakilRCVJr8F5gN8Xouhi1xelyFXKBqJibvd2FyY1EhVWwMw9DttF5yNUWqXhS DDc7p65tgm8grL7hqR5wHF9P15cIVwP0XDBRVnXLJxykVol1wlkhP8pULnuJ/TzE+T2swTClc V8Ly4WaOoufpalp+3G4JRu4RmWjKdkWDwWfxTHQtwIm0F5Aijr3t91F3Q== Received-SPF: pass client-ip=212.227.17.21; envelope-from=scdbackup@gmx.net; helo=mout.gmx.net X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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 21:27:25 -0000 Hi, i wrote: > > xorriso ... -as mkisofs -input-charset UTF-8 -output-charset UTF-8 Glenn Washburn wrote: > Do there need to be any UTF-8 locales installed (or any locales for > that matter) for this to work? My guess is no. I expect the same. It's not easy to test, though. In theory it is essentially a matter of iconv_open(3) and iconv(3) whether conversion works. The installed locale only gives the default values for parameters of iconv_t iconv_open(const char *tocode, const char *fromcode); The options -input-charset and -output-charset override the locale setting, whatever it is. (Actually xorriso stumbled over the hardcoded output character set of Joliet, which is UCS-2.) > Correct me if I'm wrong, but this logic about defaulting LANG is more > general than the iso9660_test. Would you agree that this should be > applied to the tests a a whole? The comments in grub-fs-tester talk of UTF-8 as expected character set and the text constants look like UTF-8, too. So it would not be wrong to enforce a UTF-8 locale. It might be peculiar to xorriso to look at the locale when interpreting the meaning of bytes which represent characters. But this interpretation is inevitable if the target filesystem specs prescribe a particular character set, as Joliet does, and if we aim for dealing with UTF-8 names. > If yes, then I should probably remove this patch altogether and put > this code elsewhere. I think it can be justified to hardcode UTF-8 in grub-fs-tester regardless whether higher levels of the test empire or the user have own interests in locale settings. The code in grub-fs-tester is a good example for the situation that the file names on disk might belong to users with differing locales. We expect UTF-8 to be the common base of all those nowadays. So i'd vote for something like if [ -n "${LANG##*UTF*}" ]; then echo "NOTE: LANG=$LANG appears to not be UTF-8." echo "NOTE: Setting LANG=en_US.UTF-8 to match the test file names." export LANG=en_US.UTF-8 fi at the start of grub-fs-tester.in. > > How can i force "make check" to do something at its second run ? > However, "make check" should still be running the test. I obviously got misled by the many make messages and the silence of the iso9660_test run. > Would you submit a patch with the changes you've > outlined that would fix this issue for when LANG is empty? I'd go farer and smack down everything that does not claim to be UTF-8. Is a git diff enough or has it to be git format-patch from a local commit ? Is git send-email necessary ? (My relation to git based interaction with projects is best illustrated by https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Laocoon_Pio-Clementino_Inv1059-1064-1067.jpg/564px-Laocoon_Pio-Clementino_Inv1059-1064-1067.jpg ) Have a nice day :) Thomas