From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 4E700385BF81 for ; Sat, 18 Apr 2020 02:58:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4E700385BF81 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id C16441E827; Fri, 17 Apr 2020 22:58:16 -0400 (EDT) Subject: Re: [PATCH v3 4/9] [gdb/testsuite] use args as lib list for jit-elf tests To: Mihails Strasuns , gdb-patches@sourceware.org References: <166773> <20200331171356.26126-1-mihails.strasuns@intel.com> <20200331171356.26126-4-mihails.strasuns@intel.com> From: Simon Marchi Message-ID: <49eaa7a6-b124-c15b-b1fe-17a7d72833ff@simark.ca> Date: Fri, 17 Apr 2020 22:58:16 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200331171356.26126-4-mihails.strasuns@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Apr 2020 02:58:18 -0000 On 2020-03-31 1:13 p.m., Mihails Strasuns via Gdb-patches wrote: > @@ -106,49 +106,38 @@ int mypid; > int > MAIN (int argc, char *argv[]) > { > - /* These variables are here so they can easily be set from jit.exp. */ > - const char *libname = NULL; > - int count = 0, i, fd; > - struct stat st; > - > + int i; > alarm (300); > + char* fake_argv[10]; // used as backing storage for GDB to populate argv Space goes before the start: `char *fake_argv`. For comments, please follow the usual style: - Capital letter and period (two spaces after the final period). - On the line before, not the same line. - /* */, not // > @@ -146,31 +149,23 @@ proc one_jit_test {count match_str reattach} { > } > } > > -if {[compile_jit_test jit.exp "" {}] < 0} { > - return > -} > -one_jit_test 1 "${hex} jit_function_0000" 0 > -one_jit_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001" 0 > +compile_jit_main "" {} > +compile_n_jit_so 2 I mentioned ealier: if we fail to compile the test program, we don't want to execute the rest of the test case. That's what the previous code did. Can you keep that? Simon