public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 1/2] Add silent macros for TST_EXP_EQ_*
Date: Tue, 10 Sep 2024 17:26:59 +0200	[thread overview]
Message-ID: <ZuBlQ02-AHxwDoI1@yuki.lan> (raw)
In-Reply-To: <20240902-fcntl4_refactoring-v4-1-4446517da427@suse.com>

Hi!
> +#define TST_EXP_EQ_SILENT_(VAL_A, SVAL_A, VAL_B, SVAL_B, TYPE, PFS) do {       \
> +	TYPE tst_tmp_a__ = VAL_A;                                              \
> +	TYPE tst_tmp_b__ = VAL_B;                                              \
> +                                                                               \
> +	TST_PASS = 0;                                                          \
> +                                                                               \
> +	if (tst_tmp_a__ != tst_tmp_b__) {                                      \
> +		tst_res_(__FILE__, __LINE__, TFAIL,                            \
> +			SVAL_A " (" PFS ") != " SVAL_B " (" PFS ")",           \
> +			tst_tmp_a__, tst_tmp_b__);                             \
> +		break;                                                         \
> +	}                                                                      \
> +                                                                               \

I would probably do here:

	} else {
		TST_PASS = 1;
	}

Because it's a bit more readable.

Also you did messed up the alignment of the \ at the end.


Apart from these minor things I do not see anything wrong here.

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2024-09-10 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02 12:45 [LTP] [PATCH v4 0/2] fcntl14 refactoring Andrea Cervesato
2024-09-02 12:45 ` [LTP] [PATCH v4 1/2] Add silent macros for TST_EXP_EQ_* Andrea Cervesato
2024-09-10 15:26   ` Cyril Hrubis [this message]
2024-09-02 12:45 ` [LTP] [PATCH v4 2/2] Rewrite fcnt14 test Andrea Cervesato
2024-09-10 15:48   ` 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=ZuBlQ02-AHxwDoI1@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=andrea.cervesato@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox