mac/arm64: recognize “Apple M1” as a valid CPU vendor [crashpad/crashpad : main]

126 views
Skip to first unread message

Mark Mentovai (Gerrit)

unread,
Jun 22, 2021, 10:56:09 AM6/22/21
to Nico Weber, crashp...@chromium.org

Attention is currently required from: Nico Weber.

Patch set 1:Commit-Queue +1

View Change

    To view, visit change 2976787. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I6ead87ebe9aa078ef9a95e5bcc6a9e5ca8c3b55a
    Gerrit-Change-Number: 2976787
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
    Gerrit-Attention: Nico Weber <tha...@chromium.org>
    Gerrit-Comment-Date: Tue, 22 Jun 2021 14:56:03 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Nico Weber (Gerrit)

    unread,
    Jun 22, 2021, 11:01:16 AM6/22/21
    to Mark Mentovai, Nico Weber, Crashpad LUCI CQ, crashp...@chromium.org

    Attention is currently required from: Mark Mentovai.

    Patch set 1:Code-Review +1

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        Thanks for the quick fix!

        If it's alright with you, please wait with disabling the test downstream until the mac/arm tester is on the main waterfall.

    To view, visit change 2976787. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I6ead87ebe9aa078ef9a95e5bcc6a9e5ca8c3b55a
    Gerrit-Change-Number: 2976787
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
    Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
    Gerrit-Comment-Date: Tue, 22 Jun 2021 15:01:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Mark Mentovai (Gerrit)

    unread,
    Jun 22, 2021, 11:21:26 AM6/22/21
    to Nico Weber, Crashpad LUCI CQ, crashp...@chromium.org

    Patch set 1:Commit-Queue +2

    View Change

    1 comment:

    • Patchset:

      • Patch Set #1:

        Thanks for the quick fix!

        If it's alright with you, please wait with disabling the test downstream until the mac/arm tester is on the main waterfall.

      • OK, let’s leave the bug open to track un-disabling until then.

    To view, visit change 2976787. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I6ead87ebe9aa078ef9a95e5bcc6a9e5ca8c3b55a
    Gerrit-Change-Number: 2976787
    Gerrit-PatchSet: 1
    Gerrit-Owner: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
    Gerrit-Comment-Date: Tue, 22 Jun 2021 15:21:20 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
    Gerrit-MessageType: comment

    Crashpad LUCI CQ (Gerrit)

    unread,
    Jun 22, 2021, 11:28:25 AM6/22/21
    to Mark Mentovai, Nico Weber, crashp...@chromium.org

    Crashpad LUCI CQ submitted this change.

    View Change

    Approvals: Nico Weber: Looks good to me Mark Mentovai: Commit
    mac/arm64: recognize “Apple M1” as a valid CPU vendor

    The DTK reported “Apple processor” in this spot, but shipping hardware
    now seems to use “Apple M1”. The DTK is no longer relevant, but for some
    degree of future-proofing, look for “Apple ” as prefix in the test.

    Test: snapshot_test SystemSnapshotMacTest.CPUVendor
    Bug: chromium:1222625
    Change-Id: I6ead87ebe9aa078ef9a95e5bcc6a9e5ca8c3b55a
    Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2976787
    Reviewed-by: Nico Weber <tha...@chromium.org>
    Commit-Queue: Mark Mentovai <ma...@chromium.org>
    ---
    M BUILD.gn
    M snapshot/BUILD.gn
    M snapshot/mac/system_snapshot_mac_test.cc
    M snapshot/snapshot_test.gyp
    4 files changed, 6 insertions(+), 3 deletions(-)

    diff --git a/BUILD.gn b/BUILD.gn
    index dfa7b1f..666784a 100644
    --- a/BUILD.gn
    +++ b/BUILD.gn
    @@ -152,7 +152,7 @@
    test("crashpad_snapshot_test") {
    deps = [
    "snapshot:snapshot_test",
    - "test:googletest_main",
    + "test:googlemock_main",
    ]
    }

    diff --git a/snapshot/BUILD.gn b/snapshot/BUILD.gn
    index 70e4a31..2d613b6 100644
    --- a/snapshot/BUILD.gn
    +++ b/snapshot/BUILD.gn
    @@ -433,6 +433,7 @@
    "../compat",
    "../minidump:format",
    "../test",
    + "../third_party/googletest:googlemock",
    "../third_party/googletest:googletest",
    "../third_party/mini_chromium:base",
    "../util",
    diff --git a/snapshot/mac/system_snapshot_mac_test.cc b/snapshot/mac/system_snapshot_mac_test.cc
    index bdbc296..0cf1a7c 100644
    --- a/snapshot/mac/system_snapshot_mac_test.cc
    +++ b/snapshot/mac/system_snapshot_mac_test.cc
    @@ -19,6 +19,7 @@
    #include <string>

    #include "build/build_config.h"
    +#include "gmock/gmock.h"
    #include "gtest/gtest.h"
    #include "snapshot/mac/process_reader_mac.h"
    #include "test/errors.h"
    @@ -90,7 +91,7 @@
    FAIL() << "cpu_vendor " << cpu_vendor;
    }
    #elif defined(ARCH_CPU_ARM64)
    - EXPECT_EQ(cpu_vendor, "Apple processor");
    + EXPECT_THAT(cpu_vendor, testing::StartsWith("Apple "));
    #else
    #error port to your architecture
    #endif
    diff --git a/snapshot/snapshot_test.gyp b/snapshot/snapshot_test.gyp
    index a4d4d9e..361a33a 100644
    --- a/snapshot/snapshot_test.gyp
    +++ b/snapshot/snapshot_test.gyp
    @@ -59,8 +59,9 @@
    'snapshot.gyp:crashpad_snapshot',
    '../client/client.gyp:crashpad_client',
    '../compat/compat.gyp:crashpad_compat',
    - '../test/test.gyp:crashpad_googletest_main',
    + '../test/test.gyp:crashpad_googlemock_main',
    '../test/test.gyp:crashpad_test',
    + '../third_party/googletest/googlemock.gyp:googlemock',
    '../third_party/googletest/googletest.gyp:googletest',
    '../third_party/mini_chromium/mini_chromium.gyp:base',
    '../util/util.gyp:crashpad_util',

    To view, visit change 2976787. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I6ead87ebe9aa078ef9a95e5bcc6a9e5ca8c3b55a
    Gerrit-Change-Number: 2976787
    Gerrit-PatchSet: 2
    Gerrit-Owner: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: Crashpad LUCI CQ <crashpa...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
    Gerrit-MessageType: merged
    Reply all
    Reply to author
    Forward
    0 new messages