Skip to content
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.

Commit

Permalink
Certified for Linux 3.1 - tests and startup no longer complains that …
Browse files Browse the repository at this point in the history
…things may fail. Note that this has only been tested on Fedora 16.
  • Loading branch information
arigesher committed Dec 17, 2011
1 parent 1b5df82 commit 6d38631
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/com/palantir/opensource/sysmon/linux/LinuxMonitor.java
Expand Up @@ -180,7 +180,7 @@ public void verifyExecutionEnvironment(Properties config) throws SysmonException
if(!osName.equals("Linux")) { if(!osName.equals("Linux")) {
throw new SysmonException("Linux monitoring can only run on Linux. Platform: " + osName); throw new SysmonException("Linux monitoring can only run on Linux. Platform: " + osName);
} }
if(!osVersion.startsWith("2.6")) { if(!osVersion.startsWith("2.6") || !osVersion.startsWith("3.1")) {
log.warn("Linux monitoring has only been tested on Linux 2.6, " + log.warn("Linux monitoring has only been tested on Linux 2.6, " +
"so some things may not work. Detected version: " + osVersion); "so some things may not work. Detected version: " + osVersion);
} }
Expand Down
5 changes: 4 additions & 1 deletion test/com/palantir/opensource/sysmon/linux/LinuxBaseTest.java
Expand Up @@ -25,10 +25,13 @@ protected void setUp() throws Exception {
String osName = System.getProperty("os.name","UNKNOWN"); // use default to avoid NPE String osName = System.getProperty("os.name","UNKNOWN"); // use default to avoid NPE
String osVersion = System.getProperty("os.version","UNKNOWN"); // use default to avoid NPE String osVersion = System.getProperty("os.version","UNKNOWN"); // use default to avoid NPE


System.out.println("OS: " + osName);
System.out.println("Version: " + osVersion);

if(!osName.equals("Linux")) { if(!osName.equals("Linux")) {
fail("Linux tests can only run on a Linux system. Platform: " + osName); fail("Linux tests can only run on a Linux system. Platform: " + osName);
} }
if(!osVersion.startsWith("2.6")) { if(!osVersion.startsWith("2.6") && !osVersion.startsWith("3.1")) {
System.err.println("Running on Linux " + osVersion + " - untested. " + System.err.println("Running on Linux " + osVersion + " - untested. " +
"Good luck! (Things will probably break)"); "Good luck! (Things will probably break)");
} }
Expand Down

0 comments on commit 6d38631

Please sign in to comment.