New issue
Advanced search Search tips

Issue 915539 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Port platform_FilePerms to Tast

Project Member Reported by derat@chromium.org, Dec 16

Issue description

I'm porting the platform_FilePerms Autotest test to Tast. The Autotest test both checks permission/ownership of various directories and parses /etc/mtab and /var/log/mount_options.log and compares their mounts against a baseline. I'm planning to split it into separate security.MountPerms and security.Mtab tests, since it's really checking two different things and since it's pretty long.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/ba1aca044858e847ccc1c98791eb560d8d3035bf

commit ba1aca044858e847ccc1c98791eb560d8d3035bf
Author: Daniel Erat <derat@chromium.org>
Date: Tue Dec 18 08:42:42 2018

tast: Add filesetup.ReadOnlyRootPartition.

Add a new ReadOnlyRootPartition function in the filesetup
package that security tests can call to check if the root
partition is mounted read-only. Tests can use this to fail
quickly if rootfs verification seems to be disabled.

BUG=chromium:915539
TEST=used in conjunction with other tests on DUTs that have
     rootfs verification enabled and disabled

Change-Id: I417b1fe6f01433fb9982fc765cb74f31988822d8
Reviewed-on: https://chromium-review.googlesource.com/1378918
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[modify] https://crrev.com/ba1aca044858e847ccc1c98791eb560d8d3035bf/src/chromiumos/tast/local/bundles/cros/security/filesetup/filesetup.go

Project Member

Comment 2 by bugdroid1@chromium.org, Dec 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/3bc5626cb6fb2fa05b36c3e8c50d552192374eb8

commit 3bc5626cb6fb2fa05b36c3e8c50d552192374eb8
Author: Daniel Erat <derat@chromium.org>
Date: Tue Dec 18 08:42:43 2018

tast-tests: Add security.SystemDirs.

Add a new security.SystemDirs test that replicates logic
from the platform_FilePerms Autotest test to check ownership
and permissions of system directories.

BUG=chromium:915539
TEST=ran new test on various DUTs

Change-Id: I88d66df91d0a343fc1a5d3d4860aa96943368c47
Reviewed-on: https://chromium-review.googlesource.com/1378919
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>

[add] https://crrev.com/3bc5626cb6fb2fa05b36c3e8c50d552192374eb8/src/chromiumos/tast/local/bundles/cros/security/system_dirs.go

Project Member

Comment 3 by bugdroid1@chromium.org, Dec 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/0833f1856e1d52995e822f8734d56ad20a3a4a03

commit 0833f1856e1d52995e822f8734d56ad20a3a4a03
Author: Daniel Erat <derat@chromium.org>
Date: Fri Dec 28 21:01:26 2018

tast-tests: Add security.Mtab.

Add a new security.Mtab test that replicates logic from the
platform_FilePerms Autotest test to compare /etc/mtab and
/var/log/mount_options.log against a baseline.

BUG=chromium:915539
TEST=ran on DUTs with and without rootfs verification, and
     with user session started and stopped
CQ-DEPEND=CL:1388087

Change-Id: Idb8a9db8062cc2afc3647b22e8e9798ea17d7e82
Reviewed-on: https://chromium-review.googlesource.com/1378920
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[add] https://crrev.com/0833f1856e1d52995e822f8734d56ad20a3a4a03/src/chromiumos/tast/local/bundles/cros/security/mtab.go

Project Member

Comment 4 by bugdroid1@chromium.org, Dec 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/0c3bcdc1b000a6cc911bbd27d8a07ee6edfdeb96

commit 0c3bcdc1b000a6cc911bbd27d8a07ee6edfdeb96
Author: Daniel Erat <derat@chromium.org>
Date: Fri Dec 28 21:01:25 2018

tast-tests: Add security.SystemDirs to CQ.

Add the security.SystemDirs local test to the Chrome OS
Commit Queue.

BUG=chromium:915539
TEST=no failures over last 14 days on release builders

Change-Id: Ia732d43b5ca0e5ff20bd9daa5283cd0b2c75305a
Reviewed-on: https://chromium-review.googlesource.com/1390948
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[modify] https://crrev.com/0c3bcdc1b000a6cc911bbd27d8a07ee6edfdeb96/src/chromiumos/tast/local/bundles/cros/security/system_dirs.go

Would you mind checking if security.Mtab seems to be stable on release builders now? :-) Thanks!
Passed except one board/model. (The details can be found at b:122518140).

Sign in to add a comment