Do not test YCP on non-UTF-8 strings (bsc#1217523) #165
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bugzilla
https://bugzilla.suse.com/show_bug.cgi?id=1217523
Problem
Build failure with a newer rpm package: The libycp testsuite fails.
Cause
Non-UTF-8-encoded strings cause
grep
to detect a binary file and report "binary file matches", not the expected output.Fix
Removed the one individual test that made
grep
detect the stderr file for testbuiltin/Builtin-String1
as a binary file.Removed the entire
values/SingleCharStrings
test. That one was useful while developing the YCP parser, but now it only causes trouble because it contains a ton of special characters (char 0 .. char 31,Ctrl-A
..Ctrl-Z
; a ton of backslash character literals >char 127). That causesgrep
to detect the source file, its stdout and its stderr file as binary files. Nothing good can ever come from that.Added usable documentation how to run the tests and fix them if there are problems. That stuff cost me a whole working day.
Preformatted version: https://github.com/yast/yast-core/blob/master/libycp/testsuite/README.md
Test
Built and ran the test on the latest TW.