On 2012.6.24 7:06 AM, Shlomi Fish wrote: > [QUOTE] > t/01basic.t ......................... ok > > # Failed test 'error parsing non-existent does_not_exist.xml' > # at t/02parse.t line 238. > # 'Could not create file parser context for file > "does_not_exist.xml": No error at t/02parse.t line 237. > # ' > # doesn't match '(?-xism:\ACould not create file parser context for file > "does_not_exist\.xml": No\ such\ file\ or\ directory)' > # Looks like you failed 1 test of 531. > t/02parse.t ......................... > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/531 subtests > > [/QUOTE] > > My question is - why?
Some systems stringify an errno value of 0 as "no error". A few things could have caused this: 1) Something might have set errno to 0 between the failure and the error being printed. Many I/O operations will do this, some at the OS level. This could be in the CLEANUP_ERROR_HANDLER or REPORT_ERROR or even inside xmlCreateFileParserCtxt itself. 2) The failure may not have been the result of an I/O failure causing errno to never have been set. Is there a guarantee that xmlCreateFileParserCtxt() sets errno reliably? -- Stabbing you in the face so you don't have to.