From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13072 invoked by alias); 15 Oct 2008 11:22:39 -0000 Received: (qmail 12941 invoked by uid 22791); 15 Oct 2008 11:22:38 -0000 X-Spam-Check-By: sourceware.org Received: from eu1sys200aog013.obsmtp.com (HELO eu1sys200aog013.obsmtp.com) (207.126.144.127) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 15 Oct 2008 11:21:54 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob013.postini.com ([207.126.147.11]) with SMTP; Wed, 15 Oct 2008 11:21:44 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D5950DB01 for ; Wed, 15 Oct 2008 11:21:43 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B2B4A4C085 for ; Wed, 15 Oct 2008 11:21:43 +0000 (GMT) Received: from crx595.cro.st.com (crx595.cro.st.com [164.129.44.95]) by mail1.cro.st.com (MOS 3.8.7a) with ESMTP id CQC81273 (AUTH "denis pilat"); Wed, 15 Oct 2008 13:22:45 +0200 (CEST) Message-ID: <48F5D247.4060500@st.com> Date: Wed, 15 Oct 2008 11:22:00 -0000 From: Denis PILAT User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: gdb-patches Subject: [RFA] gdb.mi/mi2-basics.exp re-aligned with mi-basics.exp Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00369.txt.bz2 Is there any reason why we do not test -inferior-tty commands on gdb.mi/mi2-basics.exp ? If no I propose to activate these tests, like in mi-basics.exp. I'll take this opportunity to fix a typo on my previous commit where I wrote gdb.mi/mb-ctor.exp in the place of gdb.cp/mb-ctor.exp. (that was to fix a typo ;) -- Denis 2008-10-15 Denis Pilat * gdb.mi/mi2-basics.exp: Activate -inferior-tty tests like in mi2-basics.exp. (test_setshow_inferior_tty): new function. Index: gdb.mi/mi2-basics.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-basics.exp,v retrieving revision 1.12 diff -u -p -r1.12 mi2-basics.exp --- gdb.mi/mi2-basics.exp 6 Aug 2008 12:52:08 -0000 1.12 +++ gdb.mi/mi2-basics.exp 15 Oct 2008 11:11:49 -0000 @@ -30,7 +30,7 @@ load_lib mi-support.exp set MIFLAGS "-i=mi2" gdb_exit -if [mi_gdb_start] { +if [mi_gdb_start separate-inferior-tty] { continue } @@ -174,8 +174,8 @@ proc test_dir_specification {} { proc test_cwd_specification {} { global mi_gdb_prompt global objdir - global subdir global escapedobjdir + global subdir # Change the working directory, then print the current working directory # Tests: @@ -238,12 +238,51 @@ proc test_path_specification {} { } +proc test_setshow_inferior_tty {} { + global mi_gdb_prompt + global mi_inferior_tty_name + + # Test that the commands, + # -inferior-tty-set + # -inferior-tty-show + # are setting/getting the same data in GDB. + + mi_gdb_test "301-inferior-tty-show" \ + "301\\\^done,inferior_tty_terminal=\"$mi_inferior_tty_name\"" \ + "initial tty is mi_inferior_tty_name" + + mi_gdb_test "302-inferior-tty-set /dev/pts/1" \ + "302\\\^done" \ + "set tty to /dev/pts/1" + + mi_gdb_test "303-inferior-tty-show" \ + "303\\\^done,inferior_tty_terminal=\"/dev/pts/1\"" \ + "tty was set correctly" + + mi_gdb_test "304-inferior-tty-set" \ + "304\\\^done" \ + "set tty to the empty string" + + mi_gdb_test "305-inferior-tty-show" \ + "305\\\^done" \ + "make sure tty is empty" + + mi_gdb_test "306-inferior-tty-set $mi_inferior_tty_name" \ + "306\\\^done" \ + "set tty to mi_inferior_tty_name (the way it was)" + + mi_gdb_test "307-inferior-tty-show" \ + "307\\\^done,inferior_tty_terminal=\"$mi_inferior_tty_name\"" \ + "verify tty is correct" +} + if [test_mi_interpreter_selection] { test_exec_and_symbol_mi_operatons test_breakpoints_deletion test_dir_specification test_cwd_specification test_path_specification + test_setshow_inferior_tty } mi_gdb_exit