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

Michal Prívozník mprivozn at redhat.com
Tue Mar 24 12:55:39 UTC 2020


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




More information about the libvir-list mailing list