diff mbox

[v1] samples/bpf: Add a .gitignore for binaries

Message ID 20170212212356.11675-1-mic@digikod.net
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Mickaël Salaün Feb. 12, 2017, 9:23 p.m. UTC
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Wang Nan <wangnan0@huawei.com>
---
 samples/bpf/.gitignore | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 samples/bpf/.gitignore

Comments

David Ahern Feb. 13, 2017, 1:43 a.m. UTC | #1
On 2/12/17 2:23 PM, Mickaël Salaün wrote:
> diff --git a/samples/bpf/.gitignore b/samples/bpf/.gitignore
> new file mode 100644
> index 000000000000..a7562a5ef4c2
> --- /dev/null
> +++ b/samples/bpf/.gitignore
> @@ -0,0 +1,32 @@
> +fds_example
> +lathist

...

Listing each target is going to be a PITA to maintain. It would be
better to put targets into a build directory (bin?) and ignore the
directory.
Mickaël Salaün May 13, 2017, 10:30 a.m. UTC | #2
On 13/02/2017 02:43, David Ahern wrote:
> On 2/12/17 2:23 PM, Mickaël Salaün wrote:
>> diff --git a/samples/bpf/.gitignore b/samples/bpf/.gitignore
>> new file mode 100644
>> index 000000000000..a7562a5ef4c2
>> --- /dev/null
>> +++ b/samples/bpf/.gitignore
>> @@ -0,0 +1,32 @@
>> +fds_example
>> +lathist
> 
> ...
> 
> Listing each target is going to be a PITA to maintain. It would be
> better to put targets into a build directory (bin?) and ignore the
> directory.
> 

It would require a lot of modifications to the Makefile and more
complexity. It seems much more simple for everyone to stick to a simple
gitignore file easily maintainable:
$ awk '$1 == "hostprogs-y" { print $3 }' < Makefile > .gitignore

Alexei, Daniel, what do you think about this? Do you want me to send a
v2 with the new tests?

 Mickaël
David Ahern May 16, 2017, 11:27 p.m. UTC | #3
On 5/13/17 3:30 AM, Mickaël Salaün wrote:
> 
> On 13/02/2017 02:43, David Ahern wrote:
>> On 2/12/17 2:23 PM, Mickaël Salaün wrote:
>>> diff --git a/samples/bpf/.gitignore b/samples/bpf/.gitignore
>>> new file mode 100644
>>> index 000000000000..a7562a5ef4c2
>>> --- /dev/null
>>> +++ b/samples/bpf/.gitignore
>>> @@ -0,0 +1,32 @@
>>> +fds_example
>>> +lathist
>>
>> ...
>>
>> Listing each target is going to be a PITA to maintain. It would be
>> better to put targets into a build directory (bin?) and ignore the
>> directory.
>>
> 
> It would require a lot of modifications to the Makefile and more
> complexity. It seems much more simple for everyone to stick to a simple
> gitignore file easily maintainable:
> $ awk '$1 == "hostprogs-y" { print $3 }' < Makefile > .gitignore
> 
> Alexei, Daniel, what do you think about this? Do you want me to send a
> v2 with the new tests?
> 

The problem stems from the fact that bpf samples do not really fall into
the 'hostprogs' category (see "4 Host Program support" in
Documentation/kbuild/makefiles.txt). Fixing samples/bpf to not rely on
it is the better long term solution. Building of tools/ for example does
not rely on it so there is an existing example of leveraging kernel
headers without the overhead.
diff mbox

Patch

diff --git a/samples/bpf/.gitignore b/samples/bpf/.gitignore
new file mode 100644
index 000000000000..a7562a5ef4c2
--- /dev/null
+++ b/samples/bpf/.gitignore
@@ -0,0 +1,32 @@ 
+fds_example
+lathist
+lwt_len_hist
+map_perf_test
+offwaketime
+sampleip
+sockex1
+sockex2
+sockex3
+sock_example
+spintest
+tc_l2_redirect
+test_cgrp2_array_pin
+test_cgrp2_attach
+test_cgrp2_attach2
+test_cgrp2_sock
+test_cgrp2_sock2
+test_current_task_under_cgroup
+test_lru_dist
+test_overhead
+test_probe_write_user
+trace_event
+trace_output
+tracex1
+tracex2
+tracex3
+tracex4
+tracex5
+tracex6
+xdp1
+xdp2
+xdp_tx_iptunnel