Skip to content

Commit

Permalink
8296959: Fix hotspot shell tests of 8u on multilib systems
Browse files Browse the repository at this point in the history
Reviewed-by: sgehwolf
  • Loading branch information
zzambers authored and jerboaa committed Nov 15, 2022
1 parent 17fd40a commit 7024bf0
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 16 deletions.
Expand Up @@ -73,7 +73,7 @@ THIS_DIR=.
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${TESTJAVA}${FS}bin${FS}javac *.java

$cc_cmd -fPIC -shared -o libCNCheckLongArgs.so \
$cc_cmd ${CFLAGBITS} -fPIC -shared -o libCNCheckLongArgs.so \
-I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux \
${TESTSRC}${FS}libCNCheckLongArgs.c

Expand Down
2 changes: 1 addition & 1 deletion hotspot/test/runtime/7107135/Test7107135.sh
Expand Up @@ -65,7 +65,7 @@ THIS_DIR=.
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${TESTJAVA}${FS}bin${FS}javac *.java

$gcc_cmd -fPIC -shared -c -o test.o \
$gcc_cmd ${CFLAGBITS} -fPIC -shared -c -o test.o \
-I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux \
${TESTSRC}${FS}test.c

Expand Down
5 changes: 1 addition & 4 deletions hotspot/test/runtime/InitialThreadOverflow/testme.sh
Expand Up @@ -49,8 +49,6 @@ if [ "x$gcc_cmd" = "x" ]; then
exit 0;
fi

CFLAGS="-m${VM_BITS}"

LD_LIBRARY_PATH=.:${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

Expand All @@ -59,12 +57,11 @@ cp ${TESTSRC}${FS}invoke.cxx .
# Copy the result of our @compile action:
cp ${TESTCLASSES}${FS}DoOverflow.class .

echo "Compilation flag: ${COMP_FLAG}"
# Note pthread may not be found thus invoke creation will fail to be created.
# Check to ensure you have a /usr/lib/libpthread.so if you don't please look
# for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation.

$gcc_cmd -DLINUX ${CFLAGS} -o invoke \
$gcc_cmd -DLINUX ${CFLAGBITS} -o invoke \
-I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
-L${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE} \
-ljvm -lpthread invoke.cxx
Expand Down
8 changes: 1 addition & 7 deletions hotspot/test/runtime/StackGap/testme.sh
Expand Up @@ -49,11 +49,6 @@ if [ "x$gcc_cmd" = "x" ]; then
exit 0;
fi

if [ "x${VM_CPU}" != "xaarch64" ];
then
CFLAGS="-m${VM_BITS}"
fi

LD_LIBRARY_PATH=.:${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE}:/usr/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

Expand All @@ -62,12 +57,11 @@ cp ${TESTSRC}${FS}exestack-gap.c .
# Copy the result of our @compile action:
cp ${TESTCLASSES}${FS}T.class .

echo "Compilation flag: ${COMP_FLAG}"
# Note pthread may not be found thus invoke creation will fail to be created.
# Check to ensure you have a /usr/lib/libpthread.so if you don't please look
# for /usr/lib/`uname -m`-linux-gnu version ensure to add that path to below compilation.

$gcc_cmd -DLINUX ${CFLAGS} -o stack-gap \
$gcc_cmd -DLINUX ${CFLAGBITS} -o stack-gap \
-I${COMPILEJAVA}/include -I${COMPILEJAVA}/include/linux \
-L${COMPILEJAVA}/jre/lib/${VM_CPU}/${VM_TYPE} \
exestack-gap.c \
Expand Down
2 changes: 1 addition & 1 deletion hotspot/test/runtime/jni/CallWithJNIWeak/test.sh
Expand Up @@ -68,7 +68,7 @@ THIS_DIR=.
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${TESTJAVA}${FS}bin${FS}javac *.java

$cc_cmd -fPIC -shared -o libCallWithJNIWeak.so \
$cc_cmd ${CFLAGBITS} -fPIC -shared -o libCallWithJNIWeak.so \
-I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux \
${TESTSRC}${FS}CallWithJNIWeak.c

Expand Down
2 changes: 1 addition & 1 deletion hotspot/test/runtime/jni/ReturnJNIWeak/test.sh
Expand Up @@ -68,7 +68,7 @@ THIS_DIR=.
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${TESTJAVA}${FS}bin${FS}javac *.java

$cc_cmd -fPIC -shared -o libReturnJNIWeak.so \
$cc_cmd ${CFLAGBITS} -fPIC -shared -o libReturnJNIWeak.so \
-I${TESTJAVA}${FS}include -I${TESTJAVA}${FS}include${FS}linux \
${TESTSRC}${FS}ReturnJNIWeak.c

Expand Down
2 changes: 1 addition & 1 deletion hotspot/test/runtime/jsig/Test8017498.sh
Expand Up @@ -70,7 +70,7 @@ THIS_DIR=.
cp ${TESTSRC}${FS}*.java ${THIS_DIR}
${TESTJAVA}${FS}bin${FS}javac *.java

$gcc_cmd -DLINUX -fPIC -shared \
$gcc_cmd -DLINUX ${CFLAGBITS} -fPIC -shared \
-o ${TESTSRC}${FS}libTestJNI.so \
-I${TESTJAVA}${FS}include \
-I${TESTJAVA}${FS}include${FS}linux \
Expand Down
6 changes: 6 additions & 0 deletions hotspot/test/test_env.sh
Expand Up @@ -157,19 +157,23 @@ then
fi

VM_CPU="unknown"
CFLAGBITS=""
grep "sparc" vm_version.out > ${NULL}
if [ $? = 0 ]
then
VM_CPU="sparc"
if [ $VM_BITS = "64" ]
then
VM_CPU="sparcv9"
else
CFLAGBITS="-m32"
fi
fi
grep "x86" vm_version.out > ${NULL}
if [ $? = 0 ]
then
VM_CPU="i386"
CFLAGBITS="-m32"
fi
grep "amd64" vm_version.out > ${NULL}
if [ $? = 0 ]
Expand All @@ -193,6 +197,8 @@ then
then
VM_CPU="ppc64le"
fi
else
CFLAGBITS="-m32"
fi
fi
grep "ia64" vm_version.out > ${NULL}
Expand Down

1 comment on commit 7024bf0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.