8267351: runtime/cds/SharedBaseAddress.java fails on x86_32 due to Unrecognized VM option 'UseCompressedOops'

Reviewed-by: dholmes, ccheung
This commit is contained in:
Jie Fu 2021-05-19 07:17:13 +00:00
parent 7aa65685b8
commit 3f883e8f0d

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -23,7 +23,7 @@
/**
* @test SharedBaseAddress
* @bug 8265705
* @bug 8265705 8267351
* @summary Test variety of values for SharedBaseAddress, making sure
* VM handles normal values as well as edge values w/o a crash.
* @requires vm.cds
@ -33,6 +33,7 @@
import jdk.test.lib.cds.CDSTestUtils;
import jdk.test.lib.cds.CDSOptions;
import jdk.test.lib.Platform;
import jdk.test.lib.process.OutputAnalyzer;
public class SharedBaseAddress {
@ -78,7 +79,7 @@ public class SharedBaseAddress {
.addPrefix("-Xlog:gc+metaspace")
.addPrefix("-XX:NativeMemoryTracking=detail");
if (run == 0) {
if (run == 0 && Platform.is64bit()) {
opts.addPrefix("-Xmx128m")
.addPrefix("-XX:CompressedClassSpaceSize=32m")
.addPrefix("-XX:-UseCompressedOops");