Commit Graph

6 Commits

Author SHA1 Message Date
Howard Zhang b6a5204c51 ARM64:fuse:alian stat struct order on multiarch
fields order in stat struct is different from
x86 to arm64. Please refer to
x86_64-linux-gnu/bits/stat.h
aarch64-linux-gnu/bits/stat.h

Signed-off-by: Howard Zhang <howard.zhang@arm.com>
2020-11-03 10:35:28 +08:00
Craig Chi 4181e8c974 Add fh support for revise attr and fstat(2) test
According to Linux 4.4's FUSE behavior, the flags and fh attributes in
FUSE_GETATTR are only used in read, write, and lseek. fstat(2) doesn't
use them either. Add tests to ensure the requests sent from FUSE module
are consistent with Linux's.

Updates #3655
2020-09-16 12:19:30 -07:00
Craig Chi e63abd82dd Add default attr in fuse_util
fuse_util provides utilities for fuse testing. Add a function to return
a stub fuse_attr struct with specified mode and nodeid.
2020-09-16 12:19:30 -07:00
Craig Chi d928d3c00a Add function generating array of iovec with different FUSE structs
This commit adds a function in the newly created fuse_util library,
which accepts a variable number of arguments and data structures.

Fixes #3609
2020-09-16 12:19:30 -07:00
Craig Chi 15ff2893d9 Extend integration test to test sequence of FUSE operation
Original FUSE integration test has limited capabilities. To test more
situations, the new integration test framework introduces a protocol
to communicate between testing thread and the FUSE server. In summary,
this change includes:

1. Remove CompareResult() and break SetExpected() into
   SetServerResponse() and GetServerActualRequest(). We no longer set
   up an expected request because we want to retrieve the actual FUSE
   request made to the FUSE server and check in the testing thread.

2. Declare a serial buffer data structure to save the received requests
   and expected responses sequentially. The data structure contains a
   cursor to indicate the progress of accessing. This change makes
   sequential SetServerResponse() and GetServerActualRequest() possible.

3. Replace 2 single directional pipes with 1 bi-directional socketpair.
   A protocol which starts with FuseTestCmd is used between the testing
   thread and the FUSE server to provide various functionality.

Fixes #3405
2020-09-16 12:19:30 -07:00
Craig Chi 51e64d2fc5 Implement FUSE_GETATTR
FUSE_GETATTR is called when a stat(2), fstat(2), or lstat(2) is issued
from VFS2 layer to a FUSE filesystem.

Fixes #3175
2020-08-10 18:15:32 -07:00