Using LTP on Andriod - Current State, Latest Patch, and EMail address of folks involved with this effort.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 7 lines
I'm looking into using LTP on Android and reviewing the discussions by /* Cyril Hrubi, Anupam Srivastava*/ discussion at:
*http://comments.gmane.org/gmane.linux.ltp/16065*
and
Quoted 8 lines
*http://old.nabble.com/-LTP--Porting-of-LTP-on-Android---Patch-to33745295.html#a33812376*Any pointers/suggestions on this work would be appreciated; like the best patch
available.Looking through the Ltp-list archives now and the above mentioned discussions.
Well as far as I remeber the attached patch wasn't complete and it was more of a hack than anything else.
On the other hand I'm not against having LTP ported to Android. If the changes comes to us in reasonable small chunks that could be reviewed, I would be happy to help and possibly merge them into the upstream codebase.
Sorry that I couldn't help more here. I don't have any expirience with Android SDK and I do not intend to play with it in the near future.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 11 lines
Yesterday we got the MIPS env starting to build the LTP test, currently we aren't
using the Android.mk approach, just minor tweaks to the stock LTP repo. I'm also
building Busybox using:*http://code.google.com/p/busybox-android/downloads/detail?name=.config
*
as a guide. I've applied Sterisco's busybox patch but didn't apply his Bionic patch (yet). It's starting to build and like LPT it's starting to compile.
That seems to be way better than the Android.mk mess. And it would certainly be great to have Android HOWTO document bundled with ltp sources.
Quoted 8 lines
Currently my changes to the git-hub LTP master branch are just a bunch of hacks. Seemed like a clear concept on how to do it cleanly wasn't clear yet
and it made more sense to get something starting to work and then clean it up once a clear approach was precipitating out. I'm using the attached Setup
script to use the r8 NDK crosstools and will test with a jellyBean (jb) MIPS emulator.
The patch seems to be relatively small. Is this all that is necessary to build LTP on Android? Have build the open posix testsuite?
Looking at the patch itself. The ifdef 0 shouldn't be there, the !defined(_ANDROID) is better. The FILTER_OUT_DIRS should be either triggered by Android environment or the testcases should be fixed.
The GLIBC_PREREQ() in the accept4_01 should be moved to configure script.
The GLIBC_PREREQ() from tst_tmpdir() is about to be removed. Hm and why is that defined to 0? The uclibc implements mkdtemp() or not?
Quoted 3 lines
Supporting Android in the LTP and Busybox repositories seems like a good idea to me. I see little sense in folks re-doing this procedure from email descriptions.
Well I can't do much for Busybox but I could help to fix LTP to build on Android ;).
Quoted 257 lines
include/tlibio.h +1
-1@@ -142,7 +142,7 @@ int lio_check_asyncio(char *io_type, int size, struct iosw *status);int lio_wait4asyncio (int method,int fd,aiocb_t *aiocbp);int lio_check_asyncio (char *io_type,int size,aiocb_t *aiocbp,int method);#endif /* sgi */ -#if defined(__linux__) && !defined(__UCLIBC__) +#if defined(__linux__) && !defined(__UCLIBC__) &&0 #include <aio.h> int lio_wait4asyncio (int method,int fd,struct aiocb *aiocbp);int lio_check_asyncio (char *io_type,int size,struct aiocb *aiocbp,int method);lib/Makefile +2
-0@@ -24,6 +24,8 @@ top_srcdir ?= .. include $(top_srcdir)/include/mk/env_pre.mk +CFLAGS +=-D__UCLIBC__ + ifeq ($(UCLINUX),1) CFLAGS += -D_USC_LIB_ endiflib/tlibio.c +4
-4@@ -108,7 +108,7 @@#include <string.h> /* bzero */ #endif #if defined(__linux__) || defined(__sun) || defined(__hpux) || defined(_AIX) -#if !defined(UCLINUX ) && !defined(__UCLIBC__) +#if !defined(UCLINUX ) && !defined(__UCLIBC__) && !defined(_ANDROID)#include <aio.h> #endif #endif @@ -561,7 +561,7 @@ long wrd; /* to allow future features, use zero for now */aiocb_t *aiolist[1 ];/* list of aio control blocks for lio_listio */ off64_t poffset;/* pwrite(2) offset */ #endif -#if defined(__linux__) && !defined(__UCLIBC__) +#if defined(__linux__) && !defined(__UCLIBC__) &&0 struct aiocb aiocbp;/* POSIX aio control block */ struct aiocb *aiolist[1 ];/* list of aio control blocks for lio_listio */ off64_t poffset;/* pwrite(2) offset */ @@ -595,7 +595,7 @@ long wrd; /* to allow future features, use zero for now */ iov.iov_base = buffer; iov.iov_len = size;#endif -#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__)) +#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__) &&0 )#if defined(sgi)memset (&aiocbp,0x00 ,sizeof (aiocb_t));#else @@ -841,7 +841,7 @@ long wrd; /* to allow future features, use zero for now */return ret;#endif -#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__)) +#if defined(sgi) || (defined(__linux__) && !defined(__UCLIBC__)) &&0 aiocbp.aio_lio_opcode =LIO_WRITE ; listio_cmd=LIO_WAIT ;lib/tst_tmpdir.c +3
-1@@ -132,7 +132,9 @@ void tst_tmpdir(void)int no_cleanup =0 ;/* !0 means TDIRECTORY env var was set */ char *env_tmpdir;/* temporary storage for TMPDIR env var */ /* This is an AWFUL hack to figure out if mkdtemp() is available */ -#if defined(__GLIBC_PREREQ) &&__GLIBC_PREREQ (2 ,2 ) + +// #if 0 && defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,2) +#if 0 #define HAVE_MKDTEMP #endif testcases/Makefile +1
-1@@ -28,7 +28,7 @@ include $(top_srcdir)/include/mk/env_pre.mk # 1. kdump shouldn't be compiled by default, because it's runtime based and # WILL crash the build host (the tests need to be fixed to just build, not # run). -FILTER_OUT_DIRS := kdump +FILTER_OUT_DIRS := kdump commands ifneq ($(WITH_OPEN_POSIX_TESTSUITE),yes) FILTER_OUT_DIRS += open_posix_testsuitetestcases/commands/Makefile +3
-1@@ -24,7 +24,9 @@ top_srcdir ?= ../.. ifneq ($(WITH_EXPECT),yes) -FILTER_OUT_SUBDIRS := tpm-tools +FILTER_OUT_SUBDIRS := tpm-tools cpio +else +FILTER_OUT_SUBDIRS := cpio endif include $(top_srcdir)/include/mk/env_pre.mktestcases/kernel/syscalls/Makefile +2
-0@@ -29,4 +29,6 @@ FILTER_OUT_DIRS += capget capset chmod chown clone fork getcontext llseek \ nftw profil remap_file_pages endif +FILTER_OUT_DIRS += add_key adjtimex bdflush + include $(top_srcdir)/include/mk/generic_trunk_target.mktestcases/kernel/syscalls/accept4/accept4_01.c +4
-2@@ -135,7 +135,8 @@ void setup()TEST_PAUSE ;tst_tmpdir (); } -#if !(__GLIBC_PREREQ (2 ,10 )) +// #if !(__GLIBC_PREREQ(2,10)) +#if 1 static int accept4_01 (int fd,struct sockaddr *sockaddr,socklen_t *addrlen,int flags) {@@ -192,7 +193,8 @@ do_test(int lfd, struct sockaddr_in *conn_addr,die ("Connect Error" ); addrlen =sizeof (struct sockaddr_in ); -#if !(__GLIBC_PREREQ (2 ,10 )) +// #if !(__GLIBC_PREREQ(2,10)) +#if 1 acceptfd =accept4_01 (lfd, (struct sockaddr *)&claddr, &addrlen, closeonexec_flag | nonblock_flag);#else testcases/kernel/syscalls/chmod/Makefile +2
-0@@ -20,4 +20,6 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk +FILTER_OUT_MAKE_TARGETS := chmod06 + include $(top_srcdir)/include/mk/generic_leaf_target.mktestcases/kernel/syscalls/ptrace/Makefile +1
-1@@ -44,6 +44,6 @@ include $(top_srcdir)/include/mk/testcases.mk # make: *** [testcases-all] Error 2 # -FILTER_OUT_MAKE_TARGETS := ptrace06 simple_tracer +FILTER_OUT_MAKE_TARGETS := ptrace03 ptrace04 ptrace06 simple_tracer include $(top_srcdir)/include/mk/generic_leaf_target.mkutils/benchmark/ebizzy-0.3/Makefile +1
-1@@ -27,7 +27,7 @@ top_srcdir ?= ../../.. include $(top_srcdir)/include/mk/env_pre.mk -LDLIBS += -lpthread +# LDLIBS += -lpthread WCPPFLAGS += -Wshadowutils/benchmark/ebizzy-0.3/ebizzy.c +3
-2@@ -218,9 +218,10 @@ read_options(int argc, char *argv[]) "\"never mmap\" option specified\n");usage (); } - +#if 0 if (never_mmap)mallopt (M_MMAP_MAX ,0 ); +#endif if (chunk_size < record_size) { fprintf(stderr, "Chunk size %u smaller than record size %u\n",@@ -533,4 +534,4 @@ main(int argc, char *argv[])start_threads ();return 0 ; -} +}export LTP_ROOT=
pwdexport NDK_ROOT=/home/piet/src/dev-mips-jb/mozilla/android-ndk-r8
export MIPS_TOOL_CHAIN=${NDK_ROOT}/toolchains/mipsel-linux-android-4.4.3/prebuilt/linux-x86
# export MIPS_INCLUDES=${NDK_ROOT}/platforms/android-3/arch-mips/usr/include export MIPS_INCLUDES=${NDK_ROOT}/platforms/android-14/arch-mips/usr/includeexport PATH=${MIPS_TOOL_CHAIN}/bin:$PATH
export ARCH=mips
export CROSS_COMPILE=mipsel-linux-android-
export CC=${MIPS_TOOL_CHAIN}/bin/${CROSS_COMPILE}gcc
export LD=${MIPS_TOOL_CHAIN}/bin/${CROSS_COMPILE}ld
export AR=${MIPS_TOOL_CHAIN}/bin/${CROSS_COMPILE}ar
export STRIP=${MIPS_TOOL_CHAIN}/bin/${CROSS_COMPILE}strip
export RANLIB=${MIPS_TOOL_CHAIN}/bin/${CROSS_COMPILE}ranlib
export CXX=${MIPS_TOOL_CHAIN}/bin/${CROSS_COMPILE}c++
export AS=${MIPS_TOOL_CHAIN}/bin/${CROSS_COMPILE}as
export GXX=${MIPS_TOOL_CHAIN}/bin/${CROSS_COMPILE}g++
export GCC=${MIPS_TOOL_CHAIN}/bin/${CROSS_COMPILE}gcc
export NM=${MIPS_TOOL_CHAIN}/bin/${CROSS_COMPILE}nm
export CPPFLAGS=-I${MIPS_INCLUDES}/
export CFLAGS='-nostdlib -DDEV_BSIZE=512'
# export WCFLAGS='-pedantic -std=c99' # export WCFLAGS='-pedantic' export WCFLAGS=''# export LDFLAGS=-Wl,???entry=main,???no-undefined,-rpath-link=${MIPS_TOOL_CHAIN}/lib/-L${MIPS_TOOL_CHAIN}/lib/ export LDFLAGS=-Wl,-rpath-link=${MIPS_TOOL_CHAIN}/lib/-L${MIPS_TOOL_CHAIN}/lib/# export LIBS=-lc export LIBS=# ./configure --host=mipsel-linux-android --target=emulator-5554 --build=x86_64-linux-gnu --prefix=${LTP_ROOT}/objdir ./configure --host=mipsel-linux --target=emulator-5554 --build=x86_64-linux-gnu --prefix=${LTP_ROOT}/objdir
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list