Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
94692c47
Commit
94692c47
authored
Apr 30, 2021
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give screen-width a second to change when expecting things.
parent
6362b7a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
vtc_process.c
bin/varnishtest/vtc_process.c
+13
-1
No files found.
bin/varnishtest/vtc_process.c
View file @
94692c47
...
...
@@ -301,7 +301,13 @@ term_expect_text(struct process *pp,
char
*
t
;
y
=
strtoul
(
lin
,
NULL
,
0
);
if
(
y
<
0
||
y
>
pp
->
nlin
)
vtc_fatal
(
pp
->
vl
,
"YYY %d nlin %d"
,
y
,
pp
->
nlin
);
x
=
strtoul
(
col
,
NULL
,
0
);
for
(
l
=
0
;
l
<
10
&&
x
>
pp
->
ncol
;
l
++
)
// wait for screen change
usleep
(
100000
);
if
(
x
<
0
||
x
>
pp
->
ncol
)
vtc_fatal
(
pp
->
vl
,
"XXX %d ncol %d"
,
x
,
pp
->
ncol
);
l
=
strlen
(
pat
);
AZ
(
pthread_mutex_lock
(
&
pp
->
mtx
));
while
(
!
term_match_text
(
pp
,
&
x
,
&
y
,
pat
))
{
...
...
@@ -323,12 +329,18 @@ term_expect_text(struct process *pp,
static
void
term_expect_cursor
(
const
struct
process
*
pp
,
const
char
*
lin
,
const
char
*
col
)
{
int
x
,
y
;
int
x
,
y
,
l
;
const
teken_pos_t
*
pos
;
pos
=
teken_get_cursor
(
pp
->
tek
);
y
=
strtoul
(
lin
,
NULL
,
0
);
if
(
y
<
0
||
y
>
pp
->
nlin
)
vtc_fatal
(
pp
->
vl
,
"YYY %d nlin %d"
,
y
,
pp
->
nlin
);
x
=
strtoul
(
col
,
NULL
,
0
);
for
(
l
=
0
;
l
<
10
&&
x
>
pp
->
ncol
;
l
++
)
// wait for screen change
usleep
(
100000
);
if
(
x
<
0
||
x
>
pp
->
ncol
)
vtc_fatal
(
pp
->
vl
,
"XXX %d ncol %d"
,
x
,
pp
->
ncol
);
if
(
y
!=
0
&&
(
y
-
1
)
!=
pos
->
tp_row
)
vtc_fatal
(
pp
->
vl
,
"Cursor on line %d (expected %d)"
,
pos
->
tp_row
+
1
,
y
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment