test_fs.c: Fix issue on 32-bit systems using btrfs (#4227)

On Fedora's build system, the build environment runs on btrfs. This
revealed a bug in the test on i686 systems, where this comparison was
being performed as a comparison of two signed integers, but the
filesystem type of btrfs happens to use the higher-order bits, resulting
in it appearing as a negative value.

BTRFS_SUPER_MAGIC     0x9123683e

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2023-11-24 05:18:51 -05:00 committed by GitHub
parent fc70430b09
commit de43f42735
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -343,7 +343,7 @@ static void statfs_cb(uv_fs_t* req) {
defined(__OpenBSD__) || defined(__NetBSD__) defined(__OpenBSD__) || defined(__NetBSD__)
ASSERT_OK(stats->f_type); ASSERT_OK(stats->f_type);
#else #else
ASSERT_GT(stats->f_type, 0); ASSERT_UINT64_GT(stats->f_type, 0);
#endif #endif
ASSERT_GT(stats->f_bsize, 0); ASSERT_GT(stats->f_bsize, 0);