Skip to content

Commit

Permalink
ANDROID: fuse-bpf: Fix bpf_test_xattr testcase error
Browse files Browse the repository at this point in the history
Skipped selinux xattr checking.

Bug: 279996548
Test: fuse_test compiles and passes
Signed-off-by: Weizhao Ouyang <[email protected]>
(cherry picked from https://android-review.googlesource.com/q/commit:dbfbd63968743deaf9854df8952874d00c2d3755)
Merged-In: I56ac1d5fe3865310a99c091e9688e70aa515e96f
Change-Id: I56ac1d5fe3865310a99c091e9688e70aa515e96f
  • Loading branch information
ownia authored and bengris32 committed Jun 22, 2024
1 parent 910d173 commit ee2be78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/testing/selftests/filesystems/fuse/fuse_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,7 @@ static int bpf_test_xattr(const char *mount_dir)
const size_t xattr_size = sizeof(xattr_value);
char xattr_value_ret[256];
ssize_t xattr_size_ret;
ssize_t xattr_size_ret_se;
int result = TEST_FAILURE;
int fd = -1;
int src_fd = -1;
Expand Down Expand Up @@ -1056,9 +1057,8 @@ static int bpf_test_xattr(const char *mount_dir)

TESTSYSCALL(s_listxattr(s_path(s(mount_dir), s(file_name)),
xattr_value_ret, sizeof(xattr_value_ret),
&xattr_size_ret));
&xattr_size_ret_se));
TESTEQUAL(bpf_test_trace("listxattr"), 0);
TESTEQUAL(xattr_size_ret, 0);

TESTSYSCALL(s_setxattr(s_path(s(mount_dir), s(file_name)), xattr_name,
xattr_value, xattr_size, 0));
Expand All @@ -1068,8 +1068,8 @@ static int bpf_test_xattr(const char *mount_dir)
xattr_value_ret, sizeof(xattr_value_ret),
&xattr_size_ret));
TESTEQUAL(bpf_test_trace("listxattr"), 0);
TESTEQUAL(xattr_size_ret, sizeof(xattr_name));
TESTEQUAL(strcmp(xattr_name, xattr_value_ret), 0);
TESTEQUAL(xattr_size_ret - xattr_size_ret_se, sizeof(xattr_name));
TESTEQUAL(strcmp(xattr_name, xattr_value_ret + xattr_size_ret_se), 0);

TESTSYSCALL(s_getxattr(s_path(s(mount_dir), s(file_name)), xattr_name,
xattr_value_ret, sizeof(xattr_value_ret),
Expand Down

0 comments on commit ee2be78

Please sign in to comment.