Page MenuHomeFreeBSD

Fix utils/datetime_test:timestamp__subtraction
ClosedPublic

Authored by ngie on Apr 8 2017, 6:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 21, 10:46 PM
Unknown Object (File)
Feb 8 2026, 3:36 AM
Unknown Object (File)
Jan 31 2026, 4:09 AM
Unknown Object (File)
Dec 25 2025, 11:51 PM
Unknown Object (File)
Dec 19 2025, 1:43 AM
Unknown Object (File)
Nov 18 2025, 2:06 PM
Unknown Object (File)
Nov 15 2025, 1:07 PM
Unknown Object (File)
Nov 8 2025, 1:36 AM

Details

Summary

Fix utils/datetime_test:timestamp__subtraction

Don't expect a negative time delta to throw an exception--instead, expect
1 microsecond to be returned per the behavior change made in r436312.

PR: 217973
Reported by: Jenkins
Sponsored by: Dell EMC Isilon

Test Plan
$ pkg info | grep kyua
kyua-0.13_2,3                  Testing framework for infrastructure software
$ cd /usr/tests/local/kyua/
$ sudo kyua test
$ sudo kyua report --results-filter passed | grep subtraction
utils/datetime_test:timestamp__subtraction  ->  passed  [0.007s]
$ sudo kyua report --results-filter passed | tail -n 4       
===> Summary
Results read from /root/.kyua/store/results.usr_local_tests_kyua.20160406-215207-780891.db
Test cases: 1413 total, 3 skipped, 0 expected failures, 0 broken, 0 failed
Total time: 39.398s

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

asomers added a subscriber: asomers.

Apart from the changes to the unrelated patch file, this change LGTM and fixes the test breakage.

devel/kyua/files/patch-utils_datetime.cpp
4 ↗(On Diff #27221)

It looks like this patch was rebuilt with "make makepatch". But the changes are just line noise. You should probably revert this file.

This revision is now accepted and ready to land.Apr 8 2017, 3:39 PM
mat requested changes to this revision.Apr 9 2017, 11:08 AM
mat added inline comments.
devel/kyua/files/patch-utils_datetime.cpp
2 ↗(On Diff #27221)

Remove that line.

4–6 ↗(On Diff #27221)

Revert this change, it is metadata only.

This revision now requires changes to proceed.Apr 9 2017, 11:08 AM

@jmmv , if you're okay with this change (utils/datetime_test.cpp), I can fix other parts of this patch and commit it. Thanks.

ngie marked 3 inline comments as done.Apr 10 2017, 4:19 PM
ngie added inline comments.
devel/kyua/files/patch-utils_datetime.cpp
2 ↗(On Diff #27221)

brooks@ did it in a prior commit. Fixing.

ngie edited edge metadata.
ngie marked 2 inline comments as done.

Update per feedback from asomers and mat

I fixed the issues requested. Please let me know if you'd like me to adjust the code.

I'll see if I can get a hold of jmmv@.

This revision is now accepted and ready to land.Apr 12 2017, 6:10 PM