All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Marius Kittler <mkittler@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v8 0/4] Improve ioctl02.c
Date: Wed, 25 Oct 2023 23:26:38 +0200	[thread overview]
Message-ID: <20231025212638.GA477570@pevik> (raw)
In-Reply-To: <20231025110835.28832-1-mkittler@suse.de>

Hi Marius,

> I implemented again the changes requested for the first and last
> patch.

+1

> That means I removed quite a few comments; I totally agree that
> this code was over-commented. I kept a few comments (mainly in the
> prepare function for the struct) because some struct members are
> over-abbreviated (e.g. `c_cc`) so the comments actually do help
> understanding the code. Some comments were also stating the
> intention of the code which also seemed not completely useless.

+1

> I dropped the intermediate patch to use just termios.

I don't know why, but that was for sure discussed in some previous versions.
Or do you want to get back to it after this effort gets merged?

> In the last patch I decided to use the double-assignment
> suggestion after all because the fields in termios are consistently
> wider than the fields in termio so when just swapping the
> assignment order this should be fine (there can never be a lossy
> conversion). I also decided to make the loop a macro as well
> because at this point we might as well go all-in with the macros.

We usually prefer functions, which are more readable. But I'll comment that more
at the 4th patch.

> Btw, you're sure you don't want to give C++ a try at some point :-)
> (Just mentioning this because I really would have liked using C++
> templates in this case and with C++ you can really pick what you
> like and keep everything else in the usual C-style.)

I don't think either C++ templates for LTP would be a good idea.
The code is very simple to include any templating system.
Also testing (g)libc headers should be IMHO done with plain C.

Kind regards,
Petr

> Marius Kittler (4):
>   Refactor ioctl02.c to use the new test API
>   Make checks for termio flags more strict
>   Remove disabled code in ioctl02.c
>   Extend ioctl02 to test termio and termios

>  testcases/kernel/syscalls/ioctl/ioctl02.c | 551 +++++++---------------
>  1 file changed, 171 insertions(+), 380 deletions(-)

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

      parent reply	other threads:[~2023-10-25 21:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 11:08 [LTP] [PATCH v8 0/4] Improve ioctl02.c Marius Kittler
2023-10-25 11:08 ` [LTP] [PATCH v8 1/4] Refactor ioctl02.c to use the new test API Marius Kittler
2023-10-25 22:06   ` Petr Vorel
2023-10-25 22:09     ` Petr Vorel
2023-10-25 22:20     ` Petr Vorel
2023-10-25 22:23       ` Petr Vorel
2023-10-25 11:08 ` [LTP] [PATCH v8 2/4] Make checks for termio flags more strict Marius Kittler
2023-10-25 22:31   ` Petr Vorel
2023-10-25 11:08 ` [LTP] [PATCH v8 3/4] Remove disabled code in ioctl02.c Marius Kittler
2023-10-25 22:22   ` Petr Vorel
2023-10-25 11:08 ` [LTP] [PATCH v8 4/4] Extend ioctl02 to test termio and termios Marius Kittler
2023-10-25 22:13   ` Petr Vorel
2023-10-26  6:34     ` iob via ltp
2023-10-26  8:35       ` Petr Vorel
2023-10-25 21:26 ` Petr Vorel [this message]

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=20231025212638.GA477570@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=mkittler@suse.de \
    /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.