Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8214733: runtime/8176717/TestInheritFD.java timed out
Reviewed-by: lmesnik, coleenp, dcubed
  • Loading branch information
Harold Seigel committed Jan 24, 2022
1 parent afd2805 commit 4501ddd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/hotspot/jtreg/runtime/8176717/TestInheritFD.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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 @@ -79,6 +79,7 @@ public class TestInheritFD {
public static final String RETAINS_FD = "VM RESULT => RETAINS FD";
public static final String EXIT = "VM RESULT => VM EXIT";
public static final String LOG_SUFFIX = ".strangelogsuffixthatcanbecheckedfor";
public static final String USER_DIR = System.getProperty("user.dir");

// first VM
public static void main(String[] args) throws Exception {
Expand Down Expand Up @@ -187,10 +188,10 @@ static Optional<String[]> lsofCommand() {

static Collection<String> outputContainingFilenames() {
long pid = ProcessHandle.current().pid();

String[] command = lsofCommand().orElseThrow(() -> new RuntimeException("lsof like command not found"));
System.out.println("using command: " + command[0] + " " + command[1]);
return run(command[0], command[1], "" + pid).collect(toList());
// Only search the directory in which the VM is running (user.dir property).
System.out.println("using command: " + command[0] + " -a +d " + USER_DIR + " " + command[1] + " " + pid);
return run(command[0], "-a", "+d", USER_DIR, command[1], "" + pid).collect(toList());
}

static boolean findOpenLogFile(Collection<String> fileNames) {
Expand Down

3 comments on commit 4501ddd

@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 4501ddd Mar 14, 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 4501ddd Mar 14, 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-4501ddda 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 4501ddda from the openjdk/jdk repository.

The commit being backported was authored by Harold Seigel on 24 Jan 2022 and was reviewed by Leonid Mesnik, Coleen Phillimore and Daniel D. Daugherty.

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-4501ddda:GoeLin-backport-4501ddda
$ git checkout GoeLin-backport-4501ddda
# 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-4501ddda

Please sign in to comment.