Re: [kvm-unit-tests PATCH v4 2/6] s390x: css: simplifications of the tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 3/8/21 3:36 PM, Janosch Frank wrote:
On 3/8/21 3:13 PM, Pierre Morel wrote:


On 3/1/21 4:00 PM, Janosch Frank wrote:
On 3/1/21 12:47 PM, Pierre Morel wrote:
In order to ease the writing of tests based on:

...snip...

-static void test_sense(void)
+static bool do_test_sense(void)
   {
   	struct ccw1 *ccw;
+	bool success = false;

That is a very counter-intuitive name, something like "retval" might be
better.
You're free to use the normal int returns but unfortunately you can't
use the E* error constants like ENOMEM.

hum, I had retval and changed it to success on a proposition of Thomas...
I find it more intuitive as a bool since this function succeed or fail,
no half way and is used for the reporting.

other opinion?

Alright, it's 2:1 for "success", so keep it if you want.

:) OK thanks

--
Pierre Morel
IBM Lab Boeblingen



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux