Skip to content

Commit

Permalink
8334333: Run test MissingResourceCauseTestRun.java with root user fails
Browse files Browse the repository at this point in the history
  • Loading branch information
sendaoYan committed Jun 15, 2024
1 parent 8464ce6 commit 5cf26a1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2024, 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 @@ -32,6 +32,7 @@
* @build jdk.test.lib.JDKToolLauncher
* jdk.test.lib.Utils
* jdk.test.lib.process.ProcessTools
* jdk.test.lib.Platform
* MissingResourceCauseTest
* NonResourceBundle
* PrivateConstructorRB
Expand All @@ -50,9 +51,14 @@
import jdk.test.lib.JDKToolLauncher;
import jdk.test.lib.Utils;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.Platform;
import jtreg.SkippedException;

public class MissingResourceCauseTestRun {
public static void main(String[] args) throws Throwable {
if(Platform.isRoot() && !Platform.isWindows()) {
throw new SkippedException("root user has privileged will make this test fail.");
}
Path path = Paths.get("UnreadableRB.properties");
Files.deleteIfExists(path);
try {
Expand Down

0 comments on commit 5cf26a1

Please sign in to comment.