Bug 210785 - usr.bin/lastcomm and usr.sbin/sa tests should not test for hardcoded dates
Summary: usr.bin/lastcomm and usr.sbin/sa tests should not test for hardcoded dates
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-testing (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-03 17:58 UTC by Enji Cooper
Modified: 2023-09-22 18:48 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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