Lines Matching defs:observed
40 /* Report as observed from console. */
45 } observed = {
46 .lock = __SPIN_LOCK_UNLOCKED(observed.lock),
49 /* Probe for console output: obtains observed lines of interest. */
55 spin_lock_irqsave(&observed.lock, flags);
56 nlines = observed.nlines;
65 strscpy(observed.lines[0], buf, min(len + 1, sizeof(observed.lines[0])));
68 strscpy(observed.lines[nlines++], buf, min(len + 1, sizeof(observed.lines[0])));
71 WRITE_ONCE(observed.nlines, nlines); /* Publish new nlines. */
72 spin_unlock_irqrestore(&observed.lock, flags);
78 return READ_ONCE(observed.nlines) == ARRAY_SIZE(observed.lines);
94 /* Check observed report matches information in @r. */
100 typeof(observed.lines) expect;
167 spin_lock_irqsave(&observed.lock, flags);
171 /* Finally match expected output to what we actually observed. */
172 ret = strstr(observed.lines[0], expect[0]) && strstr(observed.lines[1], expect[1]);
174 spin_unlock_irqrestore(&observed.lock, flags);
827 spin_lock_irqsave(&observed.lock, flags);
828 for (i = 0; i < ARRAY_SIZE(observed.lines); i++)
829 observed.lines[i][0] = '\0';
830 observed.nlines = 0;
831 spin_unlock_irqrestore(&observed.lock, flags);