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

   ## Title
   
   Make Printing Compatible for Both 32-bit and 64-bit Environments.
   
   
   ## Summary
   
   Currently on 64-bit environment, for example, qemu-armv8a, compilation of 
`sd_bench` and `sd_stress` are broken due to [type 
errors](https://gist.github.com/Windrow14/c42b6ee36e749c3d264678a82ed2a1cc).
   
   `size_t` type should be printed with `%zu` instead of `%u`.
   
   
   ## Impact
   
   Bug fixed.
   
   
   ## Testing
   
   Verify compilation with:
   - 32-bit environment configuration: esp32s3-devkit:smp
   - 64-bit environment configuration: qemu-armv8a:netnsh
   
   Run `sdstress` and `sdbench` test in virtual environment:
   ```
   qemu-system-aarch64 \
   -cpu cortex-a53 \
   -smp 4 \
   -nographic \
   -machine virt,virtualization=on,gic-version=3 \
   -chardev stdio,id=con,mux=on \
   -serial chardev:con \
   -global virtio-mmio.force-legacy=false \
   -netdev 
user,id=u1,hostfwd=tcp:127.0.0.1:10023-10.0.2.15:23,hostfwd=tcp:127.0.0.1:15001-10.0.2.15:5001
 \
   -device virtio-net-device,netdev=u1,bus=virtio-mmio-bus.0 \
   -drive file=/home/windrow/code/nuttx/2GB.img,format=raw,id=hd,if=none \
   -device virtio-blk-device,bus=virtio-mmio-bus.1,drive=hd \
   -mon chardev=con,mode=readline \
   -kernel \
   ./nuttx
   
   NuttShell (NSH)
   nsh> 
   nsh> mount -t vfat /dev/virtblk0 /mnt
   nsh> sdstress
   Start stress test with 64 files, 4096 bytes and 32 iterations.
   iteration 0 took 190.000 ms: OK
   iteration 1 took 190.000 ms: OK
   iteration 2 took 180.000 ms: OK
   iteration 3 took 180.000 ms: OK
   iteration 4 took 170.000 ms: OK
   iteration 5 took 180.000 ms: OK
   iteration 6 took 190.000 ms: OK
   iteration 7 took 180.000 ms: OK
   iteration 8 took 180.000 ms: OK
   iteration 9 took 170.000 ms: OK
   iteration 10 took 170.000 ms: OK
   iteration 11 took 180.000 ms: OK
   iteration 12 took 180.000 ms: OK
   iteration 13 took 180.000 ms: OK
   iteration 14 took 170.000 ms: OK
   iteration 15 took 180.000 ms: OK
   iteration 16 took 180.000 ms: OK
   iteration 17 took 200.000 ms: OK
   iteration 18 took 180.000 ms: OK
   iteration 19 took 170.000 ms: OK
   iteration 20 took 180.000 ms: OK
   iteration 21 took 170.000 ms: OK
   iteration 22 took 180.000 ms: OK
   iteration 23 took 170.000 ms: OK
   iteration 24 took 170.000 ms: OK
   iteration 25 took 180.000 ms: OK
   iteration 26 took 170.000 ms: OK
   iteration 27 took 170.000 ms: OK
   iteration 28 took 180.000 ms: OK
   iteration 29 took 170.000 ms: OK
   iteration 30 took 170.000 ms: OK
   iteration 31 took 170.000 ms: OK
   Test OK: Average time: 177.500 ms
   nsh> sdbench -k
   Using block size = 512 bytes, sync = false
   
   Testing Sequential Write Speed...
     Run  1:   2263.8 KB/s, max write time: 10.000 ms (50.0 KB/s), fsync: 0.000 
ms
     Run  2:   2275.8 KB/s, max write time: 10.000 ms (50.0 KB/s), fsync: 0.000 
ms
     Run  3:   2268.5 KB/s, max write time: 20.000 ms (25.0 KB/s), fsync: 0.000 
ms
     Run  4:   2274.3 KB/s, max write time: 10.000 ms (50.0 KB/s), fsync: 0.000 
ms
     Run  5:   2279.3 KB/s, max write time: 10.000 ms (50.0 KB/s), fsync: 0.000 
ms
     Avg   :   2272.3 KB/s, 22.190 MB written.
   
   Testing Sequential Read Speed...
     Run  1:  40576.8 KB/s, max read/verify time: 10.0000 ms (50.0 KB/s)
     Avg   :  40576.8 KB/s, 22.190 MB and verified
   ```


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