From nobody Mon Apr 29 14:10:04 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 209.132.183.28 is neither permitted nor denied by domain of redhat.com) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 209.132.183.28 is neither permitted nor denied by domain of redhat.com) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1504083367219409.7327679799538; Wed, 30 Aug 2017 01:56:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3D7391FCC; Wed, 30 Aug 2017 08:56:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 21ABC9152C; Wed, 30 Aug 2017 08:56:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 77E5A4EBDD; Wed, 30 Aug 2017 08:56:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v7U8txo2015908 for ; Wed, 30 Aug 2017 04:55:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id 95CEB8479B; Wed, 30 Aug 2017 08:55:59 +0000 (UTC) Received: from caroline.localdomain (unknown [10.43.2.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 62D16871E6; Wed, 30 Aug 2017 08:55:55 +0000 (UTC) Received: from caroline.brq.redhat.com (caroline.brq.redhat.com [127.0.0.1]) by caroline.localdomain (Postfix) with ESMTP id 19BEA120703; Wed, 30 Aug 2017 10:55:54 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E3D7391FCC Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Martin Kletzander To: libvir-list@redhat.com Date: Wed, 30 Aug 2017 10:55:51 +0200 Message-Id: <21864e28ad26aec21d75b4d9b67b09acc800bf0e.1504083341.git.mkletzan@redhat.com> In-Reply-To: <5b42e638-7ce6-489d-a335-0b054b155de8@redhat.com> References: <5b42e638-7ce6-489d-a335-0b054b155de8@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Michal Privoznik Subject: [libvirt] [PATCH] tests: Fix virnetsockettest after SSH command line changes X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 30 Aug 2017 08:56:05 +0000 (UTC) X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Commit e4cb8500810a changed the way ssh command line is created by adding '--' before the hostname in order to fix a potential security flaw. However it failed to modify the tests, so let's do that. Signed-off-by: Martin Kletzander --- Pushed under the build-breaker rule. tests/virnetsockettest.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c index c36886137a03..9f9a24348449 100644 --- a/tests/virnetsockettest.c +++ b/tests/virnetsockettest.c @@ -491,7 +491,7 @@ mymain(void) struct testSSHData sshData1 =3D { .nodename =3D "somehost", .path =3D "/tmp/socket", - .expectOut =3D "somehost sh -c 'if 'nc' -q 2>&1 | grep \"requires = an argument\" >/dev/null 2>&1; then " + .expectOut =3D "-- somehost sh -c 'if 'nc' -q 2>&1 | grep \"requir= es an argument\" >/dev/null 2>&1; then " "ARG=3D-q0;" "else " "ARG=3D;" @@ -509,7 +509,7 @@ mymain(void) .noTTY =3D true, .noVerify =3D false, .path =3D "/tmp/socket", - .expectOut =3D "-p 9000 -l fred -T -o BatchMode=3Dyes -e none some= host sh -c '" + .expectOut =3D "-p 9000 -l fred -T -o BatchMode=3Dyes -e none -- s= omehost sh -c '" "if 'netcat' -q 2>&1 | grep \"requires an argument\" = >/dev/null 2>&1; then " "ARG=3D-q0;" "else " @@ -528,7 +528,7 @@ mymain(void) .noTTY =3D false, .noVerify =3D true, .path =3D "/tmp/socket", - .expectOut =3D "-p 9000 -l fred -o StrictHostKeyChecking=3Dno some= host sh -c '" + .expectOut =3D "-p 9000 -l fred -o StrictHostKeyChecking=3Dno -- s= omehost sh -c '" "if 'netcat' -q 2>&1 | grep \"requires an argument\" = >/dev/null 2>&1; then " "ARG=3D-q0;" "else " @@ -550,7 +550,7 @@ mymain(void) struct testSSHData sshData5 =3D { .nodename =3D "crashyhost", .path =3D "/tmp/socket", - .expectOut =3D "crashyhost sh -c " + .expectOut =3D "-- crashyhost sh -c " "'if 'nc' -q 2>&1 | grep \"requires an argument\" >/d= ev/null 2>&1; then " "ARG=3D-q0;" "else " @@ -567,7 +567,7 @@ mymain(void) .path =3D "/tmp/socket", .keyfile =3D "/root/.ssh/example_key", .noVerify =3D true, - .expectOut =3D "-i /root/.ssh/example_key -o StrictHostKeyChecking= =3Dno example.com sh -c '" + .expectOut =3D "-i /root/.ssh/example_key -o StrictHostKeyChecking= =3Dno -- example.com sh -c '" "if 'nc' -q 2>&1 | grep \"requires an argument\" >/de= v/null 2>&1; then " "ARG=3D-q0;" "else " @@ -582,7 +582,7 @@ mymain(void) .nodename =3D "somehost", .netcat =3D "nc -4", .path =3D "/tmp/socket", - .expectOut =3D "somehost sh -c 'if ''nc -4'' -q 2>&1 | grep \"requ= ires an argument\" >/dev/null 2>&1; then " + .expectOut =3D "-- somehost sh -c 'if ''nc -4'' -q 2>&1 | grep \"r= equires an argument\" >/dev/null 2>&1; then " "ARG=3D-q0;" "else " "ARG=3D;" -- 2.14.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list