Commit Graph

238 Commits

Author SHA1 Message Date
Shane Smiskol 98b3087fbb test_models: remove body standstill exception (#29453)
* remove body exception

* bump to master
old-commit-hash: 3563292e6538a9aaf98800e28f9a6557994d8968
2023-08-17 16:26:30 -07:00
Shane Smiskol c817cb942d CAN fingerprinting test (#29427)
* timing test

* test

* fix

* print

* loop

* clean up

* wider range

* Update selfdrive/car/tests/test_models.py

* Apply suggestions from code review

* run many times

* Update selfdrive/car/tests/test_models.py

* run for many its

* run with unittest and print as list

* Update .github/workflows/selfdrive_tests.yaml

* Update .github/workflows/selfdrive_tests.yaml

* total time is super inconsistent (body)

* Update selfdrive/car/tests/test_models.py

* clean up

* clean up

* clean up

* this works!

* draft

* test suite not as modular

* try something like this

* can do kb, but not too representative

* clean up

* remove kb? it depends on signals

* clean up

* more clean up

* rename

* just measure all CANParsers

* can do all this manually

* but this is way simpler

* comment

* stash

* draft

* draft

* remove old script

* clean up

* revert

* use it

* remove test

* opt

* no partial

* remove

* revert test_models

* test can fingerprinting

* so much simpler!

* fix dict resizing

* simplify

* need to do this

* fix

* move to new file

* rename

* comment

* ignore function-uses-loop-variable
old-commit-hash: fd8f8d8785dd07777f150bd61c7ba9a0ed00d786
2023-08-17 00:57:12 -07:00
Shane Smiskol d87466556c Hyundai: match panda standstill check (#29442)
* bump panda

* clean up

* common?

* Revert "common?" (not now)

This reverts commit 197af7cdbb6a8c8e58fcbccca94f7db004ce91e4.

* fix

* no failures!

* remove time

* bump

* bump

* undo
old-commit-hash: 9d0d59ac9b40dabeb5984afc301917242da2515a
2023-08-17 00:06:38 -07:00
Shane Smiskol dc6af2820a test_models: check panda cruise state (#29423)
* cruise state test

* add todo

* rename

* clean up

* remove
old-commit-hash: 2d636deb4eabf54044b086d87305fc898f833711
2023-08-15 23:55:53 -07:00
Shane Smiskol 2fc1ed6d5d test_models: add full internal segment list (#29425)
full internal test models seg list

remove avalon and sienna

volt with ascm on

another volt with ascm on

9bc2ee633c361c3d|2023-07-28--20-17-51--2

dashcam mode

c4e21532b6fe3847|2023-07-05--08-34-05--1

can invalid (missing PSCMStatus)

cf6ba99592c48848|2023-07-01--11-36-56--20
old-commit-hash: 4073ffb02bb84fe5e877a1708185c00ff1a35ac2
2023-08-15 23:33:52 -07:00
Shane Smiskol 7e716dbc87 CANParser: perf benchmark on route script (#29324)
* timing test

* test

* fix

* print

* loop

* clean up

* wider range

* Update selfdrive/car/tests/test_models.py

* Apply suggestions from code review

* run many times

* Update selfdrive/car/tests/test_models.py

* run for many its

* run with unittest and print as list

* Update .github/workflows/selfdrive_tests.yaml

* Update .github/workflows/selfdrive_tests.yaml

* total time is super inconsistent (body)

* Update selfdrive/car/tests/test_models.py

* clean up

* clean up

* clean up

* this works!

* draft

* test suite not as modular

* try something like this

* can do kb, but not too representative

* clean up

* remove kb? it depends on signals

* clean up

* more clean up

* rename

* just measure all CANParsers

* can do all this manually

* but this is way simpler

* comment

* fix mypy

* this is correct too

* 3 seconds instead of 1.5
old-commit-hash: e2910d0720f0b65496234382847da1ab0d086e4d
2023-08-15 20:06:15 -07:00
Shane Smiskol 6c6fcd8b22 test_models: more typing (#29420)
* not type checked, but we set this in test_car_model

* type this
old-commit-hash: 6ec00f5ee2d07ca0b1b98cf4dc1f19487c08a98f
2023-08-15 20:01:33 -07:00
Shane Smiskol 4eadeff03f test_models: some typing (#29413)
* type

* also type check this func

* unused
old-commit-hash: 936f8b98177d98e75ebe50ed2a98a4b677b76dc8
2023-08-15 15:25:36 -07:00
Shane Smiskol 6be9e66073 jenkins: re-enable test_models (#29394)
* re-enable test_models

* now?

* Remove bad Volt segment

* Update Jenkinsfile

* use first n segments
old-commit-hash: fb235238addb73e04f59fca941040e3785be103e
2023-08-14 16:08:34 -07:00
Shane Smiskol 1945ef0441 test_models: match online fingerprinting behavior (#29306)
* draft

* 1x

* clean up

* final clean up

* fix

* self explan

* space

* space
old-commit-hash: 001d4e8729bdab999f9bd948b162091465a125f6
2023-08-11 18:33:11 -07:00
Shane Smiskol 344cbd2049 test_models: check relay malfunction (#29270)
* check relay malfunction in test_models

* draft

* actual relay malfunction (or ASCM was turned on)

* rav4: not dashcam and op enabled, but we're not sending anything

* clean up

* spaces

* more space

* flip

* better?

* combine

* for

* move up
old-commit-hash: 1099b3486a8c38c56873caceac88ea252f972771
2023-08-11 18:10:27 -07:00
Justin Newberry d487c0501f Ruff: enable most of bugbear (#29320)
* added mutable default args

* most of the Bs

* add comment about lrucache
old-commit-hash: 62c1e6592439119f360dd64b854e7047f35222ba
2023-08-11 15:33:49 -07:00
Justin Newberry 715f028a0e Ruff: enable flake8-builtins (#29315)
* enable flake8-builtins

* replace any with contains

* fix typo in pack

* fix type

* format is from the parent module, has to be enabled

* item_id

* fix item_id

* disable for id since that's what the remote server returns
old-commit-hash: 8793cbff40662a92bff16d75b51479c80517305a
2023-08-10 18:58:22 -07:00
Justin Newberry a14f162bc7 Ruff: comprehensions conventions (#29317)
ignore c408
old-commit-hash: 4a9afd7554060ac5353e96f1d7feb06d3a3671e9
2023-08-10 16:40:30 -07:00
Shane Smiskol 11492496fc test_models: run on route list (#26226)
* move to openpilot

* draft

* support internal urls

* not used

* update seg list

* regen segment list

* regen seg list

* regen

* regen

* regen

* no dirty segments

* regen seg list with no fuzzy or fixed fp

* regen segments with hda2 exception

* regen with added filters

* regen without bad dongle

* regen

* regenerate!

* regenerate, only OP enabled

* regen

* regenerate!

* regenerate!

* stash

* use SegmentName

* new route list

* add temp comment

* remove comment

* let's see if this works

* comment out other tests to speed up

* fix agent

* ?

* hmm

* oh whoops...

* add matrix

* fix

* how many levels do we need?

* fix values

* matrix can't be in parallel

* how about this

* try this

* Revert matrix

Revert "try this"

This reverts commit 8d0d91fd70c467c1fbb4e4e9aed511d15b2a30ef.

Revert "how about this"

This reverts commit a8e4fc53234824e77cbfb1e471277bc033e9dea1.

Revert "matrix can't be in parallel"

This reverts commit daaa6fcc3c75c74cbb90e97c565099a94123994c.

Revert "fix values"

This reverts commit df554b6a3371d124a574eb8d26bc51ef5b5b8fde.

Revert "how many levels do we need?"

This reverts commit 1a17320fa1c5e7220ef60e29981bbb3bb7da16c6.

Revert "fix"

This reverts commit e7eb6e404358fbd2eac3fea1901a8d30ea92d729.

Revert "add matrix"

This reverts commit a1b57e5725417d3c2f639f8edfc0c889b84b6753.

* use pytest instead! (5 jobs is ~150 mins)

* split lines, uncomment

* This Sienna seg has a fault SDSU that stopped forwarding/sending msgs

* picked a route with no PSCMStatus and no panda errors, recent routes are working

* this cadillac was dashcammed (no radar)

* opened an issue for this, it's 'expected' right now

* small clean up

* small clean up

* i don't think that worked

* is this needed?

* add to new PC tests

* cache

* draft

* Revert "draft"

This reverts commit 3b7f740dd4883118747300bc3687074c2d3c2116.

* probably should be function

* draft

* clean up

* add todo

* 600 random segments

* debug

* does this fix pythonpath issues?

fix

* try this

* mount?

* pytest again!

* no need for PYTHONPATH now

* Update Jenkinsfile

* ?

* convention

* clean up

* would be even more complex (have to unset ci which is class level)

* track

* is lfs pulled at all?

* ah no it's not
old-commit-hash: 70b1e9dd756cd2f6929cdf33dd1061a33f3b52b1
2023-08-10 00:45:23 -07:00
Shane Smiskol 8714f1a406 interfaces: test interface attributes (#29301)
* test

* draft

* draft

* clean up

* clean up

* better test

* clean up

* check car info

* uncomment

* rm space

* no loop

* use dbc

* more clear

* one line
old-commit-hash: 225ed2ed5a7221974e44c6d1307f959678f237ea
2023-08-09 17:01:38 -07:00
Adeeb Shihadeh a55a8849b3 Revert "interfaces: test interface attributes (#29297)"
This reverts commit 55af4cce3d3955ca0ecdb98517089a0a42b53ad2.

old-commit-hash: 51831d03a3e79d7d9765e173a2eefac1cf0bb694
2023-08-09 16:28:12 -07:00
Shane Smiskol cfa3ff0fba interfaces: test interface attributes (#29297)
* test

* draft

* draft

* clean up

* clean up

* better test

* clean up

* check car info

* uncomment

* rm space

* no loop

* use dbc

* more clear

* one line
old-commit-hash: 6a678cde6c3ed95ffb5d7236108e9a317517370b
2023-08-09 16:10:30 -07:00
Justin Newberry 7b677910df Linter: Fix >160 line length test (#29287)
* test

* fix line length

* fix line length

* fix file size

* revert poetry

* cleanup for PR
old-commit-hash: cf64b27168614f851087adab2d7f766425922f64
2023-08-08 17:13:35 -07:00
LC 3489b482f1 Toyota: Lexus IS 2023 port (#29257)
* added LEXUS_IS_TSS2 to values.py

* added LEXUS_IS_TSS2 to interface.py

* Apply suggestions from code review

* add torque params

* add test route

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 5ace930c5c2ec135578242b4cea49290bb3ce035
2023-08-08 16:34:37 -07:00
Shane Smiskol 8540c4dcc6 FW query timing test: fix total time ref
old-commit-hash: 328bfefb5a6f2519210b04c802f6a0b9fbff0637
2023-07-31 22:18:06 -07:00
Justin Newberry cb45be4b6f Subaru: New LKAS Angle based cars in dashcam only (#29190)
* dashcam mode only

* fix name

* added those cars in dashcam mode only
old-commit-hash: 38954418f097f5267505df67ff275f7830191022
2023-07-31 13:58:33 -07:00
Shane Smiskol c869f920aa test_models: panda safety tx test (#28949)
* draft

* assertrue

* this is way too complicated, even with unittest discover

* works

* test we can send resume button

* nice catches this

* fix

* fixed

* not needed

* draft

* works

* comment out to let catch

* clean up into a function

* clean ups

* final clean up

* no this is final

* bump

* simplify

* simplify

* pass

* bump

* globals don't work inside methods

* space
old-commit-hash: 80bbba14f74e57bbe90216dfd0a99f6f68d77ca2
2023-07-20 23:16:43 -07:00
Shane Smiskol 32d6b9994e test_car_interfaces: use DT_CTRL
old-commit-hash: 18cf253c625a8ae8b60e7b04f5859add37a3ad19
2023-07-18 20:01:22 -07:00
Shane Smiskol e69c1bff7f test car interface: fuzzy CarParams (#28931)
* bump

* should be bytes

* draft fuzzy car params

* stash

* bump

* bump

* this is explored!

* some clean up

* more clean up

* clean up

* can't easily

* clean up

* no import

* Apply suggestions from code review

* move into a function

* Update selfdrive/car/tests/test_car_interfaces.py

* Update selfdrive/car/tests/test_car_interfaces.py

* Update selfdrive/car/tests/test_car_interfaces.py

* come onn

* we know it will return a dict here
old-commit-hash: c9f80e89b7ab837b9a5402723e4e028155354dde
2023-07-18 01:49:01 -07:00
Shane Smiskol 6ee48e6a6d test car interfaces: more GM coverage (#28954)
* Update test_car_interfaces.py

* Update selfdrive/car/tests/test_car_interfaces.py

* make it fail

* catches crashed, not blocked
old-commit-hash: 44f7b312a0be638011a6f0b65fbb3f16e71b83ee
2023-07-18 01:42:51 -07:00
Shane Smiskol 4185aeb93b Nissan FPv2: use default diagnostic session (#28634)
* Revert "Nissan FPv2: log different diagnostic session types (#28585)"

This reverts commit 7b90843ea98d6034327e311c7025b9abc519055c.

* switch to standard KWP2000 diagnostic session type

* we're speedy again
old-commit-hash: 35aaf90587536e9ef5edfc1ec30c3fa2f1506aef
2023-07-17 18:21:18 -07:00
Shane Smiskol 38f28534dc Ford: fix CAN FD fingerprinting (#28995)
* fix CAN FD fingerprinting for now

* comment

* this is the simplest for now

* revert

* cmt

* todo and fixme!
old-commit-hash: 047bb46d3a0e73d1c7160252bcb6f2f7358980ee
2023-07-17 16:56:13 -07:00
Cameron Clough 381a6a35fd Ford: add F-150 2023 support (dashcam only) (#28974)
old-commit-hash: 17e71cdf4476d0d1b90b6e5e7c5be433e93d50c5
2023-07-17 16:16:28 +01:00
Shane Smiskol bbd3b3bc75 FuzzyGenerator: typing (#28934)
* bump

* should be bytes

* draft fuzzy car params

* stash

* bump

* bump

* this is explored!

* some clean up

* more clean up

* clean up

* do we need draw??

* draft

* this was confusing

* revert

* draft

* Revert "draft"

This reverts commit c593a03474b04d4df2648d8149798196c991a108.

* draft

* more typing!

* complete typing

* fix that

* cleanup

* better
old-commit-hash: f495c21805583f19e5cd4bd56b8b0445c74f35b3
2023-07-14 21:41:30 -07:00
Shane Smiskol ce88b7cf51 test_models: don't skip test cases with multiple pytest jobs (#28953)
* Update test_models.py

* Update selfdrive/car/tests/test_models.py

* Update selfdrive/car/tests/test_models.py
old-commit-hash: f6390c6e4092ee69ea73753419b86dd9d8b5cf27
2023-07-14 16:24:07 -07:00
Shane Smiskol 718fabb4d5 test_models: fix rx message bus (#28947)
Update test_models.py
old-commit-hash: c9c636bdd7de6a22e34fd2cbcbc8d5e612f4cfad
2023-07-14 14:04:24 -07:00
Shane Smiskol 7eaa74b083 test car interfaces: support pytest (#28937)
sort
old-commit-hash: af7b2e4dd4ae026f18c526ac20e2a61adf56274f
2023-07-14 01:48:36 -07:00
Shane Smiskol 29bbd75291 test car interface: fuzzy experimental long (#28936)
fuzzy exp long
old-commit-hash: 4ed9dec6f460aaeac8616ef06c7da2171b31c3b0
2023-07-14 01:25:01 -07:00
Jason Wen 82899dbdbb HKG: Add FW Versions for China Kia Carnival 2023 (#28918)
old-commit-hash: 682a240c366f2172993d72bc57a99bae1787851f
2023-07-13 17:51:58 -07:00
Shane Smiskol b8cc63bc76 Hyundai: add Ioniq 6 platform (#28915)
old-commit-hash: bc24783657bfdd43662dc0e3451c67adbc86bfdf
2023-07-13 12:49:38 +01:00
Jason Wen 7f10d2c5b4 HKG: Car Port for Kia Carnival 2023 (HDA1) (#27785)
* HKG: Car Port for Kia Carnival (China only) 2023 (HDA1)

* add FW

* seems to be radar SCC

* Update CARS.md

* Update CARS.md

* Add test route

* Fix docs

* New route

* Fix docs formatting

* update with US model

* 2 total

* Update RELEASES.md

* add FW for US carnival 2023

* fix docs

* update test routes

* no rlogs for chinese route

* update docs

* revert chinese to merge now

* Apply suggestions from code review

* fine to fully remove

* less precise

* remove from releases

* Apply suggestions from code review

* Update selfdrive/car/tests/routes.py

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: f1c604bde7a84036a0dd16e0cc2ee34c8ff96181
2023-07-06 00:37:49 -07:00
Maxime Desroches 1693786962 simple fuzzing test for all processes (#28661)
* Revert "Revert "simple fuzzing test for all processes (#28584)""

This reverts commit a5be0640a3780156fdd5c04c1e6204fa41b307a8.

* determinism

* fingerprint
old-commit-hash: 0ebec253d0443144f71f523118f6fadc93cf1eeb
2023-06-29 21:49:23 -07:00
Shane Smiskol 752820f864 Mazda: query and log FW on bus 0 (#28569)
* mazda: query FW on bus 0

* update refs
old-commit-hash: d59172bc1990859de615b3eb35d72f36bb33077c
2023-06-29 00:14:09 -07:00
Shane Smiskol 017ad73096 FwQueryConfig: test request lists (#28741)
* request callbacks

* support in IsoTpParallelQuery

* tiny bit simpler

* shorter lines

* need to check length again, could return empty list

* takes in prev response

* typing

* test

* only test

* simple test

* revert this

* subtest!
old-commit-hash: 16203cc856f5f1fed779f34f94234d3eed9d978c
2023-06-28 23:50:52 -07:00
Shane Smiskol 4be4904143 FPv2: test timing for present ECUs and VIN queries (#28676)
* put one subaddr in parallel_addrs

* p

* remove print

* update test refs

* test

* revert that

* clean up

* clean up

* fix

* print results

* fixup cmt

* move down
old-commit-hash: 3f8c976d999d7290fb0357b095339ed0fdf70f87
2023-06-24 05:47:55 -07:00
Shane Smiskol bd4ea24008 FPv2: cleanup FW query timing test (#28677)
* put one subaddr in parallel_addrs

* p

* remove print

* update test refs

* test

* revert that

* clean up

* clean up

* only clean up

* clean up

* rm

* type

* one line

* this is fine
old-commit-hash: ed86a4ae62fc84b8beb153ea89cb062a2ae27bcd
2023-06-24 05:09:11 -07:00
Shane Smiskol 29310fc6d9 Toyota: add central gateway ECU (#28653)
* add comment about central gateway

* add as ecu

* bump ref

* add to whitelists
old-commit-hash: 164dd5015e85801b2c6ac730ac4b7d414f2034cb
2023-06-22 23:30:34 -07:00
Adeeb Shihadeh ffcc2e4c61 Revert "simple fuzzing test for all processes (#28584)"
This reverts commit 0e98836e857583849aa4e960b097103a4aeb863d.

old-commit-hash: 7783dc602cc478d41918dd8fda2cd87ebf4069d1
2023-06-22 14:59:50 -07:00
Shane Smiskol ae58ed5473 Toyota FPv2: log telematics ECU (#28613)
* add electronic parking brake ecu

* add

* add to whitelists

* update refs
old-commit-hash: ae0d1635b4b8532d0ee07729ba8ae10e06099ec2
2023-06-21 00:32:40 -07:00
Shane Smiskol b3f4985151 Toyota FPv2: log electronic parking brake ECU (#28612)
* add electronic parking brake ecu

* add comment

* bump

* screw sequential subaddrs
old-commit-hash: 12be5afb8a6973cda25ad78779e6cd22fe8694e3
2023-06-20 23:53:20 -07:00
Maxime Desroches 7be2b51229 simple fuzzing test for all processes (#28584)
* working test

* classmethod

* review

* add to ci
old-commit-hash: bac193bdd518a260bfbbdb4893520c4263ab2be6
2023-06-20 10:57:02 -07:00
Cameron Clough 7e9f1e1b79 Ford: remove Focus Mk4 from dashcam only (#28551)
old-commit-hash: 78bb6379937aae489dff501ec10694ff3aac17df
2023-06-17 15:16:59 +01:00
Shane Smiskol b02345b12d Nissan FPv2: log different diagnostic session types (#28585)
* standard KWP2000 diagnostic session type

* draft

* clean up

* not needed

* update FP refs

* should log logging
old-commit-hash: 2f2b94758bfa3c5bb8790c3828db420e7da9f0dc
2023-06-17 02:39:58 -07:00
Maxime Desroches 6355215f81 test: car interface fuzzy testing + generating capnp structs (#28530)
* random car control

* format

* struct generation

* math

* staying real

* really staying real

* move

* split this

* format

* Revert "format"

This reverts commit a70a73952ee3833c4ae839d7b2729ee2a1e1a85b.

* Revert "split this"

This reverts commit ae96be63cbfbee230101e69a0f84c874f321fafa.

* space
old-commit-hash: 3fc104fb6d9db5f4853b61c4c525b581e0caad72
2023-06-15 17:01:13 -07:00