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

fix: Raise Error for long TEST_DIR #5703

Closed

Conversation

kevkevinpal
Copy link

I added an if statment after we define our test dir path to check if it is larger than 12 characters because otherwise it was throwing an error

this closes: #5576

I added an if statment after we define our test dir path to check if it
is larger than 12 characters because otherwise it was throwing an error
Comment on lines +28 to +29
if len(d) > 12:
raise ValueError("TEST_DIR length is too long please create one with less than x characters")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think that this is a hacky approach?

Maybe the solution is to fix the opts parser?

cc: @javiervargas that is working on a C solution

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ya its a bit hacky would you be able to point me to the opts parser? @javiervargas do you have a branch maybe I could look at?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javiervargas
Copy link

I've been working on in two possibles solutions. One could be increase this variable (after compile tests worked well)
https://github.com/javiervargas/lightning/commit/77079bd376cacf52c7f31d0dc0189b125240e284

/* FIXME: */ #define OPT_SHOW_LEN_BIG 128

But here, Maybe rusty could precise if this is a good approach.

Or second create a new method that prints arbitrary lenghts. I'm finishing that code. Thanks to @vincenzopalazzo

Issue seems to be here.

https://github.com/ElementsProject/lightning/blob/c4203e7de6f35ed1cd1658d7c898b8b6bfaac2df/lightningd/options.c#L1568-L1569

@rustyrussell
Copy link
Contributor

BTW, I'm closing this. The options parser should now be fixed?

@vincenzopalazzo
Copy link
Contributor

yeah it is alredy fixed

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

Successfully merging this pull request may close these issues.

listconfigs shows only 80 chars of "lightning-dir" path
4 participants