New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 645501 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Sep 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

cros-disks: unittest fails when building with clang.

Project Member Reported by yunlian@chromium.org, Sep 9 2016

Issue description

CC=x86_64-cros-linux-gnu-clang CXX=x86_64-cros-linux-gnu-clang++  FEATURES=test emerge-amd64-generic cros-disks

[ RUN      ] MountManagerTest.MountSucceededWithGivenMountPath
[0909/163346:INFO:mount_manager.cc(171)] Path 'source' is mounted to '/media/removable/test'
[0909/163346:INFO:mount_manager.cc(214)] Unmounted '/media/removable/test'
../../../../../../../../../mnt/host/source/src/platform2/cros-disks/mount_manager_unittest.cc:407: Failure
Value of: mount_state.is_read_only
  Actual: false
Expected: true
terminate called after throwing an instance of 'testing::internal::GoogleTestFailureException'
  what():  ../../../../../../../../../mnt/host/source/src/platform2/cros-disks/mount_manager_unittest.cc:407: Failure
Value of: mount_state.is_read_only
  Actual: false
Expected: true
Error: /var/cache/portage/chromeos-base/cros-disks/out/Default/disks_testrunner: failed with signal SIGIOT|SIGABRT(6)

 
Cc: g...@chromium.org
Cc: yamaguchi@chromium.org yunlian@chromium.org bfreed@chromium.org
Owner: g...@chromium.org
there is a CL to fix this issue here:
https://chromium-review.googlesource.com/#/c/383011


Project Member

Comment 3 by bugdroid1@chromium.org, Sep 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/3d44fa8ebfbea1ed7bdca2f9d60c4ecc0bb2afc9

commit 3d44fa8ebfbea1ed7bdca2f9d60c4ecc0bb2afc9
Author: George Burgess IV <gbiv@chromium.org>
Date: Thu Sep 08 06:47:21 2016

cros-disks: Move a check above Unmount().

The call to `UnmountAll()` in this test was removing the cache entry for
`source_path_`. When we called `GetMountStateFromCache`, it returned
false and left `mount_state` untouched, so `mount_state.is_read_only`
never got initialized. Moving the cache lookup/check above
`UnmountAll()` fixes this issue.

This patch also adds `EXPECT_TRUE`s around similar calls to
`GetMountStateFromCache`, so we can catch issues like this more easily in
the future.

BUG= chromium:645501 
TEST=Test now passes on oak, rather than being flaky.

Change-Id: I86781a435e62cb969388a6fb84ab0e4050a4fb70
Reviewed-on: https://chromium-review.googlesource.com/383011
Commit-Ready: George Burgess <gbiv@chromium.org>
Tested-by: George Burgess <gbiv@chromium.org>
Reviewed-by: Tatsuhisa Yamaguchi <yamaguchi@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/3d44fa8ebfbea1ed7bdca2f9d60c4ecc0bb2afc9/cros-disks/mount_manager_unittest.cc

Comment 4 by g...@chromium.org, Sep 12 2016

Status: Fixed (was: Untriaged)

Comment 5 by dchan@chromium.org, Oct 7 2016

Labels: VerifyIn-55

Comment 6 by dchan@google.com, Nov 19 2016

Labels: VerifyIn-56

Comment 7 by dchan@google.com, Jan 21 2017

Labels: VerifyIn-57

Comment 8 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 9 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 10 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61
Status: Verified (was: Fixed)
Closing. Please reopen it if its not fixed. Thanks!

Sign in to add a comment