Bug 788811

Summary: runtest gets confused by running from /bin
Product: [Fedora] Fedora Reporter: Josh Stone <jistone>
Component: dejagnuAssignee: Honza Horak <hhorak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: dsmith, fche, hhorak, mjw
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dejagnu-1.5-3.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-21 18:44:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
patch proposed to upstream none

Description Josh Stone 2012-02-09 03:38:04 UTC
Description of problem:
With the new /usr move, the old /bin is a symlink to /usr/bin.  This means that the runtest command can be found by either path.  The default PATH has /bin first, so that's how runtest is loaded.  Then runtest complains that it can't find runtest.exp.  Running /usr/bin/runtest by full name works correctly.

Version-Release number of selected component (if applicable):
dejagnu-1.5-2.fc17.noarch

How reproducible:
100%

Steps to Reproduce:
1. Just try "runtest"
  
Actual results:
$ which runtest
/bin/runtest
$ runtest
ERROR: runtest.exp does not exist

Expected results:
It should be the same as running with the explicit path:
$ /usr/bin/runtest
WARNING: Couldn't find the global config file.
WARNING: No tool specified
Test Run By jistone on Wed Feb  8 19:35:55 2012
...

Additional info:

Comment 1 Honza Horak 2012-02-24 12:58:57 UTC
Created attachment 565596 [details]
patch proposed to upstream

It fails because runtest script is not successful when guessing runtest.exp location. It searches '@bindir@/../share' and '@bindir@/../../share', which is  expanded to '/share' in both cases when runtest script is found in /bin in the first place. However in fedora, runtest.exp is located in /usr/share. 

I've proposed to upstream, that two usual paths should be searched every-time, which is really simple patch, but should help.

Comment 2 Fedora Update System 2012-03-15 13:46:35 UTC
dejagnu-1.5-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/dejagnu-1.5-3.fc17

Comment 3 Fedora Update System 2012-03-16 02:39:24 UTC
Package dejagnu-1.5-3.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dejagnu-1.5-3.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-3776/dejagnu-1.5-3.fc17
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-03-21 18:44:46 UTC
dejagnu-1.5-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.