diff --git a/tests/testutils.c b/tests/testutils.c index 70e34564a4..6645d61494 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -670,16 +670,12 @@ virtTestCompareToFile(const char *strcontent, if (STRNEQ_NULLABLE(fixedcontent ? fixedcontent : strcontent, filecontent)) { - if (virTestGetRegenerate()) { - if (virFileWriteStr(filename, strcontent, 0666) < 0) - goto failure; - goto out; - } - virtTestDifference(stderr, filecontent, strcontent); + virtTestDifferenceFull(stderr, + filecontent, filename, + strcontent, NULL); goto failure; } - out: ret = 0; failure: VIR_FREE(fixedcontent);