nshlib: apply privilege prompt markers only after real login - #3727
Merged
xiaoxiang781216 merged 1 commit intoAug 15, 2026
Merged
Conversation
nsh_consolemain always passes NSH_LOGIN_LOCAL, so treating any non-NONE session as a login rewrote nsh> to nsh# whenever SCHED_USER_IDENTITY was enabled. NTFC boot detection then timed out on sim/citest and qemu-rv/citest. Keep CONFIG_NSH_PROMPT_STRING until a successful console or telnet login (or su). Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
raiden00pl
approved these changes
Aug 15, 2026
Member
|
@xiaoxiang781216 @jerpelea @acassis this should unblock broken NTFC, but CI doesn't start for some reason |
Contributor
Author
|
@raiden00pl CI is running, but it does not show on this page. (https://github.com/apache/nuttx-apps/actions/runs/31820937588) |
Member
|
@Abhishekmishra2808 It seems that CI is starting multiple jobs for a single PR, something is broken in the CI logic
|
xiaoxiang781216
approved these changes
Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
TimeoutError: device boot timeoutonsim/citestandqemu-rv/citest.nsh_consolemain()always starts the session withNSH_LOGIN_LOCAL, even whenCONFIG_NSH_CONSOLE_LOGINis disabled. PR 3714 treated any non-NONEsession as a login and rewrotensh>tonsh#wheneverCONFIG_SCHED_USER_IDENTITYwas enabled.CONFIG_NSH_PROMPT_STRING(nsh>), so those citest configs (USER_IDENTITY on, console login off) never come up.#/$markers only after a successful console or telnet login (orsu). No-login boot keepsnsh>.Impact
CONFIG_SCHED_USER_IDENTITYboards without NSH login keep the configured prompt at boot (CI/NTFC compatible).sustill getnsh#/nsh$.CONFIG_SCHED_USER_IDENTITYis disabled.Testing
Build host: Linux WSL2,
sim:nshwithCONFIG_SCHED_USER_IDENTITY=yand console login disabled (same prompt path assim/citest/qemu-rv/citest).No-login boot keeps
CONFIG_NSH_PROMPT_STRING(nsh>), so NTFC boot detection can succeed. Aftersu, root becomesnsh#: