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

   ## Summary
   
   * testing/libc/wcstombs: Add testing application for wcstombs
   
   This application tests the libc's `wcstombs` function for different len 
sizes (bigger than the converted string, exactly the size of it and smaller 
than it).
   
   ## Impact
   
   Enabling testing the libc's `wcstombs()`function. No impact on existing 
applications. This application is used to test a bugfix regarding `wcstombs` 
behavior.
   
   ## Testing
   
   Internal CI testing + `rv-virt:nsh`:
   
   Build with:
   ```
   make -j distclean && ./tools/configure.sh rv-virt:nsh && kconfig-tweak -e 
LIBC_LOCALE && kconfig-tweak -e TESTING_WCSTOMBS && make olddefconfig && make
   ```
   
   Run with:
   ```
   $ qemu-system-riscv32 -semihosting -M virt,aclint=on -cpu rv32 -smp 1 -bios 
none -kernel nuttx -nographic
   ABC
   NuttShell (NSH) NuttX-10.4.0
   nsh> help
   help usage:  help [-v] [<cmd>]
   
       .           cmp         false       mount       set         uptime      
       [           dirname     fdinfo      mv          sleep       usleep      
       ?           dd          free        pidof       source      watch       
       alias       df          help        poweroff    test        xd          
       unalias     dmesg       hexdump     quit        time        wait        
       basename    echo        kill        printf      true        
       break       env         pkill       ps          truncate    
       cat         exec        ls          pwd         uname       
       cd          exit        mkdir       rm          umount      
       cp          expr        mkrd        rmdir       unset       
   
   Builtin Apps:
       getprime    hello       nsh         ostest      sh          wcstombs    
   nsh> wcstombs
   wcstombs Test application:
   
   Test Scenario: len is bigger than the size of the converted string. Expected 
the null-terminator at the end of the converted string.
   Return code: 13
   dst buffer (as uint8_t array): 48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 21 aa 
   The character just after the return value is not the expected 
null-terminator (value: aa). This is a bug!
   nsh> QEMU: Terminated
   ```


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