RFR: 8324799: Use correct extension for C++ test headers

Guoxiong Li gli at openjdk.org
Wed Feb 28 06:17:53 UTC 2024


On Wed, 28 Feb 2024 01:18:50 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this change that renames some test .h files to .hpp.  These
> files contain C++ code and should be named accordingly.  Some of them contain
> uses of NULL, which we change to nullptr.
> 
> The renamed files are:
> 
> test/hotspot/jtreg/vmTestbase/nsk/share/aod/aod.h
> test/hotspot/jtreg/vmTestbase/nsk/share/jni/jni_tools.h  
> test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/jvmti_tools.h
> test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/JVMTITools.h
> test/hotspot/jtreg/vmTestbase/nsk/share/native/nsk_tools.h 
> 
> test/lib/jdk/test/lib/jvmti/jvmti_thread.h
> test/lib/jdk/test/lib/jvmti/jvmti_common.h
> test/lib/native/testlib_threads.h 
> 
> The #include updates were performed mostly mechanically, and builds would fail
> if there were mistakes.  The exception is test
> test/hotspot/jtreg/serviceability/jvmti/FollowReferences/FieldIndices/libFieldIndicesTest.cpp,
> which was added after I'd done the mechanical update, so was updated by hand.
> 
> The copyright updates were similarly performed mechanically. All but a handful
> of the including files have already had their copyrights updated recently,
> likely as part of JDK-8324681.
> 
> Thus, the only "interesting" changes are to the renamed files.
> 
> Testing: mach5 tier1

So large patch. In order to easy to review, it is good to separate such large patch into several patches in the future.

Two trivial places need to be adjusted.

test/hotspot/jtreg/serviceability/jvmti/events/SingleStep/singlestep01/libsinglestep01.cpp line 28:

> 26: #include <string.h>
> 27: #include <jvmti.h>
> 28: #include "jvmti_common.hpp"

The copyright of this file is wrong.

>  * Copyright (c) 200
>  * git 3, 2022, Oracle and/or its affiliates. All rights reserved.
>  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

test/hotspot/jtreg/serviceability/jvmti/thread/GetStackTrace/GetStackTraceAndRetransformTest/libGetStackTraceAndRetransformTest.cpp line 27:

> 25: #include <string.h>
> 26: #include "jvmti.h"
> 27: #include "jvmti_common.hpp"

The oracle copyright needs to be added in this file?

>  * Copyright (c) 2023, Datadog, Inc. All rights reserved.
>  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

-------------

Changes requested by gli (Committer).

PR Review: https://git.openjdk.org/jdk/pull/18035#pullrequestreview-1905259144
PR Review Comment: https://git.openjdk.org/jdk/pull/18035#discussion_r1505322535
PR Review Comment: https://git.openjdk.org/jdk/pull/18035#discussion_r1505326445


More information about the core-libs-dev mailing list