Skip to content
Snippets Groups Projects
Commit 0f679438 authored by Petr Vaněk's avatar Petr Vaněk Committed by Ondřej Zajíček
Browse files

Printf test suite fails on systems with musl libc because tests for "%m"

and "%M" formats expect "Input/output error" message but musl returns
"I/O error". Proposed change compares the printf output with string
returned from strerror function for EIO constant.

See-also: https://bugs.gentoo.org/836713

Minor change from committer.
parent 2f080b54
No related branches found
No related tags found
No related merge requests found
......@@ -32,11 +32,14 @@ t_simple(void)
BSPRINTF(1, "@", buf, "@", 64);
BSPRINTF(1, "\xff", buf, "%c", 0xff);
errno = 5;
BSPRINTF(18, "Input/output error", buf, "%m");
const char *io_error_str = lp_strdup(tmp_linpool, strerror(EIO));
const int io_error_len = strlen(io_error_str);
errno = EIO;
BSPRINTF(io_error_len, io_error_str, buf, "%m");
errno = 0;
BSPRINTF(18, "Input/output error", buf, "%M", 5);
BSPRINTF(io_error_len, io_error_str, buf, "%M", EIO);
BSPRINTF(11, "TeSt%StRiNg", buf, "%s", "TeSt%StRiNg");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment