Project

General

Profile

Actions

Bug #3418

closed

Unit tests requiring root should be skipped when run as normal user

Added by susmit shannigrahi almost 9 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Faces
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

NFD has a few unit tests that needs to be run as root. When run as normal user, these unit tests should be skipped and not throw errors.

../daemon/face/udp-factory.cpp(203): fatal error in "std::shared_ptr<nfd::face::Face> nfd::UdpFactory::createMulticastFace(const Endpoint&, const Endpoint&, const string&)": std::runtime_error: Cannot bind multicast face to virbr0: Operation not permitted
../tests/daemon/mgmt/face-manager-process-config.t.cpp(176): error in "ProcessSectionUdp": exception thrown by parseConfig(CONFIG, false)
../tests/daemon/mgmt/face-manager-process-config.t.cpp(305): error in "ProcessSectionUdpMulticastReinit": exception thrown by parseConfig(CONFIG_WITH_MCAST, false)
../tests/daemon/mgmt/general-config-section.t.cpp(79): error in "UserAndGroupConfig": exception thrown by configFile.parse(CONFIG, true, "test-general-config-section")
../tests/daemon/mgmt/general-config-section.t.cpp(93): error in "NoUserConfig": exception thrown by configFile.parse(CONFIG, true, "test-general-config-section")
Actions

Also available in: Atom PDF