From patchwork Thu Mar 3 01:49:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 1600136 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=kjGq8zI6; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K8DSZ0tYZz9sFq for ; Thu, 3 Mar 2022 12:49:50 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4K8DSY0PM4z3bfc for ; Thu, 3 Mar 2022 12:49:49 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=kjGq8zI6; dkim-atps=neutral X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::102d; helo=mail-pj1-x102d.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=kjGq8zI6; dkim-atps=neutral Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4K8DST75XRz3bSh for ; Thu, 3 Mar 2022 12:49:44 +1100 (AEDT) Received: by mail-pj1-x102d.google.com with SMTP id mr24-20020a17090b239800b001bf0a375440so1034767pjb.4 for ; Wed, 02 Mar 2022 17:49:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=SO9aILK+KUi+XqXrORAyJ+NPWZYFOiW+ujW5t3Vifzk=; b=kjGq8zI6YwHf+mmhTafwAJaRFWfbw/YhbSZJ1WwI8WKSLstTeczaKgMkxGP4x9Kecn Ckh9WFhTYtUbQMwUJgIGHScEhq+M6cJg3M4CKdOcvFxrWrnSc9rpv+4KtN2pEHKkAg1/ FQD1VM92hc1Va1rKgQXJ0S4WkHDJApqb/1VNoCS8YJp4GZALIHDiy0d8Hmddb2AJH43d TXRkh/2KY5wLxQ3ZSJehj2YMqTpas0WrFjTi3xollcM+dDJ7d7ed8x3lTc511a4O0DY+ ky4mroEQBqpKh0RwpcIuCEKuAxSHqERzHzwi+wdzkMY0o5uxQcq3mFuCF/VQ0ohl3NkE rLnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=SO9aILK+KUi+XqXrORAyJ+NPWZYFOiW+ujW5t3Vifzk=; b=7u2UGUQcL7eW/FbN3ndY0oNwoZdkOLaNm6dZt2vRvfR8ECuFVOHxBPwoHwZy/Lu76s +Jf/FzETLVo4Hd4cEeP+xclVN7pydxHrPDCTGPw/8k/t/+H/gnzByU6eBU/o3FApCecP /4z0NoqoPidts1AhVDO6CLTnFLiGqb/vx36W5FlDGxK24t/GWFC1aIeqp+UcvTDRAeXd aXIIjC0jTVc5v9jXS1zJOGbgAcQCaHCPae2AWMIS69+Nk9BxEGKeE0xMp3rv307LsJ1g dIZZBP9LS8JLRktAJ36NOwSwLmXsCJqxBoFPbU2XpJFg/4rYfx2XXHQGAbs6fKjdKOM8 6Fpg== X-Gm-Message-State: AOAM530xpNRyvoyZC2ypCzSbunLGGHlWfGYAXG2mw+QJJVKJzFYLQnCF QlOXN1uaqyLSdCWIY3tatA4= X-Google-Smtp-Source: ABdhPJxZfmlCAvWjRv6GH8dcyBuBxSyaetFNfn9NBKan0HX2gmptFQM/+ej7Z2OvZnBPJRQyqjGGHA== X-Received: by 2002:a17:903:285:b0:14f:daea:e8d9 with SMTP id j5-20020a170903028500b0014fdaeae8d9mr33176330plr.128.1646272183559; Wed, 02 Mar 2022 17:49:43 -0800 (PST) Received: from localhost.localdomain ([45.124.203.14]) by smtp.gmail.com with ESMTPSA id s33-20020a056a0017a100b004bf85a94ef2sm444320pfg.183.2022.03.02.17.49.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 17:49:42 -0800 (PST) From: Joel Stanley To: Rashmica Gupta , pdbg@lists.ozlabs.org Date: Thu, 3 Mar 2022 12:19:34 +1030 Message-Id: <20220303014934.757630-1-joel@jms.id.au> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [Pdbg] [PATCH] README: Add some notes on testing X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Joel Stanley --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/README.md b/README.md index 0441d8942cbd..316976e8703b 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,53 @@ make rsync pdbg root@bmc:/usr/local/bin ``` +## Testing + +There is a test suite to perform some basic testing. The tests on the host +are mostly unit tests that exercise the device tree based targetting code. + +``` +make check +``` + +### BMC testing + +To test on the bmc, make a build in a separate directory: + +``` +cd pdbg +mkdir obj-arm +cd obj-arm +../configure --host=arm-openbmc-linux-gnueabi +make -j +``` + +And create a configuration file `.test.pdbg` in the pdbg source directory: + +``` +BMC_HOST=mybmc.ibm.com +BMC_USER=root +BMC_PASS=passw0rd +PDBG_ARM_BUILD=obj-arm +``` + +The BMC must have the host powered on and be accessible via ssh. + +Then run make check. It will test both the host unit tests, and copy the arm +binary to the BMC and run it there: + +``` +-- BMC HW tests +sending incremental file list +created directory /tmp/pdbg +... +Checking if the host is up... yes + PASS: /tmp/pdbg/pdbg -p0 getcfam 0xc09 + PASS: /tmp/pdbg/pdbg -p0 getscom 0xf000f + PASS: /tmp/pdbg/pdbg -p0 putmem 0x31000000 + PASS: /tmp/pdbg/pdbg -p0 getmem --raw 0x31000000 0x8 +``` + ## Usage Several backends are supported depending on which system you are using and are