r8634: we are still getting occasional test failures due to disk space
authorAndrew Tridgell <tridge@samba.org>
Wed, 20 Jul 2005 05:49:49 +0000 (05:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:29:47 +0000 (13:29 -0500)
changing. I suspect it is a signed/unsigned problem with the approx
equal test. Hopefully this will fix it.
(This used to be commit 668dd29259198698c556c50e28a9070085db89ea)

source4/torture/raw/qfsinfo.c

index 1237ddf7b13d2b98d9b4e2adf888f12f5e359440..7576c4b22ae1f9626991d5bbf91d27dbfbd9c2ac 100644 (file)
@@ -75,7 +75,7 @@ static union smb_fsinfo *find(const char *name)
         ret = False; \
 }} while(0)
 
-#define VAL_APPROX_EQUAL(n1, v1, n2, v2) do {if (ABS(s1->n1.out.v1 - s2->n2.out.v2) > 0.1*s1->n1.out.v1) { \
+#define VAL_APPROX_EQUAL(n1, v1, n2, v2) do {if (ABS((int)(s1->n1.out.v1) - (int)(s2->n2.out.v2)) > 0.1*s1->n1.out.v1) { \
         printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \
                #n1, #v1, (uint_t)s1->n1.out.v1, \
                #n2, #v2, (uint_t)s2->n2.out.v2, \