From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 4C600AFDA for ; Tue, 27 May 2014 05:32:43 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 26 May 2014 20:27:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,916,1392192000"; d="scan'208";a="546900066" Received: from fmsmsx103.amr.corp.intel.com ([10.19.9.34]) by orsmga002.jf.intel.com with ESMTP; 26 May 2014 20:32:50 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX103.amr.corp.intel.com (10.19.9.34) with Microsoft SMTP Server (TLS) id 14.3.123.3; Mon, 26 May 2014 20:32:48 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.123.3; Mon, 26 May 2014 20:32:48 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.7]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.7]) with mapi id 14.03.0123.003; Tue, 27 May 2014 11:32:47 +0800 From: "Xu, HuilongX" To: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 12/16] Adding unit tests for VFIO EAL command-line parameter Thread-Index: Ac95XB+0LRz75pvQQHuzrFc7g+2yoQAAClZw Date: Tue, 27 May 2014 03:32:46 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 12/16] Adding unit tests for VFIO EAL command-line parameter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 03:32:43 -0000 Adding unit tests for VFIO interrupt type command-line parameter. We don't know if VFIO is compiled (eal_vfio.h header is internal to Linuxapp EAL), so we check this flag regardless. Signed-off-by: Anatoly Burakov > Test-by: HuilongX Xu Compile pass >>Compile OS: FC20 x86_64 >>Kernel version: 3.13.6-200 >>GCC version: 4.8.2 >>Server: Crownpass --- app/test/test_eal_flags.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index 195a1f5..081b47f 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -768,6 +768,18 @@ test_misc_flags(void) const char *argv11[] =3D {prgname, "--file-prefix=3Dvirtaddr= ", "-c", "1", "-n", "2", "--bas= e-virtaddr=3D0x12345678"}; + /* try running with --vfio-intr INTx flag */ + const char *argv12[] =3D {prgname, "--file-prefix=3Dintr", + "-c", "1", "-n", "2", "--vfio= -intr=3Dlegacy"}; + + /* try running with --vfio-intr MSI-X flag */ + const char *argv13[] =3D {prgname, "--file-prefix=3Dintr", + "-c", "1", "-n", "2", "--vfio= -intr=3Dmsix"}; + + /* try running with --vfio-intr invalid flag */ + const char *argv14[] =3D {prgname, "--file-prefix=3Dintr", + "-c", "1", "-n", "2", "--vfio= -intr=3Dinvalid"}; + if (launch_proc(argv0) =3D=3D 0) { printf("Error - process ran ok with invalid = flag\n"); @@ -820,6 +832,18 @@ test_misc_flags(void) printf("Error - process did not run ok with = --base-virtaddr parameter\n"); return -1; } + if (launch_proc(argv12) !=3D 0) { + printf("Error - process did not run ok with -= -vfio-intr INTx parameter\n"); + return -1; + } + if (launch_proc(argv13) !=3D 0) { + printf("Error - process did not run ok with -= -vfio-intr MSI-X parameter\n"); + return -1; + } + if (launch_proc(argv14) =3D=3D 0) { + printf("Error - process run ok with --vfio-in= tr invalid parameter\n"); + return -1; + } return 0; } #endif -- 1.7.0.7