From patchwork Thu Mar 22 17:53:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Victor Kamensky \(kamensky\)" X-Patchwork-Id: 132311 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1144408ljb; Thu, 22 Mar 2018 10:53:47 -0700 (PDT) X-Google-Smtp-Source: AG47ELvia0yONYmtlIwMTKHVU3M9m90yGZcTfcENE1BUxfZFn3wZcG3dU0c0RCdtL33E1rOKxt1g X-Received: by 2002:a17:902:9a0c:: with SMTP id v12-v6mr19180205plp.142.1521741227009; Thu, 22 Mar 2018 10:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521741227; cv=none; d=google.com; s=arc-20160816; b=A9jI5PnJgROFWbyVXUEvyXMjyuyQvcSn2Te7MZvEzuzsAYpNQM8ojZd7VVAOPs9Tli tk9t/5UnVX9tpbXvJxo2+LM+zvgfi52imU9vFb9fkxo/kIG/dvMpn8RJ9r2un8TDwUO8 unM/j8FSQoieHLx6JuEham7F7KLIka+Rq7FkLJU8sa59S7oGT34nsUIpGWRDRVkeUHUd dKHwbaaakBP0qfq4Zu3bzcvDXNrjZM80aVINdcZOQ0LDaueRIdWiePWEcwEgCSjRwN2A +xl7nD/o66qinpaSSWLR6Scn40twvXD7oIy+o6cOJEpCjLqXT1I2ZQ8ccUV9YAh0DjT3 kIgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to:arc-authentication-results; bh=pcdt9pVPoI8KU2d9Hh/sAU2Qh1PznFK2FeYC+cDacpo=; b=JR25aV7Zj9xd//k7wPk05xEO4vUQBGG9sXisVVxFWKMJGCteP03rvIaYsLKTmHV5ET vFwNRXMymIFaFATki/l4+p4WgmhOeWDyesRF7eunaySh+eUmKaEW0+VryUJiJkd4FAAQ 2BNTBhzCoRjl/M0mlA/BPfiQk9s1TFrl6/IQmpuCxMUT2dH5bd6ibShCkMLaKl7vz8Pw j4odu8uEXTMDCF5nu08+YwJOKbu3LYuI2oD9HRyt3Y+c8vuNzPct/ga5gJIo8fjYQPaw hbzN5pdSN8z3kx/zp0JMuPY54lw0maz5GKzlVt3uVTqQfA3HPz28DqRJrBZbrR4BnzvH HVAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cisco.com header.s=iport header.b=bK7xcXt5; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cisco.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id a33-v6si1502046pla.618.2018.03.22.10.53.46; Thu, 22 Mar 2018 10:53:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=fail header.i=@cisco.com header.s=iport header.b=bK7xcXt5; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cisco.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 72AC77893A; Thu, 22 Mar 2018 17:53:43 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) by mail.openembedded.org (Postfix) with ESMTP id C023771C14 for ; Thu, 22 Mar 2018 17:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2165; q=dns/txt; s=iport; t=1521741219; x=1522950819; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=zlz51M82rxCz203biIrkdENu0K+qEC3MPz3w6DVzhkA=; b=bK7xcXt5eDohwyty9BR6FOHD2y2MEDlw9d1nOr5SeDIrZcys/wBNFES/ /0eCv3M83hmJsgyLMMqEf3Dn12JSKdW0a94pLfAp5dhe/JEYioATKp0/G MopaXBoxHKgfBvPUUqoCyy2XvVTrWA9UH3Qcb2e3CBFq3TZTUQOVJQrk/ 8=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AsAQBv7bNa/5NdJa1dGQEBAQEBAQEBAQEBAQcBAQEBAYM9YXAoi1uNDIMEkmGCBgsbhGoCg2MhNBgBAgEBAQEBAQJrKIUmBnkQUVcZhQ6sfYg/gg6FL4IRghSDXoF/g3SFCQONAop8CIVeiRQCgXWLCgGPZQIREwGBJRw4gVJNIxWCfQmCGBiONh8wkFoBAQ X-IronPort-AV: E=Sophos;i="5.48,345,1517875200"; d="scan'208";a="371250017" Received: from rcdn-core-11.cisco.com ([173.37.93.147]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2018 17:53:39 +0000 Received: from kamensky-w541.cisco.com ([10.24.9.3]) (authenticated bits=0) by rcdn-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id w2MHrQEY001227 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NO); Thu, 22 Mar 2018 17:53:38 GMT From: Victor Kamensky To: openembedded-core@lists.openembedded.org Date: Thu, 22 Mar 2018 10:53:26 -0700 Message-Id: <1521741206-5138-2-git-send-email-kamensky@cisco.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521741206-5138-1-git-send-email-kamensky@cisco.com> References: <1521741206-5138-1-git-send-email-kamensky@cisco.com> X-Authenticated-User: kamensky@cisco.com Cc: Alexander Kanavin , Yeoh Ee Peng Subject: [OE-core] [PATCH] oeqa/runtime/stap.py: add runtime test for systemtap X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Add runtime test for stap to test basic SystemTap operations: can compile very basic module and run on target device. Signed-off-by: Victor Kamensky --- meta/lib/oeqa/runtime/cases/stap.py | 33 +++++++++++++++++++++++++++++++++ meta/lib/oeqa/runtime/files/hello.stp | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta/lib/oeqa/runtime/cases/stap.py create mode 100644 meta/lib/oeqa/runtime/files/hello.stp -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/lib/oeqa/runtime/cases/stap.py b/meta/lib/oeqa/runtime/cases/stap.py new file mode 100644 index 0000000..005da71 --- /dev/null +++ b/meta/lib/oeqa/runtime/cases/stap.py @@ -0,0 +1,33 @@ +import os + +from oeqa.runtime.case import OERuntimeTestCase +from oeqa.core.decorator.depends import OETestDepends +from oeqa.core.decorator.oeid import OETestID +from oeqa.core.decorator.data import skipIfNotFeature + +class StapTest(OERuntimeTestCase): + + @classmethod + def setUpClass(cls): + src = os.path.join(cls.tc.runtime_files_dir, 'hello.stp') + dst = '/tmp/hello.stp' + cls.tc.target.copyTo(src, dst) + + @classmethod + def tearDownClass(cls): + files = '/tmp/hello.stp' + cls.tc.target.run('rm %s' % files) + + @OETestID(1652) + @skipIfNotFeature('tools-profile', + 'Test requires tools-profile to be in IMAGE_FEATURES') + @OETestDepends(['kernelmodule.KernelModuleTest.test_kernel_module']) + def test_stap(self): + cmds = [ + 'cd /usr/src/kernel && make scripts', + 'cd /lib/modules/* && (if [ ! -L build ]; then ln -s /usr/src/kernel build; fi)', + 'stap --disable-cache /tmp/hello.stp' + ] + for cmd in cmds: + status, output = self.target.run(cmd, 900) + self.assertEqual(status, 0, msg='\n'.join([cmd, output])) diff --git a/meta/lib/oeqa/runtime/files/hello.stp b/meta/lib/oeqa/runtime/files/hello.stp new file mode 100644 index 0000000..3677147 --- /dev/null +++ b/meta/lib/oeqa/runtime/files/hello.stp @@ -0,0 +1 @@ +probe oneshot { println("hello world") }