From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from jaguar.aricent.com (jaguar.aricent.com [125.19.57.27]) by dpdk.org (Postfix) with ESMTP id ECC696A80 for ; Wed, 12 Aug 2015 12:19:01 +0200 (CEST) Received: from jaguar.aricent.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1F1CB21A6A1 for ; Wed, 12 Aug 2015 15:54:04 +0530 (IST) Received: from GURHYBRID01.AD.ARICENT.COM (unknown [10.203.26.182]) by jaguar.aricent.com (Postfix) with ESMTPS id 0750821A889 for ; Wed, 12 Aug 2015 15:54:04 +0530 (IST) Received: from GURMBXV02.AD.ARICENT.COM (10.203.26.97) by GURMBXV01.AD.ARICENT.COM (10.203.26.96) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Wed, 12 Aug 2015 15:48:39 +0530 Received: from GURMBXV02.AD.ARICENT.COM ([169.254.4.167]) by GURMBXV02.AD.ARICENT.COM ([169.254.4.226]) with mapi id 15.00.1076.000; Wed, 12 Aug 2015 15:48:39 +0530 From: Aashima Arora To: "dev@dpdk.org" Thread-Topic: Getuid check in multiprocess_autotest Thread-Index: AdDU6EDt3Fw4dJ4SSrOmf2CXuIWI1w== Date: Wed, 12 Aug 2015 10:18:38 +0000 Message-ID: <1fcee6849e314dc3a4407f2fe13eac17@GURMBXV02.AD.ARICENT.COM> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.203.8.14] MIME-Version: 1.0 X-TM-AS-MML: enable X-TM-AS-ERS: 10.203.26.182-127.5.254.15 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Getuid check in multiprocess_autotest 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: Wed, 12 Aug 2015 10:19:02 -0000 Hi, This snippet of code is from test_mp_secondary.c /* Run a test_pci call */ if (test_pci() !=3D 0) { printf("PCI scan failed in secondary\n"); if (getuid() =3D=3D 0) /* pci scans can fail as non-root */ { return -1; } } else printf("PCI scan succeeded in secondary\n"); Shouldn't if (getuid() =3D=3D 0) /* pci scans can fail as non-root */ be = getuid()!=3D0 since we are checking if the pci scans fail if user is not ro= ot ? Thanks, Aashima "DISCLAIMER: This message is proprietary to Aricent and is intended solely = for the use of the individual to whom it is addressed. It may contain privi= leged or confidential information and should not be circulated or used for = any purpose other than for what it is intended. If you have received this m= essage in error, please notify the originator immediately. If you are not t= he intended recipient, you are notified that you are strictly prohibited fr= om using, copying, altering, or disclosing the contents of this message. Ar= icent accepts no responsibility for loss or damage arising from the use of = the information transmitted by this email including damage from virus."