aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/nbody-java/hysock.h2
-rw-r--r--tests/nbody-java/native_java_io_File.c2
-rw-r--r--tests/nbody-java/native_org_apache_harmony_luni_platform_OSNetworkSystem.c3
-rwxr-xr-xtests/runner.py6
4 files changed, 9 insertions, 4 deletions
diff --git a/tests/nbody-java/hysock.h b/tests/nbody-java/hysock.h
index 4e41c9fa..14b0d916 100644
--- a/tests/nbody-java/hysock.h
+++ b/tests/nbody-java/hysock.h
@@ -226,7 +226,7 @@ typedef struct hylinger_struct
} hylinger_struct;
typedef struct hyipmreq_struct
{
- OSIPMREQ addrpair;
+ int addrpair;
} hyipmreq_struct;
#define GET_HOST_BUFFER_SIZE 512
/* The gethostBuffer is allocated bufferSize + EXTRA_SPACE, while gethostby*_r is only aware of bufferSize
diff --git a/tests/nbody-java/native_java_io_File.c b/tests/nbody-java/native_java_io_File.c
index b10e85e5..0539f167 100644
--- a/tests/nbody-java/native_java_io_File.c
+++ b/tests/nbody-java/native_java_io_File.c
@@ -115,7 +115,7 @@ JAVA_BOOLEAN java_io_File_isDirectoryImpl___byte_1ARRAY(JAVA_OBJECT me, JAVA_OBJ
struct stat buf;
int err;
err = stat(fileName, &buf);
- return buf.st_mode & S_IFDIR;
+ return buf.st_mode; // XXX & S_IFDIR;
//XMLVM_END_NATIVE
}
diff --git a/tests/nbody-java/native_org_apache_harmony_luni_platform_OSNetworkSystem.c b/tests/nbody-java/native_org_apache_harmony_luni_platform_OSNetworkSystem.c
index fc6339bc..81b8b13a 100644
--- a/tests/nbody-java/native_org_apache_harmony_luni_platform_OSNetworkSystem.c
+++ b/tests/nbody-java/native_org_apache_harmony_luni_platform_OSNetworkSystem.c
@@ -87,9 +87,8 @@ int selectRead(hysocket_t hysocketP, I_32 uSecTime, BOOLEAN accept)
UDATA hytime_msec_clock ()
{
struct timeval tp;
- struct timezone tzp;
- gettimeofday (&tp, &tzp);
+ gettimeofday (&tp, NULL);
return (tp.tv_sec * 1000) + (tp.tv_usec / 1000);
}
diff --git a/tests/runner.py b/tests/runner.py
index c414c619..27fb84dc 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -12871,6 +12871,12 @@ elif 'benchmark' in str(sys.argv):
[] [][] [][][]
--------------------------------''', shared_args=['-std=c99'], force_c=True)
+ def test_nbody_java(self): # tests xmlvm compiled java, including bitcasts of doubles, i64 math, etc.
+ args = [path_from_root('tests', 'nbody-java', x) for x in os.listdir(path_from_root('tests', 'nbody-java')) if x.endswith('.c')] + \
+ ['-I' + path_from_root('tests', 'nbody-java')]
+ self.do_benchmark('nbody_java', '', ['11500000'], '''Time(s)''',
+ force_c=True, emcc_args=args + ['-s', 'PRECISE_I64_MATH=1', '--llvm-lto', '0'], native_args=args + ['-lgc', '-std=c99', '-target', 'x86_64-pc-linux-gnu', '-lm'])
+
def test_zlib(self):
src = open(path_from_root('tests', 'zlib', 'benchmark.c'), 'r').read()
emcc_args = self.get_library('zlib', os.path.join('libz.a'), make_args=['libz.a']) + \