Message ID | 20200708132614.2800896-1-adhemerval.zanella@linaro.org |
---|---|
State | Committed |
Commit | c1e63c7214aaef99039068da384a0ab3abc176f2 |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 175EF38618CC; Wed, 8 Jul 2020 13:26:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 175EF38618CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1594214782; bh=ur6QRRQxu7Y5yc9Zv3Qqe0W+Qe3iddXRqbUjx5XziNA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=G46zkX7FJxoUZXTPJebbLEoDYYJujDM2SZgSFHTxuvVJ5zcsrwnKu+bg/maUV+u4E EVz0U8O1XviLQVSSUHw76dC2AjVXrX4fN8HgRA6u5/nHEIXlby/ZmI7GbrnbS4eDbt dDdc9OXpArVNrq7k65UjlFvWosCxU3gMZAFwaDh0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by sourceware.org (Postfix) with ESMTPS id 6F8A338618B2 for <libc-alpha@sourceware.org>; Wed, 8 Jul 2020 13:26:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6F8A338618B2 Received: by mail-qt1-x82e.google.com with SMTP id g13so34399409qtv.8 for <libc-alpha@sourceware.org>; Wed, 08 Jul 2020 06:26:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ur6QRRQxu7Y5yc9Zv3Qqe0W+Qe3iddXRqbUjx5XziNA=; b=dxt8EYrA3px/G4q6lp5tyOccpyPPp+GeG5cgVlXx4E8Lsk7XN/MAmgSAmc+wEUjGXc O5LAihN+FbWwPfzr/vhp/nIzgB2IW4E2/FpeLxhImMJmKSQ7k7RRRduVRU3OZwnRcpoN 8z3aFyQsWw6NgBZL5kzDNpwdJTC3t+JItQ/Nwuk9AmZLwoom9rLIKDJGleojD+5La8Ds s3LQcnQG66Cl6TPAuPFFEVrLUAca9j1UtlDo45Ik/2E6jPGlQTQIhpj+KUgzLVJ1Cdxz Ply6cfXsB2j173CRqL25CfNqqE+b8jy9yas419ICWqFiewFjang1+tQoCawcvN/Ihmxn VBkw== X-Gm-Message-State: AOAM532wMUm0YnBetLB8WsX7OuTNIKyNqPw0t/Om201z3v46bkg9knXL yxhgKVHZkPVJACrAp8BzGb3uSwBG81I= X-Google-Smtp-Source: ABdhPJzGwvaojnEnbQenFbzVW+KbR1NCu9xcrZghoRBa4MdjKIuid3+wFJ0EYxofBDZVphS2lHy+mA== X-Received: by 2002:aed:21da:: with SMTP id m26mr41164986qtc.197.1594214778768; Wed, 08 Jul 2020 06:26:18 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id y16sm32825951qty.1.2020.07.08.06.26.17 for <libc-alpha@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 06:26:18 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [COMMITTED] string: Move tst-strsignal tst-strerror to tests-container Date: Wed, 8 Jul 2020 10:26:14 -0300 Message-Id: <20200708132614.2800896-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <http://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <http://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Adhemerval Zanella <adhemerval.zanella@linaro.org> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
[COMMITTED] string: Move tst-strsignal tst-strerror to tests-container
|
|
Commit Message
Adhemerval Zanella
July 8, 2020, 1:26 p.m. UTC
Both tests require libc.mo translation files which might not be installed on the system. Checked on x86_64-linux-gnu. --- string/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On 7/8/20 9:26 AM, Adhemerval Zanella via Libc-alpha wrote: > Both tests require libc.mo translation files which might not be > installed on the system. > > Checked on x86_64-linux-gnu. > --- > string/Makefile | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/string/Makefile b/string/Makefile > index f8d3104e16..206c9b103c 100644 > --- a/string/Makefile > +++ b/string/Makefile > @@ -63,7 +63,9 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \ > tst-strtok_r bug-strcoll2 tst-cmp tst-xbzero-opt \ > test-endian-types test-endian-file-scope \ > test-endian-sign-conversion tst-memmove-overflow \ > - tst-strsignal tst-strerror test-sig_np > + test-sig_np > + > +tests-container += tst-strsignal tst-strerror > > # This test allocates a lot of memory and can run for a long time. > xtests = tst-strcoll-overflow > Thanks. This is a *good* reason to put them in tests-container :-)
The 07/08/2020 10:26, Adhemerval Zanella via Libc-alpha wrote: > Both tests require libc.mo translation files which might not be > installed on the system. > > Checked on x86_64-linux-gnu. > --- > string/Makefile | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/string/Makefile b/string/Makefile > index f8d3104e16..206c9b103c 100644 > --- a/string/Makefile > +++ b/string/Makefile > @@ -63,7 +63,9 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \ > tst-strtok_r bug-strcoll2 tst-cmp tst-xbzero-opt \ > test-endian-types test-endian-file-scope \ > test-endian-sign-conversion tst-memmove-overflow \ > - tst-strsignal tst-strerror test-sig_np > + test-sig_np > + > +tests-container += tst-strsignal tst-strerror these still fail for me. i have no libc.mo files in the testroot.root or anywhere. i assume this is because i have $ grep MSGFMT config.make MSGFMT = : i can install gettext if this is expected (but i think failing with UNSUPPORTED would be nicer).
On 09/07/2020 07:00, Szabolcs Nagy wrote: > The 07/08/2020 10:26, Adhemerval Zanella via Libc-alpha wrote: >> Both tests require libc.mo translation files which might not be >> installed on the system. >> >> Checked on x86_64-linux-gnu. >> --- >> string/Makefile | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/string/Makefile b/string/Makefile >> index f8d3104e16..206c9b103c 100644 >> --- a/string/Makefile >> +++ b/string/Makefile >> @@ -63,7 +63,9 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \ >> tst-strtok_r bug-strcoll2 tst-cmp tst-xbzero-opt \ >> test-endian-types test-endian-file-scope \ >> test-endian-sign-conversion tst-memmove-overflow \ >> - tst-strsignal tst-strerror test-sig_np >> + test-sig_np >> + >> +tests-container += tst-strsignal tst-strerror > > these still fail for me. > > i have no libc.mo files in the testroot.root or anywhere. > > i assume this is because i have > > $ grep MSGFMT config.make > MSGFMT = : > > i can install gettext if this is expected (but i think > failing with UNSUPPORTED would be nicer). I think it is easier to just disable the test in such case, since it is not straightforward to check if the translation as loaded. Maybe: --- diff --git a/string/Makefile b/string/Makefile index 206c9b103c..6d4f88ef36 100644 --- a/string/Makefile +++ b/string/Makefile @@ -65,7 +65,10 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \ test-endian-sign-conversion tst-memmove-overflow \ test-sig_np +# Both tests requires the .mo translation files generated by msgfmt. +ifneq ($(MSGFMT),:) tests-container += tst-strsignal tst-strerror +endif # This test allocates a lot of memory and can run for a long time. xtests = tst-strcoll-overflow --- Another option was to set a config.h to indicate this test is unsupported (I don't have a strong opinion here).
The 07/09/2020 09:38, Adhemerval Zanella wrote: > On 09/07/2020 07:00, Szabolcs Nagy wrote: > > The 07/08/2020 10:26, Adhemerval Zanella via Libc-alpha wrote: > >> Both tests require libc.mo translation files which might not be > >> installed on the system. > >> > >> Checked on x86_64-linux-gnu. > >> --- > >> string/Makefile | 4 +++- > >> 1 file changed, 3 insertions(+), 1 deletion(-) > >> > >> diff --git a/string/Makefile b/string/Makefile > >> index f8d3104e16..206c9b103c 100644 > >> --- a/string/Makefile > >> +++ b/string/Makefile > >> @@ -63,7 +63,9 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \ > >> tst-strtok_r bug-strcoll2 tst-cmp tst-xbzero-opt \ > >> test-endian-types test-endian-file-scope \ > >> test-endian-sign-conversion tst-memmove-overflow \ > >> - tst-strsignal tst-strerror test-sig_np > >> + test-sig_np > >> + > >> +tests-container += tst-strsignal tst-strerror > > > > these still fail for me. > > > > i have no libc.mo files in the testroot.root or anywhere. > > > > i assume this is because i have > > > > $ grep MSGFMT config.make > > MSGFMT = : > > > > i can install gettext if this is expected (but i think > > failing with UNSUPPORTED would be nicer). > > I think it is easier to just disable the test in such case, since it is > not straightforward to check if the translation as loaded. Maybe: > > --- > diff --git a/string/Makefile b/string/Makefile > index 206c9b103c..6d4f88ef36 100644 > --- a/string/Makefile > +++ b/string/Makefile > @@ -65,7 +65,10 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \ > test-endian-sign-conversion tst-memmove-overflow \ > test-sig_np > > +# Both tests requires the .mo translation files generated by msgfmt. > +ifneq ($(MSGFMT),:) > tests-container += tst-strsignal tst-strerror > +endif > > # This test allocates a lot of memory and can run for a long time. > xtests = tst-strcoll-overflow > --- > > Another option was to set a config.h to indicate this test is unsupported > (I don't have a strong opinion here). hm i'm not sure what's best, i'm fine with the makefile patch, but it seems even after i install gettext the test fails e.g. if i run LANGUAGE=hu make t=string/tst-strsignal test i see hungarian translations in the failure, so the LANGUAGE env var has precedence over setlocale? i think this may need some more env var setting.
On 09/07/2020 11:42, Szabolcs Nagy wrote: > The 07/09/2020 09:38, Adhemerval Zanella wrote: >> On 09/07/2020 07:00, Szabolcs Nagy wrote: >>> The 07/08/2020 10:26, Adhemerval Zanella via Libc-alpha wrote: >>>> Both tests require libc.mo translation files which might not be >>>> installed on the system. >>>> >>>> Checked on x86_64-linux-gnu. >>>> --- >>>> string/Makefile | 4 +++- >>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/string/Makefile b/string/Makefile >>>> index f8d3104e16..206c9b103c 100644 >>>> --- a/string/Makefile >>>> +++ b/string/Makefile >>>> @@ -63,7 +63,9 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \ >>>> tst-strtok_r bug-strcoll2 tst-cmp tst-xbzero-opt \ >>>> test-endian-types test-endian-file-scope \ >>>> test-endian-sign-conversion tst-memmove-overflow \ >>>> - tst-strsignal tst-strerror test-sig_np >>>> + test-sig_np >>>> + >>>> +tests-container += tst-strsignal tst-strerror >>> >>> these still fail for me. >>> >>> i have no libc.mo files in the testroot.root or anywhere. >>> >>> i assume this is because i have >>> >>> $ grep MSGFMT config.make >>> MSGFMT = : >>> >>> i can install gettext if this is expected (but i think >>> failing with UNSUPPORTED would be nicer). >> >> I think it is easier to just disable the test in such case, since it is >> not straightforward to check if the translation as loaded. Maybe: >> >> --- >> diff --git a/string/Makefile b/string/Makefile >> index 206c9b103c..6d4f88ef36 100644 >> --- a/string/Makefile >> +++ b/string/Makefile >> @@ -65,7 +65,10 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \ >> test-endian-sign-conversion tst-memmove-overflow \ >> test-sig_np >> >> +# Both tests requires the .mo translation files generated by msgfmt. >> +ifneq ($(MSGFMT),:) >> tests-container += tst-strsignal tst-strerror >> +endif >> >> # This test allocates a lot of memory and can run for a long time. >> xtests = tst-strcoll-overflow >> --- >> >> Another option was to set a config.h to indicate this test is unsupported >> (I don't have a strong opinion here). > > hm i'm not sure what's best, i'm fine with the > makefile patch, but it seems even after i > install gettext the test fails e.g. if i run > > LANGUAGE=hu make t=string/tst-strsignal test > > i see hungarian translations in the failure, so the > LANGUAGE env var has precedence over setlocale? > > i think this may need some more env var setting. The 'make t=<test> test; does not run really run the testcase inside a container, so system environment will affect its output different than when running with test-container where it restrict the environment variables. And it seems that LANGUAGE takes precedence over setlocale for loading the translation catalogue, and some tests do explicitly unset it to avoid such issues (intl/tst-codeset.c, intl/tst-gettext{2,3,4,5,6}.c, intl/tst-translit.c). Although not strictly necessary I think we should also make it explict on tst-strsignal and tst-strerror as well. I will send a patch to address both issue, thanks for checking on it.
diff --git a/string/Makefile b/string/Makefile index f8d3104e16..206c9b103c 100644 --- a/string/Makefile +++ b/string/Makefile @@ -63,7 +63,9 @@ tests := tester inl-tester noinl-tester testcopy test-ffs \ tst-strtok_r bug-strcoll2 tst-cmp tst-xbzero-opt \ test-endian-types test-endian-file-scope \ test-endian-sign-conversion tst-memmove-overflow \ - tst-strsignal tst-strerror test-sig_np + test-sig_np + +tests-container += tst-strsignal tst-strerror # This test allocates a lot of memory and can run for a long time. xtests = tst-strcoll-overflow