casaroli opened a new pull request, #4058:
URL: https://github.com/apache/nuttx-apps/pull/4058

   depends-on: apache/nuttx/pull/21896
   
   ## Summary
   
   Add a cmocka case, test_nuttx_fs_fstatfs02, to the kernel fs testsuite. It 
opens the test directory with open(".", O_RDONLY | O_DIRECTORY) and checks that 
fstatfs() and fstatvfs() of the descriptor give the same f_type, f_bsize, 
f_namelen, f_namemax and f_flag as statfs() and statvfs() of the path.
   
   The case checks the fix in apache/nuttx#21896 ("fs/vfs: fstatfs() of a 
directory gives its file system."). Without that fix, fstatfs() of a directory 
descriptor gives the values of the pseudo file system, and the case fails. 
Merge this PR after apache/nuttx#21896.
   
   ## Impact
   
   Only the cmocka_fs_test program changes. The case keeps the descriptor in 
fd1 of the test state, so the teardown closes it also when an assert fails, and 
the next cases still run. No other case changes.
   
   ## Testing
   
   qemu-armv8a:nsh (flat build, arm64, QEMU HVF) with CONFIG_TESTS_TESTSUITES, 
CONFIG_CM_FS_TEST and CONFIG_TESTS_TESTSUITES_MOUNT_DIR="/tmp" (tmpfs), the 
whole cmocka_fs_test run:
   
   - nuttx master 94baea911c5: 46 of 47 cases pass; test_nuttx_fs_fstatfs02 
fails (f_type 40864 != 16914836, that is PROC_SUPER_MAGIC instead of 
TMPFS_MAGIC). The other 46 cases run to the end.
   - nuttx master 46066440966 + apache/nuttx#21896: 47 of 47 cases pass.
   - tools/checkpatch.sh -c -u -m -g: pass.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to