libuv/0003-test_fs.c-Fix-issue-on-32-bit-systems-using-btrfs.patch
Stephen Gallagher 001559cc7d Add patch for fs_test on btrfs
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
2023-11-16 10:41:08 -05:00

35 lines
1.1 KiB
Diff

From 3d10efa49dc063831787bc01501ab946f6d91282 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Thu, 16 Nov 2023 10:00:20 -0500
Subject: [PATCH 3/3] test_fs.c: Fix issue on 32-bit systems using btrfs
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>
---
test/test-fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test-fs.c b/test/test-fs.c
index 1acdc5c67082c7ea4f579f25af82cd9bd3fefc71..ab8a9e07ccea95493e479703a07bebca5e29be30 100644
--- a/test/test-fs.c
+++ b/test/test-fs.c
@@ -343,7 +343,7 @@ static void statfs_cb(uv_fs_t* req) {
defined(__OpenBSD__) || defined(__NetBSD__)
ASSERT_OK(stats->f_type);
#else
- ASSERT_GT(stats->f_type, 0);
+ ASSERT_UINT64_GT(stats->f_type, 0);
#endif
ASSERT_GT(stats->f_bsize, 0);
--
2.41.0