Description of problem:
In rhnsd an integer/float will be added to time_t, what is not recommended.
Instead of that difftime shall be used - in the way we do not add amount of seconds to time_t, but to go the other way around - to make a difference of two times in time_t
double difftime ( time_t time2, time_t time1 );
Return difference between two times
Calculates the difference in seconds between time1 and time2.
time2 - time_t object representing the latter of the two times.
time1 - time_t object representing the earlier of the two times.
The difference in seconds (time2-time1) as a floating point double.
Version-Release number of selected component (if applicable):
time_t + float(int)
isn't strictly defined and may cause troubles mainly in the future, when internal representation of time_t changes
difftime() is recommended for time differences and shall always return time difference in seconds (also in the future)
Tomas, the comment 0 is fairly confusing. Could you please amend the bugzilla with Actual results and Expected results, so that we have something to work wich while acking the proposed change, not mentioning the fact that QA will want this to make a test plan (should we ever decide some change is called for)?
Your cooperation in this matter would be greatly appreciated.
As already discussed with Simon, there's no real test plan available.
Everything we can do is to:
# grep difftime client/rhel/rhnsd/rhnsd.c
Adding float to time_t doesn't return correct values, however the deviation is that small (lowest rhnsd interval is 1 hour) that it's not really possible for QA to detect the difference between the correct behavior and misbehavior.
This BZ doesn't address any visible misbehavior, it addresses the concept and usage of adding and comparing of date structures.
Thank you, Tomáš. Setting devel ack then. Let's leave it on QA to decide if they'd be able to QA the change at all.
Quality Engineering Management has reviewed and declined this request. You may
appeal this decision by reopening this request.