This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit b5763f40f3d2e587fc654995303af65850fa2c01
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Tue Sep 22 18:21:06 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Tue Sep 29 22:28:01 2026 +0200

    avutil/tests/rational: return failure on any reported mismatch
    
    Only the av_add_stable() and av_q2intfloat() loops returned nonzero.
    Every other check logged the mismatch and the test still exited with 0,
    so it could never fail under FATE.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavutil/tests/rational.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/libavutil/tests/rational.c b/libavutil/tests/rational.c
index 2c9ca947fc..13090c11d5 100644
--- a/libavutil/tests/rational.c
+++ b/libavutil/tests/rational.c
@@ -27,6 +27,7 @@ int main(void)
 {
     AVRational a,b,r;
     int i,j,k;
+    int ret = 0;
     static const int64_t numlist[] = {
         INT64_MIN, INT64_MIN+1, INT64_MAX, INT32_MIN, INT32_MAX, 1,0,-1,
         123456789, INT32_MAX-1, INT32_MAX+1LL, UINT32_MAX-1, UINT32_MAX, 
UINT32_MAX+1LL
@@ -42,12 +43,16 @@ int main(void)
                     if (d > 0)       d = 1;
                     else if (d < 0)  d = -1;
                     else if (d != d) d = INT_MIN;
-                    if (c != d)
+                    if (c != d) {
                         av_log(NULL, AV_LOG_ERROR, "%d/%d %d/%d, %d %f\n", 
a.num,
                                a.den, b.num, b.den, c,d);
+                        ret = 1;
+                    }
                     r = av_sub_q(av_add_q(b,a), b);
-                    if(b.den && (r.num*a.den != a.num*r.den || !r.num != 
!a.num || !r.den != !a.den))
+                    if(b.den && (r.num*a.den != a.num*r.den || !r.num != 
!a.num || !r.den != !a.den)) {
                         av_log(NULL, AV_LOG_ERROR, "%d/%d ", r.num, r.den);
+                        ret = 1;
+                    }
                 }
             }
         }
@@ -76,6 +81,7 @@ int main(void)
             if (r.num != c.num || r.den != c.den) {
                 av_log(NULL, AV_LOG_ERROR, "%d/%d * %d/%d = %d/%d, expected 
%d/%d\n",
                        a.num, a.den, b.num, b.den, r.num, r.den, c.num, c.den);
+                ret = 1;
             }
         }
     }
@@ -102,6 +108,7 @@ int main(void)
             if (r.num != c.num || r.den != c.den) {
                 av_log(NULL, AV_LOG_ERROR, "%d/%d + %d/%d = %d/%d, expected 
%d/%d\n",
                        a.num, a.den, b.num, b.den, r.num, r.den, c.num, c.den);
+                ret = 1;
             }
         }
     }
@@ -137,6 +144,7 @@ int main(void)
                     continue;
 
                 av_log(NULL, AV_LOG_ERROR, "%"PRId64" * %"PRId64" / %"PRId64" 
= %"PRId64" or %"PRId64"\n", a,b,c, res, av_i2int(ai));
+                ret = 1;
             }
         }
     }
@@ -184,5 +192,5 @@ int main(void)
         }
     }
 
-    return 0;
+    return ret;
 }

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to