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

docker/testshell_markdown tests fail due to cascading #1773

Closed
waht opened this issue Jan 7, 2018 · 1 comment
Closed

docker/testshell_markdown tests fail due to cascading #1773

waht opened this issue Jan 7, 2018 · 1 comment
Labels

Comments

@waht
Copy link
Contributor

waht commented Jan 7, 2018

Steps to Reproduce the Problem

When building Elektra in a Docker container (doc/docker) with CMake defaults and running make run_all the following tests fail due to cascading:

testshell_markdown_readme_msr
testshell_markdown_issue_template
testshell_markdown_tutorial_cascading
testshell_markdown_csvstorage
testshell_markdown_conditionals
testshell_markdown_dini
testshell_markdown_directoryvalue
testshell_markdown_enum
testshell_markdown_line
testshell_markdown_mathcheck
testshell_markdown_yajl
testshell_markdown_tutorial_validation
testshell_markdown_ini: probably affected by other failed tests (e.g. already used mountpoints)
testshell_markdown_mini

In the container all tests are run as root. Therefore when cascading, keys are written to the system instead of the user namespace.

Tests without annotations in the list above fail due to cascading/namespace issues (like testshell_markdown_readme_msr):

        Start 107: testshell_markdown_readme_msr
107/162 Test #107: testshell_markdown_readme_msr ............***Failed    0.62 sec
kdb set /examples/markdown/napalm death

ERROR - STDOUT:
“Using name system/examples/markdown/napalm
Create a new key system/examples/markdown/napalm with string "death"”
does not match
“Using name user/examples/markdown/napalm⏎Create a new key user/examples/markdown/napalm with string "death"”

Possible Solutions

  1. Require tests not to be run as root.
  2. Rewrite tests without cascading (although some markdown examples will still require cascading).
  3. Use an indicator that relaxes kdb output validation for namespaces.

For example:

kdb set /examples/markdown/napalm death
#> Using name user*/examples/markdown/napalm
#> Create a new key user*/examples/markdown/napalm with string "death"

And add some message like "* The actual namespace used depends on the current user."

I assume rewriting most examples not to use cascading and relaxing output validation will fix most of the failed tests.

System Information

  • Elektra Version: master

Further Log Files and Output

run_all.log

@waht waht added the bug label Jan 7, 2018
@markus2330
Copy link
Contributor

Thank you for reporting this problem!

Yes, its wrong to assume that keys are written to the namespace user when setting a cascading key. I like the idea of an indicator which is replaced by any namespace. Alternatively, we could use regex:

kdb set /examples/markdown/napalm death
#> Using name .*/examples/markdown/napalm
#> Create a new key .*/examples/markdown/napalm with string "death"

Btw. (not related to this issue) you might also be interested in the discussion happening in #1715 where @BernhardDenner argued that tests should not be executed as root.

sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 19, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the test any more. This
update fixes ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 20, 2019
We do not assume that a non-root user executes the test any more. This
update fixes ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the test any more. This
update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Jan 21, 2019
We do not assume that a non-root user executes the tutorial test any
more. This update fixes part of issue ElektraInitiative#1773.
sanssecours added a commit to sanssecours/elektra that referenced this issue Feb 11, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue Feb 11, 2019
sanssecours added a commit to sanssecours/elektra that referenced this issue Feb 11, 2019
sanssecours added a commit that referenced this issue Feb 25, 2019
This commit addresses issue #1773 and fixes a failing test in PR #2433.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants