Commit Graph

3 Commits

Author SHA1 Message Date
Adeeb Shihadeh 28a9781c51 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 2a9ba3e867e4ba8ea8818a5be24807301a945f17.
old-commit-hash: d90d9b2280397bb113c0d5835810cbd5f483f2a1
2021-06-18 01:34:52 -07:00
Adeeb Shihadeh 8742d78051 fix /proc test case for util::read_file
old-commit-hash: ea6f779b3e8bf1a7918617d59534057bad54b990
2021-06-17 15:03:59 -07:00
Dean Lee 6bfc7f4ca5 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>
old-commit-hash: a873a23e0dbfe43027911acdd270610048eed74a
2021-06-16 11:01:13 +02:00