Util-Linux Archive on lore.kernel.org
 help / color / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: util-linux@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>
Subject: [PATCH 0/6] Test suite fixes for musl libc
Date: Fri, 23 Aug 2019 12:16:57 +0200
Message-ID: <cover.1566555078.git.ps@pks.im> (raw)

Hi,

on latest master of util-linux, there's currently 20 test- and
subtest failures on musl based systems. There's three different
categories of failures:

    - Reliance on buffering properties of stdout/stderr.

    - Expectance of non-standard error messages returned by
      strerror(3P).

    - Expectance of EILSEQ with POSIX locale.

This patch set fixes all of the above, bringing down the number
of failures from 20 to a single test failure. The remaining
failure is in getopt(1), which documents and implicitly relies on
the POSIXLY_CORRECT environment variable when calling getopt_long
from glibc. Adhering to this variable isn't implemented by musl
libc, so to get this working correctly one would have to modify
getopt(1) itself, e.g. by automatically prepending a '+' to the
optstr if the envvar is set. But I'll leave that to another patch
series.

Regards
Patrick

Patrick Steinhardt (6):
  tests: remove reliance on buffer behaviour of stderr/stdout streams
  tests: colcrt: fix reliance on EILSEQ in POSIX locale
  tests: column: use actually invalid multibytes to test encoding
  tests: col: avoid hardcoding of errno string
  tests: fdisk: avoid hardcoding of errno string
  tests: libfdisk: remove reliance on buffer behaviour of standard
    streams

 tests/commands.sh                             |  1 +
 tests/expected/col/multibyte                  |  2 +-
 tests/expected/column/invalid-multibyte       |  2 +-
 tests/expected/fdisk/oddinput                 |  4 +-
 tests/expected/libfdisk/mkpart-full-gpt       | 14 +++---
 .../libfdisk/mkpart-full-gpt-err-overlap      |  8 ++--
 .../libfdisk/mkpart-full-gpt-nopartno         | 14 +++---
 .../libfdisk/mkpart-full-gpt-partno-gap       | 14 +++---
 .../libfdisk/mkpart-full-gpt-space-gap        | 10 ++---
 .../libfdisk/mkpart-full-mbr-err-logical      | 14 +++---
 .../libfdisk/mkpart-full-mbr-err-nospace      |  6 +--
 .../libfdisk/mkpart-full-mbr-err-primary      |  6 +--
 .../expected/libfdisk/mkpart-full-mbr-logical | 14 +++---
 .../libfdisk/mkpart-full-mbr-nopartno         | 14 +++---
 .../expected/libfdisk/mkpart-full-mbr-primary |  8 ++--
 .../libfdisk/mkpart-full-mbr-primary-nopartno |  8 ++--
 .../libfdisk/mkpart-full-mbr-space-gap        |  6 +--
 tests/expected/misc/swaplabel                 |  2 +-
 tests/expected/rename/exit_codes              |  2 +-
 tests/functions.sh                            |  7 +++
 tests/helpers/Makemodule.am                   |  3 ++
 tests/helpers/test_strerror.c                 | 44 +++++++++++++++++++
 tests/ts/col/multibyte                        |  5 ++-
 tests/ts/colcrt/regressions                   |  2 +-
 tests/ts/column/invalid-multibyte             |  2 +-
 tests/ts/fdisk/oddinput                       |  6 ++-
 tests/ts/libfdisk/mkpart-full                 | 26 +++++------
 tests/ts/misc/swaplabel                       |  4 +-
 tests/ts/rename/exit_codes                    |  2 +-
 29 files changed, 154 insertions(+), 96 deletions(-)
 create mode 100644 tests/helpers/test_strerror.c

-- 
2.23.0


             reply index

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 10:16 Patrick Steinhardt [this message]
2019-08-23 10:16 ` [PATCH 1/6] tests: remove reliance on buffer behaviour of stderr/stdout streams Patrick Steinhardt
2019-08-23 10:16 ` [PATCH 2/6] tests: colcrt: fix reliance on EILSEQ in POSIX locale Patrick Steinhardt
2019-08-23 10:17 ` [PATCH 3/6] tests: column: use actually invalid multibytes to test encoding Patrick Steinhardt
2019-08-23 10:17 ` [PATCH 4/6] tests: col: avoid hardcoding of errno string Patrick Steinhardt
2019-08-23 10:17 ` [PATCH 5/6] tests: fdisk: " Patrick Steinhardt
2019-08-23 10:17 ` [PATCH 6/6] tests: libfdisk: remove reliance on buffer behaviour of standard streams Patrick Steinhardt
2019-08-23 12:15   ` Karel Zak
2019-08-23 13:32 ` [PATCH v2 0/6] Test suite fixes for musl libc Patrick Steinhardt
2019-08-23 13:32   ` [PATCH v2 1/6] tests: remove reliance on buffer behaviour of stderr/stdout streams Patrick Steinhardt
2019-08-27 11:17     ` Karel Zak
2019-08-27 11:49       ` Patrick Steinhardt
2019-08-27 12:32         ` Karel Zak
2019-08-27 11:55       ` Patrick Steinhardt
2019-08-27 12:31         ` Karel Zak
2019-08-27 12:26       ` [PATCH] tests: use env and support both unbuffer/stdbuf Patrick Steinhardt
2019-08-27 12:46         ` Karel Zak
2019-08-28 10:51         ` Karel Zak
2019-08-30 19:08           ` Karel Zak
2019-08-31  7:41           ` Patrick Steinhardt
2019-08-23 13:32   ` [PATCH v2 2/6] tests: libfdisk: remove reliance on buffer behaviour of standard streams Patrick Steinhardt
2019-08-23 13:32   ` [PATCH v2 3/6] tests: colcrt: fix reliance on EILSEQ in POSIX locale Patrick Steinhardt
2019-08-23 13:32   ` [PATCH v2 4/6] tests: column: use actually invalid multibytes to test encoding Patrick Steinhardt
2019-08-23 13:32   ` [PATCH v2 5/6] tests: col: avoid hardcoding of errno string Patrick Steinhardt
2019-08-23 13:32   ` [PATCH v2 6/6] tests: fdisk: " Patrick Steinhardt

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1566555078.git.ps@pks.im \
    --to=ps@pks.im \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Util-Linux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
		util-linux@vger.kernel.org util-linux@archiver.kernel.org
	public-inbox-index util-linux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox