Description of problem:
I have a test which requires to get TERM env in c program, it should return a "xterm", "linux" or other valid values, but in beaker, I only got a NULL. (In old RHTS, it returns "linux")
The simple test program is:
strenv = getenv("TERM");
if (NULL == strenv)
printf("can't get env of \"TERM\"\n");
In RHTS, it returns "linux": http://rhts.redhat.com/cgi-bin/rhts/jobs.cgi?id=156618&type=Single
In Beaker, it returns NULL: https://beaker.engineering.redhat.com/jobs/307
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. use a simple test in cvs: /kernel/distribution/ltp/debug
getenv("TERM") returns NULL
getenv("TERM") returns a valid value.
This is caused by diffences between legacy RHTS and new harness.
The old tests were nothing more but a script, which was executed at boot time according to it's init.d "record".
However, the new harness runs as a daemon and the process does not have a PTY attached and in most cases such PTY would be useless.
The daemonized version has e.g the advantage of being able to connect to console and login, while the test is running to see what's going on, even when the network is down.
Should I create a PTY by default anyway just to keep it backwards compatible?
Should I simply set the TERM variable without creating a PTY?
Any better option?
/me is going to ask at tech-list.
Fixed in git: http://git.fedorahosted.org/git/?p=beah.git;a=commit;h=8af808c13c6ff8222cbbb7d409c4f0e22e567f4b
Version: beah-0.6.3-1 in brew/koji.
(In reply to comment #2)
> Fixed in git:
> Version: beah-0.6.3-1 in brew/koji.
> Verified: J:2226
can you talk to Auto-Test maintainer lmr (<email@example.com>) Lucas Rodrigues. Jeff Burke thought that he has addressed this situation and you could benefit from his experience.