[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] s390x/css: introduce css data stream
From: |
Halil Pasic |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] s390x/css: introduce css data stream |
Date: |
Mon, 11 Sep 2017 18:36:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
On 09/06/2017 02:51 PM, Cornelia Huck wrote:
>>>> +void ccw_dstream_init(CcwDataStream *cds, CCW1 const *ccw, ORB const *orb)
>>>> +{
>>>> + /*
>>>> + * We don't support MIDA (an optional facility) yet and we
>>>> + * catch this earlier. Just for expressing the precondition.
>>>> + */
>>>> + assert(!(orb->ctrl1 & ORB_CTRL1_MASK_MIDAW));
>>> I don't know, this is infrastructure, should it trust its callers? If
>>> you keep the assert, please make it g_assert().
>>
>> Why g_assert? I think g_assert comes form a test framework, this is not
>> test code.
> g_assert() is glib, no?
>
It lives in GLib > GLib Utilities > Testing:
https://developer.gnome.org/glib/stable/glib-Testing.html
The description of "Testing" starts like this: "GLib provides a framework
for writing and maintaining unit tests in parallel to the code they are
testing. The API is designed according to established concepts found in
the other test frameworks (JUnit, NUnit, RUnit), which in turn is based
on smalltalk unit testing concepts."
So yes, it's both glib and testing framework. This is why I
ask why should one use g_assert in not-unit-test code.
Halil
- Re: [Qemu-devel] [PATCH 3/5] virtio-ccw: use ccw data stream, (continued)
[Qemu-devel] [PATCH 1/5] s390x/css: introduce css data stream, Halil Pasic, 2017/09/05
[Qemu-devel] [PATCH 5/5] s390x/ccs: add ccw-tester emulated device, Halil Pasic, 2017/09/05
- Re: [Qemu-devel] [PATCH 5/5] s390x/ccs: add ccw-tester emulated device, Cornelia Huck, 2017/09/06
- Re: [Qemu-devel] [PATCH 5/5] s390x/ccs: add ccw-tester emulated device, Halil Pasic, 2017/09/06
- Re: [Qemu-devel] [PATCH 5/5] s390x/ccs: add ccw-tester emulated device, Cornelia Huck, 2017/09/06
- Re: [Qemu-devel] [PATCH 5/5] s390x/ccs: add ccw-tester emulated device, Halil Pasic, 2017/09/06
- Re: [Qemu-devel] [PATCH 5/5] s390x/ccs: add ccw-tester emulated device, Cornelia Huck, 2017/09/07
- Re: [Qemu-devel] [PATCH 5/5] s390x/ccs: add ccw-tester emulated device, Janosch Frank, 2017/09/07
- Re: [Qemu-devel] [PATCH 5/5] s390x/ccs: add ccw-tester emulated device, Cornelia Huck, 2017/09/07