[M] Change in libosmocore[master]: vty: show bug in implicit go_parent_node
Attention is currently required from: laforge, pespin, fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/32561 to look at the new patch set (#2). Change subject: vty: show bug in implicit go_parent_node ...................................................................... vty: show bug in implicit go_parent_node Add test to show a problem in VTY node exiting. Back in 2017 when I introduced VTY config file scopes by indenting [1], I actually mistook the vty->priv for the vty->index that we use everywhere to link to the state for our VTY nodes. The intention was that each VTY node child level has its own object linked to it by the vty->index pointer. When the config file leaves a scope, the vty->index should reflect the parent object. Instead I implemented that for the vty->priv pointer only, but we don't use that. Why did this bug not show? A problem happens only if: - a node that uses vty->index is nested inside a node that also uses vty->index. - config sets parent node attributes after a child node. - there is no legacy vty_go_parent() function that sets the correct index via a switch(). [1] "VTY: implicit node exit by de-indenting, not parent lookup" 4a31ffa2f0097d96201f80305a0495c57552f0ad I24cbb3f6de111f2d31110c3c484c066f1153aac9 Change-Id: I2472daed7436a1947655b06d34eb217e595bc7f3 --- M tests/vty/vty_transcript_test.c M tests/vty/vty_transcript_test.vty 2 files changed, 138 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/32561/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32561 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2472daed7436a1947655b06d34eb217e595bc7f3 Gerrit-Change-Number: 32561 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> Gerrit-CC: laforge <laforge@osmocom.org> Gerrit-CC: pespin <pespin@sysmocom.de> Gerrit-Attention: laforge <laforge@osmocom.org> Gerrit-Attention: pespin <pespin@sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: newpatchset
participants (1)
-
neels