diff options
author | Maciej Żenczykowski <maze@google.com> | 2021-06-14 20:28:37 +0000 |
---|---|---|
committer | Maciej Zenczykowski <maze@google.com> | 2021-06-22 03:38:51 +0000 |
commit | bc0954cad3839951b81f11ee410a0189eb4b3b15 (patch) | |
tree | ee3125462baac37bf751416936b002f84088ad96 | |
parent | 9e41e9fba05f14596e682cb4a504b96bec7cda92 (diff) | |
download | netd-bc0954cad3839951b81f11ee410a0189eb4b3b15.tar.gz |
add better comment for NetdSELinuxTest::CheckProperMTULabels test
Test: N/A, comments only.
Bug: 185962988
Bug: 190048216
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Original-Change: https://android-review.googlesource.com/1730981
Merged-In: Ib23710505386960d5d436e1afc89d7c1c33e9ee2
Change-Id: Ib23710505386960d5d436e1afc89d7c1c33e9ee2
-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 |