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)
Dec 20 2023, 2:56 AM
Unknown Object (File)
Jun 19 2023, 8:20 PM
Unknown Object (File)
Mar 16 2023, 1:19 AM
Unknown Object (File)
Dec 23 2022, 5:51 AM
Unknown Object (File)
Apr 13 2017, 8:38 AM
Unknown Object (File)
Apr 9 2017, 8:45 PM
Unknown Object (File)
Apr 9 2017, 4:48 PM
Unknown Object (File)
Apr 9 2017, 4:35 PM

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