Re: [PATCH 5/6] virprocess: Passthru error from virProcessRunInForkHelper

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

 



On 24. 3. 2020 11:52, Pino Toscano wrote:
> On Tuesday, 24 March 2020 11:48:17 CET Daniel P. Berrangé wrote:

>> IIUC the problem here is that the STREQ check is assuming that the
>> ENODATA errno results in the string "No data available". The strings
>> are not standardized by POSIX AFAIK, so C libraries can use any reasonable
>> text for them. So this check is not portable.
>>
>> Perhaps its enough to use  STRPREFIX(err->str2, "some error message:") ?
> 
> Or maybe use g_strerror to get the error message of ENODATA, and
> compare it to the actual message got in the test.
> 

Ah indeed, that is the problem. I've went with Pino's suggestion and
proposed a patch for it.

Michal





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux