Bug 210329

Summary: usr.bin/lastcomm tests fail on i386
Product: Base System Reporter: Alan Somers <asomers>
Component: testsAssignee: Enji Cooper <ngie>
Status: Closed FIXED    
Severity: Affects Many People CC: asomers, dds, i386, jmmv, ngie
Priority: --- Flags: ngie: mfc-stable10+
ngie: mfc-stable9-
Version: CURRENT   
Hardware: i386   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204154
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210785

Description Alan Somers freebsd_committer freebsd_triage 2016-06-16 17:39:37 UTC
The usr.bin/lastcomm tests pass on amd64, but fail on i386.  It looks like the golden output files were generated with the wrong time zone

kyua debug legacy_test:main
1..6
Files - and /usr/tests/usr.bin/lastcomm/v1-i386.out differ
not ok 1
Files - and /usr/tests/usr.bin/lastcomm/v1-i386.out differ
not ok 2
Files - and /usr/tests/usr.bin/lastcomm/v2-i386.out differ
not ok 3
Files - and /usr/tests/usr.bin/lastcomm/v2-i386.out differ
not ok 4
Files - and v1v2-i386.out differ
not ok 5
Files - and v1v2-i386.out differ
not ok 6
legacy_test:main  ->  failed: 6 tests of 6 failed

# uname -a
FreeBSD alans-fbsd-head-i386.eng.sldomain.com 11.0-ALPHA3 FreeBSD 11.0-ALPHA3 #0 r301815: Sat Jun 11 00:55:35 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386
Comment 1 Julio Merino,+1 347 694 0576,New York City freebsd_committer freebsd_triage 2016-06-17 01:34:16 UTC
Kyua forces the TZ to be UTC for all tests.

Also... why would the amd64 vs. i386 difference indicate anything about the timezone?
Comment 2 Alan Somers freebsd_committer freebsd_triage 2016-06-17 14:43:23 UTC
The tests uses different golden output files for each arch.  That's why I think that the i386 files may have been recorded in the wrong time zone.
Comment 3 Julio Merino,+1 347 694 0576,New York City freebsd_committer freebsd_triage 2016-06-17 14:53:52 UTC
Oh right, that's very likely. I think I dealt with these tests a while ago and I did not have an i386 VM to regenerate the data for this architecture...
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-07-03 17:52:51 UTC
A commit references this bug:

Author: ngie
Date: Sun Jul  3 17:52:21 UTC 2016
New revision: 302327
URL: https://svnweb.freebsd.org/changeset/base/302327

Log:
  Fix .../usr.bin/lastcomm/legacy_test:main on i386

  The time in the output files was ahead by 3 hours on i386. Fix the incorrect
  offset.

  Differential Revision: https://reviews.freebsd.org/D7079 (as part of a larger diff)
  MFC after: 1 week
  PR: 210329
  Reported by: asomers
  Approved by: re (gjb)
  Reviewed by: cem
  Sponsored by: EMC / Isilon Storage Division

Changes:
  head/usr.bin/lastcomm/tests/v1-i386.out
  head/usr.bin/lastcomm/tests/v2-i386.out
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-07-11 17:32:14 UTC
A commit references this bug:

Author: ngie
Date: Mon Jul 11 17:31:30 UTC 2016
New revision: 302583
URL: https://svnweb.freebsd.org/changeset/base/302583

Log:
  MFC r302327:

  Fix .../usr.bin/lastcomm/legacy_test:main on i386

  The time in the output files was ahead by 3 hours on i386. Fix the incorrect
  offset.

  PR: 210329

Changes:
_U  stable/10/
  stable/10/usr.bin/lastcomm/tests/v1-i386.out
  stable/10/usr.bin/lastcomm/tests/v2-i386.out