[Piglit] [PATCH] KHR_debug: test PushDebugGroup() and PopDebugGroup()

Timothy Arceri t_arceri at yahoo.com.au
Wed Feb 19 00:16:17 PST 2014


> > +		/* double check that TestMessage3 didnt sneak into the log */
> > +		nextMessage = 0;
> > +		for (i = 0; i < count; i++) {
> > +			if (strstr(messageLog+nextMessage, TestMessage3) != NULL) {
> > +				fprintf(stderr, "The log should not contain the message: %s",
> > +					messageLog+nextMessage);
> > +				pass = false;
> > +			}
> > +			nextMessage += lengths[i];
> > +		}
> 
> Are the individual messages in the log NUL terminated?  Does lengths[i]
> include the terminator?

Yes and yes. Am I doing something wrong here?

>From the spec:
"If multiple messages are fetched, their strings are concatenated into
the same <messageLog> array and will be separated by single null
terminators."

"The string lengths stored in the array <lengths> include the space for
the null terminator of each string."



More information about the Piglit mailing list