Hi Ben On 4 March 2016 at 23:35, Ben Elliston <b...@air.net.au> wrote: > On Fri, Mar 04, 2016 at 10:20:57PM +0100, Yvan Roux wrote: > >> there is an issue when remote testing testcases which check an >> output pattern with an explicit '\n' at the end. rsh_exec >> explicitly removes it to behave as 'exec', I don't know if something >> changed in 'exec' behavior since these lines were checked in in 2001 >> or if it still removes a '\n' in some configs, > > Tcl's exec has always stripped the trailing newline. This is why the > -keepnewline option exists.
Yes indeed, thanks I'm still in a Tcl learning process ! ;) So, after digging more to understand why we have the issue while exec removes the trailing newline, it occurs when doing native testing, unix_load calls remote_spawn, which calls standard_wait and then remote_expect, I still have difficulties to understand exactly what appends in this part (spawn/expect) but what seems clear is that we don't use Tcl exec here, thus the trailing newline of the testcase output is not removed, and as when we're doing remote testing rsh_exec is designed to behave as Tcl exec we have a mismatch between outputs of the same testcase in native and remote context. Cheers, Yvan _______________________________________________ DejaGnu mailing list DejaGnu@gnu.org https://lists.gnu.org/mailman/listinfo/dejagnu