From: Cyril Hrubis <chrubis@suse.cz>
To: panzhe <panzhe@kylinos.cn>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3] gethostname02: Accept EOVERFLOW on alpha
Date: Wed, 3 Jun 2026 11:31:50 +0200 [thread overview]
Message-ID: <ah_0hleR0ISIjG3Y@yuki.lan> (raw)
In-Reply-To: <20260603014933.30653-1-panzhe@kylinos.cn>
Hi!
> On alpha glibc's gethostname() directly calls the kernel
> syscall and sets errno to EOVERFLOW when the buffer is
> too small, because the kernel truncates silently and the
> string is not null terminated.
>
> On the other hand, the generic posix implementation used
> on x86_64 sets ENAMETOOLONG in this case.
>
> Fix this by accepting both errnos.
Looking at man gethostname it's not supposed to return EOVERFLOW. I'm
not sure that we want to work around this in the tests.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-06-03 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 1:49 [LTP] [PATCH v3] gethostname02: Accept EOVERFLOW on alpha panzhe
2026-06-03 4:09 ` [LTP] " linuxtestproject.agent
2026-06-03 9:31 ` Cyril Hrubis [this message]
[not found] <--compose>
2026-06-04 7:26 ` [LTP] [PATCH v3] " panzhe
2026-06-04 8:43 ` Cyril Hrubis
2026-06-09 8:11 ` Andrea Cervesato via ltp
2026-06-09 9:53 ` Cyril Hrubis
Reply instructions:
You may reply publicly 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=ah_0hleR0ISIjG3Y@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=panzhe@kylinos.cn \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox