Skip to content

Commit

Permalink
8290687: serviceability/sa/TestClassDump.java could leave files owned…
Browse files Browse the repository at this point in the history
… by root on macOS

Reviewed-by: amenkov, lmesnik
  • Loading branch information
plummercj committed Jul 21, 2022
1 parent 66f59c2 commit 59d85ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/hotspot/jtreg/serviceability/sa/TestClassDump.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2022, 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
Expand Down Expand Up @@ -30,6 +30,7 @@
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.SA.SATestUtils;
import jtreg.SkippedException;

/**
* @test
Expand Down Expand Up @@ -87,6 +88,10 @@ private static void dumpClass(long lingeredAppPid)

public static void main(String[] args) throws Exception {
SATestUtils.skipIfCannotAttach(); // throws SkippedException if attach not expected to work.
if (SATestUtils.needsPrivileges()) {
// This test will create files as root that cannot be easily deleted, so don't run.
throw new SkippedException("Cannot run this test on OSX if adding privileges is required.");
}
LingeredApp theApp = null;
try {
theApp = LingeredApp.startApp();
Expand Down

3 comments on commit 59d85ba

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 59d85ba Sep 27, 2022

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 59d85ba Sep 27, 2022

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-59d85bad in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 59d85bad from the openjdk/jdk repository.

The commit being backported was authored by Chris Plummer on 21 Jul 2022 and was reviewed by Alex Menkov and Leonid Mesnik.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-59d85bad:GoeLin-backport-59d85bad
$ git checkout GoeLin-backport-59d85bad
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-59d85bad

Please sign in to comment.