[Qemu-devel] [PATCH v6 0/9] qemu-binfmt-conf.sh

Unai Martinez-Corral posted 9 patches 6 years ago
Test asan failed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190312185541.GA13@803a063d172d
Maintainers: Riku Voipio <riku.voipio@iki.fi>, Laurent Vivier <laurent@vivier.eu>
There is a newer version of this series
scripts/qemu-binfmt-conf.sh | 208
1 file changed, 130 insertions(+), 78 deletions(-)
[Qemu-devel] [PATCH v6 0/9] qemu-binfmt-conf.sh
Posted by Unai Martinez-Corral 6 years ago
Hi,

This series reworks qemu-binfmt-conf.sh:

* Argument <CPU> from option '--systemd' is generalized to <TARGETS>, and it is
  accepted for any mode (default, debian or systemd). It can be a single target
  arch or a list of them.
* Option '-r|--clear' is added, which allows to remove an already registered
  target interpreter or a list of them. The implementation is functional but
  partial. Please, see the corresponding commit.
* Option '-t|--test' is added, which allows to execute the CHECK according
  to the provided arguments, but no interpreter is configured.
* Support to set options through environment variables: QEMU_TARGETS,
  QEMU_PATH, QEMU_SUFFIX, QEMU_PERSISTENT, QEMU_CREDENTIAL, QEMU_CLEAR and
  QEMU_TEST.

The following changes are not backward compatible:

* Option '--persistent' no longer requires/accepts an argument.
* Option '--credential' no longer requires/accepts an argument.
* Option '--systemd' no longer requires/accepts an argument.
* Option '--qemu-path' is renamed to '--path'.
* Option '--qemu-suffix' is renamed to '--suffix'.

The functionality of all of them is untouched. Changes are related to syntax only.

The main differences compared to v5 are:

* Don't need to use "find".
* Set BINFMT_CLEAR to ':', to allow --test to work with --clear.
* Do not show DEBIANDIR and SYSTEMDDIR in the Env-variable column.

Based on:

* [PATCH v5 0/10] qemu-binfmt-conf.sh
  * should have been [PATCH v5 0/9] qemu-binfmt-conf.sh
* [PATCH v4 0/10] qemu-binfmt-conf.sh
* [PATCH v3 0/10] qemu-binfmt-conf.sh
* [PATCH v2] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg)
* [PATCH] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg)
* scripts/qemu-binfmt-conf.sh: allow clearing of entries

Regards

Unai Martinez-Corral (9):
      qemu-binfmt-conf.sh: enforce safe style consistency
      qemu-binfmt-conf.sh: make opts -p and -c boolean
      qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT
      qemu-binfmt-conf.sh: use the same presentation format as for qemu-*
      qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options
      qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX
      qemu-binfmt-conf.sh: generalize <CPU> to positional [TARGETS]
      qemu-binfmt-conf.sh: add option --clear
      qemu-binfmt-conf.sh: add --test

scripts/qemu-binfmt-conf.sh | 208
1 file changed, 130 insertions(+), 78 deletions(-)

Re: [Qemu-devel] [PATCH v6 0/9] qemu-binfmt-conf.sh
Posted by no-reply@patchew.org 6 years ago
Patchew URL: https://patchew.org/QEMU/20190312185541.GA13@803a063d172d/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20190312185541.GA13@803a063d172d
Subject: [Qemu-devel] [PATCH v6 0/9] qemu-binfmt-conf.sh

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20190312185541.GA13@803a063d172d -> patchew/20190312185541.GA13@803a063d172d
Switched to a new branch 'test'
f09dc5bd1b qemu-binfmt-conf.sh: add --test
e629a0480b qemu-binfmt-conf.sh: add option --clear
424e286259 qemu-binfmt-conf.sh: generalize <CPU> to positional TARGETS
5e75486009 qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX
cda5f07d20 qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options
41eedf0675 qemu-binfmt-conf.sh: use the same presentation format as for qemu-*
4613846217 qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT
d5ac69614e qemu-binfmt-conf.sh: make opts -p and -c boolean
9fee1d0f5c qemu-binfmt-conf.sh: enforce safe style consistency

=== OUTPUT BEGIN ===
1/9 Checking commit 9fee1d0f5c0d (qemu-binfmt-conf.sh: enforce safe style consistency)
WARNING: line over 80 characters
#53: FILE: scripts/qemu-binfmt-conf.sh:299:
+        if [ "x$magic" = "x" ] || [ "x$mask" = "x" ] || [ "x$family" = "x" ] ; then

total: 0 errors, 1 warnings, 47 lines checked

Patch 1/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/9 Checking commit d5ac69614e27 (qemu-binfmt-conf.sh: make opts -p and -c boolean)
ERROR: line over 90 characters
#51: FILE: scripts/qemu-binfmt-conf.sh:327:
+options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential,persistent -- "$@")

total: 1 errors, 0 warnings, 43 lines checked

Patch 2/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

3/9 Checking commit 461384621729 (qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT)
4/9 Checking commit 41eedf067555 (qemu-binfmt-conf.sh: use the same presentation format as for qemu-*)
WARNING: line over 80 characters
#50: FILE: scripts/qemu-binfmt-conf.sh:179:
+-F|--qemu-suffix SUFFIX               add a suffix to the default interpreter name

ERROR: line over 90 characters
#51: FILE: scripts/qemu-binfmt-conf.sh:180:
+-p|--persistent      QEMU_PERSISTENT  (yes) load the interpreter and keep it in memory; all future

ERROR: line over 90 characters
#53: FILE: scripts/qemu-binfmt-conf.sh:182:
+-c|--credential      QEMU_CREDENTIAL  (yes) credential and security tokens are calculated according

ERROR: line over 90 characters
#58: FILE: scripts/qemu-binfmt-conf.sh:187:
+                                      systemd-binfmt.service for the given CPU; if CPU is "ALL",

ERROR: line over 90 characters
#60: FILE: scripts/qemu-binfmt-conf.sh:189:
+-d|--debian                           don't write into /proc, generate update-binfmts templates

ERROR: line over 90 characters
#85: FILE: scripts/qemu-binfmt-conf.sh:206:
+The environment variable HOST_ARCH allows to override 'uname' to generate configuration files for a

total: 5 errors, 1 warnings, 79 lines checked

Patch 4/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/9 Checking commit cda5f07d203f (qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options)
WARNING: line over 80 characters
#36: FILE: scripts/qemu-binfmt-conf.sh:180:
+-F|--suffix SUFFIX                    add a suffix to the default interpreter name

ERROR: line over 90 characters
#45: FILE: scripts/qemu-binfmt-conf.sh:333:
+options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 1 errors, 1 warnings, 38 lines checked

Patch 5/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

6/9 Checking commit 5e75486009b5 (qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX)
WARNING: line over 80 characters
#23: FILE: scripts/qemu-binfmt-conf.sh:180:
+-F|--suffix SUFFIX   QEMU_SUFFIX      add a suffix to the default interpreter name

total: 0 errors, 1 warnings, 30 lines checked

Patch 6/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
7/9 Checking commit 424e286259d6 (qemu-binfmt-conf.sh: generalize <CPU> to positional TARGETS)
ERROR: line over 90 characters
#77: FILE: scripts/qemu-binfmt-conf.sh:199:
+TARGETS              QEMU_TARGETS     A single arch name or a list of them (see all names below);

WARNING: line over 80 characters
#90: FILE: scripts/qemu-binfmt-conf.sh:211:
+-s|--systemd                          don't write into /proc, generate file(s) for

ERROR: line over 90 characters
#104: FILE: scripts/qemu-binfmt-conf.sh:230:
+The environment variable HOST_ARCH allows to override 'uname' to generate configuration files for

ERROR: line over 90 characters
#146: FILE: scripts/qemu-binfmt-conf.sh:359:
+options=$(getopt -o dsQ:S:e:hcp -l debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 3 errors, 1 warnings, 141 lines checked

Patch 7/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

8/9 Checking commit e629a0480bb3 (qemu-binfmt-conf.sh: add option --clear)
WARNING: line over 80 characters
#33: FILE: scripts/qemu-binfmt-conf.sh:200:
+                                      if empty, configure/clear all known targets;

ERROR: line over 90 characters
#41: FILE: scripts/qemu-binfmt-conf.sh:209:
+-r|--clear           QEMU_CLEAR       (yes) remove registered interpreters for target TARGETS;

ERROR: line over 90 characters
#81: FILE: scripts/qemu-binfmt-conf.sh:374:
+options=$(getopt -o rdsQ:S:e:hcp -l clear,debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 2 errors, 1 warnings, 82 lines checked

Patch 8/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

9/9 Checking commit f09dc5bd1bff (qemu-binfmt-conf.sh: add --test)
WARNING: line over 80 characters
#20: FILE: scripts/qemu-binfmt-conf.sh:200:
+                                      if empty, configure/clear all known targets.

ERROR: line over 90 characters
#28: FILE: scripts/qemu-binfmt-conf.sh:210:
+-t|--test            QEMU_TEST        (yes) test the setup with the provided arguments, but do not

ERROR: line over 90 characters
#58: FILE: scripts/qemu-binfmt-conf.sh:374:
+options=$(getopt -o trdsQ:S:e:hcp -l test,clear,debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 2 errors, 1 warnings, 61 lines checked

Patch 9/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190312185541.GA13@803a063d172d/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [Qemu-devel] [PATCH v6 0/9] qemu-binfmt-conf.sh
Posted by no-reply@patchew.org 6 years ago
Patchew URL: https://patchew.org/QEMU/20190312185541.GA13@803a063d172d/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20190312185541.GA13@803a063d172d
Subject: [Qemu-devel] [PATCH v6 0/9] qemu-binfmt-conf.sh

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 t [tag update]            patchew/20190312185541.GA13@803a063d172d -> patchew/20190312185541.GA13@803a063d172d
Switched to a new branch 'test'
a02d2a9560 qemu-binfmt-conf.sh: add --test
06896d675f qemu-binfmt-conf.sh: add option --clear
568ded1178 qemu-binfmt-conf.sh: generalize <CPU> to positional TARGETS
a8b3b47486 qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX
8af00b9c6e qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options
38745b7499 qemu-binfmt-conf.sh: use the same presentation format as for qemu-*
c903302e6f qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT
81de0718d5 qemu-binfmt-conf.sh: make opts -p and -c boolean
b8171bcc57 qemu-binfmt-conf.sh: enforce safe style consistency

=== OUTPUT BEGIN ===
1/9 Checking commit b8171bcc5760 (qemu-binfmt-conf.sh: enforce safe style consistency)
WARNING: line over 80 characters
#53: FILE: scripts/qemu-binfmt-conf.sh:299:
+        if [ "x$magic" = "x" ] || [ "x$mask" = "x" ] || [ "x$family" = "x" ] ; then

total: 0 errors, 1 warnings, 47 lines checked

Patch 1/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/9 Checking commit 81de0718d5f0 (qemu-binfmt-conf.sh: make opts -p and -c boolean)
ERROR: line over 90 characters
#51: FILE: scripts/qemu-binfmt-conf.sh:327:
+options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential,persistent -- "$@")

total: 1 errors, 0 warnings, 43 lines checked

Patch 2/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

3/9 Checking commit c903302e6f93 (qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT)
4/9 Checking commit 38745b74997c (qemu-binfmt-conf.sh: use the same presentation format as for qemu-*)
WARNING: line over 80 characters
#50: FILE: scripts/qemu-binfmt-conf.sh:179:
+-F|--qemu-suffix SUFFIX               add a suffix to the default interpreter name

ERROR: line over 90 characters
#51: FILE: scripts/qemu-binfmt-conf.sh:180:
+-p|--persistent      QEMU_PERSISTENT  (yes) load the interpreter and keep it in memory; all future

ERROR: line over 90 characters
#53: FILE: scripts/qemu-binfmt-conf.sh:182:
+-c|--credential      QEMU_CREDENTIAL  (yes) credential and security tokens are calculated according

ERROR: line over 90 characters
#58: FILE: scripts/qemu-binfmt-conf.sh:187:
+                                      systemd-binfmt.service for the given CPU; if CPU is "ALL",

ERROR: line over 90 characters
#60: FILE: scripts/qemu-binfmt-conf.sh:189:
+-d|--debian                           don't write into /proc, generate update-binfmts templates

ERROR: line over 90 characters
#85: FILE: scripts/qemu-binfmt-conf.sh:206:
+The environment variable HOST_ARCH allows to override 'uname' to generate configuration files for a

total: 5 errors, 1 warnings, 79 lines checked

Patch 4/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/9 Checking commit 8af00b9c6e2c (qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options)
WARNING: line over 80 characters
#36: FILE: scripts/qemu-binfmt-conf.sh:180:
+-F|--suffix SUFFIX                    add a suffix to the default interpreter name

ERROR: line over 90 characters
#45: FILE: scripts/qemu-binfmt-conf.sh:333:
+options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 1 errors, 1 warnings, 38 lines checked

Patch 5/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

6/9 Checking commit a8b3b47486d2 (qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX)
WARNING: line over 80 characters
#23: FILE: scripts/qemu-binfmt-conf.sh:180:
+-F|--suffix SUFFIX   QEMU_SUFFIX      add a suffix to the default interpreter name

total: 0 errors, 1 warnings, 30 lines checked

Patch 6/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
7/9 Checking commit 568ded1178a0 (qemu-binfmt-conf.sh: generalize <CPU> to positional TARGETS)
ERROR: line over 90 characters
#77: FILE: scripts/qemu-binfmt-conf.sh:199:
+TARGETS              QEMU_TARGETS     A single arch name or a list of them (see all names below);

WARNING: line over 80 characters
#90: FILE: scripts/qemu-binfmt-conf.sh:211:
+-s|--systemd                          don't write into /proc, generate file(s) for

ERROR: line over 90 characters
#104: FILE: scripts/qemu-binfmt-conf.sh:230:
+The environment variable HOST_ARCH allows to override 'uname' to generate configuration files for

ERROR: line over 90 characters
#146: FILE: scripts/qemu-binfmt-conf.sh:359:
+options=$(getopt -o dsQ:S:e:hcp -l debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 3 errors, 1 warnings, 141 lines checked

Patch 7/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

8/9 Checking commit 06896d675f7f (qemu-binfmt-conf.sh: add option --clear)
WARNING: line over 80 characters
#33: FILE: scripts/qemu-binfmt-conf.sh:200:
+                                      if empty, configure/clear all known targets;

ERROR: line over 90 characters
#41: FILE: scripts/qemu-binfmt-conf.sh:209:
+-r|--clear           QEMU_CLEAR       (yes) remove registered interpreters for target TARGETS;

ERROR: line over 90 characters
#81: FILE: scripts/qemu-binfmt-conf.sh:374:
+options=$(getopt -o rdsQ:S:e:hcp -l clear,debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 2 errors, 1 warnings, 82 lines checked

Patch 8/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

9/9 Checking commit a02d2a9560bf (qemu-binfmt-conf.sh: add --test)
WARNING: line over 80 characters
#20: FILE: scripts/qemu-binfmt-conf.sh:200:
+                                      if empty, configure/clear all known targets.

ERROR: line over 90 characters
#28: FILE: scripts/qemu-binfmt-conf.sh:210:
+-t|--test            QEMU_TEST        (yes) test the setup with the provided arguments, but do not

ERROR: line over 90 characters
#58: FILE: scripts/qemu-binfmt-conf.sh:374:
+options=$(getopt -o trdsQ:S:e:hcp -l test,clear,debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 2 errors, 1 warnings, 61 lines checked

Patch 9/9 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20190312185541.GA13@803a063d172d/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com