Lines Matching refs:roll
83 struct rtc_time roll; in rtc_rollover() local
84 memset(&roll, 0, sizeof(roll)); in rtc_rollover()
85 ASSERT_LE(0, rd_hwtime(&roll)); in rtc_rollover()
87 mday[1] = (roll.tm_year % 4) ? 28 : 29; in rtc_rollover()
88 ASSERT_LE(0, roll.tm_sec); in rtc_rollover()
89 ASSERT_GT(60, roll.tm_sec); in rtc_rollover()
90 ASSERT_LE(0, roll.tm_min); in rtc_rollover()
91 ASSERT_GT(60, roll.tm_min); in rtc_rollover()
92 ASSERT_LE(0, roll.tm_hour); in rtc_rollover()
93 ASSERT_GT(24, roll.tm_hour); in rtc_rollover()
94 ASSERT_LE(0, roll.tm_mday); in rtc_rollover()
95 ASSERT_GE(mday[roll.tm_mon], roll.tm_mday); in rtc_rollover()
96 ASSERT_LE(0, roll.tm_mon); in rtc_rollover()
97 ASSERT_GT(12, roll.tm_mon); in rtc_rollover()
98 ASSERT_LE(0, roll.tm_year); in rtc_rollover()
99 ASSERT_GT(138, roll.tm_year); in rtc_rollover()
102 struct rtc_time save = roll; in rtc_rollover()
106 for (timeout = timeout_num; timeout && (roll.tm_year == save.tm_year); --timeout) { in rtc_rollover()
111 memset(&roll, 0, sizeof(roll)); in rtc_rollover()
112 roll.tm_sec = 59; in rtc_rollover()
113 roll.tm_min = 59; in rtc_rollover()
114 roll.tm_hour = 23; in rtc_rollover()
115 roll.tm_mday = 31; in rtc_rollover()
116 roll.tm_mon = 11; in rtc_rollover()
117 roll.tm_year = 70; in rtc_rollover()
118 roll.tm_wday = 0; in rtc_rollover()
119 roll.tm_yday = 0; in rtc_rollover()
120 roll.tm_isdst = 0; in rtc_rollover()
123 for (roll.tm_year = start; roll.tm_year < end; ++roll.tm_year) { in rtc_rollover()
124 struct rtc_time tm = roll; in rtc_rollover()
132 if ((__set_hwtime == -EINVAL) && (roll.tm_year < 116)) { in rtc_rollover()
137 ASSERT_EQ(roll.tm_sec, tm.tm_sec); in rtc_rollover()
138 ASSERT_EQ(roll.tm_min, tm.tm_min); in rtc_rollover()
139 ASSERT_EQ(roll.tm_hour, tm.tm_hour); in rtc_rollover()
140 ASSERT_EQ(roll.tm_mday, tm.tm_mday); in rtc_rollover()
141 ASSERT_EQ(roll.tm_mon, tm.tm_mon); in rtc_rollover()
142 ASSERT_EQ(roll.tm_year, tm.tm_year); in rtc_rollover()
143 for (timeout = timeout_num; timeout && (roll.tm_year == tm.tm_year); --timeout) { in rtc_rollover()
147 ASSERT_EQ(roll.tm_year + 1, tm.tm_year); in rtc_rollover()
174 ASSERT_LE(0, rd_hwtime(&roll)); in rtc_rollover()
177 ASSERT_EQ(save.tm_sec, roll.tm_sec); in rtc_rollover()
178 ASSERT_EQ(save.tm_min, roll.tm_min); in rtc_rollover()
179 ASSERT_EQ(save.tm_hour, roll.tm_hour); in rtc_rollover()
180 ASSERT_EQ(save.tm_mday, roll.tm_mday); in rtc_rollover()
181 ASSERT_EQ(save.tm_mon, roll.tm_mon); in rtc_rollover()
182 ASSERT_EQ(save.tm_year, roll.tm_year); in rtc_rollover()