Fix reported runtime for single tests in pg_regress
authorDaniel Gustafsson <[email protected]>
Tue, 16 May 2023 08:49:48 +0000 (10:49 +0200)
committerDaniel Gustafsson <[email protected]>
Tue, 16 May 2023 08:49:48 +0000 (10:49 +0200)
Commit 558fff0adf got the order of the parameters to test_status_failed
mixed up which resulted in the runtime being reported as 0 ms.  Fix by
changing the order to the correct one.  No backpatching is needed since
this has not been shipped in a release yet.

Discussion: https://postgr.es/m/0134C9EC-5F6B-4EAC-B2D5-BB4249BEBD4D@yesql.se

src/test/regress/pg_regress.c

index 48008fa8c3f6a7230b7a6829dc0c0b3cc11160b2..88ab255ce61efe72a9b762103f7be2c0c8d81e65 100644 (file)
@@ -1891,14 +1891,14 @@ run_single_test(const char *test, test_start_function startfunc,
 
        if (exit_status != 0)
        {
-               test_status_failed(test, false, INSTR_TIME_GET_MILLISEC(stoptime));
+               test_status_failed(test, INSTR_TIME_GET_MILLISEC(stoptime), false);
                log_child_failure(exit_status);
        }
        else
        {
                if (differ)
                {
-                       test_status_failed(test, false, INSTR_TIME_GET_MILLISEC(stoptime));
+                       test_status_failed(test, INSTR_TIME_GET_MILLISEC(stoptime), false);
                }
                else
                {