* [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean
@ 2018-08-22 18:09 Luca Boccassi
2018-08-22 18:09 ` [PATCH iproute2 2/3] testsuite: let make compile build the netlink helper Luca Boccassi
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Luca Boccassi @ 2018-08-22 18:09 UTC (permalink / raw)
To: netdev; +Cc: stephen, stefan.bader
Some generated test files were not removed, including one executable in
the testsuite/tools directory.
Ensure make clean from the top level directory works for the testsuite
subdirs too, and that all the files are removed.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
Makefile | 2 +-
testsuite/Makefile | 3 +++
testsuite/tools/Makefile | 3 +++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 651d2a50..ea2f797c 100644
--- a/Makefile
+++ b/Makefile
@@ -96,7 +96,7 @@ snapshot:
> include/SNAPSHOT.h
clean:
- @for i in $(SUBDIRS); \
+ @for i in $(SUBDIRS) testsuite; \
do $(MAKE) $(MFLAGS) -C $$i clean; done
clobber:
diff --git a/testsuite/Makefile b/testsuite/Makefile
index 8fcbc557..2acd0427 100644
--- a/testsuite/Makefile
+++ b/testsuite/Makefile
@@ -43,6 +43,9 @@ alltests: $(TESTS)
clean:
@echo "Removing $(RESULTS_DIR) dir ..."
@rm -rf $(RESULTS_DIR)
+ @rm -f iproute2/iproute2-this
+ @rm -f tests/ip/link/dev_wo_vf_rate.nl
+ $(MAKE) -C tools clean
distclean: clean
echo "Entering iproute2" && cd iproute2 && $(MAKE) distclean && cd ..;
diff --git a/testsuite/tools/Makefile b/testsuite/tools/Makefile
index f2cdc980..f0ce4ee2 100644
--- a/testsuite/tools/Makefile
+++ b/testsuite/tools/Makefile
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
generate_nlmsg: generate_nlmsg.c ../../lib/libnetlink.c
$(CC) -o $@ $^
+
+clean:
+ rm -f generate_nlmsg
--
2.18.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH iproute2 2/3] testsuite: let make compile build the netlink helper
2018-08-22 18:09 [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean Luca Boccassi
@ 2018-08-22 18:09 ` Luca Boccassi
2018-08-22 18:09 ` [PATCH iproute2 3/3] testsuite: run dmesg with sudo Luca Boccassi
2018-08-23 7:07 ` [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean Stefan Bader
2 siblings, 0 replies; 5+ messages in thread
From: Luca Boccassi @ 2018-08-22 18:09 UTC (permalink / raw)
To: netdev; +Cc: stephen, stefan.bader
The generate_nlmsg binary is required but make -C testsuite compile
does not build it. Add the necessary includes and C*FLAGS to the tools
Makefile and have the compile target build it.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
testsuite/Makefile | 1 +
testsuite/tools/Makefile | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/testsuite/Makefile b/testsuite/Makefile
index 2acd0427..5e269877 100644
--- a/testsuite/Makefile
+++ b/testsuite/Makefile
@@ -32,6 +32,7 @@ configure:
compile: configure
echo "Entering iproute2" && cd iproute2 && $(MAKE) && cd ..;
+ $(MAKE) -C tools
listtests:
@for t in $(TESTS); do \
diff --git a/testsuite/tools/Makefile b/testsuite/tools/Makefile
index f0ce4ee2..c936af71 100644
--- a/testsuite/tools/Makefile
+++ b/testsuite/tools/Makefile
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
+include ../../config.mk
+
generate_nlmsg: generate_nlmsg.c ../../lib/libnetlink.c
- $(CC) -o $@ $^
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDLIBS) $(EXTRA_CFLAGS) -I../../include -include../../include/uapi/linux/netlink.h -o $@ $^
clean:
rm -f generate_nlmsg
--
2.18.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH iproute2 3/3] testsuite: run dmesg with sudo
2018-08-22 18:09 [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean Luca Boccassi
2018-08-22 18:09 ` [PATCH iproute2 2/3] testsuite: let make compile build the netlink helper Luca Boccassi
@ 2018-08-22 18:09 ` Luca Boccassi
2018-08-23 7:07 ` [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean Stefan Bader
2 siblings, 0 replies; 5+ messages in thread
From: Luca Boccassi @ 2018-08-22 18:09 UTC (permalink / raw)
To: netdev; +Cc: stephen, stefan.bader
Some distributions like Debian nowadays restrict the dmesg command to
root-only. Run it with sudo in the testsuite.
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
testsuite/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testsuite/Makefile b/testsuite/Makefile
index 5e269877..ef45d5a7 100644
--- a/testsuite/Makefile
+++ b/testsuite/Makefile
@@ -79,5 +79,5 @@ endif
echo "PASS"; \
fi; \
rm "$$TMP_ERR" "$$TMP_OUT"; \
- dmesg > $(RESULTS_DIR)/$@.$$o.dmesg; \
+ sudo dmesg > $(RESULTS_DIR)/$@.$$o.dmesg; \
done
--
2.18.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean
2018-08-22 18:09 [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean Luca Boccassi
2018-08-22 18:09 ` [PATCH iproute2 2/3] testsuite: let make compile build the netlink helper Luca Boccassi
2018-08-22 18:09 ` [PATCH iproute2 3/3] testsuite: run dmesg with sudo Luca Boccassi
@ 2018-08-23 7:07 ` Stefan Bader
2018-08-23 8:34 ` Luca Boccassi
2 siblings, 1 reply; 5+ messages in thread
From: Stefan Bader @ 2018-08-23 7:07 UTC (permalink / raw)
To: Luca Boccassi, netdev; +Cc: stephen
[-- Attachment #1.1: Type: text/plain, Size: 1987 bytes --]
On 22.08.2018 20:09, Luca Boccassi wrote:
> Some generated test files were not removed, including one executable in
> the testsuite/tools directory.
> Ensure make clean from the top level directory works for the testsuite
> subdirs too, and that all the files are removed.
>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
Patch 1+2 look good to me and I would ack if that would count in any way.
For patch 3 I only wonder whether that might re-use $PREFIX (which is
defined as "sudo -E unshare -n"). Ok, the unshare part might be slight
overkill, but maybe a little better in style. Not sure though, and it
is high level whining...
-Stefan
> Makefile | 2 +-
> testsuite/Makefile | 3 +++
> testsuite/tools/Makefile | 3 +++
> 3 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 651d2a50..ea2f797c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -96,7 +96,7 @@ snapshot:
> > include/SNAPSHOT.h
>
> clean:
> - @for i in $(SUBDIRS); \
> + @for i in $(SUBDIRS) testsuite; \
> do $(MAKE) $(MFLAGS) -C $$i clean; done
>
> clobber:
> diff --git a/testsuite/Makefile b/testsuite/Makefile
> index 8fcbc557..2acd0427 100644
> --- a/testsuite/Makefile
> +++ b/testsuite/Makefile
> @@ -43,6 +43,9 @@ alltests: $(TESTS)
> clean:
> @echo "Removing $(RESULTS_DIR) dir ..."
> @rm -rf $(RESULTS_DIR)
> + @rm -f iproute2/iproute2-this
> + @rm -f tests/ip/link/dev_wo_vf_rate.nl
> + $(MAKE) -C tools clean
>
> distclean: clean
> echo "Entering iproute2" && cd iproute2 && $(MAKE) distclean && cd ..;
> diff --git a/testsuite/tools/Makefile b/testsuite/tools/Makefile
> index f2cdc980..f0ce4ee2 100644
> --- a/testsuite/tools/Makefile
> +++ b/testsuite/tools/Makefile
> @@ -1,3 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0
> generate_nlmsg: generate_nlmsg.c ../../lib/libnetlink.c
> $(CC) -o $@ $^
> +
> +clean:
> + rm -f generate_nlmsg
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean
2018-08-23 7:07 ` [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean Stefan Bader
@ 2018-08-23 8:34 ` Luca Boccassi
0 siblings, 0 replies; 5+ messages in thread
From: Luca Boccassi @ 2018-08-23 8:34 UTC (permalink / raw)
To: Stefan Bader, netdev; +Cc: stephen
[-- Attachment #1: Type: text/plain, Size: 994 bytes --]
On Thu, 2018-08-23 at 09:07 +0200, Stefan Bader wrote:
> On 22.08.2018 20:09, Luca Boccassi wrote:
> > Some generated test files were not removed, including one
> > executable in
> > the testsuite/tools directory.
> > Ensure make clean from the top level directory works for the
> > testsuite
> > subdirs too, and that all the files are removed.
> >
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
>
> Patch 1+2 look good to me and I would ack if that would count in any
> way.
> For patch 3 I only wonder whether that might re-use $PREFIX (which is
> defined as "sudo -E unshare -n"). Ok, the unshare part might be
> slight
> overkill, but maybe a little better in style. Not sure though, and it
> is high level whining...
>
> -Stefan
Hi,
Yeah I thought about that, but as you noticed it would run it through
unshare so I changed it in the end. I don't mind either way - Stephen,
let me know which one you prefer.
--
Kind regards,
Luca Boccassi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-08-23 12:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-22 18:09 [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean Luca Boccassi
2018-08-22 18:09 ` [PATCH iproute2 2/3] testsuite: let make compile build the netlink helper Luca Boccassi
2018-08-22 18:09 ` [PATCH iproute2 3/3] testsuite: run dmesg with sudo Luca Boccassi
2018-08-23 7:07 ` [PATCH iproute2 1/3] testsuite: remove all temp files and implement make clean Stefan Bader
2018-08-23 8:34 ` Luca Boccassi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).