[Xapian-tickets] [Xapian] #770: Enquire::set_time_limit() doesn't work on NetBSD

Xapian nobody at xapian.org
Tue Oct 2 05:44:36 BST 2018


#770: Enquire::set_time_limit() doesn't work on NetBSD
--------------------------------+-------------------
        Reporter:  olly         |      Owner:  olly
            Type:  defect       |     Status:  new
        Priority:  normal       |  Milestone:
       Component:  Library API  |    Version:  1.4.7
        Severity:  minor        |   Keywords:
      Blocked By:               |   Blocking:
Operating System:  NetBSD       |
--------------------------------+-------------------
 Testcase matchtimelimit1 fails because the timeout doesn't actually fire.
 Reproduced with current RELEASE/1.4 and master.

 I've debugged a bit and both `timer_create()` and `timer_settime()` seem
 to succeed.  I also tried all four timers which seem to be available with
 the same results (we usually use `CLOCK_MONOTONIC` if we can, otherwise
 `CLOCK_REALTIME`):

 {{{
 #define CLOCK_REALTIME  0
 #define CLOCK_VIRTUAL   1
 #define CLOCK_PROF      2
 #define CLOCK_MONOTONIC 3
 }}}

 NetBSD has a `TIMER_RELTIME` constant to pass in flags, which Linux at
 least doesn't, and the NetBSD man page implies you need to specify
 `TIMER_RELTIME` or `TIMER_ABSTIME` - however from the header this isn't
 the problem:

 {{{
 #if defined(_NETBSD_SOURCE)
 #define TIMER_RELTIME   0x0     /* relative timer */
 #endif
 }}}

 And indeed specifying `TIMER_RELTIME` in `flags` doesn't help.

 Severity minor, since this doesn't seem to be a widely used feature, and
 isn't supported on all platforms anyway.  This ticket is because it looks
 like it ought to work on NetBSD, but doesn't (and because a testcase fails
 as a result of that).

--
Ticket URL: <https://trac.xapian.org/ticket/770>
Xapian <https://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list