New issue
Advanced search Search tips

Issue 796020 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug

Blocking:
issue 748242



Sign in to add a comment

Unit tests fail to build on APFS volume with "hdiutil: create failed - Invalid argument"

Project Member Reported by sdy@chromium.org, Dec 19 2017

Issue description

Chrome Version: r524756
OS: macOS 10.13.2 (17C88) w/ APFS boot volume

What steps will reproduce the problem?
(1) Build the unit_tests target.

What is the expected result?
A successful build.

What happens instead?
    python ../../build/gn_run_binary.py ../../chrome/test/data/safe_browsing/dmg/generate_test_data.sh test_data/chrome/safe_browsing_dmg
    hdiutil: create failed - Invalid argument

The command being run (from modifying the script to echo it) appears to be:

    $ hdiutil create -debug -srcfolder /var/folders/kb/2x7m1_cd2rs4cbpx1p95x6yr00c2my/T/dmg_generate_test_data.XXXXXX.OhZ1pxHy -format UDRO -layout SPUD -volname dmg_UDRO_SPUD test_data/chrome/safe_browsing_dmg/dmg_UDRO_SPUD

Actually, the command omits " -debug", but if I run it *with* that flag, I get lots of output which includes:

    2017-12-18 23:45:22.062 diskimages-helper[12028:43080] DIHelperNBI: filesystem APFS is not compatible with layout SPUD.

I attached the full output. I think that specifying -fs JHFS+ will resolve this, but I'm not sure if it's 100% the right solution because I don't know the intent of this code.
 
hdiutil_output.txt
56.3 KB View Download

Comment 1 by sdy@chromium.org, Dec 19 2017

Labels: -Pri-3 Hotlist-HighSierra Pri-1
Owner: sdy@chromium.org
Status: Assigned (was: Untriaged)
Self-assigning because I think I have a fix (adding `-fs JHFS+` to the commands).

Comment 2 by sdy@chromium.org, Dec 19 2017

Blocking: 748242

Comment 3 by sdy@chromium.org, Dec 19 2017

Cc: -rsesek@chromium.org
Owner: rsesek@chromium.org
Actually, I take it back — there's more going on here. The script passes in specific layouts. rsesek@, thoughts? (I uploaded crrev/c/832790, but that may not be the right fix.)

Comment 4 by rsesek@chromium.org, Dec 19 2017

Your CL looks right to me (though please use .com for links ;-). The tests that use these files will only handle HFS+, so using APFS won't work. The "layouts" refer to the UDIF (DMG) wrapper type and not the underlying filesystem.

Comment 5 by sdy@chromium.org, Dec 19 2017

Will do :).
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/03a5a3057f04f3303ab881dab98c5f0968d41845

commit 03a5a3057f04f3303ab881dab98c5f0968d41845
Author: Sidney San Martín <sdy@chromium.org>
Date: Tue Dec 19 18:24:18 2017

Fix "hdiutil: create failed - Invalid argument" building tests on APFS.

APFS isn't compatible with some layouts, and these tests only handle
HFS+, so specify it instead of inheriting the filesystem from the build
volume.

Bug:  796020 
Change-Id: Id04638a69d6d0130828f025b2d19a79e2fc966f4
Reviewed-on: https://chromium-review.googlesource.com/832790
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Sidney San Martín <sdy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525088}
[modify] https://crrev.com/03a5a3057f04f3303ab881dab98c5f0968d41845/chrome/test/data/safe_browsing/dmg/generate_test_data.sh

Comment 7 by sdy@chromium.org, Dec 20 2017

Cc: rsesek@chromium.org
Owner: sdy@chromium.org
Status: Verified (was: Assigned)

Sign in to add a comment