ClusterLabs / libqb

libqb is a library providing high performance logging, tracing, ipc, and poll.
http://clusterlabs.github.io/libqb/
GNU Lesser General Public License v2.1
165 stars 97 forks source link

tests: Make ipc test more portable #466

Closed chrissie-c closed 2 years ago

chrissie-c commented 2 years ago

fix a couple of errors reported by covscan

  1. /usr/lib64/libqb/tests/resources.test:8:34: warning[SC2039]: In POSIX sh, UID is undefined.
  2. /usr/lib64/libqb/tests/resources.test:8:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
  3. /usr/lib64/libqb/tests/ipc_sock.test:10:34: warning[SC2039]: In POSIX sh, UID is undefined.
  4. /usr/lib64/libqb/tests/ipc_sock.test:10:30: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
fabbione commented 2 years ago

ack

chrissie-c commented 2 years ago

The new code covscan warnings can be waived. 1) rand() is called in a test program that's is nothing to do with crypto 2) max_msg_size can never be -1 or it's unsigned equivalent unless the user explicitly makes it so with a library call.