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
Workaround for boo#1019090, bnc#1014602 #2300
Conversation
If these are workarounds, shouldn't they be using |
it's unlikely though that we will fix the 42.2 FTP repo - so it will be soft failure forever :( |
The test tries to do
All these are already implemented in
In the meanwhile, instead of repeating the previous codeblock, I would prefer to use an API call similar to After all, I am open to suggestions, what do you guys think? As for the bnc#1014602 this is an invalid bug, so there is no reason to mark this as a soft-failure. I would say it's rather a weird to have a package with version |
I didn't implement the part you mentioned, I just changed it and adopted maintainership. In general, anytime you want to reuse code move it up in the hierarchy to the first common point, e.g. a baseclass which is common to the test modules that share the functionality. You can do that by extracting the part into a function, find a baseclass (e.g. In general the procedure with
recording a soft failure without a reference is a bad approach as - honestly - no one will care until it might be too late. So you want a test to fail and only explicitly accept dependency issues in certain and known cases. You maybe could make it a bit easier by doing something like |
@okurz thanks for the clarification. So, after talking with @asemen we concluded to another simpler solution for boo#1019090:
In that case, no matter of Leap or TW, if such bug exists in opensuse it will be flagged as soft-failed (hitting boo#1019090) and the test will continue with the workaround. |
I recommitted and rebased. The new code works as expected, tested in: Please review the code, and merge if you are OK with the changes :) |
|
fi | ||
else | ||
echo "check linked java version: FAIL" | ||
echo "linked java is: $java_version_active should be $dot_version_short" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong indendation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part of the code is will be removed, thanks to the previous refactor. Yet again, thanks for catching this.
echo "INFO: linked java is: $java_version_active which is normal according to bnc#1014602" | ||
fi | ||
else | ||
echo "check linked java version: FAIL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DRY. You are calling the same code multiple times, please extract method.
Hint: echo -n
and combine multiple echo calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for spotting this, will refactor the code properly.
echo "Reason : devel pkg is not installed, thus it is normal there is not javac" | ||
if zypper products -i | grep sle-sdk > /dev/null; then | ||
echo "Status : Error! The devel pkg should be installed. Check your repos!" | ||
exit 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 8?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any guideline for openQA return codes? I was using mine, which kind of pointless because they are known only to me, so I will change all the (fail) return codes to 1, which is the default that everybody expects in such a case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, "do not use magic numbers" ;-)
|
||
if (check_var("DISTRI", "opensuse")) { | ||
if ($bootstrap_pkg_rt == 0) { | ||
print "There are java bootstrap packages available to be installed\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better replace by diag
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I don't want to replace it, I need this to be visible in the screenshots. However, I can 'add' a diag, so this will be also visible in the logs.
boo#1019090: if there are 'java-bootstrap' packages, try to install them, unless they conflict with java. bnc#1014602: java 1.7.0 is reported by java when having ibm-java 1.7.1 installed. This behavior is expected and acceptable according to IBM. Also only fail the test for 'javac' if the -devel package should be installed (SDK available) but it's not. Update the date in the comment section (2016 -> 2017). Replace all the undefined exit codes with 1.
Installs every possible java version that is available in the currently enabled repositories of the SUT. Make sure that there is at least one Java version installed, otherwise quite testing. Testing Coverage For every installed Java version (except gcj), it implements the following scenarios: - All tests ignore gcj. - Number of java alternatives is equal with the number of the installed java versions. - Number of javac alternatives is equal with the number of the installed java-devel versions. - Number of javaplugin alternatives is equal with the number of the installed java-ibm versions. - update-alternatives works for both java and javac. - update-alternatives works for javaplugin only for java-ibm. - java -version corresponds to the currently active version of java. - Compile and run a basic helloworld program. - Detect abnormal behavior in java -version (see bnc#1014602) Testing Environment Wherever there are java and java-devel (javac) packages. It has been tested in SLES-12-{SP1,2}.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good enough for now :-) I will merge and ask you to please closely monitor scenarios where this is running.
} | ||
else { | ||
diag "There are no java bootstrap packages"; | ||
print "There are no java bootstrap packages\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that repetition is certainly not what I intended.
boo#1019090: do not install 'java-bootstrap' packages, as they
conflict with java on Leap42.2
bnc#1014602: java 1.7.0 is reported by java when having ibm-java 1.7.1
installed. This behavior is expected and acceptable according to IBM.
Also only fail the test for 'javac' if the -devel package should be
installed (SDK available) but it's not.