[google/syzkaller] 3f2e65: pkg/email: fix environment-dependent time comparis...

6 views
Skip to first unread message

Alexander Potapenko

unread,
Apr 20, 2026, 12:32:11 PM (3 days ago) Apr 20
to syzk...@googlegroups.com
Branch: refs/heads/gh-readonly-queue/master/pr-7091-e65da4eee4fd7ddb5a55c73c958410c8d90d8e82
Home: https://github.com/google/syzkaller
Commit: 3f2e655b2741ba770abc65f58ac94b7e897edae8
https://github.com/google/syzkaller/commit/3f2e655b2741ba770abc65f58ac94b7e897edae8
Author: Alexander Potapenko <gli...@google.com>
Date: 2026-04-20 (Mon, 20 Apr 2026)

Changed paths:
M pkg/email/parser_test.go

Log Message:
-----------
pkg/email: fix environment-dependent time comparison in TestParse

The test TestParse was failing in environments where the local time zone
offset matched the offset in the email date string (-0700). This caused
mail.ParseDate to return a time with time.Local location, which failed
equality with the expected fixed zone location in testify's assert.Equal.

To fix this, we now use time.Equal to check if the times represent the
same instant, and if so, align the location before calling assert.Equal.

To reproduce the problem, run:
CI=true ./tools/syz-env 'TZ="America/Los_Angeles" go test ./pkg/email -run TestParse -count=1'

Update #6915.



To unsubscribe from these emails, change your notification settings at https://github.com/google/syzkaller/settings/notifications

Alexander Potapenko

unread,
Apr 20, 2026, 12:44:02 PM (3 days ago) Apr 20
to syzk...@googlegroups.com
Branch: refs/heads/master
Reply all
Reply to author
Forward
0 new messages