* [LTP] Problems compiling
@ 2014-04-11 16:37 Mats Liljegren
2014-04-14 3:57 ` Xiaoguang Wang
0 siblings, 1 reply; 7+ messages in thread
From: Mats Liljegren @ 2014-04-11 16:37 UTC (permalink / raw)
To: ltp-list
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] Problems compiling
2014-04-11 16:37 [LTP] Problems compiling Mats Liljegren
@ 2014-04-14 3:57 ` Xiaoguang Wang
2014-04-14 8:34 ` [LTP] [PATCH] testcases/kernel/mem: Fixed compile error Mats Liljegren
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Xiaoguang Wang @ 2014-04-14 3:57 UTC (permalink / raw)
To: Mats Liljegren; +Cc: ltp-list
Hi,
On 04/12/2014 12:37 AM, Mats Liljegren wrote:
> 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/mem
LIBMEM_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
>
> 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
> Ltp-list@lists.sourceforge.net
> 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH] testcases/kernel/mem: Fixed compile error
2014-04-14 3:57 ` Xiaoguang Wang
@ 2014-04-14 8:34 ` Mats Liljegren
2014-04-14 16:09 ` [LTP] [PATCH] partrt_nohz_full: Get noHz mask from RT partition instead of boot parameter Mats Liljegren
2014-04-14 16:12 ` [LTP] Problems compiling chrubis
2 siblings, 0 replies; 7+ messages in thread
From: Mats Liljegren @ 2014-04-14 8:34 UTC (permalink / raw)
To: ltp-list
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.
Reported-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Signed-off-by: Mats Liljegren <mats.liljegren@enea.com>
---
testcases/kernel/mem/include/libmem.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/mem/include/libmem.mk b/testcases/kernel/mem/include/libmem.mk
index 7ebcf05..a90ce8f 100644
--- a/testcases/kernel/mem/include/libmem.mk
+++ b/testcases/kernel/mem/include/libmem.mk
@@ -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
--
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH] partrt_nohz_full: Get noHz mask from RT partition instead of boot parameter
2014-04-14 3:57 ` Xiaoguang Wang
2014-04-14 8:34 ` [LTP] [PATCH] testcases/kernel/mem: Fixed compile error Mats Liljegren
@ 2014-04-14 16:09 ` Mats Liljegren
2014-04-14 16:12 ` [LTP] Problems compiling chrubis
2 siblings, 0 replies; 7+ messages in thread
From: Mats Liljegren @ 2014-04-14 16:09 UTC (permalink / raw)
To: ltp-list
Now 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.
Signed-off-by: Mats Liljegren <mats.liljegren@enea.com>
---
.../partrt/nohz_full/test_partrt_nohz_full.c | 52 +++++++++++++++++++-
1 file changed, 51 insertions(+), 1 deletion(-)
diff --git a/testcases/kernel/partrt/nohz_full/test_partrt_nohz_full.c b/testcases/kernel/partrt/nohz_full/test_partrt_nohz_full.c
index 7c3ab09..1120b4b 100644
--- a/testcases/kernel/partrt/nohz_full/test_partrt_nohz_full.c
+++ b/testcases/kernel/partrt/nohz_full/test_partrt_nohz_full.c
@@ -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;
--
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [LTP] Problems compiling
2014-04-14 3:57 ` Xiaoguang Wang
2014-04-14 8:34 ` [LTP] [PATCH] testcases/kernel/mem: Fixed compile error Mats Liljegren
2014-04-14 16:09 ` [LTP] [PATCH] partrt_nohz_full: Get noHz mask from RT partition instead of boot parameter Mats Liljegren
@ 2014-04-14 16:12 ` chrubis
[not found] ` <0247700D01F14443B9209F90AD938CC524515766@sestoex05.enea.se>
2 siblings, 1 reply; 7+ messages in thread
From: chrubis @ 2014-04-14 16:12 UTC (permalink / raw)
To: Xiaoguang Wang; +Cc: ltp-list
Hi!
> > 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/mem
> LIBMEM_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.
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?
--- a/testcases/kernel/mem/include/libmem.mk
+++ b/testcases/kernel/mem/include/libmem.mk
@@ -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
chrubis@suse.cz
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] Problems compiling
[not found] ` <0247700D01F14443B9209F90AD938CC524515766@sestoex05.enea.se>
@ 2014-04-14 16:51 ` chrubis
[not found] ` <20140414185950.4945a644@mats-desktop>
0 siblings, 1 reply; 7+ messages in thread
From: chrubis @ 2014-04-14 16:51 UTC (permalink / raw)
To: Mats Liljegren; +Cc: ltp-list@lists.sourceforge.net
Hi!
> 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.
> 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.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [LTP] Problems compiling
[not found] ` <20140414185950.4945a644@mats-desktop>
@ 2014-04-14 17:05 ` chrubis
0 siblings, 0 replies; 7+ messages in thread
From: chrubis @ 2014-04-14 17:05 UTC (permalink / raw)
To: Mats Liljegren; +Cc: ltp-list@lists.sourceforge.net
Hi!
> 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.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-14 17:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-11 16:37 [LTP] Problems compiling Mats Liljegren
2014-04-14 3:57 ` Xiaoguang Wang
2014-04-14 8:34 ` [LTP] [PATCH] testcases/kernel/mem: Fixed compile error Mats Liljegren
2014-04-14 16:09 ` [LTP] [PATCH] partrt_nohz_full: Get noHz mask from RT partition instead of boot parameter Mats Liljegren
2014-04-14 16:12 ` [LTP] Problems compiling chrubis
[not found] ` <0247700D01F14443B9209F90AD938CC524515766@sestoex05.enea.se>
2014-04-14 16:51 ` chrubis
[not found] ` <20140414185950.4945a644@mats-desktop>
2014-04-14 17:05 ` chrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox