Lines Matching refs:boot

56   bootloader_message boot;  in TEST_F()  local
57 ASSERT_TRUE(read_bootloader_message(&boot, &err)) << "Failed to read BCB: " << err; in TEST_F()
60 ASSERT_EQ(std::string(sizeof(boot), '\0'), in TEST_F()
61 std::string(reinterpret_cast<const char*>(&boot), sizeof(boot))); in TEST_F()
71 bootloader_message boot = {}; in TEST_F() local
72 strlcpy(boot.command, "command", sizeof(boot.command)); in TEST_F()
73 strlcpy(boot.recovery, "message1\nmessage2\n", sizeof(boot.recovery)); in TEST_F()
74 strlcpy(boot.status, "status1", sizeof(boot.status)); in TEST_F()
77 ASSERT_TRUE(write_bootloader_message(boot, &err)) << "Failed to write BCB: " << err; in TEST_F()
83 ASSERT_EQ(std::string(reinterpret_cast<const char*>(&boot), sizeof(boot)), in TEST_F()
99 bootloader_message boot; in TEST_F() local
100 strlcpy(boot.recovery, "random message", sizeof(boot.recovery)); in TEST_F()
101 strlcpy(boot.reserved, "reserved bytes", sizeof(boot.reserved)); in TEST_F()
103 ASSERT_TRUE(read_bootloader_message(&boot, &err)) << "Failed to read BCB: " << err; in TEST_F()
106 ASSERT_EQ("boot-recovery", std::string(boot.command)); in TEST_F()
108 ASSERT_EQ(expected, std::string(boot.recovery)); in TEST_F()
111 ASSERT_EQ(std::string(sizeof(boot.status), '\0'), std::string(boot.status, sizeof(boot.status))); in TEST_F()
112 ASSERT_EQ(std::string(sizeof(boot.stage), '\0'), std::string(boot.stage, sizeof(boot.stage))); in TEST_F()
113 ASSERT_EQ(std::string(sizeof(boot.reserved), '\0'), in TEST_F()
114 std::string(boot.reserved, sizeof(boot.reserved))); in TEST_F()
129 bootloader_message boot; in TEST_F() local
130 ASSERT_TRUE(read_bootloader_message(&boot, &err)) << "Failed to read BCB: " << err; in TEST_F()
133 ASSERT_EQ("boot-recovery", std::string(boot.command)); in TEST_F()
134 ASSERT_EQ("recovery\n", std::string(boot.recovery)); in TEST_F()
137 ASSERT_EQ(std::string(sizeof(boot.status), '\0'), std::string(boot.status, sizeof(boot.status))); in TEST_F()
138 ASSERT_EQ(std::string(sizeof(boot.stage), '\0'), std::string(boot.stage, sizeof(boot.stage))); in TEST_F()
139 ASSERT_EQ(std::string(sizeof(boot.reserved), '\0'), in TEST_F()
140 std::string(boot.reserved, sizeof(boot.reserved))); in TEST_F()
159 bootloader_message boot; in TEST_F() local
160 ASSERT_TRUE(read_bootloader_message(&boot, &err)) << "Failed to read BCB: " << err; in TEST_F()
164 ASSERT_GE(expected.size(), sizeof(boot.recovery)); in TEST_F()
167 ASSERT_EQ("boot-recovery", std::string(boot.command)); in TEST_F()
168 ASSERT_EQ(expected.substr(0, sizeof(boot.recovery) - 1), std::string(boot.recovery)); in TEST_F()
169 ASSERT_EQ('\0', boot.recovery[sizeof(boot.recovery) - 1]); in TEST_F()
172 ASSERT_EQ(std::string(sizeof(boot.status), '\0'), std::string(boot.status, sizeof(boot.status))); in TEST_F()
173 ASSERT_EQ(std::string(sizeof(boot.stage), '\0'), std::string(boot.stage, sizeof(boot.stage))); in TEST_F()
174 ASSERT_EQ(std::string(sizeof(boot.reserved), '\0'), in TEST_F()
175 std::string(boot.reserved, sizeof(boot.reserved))); in TEST_F()
185 bootloader_message boot; in TEST_F() local
186 strlcpy(boot.recovery, "random message", sizeof(boot.recovery)); in TEST_F()
187 strlcpy(boot.reserved, "reserved bytes", sizeof(boot.reserved)); in TEST_F()
189 ASSERT_TRUE(write_bootloader_message(boot, &err)) << "Failed to write BCB: " << err; in TEST_F()
204 ASSERT_EQ(std::string(boot.status), std::string(boot_verify.status)); in TEST_F()
205 ASSERT_EQ(std::string(boot.stage), std::string(boot_verify.stage)); in TEST_F()
206 ASSERT_EQ(std::string(boot.reserved), std::string(boot_verify.reserved)); in TEST_F()