Commit graph

127 commits

Author SHA1 Message Date
Yi Kong
810d41a774 Fix -Wunused-variable compiler warning
Test: presubmit
Change-Id: I146d3435fe76da7f300452a14b62ce430c38ae36
2023-12-06 14:03:58 +09:00
Treehugger Robot
abe08ca9fe Merge "Refactored automotiveCanV1.0_fuzzer" into main 2023-11-15 06:00:41 +00:00
kunal rai
f247dafd11 Refactored automotiveCanV1.0_fuzzer
The following are the updates to the fuzzer:
1. Randomised order of API calls using fdp.
2. Added New APIs.

exec/s: 35
Test: ./automotiveCanV1.0_fuzzer
Bug: 301907840

Change-Id: I66b4622bcf93ac5fbead522f6991a62361b85dda
2023-10-09 11:25:51 +05:30
Ryan Prichard
608781cfd7 Merge "Use std::filesystem when libc++ is new enough" into main am: 37d5948144
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2758145

Change-Id: I6ee358c40c615d29aa7dc6e7bcecbdebc7394327
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-21 22:16:04 +00:00
Ryan Prichard
680fd80663 Use std::filesystem when libc++ is new enough
_LIBCPP_VERSION in external/libcxx is 8000. When _LIBCPP_VERSION is
newer, assume it's the new libc++ toolchain prebuilt, which has a
finalized std::filesystem, and use std::filesystem instead. To make
Soong happy, keep the android.hardware.automotive@libc++fs library for
now but stub out the C++ source files and make the
android::hardware::automotive::filesystem namespace an alias for
std::filesystem.

Bug: 152067309
Bug: 175635923
Test: treehugger
Test: m android.hardware.automotive.can@1.0-service
Test: m android.hardware.automotive@libc++fs
Change-Id: I7aede74cda0122434d972a075d7c7a9933845450
2023-09-20 14:46:18 -07:00
Steven Moreland
957a032a33 Merge "Explicit init .rc user." am: 51aec020ef am: 555d54d1a2 am: a197855f32
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2528129

Change-Id: I9a1e84a186e801e2bc74ff25a5f3e8ee377a002c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12 03:16:09 +00:00
Steven Moreland
f13464d1dd Explicit init .rc user.
Set the user explicitly.

Bug: 276813155
Test: boot
Change-Id: Ifd5cbacd308ee74de64dd12741771f01abc5b1d5
2023-04-10 20:43:50 +00:00
Alex Buynytskyy
ec1198d941 UpsideDownCake is now 34
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
Change-Id: I832ab7a8b5445ba85e27bbcf5be64906bfa0e5be
2023-04-07 23:41:20 +00:00
Treehugger Robot
b6679850f2 Merge "Updated fuzz_config in Android.bp file" am: bbf290bb5d am: 4d798fd44a am: 174b8a0186
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2505238

Change-Id: I9692704ed4966beadb0165174ed04314d766d67b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-31 07:05:20 +00:00
Ayushi Khopkar
f19832876a Updated fuzz_config in Android.bp file
Added new fields in fuzz_config like - hotlists,
description, vector, service_privilege, users, fuzzed_code_usage, etc.

Bug: 271384401
Test: Build automotiveCanV1.0_fuzzer

Change-Id: I305cdd1b0a990bd72788c7562197e190a4256f38
2023-03-23 14:19:53 +05:30
Treehugger Robot
c00be16811 Merge "Fix the missing std" am: 39337adcc9 am: a4ab908631 am: d65d1a6b64
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2468920

Change-Id: If2e904f1f3bb8a1a3b7b63d67ddbee2392baad7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-03 17:37:23 +00:00
zijunzhao
ab9e5bcdea Fix the missing std
Bug: b/239662094
Test: enable Wunqualified-std-cast-call locally and run m to build
Change-Id: Ifc51be5ee13296e9711c91ffac320d1cc7048ff0
2023-03-03 03:42:02 +00:00
TreeHugger Robot
7fa48f6e13 Merge "Move canhalconfigurator-aidl to /system_ext" 2023-02-01 21:31:21 +00:00
Treehugger Robot
ec103d9a10 Merge "Move canhalconfigurator to /system_ext" am: 02cbb00444 am: 7fd971398c am: 389d9a2904
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2400612

Change-Id: If80d54b5fff599086ab7d4860cad666c048dea5a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-01 03:28:08 +00:00
Philip Chen
50074e29ff Move canhalconfigurator-aidl to /system_ext
Let's move canhalconfigurator-aidl from the system partition to the
system_ext partition to share a common system image across internal
AAOS builds.

Bug: 263516803
Test: build and confirm the files are relocated
Change-Id: I54a65f49daff1ff4730056bc83b7dc57c836509d
2023-01-23 23:14:25 +00:00
Philip Chen
402ae986f0 Move canhalconfigurator to /system_ext
Let's move canhalconfigurator from the system partition to the
system_ext partition to share a common system image across internal
AAOS builds.

Bug: 263516803
Test: build and confirm the files are relocated
Change-Id: Ibd68797aa9356e3e80662442434d939eca955576
2023-01-23 23:07:39 +00:00
Chris Weir
864bcb9e7a Fix hwasan error for CAN HAL
Hardware address sanitizer is complaining about parseConfigFile. I
suspect the issue is that protobuf is taking a pointer to an ifstream
rather than a reference, unique_ptr, or shared_ptr. I _think_ this
results in some sort of attempt to access the stream after it's closed.
In order to get around this, I moved ownership of the stream up one
level so that the stream stays open for longer.

Bug: 263769296
Test: canhalconfigurator-aidl doesn't crash on seahawk_hwasan-userdebug
Change-Id: I937d501a4759f0781304c518b518beaf8c6fed68
2023-01-06 14:13:58 -08:00
Chris Weir
c847a3cfda Add warning about AIDL CAN HAL
Have the HIDL versions of libcanhaltools and canhalconfigurator provide
a warning message directing the viewer to use the AIDL version.

Bug: 170405615
Test: Build seahawk with AIDL CAN HAL and HIDL canhalconfigurator,
observe warning message.

Change-Id: I83a3dcedbdc5eafd3804e60950d0d8788cd6eddb
2022-12-16 10:49:41 -08:00
Chris Weir
d76e07e604 AIDL CAN HAL
CAN HAL: now HIDL-free with 100% of your daily value of AIDL.

Bug: 170405615
Test: atest CanControllerAidlTest
Test: manually test slcan and socketcan hardware
Change-Id: I06bbb1379f4385e89757722c0276009b54cc7255
2022-11-29 15:31:10 -08:00
Tomasz Wasilczyk
8bfa197e89 Merge "Implement waiting for IPv4 address for an interface" 2022-07-22 02:45:29 +00:00
Tomasz Wasilczyk
2b162da56a Implement waiting for IPv4 address for an interface
Bug: 239577572
Test: build, flash, check Internet
Change-Id: I339d6ae595fac13690a90d98ef82a6659819406c
2022-07-21 21:20:28 +00:00
Keith Mok
6355aa9072 libnl++: add new func to send raw data with len
Some netlink attrib does not ending with null char.
Currently req.add string will always sending ending null character.
Add a new func called addBuffer that does not send ending null
character.

Bug: 238794143
Test: build, manual test
Change-Id: If51380cab95b2ae725673301b429b9e9889c5b0a
2022-07-13 16:49:02 +00:00
Keith Mok
acbc2ee483 libnl++: Fix alignment problem
The memory alignemnt calculation is incorrect when adding request
with uint8_t data type.

Bug: 238756438
Test: Build, manual test
Change-Id: I4dae7ad337c6b8186e4ef0ae1fb5eb1e1463447d
2022-07-13 03:32:25 +00:00
Treehugger Robot
381be8b04a Merge "Update owners for hardware/interfaces." am: 19410a1fc3 am: 50e113f80c am: a284f1fd50 am: 57fb6accf2 am: 6c0a42df93
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2116014

Change-Id: Ifc39b8b9539b94468104ce655b684c98cd6c9087
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 00:26:28 +00:00
Treehugger Robot
a284f1fd50 Merge "Update owners for hardware/interfaces." am: 19410a1fc3 am: 50e113f80c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2116014

Change-Id: I65978ced2a0ccc01aac5c94b9b014fdc664c9d5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 23:12:33 +00:00
Selim Gurun
75d67ca355 Update owners for hardware/interfaces.
evs and vehicle owners are already good, so did not touch.

Test: echo 'in TH we trust!'
Bug: yes, it bugs me

Change-Id: I6168956f7e21488f5fa6c4f0019c0885d074ba0e
2022-06-04 01:43:52 +00:00
Chris Weir
b8069b37ab Fix VtsHalCanBusV1_0TargetTest
VtsHalCanBusV1_0TargetTest needs buses brought up. On GSI images,
canhalctrl doesn't exist, so we have to attempt it on our own.

Bug: 213841914
Test: VtsHalCanBusV1_0TargetTest
Change-Id: I5553a95d047aef8e9d8e1eb6092cddea98f6d81e
2022-04-23 00:53:43 +00:00
Chris Weir
9069825c4d Fix VtsHalCanBusV1_0TargetTest
VtsHalCanBusV1_0TargetTest needs buses brought up. On GSI images,
canhalctrl doesn't exist, so we have to attempt it on our own.

Bug: 213841914
Test: VtsHalCanBusV1_0TargetTest
Change-Id: I5553a95d047aef8e9d8e1eb6092cddea98f6d81e
2022-04-22 14:12:29 -07:00
Chris Weir
a811822a7b Unregistering HIDL interfaces breaks VTS
Based on some back and forth on the internal IDL discuss group, it
sounds like we can't unregister interfaces anymore if they're defined in
the manifest. The CAN interface behind the HIDL interface will still be
taken down correctly, but this will get rid of the failing attempt to
bring down the HIDL interface.

Bug: 213841914
Bug: 213843613
Test: VtsHalCanBusV1_0TargetTest
Test: VtsHalCanControllerV1_0TargetTest
Test: VtsHalCanBusVirtualV1_0TargetTest
Change-Id: Iae4d6a650c30adacdc7c51140e0295915b516833
(cherry picked from commit d349f1d521)
2022-04-19 16:23:25 +00:00
Chris Weir
d349f1d521 Unregistering HIDL interfaces breaks VTS
Based on some back and forth on the internal IDL discuss group, it
sounds like we can't unregister interfaces anymore if they're defined in
the manifest. The CAN interface behind the HIDL interface will still be
taken down correctly, but this will get rid of the failing attempt to
bring down the HIDL interface.

Bug: 213841914
Bug: 213843613
Test: VtsHalCanBusV1_0TargetTest
Test: VtsHalCanControllerV1_0TargetTest
Test: VtsHalCanBusVirtualV1_0TargetTest
Change-Id: Iae4d6a650c30adacdc7c51140e0295915b516833
2022-04-18 15:41:11 -07:00
Chris Weir
8e4e25e04c Don't crash on pollerr
I should have checked for <=0, not == 0. Oops

Bug: 224850481
Test: TCU and HU don't burst into flames when pollerr happens.
Change-Id: I1b1d0855a588d065d29cad31b2ca40e4d981e086
2022-03-22 11:07:55 -07:00
Chris Weir
64e3ec2155 Add clearPollErr to Socket
nlproxy gets stuck if a POLLERR is encountered, and I found a CL that
suggests the only way to clear the error is to recv (which should return
zero bytes in theory) on that socket.

Bug: 224850481
Test: nlproxy works
Change-Id: Ib1420ce542deeb35977223baf787bdee1b125110
2022-03-16 13:11:57 -07:00
Treehugger Robot
3059790c1c Merge "[LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces" am: 509a0223c1 am: 1421c4a7ef am: 5f87861f2b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2007830

Change-Id: I9b9001502393e10c007af1b128231aa05e08f554
2022-03-04 02:39:35 +00:00
Treehugger Robot
1421c4a7ef Merge "[LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces" am: 509a0223c1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2007830

Change-Id: I765a7a945896e8e9eaf74412a13c7498f5c84e78
2022-03-04 01:54:36 +00:00
Bob Badour
8fbe33dfbe [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  automotive/can/1.0/default/tests/fuzzer/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: Id04cc3a1ae434664be40944cc86c8ffc2e19db24
2022-03-03 10:37:24 -08:00
Cory Barker
d0625cc329 Merge "Added automotiveCanV1.0_fuzzer" am: 20b69d76d0 am: 96c8da665f am: a748a047c7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1991533

Change-Id: I410a9987c66dd483b0c40dceb07296961a482ebf
2022-03-02 19:31:38 +00:00
Cory Barker
96c8da665f Merge "Added automotiveCanV1.0_fuzzer" am: 20b69d76d0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1991533

Change-Id: Iccc4e6a9349cc2fc865dfdbd608462673318e964
2022-03-02 18:46:12 +00:00
Ayushi Khopkar
3921199e05 Added automotiveCanV1.0_fuzzer
Test: adb shell /data/fuzz/${TARGET_ARCH}/automotiveCanV1.0_fuzzer/automotiveCanV1.0_fuzzer
Bug: 187130380

Change-Id: Iaadc96da6f6114512674d797e6cbc74b5405da14
2022-02-18 12:53:01 +05:30
Ji Soo Shin
9035e7c6f0 Revert "Revert "Move libprotocan to hardware/interfaces/automotive domain""
Fixed the offending line :(

This reverts commit 7f6d54c371.

Bug: 213244647
Change-Id: Ic90560ea970705a42466ece3ba2d7422f37a706e
2022-01-05 11:59:05 +01:00
Shubham Dubey
7f6d54c371 Revert "Move libprotocan to hardware/interfaces/automotive domain"
Revert submission 16551592-protocan_move

Reason for revert: Breaking git_master-wihtout-vendor

BUGID: b/213244647

Reverted Changes:
I4d0a1dcff:Move libprotocan to hardware/interfaces/automotive...
I166ea7741:Move libprotocan to hardware/interfaces/automotive...

Change-Id: I190155faa9cec22931baa4b0b245037b61f15cf9
2022-01-05 04:53:32 +00:00
Ji Soo Shin
b09c752e53 Move libprotocan to hardware/interfaces/automotive domain
Bug: 203756395
Change-Id: I4d0a1dcff2d6a974b40bccd403cecdc5cd03ac4f
2022-01-04 20:49:04 +01:00
TreeHugger Robot
a584ed0cd7 Merge "Using a manifest fragment" into sc-v2-dev am: fe342525b2 am: 8d5db93057
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16068072

Change-Id: Ic195aff1812e4ecdd5483a7fd331f6d73b08ec73
2021-10-27 05:27:35 +00:00
TreeHugger Robot
8d5db93057 Merge "Using a manifest fragment" into sc-v2-dev am: fe342525b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16068072

Change-Id: Iaa561429882703c11300636bd78e0a3b1b568ded
2021-10-27 05:08:00 +00:00
Changyeon Jo
9b3c9adb71 Using a manifest fragment
Fix: 203414344
Test: m -j and start CAN services
Change-Id: I423ab883d959f234a52adf680fae91bf264bea8b
2021-10-21 09:12:47 -07:00
Treehugger Robot
00a096a620 Merge "Backfill owner information for VTS module VtsHalCanBusV1_0TargetTest." am: f997f54349 am: 15ee6fa3f0 am: ab567b22ed am: 6506b1e782 am: ebadad276a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1814073

Change-Id: Ic2a725692cf96e5107f2eb54dc2d931b30716a4f
2021-09-29 22:08:51 +00:00
Treehugger Robot
15ee6fa3f0 Merge "Backfill owner information for VTS module VtsHalCanBusV1_0TargetTest." am: f997f54349
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1814073

Change-Id: Ib3fa65cd6f70f6b3bc99a7a8e903b1ede5e3b364
2021-09-29 21:25:15 +00:00
Yiming Pan
ba7e3994bc Backfill owner information for VTS module VtsHalCanBusV1_0TargetTest.
Each VTS module is required to have OWNERS file. The ownership is based on
go/vts-owners. For more information about ownership policy, please visit
go/xts-owners-policy.

Test: Tree Hugger
Bug: 143903671
Change-Id: I0f9790146d64200ccbfa364ba2e12d016c6d0629
2021-09-29 11:06:23 -07:00
Tomasz Wasilczyk
7b2bb9cc3c Implement add/remove membership for Netlink sockets
Change-Id: Ib98f14b1d758ee7b4d464b359d4792c3ca7027b0
Test: with other b/169681573 changes
Bug: 169681573
2021-07-23 16:17:43 +00:00
Chris Weir
ca8504a4fe Update nl::Socket for TCU-gRPC
Add a new wrapper for nl::Socket::send() that doesn't require
sockaddr_nl to be passed in, just a uint32_t pid.

Bug: 173213787
Test: manual - switch hu/tcu to use new send() function and verify that
they still work.

Change-Id: Iba49f8b3db35d96772fc0cc0a5b0aca5fb4ae307
2021-05-11 11:43:38 -07:00
TreeHugger Robot
8fed7f6315 Merge "[LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces" into sc-dev am: 1c3453c344
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/13669704

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia28c3bbc9bc7468f4ec1120bed844bd4d8cc63da
2021-02-24 14:44:58 +00:00