Description of problem: The cdrom test fails due to problems arising from mount failures when trying to mount the cdrom to verify it was written correctly. Example run log: [...] Please close the drive tray of /dev/sr0 manually then press ENTER to continue. Start to compare data, this may take some time, please be patient ... Traceback (most recent call last): File "./cdrom.py", line 761, in <module> returnValue = test.do(sys.argv) File "/usr/share/hts/lib/hts/test.py", line 226, in do return self.run() File "./cdrom.py", line 668, in run returnValue = self.testCDRW(cdromDevice) File "./cdrom.py", line 527, in testCDRW returnValue = self.rewriter("cdrom",cdromDevice) File "./cdrom.py", line 463, in rewriter returnValue = self.writer(deviceType,cdromDevice) File "./cdrom.py", line 429, in writer if self.cmpTree(fileDir,"media"): File "./cdrom.py", line 99, in cmpTree if filecmp.cmp(file1,file2): File "/usr/lib/python2.5/filecmp.py", line 44, in cmp s2 = _sig(os.stat(f2)) OSError: [Errno 2] No such file or directory: 'media/chcat' ...finished running ./cdrom.py, exit code=1 recovered exit code=1 hts-report-result /HTS/hts/cdrom FAIL /var/log/hts/runs/3/cdrom/output.log saveOutput: /var/log/hts/runs/3/cdrom/output.log Return value was 0 Version-Release number of selected component (if applicable): HTS 5.2 R19 How reproducible: Always on T42 running Fedora 8
Created attachment 315614 [details] cdrom.py patch to re-try mount command
The above patch will re-try the mount command when it fails (10 tries, 5 sec wait per try). The patch also separates the comparison code as a separate "compare" function.
Created attachment 315669 [details] cdrom.py patch to re-try mount command - 2nd attempt
what's the purpose to re-try mount for several times ? If the first mount fails, then there must be something wrong(either hardware or software failure) and should be fixed.
Verified the problem was not found in hts-5.2-20.el5 and hts-5.2-20.el4 on RHEL 5 and 4.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0919.html