[dpdk-dev] Getuid check in multiprocess_autotest

Aashima Arora aashima.arora at aricent.com
Wed Aug 12 12:18:38 CEST 2015


Hi,
This snippet of code is from test_mp_secondary.c


    /* Run a test_pci call */
    if (test_pci() != 0) {
        printf("PCI scan failed in secondary\n");
        if (getuid() == 0) /* pci scans can fail as non-root */ {
            return -1;
        }
    } else
        printf("PCI scan succeeded in secondary\n");

Shouldn't  if (getuid() == 0) /* pci scans can fail as non-root */  be getuid()!=0 since we are checking if the pci scans fail if user is not root ?

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 privileged 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 message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."


More information about the dev mailing list