[Qemu-devel] [PATCH] tests: Simplify .gitignore

Eric Blake posted 1 patch 5 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180619203918.65450-1-eblake@redhat.com
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x failed
tests/.gitignore | 93 +++-----------------------------------------------------
1 file changed, 5 insertions(+), 88 deletions(-)
[Qemu-devel] [PATCH] tests: Simplify .gitignore
Posted by Eric Blake 5 years, 10 months ago
Commit 0bcc8e5b was yet another instance of 'git status' reporting
dirty files after an in-tree build, thanks to the new binary
tests/check-block-qdict.

Instead of piecemeal exemptions of each new binary as they are
added, let's use git's negative globbing feature to exempt ALL
files that have a 'test-' or 'check-' prefix, except for the ones
ending in '.c' or '.sh'.  We still have a couple of generated
files that then need (re-)exclusion, but the overall list is a
LOT shorter, and less prone to needing future edits.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 tests/.gitignore | 93 +++-----------------------------------------------------
 1 file changed, 5 insertions(+), 88 deletions(-)

diff --git a/tests/.gitignore b/tests/.gitignore
index 2bc61a9a58d..08e2df1ce1f 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -2,101 +2,18 @@ atomic_add-bench
 benchmark-crypto-cipher
 benchmark-crypto-hash
 benchmark-crypto-hmac
-check-qdict
-check-qnum
-check-qjson
-check-qlist
-check-qlit
-check-qnull
-check-qobject
-check-qstring
-check-qom-interface
-check-qom-proplist
+check-*
+!check-*.c
+!check-*.sh
 qht-bench
 rcutorture
-test-aio
-test-aio-multithread
-test-arm-mptimer
-test-base64
-test-bdrv-drain
-test-bitops
-test-bitcnt
-test-block-backend
-test-blockjob
-test-blockjob-txn
-test-bufferiszero
-test-char
-test-clone-visitor
-test-coroutine
-test-crypto-afsplit
-test-crypto-block
-test-crypto-cipher
-test-crypto-hash
-test-crypto-hmac
-test-crypto-ivgen
-test-crypto-pbkdf
-test-crypto-secret
-test-crypto-tlscredsx509
-test-crypto-tlscredsx509-work/
-test-crypto-tlscredsx509-certs/
-test-crypto-tlssession
-test-crypto-tlssession-work/
-test-crypto-tlssession-client/
-test-crypto-tlssession-server/
-test-crypto-xts
-test-cutils
-test-hbitmap
-test-hmp
-test-int128
-test-iov
-test-io-channel-buffer
-test-io-channel-command
-test-io-channel-command.fifo
-test-io-channel-file
-test-io-channel-file.txt
-test-io-channel-socket
-test-io-channel-tls
-test-io-task
-test-keyval
-test-logging
-test-mul64
-test-opts-visitor
+test-*
+!test-*.c
 test-qapi-commands.[ch]
 test-qapi-events.[ch]
 test-qapi-types.[ch]
-test-qapi-util
 test-qapi-visit.[ch]
-test-qdev-global-props
-test-qemu-opts
-test-qdist
-test-qga
-test-qht
-test-qht-par
-test-qmp-cmds
-test-qmp-event
-test-qobject-input-strict
-test-qobject-input-visitor
 test-qapi-introspect.[ch]
-test-qobject-output-visitor
-test-rcu-list
-test-replication
-test-shift128
-test-string-input-visitor
-test-string-output-visitor
-test-thread-pool
-test-throttle
-test-timed-average
-test-uuid
-test-util-sockets
-test-visitor-serialization
-test-vmstate
-test-write-threshold
-test-x86-cpuid
-test-x86-cpuid-compat
-test-xbzrle
-test-netfilter
-test-filter-mirror
-test-filter-redirector
 *-test
 qapi-schema/*.test.*
 vm/*.img
-- 
2.14.4


Re: [Qemu-devel] [PATCH] tests: Simplify .gitignore
Posted by Philippe Mathieu-Daudé 5 years, 10 months ago
On 06/19/2018 05:39 PM, Eric Blake wrote:
> Commit 0bcc8e5b was yet another instance of 'git status' reporting
> dirty files after an in-tree build, thanks to the new binary
> tests/check-block-qdict.
> 
> Instead of piecemeal exemptions of each new binary as they are
> added, let's use git's negative globbing feature to exempt ALL
> files that have a 'test-' or 'check-' prefix, except for the ones
> ending in '.c' or '.sh'.  We still have a couple of generated
> files that then need (re-)exclusion, but the overall list is a
> LOT shorter, and less prone to needing future edits.

Finally :)

> 
> Signed-off-by: Eric Blake <eblake@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  tests/.gitignore | 93 +++-----------------------------------------------------
>  1 file changed, 5 insertions(+), 88 deletions(-)
> 
> diff --git a/tests/.gitignore b/tests/.gitignore
> index 2bc61a9a58d..08e2df1ce1f 100644
> --- a/tests/.gitignore
> +++ b/tests/.gitignore
> @@ -2,101 +2,18 @@ atomic_add-bench
>  benchmark-crypto-cipher
>  benchmark-crypto-hash
>  benchmark-crypto-hmac
> -check-qdict
> -check-qnum
> -check-qjson
> -check-qlist
> -check-qlit
> -check-qnull
> -check-qobject
> -check-qstring
> -check-qom-interface
> -check-qom-proplist
> +check-*
> +!check-*.c
> +!check-*.sh
>  qht-bench
>  rcutorture
> -test-aio
> -test-aio-multithread
> -test-arm-mptimer
> -test-base64
> -test-bdrv-drain
> -test-bitops
> -test-bitcnt
> -test-block-backend
> -test-blockjob
> -test-blockjob-txn
> -test-bufferiszero
> -test-char
> -test-clone-visitor
> -test-coroutine
> -test-crypto-afsplit
> -test-crypto-block
> -test-crypto-cipher
> -test-crypto-hash
> -test-crypto-hmac
> -test-crypto-ivgen
> -test-crypto-pbkdf
> -test-crypto-secret
> -test-crypto-tlscredsx509
> -test-crypto-tlscredsx509-work/
> -test-crypto-tlscredsx509-certs/
> -test-crypto-tlssession
> -test-crypto-tlssession-work/
> -test-crypto-tlssession-client/
> -test-crypto-tlssession-server/
> -test-crypto-xts
> -test-cutils
> -test-hbitmap
> -test-hmp
> -test-int128
> -test-iov
> -test-io-channel-buffer
> -test-io-channel-command
> -test-io-channel-command.fifo
> -test-io-channel-file
> -test-io-channel-file.txt
> -test-io-channel-socket
> -test-io-channel-tls
> -test-io-task
> -test-keyval
> -test-logging
> -test-mul64
> -test-opts-visitor
> +test-*
> +!test-*.c
>  test-qapi-commands.[ch]
>  test-qapi-events.[ch]
>  test-qapi-types.[ch]
> -test-qapi-util
>  test-qapi-visit.[ch]
> -test-qdev-global-props
> -test-qemu-opts
> -test-qdist
> -test-qga
> -test-qht
> -test-qht-par
> -test-qmp-cmds
> -test-qmp-event
> -test-qobject-input-strict
> -test-qobject-input-visitor
>  test-qapi-introspect.[ch]
> -test-qobject-output-visitor
> -test-rcu-list
> -test-replication
> -test-shift128
> -test-string-input-visitor
> -test-string-output-visitor
> -test-thread-pool
> -test-throttle
> -test-timed-average
> -test-uuid
> -test-util-sockets
> -test-visitor-serialization
> -test-vmstate
> -test-write-threshold
> -test-x86-cpuid
> -test-x86-cpuid-compat
> -test-xbzrle
> -test-netfilter
> -test-filter-mirror
> -test-filter-redirector
>  *-test
>  qapi-schema/*.test.*
>  vm/*.img
> 

Re: [Qemu-devel] [PATCH] tests: Simplify .gitignore
Posted by Eric Blake 5 years, 10 months ago
On 06/19/2018 04:10 PM, Philippe Mathieu-Daudé wrote:
> On 06/19/2018 05:39 PM, Eric Blake wrote:
>> Commit 0bcc8e5b was yet another instance of 'git status' reporting
>> dirty files after an in-tree build, thanks to the new binary
>> tests/check-block-qdict.
>>
>> Instead of piecemeal exemptions of each new binary as they are
>> added, let's use git's negative globbing feature to exempt ALL
>> files that have a 'test-' or 'check-' prefix, except for the ones
>> ending in '.c' or '.sh'.  We still have a couple of generated
>> files that then need (re-)exclusion, but the overall list is a
>> LOT shorter, and less prone to needing future edits.
> 
> Finally :)
> 
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
> 
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Thanks; including it in my NBD queue for a pull request.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH] tests: Simplify .gitignore
Posted by Markus Armbruster 5 years, 10 months ago
Eric Blake <eblake@redhat.com> writes:

> Commit 0bcc8e5b was yet another instance of 'git status' reporting
> dirty files after an in-tree build, thanks to the new binary
> tests/check-block-qdict.
>
> Instead of piecemeal exemptions of each new binary as they are
> added, let's use git's negative globbing feature to exempt ALL
> files that have a 'test-' or 'check-' prefix, except for the ones
> ending in '.c' or '.sh'.  We still have a couple of generated
> files that then need (re-)exclusion, but the overall list is a
> LOT shorter, and less prone to needing future edits.
>
> Signed-off-by: Eric Blake <eblake@redhat.com>

No objections to your patch, but the true cure for the ".gitignore is
huge and perpetually stale" is getting rid of in-tree builds.