Lines Matching refs:boot
34 bootloader_message boot = {}; in TEST() local
35 strlcpy(boot.command, "command", sizeof(boot.command)); in TEST()
36 strlcpy(boot.recovery, "message1\nmessage2\n", sizeof(boot.recovery)); in TEST()
37 strlcpy(boot.status, "status1", sizeof(boot.status)); in TEST()
40 ASSERT_TRUE(write_bootloader_message_to(boot, temp_misc.path, &err)) in TEST()
48 ASSERT_EQ(std::string(reinterpret_cast<const char*>(&boot), sizeof(boot)), in TEST()
56 bootloader_message boot = {}; in TEST() local
58 strlcpy(boot.recovery, "random message", sizeof(boot.recovery)); in TEST()
59 strlcpy(boot.status, "status bytes", sizeof(boot.status)); in TEST()
60 strlcpy(boot.stage, "stage bytes", sizeof(boot.stage)); in TEST()
61 strlcpy(boot.reserved, "reserved bytes", sizeof(boot.reserved)); in TEST()
63 ASSERT_TRUE(update_bootloader_message_in_struct(&boot, options)); in TEST()
66 ASSERT_EQ("boot-recovery", std::string(boot.command)); in TEST()
68 ASSERT_EQ(expected, std::string(boot.recovery)); in TEST()
71 ASSERT_EQ("status bytes", std::string(boot.status)); in TEST()
72 ASSERT_EQ("stage bytes", std::string(boot.stage)); in TEST()
73 ASSERT_EQ("reserved bytes", std::string(boot.reserved)); in TEST()
81 bootloader_message boot = {}; in TEST() local
82 ASSERT_TRUE(update_bootloader_message_in_struct(&boot, options)); in TEST()
85 ASSERT_EQ("boot-recovery", std::string(boot.command)); in TEST()
86 ASSERT_EQ("recovery\n", std::string(boot.recovery)); in TEST()
89 ASSERT_EQ(std::string(sizeof(boot.status), '\0'), std::string(boot.status, sizeof(boot.status))); in TEST()
90 ASSERT_EQ(std::string(sizeof(boot.stage), '\0'), std::string(boot.stage, sizeof(boot.stage))); in TEST()
91 ASSERT_EQ(std::string(sizeof(boot.reserved), '\0'), in TEST()
92 std::string(boot.reserved, sizeof(boot.reserved))); in TEST()
103 bootloader_message boot = {}; in TEST() local
104 ASSERT_TRUE(update_bootloader_message_in_struct(&boot, options)); in TEST()
108 ASSERT_GE(expected.size(), sizeof(boot.recovery)); in TEST()
111 ASSERT_EQ("boot-recovery", std::string(boot.command)); in TEST()
112 ASSERT_EQ(expected.substr(0, sizeof(boot.recovery) - 1), std::string(boot.recovery)); in TEST()
113 ASSERT_EQ('\0', boot.recovery[sizeof(boot.recovery) - 1]); in TEST()
116 ASSERT_EQ(std::string(sizeof(boot.status), '\0'), std::string(boot.status, sizeof(boot.status))); in TEST()
117 ASSERT_EQ(std::string(sizeof(boot.stage), '\0'), std::string(boot.stage, sizeof(boot.stage))); in TEST()
118 ASSERT_EQ(std::string(sizeof(boot.reserved), '\0'), in TEST()
119 std::string(boot.reserved, sizeof(boot.reserved))); in TEST()