From patchwork Tue Sep 29 12:23:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 11805723 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F00516CA for ; Tue, 29 Sep 2020 12:23:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C18A921941 for ; Tue, 29 Sep 2020 12:23:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="V7si+Mop" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732533AbgI2MXX (ORCPT ); Tue, 29 Sep 2020 08:23:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:24762 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732524AbgI2MXW (ORCPT ); Tue, 29 Sep 2020 08:23:22 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601382201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=+59t8nhMuIvZqQRatGY9+VNUbMSmHZDTpsf5ZrAqbOE=; b=V7si+Mopbr7urZM3cNNK2VQUspQdHra8xSIu8g84y29Ne8Iz8mJBewqkJCFHUI1a8vsN8m qYyqN/cPEHZtlOqdUhhLADCA7EJYZETydOtbQk249OT40YF8tVOFNHsc5BGiEUK3SPQCov 26ZziXuG+2UoBWBN10xbX1Na5VgiUiY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-497-01Y-MrgTN7eWG29kUhKGzA-1; Tue, 29 Sep 2020 08:23:19 -0400 X-MC-Unique: 01Y-MrgTN7eWG29kUhKGzA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0143510A7AE1 for ; Tue, 29 Sep 2020 12:23:18 +0000 (UTC) Received: from virtlab511.virt.lab.eng.bos.redhat.com (virtlab511.virt.lab.eng.bos.redhat.com [10.19.152.198]) by smtp.corp.redhat.com (Postfix) with ESMTP id B8BB760F96 for ; Tue, 29 Sep 2020 12:23:17 +0000 (UTC) From: Paolo Bonzini To: kvm@vger.kernel.org Subject: [PATCH kvm-unit-tests] runtime: SKIP if required sysfs file is missing Date: Tue, 29 Sep 2020 08:23:17 -0400 Message-Id: <20200929122317.889256-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This fixes the test once more, so that we correctly skip for example access-reduced-maxphyaddr on AMD processors. Signed-off-by: Paolo Bonzini Reviewed-by: Andrew Jones --- scripts/runtime.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/runtime.bash b/scripts/runtime.bash index 3121c1f..f070e14 100644 --- a/scripts/runtime.bash +++ b/scripts/runtime.bash @@ -118,7 +118,7 @@ function run() for check_param in "${check[@]}"; do path=${check_param%%=*} value=${check_param#*=} - if [ -f "$path" ] && [ "$(cat $path)" != "$value" ]; then + if ! [ -f "$path" ] || [ "$(cat $path)" != "$value" ]; then print_result "SKIP" $testname "" "$path not equal to $value" return 2 fi