Releases: lupyuen/nuttx-sg2000
Releases · lupyuen/nuttx-sg2000
nuttx-sg2000-2024-11-16
Test OK
Sat Nov 16 08:30:51 +08 2024
----- Download the latest NuttX build for 2024-11-16
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.7.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Sat Nov 16 08:30:54 +08 2024
NuttX Source: https://github.com/apache/nuttx/tree/88b4aebedcb49f6fb1abc6e1fced73cf2feae628
NuttX Apps: https://github.com/apache/nuttx-apps/tree/687c1cacd9b467b796851055c6d6eebf955db3af
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 16391713 Nov 16 00:30 /tftpboot/Image-sg2000
Sat Nov 16 08:30:55 +08 2024
----- Close the screen session
spawn screen -x
Sat Nov 16 08:31:00 +08 2024
Sat Nov 16 08:31:00 +08 2024
----- Power Off the SBC
[]Sat Nov 16 08:31:05 +08 2024
----- Power On the SBC
[]Sat Nov 16 08:31:09 +08 2024
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.7.0 88b4aebedc Nov 16 2024 00:15:53 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061304 11720 2049584 36768 2048944 38 4 Kmem
20971520 720896 20250624 20250624 Page
nsh> ls -l /dev
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000720 36.5% lpwork 0x80400100 0x80400148
3 3 100 RR Task - Running 0000000000000000 0003008 0001952 64.8% /system/bin/init
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7cff0
uordblks 2678 2658
fordblks 7e980 7e9a0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 2
mxordblk 7cff0 7cff0
uordblks 2658 2578
fordblks 7e9a0 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7a7f0
uordblks 2578 2d88
fordblks 7ea80 7e270
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 7a7f0
uordblks 2d88 2d88
fordblks 7e270 7e270
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 78ff0
uordblks 2d88 4588
fordblks 7e270 7ca70
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VAR...
nuttx-sg2000-2024-11-15
Test OK
Fri Nov 15 08:28:41 +08 2024
----- Download the latest NuttX build for 2024-11-15
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.7.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Fri Nov 15 08:28:43 +08 2024
NuttX Source: https://github.com/apache/nuttx/tree/81f060b8d5f9f53652982f01e2e33bed97276bda
NuttX Apps: https://github.com/apache/nuttx-apps/tree/687c1cacd9b467b796851055c6d6eebf955db3af
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 16408121 Nov 15 00:28 /tftpboot/Image-sg2000
Fri Nov 15 08:28:44 +08 2024
----- Close the screen session
spawn screen -x
Fri Nov 15 08:28:49 +08 2024
Fri Nov 15 08:28:49 +08 2024
----- Power Off the SBC
[]Fri Nov 15 08:28:53 +08 2024
----- Power On the SBC
[]Fri Nov 15 08:28:58 +08 2024
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.7.0 81f060b8d5 Nov 15 2024 00:16:04 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061304 11720 2049584 36768 2048944 38 4 Kmem
20971520 720896 20250624 20250624 Page
nsh> ls -l /dev
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000720 36.5% lpwork 0x80400100 0x80400148
3 3 100 RR Task - Running 0000000000000000 0003008 0001952 64.8% /system/bin/init
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7cff0
uordblks 2678 2658
fordblks 7e980 7e9a0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 2
mxordblk 7cff0 7cff0
uordblks 2658 2578
fordblks 7e9a0 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7a7f0
uordblks 2578 2d88
fordblks 7ea80 7e270
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 7a7f0
uordblks 2d88 2d88
fordblks 7e270 7e270
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 78ff0
uordblks 2d88 4588
fordblks 7e270 7ca70
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VAR...
nuttx-sg2000-2024-11-14
Test OK
Thu Nov 14 08:26:31 +08 2024
----- Download the latest NuttX build for 2024-11-14
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.7.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Thu Nov 14 08:26:34 +08 2024
NuttX Source: https://github.com/apache/nuttx/tree/5d87319cb6af14131e0b547e0bcfb88629c1bfed
NuttX Apps: https://github.com/apache/nuttx-apps/tree/1c7a7f7529475b0d535e2088a9c4e1532c487156
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 16401977 Nov 14 00:26 /tftpboot/Image-sg2000
Thu Nov 14 08:26:35 +08 2024
----- Close the screen session
spawn screen -x
Thu Nov 14 08:26:40 +08 2024
Thu Nov 14 08:26:40 +08 2024
----- Power Off the SBC
[]Thu Nov 14 08:26:45 +08 2024
----- Power On the SBC
[]Thu Nov 14 08:26:49 +08 2024
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.7.0 5d87319cb6 Nov 14 2024 00:15:29 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061304 11720 2049584 36768 2048944 38 4 Kmem
20971520 720896 20250624 20250624 Page
nsh> ls -l /dev
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000720 36.5% lpwork 0x80400100 0x80400148
3 3 100 RR Task - Running 0000000000000000 0003008 0001872 62.2% /system/bin/init
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7cff0
uordblks 2678 2658
fordblks 7e980 7e9a0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 2
mxordblk 7cff0 7cff0
uordblks 2658 2578
fordblks 7e9a0 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7a7f0
uordblks 2578 2d88
fordblks 7ea80 7e270
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 7a7f0
uordblks 2d88 2d88
fordblks 7e270 7e270
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 78ff0
uordblks 2d88 4588
fordblks 7e270 7ca70
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VAR...
nuttx-sg2000-2024-11-13
Test OK
Wed Nov 13 08:24:24 +08 2024
----- Download the latest NuttX build for 2024-11-13
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.7.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Wed Nov 13 08:24:26 +08 2024
NuttX Source: https://github.com/apache/nuttx/tree/1d1ef52d1a40c40dd5b2d060f4d56053a992dc09
NuttX Apps: https://github.com/apache/nuttx-apps/tree/bb03ef0ce3ac34a6f86906148fbcca0f71da073b
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 16401945 Nov 13 00:24 /tftpboot/Image-sg2000
Wed Nov 13 08:24:27 +08 2024
----- Close the screen session
spawn screen -x
Wed Nov 13 08:24:32 +08 2024
Wed Nov 13 08:24:32 +08 2024
----- Power Off the SBC
[]Wed Nov 13 08:24:37 +08 2024
----- Power On the SBC
[]Wed Nov 13 08:24:40 +08 2024
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.7.0 1d1ef52d1a Nov 13 2024 00:15:01 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061304 11720 2049584 36768 2048944 38 4 Kmem
20971520 720896 20250624 20250624 Page
nsh> ls -l /dev
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000720 36.5% lpwork 0x80400100 0x80400148
3 3 100 RR Task - Running 0000000000000000 0003008 0001872 62.2% /system/bin/init
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7cff0
uordblks 2678 2658
fordblks 7e980 7e9a0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 2
mxordblk 7cff0 7cff0
uordblks 2658 2578
fordblks 7e9a0 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7a7f0
uordblks 2578 2d88
fordblks 7ea80 7e270
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 7a7f0
uordblks 2d88 2d88
fordblks 7e270 7e270
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 78ff0
uordblks 2d88 4588
fordblks 7e270 7ca70
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VAR...
nuttx-sg2000-2024-11-12
Test OK
Tue Nov 12 08:42:03 +08 2024
----- Download the latest NuttX build for 2024-11-12
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.7.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Tue Nov 12 08:42:05 +08 2024
NuttX Source: https://github.com/apache/nuttx/tree/2464b3207d3819a0ab98e493e8a76b163e3c193a
NuttX Apps: https://github.com/apache/nuttx-apps/tree/0c467dc02d1f03f3f9f3defb16f36cb4f53b4c9d
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 16401425 Nov 12 00:42 /tftpboot/Image-sg2000
Tue Nov 12 08:42:06 +08 2024
----- Close the screen session
spawn screen -x
Tue Nov 12 08:42:11 +08 2024
Tue Nov 12 08:42:11 +08 2024
----- Power Off the SBC
[]Tue Nov 12 08:42:16 +08 2024
----- Power On the SBC
[]Tue Nov 12 08:42:20 +08 2024
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.7.0 2464b3207d Nov 12 2024 00:15:13 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061304 11720 2049584 36768 2048944 38 4 Kmem
20971520 720896 20250624 20250624 Page
nsh> ls -l /dev
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000720 36.5% lpwork 0x80400100 0x80400148
3 3 100 RR Task - Running 0000000000000000 0003008 0001872 62.2% /system/bin/init
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7cff0
uordblks 2678 2658
fordblks 7e980 7e9a0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 2
mxordblk 7cff0 7cff0
uordblks 2658 2578
fordblks 7e9a0 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7a7f0
uordblks 2578 2d88
fordblks 7ea80 7e270
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 7a7f0
uordblks 2d88 2d88
fordblks 7e270 7e270
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 78ff0
uordblks 2d88 4588
fordblks 7e270 7ca70
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VAR...
nuttx-sg2000-2024-11-11
Test OK
Mon Nov 11 08:39:54 +08 2024
----- Download the latest NuttX build for 2024-11-11
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.7.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Mon Nov 11 08:39:58 +08 2024
NuttX Source: https://github.com/apache/nuttx/tree/5e8f1eefb086fd6cb1a59453a4c350d4fd5e734c
NuttX Apps: https://github.com/apache/nuttx-apps/tree/ebc19a60ff5d32750384f5a99a315d5533d62058
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 16405521 Nov 11 00:39 /tftpboot/Image-sg2000
Mon Nov 11 08:39:59 +08 2024
----- Close the screen session
spawn screen -x
Mon Nov 11 08:40:04 +08 2024
Mon Nov 11 08:40:04 +08 2024
----- Power Off the SBC
[]Mon Nov 11 08:40:09 +08 2024
----- Power On the SBC
[]Mon Nov 11 08:40:12 +08 2024
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.7.0 5e8f1eefb0 Nov 11 2024 00:15:30 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061304 11720 2049584 36768 2048944 38 4 Kmem
20971520 720896 20250624 20250624 Page
nsh> ls -l /dev
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000720 36.5% lpwork 0x80400100 0x80400148
3 3 100 RR Task - Running 0000000000000000 0003008 0001856 61.7% /system/bin/init
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7cff0
uordblks 2678 2658
fordblks 7e980 7e9a0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 2
mxordblk 7cff0 7cff0
uordblks 2658 2578
fordblks 7e9a0 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7a7f0
uordblks 2578 2d88
fordblks 7ea80 7e270
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 7a7f0
uordblks 2d88 2d88
fordblks 7e270 7e270
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 78ff0
uordblks 2d88 4588
fordblks 7e270 7ca70
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VAR...
nuttx-sg2000-2024-11-10
Test OK
Sun Nov 10 08:37:45 +08 2024
----- Download the latest NuttX build for 2024-11-10
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.7.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Sun Nov 10 08:37:47 +08 2024
NuttX Source: https://github.com/apache/nuttx/tree/6dd313939fa772e27fbcbf7668d816298de359de
NuttX Apps: https://github.com/apache/nuttx-apps/tree/e2a21337ac5be663a8e6d9a82baa64b93cc19755
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 16403473 Nov 10 00:37 /tftpboot/Image-sg2000
Sun Nov 10 08:37:48 +08 2024
----- Close the screen session
spawn screen -x
Sun Nov 10 08:37:54 +08 2024
Sun Nov 10 08:37:54 +08 2024
----- Power Off the SBC
[]Sun Nov 10 08:37:58 +08 2024
----- Power On the SBC
[]Sun Nov 10 08:38:02 +08 2024
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.7.0 6dd313939f Nov 10 2024 00:16:07 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061304 11720 2049584 36768 2048944 38 4 Kmem
20971520 720896 20250624 20250624 Page
nsh> ls -l /dev
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000720 36.5% lpwork 0x80400100 0x80400148
3 3 100 RR Task - Running 0000000000000000 0003008 0001856 61.7% /system/bin/init
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 280 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7cff0
uordblks 2678 2658
fordblks 7e980 7e9a0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 2
mxordblk 7cff0 7cff0
uordblks 2658 2578
fordblks 7e9a0 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7a7f0
uordblks 2578 2d88
fordblks 7ea80 7e270
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 7a7f0
uordblks 2d88 2d88
fordblks 7e270 7e270
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 78ff0
uordblks 2d88 4588
fordblks 7e270 7ca70
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VAR...
nuttx-sg2000-2024-11-09
Test OK
Sat Nov 9 08:35:17 +08 2024
----- Download the latest NuttX build for 2024-11-09
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.7.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Sat Nov 9 08:35:19 +08 2024
NuttX Source: https://github.com/apache/nuttx/tree/ba2ad819dae1019b4c94799ce610cc4cbc3c8110
NuttX Apps: https://github.com/apache/nuttx-apps/tree/39908cc40c6b04436805ec060d488c79327c3217
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 16402449 Nov 9 00:35 /tftpboot/Image-sg2000
Sat Nov 9 08:35:20 +08 2024
----- Close the screen session
spawn screen -x
Sat Nov 9 08:35:25 +08 2024
Sat Nov 9 08:35:25 +08 2024
----- Power Off the SBC
[]Sat Nov 9 08:35:30 +08 2024
----- Power On the SBC
[]Sat Nov 9 08:35:35 +08 2024
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.7.0 ba2ad819da Nov 9 2024 00:14:56 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061304 11720 2049584 36768 2048944 38 4 Kmem
20971520 720896 20250624 20250624 Page
nsh> ls -l /dev
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000720 36.5% lpwork 0x80400100 0x80400148
3 3 100 RR Task - Running 0000000000000000 0003008 0001856 61.7% /system/bin/init
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7cff0
uordblks 2678 2658
fordblks 7e980 7e9a0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 2
mxordblk 7cff0 7cff0
uordblks 2658 2578
fordblks 7e9a0 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7a7f0
uordblks 2578 2d88
fordblks 7ea80 7e270
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 7a7f0
uordblks 2d88 2d88
fordblks 7e270 7e270
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 78ff0
uordblks 2d88 4588
fordblks 7e270 7ca70
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VAR...
nuttx-sg2000-2024-11-08
Test OK
Fri Nov 8 08:33:07 +08 2024
----- Download the latest NuttX build for 2024-11-08
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.7.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Fri Nov 8 08:33:08 +08 2024
NuttX Source: https://github.com/apache/nuttx/tree/db31e569579c7ec9753d5fb69d07e8f997c7eae1
NuttX Apps: https://github.com/apache/nuttx-apps/tree/39908cc40c6b04436805ec060d488c79327c3217
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 16402449 Nov 8 00:33 /tftpboot/Image-sg2000
Fri Nov 8 08:33:09 +08 2024
----- Close the screen session
spawn screen -x
Fri Nov 8 08:33:14 +08 2024
Fri Nov 8 08:33:14 +08 2024
----- Power Off the SBC
[]Fri Nov 8 08:33:20 +08 2024
----- Power On the SBC
[]Fri Nov 8 08:33:24 +08 2024
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.7.0 db31e56957 Nov 8 2024 00:15:12 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061304 11720 2049584 36768 2048944 38 4 Kmem
20971520 720896 20250624 20250624 Page
nsh> ls -l /dev
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000720 36.5% lpwork 0x80400100 0x80400148
3 3 100 RR Task - Running 0000000000000000 0003008 0001856 61.7% /system/bin/init
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7cff0
uordblks 2678 2658
fordblks 7e980 7e9a0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 2
mxordblk 7cff0 7cff0
uordblks 2658 2578
fordblks 7e9a0 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7a7f0
uordblks 2578 2d88
fordblks 7ea80 7e270
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 7a7f0
uordblks 2d88 2d88
fordblks 7e270 7e270
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 78ff0
uordblks 2d88 4588
fordblks 7e270 7ca70
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VAR...
nuttx-sg2000-2024-11-07
Test OK
Thu Nov 7 08:30:56 +08 2024
----- Download the latest NuttX build for 2024-11-07
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.7.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Thu Nov 7 08:30:58 +08 2024
NuttX Source: https://github.com/apache/nuttx/tree/400f2960e6a4c7e9fffd0ab05b644fda95f7c8b2
NuttX Apps: https://github.com/apache/nuttx-apps/tree/40a5e47d5c2edff4df6cc82859d1b2c5cd8a92d2
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 16402449 Nov 7 00:30 /tftpboot/Image-sg2000
Thu Nov 7 08:30:59 +08 2024
----- Close the screen session
spawn screen -x
Thu Nov 7 08:31:04 +08 2024
Thu Nov 7 08:31:04 +08 2024
----- Power Off the SBC
[]Thu Nov 7 08:31:09 +08 2024
----- Power On the SBC
[]Thu Nov 7 08:31:12 +08 2024
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.7.0 400f2960e6 Nov 7 2024 00:15:10 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061304 11720 2049584 36768 2048944 38 4 Kmem
20971520 720896 20250624 20250624 Page
nsh> ls -l /dev
/dev:
crw-rw-rw- 0 console
crw-rw-rw- 0 null
brw-rw-rw- 16777216 ram0
crw-rw-rw- 0 ttyS0
crw-rw-rw- 0 zero
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread - Ready 0000000000000000 0003056 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000720 36.5% lpwork 0x80400100 0x80400148
3 3 100 RR Task - Running 0000000000000000 0003008 0001856 61.7% /system/bin/init
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2678 2678
fordblks 7e980 7e980
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7cff0
uordblks 2678 2658
fordblks 7e980 7e9a0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 2
mxordblk 7cff0 7cff0
uordblks 2658 2578
fordblks 7e9a0 7ea80
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 2
mxordblk 7cff0 7cff0
uordblks 2578 2578
fordblks 7ea80 7ea80
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 2 3
mxordblk 7cff0 7a7f0
uordblks 2578 2d88
fordblks 7ea80 7e270
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 7a7f0
uordblks 2d88 2d88
fordblks 7e270 7e270
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 80ff8 80ff8
ordblks 3 3
mxordblk 7a7f0 78ff0
uordblks 2d88 4588
fordblks 7e270 7ca70
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VAR...