public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] lib/tst_kvercmp: fixed a compiling error
@ 2013-07-23 10:28 Zhouping Liu
  2013-07-23 11:44 ` Wanlong Gao
  0 siblings, 1 reply; 4+ messages in thread
From: Zhouping Liu @ 2013-07-23 10:28 UTC (permalink / raw)
  To: LTP List

commit 18f7be7eb introduced the following compiling error:

make[1]: Leaving directory `/mnt/tests/kernel/distribution/ltp/git_test/ltp/testcases/kernel/containers/libclone'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I../../../include -I../../../include   -L../../../lib  check_for_unshare.c  -ldl -lltp -o check_for_unshare
check_for_unshare.c: In function ‘main’:
check_for_unshare.c:35:8: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
  void *ret;
        ^
../../../lib/libltp.a(tst_res.o): In function `cat_file':
/mnt/tests/kernel/distribution/ltp/git_test/ltp/lib/tst_res.c:777: undefined reference to `TCID'
/mnt/tests/kernel/distribution/ltp/git_test/ltp/lib/tst_res.c:787: undefined reference to `TCID'
/mnt/tests/kernel/distribution/ltp/git_test/ltp/lib/tst_res.c:795: undefined reference to `TCID'
../../../lib/libltp.a(tst_res.o): In function `tst_res':
/mnt/tests/kernel/distribution/ltp/git_test/ltp/lib/tst_res.c:301: undefined reference to `TCID'
/mnt/tests/kernel/distribution/ltp/git_test/ltp/lib/tst_res.c:317: undefined reference to `TCID'
../../../lib/libltp.a(tst_res.o):/mnt/tests/kernel/distribution/ltp/git_test/ltp/lib/tst_res.c:370: more undefined references to `TCID' follow
collect2: error: ld returned 1 exit status
make: *** [check_for_unshare] Error 1

that's because commit 18f7be7eb used LTP lib function tst_resm(), using printf() instead can avoid it.

Signed-off-by: Zhouping Liu <zliu@redhat.com>
---
 lib/tst_kvercmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tst_kvercmp.c b/lib/tst_kvercmp.c
index be4148a..b6aee99 100644
--- a/lib/tst_kvercmp.c
+++ b/lib/tst_kvercmp.c
@@ -103,7 +103,7 @@ int tst_kvercmp2(int r1, int r2, int r3, struct tst_kern_exv *vers)
 
 	for (i = 0; vers[i].dist_name; i++) {
 		if (!strcmp(vers[i].dist_name, cur_dist_name)) {
-			tst_resm(TINFO, "Detected %s using kernel version %s",
+			printf("Detected %s using kernel version %s",
 				 cur_dist_name, kver);
 			return tst_kexvcmp(vers[i].extra_ver, kver);
 		}
-- 
1.7.11.7


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-30  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-23 10:28 [LTP] [PATCH] lib/tst_kvercmp: fixed a compiling error Zhouping Liu
2013-07-23 11:44 ` Wanlong Gao
2013-07-30  9:45   ` chrubis
2013-07-30  9:47     ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox