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

   ## Summary
   
   - **testing/fs/fatutf8: shorten the FOLDER&FILE for default NAME_MAX 32.**
     The test creates `"/ÄÖÜ 测试文件夹 Test Folder"`, a 34-byte UTF-8 name.
     With the default `CONFIG_NAME_MAX` of 32, `mkdir()` fails with
     `ENAMETOOLONG` (36) before the test does anything. Use shorter folder and
     file names (20 and 18 bytes) that still contain Latin-1 and CJK
     characters, so the test runs with the default configuration.
   
   ## Impact
   
   - New feature / API change: NO.
   - Behavior: only the names used by the `fatutf8` test change.
   - Build, hardware, documentation, security, compatibility: NO.
   
   ## Testing
   
   Host: Ubuntu x86_64, gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0, nuttx
   master a72faaf0fa, nuttx-apps master 41840d466f.
   
   `sim:nsh` with `CONFIG_TESTING_FATUTF8`, `CONFIG_FAT_LFN_UTF8` and
   `CONFIG_FSUTILS_MKFATFS` (default `CONFIG_NAME_MAX=32`), on a FAT RAM disk:
   
   ```
   mkrd -m 2 -s 512 2048
   mkfatfs /dev/ram2
   mount -t vfat /dev/ram2 /mnt
   fatutf8 /mnt
   ```
   
   Testing logs before change:
   
   ```
   mkdir(/mnt/ÄÖÜ 测试文件夹 Test Folder)
   mkdir failed: 36
   ```
   
   Testing logs after change:
   
   ```
   mkdir(/mnt/ÄÖÜ 测试 Folder)
   mkdir successful
   open(/mnt/ÄÖÜ 测试 Folder/ÄÖÜ 测试 File)
   open successful
   write successful
   open(/mnt/ÄÖÜ 测试 Folder/ÄÖÜ 测试 File)
   open successful
   read("This is a test file in a test folder.") successful
   ```
   
   - `./tools/checkpatch.sh -g master..HEAD`: all checks pass.
   - `sim:nsh` Make and CMake builds pass with no new warnings; `ostest` exits
     with status 0.
   - Verified on sim only.
   
   ## PR verification Self-Check
   
   * [x] This PR introduces only one functional change.
   * [x] I have updated all required description fields above.
   * [x] My PR adheres to Contributing Guidelines and Documentation (git commit 
title and message, coding standard, etc).
   * [ ] My PR is still work in progress (not ready for review).
   * [x] My PR is ready for review and can be safely merged into a codebase.
   


-- 
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