Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5307 closed enhancement (fixed)

parted-3.2

Reported by: Fernando de Oliveira Owned by: Fernando de Oliveira
Priority: normal Milestone: 7.6
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

Attachments (1)

parted-3.2-t0251-gpt-unicode.sh (1.3 KB ) - added by Fernando de Oliveira 10 years ago.
Test with problem failing "Error during translation: Invalid or incomplete multibyte or wide character"

Download all attachments as: .zip

Change History (11)

comment:1 by Fernando de Oliveira, 10 years ago

Owner: changed from blfs-book@… to Fernando de Oliveira
Status: newassigned

Tests again: t0251-gpt-unicode.sh failed for me.

Discussed in the nete, e.g:

https://lists.gnu.org/archive/html/bug-parted/2014-07/msg00035.html

For me:

$ echo $LANG pt_BR.UTF-8

and tests works with the following, before make check:

sed -i "s/C.UTF-8/$LANG/" tests/t0251-gpt-unicode.sh

This instruction (export LC_ALL=C.UTF-8) was inducing error before, when it was used en_US.UTF-8, that was the reason to have been modified to C.UTF-8. I think the test will be wrong if you have LANG=XY.UTF-8, but am not sure.

Shall I include the sed, or just comment?

in reply to:  1 comment:2 by bdubbs@…, 10 years ago

Replying to fo:

sed -i "s/C.UTF-8/$LANG/" tests/t0251-gpt-unicode.sh

I don't think this will work in all cases. In my case, I don't have LANG set.

comment:3 by Fernando de Oliveira, 10 years ago

Good point. Actually that was one reason I was not sure about what to do I was planing to say "If you have LANG set to XY.UTF-8, use ...". Still, I cannot be sure it would work in general even if it worked in some cases.

Perhaps discuss this problem in the text and say that in some cases the test might fail and be fixed with the sed?

Or just say the test might fail?

I will attach the test.

by Fernando de Oliveira, 10 years ago

Test with problem failing "Error during translation: Invalid or incomplete multibyte or wide character"

comment:4 by Fernando de Oliveira, 10 years ago

Resolution: fixed
Status: assignedclosed

Fixed at r13733.

comment:5 by Fernando de Oliveira, 10 years ago

Forgot to thank Bruce for comment 2.

comment:6 by Fernando de Oliveira, 10 years ago

Found a better solution, but still don't like, because it modifies the system and i don't know how to undo it.

$ locale -a | grep -i ^C.UTF
$

...

# localedef -c -i POSIX -f UTF-8 C.UTF-8
LC_MONETARY: value of field `int_curr_symbol' has wrong length
No definition for LC_PAPER category found
No definition for LC_NAME category found
No definition for LC_ADDRESS category found
No definition for LC_TELEPHONE category found
No definition for LC_MEASUREMENT category found
No definition for LC_IDENTIFICATION category found

...

$ locale -a | grep -i ^C.UTF
C.utf8

Now, the test passes:

$ cd parted-3.2/tests
$ make check TESTS=t0251-gpt-unicode.sh VERBOSE=yes

...

============================================================================
Testsuite summary for GNU parted 3.2
============================================================================
# TOTAL: 1
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

I have seen other discussions of tests or build needing this locale.

  1. I think one such locale should bre added to LFS/BLFS (debian has already done, IIRC, since 2009)
  1. I cannot tell if the command I used (with POSIX, because just "C" does not work) is correct, or if someone could please give me a better one.
  1. Could, after 1. and 2., replace the instructions for the tests, which I wrote yesterday, and am not happy with.

Reason I am not happy is that if this test fails, even with make -k check, test suite stops closer to the start than to the end of all tests, which would only allow in the book "there is no working test suite for this package...".

comment:7 by Fernando de Oliveira, 10 years ago

Resolution: fixed
Status: closedreopened

comment:8 by Fernando de Oliveira, 10 years ago

Decided to remove the test:

sed -i '/t0251-gpt-unicode.sh/d' tests/Makefile

comment:9 by Fernando de Oliveira, 10 years ago

Resolution: fixed
Status: reopenedclosed

Fixed at r13760.

comment:10 by Fernando de Oliveira, 10 years ago

This seems to never end.

Forgot to delete older test related instruction.

Fixed at r13770.

Note: See TracTickets for help on using tickets.