From 795ec5c1e90309bc008acb28cfe0ce039dabcb8f Mon Sep 17 00:00:00 2001
From: Kim Barrett
Date: Thu, 13 Nov 2025 08:33:15 +0000
Subject: [PATCH] 8370333: hotspot-unit-tests.md specifies wrong directory
structure for tests
Reviewed-by: stefank, ayang
---
doc/hotspot-unit-tests.html | 12 ++++++------
doc/hotspot-unit-tests.md | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/doc/hotspot-unit-tests.html b/doc/hotspot-unit-tests.html
index b3700abb3ac..5cc424322f9 100644
--- a/doc/hotspot-unit-tests.html
+++ b/doc/hotspot-unit-tests.html
@@ -305,11 +305,11 @@ recognize your tests.
the product.
All unit tests for a class from foo/bar/baz.cpp
-should be placed foo/bar/test_baz.cpp in
-hotspot/test/native/ directory. Having all tests for a
-class in one file is a common practice for unit tests, it helps to see
-all existing tests at once, share functions and/or resources without
-losing encapsulation.
+should be placed foo/bar/test_baz.cpp in the
+test/hotspot/gtest/ directory. Having all tests for a class
+in one file is a common practice for unit tests, it helps to see all
+existing tests at once, share functions and/or resources without losing
+encapsulation.
For tests which test more than one class, directory hierarchy
should be the same as product hierarchy, and file name should reflect
the name of the tested subsystem/functionality. For example, if a
@@ -319,7 +319,7 @@ placed in gc/g1 directory.
Please note that framework prepends directory name to a test group
name. For example, if TEST(foo, check_this) and
TEST(bar, check_that) are defined in
-hotspot/test/native/gc/shared/test_foo.cpp file, they will
+test/hotspot/gtest/gc/shared/test_foo.cpp file, they will
be reported as gc/shared/foo::check_this and
gc/shared/bar::check_that.
Test names
diff --git a/doc/hotspot-unit-tests.md b/doc/hotspot-unit-tests.md
index 69a95307109..f59e6084910 100644
--- a/doc/hotspot-unit-tests.md
+++ b/doc/hotspot-unit-tests.md
@@ -241,7 +241,7 @@ recognize your tests.
Test file location should reflect a location of the tested part of the product.
* All unit tests for a class from `foo/bar/baz.cpp` should be placed
-`foo/bar/test_baz.cpp` in `hotspot/test/native/` directory. Having all
+`foo/bar/test_baz.cpp` in the `test/hotspot/gtest/` directory. Having all
tests for a class in one file is a common practice for unit tests, it
helps to see all existing tests at once, share functions and/or
resources without losing encapsulation.
@@ -254,7 +254,7 @@ sub-system under tests belongs to `gc/g1`, tests should be placed in
Please note that framework prepends directory name to a test group
name. For example, if `TEST(foo, check_this)` and `TEST(bar, check_that)`
-are defined in `hotspot/test/native/gc/shared/test_foo.cpp` file, they
+are defined in `test/hotspot/gtest/gc/shared/test_foo.cpp` file, they
will be reported as `gc/shared/foo::check_this` and
`gc/shared/bar::check_that`.