Bug 210785

Summary: usr.bin/lastcomm and usr.sbin/sa tests should not test for hardcoded dates
Product: Base System Reporter: Enji Cooper <ngie>
Component: testsAssignee: freebsd-testing (Nobody) <testing>
Status: Open ---    
Severity: Affects Some People CC: emaste, re
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210329

Description Enji Cooper freebsd_committer freebsd_triage 2016-07-03 17:58:32 UTC
Both the lastcomm and sa tests test for hardcoded dates. IMHO (and others) this wort should be removed and replaced with something that doesn't contain hardcoded date information.

Using epoch time (if possible) might be better, but I need to do more investigation into the subsystem before I can propose an official solution.
Comment 1 Glen Barber freebsd_committer freebsd_triage 2016-08-08 15:47:03 UTC
Any update on this?
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-01-08 04:14:25 UTC
For the following conditions
Product: Base System, Documentation Status: New, Open, In Progress, UNCONFIRMED 
Assignee: Former FreeBSD committer 

Reset to default assignee. Reset status to "Open".
Comment 3 Ed Maste freebsd_committer freebsd_triage 2023-09-22 18:23:18 UTC
Related, I landed a pull request to have lastcomm include seconds, and had to update the tests as a result

commit f079ef5b6a3c6d8800724286675199f79b553ccb
Author: Ed Maste <emaste@FreeBSD.org>
Date:   Fri Sep 22 13:51:34 2023 -0400

    lastcomm: update amd64 tests for additional timestamp resolution
    
    Fixes: 6f4ce7e89ba4 ("lastcomm: improve timestamp display")
    Sponsored by:   The FreeBSD Foundation

The i386 tests still need an equivalent update
Comment 4 Ed Maste freebsd_committer freebsd_triage 2023-09-22 18:48:34 UTC
i386 timestamps:

commit 407e2d7cf1b6762c9768eaff60500b8d007cd81c (HEAD -> main)
Author: Ed Maste <emaste@FreeBSD.org>
Date:   Fri Sep 22 14:46:52 2023 -0400

    lastcomm: update i386 tests for additional timestamp resolution
    
    Fixes: 6f4ce7e89ba4 ("lastcomm: improve timestamp display")
    Sponsored by:   The FreeBSD Foundation