[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67a92005-4e13-909a-1693-dfb86d8114c0@gnuweeb.org>
Date: Wed, 20 Jul 2022 23:03:58 +0700
From: Ammar Faizi <ammarfaizi2@...weeb.org>
To: Willy Tarreau <w@....eu>
Cc: "Paul E. McKenney" <paulmck@...nel.org>,
Pranith Kumar <bobby.prani@...il.com>,
Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>,
David Laight <David.Laight@...LAB.COM>,
Mark Brown <broonie@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Shuah Khan <shuah@...nel.org>,
Fernanda Ma'rouf <fernandafmr12@...weeb.org>,
Linux Kselftest Mailing List
<linux-kselftest@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>
Subject: Re: [PATCH 00/17] nolibc: add preliminary self tests
On 7/20/22 4:44 AM, Willy Tarreau wrote:
> I'm obviously interested in comments, but really, I don't want to
> overdesign something for a first step, it remains a very modest test
> program and I'd like that it remains easy to hack on it and to contribute
> new tests that are deemed useful.
I personally hate how the test framework mandates:
"There must be exactly one test per line."
which makes the test case, for example, one long liner like this:
if ((p1 = p2 = sbrk(4096)) != (void *)-1) p2 = sbrk(-4096); EXPECT_SYSZR(1, (p2 == (void *)-1) || p2 == p1); break;
that's ugly and hard to read. Can we get rid of this "one test per line" rule?
It would be great if we followed the documented coding style that says:
"Statements longer than 80 columns should be broken into sensible chunks,
unless exceeding 80 columns significantly increases readability and does
not hide information." [1]
What we have here doesn't really increase the readability at all. Maybe
it's too late for 5.20, just for next in case we want to fix it.
Willy?
[1]: https://www.kernel.org/doc/html/v5.15/process/coding-style.html#breaking-long-lines-and-strings
--
Ammar Faizi
Powered by blists - more mailing lists