security.SELinuxFileLabel test fails due to missing /etc/hosts.d |
||
Issue descriptionThe security.SELinuxFileLabel Tast test is failing due to /etc/hosts.d not being present on some DUTs. The test possibly needs to be updated to permit it to not exist: 2018/10/03 00:12:36 Started test security.SELinuxFileLabel 2018/10/03 00:12:36 [00:12:35.744] Error at file_label_utils.go:70: Failed file context check for /etc/hosts.d: failed to get file context: no such file or directory http://stainless/browse/chromeos-autotest-results/244590777-chromeos-test/ The test panics after this due to a nil pointer dereference: 2018/10/03 00:12:36 [00:12:35.744] Error at test.go:175: Panic: runtime error: invalid memory address or nil pointer dereference 2018/10/03 00:12:36 [00:12:35.744] Stack trace: chromiumos/tast/testing.runAndRecover.func1(0xc420312a50) /build/asuka/tmp/portage/chromeos-base/tast-local-tests-cros-0.0.1-r199/work/tast-local-tests-cros-0.0.1/tast-base/src/chromiumos/tast/testing/test.go:175 +0xa3 panic(0x6506398aef00, 0x650639bf4be0) /usr/lib/go/x86_64-cros-linux-gnu/src/runtime/panic.go:502 +0x22d chromiumos/tast/local/bundles/cros/security/selinux.CheckContext(0xc420312a50, 0x65063971c3b4, 0xc, 0x65063973168a, 0x24, 0x1, 0x650639972438) /build/asuka/tmp/portage/chromeos-base/tast-local-tests-cros-0.0.1-r199/work/tast-local-tests-cros-0.0.1/src/chromiumos/tast/local/bundles/cros/security/selinux/file_label_utils.go:74 +0xd7 chromiumos/tast/local/bundles/cros/security.SELinuxFileLabel(0x65063997f260, 0xc4201c8cc0, 0xc420312a50) /build/asuka/tmp/portage/chromeos-base/tast-local-tests-cros-0.0.1-r199/work/tast-local-tests-cros-0.0.1/src/chromiumos/tast/local/bundles/cros/security/selinux_file_label.go:142 +0x5b3 The fix for the panic seems trivial; I'll upload a one-line change.
,
Oct 10
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/15cd0118d5a24bf85a01bac51b93fbd4f6f5d518 commit 15cd0118d5a24bf85a01bac51b93fbd4f6f5d518 Author: Qijiang Fan <fqj@chromium.org> Date: Wed Oct 10 04:14:27 2018 tast-tests: skip /etc/hosts.d if not found. Also removes skipNotExists for /etc/hosts since it's a mistake. BUG=b:114172200, chromium:891970 CQ-DEPEND=CL:1267776 TEST=tast run Change-Id: If05c96168c5beaaa91edb0f2f375b0e5bdf38c81 Reviewed-on: https://chromium-review.googlesource.com/1270417 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Qijiang Fan <fqj@google.com> Reviewed-by: Dan Erat <derat@chromium.org> Reviewed-by: Shuhei Takahashi <nya@chromium.org> [modify] https://crrev.com/15cd0118d5a24bf85a01bac51b93fbd4f6f5d518/src/chromiumos/tast/local/bundles/cros/security/selinux_file_label.go
,
Oct 10
Should be fixed in 11144 |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Oct 5