[PATCH v2] git: Make submodule check only needed modules

Juan Quintela posted 1 patch 4 years, 4 months ago
Test docker-quick@centos7 failed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200130162810.14503-1-quintela@redhat.com
Maintainers: "Daniel P. Berrangé" <berrange@redhat.com>
scripts/git-submodule.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
[PATCH v2] git: Make submodule check only needed modules
Posted by Juan Quintela 4 years, 4 months ago
If one is compiling more than one tree from the same source, it is
possible that they need different submodules.  Change the check to see
that all modules that we are interested in are updated, discarding the
ones that we don't care about.

Signed-off-by: Juan Quintela <quintela@redhat.com>

---

v1->v2:
patchw insists in not using tabs
---
 scripts/git-submodule.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
index 98ca0f2737..65ed877aef 100755
--- a/scripts/git-submodule.sh
+++ b/scripts/git-submodule.sh
@@ -59,10 +59,14 @@ status)
     fi
 
     test -f "$substat" || exit 1
-    CURSTATUS=$($GIT submodule status $modules)
-    OLDSTATUS=$(cat $substat)
-    test "$CURSTATUS" = "$OLDSTATUS"
-    exit $?
+    for module in $modules; do
+        CURSTATUS=$($GIT submodule status $module)
+        OLDSTATUS=$(cat $substat | grep $module)
+        if test "$CURSTATUS" != "$OLDSTATUS"; then
+            exit 1
+        fi
+    done
+    exit 0
     ;;
 update)
     if test -z "$maybe_modules"
-- 
2.24.1


Re: [PATCH v2] git: Make submodule check only needed modules
Posted by no-reply@patchew.org 4 years, 4 months ago
Patchew URL: https://patchew.org/QEMU/20200130162810.14503-1-quintela@redhat.com/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
**
ERROR:/tmp/qemu-test/src/tests/qtest/migration-helpers.c:119:check_migration_status: assertion failed (current_status != "completed"): ("completed" != "completed")
ERROR - Bail out! ERROR:/tmp/qemu-test/src/tests/qtest/migration-helpers.c:119:check_migration_status: assertion failed (current_status != "completed"): ("completed" != "completed")
make: *** [check-qtest-x86_64] Error 1
make: *** Waiting for unfinished jobs....
  TEST    iotest-qcow2: 186
  TEST    iotest-qcow2: 187
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=26f2c070ef85439fab45133d8a0eb9d5', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-rppq5_sd/src/docker-src.2020-01-30-11.51.38.22326:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=26f2c070ef85439fab45133d8a0eb9d5
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-rppq5_sd/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    10m24.127s
user    0m8.553s


The full log is available at
http://patchew.org/logs/20200130162810.14503-1-quintela@redhat.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH v2] git: Make submodule check only needed modules
Posted by Daniel P. Berrangé 4 years, 4 months ago
On Thu, Jan 30, 2020 at 05:28:10PM +0100, Juan Quintela wrote:
> If one is compiling more than one tree from the same source, it is
> possible that they need different submodules.  Change the check to see
> that all modules that we are interested in are updated, discarding the
> ones that we don't care about.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> 
> ---
> 
> v1->v2:
> patchw insists in not using tabs
> ---
>  scripts/git-submodule.sh | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
> index 98ca0f2737..65ed877aef 100755
> --- a/scripts/git-submodule.sh
> +++ b/scripts/git-submodule.sh
> @@ -59,10 +59,14 @@ status)
>      fi
>  
>      test -f "$substat" || exit 1
> -    CURSTATUS=$($GIT submodule status $modules)
> -    OLDSTATUS=$(cat $substat)
> -    test "$CURSTATUS" = "$OLDSTATUS"
> -    exit $?
> +    for module in $modules; do
> +        CURSTATUS=$($GIT submodule status $module)
> +        OLDSTATUS=$(cat $substat | grep $module)
> +        if test "$CURSTATUS" != "$OLDSTATUS"; then
> +            exit 1
> +        fi
> +    done
> +    exit 0
>      ;;
>  update)
>      if test -z "$maybe_modules"

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH v2] git: Make submodule check only needed modules
Posted by Juan Quintela 4 years, 4 months ago
Daniel P. Berrangé <berrange@redhat.com> wrote:
> On Thu, Jan 30, 2020 at 05:28:10PM +0100, Juan Quintela wrote:
>> If one is compiling more than one tree from the same source, it is
>> possible that they need different submodules.  Change the check to see
>> that all modules that we are interested in are updated, discarding the
>> ones that we don't care about.
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> 
>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Should I send the pull request?

Later, Juan.


Re: [PATCH v2] git: Make submodule check only needed modules
Posted by Daniel P. Berrangé 4 years, 4 months ago
On Thu, Jan 30, 2020 at 05:44:59PM +0100, Juan Quintela wrote:
> Daniel P. Berrangé <berrange@redhat.com> wrote:
> > On Thu, Jan 30, 2020 at 05:28:10PM +0100, Juan Quintela wrote:
> >> If one is compiling more than one tree from the same source, it is
> >> possible that they need different submodules.  Change the check to see
> >> that all modules that we are interested in are updated, discarding the
> >> ones that we don't care about.
> >> 
> >> Signed-off-by: Juan Quintela <quintela@redhat.com>
> >> 
> >
> > Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> 
> Should I send the pull request?

Sure, I'm was leaving this for the "Misc queue" maintainer but if yuou
want it sooner....

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|