Skip to content

Commit

Permalink
Add root check for SystemdMemoryAwarenessTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
jerboaa committed Aug 28, 2024
1 parent ad7cf74 commit 7e8d9ed
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,22 @@
*/
import java.nio.file.Files;
import java.nio.file.NoSuchFileException;
import jdk.test.lib.Platform;
import jdk.test.whitebox.WhiteBox;
import jdk.test.lib.containers.systemd.SystemdRunOptions;
import jdk.test.lib.containers.systemd.SystemdTestUtils;
import jdk.test.lib.containers.systemd.SystemdTestUtils.ResultFiles;

import jtreg.SkippedException;

public class SystemdMemoryAwarenessTest {

private static final WhiteBox wb = WhiteBox.getWhiteBox();

public static void main(String[] args) throws Exception {
if (!Platform.isRoot()) {
throw new SkippedException("Test requires to be run as root");
}
testHelloSystemd();
}

Expand Down

0 comments on commit 7e8d9ed

Please sign in to comment.