Skip to contentSkip to conversation

xfstests: fix install target using sudo

PATCH New Luis R. Rodriguez 1 participant 1 message Jun 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 xfstests: fix install target using sudo

If you install with:

sudo make install

Depending on the system, you may see that /var/lib/xfstests/ installed properly but /var/lib/xfstests/tests/ is empty and so your install really is broken and not functional. Finding out what went wrong is not obvious.

The issue is caused due to the fact that $(PWD) is used nad if sudo is used this can be empty on some systems.

PWD is only used on one target on the xfstests build system, the tests/*/ dir install target.

We can fix this by using $(CURDIR) instead.

This issue is observed on both Fedora and OpenSUSE, but not on Debian.

---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +1 -1
index 2611b3b845f5..11164e9ec130 100644
@@ -5,7 +5,7 @@
 TOPDIR = ..
 include $(TOPDIR)/include/builddefs
 
-TESTS_SUBDIRS = $(sort $(dir $(wildcard $(PWD)/$(TESTS_DIR)/[a-z]*/)))
+TESTS_SUBDIRS = $(sort $(dir $(wildcard $(CURDIR)/[a-z]*/)))
 
 include $(BUILDRULES)
 
Signature · 1 line
2.16.3