Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.2] vtysh: fix searching commands in parent nodes #5084

Closed
wants to merge 1 commit into from

Conversation

zays26
Copy link
Contributor

@zays26 zays26 commented Sep 30, 2019

Do not check parent command nodes in case of ambiguous and incomplete commands

Signed-off-by: Pavel Ivashchenko pivashchenko@nfware.com

@qlyoung
Copy link
Member

qlyoung commented Sep 30, 2019

Seems reasonable on the surface, but what bug in particular is this fixing? Marking DNM for now so I can get a better understanding

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9088/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for vtysh.c | 4 issues
===============================================
< ERROR: code indent should use tabs where possible
< #495: FILE: /tmp/f1-3907/vtysh.c:495:
< WARNING: please, no spaces at the start of a line
< #495: FILE: /tmp/f1-3907/vtysh.c:495:

CLANG Static Analyzer Summary

  • Github Pull Request 5084, comparing to Git base SHA ba0d195

No Changes in Static Analysis warnings compared to base

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9088/artifact/shared/static_analysis/index.html

@zays26 zays26 force-pushed the feature/vtysh-dev-7.2 branch from aef820c to ce95469 Compare September 30, 2019 20:33
@zays26
Copy link
Contributor Author

zays26 commented Sep 30, 2019

Seems reasonable on the surface, but what bug in particular is this fixing? Marking DNM for now so I can get a better understanding

I cannot find a serious bug for this fix. It's rather unexpected behavior, for example:

host# conf t
host(config)# router ospf
host(config-router)# r
% Command incomplete.
% [BGP] Unknown command: r
host#

I expect something like this:

host# conf t
host(config)# router ospf
host(config-router)# r
% Command incomplete: r
host(config-router)#

We can break configuration in case of command "r" will be matched in a parent node

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9092/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


CLANG Static Analyzer Summary

  • Github Pull Request 5084, comparing to Git base SHA ba0d195

No Changes in Static Analysis warnings compared to base

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9092/artifact/shared/static_analysis/index.html

@qlyoung
Copy link
Member

qlyoung commented Oct 7, 2019

@zays26 I'm okay with this patch, however you need to apply the same behavior everywhere else this code has been copy-pasted. Unfortunately this is one of the worst bits of code in the whole codebase. There's another copy of this code around line 790 that I am pretty sure needs to be changed as well, and maybe in command.c.

  Do not check parent command nodes in case of ambiguous and incomplete commands

Signed-off-by: Pavel Ivashchenko <pivashchenko@nfware.com>
@zays26 zays26 force-pushed the feature/vtysh-dev-7.2 branch from ce95469 to 288f2f8 Compare October 8, 2019 12:17
@zays26
Copy link
Contributor Author

zays26 commented Oct 8, 2019

@qlyoung I have updated code in vtysh.c and command.c

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9167/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for command.c | 2 issues
===============================================
< WARNING: line over 80 characters
< #1148: FILE: /tmp/f1-19164/command.c:1148:

CLANG Static Analyzer Summary

  • Github Pull Request 5084, comparing to Git base SHA c93f27d

No Changes in Static Analysis warnings compared to base

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9167/artifact/shared/static_analysis/index.html

@zays26 zays26 changed the title vtysh: fix searching commands in parent nodes [7.2] vtysh: fix searching commands in parent nodes Oct 11, 2019
@zays26
Copy link
Contributor Author

zays26 commented Oct 14, 2019

@qlyoung Hi! Can you check this patch too? It's the same patch like in the pull request #5083

@qlyoung
Copy link
Member

qlyoung commented Oct 15, 2019

@zays26 sorry, 7.2 is now a stable release branch. We're not taking any more patches for 7.2 if I'm not mistaken.

@zays26
Copy link
Contributor Author

zays26 commented Oct 15, 2019

@zays26 sorry, 7.2 is now a stable release branch. We're not taking any more patches for 7.2 if I'm not mistaken.

@qlyoung Ok! No problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants