diff --git a/tests/generic/765 b/tests/generic/765
new file mode 100755
index 00000000..4cbef82a
--- /dev/null
+++ b/tests/generic/765
@@ -0,0 +1,40 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2025 Huawei.  All Rights Reserved.
+#
+# FS QA Test No. 765
+#
+# Test fallocate FALLOC_FL_WRITE_ZEROES
+#
+# (generic/008 is a similar test but for fzero.)
+#
+. ./common/preamble
+_begin_fstest auto quick prealloc zero fiemap
+
+# Import common functions.
+. ./common/filter
+. ./common/punch
+
+# Modify as appropriate.
+_require_xfs_io_command "fwzero"
+_require_xfs_io_command "fiemap"
+_require_xfs_io_command "falloc"
+_require_test
+
+testfile=$TEST_DIR/765.$$
+
+# Standard write zeroes tests
+_test_generic_punch falloc fwzero fwzero fiemap _filter_fiemap $testfile
+
+# Delayed allocation write zeroes tests
+_test_generic_punch -d falloc fwzero fwzero fiemap _filter_fiemap $testfile
+
+# Multi write zeroes tests
+_test_generic_punch -k falloc fwzero fwzero fiemap _filter_fiemap $testfile
+
+# Delayed allocation multi write zeroes tests
+_test_generic_punch -d -k falloc fwzero fwzero fiemap _filter_fiemap $testfile
+
+# success, all done
+status=0
+exit
diff --git a/tests/generic/765.out b/tests/generic/765.out
new file mode 100644
index 00000000..7dd949c4
--- /dev/null
+++ b/tests/generic/765.out
@@ -0,0 +1,269 @@
+QA output created by 765
+	1. into a hole
+0: [0..127]: hole
+1: [128..383]: data
+2: [384..639]: hole
+1aca77e2188f52a62674fe8a873bdaba
+	2. into allocated space
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	3. into unwritten space
+0: [0..127]: unwritten
+1: [128..383]: data
+2: [384..639]: unwritten
+1aca77e2188f52a62674fe8a873bdaba
+	4. hole -> data
+0: [0..127]: hole
+1: [128..511]: data
+2: [512..639]: hole
+286aad7ca07b2256f0f2bb8e608ff63d
+	5. hole -> unwritten
+0: [0..127]: hole
+1: [128..383]: data
+2: [384..511]: unwritten
+3: [512..639]: hole
+1aca77e2188f52a62674fe8a873bdaba
+	6. data -> hole
+0: [0..383]: data
+1: [384..639]: hole
+3976e5cc0b8a47c4cdc9e0211635f568
+	7. data -> unwritten
+0: [0..383]: data
+1: [384..511]: unwritten
+2: [512..639]: hole
+3976e5cc0b8a47c4cdc9e0211635f568
+	8. unwritten -> hole
+0: [0..127]: unwritten
+1: [128..383]: data
+2: [384..639]: hole
+1aca77e2188f52a62674fe8a873bdaba
+	9. unwritten -> data
+0: [0..127]: unwritten
+1: [128..511]: data
+2: [512..639]: hole
+286aad7ca07b2256f0f2bb8e608ff63d
+	10. hole -> data -> hole
+0: [0..127]: hole
+1: [128..511]: data
+2: [512..639]: hole
+1aca77e2188f52a62674fe8a873bdaba
+	11. data -> hole -> data
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	12. unwritten -> data -> unwritten
+0: [0..127]: unwritten
+1: [128..511]: data
+2: [512..639]: unwritten
+1aca77e2188f52a62674fe8a873bdaba
+	13. data -> unwritten -> data
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	14. data -> hole @ EOF
+0: [0..639]: data
+eb591f549edabba2b21f80ce4deed8a9
+	15. data -> hole @ 0
+0: [0..639]: data
+b0c249edb75ce5b52136864d879cde83
+	16. data -> cache cold ->hole
+0: [0..639]: data
+b0c249edb75ce5b52136864d879cde83
+	17. data -> hole in single block file
+0: [0..7]: data
+0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+0000200 0000 0000 0000 0000 0000 0000 0000 0000
+*
+0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+	1. into a hole
+0: [0..127]: hole
+1: [128..383]: data
+2: [384..639]: hole
+1aca77e2188f52a62674fe8a873bdaba
+	2. into allocated space
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	3. into unwritten space
+0: [0..127]: unwritten
+1: [128..383]: data
+2: [384..639]: unwritten
+1aca77e2188f52a62674fe8a873bdaba
+	4. hole -> data
+0: [0..127]: hole
+1: [128..511]: data
+2: [512..639]: hole
+286aad7ca07b2256f0f2bb8e608ff63d
+	5. hole -> unwritten
+0: [0..127]: hole
+1: [128..383]: data
+2: [384..511]: unwritten
+3: [512..639]: hole
+1aca77e2188f52a62674fe8a873bdaba
+	6. data -> hole
+0: [0..383]: data
+1: [384..639]: hole
+3976e5cc0b8a47c4cdc9e0211635f568
+	7. data -> unwritten
+0: [0..383]: data
+1: [384..511]: unwritten
+2: [512..639]: hole
+3976e5cc0b8a47c4cdc9e0211635f568
+	8. unwritten -> hole
+0: [0..127]: unwritten
+1: [128..383]: data
+2: [384..639]: hole
+1aca77e2188f52a62674fe8a873bdaba
+	9. unwritten -> data
+0: [0..127]: unwritten
+1: [128..511]: data
+2: [512..639]: hole
+286aad7ca07b2256f0f2bb8e608ff63d
+	10. hole -> data -> hole
+0: [0..127]: hole
+1: [128..511]: data
+2: [512..639]: hole
+1aca77e2188f52a62674fe8a873bdaba
+	11. data -> hole -> data
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	12. unwritten -> data -> unwritten
+0: [0..127]: unwritten
+1: [128..511]: data
+2: [512..639]: unwritten
+1aca77e2188f52a62674fe8a873bdaba
+	13. data -> unwritten -> data
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	14. data -> hole @ EOF
+0: [0..639]: data
+eb591f549edabba2b21f80ce4deed8a9
+	15. data -> hole @ 0
+0: [0..639]: data
+b0c249edb75ce5b52136864d879cde83
+	16. data -> cache cold ->hole
+0: [0..639]: data
+b0c249edb75ce5b52136864d879cde83
+	17. data -> hole in single block file
+0: [0..7]: data
+0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+0000200 0000 0000 0000 0000 0000 0000 0000 0000
+*
+0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+	1. into a hole
+0: [0..127]: hole
+1: [128..383]: data
+2: [384..639]: hole
+1aca77e2188f52a62674fe8a873bdaba
+	2. into allocated space
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	3. into unwritten space
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	4. hole -> data
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	5. hole -> unwritten
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	6. data -> hole
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	7. data -> unwritten
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	8. unwritten -> hole
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	9. unwritten -> data
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	10. hole -> data -> hole
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	11. data -> hole -> data
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	12. unwritten -> data -> unwritten
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	13. data -> unwritten -> data
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	14. data -> hole @ EOF
+0: [0..639]: data
+eb591f549edabba2b21f80ce4deed8a9
+	15. data -> hole @ 0
+0: [0..639]: data
+b0c249edb75ce5b52136864d879cde83
+	16. data -> cache cold ->hole
+0: [0..639]: data
+b0c249edb75ce5b52136864d879cde83
+	17. data -> hole in single block file
+0: [0..7]: data
+0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+0000200 0000 0000 0000 0000 0000 0000 0000 0000
+*
+0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+	1. into a hole
+0: [0..127]: hole
+1: [128..383]: data
+2: [384..639]: hole
+1aca77e2188f52a62674fe8a873bdaba
+	2. into allocated space
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	3. into unwritten space
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	4. hole -> data
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	5. hole -> unwritten
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	6. data -> hole
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	7. data -> unwritten
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	8. unwritten -> hole
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	9. unwritten -> data
+0: [0..639]: data
+2f7a72b9ca9923b610514a11a45a80c9
+	10. hole -> data -> hole
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	11. data -> hole -> data
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	12. unwritten -> data -> unwritten
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	13. data -> unwritten -> data
+0: [0..639]: data
+0bcfc7652751f8fe46381240ccadd9d7
+	14. data -> hole @ EOF
+0: [0..639]: data
+eb591f549edabba2b21f80ce4deed8a9
+	15. data -> hole @ 0
+0: [0..639]: data
+b0c249edb75ce5b52136864d879cde83
+	16. data -> cache cold ->hole
+0: [0..639]: data
+b0c249edb75ce5b52136864d879cde83
+	17. data -> hole in single block file
+0: [0..7]: data
+0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+0000200 0000 0000 0000 0000 0000 0000 0000 0000
+*
+0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
