mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
tests: Print content of channels to investigate random failures
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -89,6 +89,7 @@ static int check_channel_output(ssh_channel c, const char *expected)
|
|||||||
nbytes = ssh_channel_read(c, buffer, sizeof(buffer) - 1, 0);
|
nbytes = ssh_channel_read(c, buffer, sizeof(buffer) - 1, 0);
|
||||||
while (nbytes > 0) {
|
while (nbytes > 0) {
|
||||||
buffer[nbytes]='\0';
|
buffer[nbytes]='\0';
|
||||||
|
ssh_log_hexdump("Read bytes:", (unsigned char *)buffer, nbytes);
|
||||||
if (strstr(buffer, expected) != NULL)
|
if (strstr(buffer, expected) != NULL)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user