fix /proc test case for util::read_file

pull/21322/head
Adeeb Shihadeh 4 years ago
parent 7dec206437
commit ea6f779b3e
  1. 6
      selfdrive/common/tests/test_util.cc

@ -20,9 +20,9 @@ std::string random_bytes(int size) {
}
TEST_CASE("util::read_file") {
SECTION("read /proc") {
std::string ret = util::read_file("/proc/self/cmdline");
REQUIRE(ret.find("test_util") != std::string::npos);
SECTION("read /proc/version") {
std::string ret = util::read_file("/proc/version");
REQUIRE(ret.find("Linux version") != std::string::npos);
}
SECTION("read file") {
char filename[] = "/tmp/test_read_XXXXXX";

Loading…
Cancel
Save