From: Subrata <sub...@us...> - 2009-01-15 07:27:49
|
Update of /cvsroot/ltp/ltp/testcases/misc/tcore_patch_test_suites In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1440/ltp/testcases/misc/tcore_patch_test_suites Modified Files: Makefile tcore.c tcore.sh Log Message: Avoiding build failures on ppc64, adding proper FLAG definitions and improving a bit of LTP specific stuff. Signed-Off-By: Subrata Modak <su...@li...>. Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/misc/tcore_patch_test_suites/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 4 Mar 2003 16:17:52 -0000 1.2 --- Makefile 15 Jan 2009 07:27:42 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + CPPFLAGS += -I../../../include -Wall + LDFLAGS += -L../../../lib -lltp CC=gcc MODCFLAGS := -Wall -DLINUX -I/usr/src/linux/include *************** *** 9,13 **** tcore: tcore.c ! $(CC) -o tcore tcore.c -lm -lpthread clean: rm -f tcore --- 11,15 ---- tcore: tcore.c ! $(CC) -o tcore tcore.c $(CPPFLAGS) $(LDFLAGS) -lm -lpthread clean: rm -f tcore Index: tcore.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/misc/tcore_patch_test_suites/tcore.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcore.c 9 Jan 2009 11:11:14 -0000 1.3 --- tcore.c 15 Jan 2009 07:27:42 -0000 1.4 *************** *** 20,26 **** // Use gcc -o xmm xmm.c -pthread -lm to compile. ! #if defined __i386__ || defined(__x86_64__) #include <stdio.h> #include <sys/types.h> --- 20,34 ---- // Use gcc -o xmm xmm.c -pthread -lm to compile. + #include "test.h" + #include "usctest.h" ! /* Extern Global Variables */ ! extern int Tst_count; /* counter for tst_xxx routines. */ ! extern char *TESTDIR; /* temporary dir created by tst_tmpdir() */ ! /* Global Variables */ ! char *TCID = "tcore"; /* test program identifier. */ ! int TST_TOTAL = 1; /* total number of tests in this file. */ + #if defined __i386__ || defined(__x86_64__) #include <stdio.h> #include <sys/types.h> *************** *** 113,121 **** a3 *= pow(b3, 2); pid = getpid(); ! printf("producer pid=%d\n", pid); sleep(1); for (n = 0; n < 10000; n++) { ! printf ("%d --->\n", n); put (&buffer, n); --- 121,129 ---- a3 *= pow(b3, 2); pid = getpid(); ! tst_resm(TINFO,"producer pid=%d", pid); sleep(1); for (n = 0; n < 10000; n++) { ! tst_resm(TINFO,"%d --->", n); put (&buffer, n); *************** *** 145,152 **** pid_t pid; long double a2 = 10002.5, b2 = 2888883.5; ! long double c2, d2, e2, f2; a2 += b2; pid = getpid(); ! printf("consumer pid=%d\n", pid); sleep(1); while (1) --- 153,160 ---- pid_t pid; long double a2 = 10002.5, b2 = 2888883.5; ! long double d2, e2, f2; a2 += b2; pid = getpid(); ! tst_resm(TINFO,"consumer pid=%d", pid); sleep(1); while (1) *************** *** 155,159 **** if (d == OVER) break; ! printf ("---> %d\n", d); if (d==7688) { system("ps ax | grep ex"); --- 163,167 ---- if (d == OVER) break; ! tst_resm(TINFO,"---> %d", d); if (d==7688) { system("ps ax | grep ex"); *************** *** 165,169 **** char buf1[16]; sprintf(buf, "%d%d\n", pid, pid); ! sprintf(buf1,"%d",d2); asm volatile ("movups (%0), %%xmm2;":: "r" (buf):"memory"); asm volatile ("movups (%0), %%xmm5;":: "r" (buf):"memory"); --- 173,177 ---- char buf1[16]; sprintf(buf, "%d%d\n", pid, pid); ! sprintf(buf1,"%Lf",d2); asm volatile ("movups (%0), %%xmm2;":: "r" (buf):"memory"); asm volatile ("movups (%0), %%xmm5;":: "r" (buf):"memory"); *************** *** 181,185 **** void *retval; double a1 = 1.5, b1 = 2.5; ! long double c1, d1, e1; pid_t pid; a1 += b1; --- 189,193 ---- void *retval; double a1 = 1.5, b1 = 2.5; ! long double c1 ; pid_t pid; a1 += b1; *************** *** 201,206 **** #else /* Not __i386__ */ - #include "test.h" - #include "usctest.h" int TST_TOTAL = 0; /* Total number of test cases. */ --- 209,212 ---- Index: tcore.sh =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/misc/tcore_patch_test_suites/tcore.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcore.sh 18 Dec 2008 09:53:25 -0000 1.3 --- tcore.sh 15 Jan 2009 07:27:42 -0000 1.4 *************** *** 18,21 **** --- 18,22 ---- # Test suite for the t-core kernel patch + export TCID=tcore01 PTHREAD_DIR="/lib/i686" TEST_DIR="." |