Commit Graph

60 Commits

Author SHA1 Message Date
dzid26 fcccbb3a13 revert shorter MISRA mutation CI timeout
- test_misra.sh only got faster locally
2024-09-07 19:57:19 -07:00
Radek 2aaab40117
fix test_mutation.py performace (#2012)
stop pytest from executing test_misra.sh in test collections
- in each test_mutation.py worker
2024-09-06 13:30:05 -07:00
Adeeb Shihadeh 9ec02e74f5 socketcan: skip install in CI for now 2024-08-31 13:17:55 -07:00
Adeeb Shihadeh c4e75ee89c
remove cereal dependence (#2000)
* remove cereal

* rm more shit

* add back make

* python3

* python3

* fix that

* put that back

* rename

* fix that

* can't move it
2024-08-18 11:40:54 -07:00
Adeeb Shihadeh 5d815231ea
1min is all you need 2024-08-02 13:52:28 -07:00
Adeeb Shihadeh ee7b385be7 CI: add jenkins-trigger 2024-08-02 11:02:38 -07:00
Adeeb Shihadeh 2cf3b84c77
run pre-commit autoupdate monthly 2024-05-08 13:54:02 -07:00
Adeeb Shihadeh 53e0f13739
update to ubuntu 24.04 (#1941)
* update to ubuntu 24.04

* Apply suggestions from code review

* Update .github/workflows/repo.yml

* Update test.yaml

* docker builds

* bump

* no pyenv

* ugh this should just be removed

* fix

* add release/

* no openpilot

* remove those too

* build in the docker

* cleanup

* need the addons
2024-04-28 15:32:18 -07:00
Justin Newberry 698d17e021
fix inconsistent misra mutation tests (#1935)
* revert

* fix
2024-04-22 10:28:53 -07:00
Justin Newberry 4d60ae9c62
CI: fix misra mutation tests (#1934)
* fix that

* skip build, install first

* Revert "skip build, install first"

This reverts commit 01efdb77ce.

* prune
2024-04-18 17:59:33 -07:00
Adeeb Shihadeh c076a9f2f6
remove pedal fw (#1872)
* remove pedal fw

* little more

* one more

* and tests

* rest of it

* little more

* fix linter

* more fix
2024-02-16 22:58:01 -08:00
Shane Smiskol aca33b83a4
tests: one file for safety and coverage tests (#1865)
* one file for all tests

* clean up

* unreachable

* Revert "unreachable"

This reverts commit 4b792b1f9b.
2024-02-13 17:27:19 -08:00
Aryan 54459e694e
update cppcheck (#1859)
* update cppcheck

* Update tests/misra/install.sh

* delete cppcheck cache

* remove misra 5.8 erroors

* fixed uninitialized data error

* suppress misra-c2012-2.3 and misra-c2012-2.4

* reinstate cache to fix mutation test

* rerun for mutation test

* increase timeout for mutation test

* styling

* comments + variable name changes

* Update tests/misra/install.sh

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Update install.sh

* more variable name changes

* condition on defining CANPacket_t

* just cherry pick

* fix build

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-02-10 14:50:36 -08:00
Hoang Bui ced1fb3dee
Add more MISRA mutation tests (#1818)
* 9 added tests

* test speed with new del header

* mypy

* cleanup

* fix error in delete

* random

* change

* works on local

* sorted

* with order

* add pytest randomly

* test with ci

* remove sort

* cleanup

* all files

* no obj

* another bootstub

* fix

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2024-01-20 15:52:38 -08:00
Adeeb Shihadeh 12d326c110
parallelize misra mutation tests (#1768)
* parallelize misra mutation tests

* timeouts
2023-12-09 14:32:40 -08:00
Adeeb Shihadeh 7340ece196
misra mutation test (#1763)
* misra mutation test

* a few cases

* revert that

* fixups

* test that

* build fw
2023-12-08 23:20:42 -08:00
Shane Smiskol 5fe1d67b77
safety: test coverage (#1699)
* run in CI

* test

* make report optional

* 100% GM coverage

comments

* more coverage: these are unhittable lines

* vw mqb: convert switch to if, consistent with all other safety modes

* we don't check any of these yet

* rm

* ensure honda_fwd_brake is reset

* can rm this

* test honda brake latching

* honda: add rx brake function

* use loops for more coverage and more compact code

* other honda stuff

* remove car-specific stuff from init_tests

* don't need to have car safety modes reset interceptor detected (global init does)

* use get_bit

* ahh ford counter is unhittable: counter check disabled due to skipping

* misra

* test nooutput and alloutput

* required changes for that

* fix test

* more all/nooutput coverage

* start on lin

* rx coverage

* lin tx coverage

* some barebones body test

* double negative

* draft elm327 safety (git stash)

* fixes from merge

* clean up test cov

* add rm

* no body

* failed grep returns exit code 1

* more clear msgs
2023-11-10 19:37:41 -08:00
Adeeb Shihadeh b6e37f25b6
Remove flash logging (#1674)
* Revert "Disable flash logging (#1667)"

This reverts commit 62db60595b.

* Revert "Faster log retrieval (#1484)"

This reverts commit 694aae9c26.

* Revert "Flash bounds checking outside of bootstub (#1459)"

This reverts commit 054344de6b.

* Revert "Logging (#1445)"

This reverts commit 0cc91a7f7b.

* cleanup

* cleanup
2023-09-30 12:49:46 -07:00
Adeeb Shihadeh ee21517c77
CI: run each job only once (#1659) 2023-09-07 19:10:05 -07:00
Adeeb Shihadeh 9df7802f71
CI: bump up safety test timeout 2023-08-10 16:36:00 -07:00
Adeeb Shihadeh 61e987f6e2
remove safety replay test (#1569) 2023-08-07 18:38:01 -07:00
Adeeb Shihadeh 43bde4138d
jungle: SBU provisioning tests (#1553)
* jungle: SBU provisioning tests

* update can_send

* cleanup

* fix misra

* space
2023-08-04 14:28:23 -07:00
Robbe Derks 0cc91a7f7b
Logging (#1445)
* try 1

* some fixes

* fix some misra

* first poc working

* more things

* more misra fixes

* fix misra

* add rate limiting

* fix misra

* add some unit tests through libpanda

* add more tests and fix some stuff

* fix misra again

* add startup log hitl test

* list

* don't fail on wrong timestamps

* improvements

* fix tests

* expected logs test?

* not sure why this passed

* oh, it doesn't reset

* only show last few

* guess at expected logs

* needs this

* ugh

* reduce compiler warnings

* adjust expected logs

* this is correct

* is it really 1?

* min max

* reduce spam in SPI test

* some cleanup
2023-06-13 17:00:56 +02:00
Adeeb Shihadeh a8f851870d ci: bump up safety test timeout 2023-05-21 20:31:01 -07:00
Adeeb Shihadeh 1e8c5d59c7
CI: run tests with UBSan (#1363)
* CI: run tests with UBSan

* try this
2023-04-26 23:15:28 -07:00
Adeeb Shihadeh 862b03b5c5
CI: add job to update pre-commit hooks (#1346)
* CI: add job to update pre-commit hooks

* rm push trigger
2023-04-15 17:56:25 -07:00
Adeeb Shihadeh b6c378ad02
CI: set PYTHONWARNINGS=error (#1323)
* CI: set PYTHONWARNINGS=error

* update resetter

* fix build warnings

* bump jungle

* fix one more

* fix linter

---------

Co-authored-by: Bruce Wayne <batman@comma.ai>
2023-04-02 09:33:35 -07:00
Adeeb Shihadeh ba7d21805a
ci: lower safety test timeout 2023-03-21 18:49:47 -07:00
Adeeb Shihadeh 88b30e1a84
CAN comms test (#1181)
* CAN comms test

* remove those

* cleanup

* little more
2022-11-30 22:12:28 -08:00
Adeeb Shihadeh 1f73c70fdc
generic libpanda for tests (#1177)
* generic libpanda for tests

* move safety helpers

* fix ci build

* fix running

* opendbc is in the image

* make can packet

* rename
2022-11-30 17:41:24 -08:00
Adeeb Shihadeh b19a74f93d
CI: fix mounting in GITHUB_WORKSPACE (#1175) 2022-11-30 15:56:15 -08:00
Shane Smiskol 702e5281d8
remove unused scons argument (#1169)
* clean

* also here
2022-11-29 01:28:46 -08:00
Robbe Derks d574f4aebc
STM32F4: SPI communications (#998)
* cleanup is_enumerated, rename comms and init spi

* big comms refactor, building now

* misra fixes

* more fixes

* misra try 3

* cleanup

* this belongs in a separate PR

* remove unneccesary file

* revert llspi changes

* llspi misra fix

* enable SPI on F4 and setup gpio

* duh

* wip: spi comms

* more spi wip

* dynamic sector erasing

* Revert "dynamic sector erasing"

This reverts commit fce1215a2e.

* more sectors to be erased

* debugging

* woah, this works

* cleanup on the panda side

* add sync and checksum checks, and fix recovery on errors

* this seems relatively stable

* add retrying

* this is stabler

* some endianness and endpoint fixes

* builds

* revert that

* add that back

* checksum start

* start splitting up driver

* spi behind flag

* cleanup test

* bump up timeout

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-11-09 18:46:20 -08:00
Adeeb Shihadeh b3e9292922
HITL test fixups (#1117)
* automated -> hitl

* simplify

* jenkinsfile cleanup

* cleanup

* fix new linter errors

* fix ws cleanup

* some retry

* more cleaning up after ourselves

* unpin scons

* bump opendbc

* fix quotes

* enable flaky

* debug print

Co-authored-by: Bruce Wayne <batman@comma.ai>
2022-11-03 17:24:28 -07:00
Adeeb Shihadeh bce6f48a9d
CI speedup (#1108)
* use docker buildkit

* enable push

* try this caching

* no regressions

* don't copy into the image

* move that

* getting there

* debug

* little smaller

* debug

* configure safe dir

* no sudo

* cleanup

* another timeout
2022-10-16 16:37:58 -07:00
Adeeb Shihadeh b27e1476a7 CI: update docker login 2022-08-03 21:17:47 -07:00
Adeeb Shihadeh b6a672de5a
bump openpilot (#946)
* bump openpilot

* need that too :(
2022-05-19 14:30:08 -07:00
Adeeb Shihadeh ddf1eb68ba
socketcan: fix for new kernels (#907) 2022-04-04 18:03:12 -07:00
Igor Biletskyy ae26b75d7b
CAN_FIFOMailBox to CANPacket struct + USB dynamic packet size (#739)
* Squashed commits, no cleanup

* Few fixes

* No init = garbage

* Only receive with new canpacket

* Add send with canpacket

* Revert "Add send with canpacket"

This reverts commit 7d06686ddd6d447c714b5289d31af24403d36931.

* Packet must be aligned to word, or bad performance

* Cleaner

* Fix tests

* Tests...

* MISRA 10.4

* More MISRA

* libpandasafety_py

* cffi

* even more tests...

* typo

* ...

* ...

* ...

* Slight cleanup

* MISRA 6.1

* MISRA 17.7

* Bug in bxcan + even style

* MISRA 10.1

* Revert "MISRA 10.1"

This reverts commit 404ae7fcc39556f80f528de9015702e69f4ea0a5.

* ...

* MISRA 10.1 and 10.4 suppress until next PR

* MISRA 20.1

* ...

* test_honda

* ...

* ...

* test_toyota

* test_volkswagen_mqb

* test_volkswagen_pq

* Sketchy thing...

* Revert "Sketchy thing..."

This reverts commit 3b2e5715bdc1954f7b7b3b7469ba3d0eaa06bdf9.

* remove comment

* bxcan extended address bug

* Concept, experimental dynamic usb packet size

* increase each buffer to 10240 bytes

* raise python bulk read/write limits

* ...

* Move packet size to start

* Experimental send, stream-like

* New receive test, stream-like

* cleanup

* cleanup + rebase fixes

* MISRA

* Extra receive method, stream-like, commented out

* type change

* Revert back to buffer for send, stream commented

* forgot ZLP

* lower buffer, add rx failsafe

* ... remove ZLP

* return ZLP back

* Add tx checks to panda fw

* TX stream with counter

* fix counter overflow

* 13 free slots should be enough

* limit tx usb packet

* ...

* Revert max_bulk_msg doubling

* python lib improve speed

* Stream with counter for RX, dirty, needs cleanup

* Increase chunk length to 4096 bytes

* cleanup fdcan.h

* cleanup __init__.py

* MISRA 12.1

* MISRA 10.8

* remove non-streaming usb functions

* more main.c cleanup

* MISRA 15.6

* MISRA 15.5

* MISRA 18.4 and suppress objectIndex

* handling usb pakcets > 63bytes, naming and cleanup

* Cleanup old from tests and update CANPacket_t struct

* Switch to 4 bit DLC instead of 6 bit length

* ops)

* ...

* pylint

* receive python buffer increase

* USB increase receive packet len

* tweak buffers

* No need for so high limits

* MISRA 20.1 workaround

* performance tweaks

* cleanup, dlc to data_len_code naming

* main.c naming

* comments and cleanup for main.c usb

* clean py lib

* pylint

* do not discard good rx messages on stream fail

* cleanups

* naming

* remove bitstruct lib and lower tx limit

* bitstruct lefovers

* fix bug in VW test

* remove adjusting data size and assert on wrong len

* ...

* test new memcpy before merging

* Revert "test new memcpy before merging"

This reverts commit 399465a264835061adabdd785718c4b6fc18c267.

* macros for to/fromuint8_t array

* MISRA hates me!

* tests.c include macros instead

* move CANPacket to can_definitions.h

* vw_pq python test fix

* new memcpy test, REMOVE

* check without alignment

* revert macros for uint8 arrays

* Revert "revert macros for uint8 arrays"

This reverts commit 581a9db735a42d0d68200bd270d87a8fd34e43fe.

* check assert

* Revert "check assert"

This reverts commit 9e970d029a50597a1718b2bb0260196c050fd77f.

* one more variation

* Revert "one more variation"

This reverts commit f6c0528b7ac7e125750dc0d9445c7ce97f6954b5.

* what about read performance

* Revert "what about read performance"

This reverts commit d2610f90958a816fe7f1822157a84f85e97d9249.

* check struct alignment to word

* check for aligned memcpy again

* cleanup

* add CANPacket structure diagram

* update CANPacket and add USB packet struct

* bugfix + refactoring of EP1

* move dlc_to_len to header

* missed include

* typo...

* MISRA

* fk

* lower MAX_CAN_MSGS_PER_BULK_TRANSFER

* bump CAN_PACKET_VERSION to 2

* bump python lib CAN_PACKET_VERSION to 2

* rename parse_can_buffer to unpack_can_buffer

* CANPacket_t const fields

* Revert "CANPacket_t const fields"

This reverts commit cf91c035b7706a14e317550c5f0501ae3fce7c70.

* test.c relative path

* cleanup

* move macros to safety_declarations

* Refactor pack/unpack funcs and add unittest

* usb_protocol.h

* oops

* Update .github/workflows/test.yaml

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* remove print from unittest

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-11-12 16:36:34 -08:00
Adeeb Shihadeh bb5e2ccd00
socketcan: support newer kernels with renamed macro (#765) 2021-11-04 15:01:12 -07:00
Adeeb Shihadeh 0cc5ec33e4 fix build apth 2021-10-25 16:14:24 -07:00
Adeeb Shihadeh def8558e3d fix safety replay 2021-10-25 16:08:49 -07:00
martinl 92f6a9bb1d
Misra artifacts upload (#731)
* Update misra artifact upload workflow

* Update misra artifact upload filenames
2021-09-30 21:47:14 +02:00
Adeeb Shihadeh 3cf5b473c8
CI fixups (#657) 2021-06-09 18:36:07 -07:00
Willem Melching ad9ecefe65
Switch panda to scons builder (#635)
* add scons builder

* cleanup 1

* remove building from python code

* add pedal build

* fixup flags

* add EON flag

* change github actions to scons

* fixup automated tests

* move flashing scripts

* fix indent

* remove version.mk

* fix not in git

* fix linker script filename

* untested pedal flashing scripts

* add release option

* better asserts

* swap condition

* enable usb and fix flash script

* usb flash is not supported

* use button to enable dfu mode

* no usb because misra

* remove sleep
2021-03-24 14:44:32 +01:00
Jason Young 9108b82fb0
VW MQB: Updated message and signal data, round 1 (#632)
* EPS_01 -> LH_EPS_03

* Bump openpilot commit ref

* made echo test more stable

* update python to 3.8.5

* Revert "Bump openpilot commit ref"

This reverts commit 75ec1a0c

* Bump openpilot commit ref

* Bump openpilot commit ref

* Update Dockerfile.panda

* fixed torque signal name

* Signal naming fix, round 2

* fix CI

Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-14 16:24:53 -07:00
Adeeb Shihadeh 49c7615ed3
ubuntu 16.04 -> 20.04 (#608)
* ubuntu 16.04 -> 20.04

* fix pip

* think pyenv installs this

* bump python

* non interactive

* fix pyenv install

* python serial

* bump cffi

* fix index log build

* logreader dependency
2020-10-23 23:14:58 -07:00
Adeeb Shihadeh 8b41ed3b81
Deprecate ESP (#592)
* remove unused wifi tests

* remove that one too

* no bootmode from ESP

* clean that up

* remove two more wifi tests

* remove boardesp and esptool

* esp_gps -> gps

* missed those

* remove esptool refs

* remove esp certs

* no more wifi

* that was old

* cleanup jenkins dockerfile

* fix linter

* remove more wifi refs

* clone panda jungle from github

* no copy

* always default esp to off
2020-08-26 15:37:50 -07:00
Adeeb Shihadeh 6ae6221cf2 add driver build status to README 2020-08-22 19:21:11 -07:00
Adeeb Shihadeh 5954ed7df9
Build socketcan driver in CI (#588)
* build socketcan driver in CI

* sudo

* does this work on 20.04?
2020-08-08 17:04:26 -07:00