Re: [libvirt] [PATCH v2 01/14] test: Adjust cleanup/error paths for nodedev test APIs

2017-05-26 Thread John Ferlan
On 05/26/2017 03:05 AM, Peter Krempa wrote: > On Thu, May 25, 2017 at 15:56:58 -0400, John Ferlan wrote: >> - Rather than "goto cleanup;" on failure to virNodeDeviceObjFindByName >>an @obj, just return directly. This then allows the cleanup: label code >>to not have to check "if (obj)"

Re: [libvirt] [PATCH v2 01/14] test: Adjust cleanup/error paths for nodedev test APIs

2017-05-26 Thread Peter Krempa
On Thu, May 25, 2017 at 15:56:58 -0400, John Ferlan wrote: > - Rather than "goto cleanup;" on failure to virNodeDeviceObjFindByName >an @obj, just return directly. This then allows the cleanup: label code >to not have to check "if (obj)" before calling virNodeDeviceObjUnlock. >This al

[libvirt] [PATCH v2 01/14] test: Adjust cleanup/error paths for nodedev test APIs

2017-05-25 Thread John Ferlan
- Rather than "goto cleanup;" on failure to virNodeDeviceObjFindByName an @obj, just return directly. This then allows the cleanup: label code to not have to check "if (obj)" before calling virNodeDeviceObjUnlock. This also simplifies some exit logic... - In testNodeDeviceObjFindByName