From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b77iX-0006Jc-DU for qemu-devel@nongnu.org; Sun, 29 May 2016 16:53:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b77iT-0002bJ-7s for qemu-devel@nongnu.org; Sun, 29 May 2016 16:53:48 -0400 Received: from mail-lb0-x244.google.com ([2a00:1450:4010:c04::244]:34618) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b77iS-0002b9-W7 for qemu-devel@nongnu.org; Sun, 29 May 2016 16:53:45 -0400 Received: by mail-lb0-x244.google.com with SMTP id t6so7893302lbv.1 for ; Sun, 29 May 2016 13:53:44 -0700 (PDT) References: <1464138802-23503-1-git-send-email-cota@braap.org> <1464138802-23503-14-git-send-email-cota@braap.org> From: Sergey Fedorov Message-ID: <574B56D6.7030707@gmail.com> Date: Sun, 29 May 2016 23:53:42 +0300 MIME-Version: 1.0 In-Reply-To: <1464138802-23503-14-git-send-email-cota@braap.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 13/15] qht: add test-qht-par to invoke qht-bench from 'check' target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" , QEMU Developers , MTTCG Devel Cc: =?UTF-8?Q?Alex_Benn=c3=a9e?= , Paolo Bonzini , Richard Henderson On 25/05/16 04:13, Emilio G. Cota wrote: > diff --git a/tests/test-qht-par.c b/tests/test-qht-par.c > new file mode 100644 > index 0000000..fc0cb23 > --- /dev/null > +++ b/tests/test-qht-par.c > @@ -0,0 +1,56 @@ (snip) > + > +#define TEST_QHT_STRING "tests/qht-bench 1>/dev/null 2>&1 -R -S0.1 -D10000 -N1" > + > +static void test_qht(int n_threads, int update_rate, int duration) > +{ > + char *str; > + int rc; > + > + str = g_strdup_printf(TEST_QHT_STRING "-n %d -u %d -d %d", There needs to be an extra space either at the beginning of the literal string, or at the end of the string defined by TEST_QHT_STRING, so that we don't get "... -N1-n ...". > + n_threads, update_rate, duration); > + rc = system(str); > + g_free(str); > + g_assert_cmpint(rc, ==, 0); > +} > + > Kind regards, Sergey