Abhishekmishra2808 opened a new pull request, #3553: URL: https://github.com/apache/nuttx-apps/pull/3553
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary Add optional multi-user regression tests to ostest behind CONFIG_TESTING_OSTEST_MULTIUSER. When enabled, multiuser_test() runs from ostest and checks: ## Impact - No runtime behavior change unless CONFIG_TESTING_OSTEST and CONFIG_TESTING_OSTEST_MULTIUSER are both enabled - Adds automated regression coverage for the multi-user VFS and identity work (inode, tmpfs, NSH) - ostest binary size grows only on configs that enable the option - Depends on nuttx [PR1 ](https://github.com/apache/nuttx/pull/19162) (permission helpers) and [PR2 ](https://github.com/apache/nuttx/pull/19165)(tmpfs) for full test coverage; individual sub-tests skip gracefully when prerequisites are missing ## Testing Embedded multiuser test in ostest Logs from ESP32-C3 (Multiuser Part) ``` End of test memory usage: VARIABLE BEFORE AFTER ======== ======== ======== arena 54c38 54c38 ordblks 2 2 mxordblk 4f760 4f760 uordblks 5448 5448 fordblks 4f7f0 4f7f0 user_main: multi-user test multiuser_test: start multiuser: effective UID/GID switching PASS: initial uid == 0 PASS: initial euid == 0 PASS: initial gid == 0 PASS: initial egid == 0 PASS: root seteuid(1000) PASS: euid after seteuid(1000) == 1000 PASS: root seteuid(0) restore PASS: euid restored to 0 == 0 PASS: root setegid(2000) PASS: egid after setegid(2000) == 2000 PASS: root setegid(0) restore PASS: egid restored to 0 == 0 multiuser: saved set-UID/GID semantics (child task) multiuser_suid_child: saved set-UID/GID semantics PASS: setuid(1000) as root PASS: uid after setuid(1000) == 1000 PASS: euid after setuid(1000) == 1000 PASS: non-root seteuid(0) denied errno=1 PASS: euid unchanged after denied seteuid(0) == 1000 PASS: non-root seteuid(1000) PASS: root-group setegid(2000) PASS: egid after setegid(2000) == 2000 PASS: root-group setegid(0) restore PASS: setgid(3000) PASS: gid after setgid(3000) == 3000 PASS: egid after setgid(3000) == 3000 PASS: non-root setegid(0) denied errno=1 PASS: egid unchanged after denied setegid(0) == 3000 multiuser_suid_child: 0 failure(s) PASS: mu_suid child completed successfully PASS: parent euid after child == 0 PASS: parent egid after child == 0 multiuser: pseudoFS chmod/chown/open permissions PASS: /ostest_mu_perm owner 0:0 PASS: root chmod(0600) PASS: non-owner chmod(0777) denied errno=1 PASS: non-root chown(0,0) denied errno=1 PASS: root chown to 1000:1000 PASS: /ostest_mu_perm owner 1000:1000 PASS: owner chmod(0777) PASS: /ostest_mu_secret owner 0:0 PASS: open(/ostest_mu_secret) denied with EACCES PASS: open(/ostest_mu_secret) allowed PASS: /ostest_mu_user owner 1000:1000 PASS: open(/ostest_mu_user) allowed multiuser: tmpfs open permission enforcement PASS: /tmp/ostest_mu_secret owner 0:0 PASS: open(/tmp/ostest_mu_secret) denied with EACCES PASS: open(/tmp/ostest_mu_secret) allowed multiuser: passwd lookup after credential drop PASS: getpwnam(root) uid=0 PASS: getpwnam(testuser) uid=1000 multiuser_test: 0 failure(s) ``` -- 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]
