[COMMITTED] string: Move tst-strsignal tst-strerror to tests-container
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Jul 9 12:38:15 GMT 2020
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).
More information about the Libc-alpha
mailing list