Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp300332ybh; Tue, 17 Mar 2020 23:42:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv1zYzEvPzQ2OG7nkuiBtdF7k/4SXS7bkm1tfxPShkdarexTc3xn28fUnid0y0WG8dJ9IXq X-Received: by 2002:a9d:1ec5:: with SMTP id n63mr2595713otn.360.1584513756929; Tue, 17 Mar 2020 23:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584513756; cv=none; d=google.com; s=arc-20160816; b=hBIsbOxp5Dd/UghDwEtcVQOH8+2wY/l9DgFKt/1CrqVnLUXlDJjDDFylZEkJO03B/b dA1nbcUpWU17DkIFTK0yN3UVOyOKzqxg5jPP+zvyEFex7Q69DIDdv6dtn17vkF5Tjzr6 ZHZxGGAJPqmPXkzypwkwN7gpnwT6sFwJDr+HYJIzU38PJPMAw39GZC32z7fIrwL5LaJl xELj7SOymL31bg+hxE1pJZqrUzo2vmeGXQ4hVcKTg1PrN4zIo6ZHXbMtTwr1Wd1w+rwf jArdHZjMYrzf5Nh0jJFSOR6fq7+EnQ64Xn3IipPXSPA81BwLiOHWEPpjC8kqrXWFFjBC fmyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=XzGu2D0qbUiQXlYIBSsYZEbEbHXflKv2iEThfbgwGOA=; b=VFhbL7Xcv+u/J0iliCso4/jJDhjZRRoB4GeN8gg2VRyMq9QqNnJzJ705GUkIh9Wrf2 V2gPKmQEQ+d+2gIK0D5n0Vo6K0atuLjCFNJRCNwlnchDJY2yL0pQMHUc8w9qjr84qIkS 3flkevK3iMTVhRksorCWA9C1uon+o3neCade8krhrpI6UWurNiaURrCQpZLIlq5fVAKz rIwFvBa3hnYe6gI7zePpVnZfx9CH8H7E4S15rH/gmWhMMP1W58/ChRwDBg4B5vykbQP/ J7UTaPEA+aHFO9P2IghrXXS4XDnEBoLD/xUi3gMGhsHyWJudYRVz7wJYMwUeXX2VgfO2 BCxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@axtens.net header.s=google header.b=FtR2PsJj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34si3104610otv.21.2020.03.17.23.42.17; Tue, 17 Mar 2020 23:42:36 -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; dkim=pass header.i=@axtens.net header.s=google header.b=FtR2PsJj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726553AbgCRGkw (ORCPT + 99 others); Wed, 18 Mar 2020 02:40:52 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:45560 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726478AbgCRGkw (ORCPT ); Wed, 18 Mar 2020 02:40:52 -0400 Received: by mail-pg1-f193.google.com with SMTP id m15so13111862pgv.12 for ; Tue, 17 Mar 2020 23:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=XzGu2D0qbUiQXlYIBSsYZEbEbHXflKv2iEThfbgwGOA=; b=FtR2PsJjhjhKf5THRO1zaSBNSWnNScL3wmfKecLJuGLphjWSBVrpyhEaqdSCNdSvUQ 9FrvdstZbxCKwoBww4uyXL3VL1qbVUFSpIw7QtI0+oTebzcUk4pXZyjSFF5ZBCT1lOcw Qa5HTtUFLY9yhYArROexRhc0SxHUYghz9Km4k= 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:in-reply-to:references:date :message-id:mime-version; bh=XzGu2D0qbUiQXlYIBSsYZEbEbHXflKv2iEThfbgwGOA=; b=Lli67ii7iakD8A5e6wwAifpqWrGAqcmyqelveIwL43TOnnVS6NC7Y6XU7LY8MJzIkf uu28sFBiv2pAxuS3ZPPj/ZqPn6jyOS1qU5SiYumJPwi1b5o/ilG0Gu0GfTqJrfIuhJXj Ekc04Oa+eaf03TJWuOCKKHZ0Gl6cBhFnYXXAxZk058EFbYgr6WNJ1auR05AbY1h3hhJf oeIr0f9Fxg3Wpcl3iBeeGOK5ZBfUbEXMGAM45Jdci2mf+0Gt5gE+1Az1CLpfaJEu6OKr JEtSYyH4redFy//7wcSlZa6QC9TaAdpzgksynqG/t3gGPzkymIjLruYlZBhVSQgjFjz6 wRdQ== X-Gm-Message-State: ANhLgQ3RtRxtrpCG7q+7i5ibuC53LXRnPpwQ4ISD3RohDP/yhJZEYpoK YUd3/HCxWA1FOZapCTuQcp/mj1+7gU4= X-Received: by 2002:aa7:95a1:: with SMTP id a1mr2834620pfk.279.1584513650717; Tue, 17 Mar 2020 23:40:50 -0700 (PDT) Received: from localhost (2001-44b8-111e-5c00-11e1-e7cb-3c10-05d6.static.ipv6.internode.on.net. [2001:44b8:111e:5c00:11e1:e7cb:3c10:5d6]) by smtp.gmail.com with ESMTPSA id t8sm1244142pjy.11.2020.03.17.23.40.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Mar 2020 23:40:49 -0700 (PDT) From: Daniel Axtens To: Raphael Moreira Zinsly , linuxppc-dev@lists.ozlabs.org, linux-crypto@vger.kernel.org Cc: Raphael Moreira Zinsly , haren@linux.ibm.com, herbert@gondor.apana.org.au, abali@us.ibm.com Subject: Re: [PATCH 5/5] selftests/powerpc: Add README for GZIP engine tests In-Reply-To: <20200316180714.18631-6-rzinsly@linux.ibm.com> References: <20200316180714.18631-1-rzinsly@linux.ibm.com> <20200316180714.18631-6-rzinsly@linux.ibm.com> Date: Wed, 18 Mar 2020 17:40:46 +1100 Message-ID: <874kumnp1t.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This is a good readme, the instructions for compiling and testing work. Reviewed-by: Daniel Axtens Regards, Daniel Raphael Moreira Zinsly writes: > 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..ff0c817a65c5 > --- /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, 5276 bytes > +compressed 5276 to 2564 bytes total, crc32 checksum = b937a37d > + > + > +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 b937a37d isize 0000149c > +stored checksum b937a37d isize 0000149c > +decomp is complete: fclose > + > + > +Compare two files: > +$ sha1sum gzip_vas.c.nx.gz.nx.gunzip gzip_vas.c > +f041cd8581e8d920f79f6ce7f65411be5d026c2a gzip_vas.c.nx.gz.nx.gunzip > +f041cd8581e8d920f79f6ce7f65411be5d026c2a 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