Lines Matching full:observed
35 /* Report as observed from console. */
40 } observed = { variable
41 .lock = __SPIN_LOCK_UNLOCKED(observed.lock),
44 /* Probe for console output: obtains observed lines of interest. */
50 spin_lock_irqsave(&observed.lock, flags); in probe_console()
51 nlines = observed.nlines; in probe_console()
60 strscpy(observed.lines[0], buf, min(len + 1, sizeof(observed.lines[0]))); in probe_console()
63 strscpy(observed.lines[nlines++], buf, min(len + 1, sizeof(observed.lines[0]))); in probe_console()
66 WRITE_ONCE(observed.nlines, nlines); /* Publish new nlines. */ in probe_console()
67 spin_unlock_irqrestore(&observed.lock, flags); in probe_console()
73 return READ_ONCE(observed.nlines) == ARRAY_SIZE(observed.lines); in report_available()
89 /* Check observed report matches information in @r. */
95 typeof(observed.lines) expect; in report_matches()
162 spin_lock_irqsave(&observed.lock, flags); in report_matches()
166 /* Finally match expected output to what we actually observed. */ in report_matches()
167 ret = strstr(observed.lines[0], expect[0]) && strstr(observed.lines[1], expect[1]); in report_matches()
169 spin_unlock_irqrestore(&observed.lock, flags); in report_matches()
806 spin_lock_irqsave(&observed.lock, flags); in test_init()
807 for (i = 0; i < ARRAY_SIZE(observed.lines); i++) in test_init()
808 observed.lines[i][0] = '\0'; in test_init()
809 observed.nlines = 0; in test_init()
810 spin_unlock_irqrestore(&observed.lock, flags); in test_init()