[PATCH v2] Kernel selftests: TPM2: upgrade TPM2 tests from Python 2 to Python 3

2020-06-18 Thread Pengfei Xu
Python 2 is no longer supported by the Python upstream project, so upgrade TPM2 tests to Python 3. Signed-off-by: Pengfei Xu --- tools/testing/selftests/tpm2/test_smoke.sh | 4 +- tools/testing/selftests/tpm2/test_space.sh | 2 +- tools/testing/selftests/tpm2/tpm2.py | 68 ++-

Re: [PATCH v2] Kernel selftests: TPM2: upgrade TPM2 tests from Python 2 to Python 3

2020-06-24 Thread Jarkko Sakkinen
On Tue, Jun 23, 2020 at 07:41:55PM +0800, Pengfei Xu wrote: > I tried to use bytes(parm, encoding='UTF-8') way, it met the situation > that sometimes parm is string, sometimes parm is bytes. We need to do right things right, i.e. you should fix in the call site, not in the implementation. /Ja

Re: [PATCH v2] Kernel selftests: TPM2: upgrade TPM2 tests from Python 2 to Python 3

2020-06-25 Thread Pengfei Xu
On 2020-06-25 at 02:14:57 +0300, Jarkko Sakkinen wrote: > On Tue, Jun 23, 2020 at 07:41:55PM +0800, Pengfei Xu wrote: > > I tried to use bytes(parm, encoding='UTF-8') way, it met the situation > > that sometimes parm is string, sometimes parm is bytes. > > We need to do right things right, i.e

Re: [PATCH v2] Kernel selftests: TPM2: upgrade TPM2 tests from Python 2 to Python 3

2020-06-22 Thread Jarkko Sakkinen
On Thu, Jun 18, 2020 at 04:15:02PM +0800, Pengfei Xu wrote: > Python 2 is no longer supported by the Python upstream project, so > upgrade TPM2 tests to Python 3. > > Signed-off-by: Pengfei Xu Use "selftests: tpm: ". > --- > tools/testing/selftests/tpm2/test_smoke.sh | 4 +- > tools/testing/s

Re: [PATCH v2] Kernel selftests: TPM2: upgrade TPM2 tests from Python 2 to Python 3

2020-06-22 Thread Jarkko Sakkinen
On Tue, Jun 23, 2020 at 12:46:18AM +0300, Jarkko Sakkinen wrote: > On Thu, Jun 18, 2020 at 04:15:02PM +0800, Pengfei Xu wrote: > > Python 2 is no longer supported by the Python upstream project, so > > upgrade TPM2 tests to Python 3. > > > > Signed-off-by: Pengfei Xu > > Use "selftests: tpm: ".

Re: [PATCH v2] Kernel selftests: TPM2: upgrade TPM2 tests from Python 2 to Python 3

2020-06-23 Thread Pengfei Xu
Hi Jarkk, Thanks for your comments! My feedback is as below. BR. On 2020-06-23 at 00:47:39 +0300, Jarkko Sakkinen wrote: > On Tue, Jun 23, 2020 at 12:46:18AM +0300, Jarkko Sakkinen wrote: > > On Thu, Jun 18, 2020 at 04:15:02PM +0800, Pengfei Xu wrote: > > > Python 2 is no longer supported b