Problems compiling
I recently updated my master branch of my ltp git repository, but I now have a compile error:
make[6]: Entering directory `/nfs/hosts/sestonas06/homes/mlil/git/ltp/testcases/kernel/mem/lib' make[6]: ../../../../../testcases/kernel/mem/lib/Makefile: No such file or directory
Anyone else having this problem?
Best regards
Mats Liljegren
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi,
Quoted 7 lines · Mats Liljegren
I recently updated my master branch of my ltp git repository, but I now have a compile error:
make[6]: Entering directory `/nfs/hosts/sestonas06/homes/mlil/git/ltp/testcases/kernel/mem/lib' make[6]: ../../../../../testcases/kernel/mem/lib/Makefile: No such file or directory
Anyone else having this problem?
Yeah, I also met this problem.
I guess it may be "testcases/kernel/mem/include/libmem.mk" causing this issue.
I can reproduce this fail by following steps:
1, cd testcases/kernel/mem/lib
rm libmem.a
2, then back to testcases/kernel/mem/hugetlb/hugemmap
make
I got the similar error message:
make -C ../../../../../testcases/kernel/mem/lib -f "../../../../../testcases/kernel/mem/lib/Makefile" all make[1]: Entering directory `/root/ltp-dev/testcases/kernel/mem/lib'
make[1]: ../../../../../testcases/kernel/mem/lib/Makefile: No such file or directory make[1]: *** No rule to make target ../../../../../testcases/kernel/mem/lib/Makefile'. Stop. make[1]: Leaving directory /root/ltp-dev/testcases/kernel/mem/lib'
make: *** [../../../../../testcases/kernel/mem/lib/libmem.a] Error 2
In testcases/kernel/mem/include/libmem.mk:
MEM_SRCDIR := $(top_srcdir)/testcases/kernel/memLIBMEM_SRCDIR := $(MEM_SRCDIR)/lib
MEM_DIR := $(top_builddir)/testcases/kernel/mem LIBMEM_DIR := $(MEM_DIR)/lib LIBMEM := $(LIBMEM_DIR)/libmem.a FILTER_OUT_DIRS := $(LIBMEM_DIR) CFLAGS += -I$(MEM_SRCDIR)/include LDLIBS += $(NUMA_LIBS) -lmem -lltp LDFLAGS += -L$(LIBMEM_DIR)
$(LIBMEM_DIR):
mkdir -p "$@"
$(LIBMEM): $(LIBMEM_DIR)
$(MAKE) -C $^ -f "$(LIBMEM_SRCDIR)/Makefile" all
MAKE_DEPS += $(LIBMEM)
See the target $(LIBMEM). Since we have executed make command using the "-C" option, we do not need to specify a make file with relative path. We can just
execute like that: $(MAKE) -C $^ -f "Makefile" all in this case.
Here the true reason is that when we change directory to $(LIBMEM_DIR), $(LIBMEM_SRCDIR)/Makefile is not a valid path.
Regards,
Xiaoguang Wang
Quoted 4 lines
Best regards
Mats Liljegren
Quoted 11 lines
------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Ltp-list mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 1/1 testcases/kernel/mem: Fixed compile error
When compiling, the following error occurred:
make[6]: Entering directory `/nfs/hosts/sestonas06/homes/mlil/git/ltp/testcases/kernel/mem/lib' make[6]: ../../../../../testcases/kernel/mem/lib/Makefile: No such file or directory
This is because the file libmem.mk tried to both change current working to where the Makefile is as well as giving a relative path to it.
This has been fixed by simply removing the relative path to the Makefile since make knows how to find the correct make file itself.
--- testcases/kernel/mem/include/libmem.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/mem/include/libmem.mk +2 -2
@@ -31,13 +31,13 @@ $(LIBMEM_DIR): mkdir -p "$@" $(LIBMEM): $(LIBMEM_DIR) - $(MAKE) -C $^ -f "$(LIBMEM_SRCDIR)/Makefile" all + $(MAKE) -C $^ all MAKE_DEPS += $(LIBMEM) trunk-clean:: | lib-clean lib-clean:: $(LIBMEM_DIR) - $(MAKE) -C $^ -f "$(LIBMEM_SRCDIR)/Makefile" clean + $(MAKE) -C $^ clean include $(top_srcdir)/testcases/kernel/include/lib.mk
Signature · 13 lines
1.7.10.4 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 1/1 partrt_nohz_full: Get noHz mask from RT partition instead of boot parameter
In reply to Xiaoguang WangNow that partitioning is done outside of test case, the test case must adapt to the CPU list that is true for the rt partition. There is no guarantee that this list is identical to the nohz_full kernel boot parameter.
--- .../partrt/nohz_full/test_partrt_nohz_full.c | 52 +++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-)
testcases/kernel/partrt/nohz_full/test_partrt_nohz_full.c +51 -1
@@ -22,13 +22,16 @@#include <sys/types.h> #include <sys/wait.h> #include <sys/syscall.h> +#include <sys/stat.h> #include <stdarg.h> #include <inttypes.h> #include <limits.h> #include <time.h> #include <sched.h> +#include <fcntl.h> #include <test.h> +#include <safe_macros.h> /* Name of test case */ const char *TCID ="nohz_full" ;
@@ -439,13 +442,60 @@ static void cleanup(void)info ("Cleanup: Done" ); } +static unsigned long determine_nohz_mask (void ) +{ +const char *nohz_cpus_filename ="/sys/fs/cgroup/cpuset/rt/cpuset_cpus" ; +int file =SAFE_OPEN (cleanup, nohz_cpus_filename,O_RDONLY ); +struct stat stat_buf; +char *buf; +char *curr; +char *curr_next; +int range_first; +int range_last; +unsigned long mask =0 ; + +SAFE_FSTAT (cleanup, file, &stat_buf); + buf =SAFE_MALLOC (cleanup, stat_buf.st_size +1 ); +SAFE_READ (cleanup,0 , file, buf, stat_buf.st_size); + buf[stat_buf.st_size] ='\0' ; + + curr = buf; +while (curr < (buf + stat_buf.st_size)) { +int bit; + + range_first = range_last =strtoull (curr, &curr_next,10 ); +if (curr == curr_next) +err ("%s: %s: Cannot parse CPU list" , + nohz_cpus_filename, buf); + curr = curr_next; +if (*curr =='-' ) { + curr++; + range_last =strtoull (curr, &curr_next,10 ); +if (curr == curr_next) +err ("%s: %s: Cannot parse CPU list" , + nohz_cpus_filename, buf); + curr = curr_next; + } + +/* Set all bits in range */ +for (bit = range_first; bit <= range_last; bit++) { + mask |= (1 << bit); + } + +if (*curr ==',' ) + curr++; + } + +return mask; +} +/* * Prepare for test. * Perform CPU partitioning and start RT load. */ static int setup (void ) { -const unsigned long nohz_mask =shell_int (16 ,"list2mask --nohz" ); +const unsigned long nohz_mask =determine_nohz_mask ();int bit;int nr_children =0 ;
Signature · 13 lines
1.7.10.4 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 43 lines
Quoted 7 lines
I recently updated my master branch of my ltp git repository, but I now have a compile error:
make[6]: Entering directory `/nfs/hosts/sestonas06/homes/mlil/git/ltp/testcases/kernel/mem/lib' make[6]: ../../../../../testcases/kernel/mem/lib/Makefile: No such file or directory
Anyone else having this problem?
Yeah, I also met this problem.
I guess it may be "testcases/kernel/mem/include/libmem.mk" causing this issue.I can reproduce this fail by following steps:
1, cd testcases/kernel/mem/lib
rm libmem.a2, then back to testcases/kernel/mem/hugetlb/hugemmap
makeI got the similar error message:
make -C ../../../../../testcases/kernel/mem/lib -f "../../../../../testcases/kernel/mem/lib/Makefile" all make[1]: Entering directory `/root/ltp-dev/testcases/kernel/mem/lib'
make[1]: ../../../../../testcases/kernel/mem/lib/Makefile: No such file or directory make[1]: *** No rule to make target../../../../../testcases/kernel/mem/lib/Makefile'. Stop. make[1]: Leaving directory/root/ltp-dev/testcases/kernel/mem/lib'
make: *** [../../../../../testcases/kernel/mem/lib/libmem.a] Error 2In
testcases/kernel/mem/include/libmem.mk:
MEM_SRCDIR:= $(top_srcdir)/testcases/kernel/memLIBMEM_SRCDIR:= $(MEM_SRCDIR)/libMEM_DIR := $(top_builddir)/testcases/kernel/mem LIBMEM_DIR := $(MEM_DIR)/lib LIBMEM := $(LIBMEM_DIR)/libmem.a FILTER_OUT_DIRS := $(LIBMEM_DIR) CFLAGS += -I$(MEM_SRCDIR)/include LDLIBS += $(NUMA_LIBS) -lmem -lltp LDFLAGS += -L$(LIBMEM_DIR)$(LIBMEM_DIR):
mkdir -p "$@"
Quoted 8 lines
$(LIBMEM): $(LIBMEM_DIR)
$(MAKE) -C $^ -f "$(LIBMEM_SRCDIR)/Makefile" all
MAKE_DEPS+= $(LIBMEM)See the target $(LIBMEM). Since we have executed make command using the "-C" option, we do not need to specify a make file with relative path. We can just
execute like that: $(MAKE) -C $^ -f "Makefile" all in this case.
Wouldn't that break out-of-tree build? Because the LIBMEM_DIR is in the build path and the Makefile is in the LIBMEM_SRCDIR?
Does this change fix the build?
testcases/kernel/mem/include/libmem.mk +1 -2
@@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -MEM_SRCDIR := $(top_srcdir)/testcases/kernel/mem +MEM_SRCDIR := $(abs_top_srcdir)/testcases/kernel/mem --
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 1 line
I tried sending patches to the mailing list, but something got wrong. So if you see strange patches from me, you know why... ;-)
I can see these ;), I haven't had time to look into the second one yet.
Quoted 1 line
Anyhow, your patch fixed my problem. Any if you would have received my patch, it is based on the same idea though I removed the "-f <file>" part completely. So my patch would probably break out-of-tree builds.
Thanks for testing it. I will push my patch now.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 3 lines
Please ignore that second patch, it was the wrong one. It is from middle of my work with my test case so you will have no success applying it. Sorry for the spam...
Ack.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list