]> xenbits.xensource.com Git - libvirt.git/commit
commandtest: Fix test28 error detection
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 24 Mar 2020 12:48:58 +0000 (13:48 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 Mar 2020 13:33:29 +0000 (14:33 +0100)
commit1ac79d29eb6de04f36f3c53a7f0ff8a584d59a56
tree604a978c393b62bca5e50f1d406c2b9f6cfc1248
parent1b84dd190c16695710a714305517ed24afdd4573
commandtest: Fix test28 error detection

As a part of c799d150d5e9dae I've introduced a test case that
tests whether passing error object between processes works. The
test spawns a child which reports a system error, parent process
then reads the error and compares with expected output. Problem
with this approach is that error message contains stringified
errno which is not portable. FreeBSD has generally different
messages than Linux. Therefore, use g_strerror() to do the errno
to string translation for us.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
tests/commandtest.c