tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/tests/lib/libusbhid



    Date:        Wed, 17 Aug 2016 12:10:43 +0000
    From:        "Jonathan A. Kollasch" <jakllsch%netbsd.org@localhost>
    Message-ID:  <20160817121043.14EEAFBC3%cvs.NetBSD.org@localhost>

  | Module Name:	src
  | Committed By:	jakllsch
  | Date:		Wed Aug 17 12:10:43 UTC 2016
  | 
  | Modified Files:
  | 	src/tests/lib/libusbhid: t_usbhid.c
  | 
  | Log Message:
  | t_usbhid/check_hid_get_data has been failing since it existed, mark as such

Do we know why it is failing?    That is, it is fairly obvious that
it has a signed/unsigned problem (or problems) somewhere given ...

t_usbhid.c:254: data != -128: == 128
t_usbhid.c:256: data != -1: == 255
t_usbhid.c:265: data != -32768: == 32768
t_usbhid.c:267: data != -1: == 65535

All of those indicate either sign extension happening when it shouldn't,
or not happening when it should.   Do we know which?   Or perhaps more
relevantly, is it the test that is broken, or the code/structs it is testing?

I took a (fairly quick) look a while ago, only to get totally lost - but
this one really ought to be fairly simple for someone who understands what
is what to figure out.

kre



Home | Main Index | Thread Index | Old Index