opnsense-src/tests/sys/kqueue/libkqueue
Kyle Evans 0fbdc3726a tests: kqueue: fix some issues with now() on ILP32 platforms
There were ultimately two separate problems here:
- a 32-bit long cannot represent microseconds since 1970 (noted by ian)
- time_t is 32-bit on i386, so now() was wrong anyways even with the correct
  return type.

For the first, just explicitly use a uint64_t for now() and all of the
callers. For the second, we need to explicitly cast tv_sec to uint64_t
before it gets multiplied in the SEC_TO_US macro. Casting this instance
rather than generally in the macro was arbitrarily chosen simply because all
other uses are converting small relative time values.

The tests now pass on i386, at least; presumably other ILP32 will be fine
now as well.
2020-04-20 00:47:28 +00:00
..
common.h Fix various warnings in tests/sys/kqueue and bump WARNS 2020-04-18 12:54:47 +00:00
config.h
kqueue_test.sh Temporarily skip flakey test cases 2018-12-06 09:22:35 +00:00
main.c Fix various warnings in tests/sys/kqueue and bump WARNS 2020-04-18 12:54:47 +00:00
Makefile Fix various warnings in tests/sys/kqueue and bump WARNS 2020-04-18 12:54:47 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
proc.c Fix various warnings in tests/sys/kqueue and bump WARNS 2020-04-18 12:54:47 +00:00
read.c Fix various warnings in tests/sys/kqueue and bump WARNS 2020-04-18 12:54:47 +00:00
signal.c Fix various warnings in tests/sys/kqueue and bump WARNS 2020-04-18 12:54:47 +00:00
timer.c tests: kqueue: fix some issues with now() on ILP32 platforms 2020-04-20 00:47:28 +00:00
user.c Fix various warnings in tests/sys/kqueue and bump WARNS 2020-04-18 12:54:47 +00:00
vnode.c Fix various warnings in tests/sys/kqueue and bump WARNS 2020-04-18 12:54:47 +00:00