Lines Matching refs:boot

29   bootloader_message boot = {};  in TEST()  local
30 strlcpy(boot.command, "command", sizeof(boot.command)); in TEST()
31 strlcpy(boot.recovery, "message1\nmessage2\n", sizeof(boot.recovery)); in TEST()
32 strlcpy(boot.status, "status1", sizeof(boot.status)); in TEST()
35 ASSERT_TRUE(write_bootloader_message_to(boot, temp_misc.path, &err)) in TEST()
43 ASSERT_EQ(std::string(reinterpret_cast<const char*>(&boot), sizeof(boot)), in TEST()
51 bootloader_message boot = {}; in TEST() local
53 strlcpy(boot.recovery, "random message", sizeof(boot.recovery)); in TEST()
54 strlcpy(boot.status, "status bytes", sizeof(boot.status)); in TEST()
55 strlcpy(boot.stage, "stage bytes", sizeof(boot.stage)); in TEST()
56 strlcpy(boot.reserved, "reserved bytes", sizeof(boot.reserved)); in TEST()
58 ASSERT_TRUE(update_bootloader_message_in_struct(&boot, options)); in TEST()
61 ASSERT_EQ("boot-recovery", std::string(boot.command)); in TEST()
63 ASSERT_EQ(expected, std::string(boot.recovery)); in TEST()
66 ASSERT_EQ("status bytes", std::string(boot.status)); in TEST()
67 ASSERT_EQ("stage bytes", std::string(boot.stage)); in TEST()
68 ASSERT_EQ("reserved bytes", std::string(boot.reserved)); in TEST()
76 bootloader_message boot = {}; in TEST() local
77 ASSERT_TRUE(update_bootloader_message_in_struct(&boot, options)); in TEST()
80 ASSERT_EQ("boot-recovery", std::string(boot.command)); in TEST()
81 ASSERT_EQ("recovery\n", std::string(boot.recovery)); in TEST()
84 ASSERT_EQ(std::string(sizeof(boot.status), '\0'), std::string(boot.status, sizeof(boot.status))); in TEST()
85 ASSERT_EQ(std::string(sizeof(boot.stage), '\0'), std::string(boot.stage, sizeof(boot.stage))); in TEST()
86 ASSERT_EQ(std::string(sizeof(boot.reserved), '\0'), in TEST()
87 std::string(boot.reserved, sizeof(boot.reserved))); in TEST()
98 bootloader_message boot = {}; in TEST() local
99 ASSERT_TRUE(update_bootloader_message_in_struct(&boot, options)); in TEST()
103 ASSERT_GE(expected.size(), sizeof(boot.recovery)); in TEST()
106 ASSERT_EQ("boot-recovery", std::string(boot.command)); in TEST()
107 ASSERT_EQ(expected.substr(0, sizeof(boot.recovery) - 1), std::string(boot.recovery)); in TEST()
108 ASSERT_EQ('\0', boot.recovery[sizeof(boot.recovery) - 1]); in TEST()
111 ASSERT_EQ(std::string(sizeof(boot.status), '\0'), std::string(boot.status, sizeof(boot.status))); in TEST()
112 ASSERT_EQ(std::string(sizeof(boot.stage), '\0'), std::string(boot.stage, sizeof(boot.stage))); in TEST()
113 ASSERT_EQ(std::string(sizeof(boot.reserved), '\0'), in TEST()
114 std::string(boot.reserved, sizeof(boot.reserved))); in TEST()