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

DPM LFC unittest fails on EL5 #92

Closed
stdweird opened this issue Feb 15, 2016 · 11 comments
Closed

DPM LFC unittest fails on EL5 #92

stdweird opened this issue Feb 15, 2016 · 11 comments
Assignees
Milestone

Comments

@stdweird
Copy link
Member

@jrha @jouvin this will affect the release

src/test/perl/value_format..........1..18
[VERB] Log options --verbose
ok 1 - Boolean (false) correctly formatted
ok 2 - Boolean (true) correctly formatted
ok 3 - Boolean (true, quoted) correctly formatted
ok 4 - Literal value correctly formatted
ok 5 - Literal value (quoted) correctly formatted
ok 6 - Quoted literal value correctly formatted
not ok 7 - Already quoted literal value correctly formatted

#   Failed test 'Already quoted literal value correctly formatted'
#   at src/test/perl/value_format.t line 83.
#          got: '""This is a Test""'
#     expected: '"This is a Test"'
not ok 8 - Already single quoted literal value correctly formatted

#   Failed test 'Already single quoted literal value correctly formatted'
#   at src/test/perl/value_format.t line 89.
#          got: '"'This is a Test'"'
#     expected: ''This is a Test''
ok 9 - Empty value correctly formatted
ok 10 - Empty value (quoted) correctly formatted
ok 11 - Instance params correctly formatted
ok 12 - Instance params (quoted) correctly formatted
ok 13 - Array values correctly formatted
ok 14 - Array values (sorted) correctly formatted
ok 15 - Array values (unique) correctly formatted
ok 16 - Hash keys correctly formatted
ok 17 - no warnings
ok 18 - no warnings

@stdweird stdweird added this to the 16.2 milestone Feb 15, 2016
@jrha
Copy link
Member

jrha commented Feb 15, 2016

Well at least it won't prevent it, I don't build on EL5 😈
@jouvin Does it need EL5 support? If so what's the likelihood of a fix?

@stdweird
Copy link
Member Author

@jouvin one of the difference between perl5.8.8 and later 5.10+ is that 5.8.8 does not support named groups. so if you are using those somewhere, try to rewrite the regexps.

@stdweird stdweird modified the milestones: 16.4, 16.2 Feb 18, 2016
@stdweird
Copy link
Member Author

@jouvin if you do not expect this to work on el5, i'll exclude this from the el5 build test

@stdweird
Copy link
Member Author

stdweird commented May 9, 2016

@jouvin ping?

@jouvin
Copy link
Contributor

jouvin commented May 9, 2016

I'll have a look...

@jouvin
Copy link
Contributor

jouvin commented May 9, 2016

I had a look. Would be better to fix it as it also impact RuleBasedEditor in fact... Do you know how to replace \g1 (the string that matched the first group) in perl 5.8.8?

@stdweird
Copy link
Member Author

stdweird commented May 9, 2016

not sure what you mean. what regexp is used? and a small example?

@jouvin
Copy link
Contributor

jouvin commented May 9, 2016

The failing regexp is /^(["']).*\g1$/ used to match a quoted string, no matter whether it is quoted or double quoted.
BTW, the problem in ncm-dpmlfc will be fixed by #97 as this code has been moved to the RuleBasedEditor. But it would be good to fix it if possible and easy. An acceptable alternative for me would be to make an explicit comment that quoted values are not supported on SL5. This is not a problem for ncm-dpmlfc itself (thus the reason I missed it on SL5 machines using the config module but where the tests are not executed).

@jouvin
Copy link
Contributor

jouvin commented May 9, 2016

I had a look at this but I don't see any solution to implement the same in perl 5.8 (at least one reasonable solution!). The only thing I see for a 5.8 support of this quoting feature is to relax the pattern and look for any occurence of ' or " at the beginning and at the end of the pattern, without correlating both. Thus "this is an improperly quoted text' would match (except if we do an additional check to compare the first and last character)... I think that until we need a real support on SL5 (I hope never!), we could live with a comment about the SL5 restriction.
Any other opinion or proposal.

@jouvin
Copy link
Contributor

jouvin commented May 9, 2016

Too quick to comment! \1 seems to do the job, will change for it. I thought it would match either single or double quote, as in the first group but it seems to match the alternative that matched in first group.

@jouvin
Copy link
Contributor

jouvin commented May 9, 2016

Fixed in quattor/CAF#151. I think this issue can be closed now.

@jrha jrha closed this as completed May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants