diff --git a/tests/f_loop_fsync_dnodes/README b/tests/f_loop_fsync_dnodes/README
new file mode 100644
index 000000000000..77dcba497f2d
--- /dev/null
+++ b/tests/f_loop_fsync_dnodes/README
@@ -0,0 +1,39 @@
+1. prepare f2fs image with fsync dnodes:
+
+	mkfs.f2fs $MKFS_OPTS $META
+	mkdir mntdir
+	mount $META mntdir -o mode=lfs
+	touch mntdir/testfile
+	f2fs_io checkpoint mntdir/testfile
+	fio -rw=write -bs=4k -direct=0 -size=4k -numjobs=10 -name=testfile -fsync_on_close=1 -group_reporting -stats=0 --output=/dev/null -directory=mntdir
+	f2fs_io shutdown 2 mntdir/testfile
+	umount mntdir
+
+2. inject fsync dnodes to generate a loop
+
+	inject.f2fs --dry-run --cp 0 --mb next_blkaddr --idx 1 --val 0 $META
+	    [inject_cp: 592] [   0] blkaddr:0x1201
+	    [inject_cp: 592] [   1] blkaddr:0x1202
+	    [inject_cp: 592] [   2] blkaddr:0x1203
+	    [inject_cp: 592] [   3] blkaddr:0x1204
+	    [inject_cp: 592] [   4] blkaddr:0x1205
+	    [inject_cp: 592] [   5] blkaddr:0x1206
+	    [inject_cp: 592] [   6] blkaddr:0x1207
+	    [inject_cp: 592] [   7] blkaddr:0x1208
+	    [inject_cp: 592] [   8] blkaddr:0x1209
+	    [inject_cp: 592] [   9] blkaddr:0x120a
+	inject.f2fs --cp 0 --mb next_blkaddr --idx 6 --val 0x1202 $META
+	    [inject_cp: 592] [   0] blkaddr:0x1201
+	    [inject_cp: 592] [   1] blkaddr:0x1202
+	    [inject_cp: 592] [   2] blkaddr:0x1203
+	    [inject_cp: 592] [   3] blkaddr:0x1204
+	    [inject_cp: 592] [   4] blkaddr:0x1205
+	    [inject_cp: 592] [   5] blkaddr:0x1206
+	    [inject_cp: 592] [   6] blkaddr:0x1207
+	    [inject_cp: 592] [   7] blkaddr:0x1208
+	    [inject_cp: 592] [   8] blkaddr:0x1209
+	    [inject_cp: 592] [   9] blkaddr:0x120a
+	    Info: inject next_blkaddr[6] of cp 2: 0x1207 -> 0x1202
+	tar cf - meta.img | gzip -9 - > imgs.tar.gz
+
+3. fsck fixes fsync dnodes by breaking the loop
diff --git a/tests/f_loop_fsync_dnodes/expect.in b/tests/f_loop_fsync_dnodes/expect.in
new file mode 100644
index 000000000000..3f0790224663
--- /dev/null
+++ b/tests/f_loop_fsync_dnodes/expect.in
@@ -0,0 +1,40 @@
+Info: Force to fix corruption
+[ASSERT] (sanity_check_node_chain:x)  --> 	detect looped node chain, blkaddr:4615
+
+[FIX] (loop_node_chain_fix:x)  --> Fix looped node chain on blkaddr 4615
+
+Info: Write valid nat_bits in checkpoint
+Info: checkpoint state = x :  nat_bits crc compacted_summary sudden-power-off
+
+[FSCK] Unreachable nat entries                        [Ok..] [x]
+[FSCK] SIT valid block bitmap checking                [Ok..]
+[FSCK] Hard link checking for regular file            [Ok..] [x]
+[FSCK] valid_block_count matching with CP             [Ok..] [x]
+[FSCK] valid_node_count matching with CP (de lookup)  [Ok..] [x]
+[FSCK] valid_node_count matching with CP (nat lookup) [Ok..] [x]
+[FSCK] valid_inode_count matched with CP              [Ok..] [x]
+[FSCK] free segment_count matched with CP             [Ok..] [x]
+[FSCK] next block offset is free                      [Ok..]
+[FSCK] fixing SIT types
+[FSCK] other corrupted bugs                           [Fail]
+Info: Duplicate valid checkpoint to mirror position x -> x
+Info: Write valid nat_bits in checkpoint
+Info: write_checkpoint() cur_cp:x
+Info: Write valid nat_bits in checkpoint
+Info: fix_checkpoint() cur_cp:x
+
+Info: Force to fix corruption
+Info: checkpoint state = x :  allow_nocrc nat_bits sudden-power-off
+
+[FSCK] Unreachable nat entries                        [Ok..] [x]
+[FSCK] SIT valid block bitmap checking                [Ok..]
+[FSCK] Hard link checking for regular file            [Ok..] [x]
+[FSCK] valid_block_count matching with CP             [Ok..] [x]
+[FSCK] valid_node_count matching with CP (de lookup)  [Ok..] [x]
+[FSCK] valid_node_count matching with CP (nat lookup) [Ok..] [x]
+[FSCK] valid_inode_count matched with CP              [Ok..] [x]
+[FSCK] free segment_count matched with CP             [Ok..] [x]
+[FSCK] next block offset is free                      [Ok..]
+[FSCK] fixing SIT types
+[FSCK] other corrupted bugs                           [Ok..]
+
diff --git a/tests/f_loop_fsync_dnodes/imgs.tar.gz b/tests/f_loop_fsync_dnodes/imgs.tar.gz
new file mode 100644
index 0000000000000000000000000000000000000000..8a4e5d75b002377f23ef5f69f6928396e24afcb7
GIT binary patch
diff --git a/tests/f_loop_fsync_dnodes/script b/tests/f_loop_fsync_dnodes/script
new file mode 100644
index 000000000000..adce57c686c6
--- /dev/null
+++ b/tests/f_loop_fsync_dnodes/script
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+DESC="recover loop fsync dnodes"
+
+. $TOPDIR/tests/helpers
+
+cleanup pre > $LOG 2>&1
+
+tar xf $TESTDIR/imgs.tar.gz -C $TESTDIR/../
+
+$FSCK $FSCK_OPTS -f $META > $OUT 2>&1
+$FSCK $FSCK_OPTS -f $META >> $OUT 2>&1
+cat $OUT >> $LOG
+
+check_result
+cleanup post >> $LOG 2>&1
