Skip to content

Commit b0faa4f

Browse files
committed
In the latest kernels "pipe_read" is now "anon_pipe_read" so make this test more robust.
1 parent ddbcd9f commit b0faa4f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/test/clone_syscallbuf_cleanup_blocked.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ static int exec_proc(__attribute__((unused)) void* arg) {
3535
char wchan[1024] = {0};
3636
do {
3737
FILE *f = fopen(wchan_path, "r");
38-
fread(wchan, 1, 1024, f);
38+
size_t s = fread(wchan, 1, sizeof(wchan) - 1, f);
3939
fclose(f);
40-
} while (strncmp(wchan, "pipe_read", 1024) != 0);
40+
wchan[s] = 0;
41+
} while (strstr(wchan, "pipe_read") == 0);
4142

4243
sleep(1);
4344

0 commit comments

Comments
 (0)