Commit Graph

12 Commits

Author SHA1 Message Date
Adeeb Shihadeh
5c48e7bc86 remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
2022-04-18 17:55:23 -07:00
Robbe Derks
6366d1303f Statlog in C (#23596)
* statlog in C

* fix swaglog and the test

* add missing files

* fix context initialization todo

* speed up test
2022-01-27 17:14:38 +01:00
Dean Lee
1221d8887c swaglog: Fix random test failure (#23546)
* print info

* retry zmq_recv on errors

* get line no from __LINE__

* cleanup

* renmae msg to thread_id
2022-01-16 09:36:52 -08:00
Adeeb Shihadeh
8c53adf4ab swaglog: add daemon name to context (#23518)
* cleanup first

* add daemon name

* add test

* fix

* daemon name
2022-01-13 20:23:08 -08:00
Dean Lee
feae37541f swaglog.cc: add test case. fixed the ctx of the first message is empty (#23226)
* test case

* add to selfdrive_tests.yaml

* fix ctx_j is empty

* check return value too
2022-01-13 20:03:07 -08:00
Dean Lee
652c42da2c util: add safe write functions (#22160)
* add safe write functions

* log error

* bzfile safe_fopen&safe_flush

* update test_case

* trigger ci

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-10-29 13:23:31 +02:00
Dean Lee
1f39d8cee6 util: add new function create_directories with unit tests (#21871)
* util::create_directories

* check bool ret

* don't assume mask

* rename with_umask to no_umask

* remove umask

* rebase master

* rebase master

* 0755
2021-10-29 12:27:35 +02:00
Dean Lee
83710b14ee fix: util::read_files_in_dir does not always return a correct result (#21883)
* fix bug

* use de->d_type==DT_REG

* Revert "use de->d_type==DT_REG"

This reverts commit ecb38c82305ea23bfec84284aa77be5b5c64957a.
2021-09-01 15:10:59 -07:00
Dean Lee
3a7959b5ff fix: util::file_exists will return false on no permissions (#21880)
* fix bug

* add test case
2021-08-09 11:56:45 +02:00
Adeeb Shihadeh
d90d9b2280 util::read_file: fix reading from sysfs and add test case (#21325)
* add sysfs test case

* Revert "util.cc: refactor read_file (#21321)"

This reverts commit 8d5c61eefe.
2021-06-18 01:34:52 -07:00
Adeeb Shihadeh
ea6f779b3e fix /proc test case for util::read_file 2021-06-17 15:03:59 -07:00
Dean Lee
a873a23e0d common/util.cc: add unit test, fix bug in util::read_file (#21251)
* add test case for util

* fix bug in read_file

* gitignore test_util

* better test

* referer

* more

* more test

* REQUIRE size

* apply reviews

* only test binary

* simplify the test

* read  non-permission

* debug print

* remove /etc/shadow

* test read directory

* Update selfdrive/common/tests/test_util.cc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-06-16 11:01:13 +02:00