public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Jan Polensky" <japo@linux.ibm.com>
Cc: Linux Test Project <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v3 1/2] fsetxattr02: Adapt test for kernel 7.1.0+ socket xattr support
Date: Fri, 20 Mar 2026 07:46:19 +0000	[thread overview]
Message-ID: <69bcfb4c.050a0220.196b4d.9984@mx.google.com> (raw)
In-Reply-To: <20260316122725.122719-2-japo@linux.ibm.com>

Hi!

> +static void fix_sock(struct test_case *tc)
> +{
> +	/* dc0876b9846d ("xattr: support extended attributes on sockets") */
> +	if (socket_xattr_supported)
> +		tc->exp_err = 0;

There's a mix of `bool` and `int` here. I would just define tc->exp_err as `int`
and leave `bool` out of the test for consistency.

Also I was thinking that we shouldn't explicitly edit static variables meant
to describe the test scenario, so we probably need a local variable (also for
consistency).

    int exp_err = tc->exp_err;

    if (socket_xattr_supported)
        exp_err = 1;

I can add these two small things before merge if you agree with that.

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2026-03-20  7:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 12:27 [LTP] [PATCH v3 0/2] LTP: adjust socket xattr tests for kernel 7.1.0+ Jan Polensky
2026-03-16 12:27 ` [LTP] [PATCH v3 1/2] fsetxattr02: Adapt test for kernel 7.1.0+ socket xattr support Jan Polensky
2026-03-20  7:46   ` Andrea Cervesato via ltp [this message]
2026-03-20  9:30     ` Jan Polensky
2026-03-16 12:27 ` [LTP] [PATCH v3 2/2] setxattr02: " Jan Polensky
2026-03-16 14:39   ` Petr Vorel
2026-03-17 13:00   ` Andrea Cervesato via ltp
2026-03-17 23:01     ` Petr Vorel
2026-03-18 10:53       ` Jan Polensky

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=69bcfb4c.050a0220.196b4d.9984@mx.google.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=japo@linux.ibm.com \
    /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