git: c2d342c50906 - main - fusefs: better debugging for FUSE_RENAME in the tests

From: Alan Somers <asomers_at_FreeBSD.org>
Date: Fri, 03 Dec 2021 03:26:57 UTC
The branch main has been updated by asomers:

URL: https://cgit.FreeBSD.org/src/commit/?id=c2d342c509065bee6392624e95b75cf7b3bb9c45

commit c2d342c509065bee6392624e95b75cf7b3bb9c45
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2021-12-03 03:26:27 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2021-12-03 03:26:27 +0000

    fusefs: better debugging for FUSE_RENAME in the tests
    
    MFC after:      2 weeks
---
 tests/sys/fs/fusefs/mockfs.cc | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc
index 8a2d1f910867..a943d3d6972c 100644
--- a/tests/sys/fs/fusefs/mockfs.cc
+++ b/tests/sys/fs/fusefs/mockfs.cc
@@ -290,6 +290,15 @@ void MockFS::debug_request(const mockfs_buf_in &in, ssize_t buflen)
 				in.body.release.flags,
 				in.body.release.lock_owner);
 			break;
+		case FUSE_RENAME:
+			{
+				const char *src = (const char*)in.body.bytes +
+					sizeof(fuse_rename_in);
+				const char *dst = src + strlen(src) + 1;
+				printf(" src=%s newdir=%" PRIu64 " dst=%s",
+					src, in.body.rename.newdir, dst);
+			}
+			break;
 		case FUSE_SETATTR:
 			if (verbosity <= 1) {
 				printf(" valid=%#x", in.body.setattr.valid);