Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

logical errors in all time_difference test content #1

Open
drothenberg opened this issue Nov 7, 2013 · 0 comments
Open

logical errors in all time_difference test content #1

drothenberg opened this issue Nov 7, 2013 · 0 comments
Labels

Comments

@drothenberg
Copy link

Test oval:org.mitre.oval.test:tst:1087 (in Windows oval-def_time_difference_function.xml) compares object oval:org.mitre.oval.test:obj:405 to state oval:org.mitre.oval.test:ste:96.

Object oval:org.mitre.oval.test:obj:405 is the difference between the dates February 2, 2004 and April 4, 2009. That is 1884 days (including 2 leap days!), or 162777600 seconds. However, oval:org.mitre.oval.test:ste:96 is defined as 162774000 seconds, which is one hour short.

Therefore, this test should evaluate to false, or more likely the state value should be changed to 162777600.

There are also issues with oval:org.mitre.oval.test:tst:427 and oval:org.mitre.oval.test:tst:1066. Both of these tests measure the time difference between Jan 1, 1975 and May 5, 1975, which is 120 days, or 10368000 secs. Yet both states (oval:org.mitre.oval.test:ste:783 and oval:org.mitre.oval.test:ste:536 -- by the way, why are there two different states representing the same result?) are set to 10364400. Again, one hour short.

I am pretty much certain that there are analogous problems with the time difference test XML documents for Linux, Solaris and Mac OS X, because the automated jOVAL time_difference tests are failing for those platforms as well!

Note that both of these time spans involve changes from winter to spring, and both are one hour short. I believe the culprit is an unintentional use of daylight savings time in ovaldi's time_difference computation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant