dglo / dor-driver

Test upload of Mantis issues
0 stars 0 forks source link

[jkelley on 2020-02-17 22:18:35] : Error check when reading domid when power off never satisfied #131

Open dglo opened 3 years ago

dglo commented 3 years ago

The updated compiler in RHEL8 catches this in the driver:

/home/icecube/jkelley/dor-driver/driver/dh.c: In function ‘dh_domid_read_proc’: /home/icecube/jkelley/dor-driver/driver/dh.c:5325:60: warning: comparison of constant ‘2’ with boolean expression is always false [-Wbool-compare] if(! dh_get_pair_pwr_state(d->cardnum, d->pairnum) == DH_PWR_STATE_ON / Powered on / ^~ /home/icecube/jkelley/dor-driver/driver/dh.c:5325:60: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] /home/icecube/jkelley/dor-driver/driver/dh.c:5325:12: note: add parentheses around left hand side expression to silence this warning if(! dh_get_pair_pwr_state(d->cardnum, d->pairnum) == DH_PWR_STATE_ON / Powered on / ^~~~~~~~~~~ ( )

dglo commented 3 years ago

[jkelley on 2020-02-18 01:47:32] Very minor bug. Trying to read the id will still produce an error, it just takes a while to timeout.

$ cat /proc/driver/domhub/card3/pair0/domA/id Can't get DOM ID for card 3 Pair 0 DOM A.

The correct behavior is to immediately return and report

Can't get ID for non-communicating DOM (card 3 Pair 0 DOM A).

dglo commented 3 years ago

[jkelley on 2020-02-18 17:12:39] Fixed in V02-16-00 by adding parentheses around equality state check.