Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2747130ybb; Fri, 27 Mar 2020 11:17:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsuxuPzcB15CHZ0rXqWMHSak0sLK9KP7KqlbGLLQBF+D3I4xmAbvEMLxdbrB2SoBtxgc9jJ X-Received: by 2002:a9d:5181:: with SMTP id y1mr11238344otg.199.1585333054551; Fri, 27 Mar 2020 11:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585333054; cv=none; d=google.com; s=arc-20160816; b=TNLwBowc2q5YyAs1ypcAN24DCcOCE2fhI4bF7HOtLa51I85SfYv+qAVtI/bZQHfdks /tN3eszmsmmo3xWWV9c4/o23Z9/Bxp8oMI+uPiJNRWTZUc3fxTaU2YxiuNVkvbqkTYVm leCdLl0AJLBpnUdjWyJ0xRTye/cSiExAqk9kmAdGFu6FQ5dpehTlL8nTSn7Qp1jIK73e Z6gVcG2tq70I5PIfVvGqdKjHzj/nH6k4LSMQiiVKEv1HCo13cIby8iZkiDukUqfXEzWz sKxtInKuYHZKhzhuxFtlSVq6Jydq0owNWKp1RyDtdmFVV9df1ChYjj5fh0YIrhSoY+Iu lgkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5Yq7vQsuwDKEmjoOI8Sapa62w7zRs3k7TIEVDw8GRYE=; b=hEApWrwLIkW7LE1DCTC4lLFmDJziqBJatWD52UEsxLOPSavgh+QATNdkHbOfhKKXA+ keR9DOK77nOqD2YIGY7tOgBmsB51sfefTii6qVnjGDf6QDizMdnRKLcW2Evy71UYYK/4 fuLhUAPWw5Dp8L+chA5jV1H/iNnk3z6BYv1rhachHccoK/W/4Yzx5cC/PsBUWC4hjhMV Zlyp1jmRW+N+EdxqGLMZQEMxc+zdGymwdbz6RPY/ye81W64itVMlNh9HMRL6vNkHYO0T JeBGYyl8iL5STGUqSa1FjgLGinlHfelVxK4VNbk+9XiwszRe9PYNwe3qP9ddzDWvQwHJ qK+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si2628224otr.95.2020.03.27.11.17.04; Fri, 27 Mar 2020 11:17:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727349AbgC0SQt (ORCPT + 99 others); Fri, 27 Mar 2020 14:16:49 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:62486 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727354AbgC0SQt (ORCPT ); Fri, 27 Mar 2020 14:16:49 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02RI4rav061062; Fri, 27 Mar 2020 14:16:36 -0400 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 300jevkrgr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Mar 2020 14:16:35 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 02RIAWS4004766; Fri, 27 Mar 2020 18:16:33 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma05wdc.us.ibm.com with ESMTP id 2ywawg46jr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Mar 2020 18:16:33 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02RIGXio44368220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Mar 2020 18:16:33 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2B629AC05F; Fri, 27 Mar 2020 18:16:33 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C065AAC05E; Fri, 27 Mar 2020 18:16:32 +0000 (GMT) Received: from localhost (unknown [9.85.130.3]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 27 Mar 2020 18:16:32 +0000 (GMT) From: Raphael Moreira Zinsly To: linuxppc-dev@lists.ozlabs.org, linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, mpe@ellerman.id.au, haren@linux.ibm.com, abali@us.ibm.com, dja@axtens.net, Raphael Moreira Zinsly Subject: [PATCH V2 5/5] selftests/powerpc: Add README for GZIP engine tests Date: Fri, 27 Mar 2020 15:16:11 -0300 Message-Id: <20200327181610.13762-6-rzinsly@linux.ibm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200327181610.13762-1-rzinsly@linux.ibm.com> References: <20200327181610.13762-1-rzinsly@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-27_06:2020-03-27,2020-03-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 bulkscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 spamscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003270152 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Include a README file with the instructions to use the testcases at selftests/powerpc/nx-gzip. Signed-off-by: Bulent Abali Signed-off-by: Raphael Moreira Zinsly --- .../powerpc/nx-gzip/99-nx-gzip.rules | 1 + .../testing/selftests/powerpc/nx-gzip/README | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 tools/testing/selftests/powerpc/nx-gzip/99-nx-gzip.rules create mode 100644 tools/testing/selftests/powerpc/nx-gzip/README diff --git a/tools/testing/selftests/powerpc/nx-gzip/99-nx-gzip.rules b/tools/testing/selftests/powerpc/nx-gzip/99-nx-gzip.rules new file mode 100644 index 000000000000..5a7118495cb3 --- /dev/null +++ b/tools/testing/selftests/powerpc/nx-gzip/99-nx-gzip.rules @@ -0,0 +1 @@ +SUBSYSTEM=="nxgzip", KERNEL=="nx-gzip", MODE="0666" diff --git a/tools/testing/selftests/powerpc/nx-gzip/README b/tools/testing/selftests/powerpc/nx-gzip/README new file mode 100644 index 000000000000..a80c289f1d2c --- /dev/null +++ b/tools/testing/selftests/powerpc/nx-gzip/README @@ -0,0 +1,44 @@ +Test the nx-gzip function: +========================= + +Verify that following device exists: + /dev/crypto/nx-gzip +If you get a permission error run as sudo or set the device permissions: + sudo chmod go+rw /dev/crypto/nx-gzip +However, chmod may not survive across boots. You may create a udev file such +as: + /etc/udev/rules.d/99-nx-gzip.rules + + +Then make and run: +$ make +gcc -O3 -I./inc -o gzfht_test gzfht_test.c gzip_vas.c +gcc -O3 -I./inc -o gunz_test gunz_test.c gzip_vas.c + + +Compress any file using Fixed Huffman mode. Output will have a .nx.gz suffix: +$ ./gzfht_test gzip_vas.c +file gzip_vas.c read, 5218 bytes +compressed 5218 to 2545 bytes total, crc32 checksum = 817543a3 + + +Uncompress the previous output. Output will have a .nx.gunzip suffix: +./gunz_test gzip_vas.c.nx.gz +gzHeader FLG 0 +00 00 00 00 04 03 +gzHeader MTIME, XFL, OS ignored +computed checksum 817543a3 isize 00001462 +stored checksum 817543a3 isize 00001462 +decomp is complete: fclose + + +Compare two files: +$ sha1sum gzip_vas.c.nx.gz.nx.gunzip gzip_vas.c +4e87536f3ee9e771ef30fb0fb27572032ca44ef8 gzip_vas.c.nx.gz.nx.gunzip +4e87536f3ee9e771ef30fb0fb27572032ca44ef8 gzip_vas.c + + +Note that the code here are intended for testing the nx-gzip hardware function. +They are not intended for demonstrating performance or compression ratio. +For more information and source code consider using: +https://github.com/libnxz/power-gzip -- 2.21.0