public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 2/3] tst_test_macros.h: Require to pass array size in TST_EXP_FAIL*_ARR()
Date: Tue, 26 Mar 2024 15:47:05 +0100	[thread overview]
Message-ID: <20240326144705.GG715328@pevik> (raw)
In-Reply-To: <20240326144145.747735-3-pvorel@suse.cz>

Hi all,

> Although having to pass ARRAY_SIZE() of the expected errnos is not
> ideal, it gives more flexibility to the tests allowing to use just
> portion of the array (will be used in fanotify14 in the next commit).

> It looks to be better than keep introduce yet another functions.

I'm sorry, also splice07.c needs to be updated. I'll fix it before merge
(unless more changes require to send new version).

Kind regards,
Petr

+++ testcases/kernel/syscalls/splice/splice07.c
@@ -54,7 +54,7 @@ static void check_splice(struct tst_fd *fd_in, struct tst_fd *fd_out)
 	const int exp_errnos[] = {EBADF, EINVAL};
 
 	TST_EXP_FAIL2_ARR(splice(fd_in->fd, NULL, fd_out->fd, NULL, 1, 0),
-		exp_errnos, "splice() on %s -> %s",
+		exp_errnos, ARRAY_SIZE(exp_errnos), "splice() on %s -> %s",
 		tst_fd_desc(fd_in), tst_fd_desc(fd_out));
 }
 

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

  reply	other threads:[~2024-03-26 14:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 14:41 [LTP] [PATCH v3 0/3] fanotify14 on SELinux fix Petr Vorel
2024-03-26 14:41 ` [LTP] [PATCH v3 1/3] lib: Add tst_selinux_enforcing() Petr Vorel
2024-03-26 14:41 ` [LTP] [PATCH v3 2/3] tst_test_macros.h: Require to pass array size in TST_EXP_FAIL*_ARR() Petr Vorel
2024-03-26 14:47   ` Petr Vorel [this message]
2024-03-28 13:25   ` Cyril Hrubis
2024-03-26 14:41 ` [LTP] [PATCH v3 3/3] fanotify14: fix anonymous pipe testcases Petr Vorel
2024-03-28 15:52   ` Petr Vorel

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=20240326144705.GG715328@pevik \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox