Skip to contentSkip to conversation

fix libevent01 testcase

PATCH In review Caspar Zhang 2 participants 2 messages Dec 15, 2009 1 message not in the archive

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 fix libevent01 testcase

In reply to a message not in the archive

Hi,

I found libevent01 testcase is disabled in testcase/kernel/syscalls/Makefile, the testscript can't be installed, I got a "FAIL" in testing. Here's the Patch to fix this problem.

Thanks,
Caspar

Hi,

I found libevent01 testcase is disabled in testcase/kernel/syscalls/Makefile, the testscript can't be installed, I got a "FAIL" in testing. Here's the Patch to fix this problem.

runtest/syscalls +1 -1
diff -Naur a/runtest/syscalls b/runtest/syscalls
@@ -465,7 +465,7 @@
 lchown02 prep_create_link; lchown02
 lchown02_16 prep_create_link; lchown02_16
 
-libevent01 export LTPROOT; run_libevent.sh
+libevent01 export LTPROOT; libevent/run_libevent.sh
 
 link01 symlink01 -T link01
 link02 link02
testcases/kernel/syscalls/libevent/run_libevent.sh +1 -1
diff -Naur a/testcases/kernel/syscalls/libevent/run_libevent.sh b/testcases/kernel/syscalls/libevent/run_libevent.sh
@@ -31,7 +31,7 @@
 	tst_resm TCONF "You need to be root to run these tests"
 	TST_EXIT=0
 else
-	"$LTPROOT/testcases/bin/tests/test-libevent.sh"
+	"$LTPROOT/testcases/bin/libevent/test/test-libevent.sh"
 	TST_EXIT=$?
 fi
 tst_cleanup
testcases/kernel/syscalls/Makefile +11 -21
diff -Naur a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
@@ -24,52 +24,42 @@
 
 include	$(top_srcdir)/include/mk/env_pre.mk
 
-# libevent requires some massaging to get this to work.
-FILTER_OUT_DIRS		:= libevent
 # pcllib is busted as all heck because of libtool
-FILTER_OUT_DIRS		+= pcllib
+FILTER_OUT_DIRS		:= pcllib
 
-# libevent doesn't compile right now... I have no bloody clue what breaks it
-# when doing make clean...
-ifdef DO_NO_COMPILE_ME
+## libevent doesn't compile right now... I have no bloody clue what breaks it
+## when doing make clean...
+# libevent enabled by Caspar Zhang <czhang#redhat.com>
 ifeq ($(wildcard $(abs_srcdir)/libevent/test/Makefile),)
 $(warning libevent/test/Makefile does not exist; skipping to avoid compile errors)
 $(warning Please run "make autotools" and "configure" at the top-level LTP)
 $(warning directory if you want to run this test)
 else
 
-LIBEVENT		:= libevent/lib/libevent.a
-
-LIBEVENT_LINK		:= libevent/libevent.a
+LIBEVENT		:= libevent/libevent.a
 
 CLEAN_DEPS		:= libevent-clean
 
-CLEAN_TARGETS		:= $(LIBEVENT) $(LIBEVENT_LINK)
+CLEAN_TARGETS		:= $(LIBEVENT) 
 
 INSTALL_DEPS		:= libevent-install
 
-INSTALL_TARGETS		:= libevent/run-libevent.sh libevent/test/test-libevent.sh
-
 LIBEVENT_APPS		:= regress test-eof test-init test-time test-weof
 
-MAKE_DEPS		:= libevent-all
+INSTALL_TARGETS		:= libevent/run_libevent.sh libevent/test/test-libevent.sh $(addprefix libevent/test/,$(LIBEVENT_APPS))
 
-MAKE_TARGETS		:= $(addprefix libevent/test/,$(LIBEVENT_APPS))
+MAKE_DEPS		:= $(LIBEVENT) libevent-all
 
-libevent libevent/test: %:
-	mkdir -p "$@"
-
-$(LIBEVENT): $(abs_srcdir)/libevent/Makefile libevent
+$(LIBEVENT): $(abs_srcdir)/libevent/Makefile 
 	$(MAKE) -C libevent -f "$(firstword $^)" libevent.a
 
-libevent-all: $(abs_srcdir)/libevent/test/Makefile | $(LIBEVENT) libevent/test
+libevent-all: $(abs_srcdir)/libevent/test/Makefile 
 	$(MAKE) -C libevent/test -f "$(firstword $^)" $(LIBEVENT_APPS)
 
-libevent-clean libevent-install: libevent-%: $(abs_srcdir)/libevent/test/Makefile | libevent/test
+libevent-clean libevent-install: libevent-%: $(abs_srcdir)/libevent/test/Makefile 
 	$(MAKE) -C libevent/test -f "$(firstword $^)" $*
 
 endif
-endif
 
 ifeq ($(UCLINUX),1)
 FILTER_OUT_DIRS	+= capget capset chmod chown clone fork getcontext llseek \

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#2 lore raw
Quoted 5 lines · Caspar Zhang

Hi,

I found libevent01 testcase is disabled in testcase/kernel/syscalls/Makefile, the testscript can't be installed, I got a "FAIL" in testing. Here's the Patch to fix this problem.

I took a look at the Makefile again, and yes, I screwed up... I fixed the Makefile by using a proper set of LDFLAGS and LDLIBS for just libevent, so now it compiles and installs properly off cvs HEAD. Thanks for spotting the run-libevent.sh -> run_libevent.sh typo :). Cheers,
-Garrett

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list