Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1099080

Summary: Test failure due to dos2unix version.
Product: [Fedora] Fedora Reporter: Éric Fintzel <efintzel>
Component: certmongerAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mharmsen, nalin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: certmonger-0.75.2-1.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-18 16:00:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1051573    
Attachments:
Description Flags
Patch applied to tests/run-tests.sh file. none

Description Éric Fintzel 2014-05-19 12:54:50 UTC
Created attachment 897128 [details]
Patch applied to tests/run-tests.sh file.

Description of problem:
Test failure due to dos2unix version.

Version-Release number of selected component (if applicable):
certmonger-0.74-1.fc21.src.rpm

How reproducible:
Build the package with mock (make check should be active).

Actual results:
Failure on the following test:
Running test 007-certsave... FAIL

Additional info:

Package build on the pp64le arch with mock. Build log:
...
Running test 007-certsave... FAIL
--- expected.out        2014-04-03 16:05:06.000000000 +0200
+++ actual      2014-05-12 15:58:54.080009198 +0200
@@ -4,9 +4,9 @@
 1: "cert"
 [openssl:wrong]
 [openssl:right]
-dos2unix: converting file cert.original to unix format ...
-dos2unix: converting file cert.nss to unix format ...
-dos2unix: converting file cert.openssl to unix format ...
+dos2unix: converting file cert.original to unix format...
+dos2unix: converting file cert.nss to unix format...
+dos2unix: converting file cert.openssl to unix format...
...
Error: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target ppc64le --nodeps  builddir/\
build/SPECS/certmonger.spec']
LEAVE do --> EXCEPTION RAISED

The run-test.sh script (managing the different tests) checks for differences between actual tests results and expected ones. In the current case, the mock dos2unix command exhibits a little change, no more space char between "format" and "..." in the actual string compared to the expected one, which causes the test failure. Some other tests (007-certsave-sql, 007-certsave-dbm) will have the same problem.

I verified with the version 5.3.1 (2011-08-09) of dos2unix, the space char is present, but not with the mock version 6.0.5 (2014-04-17).

The idea is to ignore meaningless white spaces in files comparisons. I patched the run-tests.sh script (patch provided as attachment), replacing the "cmp -s" command used to compare actual results file against expected one by a "diff -w" (ignore all white spaces). Then tests passed and the build finished correctly.

Note the problem is not specific to ppc64le.