Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Fixes for gopts and spec #4045

Merged
merged 7 commits into from
Sep 17, 2021

Conversation

kodebach
Copy link
Member

Fixes #4043
Fixes #4044

@qwepoizt Please verify that this PR fixes the problems you found.

Basics

These points need to be fulfilled for every PR:

  • Short descriptions of your changes are in the release notes
    (added as entry in doc/news/_preparation_next_release.md which
    contains _(my name)_)
    Please always add something to the release notes.
  • Details of what you changed are in commit messages
    (first line should have module: short statement syntax)
  • References to issues, e.g. close #X, are in the commit messages.
  • The buildservers are happy. If not, fix in this order:
    • add a line in doc/news/_preparation_next_release.md
    • reformat the code with scripts/dev/reformat-all
    • make all unit tests pass
    • fix all memleaks
  • The PR is rebased with current master.

If you have any troubles fulfilling these criteria, please write
about the trouble as comment in the PR. We will help you.
But we cannot accept PRs that do not fulfill the basics.

Checklist

Check relevant points but please do not remove entries.
For docu fixes, spell checking, and similar none of these points below
need to be checked.

  • I added unit tests for my code
  • I fully described what my PR does in the documentation
    (not in the PR description)
  • I fixed all affected documentation
  • I added code comments, logging, and assertions as appropriate (see Coding Guidelines)
  • I updated all meta data (e.g. README.md of plugins and METADATA.ini)
  • I mentioned every code not directly written by me in THIRD-PARTY-LICENSES

Review

Reviewers will usually check the following:

@kodebach kodebach requested a review from qwepoizt September 14, 2021 21:49
@qwepoizt
Copy link
Contributor

@kodebach Thanks for fixing that so quickly! I am currently testing and will report later today. Looks very promising so far!

@qwepoizt
Copy link
Contributor

@kodebach: I can confirm that this fixes

!

It does not fix #4049, but makes the fix possible. I'll take care of #4049.

Once all of these issues are fixed, the parent issue #4029 will be fixed.

Copy link
Contributor

@qwepoizt qwepoizt left a comment

Choose a reason for hiding this comment

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

As I don't know the internals of kdbGet(), I fear I can't provide any helpful review apart from reporting that it fixes several issues (see #4045 (comment)).

@markus2330
Copy link
Contributor

At least one test should be added that demonstrates that proc key gets validated.

@mpranj a leftover was added for you in this PR, is the PR okay for you?

@kodebach
Copy link
Member Author

At least one test should be added that demonstrates that proc key gets validated.

The commands part of testscr_check_gen covers this. Specifically, I added this additional check

if [ "$res" = "0" ]; then
./dummy -v get --max-length=notanint ab cd
res=$?
echo "dummy -v get --max-length=notanint ab cd exited with: $res"
if [ "$res" = "0" ] && command -v valgrind; then
valgrind --error-exitcode=2 --show-leak-kinds=all --leak-check=full --leak-resolution=high --track-origins=yes --vgdb=no --trace-children=yes -- ./dummy -v get --max-length=notanint ab cd
echo "valgrind dummy -v get -v ab cd exited with: $?"
fi
res=$((res == 0))
fi

The res=$((res == 0)) (*) at the bottom ensures that the ./dummy command failed. Yes, using == 0 to check for failure is a bit weird, but it's because we then check "$res" = 0.

mpranj a leftover was added for you in this PR, is the PR okay for you?

If you are referring to the fact that I disabled the cache, if a procgetstorage plugin is mounted, then I wouldn't be too concerned about it. This part of the code will change completely with #3693, so there is not much point in looking for a better fix now.

@markus2330
Copy link
Contributor

Thank you! Is this ready to merge?

@kodebach
Copy link
Member Author

Thank you! Is this ready to merge?

Yes, I would say so.

@markus2330 markus2330 merged commit 90fb5be into ElektraInitiative:master Sep 17, 2021
@markus2330
Copy link
Contributor

Thank you 🎆

@mpranj mpranj added this to the 0.9.8 milestone Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants