From patchwork Thu Jun 3 10:36:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1487170 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fwj4Q07Fyz9s24; Thu, 3 Jun 2021 20:36:36 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lokiE-0006BQ-AP; Thu, 03 Jun 2021 10:36:30 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lokiC-0006BF-Uq for kernel-team@lists.ubuntu.com; Thu, 03 Jun 2021 10:36:28 +0000 Received: from mail-ej1-f70.google.com ([209.85.218.70]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lokiC-0007t2-N0 for kernel-team@lists.ubuntu.com; Thu, 03 Jun 2021 10:36:28 +0000 Received: by mail-ej1-f70.google.com with SMTP id z6-20020a17090665c6b02903700252d1ccso1792515ejn.10 for ; Thu, 03 Jun 2021 03:36:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ml5m8wq46v3elGG77G9khcmj71iEPfSk4vG0exVkzD0=; b=tEcp67InTXpaMqRfEuKPPGNVLxloH1Yjz4h8u2GR/IA3LLkFO92arpc23vUFdk6fSH l85Y0KJ9BGqNhhJJfFLMGJlDUeVpV7PDTyWbNvcNPvNXHnLgj6gN8RQC7yzYk7XaUhPv s4qJwETopDjkTnUxJ4Xx5X5CbmAAnY7gn9dUjDS9jwVXXXqP1gcmV/w9r0Iz5X2MUHga ITmHHRxqSME3HFaRgUSMcspCeZqTLSqcRAYkknjyQm4/a9p7PA0jhzhujuZbGsaUiVeG mRUP2wrzv85TmBbD0EKTIhhuXgkkJq/VMRAZLkJvb167mil/NhYf22sHySSzMeDqGNP8 hHMA== X-Gm-Message-State: AOAM5300VuocvGFZqP+gIKORMOB1woszP2tLgEpTkCO9rms+Gckku6BN IrpvjUP81LXdtgaS7P3TO2ngDm+aRcXSTu3Lq5j9+mkUd8XTELujqMYHx1Le+5gneC1dC8vZuqd BPNfC0FgQRIehezyrvr1If+xbkKUmMHpwfmvA8Up/9w== X-Received: by 2002:a17:906:f889:: with SMTP id lg9mr10395894ejb.82.1622716588242; Thu, 03 Jun 2021 03:36:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxv3+7SUscZORPDb5/6I2yOVvXVV0AFn8gVp7+6iRMWDaEluMwV9Z6dli8xx2SdDnk5tXe6Dw== X-Received: by 2002:a17:906:f889:: with SMTP id lg9mr10395881ejb.82.1622716588041; Thu, 03 Jun 2021 03:36:28 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-185-9.adslplus.ch. [188.155.185.9]) by smtp.gmail.com with ESMTPSA id n2sm1547498edi.32.2021.06.03.03.36.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Jun 2021 03:36:27 -0700 (PDT) From: Krzysztof Kozlowski To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: SAUCE: ubuntu_sysdig_smoke_test: fix test missing file names Date: Thu, 3 Jun 2021 12:36:20 +0200 Message-Id: <20210603103620.26065-1-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" The sysdig is unable to report the name of file used in reads and writes. This maybe worked some time ago, but definitely does not work with sysdig 0.27.1. For dd, cat or cp, the sysdig reports only arguments: cp (3558) < execve res=0 exe=cp args=/tmp/somefile./tmp/otherfile. tid=3558(cp) pid=3558(cp) ptid=1151(bash) and all further reads/writes are to file descriptors, e.g.: write fd=4 size=131072 Also sysdig reporting tools fail to find the name of file used in IO: $ sysdig -r ${TMPFILE}.raw -c fdbytes_by fd.name Bytes fd.name ------------------------------------------------ 1024.00KB /dev/pts/1 $ sysdig -r ${TMPFILE}.raw -c echo_fds ------ Write 1024B to /dev/pts/1 (dd) Fix the test by looking only for reads or writes tgo any descriptor. It is clearly a limitation of sysdig so the test should not expect and test more than the tool can provide. This fixes the test failures like: FAILED (trace at least 25 reads of /dev/zero by dd) FAILED (trace at least 25 writes to /dev/null by dd) BugLink: https://bugs.launchpad.net/bugs/1844493 Signed-off-by: Krzysztof Kozlowski Acked-by: Colin Ian King Acked-by: Guilherme G. Piccoli --- ubuntu_sysdig_smoke_test/ubuntu_sysdig_smoke_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubuntu_sysdig_smoke_test/ubuntu_sysdig_smoke_test.sh b/ubuntu_sysdig_smoke_test/ubuntu_sysdig_smoke_test.sh index b6df4564ef73..bfd6bdca2d29 100755 --- a/ubuntu_sysdig_smoke_test/ubuntu_sysdig_smoke_test.sh +++ b/ubuntu_sysdig_smoke_test/ubuntu_sysdig_smoke_test.sh @@ -140,8 +140,8 @@ test_sysdig_context_switch() events=$(wc -l ${TMPFILE} | cut -d' ' -f1) switches=$(grep switch ${TMPFILE} | wc -l | cut -d' ' -f1) - ddrdzero=$(grep read ${TMPFILE} | grep "/dev/zero" | wc -l | cut -d' ' -f1) - ddwrnull=$(grep write ${TMPFILE} | grep "/dev/null" | wc -l | cut -d' ' -f1) + ddrdzero=$(grep read ${TMPFILE} | wc -l | cut -d' ' -f1) + ddwrnull=$(grep write ${TMPFILE} | wc -l | cut -d' ' -f1) if [ $switches -ge ${THRESHOLD} -a \ $ddrdzero -ge ${THRESHOLD} -a \