Can dejagnu follow a fork call?

View: New views
3 Messages — Rating Filter:   Alert me  

Can dejagnu follow a fork call?

by Don BREAZEAL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi
I am new to dejagnu.  I've installed 1.4.4 on a Linux system (suse10,
x86_64) and it appears to be working for the calc example.

I want to use dejagnu for testing of an interactive command line
program.  This program is invoked using a driver (implemented in C),
which does some command line processing, and eventually invokes Java.

When I implemented a test for this program, the only output that seems
to come from it is the copyright header.  This header is printed by the
driver, before invoking Java.

I can run the equivalent expect statements with the expect command
interpreter (5.43.0) and it all works fine, so I don't think there's a
problem with my expect code.

My conclusion is that there is something about dejagnu that causes it to
lose the I/O connection to the forked child process (the Java part).  I
think my 'send' and 'expect' commands are just talking to the driver,
not the Java command line program that I want to test.

Is that a correct conclusion?

Is there any way to configure dejagnu to work with a process and its
children?

thanks
--Don



_______________________________________________
DejaGnu mailing list
DejaGnu@...
http://lists.gnu.org/mailman/listinfo/dejagnu

Re: Can dejagnu follow a fork call?

by Ben Elliston-37 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Don

> My conclusion is that there is something about dejagnu that causes
> it to lose the I/O connection to the forked child process (the Java
> part).  I think my 'send' and 'expect' commands are just talking to
> the driver, not the Java command line program that I want to test.

That does not sound right to me; after all, the GDB testsuite involves
running inferior programs under the debugger.

Can you give an example?

Ben


_______________________________________________
DejaGnu mailing list
DejaGnu@...
http://lists.gnu.org/mailman/listinfo/dejagnu

Re: Can dejagnu follow a fork call?

by Don BREAZEAL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the reply Ben.  At this point I've scrapped my dejagnu plans
and moved on to a different solution.  Maybe we can revisit this
sometime in the future.
--Don

Ben Elliston wrote:

> Hi Don
>
>> My conclusion is that there is something about dejagnu that causes
>> it to lose the I/O connection to the forked child process (the Java
>> part).  I think my 'send' and 'expect' commands are just talking to
>> the driver, not the Java command line program that I want to test.
>
> That does not sound right to me; after all, the GDB testsuite involves
> running inferior programs under the debugger.
>
> Can you give an example?
>
> Ben


_______________________________________________
DejaGnu mailing list
DejaGnu@...
http://lists.gnu.org/mailman/listinfo/dejagnu