From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] [RFC] macros: Remove TEST_VOID()
Date: Tue, 14 Jan 2025 17:20:28 +0100 [thread overview]
Message-ID: <20250114162028.GB619334@pevik> (raw)
In-Reply-To: <9cda6edd-6644-46f6-980e-b8939f6f2240@suse.com>
> Hi!
> I'm kinda surprised something so ugly even existed :-) Thanks for cleaning
> up.
> Feel free to merge the whole patch-set.
Yeah, there are many dark sides in LTP :). Fortunately, thanks to you and others
it's getting much better.
Kind regards,
Petr
> Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
> Andrea
> On 1/9/25 14:23, Petr Vorel wrote:
> > TEST_VOID() macro was meant for syscalls whose return type is void, e.g.
> > sync(). It was used only sync03.c, which was later merged to sync01.c
> > and later removed. Now it's unused, therefore remove it.
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > include/old/usctest.h | 14 --------------
> > include/tst_test_macros.h | 7 -------
> > 2 files changed, 21 deletions(-)
> > diff --git a/include/old/usctest.h b/include/old/usctest.h
> > index 2d46c40451..b984c343fd 100644
> > --- a/include/old/usctest.h
> > +++ b/include/old/usctest.h
> > @@ -60,20 +60,6 @@ extern int TEST_ERRNO;
> > TEST_ERRNO = errno; \
> > } while (0)
> > -/***********************************************************************
> > - * TEST_VOID: calls a system call
> > - *
> > - * parameters:
> > - * SCALL = system call and parameters to execute
> > - *
> > - * Note: This is IDENTICAL to the TEST() macro except that it is intended
> > - * for use with syscalls returning no values (void syscall()). The
> > - * Typecasting nothing (void) into an unsigned integer causes compilation
> > - * errors.
> > - *
> > - ***********************************************************************/
> > -#define TEST_VOID(SCALL) do { errno = 0; SCALL; TEST_ERRNO = errno; } while (0)
> > -
> > /***********************************************************************
> > * TEST_PAUSE: Pause for SIGUSR1 if the pause flag is set.
> > * Just continue when signal comes in.
> > diff --git a/include/tst_test_macros.h b/include/tst_test_macros.h
> > index b2ca32f771..b2b446b70c 100644
> > --- a/include/tst_test_macros.h
> > +++ b/include/tst_test_macros.h
> > @@ -16,13 +16,6 @@
> > TST_ERR = errno; \
> > } while (0)
> > -#define TEST_VOID(SCALL) \
> > - do { \
> > - errno = 0; \
> > - SCALL; \
> > - TST_ERR = errno; \
> > - } while (0)
> > -
> > extern long TST_RET;
> > extern int TST_ERR;
> > extern int TST_PASS;
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-01-14 16:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 13:23 [LTP] [PATCH 1/2] [RFC] macros: Remove TEST_VOID() Petr Vorel
2025-01-09 13:23 ` [LTP] [PATCH 2/2] macros: Add basic docs Petr Vorel
2025-01-09 13:35 ` Andrea Cervesato via ltp
2025-01-10 14:57 ` Petr Vorel
2025-01-14 14:44 ` Andrea Cervesato via ltp
2025-05-09 7:00 ` Li Wang via ltp
2025-05-12 9:17 ` Avinesh Kumar
2025-06-09 7:17 ` Petr Vorel
2025-01-14 14:46 ` [LTP] [PATCH 1/2] [RFC] macros: Remove TEST_VOID() Andrea Cervesato via ltp
2025-01-14 16:20 ` Petr Vorel [this message]
2025-05-09 6:46 ` Li Wang via ltp
2025-06-09 7:14 ` 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=20250114162028.GB619334@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.com \
--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