Description of problem:
While running some tests in Beaker I noticed the $HOME variable is
not set, which is causing some tests to fail. For example the top
test checks user config file "~/.toprc". Apparently $HOME is empty
resulting in checking for "/.toprc" file which then fails:
:: [05:00:32] :: Inspecting /.toprc
cat: /.toprc: No such file or directory
Version-Release number of selected component (if applicable):
The variable is not set in RHTS . As far as that we are "compatible."
Absolutely no problem to add it, but do we really want/need it? Any chance adding it would cause incompatibilities?
Regarding "Do we really want it?": I guess so. Any action which
expects $HOME to be set results usually in placing some unwanted
files into root directory. See my example above, or another clear
case is rpm -i *.src.rpm which in last versions places the files
into user's home dir. Don't know of any incompatibility or problem.
I can confirm that RHTS and Beaker are consistent in not having HOME set:
Both failures are caused by rpm installing source package into $HOME/rpmbuild and expecting that to be /root/rpmbuild
Could it be rhel5 vs rhel6 issue?
I also noticed this in . After consultation with pmuller I added
[ -z $HOME ] && HOME="/root"
Another example of failed ipython test:
FATAL ERROR: undefined $HOME, IPython can not proceed.
Can we get the $HOME variable set?
This will be delivered as beah-0.6.9 this Wednesday.
This does not seems to be fixed. I ran the "top" test without the
workaround and it failed again:
while with the workaround
[ -z "$HOME" ] && export HOME="/root"
Lack of concentration.
This is now really fixed in beah-0.6.10-1 and will be delivered tomorrow.
Marian, any idea?
Yeah I have an idea: it's the rhts-compat thing is not entirely "compatible" with non-compat. Easy fix.
One-liner. Pushed directly to master:
What about writing some beaker regression test (for beaker)? Does anything like that exist? Testing of $HOME could be one of subtests.
(In reply to comment #15)
> What about writing some beaker regression test (for beaker)? Does anything like
> that exist? Testing of $HOME could be one of subtests.
I added this check to one of the tests.
The package is available on beaker-stage.
I'm not able to verify the fix, beah fails to install the task,
re-submitting with "make tag && make bkradd" did not help:
You have to:
- upload the task to beaker-stage  or
- use harness from stage on production server - need to set a repo
(In reply to comment #20)
> You have to:
> - upload the task to beaker-stage  or
> - use harness from stage on production server - need to set a repo
I did use the first method mentioned above, see the update date:
However the package still could not be found. Even after re-submit
as I've mentioned in comment 19.
Petr: Try method 2 please. We have had a related bug reported, but can not find details.
Bill: beaker-stage is not picking tasks. I looked into repo files and the task is not there at all. Any ideas?
I met the same issue when I ran SRPM tests, and I submited a ticket https://engineering.redhat.com/rt3/Ticket/Display.html?id=102529.
(In reply to comment #23)
> I met the same issue when I ran SRPM tests, and I submited a ticket
I can not access the ticket.
In case it is re: HOME env.variable: close the ticket, please. eng-ops has nothing to do with it.
(In reply to comment #24)
> (In reply to comment #23)
> > I met the same issue when I ran SRPM tests, and I submited a ticket
> > https://engineering.redhat.com/rt3/Ticket/Display.html?id=102529.
> I can not access the ticket.
> In case it is re: HOME env.variable: close the ticket, please. eng-ops has
> nothing to do with it.
eng-ops forwarded the ticket to errata-admin@, following is the content of ticket:
I ran SRPM tests on i386/x86_64/ppc64/s390x with
kernel-2.6.32-71.18.1.el6, all the /kernel/errata/srpm-rebuild tests
failed, the job link is:
From the TESTOUT.log, I found when it started to run, the rpmbuild path
is wrong, it should be "/root/rpmbuild/BUILD":
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.w9fW8y
+ umask 022
+ cd /rpmbuild/BUILD
The value of $HOME is wrong may be the reason, could you please take a look?
(In reply to comment #22)
> Petr: Try method 2 please. We have had a related bug reported,
> but can not find details.
I've tested the updated harness on production Beaker and
everything now seems to be ok. Thanks for the fix.
Dayong: update the ticket with BZ # please. Let's avoid errata-admin wasting their time...
(In reply to comment #27)
> Thanks Petre.
> Dayong: update the ticket with BZ # please. Let's avoid errata-admin wasting
> their time...
Sure, already done that.