aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_abi.c
diff options
context:
space:
mode:
authorCismonX <admin@cismon.net>2025-08-19 08:05:45 +0800
committerBernd Schubert <bernd@bsbernd.com>2025-08-19 16:21:24 +0200
commita63fc71a55038f49671eb56d0ade99a48ad8d7ab (patch)
treefdfda549997183bcc9b8cddd90b30bdeffe0d230 /test/test_abi.c
parent42b9b3bbb71d38be6a5670bbd0948cf406c1573c (diff)
downloadlibfuse-a63fc71a55038f49671eb56d0ade99a48ad8d7ab.tar.gz
tests: move struct size assertions into a test
These checks are meant for libfuse maintainers only, and should not be exposed to users. Signed-off-by: CismonX <admin@cismon.net>
Diffstat (limited to 'test/test_abi.c')
-rw-r--r--test/test_abi.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_abi.c b/test/test_abi.c
new file mode 100644
index 0000000..99daa09
--- /dev/null
+++ b/test/test_abi.c
@@ -0,0 +1,18 @@
+#define FUSE_USE_VERSION 30
+
+#include "fuse.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(void)
+{
+ if (sizeof(struct fuse_file_info) != 64) {
+ fprintf(stderr, "struct fuse_file_info size mismatch\n");
+ exit(1);
+ }
+ if (sizeof(struct fuse_conn_info) != 128) {
+ fprintf(stderr, "struct fuse_conn_info size mismatch\n");
+ exit(1);
+ }
+}