Skip to contentSkip to conversation

tools pci: Do not delete pcitest.sh in 'make clean'

PATCH In review Arnaldo Carvalho de Melo 2 participants 2 messages May 13, 2019 – May 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools pci: Do not delete pcitest.sh in 'make clean'

Hi,

I have this in my local perf/core branch, lined up for 5.2,
please let me know if you're ok with it.

- Arnaldo

commit 4dfe8f59156382b7695fe5c10bddd5c97c84289a

Author: Arnaldo Carvalho de Melo <[email protected]>
Date:   Mon May 13 13:53:20 2019 -0400

tools pci: Do not delete pcitest.sh in 'make clean'

When running 'make -C tools clean' I noticed that a revision controlled file was being deleted:

$ git diff
diff --git a/tools/pci/pcitest.sh b/tools/pci/pcitest.sh deleted file mode 100644
index 75ed48ff2990..000000000000
--- a/tools/pci/pcitest.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0
-
-echo "BAR tests"
-echo
<SNIP>

So I changed the make variables to fix that, testing it should produce the same intended result while not deleting revision controlled files.

$ make O=/tmp/build/pci -C tools/pci install
make: Entering directory '/home/acme/git/perf/tools/pci'
make -f /home/acme/git/perf/tools/build/Makefile.build dir=. obj=pcitest
install -d -m 755 /usr/bin; \
for program in /tmp/build/pci/pcitest pcitest.sh; do \
install $program /usr/bin; \
done
install: cannot change permissions of ‘/usr/bin’: Operation not permitted
install: cannot create regular file '/usr/bin/pcitest': Permission denied
install: cannot create regular file '/usr/bin/pcitest.sh': Permission denied
make: *** [Makefile:46: install] Error 1
make: Leaving directory '/home/acme/git/perf/tools/pci'
$ ls -la /tmp/build/pci/pcitest
-rwxrwxr-x. 1 acme acme 27152 May 13 13:52 /tmp/build/pci/pcitest $ /tmp/build/pci/pcitest
can't open PCI Endpoint Test device: No such file or directory $

Cc Adrian Hunter <[email protected]>
Cc Gustavo Pimentel <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kishon Vijay Abraham I <[email protected]>
Cc Lorenzo Pieralisi <[email protected]>
Cc Namhyung Kim <[email protected]>
Fixes 1ce78ce09430 ("tools: PCI: Change pcitest compiling process")
tools/pci/Makefile +2 -2
index 46e4c2f318c9..f64da817bc03 100644
@@ -14,7 +14,7 @@ MAKEFLAGS += -r
 
 CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
 
-ALL_TARGETS := pcitest pcitest.sh
+ALL_TARGETS := pcitest
 ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
 
 all: $(ALL_PROGRAMS)
@@ -44,7 +44,7 @@ clean:
 
 install: $(ALL_PROGRAMS)
 	install -d -m 755 $(DESTDIR)$(bindir);		\
-	for program in $(ALL_PROGRAMS); do		\
+	for program in $(ALL_PROGRAMS) pcitest.sh; do	\
 		install $$program $(DESTDIR)$(bindir);	\
 	done
 
#1 lore raw

On Mon, May 13, 2019 at 19:37:28, Arnaldo Carvalho de Melo <[email protected]> wrote:

Hi Arnaldo,

I think Kishon has already dispatched a patch fixing this issue. Kishon, can you confirm it?

Regards,
Gustavo

Quoted 83 lines

Hi,

I have this in my local perf/core branch, lined up for 5.2,
please let me know if you're ok with it.

- Arnaldo

commit 4dfe8f59156382b7695fe5c10bddd5c97c84289a

Author: Arnaldo Carvalho de Melo <[email protected]>
Date:   Mon May 13 13:53:20 2019 -0400

tools pci: Do not delete pcitest.sh in 'make clean'

When running 'make -C tools clean' I noticed that a revision controlled file was being deleted:

$ git diff
diff --git a/tools/pci/pcitest.sh b/tools/pci/pcitest.sh deleted file mode 100644
index 75ed48ff2990..000000000000
--- a/tools/pci/pcitest.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-# SPDX-License-Identifier: GPL-2.0
-
-echo "BAR tests"
-echo
<SNIP>

So I changed the make variables to fix that, testing it should produce the same intended result while not deleting revision controlled files.

$ make O=/tmp/build/pci -C tools/pci install
make: Entering directory '/home/acme/git/perf/tools/pci'
make -f /home/acme/git/perf/tools/build/Makefile.build dir=. obj=pcitest
install -d -m 755 /usr/bin; \
for program in /tmp/build/pci/pcitest pcitest.sh; do \
install $program /usr/bin; \
done
install: cannot change permissions of ‘/usr/bin’: Operation not permitted
install: cannot create regular file '/usr/bin/pcitest': Permission denied
install: cannot create regular file '/usr/bin/pcitest.sh': Permission denied
make: *** [Makefile:46: install] Error 1
make: Leaving directory '/home/acme/git/perf/tools/pci'
$ ls -la /tmp/build/pci/pcitest
-rwxrwxr-x. 1 acme acme 27152 May 13 13:52 /tmp/build/pci/pcitest $ /tmp/build/pci/pcitest
can't open PCI Endpoint Test device: No such file or directory $

tools/pci/Makefile +2 -2
index 46e4c2f318c9..f64da817bc03 100644
@@ -14,7 +14,7 @@ MAKEFLAGS += -r
 
 CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
 
-ALL_TARGETS := pcitest pcitest.sh
+ALL_TARGETS := pcitest
 ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
 
 all: $(ALL_PROGRAMS)
@@ -44,7 +44,7 @@ clean:
 
 install: $(ALL_PROGRAMS)
 	install -d -m 755 $(DESTDIR)$(bindir);		\
-	for program in $(ALL_PROGRAMS); do		\
+	for program in $(ALL_PROGRAMS) pcitest.sh; do	\
 		install $$program $(DESTDIR)$(bindir);	\
 	done