All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/bind03: fix ret code behavior for v4.4 backport
Date: Tue, 20 Nov 2018 16:20:54 +0100	[thread overview]
Message-ID: <20181120152053.GA10812@x230> (raw)
In-Reply-To: <20181107133840.20042-1-rafael.tinoco@linaro.org>

Hi Rafael,

> Recently added test bind03 has a corner case for bind(2). Because
> mainline patch 0fb44559ffd6 ("af_unix: move unix_mknod() out of
> bindlock") got backported to kernel v4.4 as commit 0492a033fb71, the
> corner case must be adapted to correct running kernel version.

...
>  	/*
> -	 * The behavious diverse according to kernel version
> -	 * for v4.10 or later, the expected error is EADDRINUSE,
> +	 * The behavior diverse according to kernel version
> +	 * for v4.4.47~3 or later, the expected error is EADDRINUSE,
>  	 * otherwise EINVAL.
>  	 */
> -	if (tst_kvercmp(4, 10, 0) < 0) {
> +	if (tst_kvercmp(4, 4, 48) < 0) {
>  		if (errno != EINVAL) {
>  			tst_res(TFAIL | TERRNO, "expected EINVAL");
>  			return;

I think this is a wrong approach as there are versions between v4.4 and 4.10
without this patch. IMHO we should accept both EINVAL and EADDRINUSE or accept
Junchi's solution [1].


Kind regards,
Petr

[1] https://patchwork.ozlabs.org/patch/968371/

  reply	other threads:[~2018-11-20 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 13:38 [LTP] [PATCH] syscalls/bind03: fix ret code behavior for v4.4 backport Rafael David Tinoco
2018-11-20 15:20 ` Petr Vorel [this message]
2018-11-20 15:44   ` Rafael David Tinoco

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=20181120152053.GA10812@x230 \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.