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

shell recorder: EOF broken #1654

Closed
markus2330 opened this Issue Oct 28, 2017 · 8 comments

Comments

Projects
None yet
2 participants
@markus2330
Contributor

markus2330 commented Oct 28, 2017

Describe what you wanted to do

Run unit tests.

Describe what you expected

That all unit tests are successful.

Describe what actually happened

        134 - testshell_markdown_kdb-global-umount (Failed)
        142 - testshell_markdown_ini (Failed)
        147 - testshell_markdown_multifile (Failed)
        152 - testshell_markdown_tutorial_validation (Failed)
        153 - testshell_markdown_base64 (Failed

It seems like EOF is broken, maybe due to \n handling? (sorry the errors are partly german):

CMD: cat > `kdb file /examples/ini` <<EOF \n[Section1]\nkey1 = val1\n[Section3]\nkey3 = val3\nEOF\n
RET: 1
=== FAILED return value doesn't match expected pattern 0
STDERR: sh: Warnung: Das in der Zeile 0 beginnende Here-Dokument geht bis zum Dateiende (erwartet wird `EOF').
Using name user/examples/ini
cat: 'n[Section1]nkey1': Datei oder Verzeichnis nicht gefunden
cat: '=': Datei oder Verzeichnis nicht gefunden
cat: 'val1n[Section3]nkey3': Datei oder Verzeichnis nicht gefunden
cat: '=': Datei oder Verzeichnis nicht gefunden
cat: val3nEOFn: Datei oder Verzeichnis nicht gefunden
STDOUT: 
WARNINGS: 
ERRORS: 
DIFF: 

System Information

  • Elektra Version: master

Further Log Files and Output

@markus2330 markus2330 added the bug label Oct 28, 2017

@markus2330 markus2330 added this to the 0.8.20 milestone Oct 28, 2017

@sanssecours

This comment has been minimized.

Show comment
Hide comment
@sanssecours

sanssecours Oct 28, 2017

Contributor

Sorry for the late response. If I configure Elektra with the standard options on macOS, then the only test that fails is testshell_markdown_tcl. This is the case since the plugin depends on base64, which is still marked as experimental. (It might make sense to either remove the experimental tag from base64 or add it to tcl.)

All the other Markdown Shell Recorder tests, that include all tests you mentioned above (except for testshell_markdown_base64 ), work fine. The tests also work on Debian unstable.

Contributor

sanssecours commented Oct 28, 2017

Sorry for the late response. If I configure Elektra with the standard options on macOS, then the only test that fails is testshell_markdown_tcl. This is the case since the plugin depends on base64, which is still marked as experimental. (It might make sense to either remove the experimental tag from base64 or add it to tcl.)

All the other Markdown Shell Recorder tests, that include all tests you mentioned above (except for testshell_markdown_base64 ), work fine. The tests also work on Debian unstable.

@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Oct 28, 2017

Contributor

Okay, I found the problem: It does not work if /bin/sh points to bash. In a fresh installation it is now /bin/dash by default, but if you upgraded Debian since a long time it might be still /bin/bash. It is lower priority now though.

Contributor

markus2330 commented Oct 28, 2017

Okay, I found the problem: It does not work if /bin/sh points to bash. In a fresh installation it is now /bin/dash by default, but if you upgraded Debian since a long time it might be still /bin/bash. It is lower priority now though.

@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Oct 28, 2017

Contributor

You are right about retagging experimental. Is base64 ready to be released as non-experimental?

Contributor

markus2330 commented Oct 28, 2017

You are right about retagging experimental. Is base64 ready to be released as non-experimental?

@sanssecours

This comment has been minimized.

Show comment
Hide comment
@sanssecours

sanssecours Oct 28, 2017

Contributor

Is base64 ready to be released as non-experimental?

I would say yes. I am not the author of the plugin though.

Contributor

sanssecours commented Oct 28, 2017

Is base64 ready to be released as non-experimental?

I would say yes. I am not the author of the plugin though.

markus2330 added a commit that referenced this issue Oct 28, 2017

@sanssecours

This comment has been minimized.

Show comment
Hide comment
@sanssecours

sanssecours Oct 29, 2017

Contributor

It does not work if /bin/sh points to bash.

That is very strange since sh also points to bash on macOS. Anyway, I will take a look at #1640 again. Hopefully the pull request will fix the problem.

Contributor

sanssecours commented Oct 29, 2017

It does not work if /bin/sh points to bash.

That is very strange since sh also points to bash on macOS. Anyway, I will take a look at #1640 again. Hopefully the pull request will fix the problem.

@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Oct 29, 2017

Contributor

btw. it is GNU bash, Version 4.4.12(1)-release (x86_64-pc-linux-gnu)

Contributor

markus2330 commented Oct 29, 2017

btw. it is GNU bash, Version 4.4.12(1)-release (x86_64-pc-linux-gnu)

@sanssecours

This comment has been minimized.

Show comment
Hide comment
@sanssecours

sanssecours Oct 29, 2017

Contributor

btw. it is GNU bash, Version 4.4.12(1)-release (x86_64-pc-linux-gnu)

That information was quite helpful. I can reproduce the problem now.

Contributor

sanssecours commented Oct 29, 2017

btw. it is GNU bash, Version 4.4.12(1)-release (x86_64-pc-linux-gnu)

That information was quite helpful. I can reproduce the problem now.

@markus2330

This comment has been minimized.

Show comment
Hide comment
@markus2330

markus2330 Oct 29, 2017

Contributor

Btw. it would be great if the shell recorder itself (and not the tutorials) implements such quirks to satisfy individual shell implementations.

Contributor

markus2330 commented Oct 29, 2017

Btw. it would be great if the shell recorder itself (and not the tutorials) implements such quirks to satisfy individual shell implementations.

@sanssecours sanssecours modified the milestones: 0.8.20, 0.8.21 Oct 30, 2017

sanssecours added a commit to sanssecours/elektra that referenced this issue Nov 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment