diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-06-23 01:10:20 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-06-23 01:10:20 +0000 |
commit | 4965842534eb41695284aa9abdf3fd5e1af3ea36 (patch) | |
tree | ee3125462baac37bf751416936b002f84088ad96 | |
parent | 5b6d2eadc173cb91c5a5384540d2b2d30e2f9af0 (diff) | |
parent | bc0954cad3839951b81f11ee410a0189eb4b3b15 (diff) | |
download | netd-4965842534eb41695284aa9abdf3fd5e1af3ea36.tar.gz |
Snap for 7482982 from bc0954cad3839951b81f11ee410a0189eb4b3b15 to sc-release
Change-Id: I0890f454bafe634aa28894d22c510b620bce693f
-rw-r--r-- | tests/netd_test.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/netd_test.cpp b/tests/netd_test.cpp index 872c8a41..fcd538e3 100644 --- a/tests/netd_test.cpp +++ b/tests/netd_test.cpp @@ -48,6 +48,22 @@ TEST(NetUtilsWrapperTest, TestFileCapabilities) { ASSERT_EQ(ENODATA, errno); } +// If this test fails most likely your device is lacking device/oem specific +// selinux genfscon rules, something like .../vendor/.../genfs_contexts: +// genfscon sysfs /devices/platform/.../net u:object_r:sysfs_net:s0 +// Easiest debugging is via: +// adb root && sleep 1 && adb shell 'ls -Z /sys/class/net/*/mtu' +// and look for the mislabeled item(s). +// Everything should be 'u:object_r:sysfs_net:s0' +// +// Another useful command is: +// adb root && sleep 1 && adb shell find /sys > dump.out +// or in particular: +// adb root && sleep 1 && adb shell find /sys | egrep '/net$' +// which might (among other things) print out something like: +// /sys/devices/platform/11110000.usb/11110000.dwc3/gadget/net +// which means you need to add: +// genfscon sysfs /devices/platform/11110000.usb/11110000.dwc3/gadget/net u:object_r:sysfs_net:s0 TEST(NetdSELinuxTest, CheckProperMTULabels) { // Since we expect the egrep regexp to filter everything out, // we thus expect no matches and thus a return code of 1 |