function randstring()
{
[ "$2" == "0" ] && CHAR="[:alnum:]" || CHAR="[:graph:]"
- cat /dev/urandom | tr -cd "$CHAR" | head -c ${1:-16}
+ cat /dev/urandom 2>/dev/null | tr -cd "$CHAR" 2>/dev/null | head -c ${1:-16} 2>/dev/null
+ echo
+}
+
+# Return the number of _configured_ CPUs.
+function conf_proc_count()
+{
+ getconf _NPROCESSORS_CONF
+ if [ $? -ne 0 ]; then
+ diag "Failed to get the number of configured CPUs"
+ fi
echo
}
if [ "$count" -ne "$nr_iter" ]; then
fail "Trace match"
- diag "$count events found in trace"
+ diag "$count matching events found in trace"
else
pass "Trace match"
fi