]> sourceware.org Git - glibc.git/commitdiff
io/tst-statvfs: fix statfs().f_type comparison test on some arches
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Tue, 15 Aug 2023 13:07:59 +0000 (15:07 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 15 Aug 2023 15:08:23 +0000 (17:08 +0200)
On i686 f_type is an i32 so the test fails when that has the top bit set.

Explicitly cast to u32.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
io/tst-statvfs.c

index f3097ce1a82b3fee0507890b2c66877c7ef9360a..fb23733667d8aa345d73049cbda1bcdf1b634606 100644 (file)
@@ -16,7 +16,7 @@ do_test (int argc, char *argv[])
       struct statfs stf;
       TEST_COMPARE (statvfs (argv[i], &st), 0);
       TEST_COMPARE (statfs (argv[i], &stf), 0);
-      TEST_COMPARE (st.f_type, stf.f_type);
+      TEST_COMPARE (st.f_type, (unsigned int) stf.f_type);
       printf ("%s: free: %llu, mandatory: %s, tp=%x\n", argv[i],
               (unsigned long long int) st.f_bfree,
 #ifdef ST_MANDLOCK
This page took 0.046955 seconds and 5 git commands to generate.