Repository: GuillaumeGomez/sysinfo
Pull request #1173 (2023-12-19 22:07:40)

Rename `IS_SUPPORTED` into `IS_SUPPORTED_SYSTEM`


Patch:
diff --git a/README.md b/README.md
index a8f95ae..c44ddfd 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ It currently supports the following OSes (alphabetically sorted):
 
 You can still use `sysinfo` on non-supported OSes, it'll simply do nothing and always return
 empty values. You can check in your program directly if an OS is supported by checking the
-[`IS_SUPPORTED`] constant.
+[`IS_SUPPORTED_SYSTEM`] constant.
 
 The minimum-supported version of `rustc` is **1.69**.
 
diff --git a/md_doc/is_supported.md b/md_doc/is_supported.md
index 672674e..28c2d8f 100644
--- a/md_doc/is_supported.md
+++ b/md_doc/is_supported.md
@@ -2,7 +2,7 @@ Returns `true` if this OS is supported. Please refer to the
 [crate-level documentation](index.html) to get the list of supported OSes.
 
 ```
-if sysinfo::IS_SUPPORTED {
+if sysinfo::IS_SUPPORTED_SYSTEM {
     println!("This OS is supported!");
 } else {
     println!("This OS isn't supported (yet?).");
diff --git a/src/common.rs b/src/common.rs
index 353e192..bc82704 100644
--- a/src/common.rs
+++ b/src/common.rs
@@ -18,7 +18,7 @@ use std::str::FromStr;
 /// ```
 /// use sysinfo::System;
 ///
-/// if sysinfo::IS_SUPPORTED {
+/// if sysinfo::IS_SUPPORTED_SYSTEM {
 ///     println!("System: {:?}", System::new_all());
 /// } else {
 ///     println!("This OS isn't supported (yet?).");
@@ -79,7 +79,7 @@ impl System {
     ///      RefreshKind::new().with_processes(ProcessRefreshKind::everything()),
     /// );
     ///
-    /// # if sysinfo::IS_SUPPORTED && !cfg!(feature = "apple-sandbox") {
+    /// # if sysinfo::IS_SUPPORTED_SYSTEM && !cfg!(feature = "apple-sandbox") {
     /// assert!(!system.processes().is_empty());
     /// # }
     /// ```
@@ -1846,7 +1846,7 @@ impl MemoryRefreshKind {
 /// let mut system = System::new_with_specifics(RefreshKind::everything().without_memory());
 ///
 /// assert_eq!(system.total_memory(), 0);
-/// # if sysinfo::IS_SUPPORTED && !cfg!(feature = "apple-sandbox") {
+/// # if sysinfo::IS_SUPPORTED_SYSTEM && !cfg!(feature = "apple-sandbox") {
 /// assert!(system.processes().len() > 0);
 /// # }
 /// ```
diff --git a/src/lib.rs b/src/lib.rs
index 8b3a3dc..b16919b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -61,7 +61,7 @@ pub(crate) use crate::sys::{
     ComponentInner, ComponentsInner, CpuInner, DiskInner, DisksInner, NetworkDataInner,
     NetworksInner, ProcessInner, SystemInner, UserInner,
 };
-pub use crate::sys::{IS_SUPPORTED, MINIMUM_CPU_UPDATE_INTERVAL, SUPPORTED_SIGNALS};
+pub use crate::sys::{IS_SUPPORTED_SYSTEM, MINIMUM_CPU_UPDATE_INTERVAL, SUPPORTED_SIGNALS};
 
 #[cfg(feature = "c-interface")]
 pub use crate::c_interface::*;
@@ -181,7 +181,7 @@ mod test {
     #[cfg(feature = "unknown-ci")]
     #[test]
     fn check_unknown_ci_feature() {
-        assert!(!IS_SUPPORTED);
+        assert!(!IS_SUPPORTED_SYSTEM);
     }
 
     // If this test doesn't compile, it means the current OS doesn't implement them correctly.
@@ -191,7 +191,7 @@ mod test {
         fn check_supported_signals(_: &'static [Signal]) {}
         fn check_minimum_cpu_update_interval(_: std::time::Duration) {}
 
-        check_is_supported(IS_SUPPORTED);
+        check_is_supported(IS_SUPPORTED_SYSTEM);
         check_supported_signals(SUPPORTED_SIGNALS);
         check_minimum_cpu_update_interval(MINIMUM_CPU_UPDATE_INTERVAL);
     }
@@ -201,7 +201,7 @@ mod test {
         let mut s = System::new();
         s.refresh_specifics(RefreshKind::everything());
 
-        if IS_SUPPORTED {
+        if IS_SUPPORTED_SYSTEM {
             // No process should have 0 as memory usage.
             #[cfg(not(feature = "apple-sandbox"))]
             assert!(!s.processes().iter().all(|(_, proc_)| proc_.memory() == 0));
@@ -231,7 +231,7 @@ mod test {
         assert_eq!(s.used_swap(), 0);
 
         s.refresh_memory();
-        if IS_SUPPORTED {
+        if IS_SUPPORTED_SYSTEM {
             assert!(s.total_memory() > 0);
             assert!(s.used_memory() > 0);
             if s.total_swap() > 0 {
@@ -249,7 +249,7 @@ mod test {
     #[cfg(target_os = "linux")]
     #[test]
     fn check_processes_cpu_usage() {
-        if !IS_SUPPORTED {
+        if !IS_SUPPORTED_SYSTEM {
             return;
         }
         let mut s = System::new();
@@ -277,7 +277,7 @@ mod test {
 
     #[test]
     fn check_cpu_usage() {
-        if !IS_SUPPORTED {
+        if !IS_SUPPORTED_SYSTEM {
             return;
         }
         let mut s = System::new();
@@ -309,7 +309,7 @@ mod test {
         let user_list = users.list();
         assert!(user_list.len() >= MIN_USERS);
 
-        if IS_SUPPORTED {
+        if IS_SUPPORTED_SYSTEM {
             #[cfg(not(target_os = "windows"))]
             {
                 let user = user_list
@@ -342,7 +342,7 @@ mod test {
     fn check_all_process_uids_resolvable() {
         // On linux, some user IDs don't have an associated user (no idea why though).
         // If `getent` doesn't find them, we can assume it's a dark secret from the linux land.
-        if IS_SUPPORTED && cfg!(not(target_os = "linux")) {
+        if IS_SUPPORTED_SYSTEM && cfg!(not(target_os = "linux")) {
             let s = System::new_with_specifics(
                 RefreshKind::new()
                     .with_processes(ProcessRefreshKind::new().with_user(UpdateKind::Always)),
@@ -366,7 +366,7 @@ mod test {
     #[test]
     fn check_system_info() {
         // We don't want to test on unsupported systems.
-        if IS_SUPPORTED {
+        if IS_SUPPORTED_SYSTEM {
             assert!(!System::name()
                 .expect("Failed to get system name")
                 .is_empty());
@@ -390,7 +390,7 @@ mod test {
     #[test]
     fn check_host_name() {
         // We don't want to test on unsupported systems.
-        if IS_SUPPORTED {
+        if IS_SUPPORTED_SYSTEM {
             assert!(System::host_name().is_some());
         }
     }
@@ -398,7 +398,7 @@ mod test {
     #[test]
     fn check_refresh_process_return_value() {
         // We don't want to test on unsupported systems.
-        if IS_SUPPORTED {
+        if IS_SUPPORTED_SYSTEM {
             let _pid = get_current_pid().expect("Failed to get current PID");
 
             #[cfg(not(feature = "apple-sandbox"))]
@@ -415,9 +415,9 @@ mod test {
     #[test]
     fn ensure_is_supported_is_set_correctly() {
         if MIN_USERS > 0 {
-            assert!(IS_SUPPORTED);
+            assert!(IS_SUPPORTED_SYSTEM);
         } else {
-            assert!(!IS_SUPPORTED);
+            assert!(!IS_SUPPORTED_SYSTEM);
         }
     }
 
@@ -427,7 +427,7 @@ mod test {
 
         // This information isn't retrieved by default.
         assert!(s.cpus().is_empty());
-        if IS_SUPPORTED {
+        if IS_SUPPORTED_SYSTEM {
             // The physical cores count is recomputed every time the function is called, so the
             // information must be relevant even with nothing initialized.
             let physical_cores_count = s
@@ -453,7 +453,7 @@ mod test {
 
     #[test]
     fn check_nb_supported_signals() {
-        if IS_SUPPORTED {
+        if IS_SUPPORTED_SYSTEM {
             assert!(
                 !SUPPORTED_SIGNALS.is_empty(),
                 "SUPPORTED_SIGNALS shouldn't be empty on supported systems!"
@@ -469,7 +469,7 @@ mod test {
     // Ensure that the CPUs frequency isn't retrieved until we ask for it.
     #[test]
     fn check_cpu_frequency() {
-        if !IS_SUPPORTED {
+        if !IS_SUPPORTED_SYSTEM {
             return;
         }
         let mut s = System::new();
@@ -494,7 +494,7 @@ mod test {
     // so this test ensures that it doesn't happen.
     #[test]
     fn check_refresh_process_update() {
-        if !IS_SUPPORTED {
+        if !IS_SUPPORTED_SYSTEM {
             return;
         }
         let mut s = System::new_all();
@@ -511,7 +511,7 @@ mod test {
 
     #[test]
     fn check_cpu_arch() {
-        assert_eq!(System::cpu_arch().is_some(), IS_SUPPORTED);
+        assert_eq!(System::cpu_arch().is_some(), IS_SUPPORTED_SYSTEM);
     }
 
     // This test only exists to ensure that the `Display` and `Debug` traits are implemented on the
diff --git a/src/unix/apple/macos/system.rs b/src/unix/apple/macos/system.rs
index 5a44ab6..d0191eb 100644
--- a/src/unix/apple/macos/system.rs
+++ b/src/unix/apple/macos/system.rs
@@ -143,7 +143,7 @@ mod test {
     /// Regression test for <https://github.com/GuillaumeGomez/sysinfo/issues/956>.
     #[test]
     fn test_getting_time_interval() {
-        if !crate::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+        if !crate::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
             return;
         }
 
diff --git a/src/unix/apple/mod.rs b/src/unix/apple/mod.rs
index d84dbcf..a0b714b 100644
--- a/src/unix/apple/mod.rs
+++ b/src/unix/apple/mod.rs
@@ -80,7 +80,7 @@ declare_signals! {
 }
 
 #[doc = include_str!("../../../md_doc/is_supported.md")]
-pub const IS_SUPPORTED: bool = true;
+pub const IS_SUPPORTED_SYSTEM: bool = true;
 #[doc = include_str!("../../../md_doc/supported_signals.md")]
 pub const SUPPORTED_SIGNALS: &[crate::Signal] = supported_signals();
 #[doc = include_str!("../../../md_doc/minimum_cpu_update_interval.md")]
diff --git a/src/unix/freebsd/mod.rs b/src/unix/freebsd/mod.rs
index db6e29e..1d75507 100644
--- a/src/unix/freebsd/mod.rs
+++ b/src/unix/freebsd/mod.rs
@@ -56,7 +56,7 @@ declare_signals! {
 }
 
 #[doc = include_str!("../../../md_doc/is_supported.md")]
-pub const IS_SUPPORTED: bool = true;
+pub const IS_SUPPORTED_SYSTEM: bool = true;
 #[doc = include_str!("../../../md_doc/supported_signals.md")]
 pub const SUPPORTED_SIGNALS: &[crate::Signal] = supported_signals();
 #[doc = include_str!("../../../md_doc/minimum_cpu_update_interval.md")]
diff --git a/src/unix/linux/mod.rs b/src/unix/linux/mod.rs
index b13d5b8..5535d47 100644
--- a/src/unix/linux/mod.rs
+++ b/src/unix/linux/mod.rs
@@ -56,7 +56,7 @@ declare_signals! {
 }
 
 #[doc = include_str!("../../../md_doc/is_supported.md")]
-pub const IS_SUPPORTED: bool = true;
+pub const IS_SUPPORTED_SYSTEM: bool = true;
 #[doc = include_str!("../../../md_doc/supported_signals.md")]
 pub const SUPPORTED_SIGNALS: &[crate::Signal] = supported_signals();
 #[doc = include_str!("../../../md_doc/minimum_cpu_update_interval.md")]
diff --git a/src/unknown/mod.rs b/src/unknown/mod.rs
index d95f387..b39ee06 100644
--- a/src/unknown/mod.rs
+++ b/src/unknown/mod.rs
@@ -24,7 +24,7 @@ declare_signals! {
 }
 
 #[doc = include_str!("../../md_doc/is_supported.md")]
-pub const IS_SUPPORTED: bool = false;
+pub const IS_SUPPORTED_SYSTEM: bool = false;
 #[doc = include_str!("../../md_doc/supported_signals.md")]
 pub const SUPPORTED_SIGNALS: &[crate::Signal] = supported_signals();
 #[doc = include_str!("../../md_doc/minimum_cpu_update_interval.md")]
diff --git a/src/windows/mod.rs b/src/windows/mod.rs
index cadc7eb..c7bf82b 100644
--- a/src/windows/mod.rs
+++ b/src/windows/mod.rs
@@ -31,7 +31,7 @@ declare_signals! {
 }
 
 #[doc = include_str!("../../md_doc/is_supported.md")]
-pub const IS_SUPPORTED: bool = true;
+pub const IS_SUPPORTED_SYSTEM: bool = true;
 #[doc = include_str!("../../md_doc/supported_signals.md")]
 pub const SUPPORTED_SIGNALS: &[crate::Signal] = supported_signals();
 #[doc = include_str!("../../md_doc/minimum_cpu_update_interval.md")]


Test patch:
diff --git a/tests/cpu.rs b/tests/cpu.rs
index 95c0bff..f28a792 100644
--- a/tests/cpu.rs
+++ b/tests/cpu.rs
@@ -7,7 +7,7 @@ fn test_cpu() {
     let mut s = sysinfo::System::new();
     assert!(s.cpus().is_empty());
 
-    if !sysinfo::IS_SUPPORTED {
+    if !sysinfo::IS_SUPPORTED_SYSTEM {
         return;
     }
 
@@ -28,7 +28,7 @@ fn test_cpu() {
 
 #[test]
 fn test_physical_core_numbers() {
-    if sysinfo::IS_SUPPORTED {
+    if sysinfo::IS_SUPPORTED_SYSTEM {
         let s = sysinfo::System::new();
         let count = s.physical_core_count();
         assert_ne!(count, None);
diff --git a/tests/disk_list.rs b/tests/disk_list.rs
index ae708ca..09c2da3 100644
--- a/tests/disk_list.rs
+++ b/tests/disk_list.rs
@@ -2,7 +2,7 @@
 
 #[test]
 fn test_disks() {
-    if sysinfo::IS_SUPPORTED {
+    if sysinfo::IS_SUPPORTED_SYSTEM {
         let s = sysinfo::System::new_all();
         // If we don't have any physical core present, it's very likely that we're inside a VM...
         if s.physical_core_count().unwrap_or_default() > 0 {
diff --git a/tests/network.rs b/tests/network.rs
index 321bd98..fafd434 100644
--- a/tests/network.rs
+++ b/tests/network.rs
@@ -6,7 +6,7 @@
 fn test_networks() {
     use sysinfo::Networks;
 
-    if sysinfo::IS_SUPPORTED {
+    if sysinfo::IS_SUPPORTED_SYSTEM {
         let mut n = Networks::new();
         assert_eq!(n.iter().count(), 0);
         n.refresh();
diff --git a/tests/process.rs b/tests/process.rs
index 582cfa3..0232472 100644
--- a/tests/process.rs
+++ b/tests/process.rs
@@ -4,7 +4,7 @@ use sysinfo::{Pid, ProcessRefreshKind, System, UpdateKind};
 
 #[test]
 fn test_cwd() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     let mut p = if cfg!(target_os = "windows") {
@@ -42,7 +42,7 @@ fn test_cwd() {
 
 #[test]
 fn test_cmd() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     let mut p = if cfg!(target_os = "windows") {
@@ -94,7 +94,7 @@ fn build_test_binary() {
 
 #[test]
 fn test_environ() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     build_test_binary();
@@ -158,7 +158,7 @@ fn test_process_refresh() {
     let mut s = System::new();
     assert_eq!(s.processes().len(), 0);
 
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     s.refresh_process(sysinfo::get_current_pid().expect("failed to get current pid"));
@@ -183,7 +183,7 @@ fn test_process_disk_usage() {
     use std::io::prelude::*;
     use sysinfo::get_current_pid;
 
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     if std::env::var("FREEBSD_CI").is_ok() {
@@ -241,7 +241,7 @@ fn cpu_usage_is_not_nan() {
     let mut system = System::new();
     system.refresh_processes();
 
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
 
@@ -269,7 +269,7 @@ fn cpu_usage_is_not_nan() {
 fn test_process_times() {
     use std::time::{SystemTime, UNIX_EPOCH};
 
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     let boot_time = System::boot_time();
@@ -319,7 +319,7 @@ fn test_process_times() {
 // Checks that `session_id` is working.
 #[test]
 fn test_process_session_id() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     let mut s = System::new();
@@ -330,7 +330,7 @@ fn test_process_session_id() {
 // Checks that `refresh_processes` is removing dead processes.
 #[test]
 fn test_refresh_processes() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     let mut p = if cfg!(target_os = "windows") {
@@ -378,7 +378,7 @@ fn test_refresh_processes() {
     not(feature = "unknown-ci")
 ))]
 fn test_refresh_tasks() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     let task_name = "task_1_second";
@@ -426,7 +426,7 @@ fn test_refresh_tasks() {
 // Checks that `refresh_process` is NOT removing dead processes.
 #[test]
 fn test_refresh_process() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     let mut p = if cfg!(target_os = "windows") {
@@ -469,7 +469,7 @@ fn test_refresh_process() {
 
 #[test]
 fn test_wait_child() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     let p = if cfg!(target_os = "windows") {
@@ -507,7 +507,7 @@ fn test_wait_child() {
 
 #[test]
 fn test_wait_non_child() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
 
@@ -552,7 +552,7 @@ fn test_wait_non_child() {
 
 #[test]
 fn test_process_iterator_lifetimes() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
 
@@ -579,7 +579,7 @@ fn test_process_iterator_lifetimes() {
 // Regression test for <https://github.com/GuillaumeGomez/sysinfo/issues/918>.
 #[test]
 fn test_process_cpu_usage() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
 
@@ -596,7 +596,7 @@ fn test_process_cpu_usage() {
 
 #[test]
 fn test_process_creds() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
 
@@ -641,7 +641,7 @@ fn test_process_creds() {
 fn test_process_specific_refresh() {
     use sysinfo::{DiskUsage, ProcessRefreshKind};
 
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
 
@@ -741,7 +741,7 @@ fn test_process_specific_refresh() {
 
 #[test]
 fn test_refresh_pids() {
-    if !sysinfo::IS_SUPPORTED || cfg!(feature = "apple-sandbox") {
+    if !sysinfo::IS_SUPPORTED_SYSTEM || cfg!(feature = "apple-sandbox") {
         return;
     }
     let self_pid = sysinfo::get_current_pid().expect("failed to get current pid");
diff --git a/tests/system.rs b/tests/system.rs
index 1893926..8127290 100644
--- a/tests/system.rs
+++ b/tests/system.rs
@@ -10,7 +10,7 @@ fn test_refresh_system() {
     sys.refresh_memory();
     sys.refresh_cpu_usage();
     // We don't want to test on unsupported systems.
-    if sysinfo::IS_SUPPORTED {
+    if sysinfo::IS_SUPPORTED_SYSTEM {
         assert!(sys.total_memory() != 0);
         assert!(sys.free_memory() != 0);
     }
@@ -25,7 +25,7 @@ fn test_refresh_process() {
     // We don't want to test on unsupported systems.
 
     #[cfg(not(feature = "apple-sandbox"))]
-    if sysinfo::IS_SUPPORTED {
+    if sysinfo::IS_SUPPORTED_SYSTEM {
         assert!(
             sys.refresh_process(sysinfo::get_current_pid().expect("failed to get current pid")),
             "process not listed",
@@ -44,7 +44,7 @@ fn test_get_process() {
     let current_pid = match sysinfo::get_current_pid() {
         Ok(pid) => pid,
         _ => {
-            if !sysinfo::IS_SUPPORTED {
+            if !sysinfo::IS_SUPPORTED_SYSTEM {
                 return;
             }
             panic!("get_current_pid should work!");
@@ -54,7 +54,7 @@ fn test_get_process() {
         assert!(p.memory() > 0);
     } else {
         #[cfg(not(feature = "apple-sandbox"))]
-        assert!(!sysinfo::IS_SUPPORTED);
+        assert!(!sysinfo::IS_SUPPORTED_SYSTEM);
     }
 }
 
@@ -76,7 +76,7 @@ fn check_if_send_and_sync() {
     let current_pid = match sysinfo::get_current_pid() {
         Ok(pid) => pid,
         _ => {
-            if !sysinfo::IS_SUPPORTED {
+            if !sysinfo::IS_SUPPORTED_SYSTEM {
                 return;
             }
             panic!("get_current_pid should work!");
@@ -89,7 +89,7 @@ fn check_if_send_and_sync() {
                  // doesn't implement the Sync trait.
     } else {
         #[cfg(not(feature = "apple-sandbox"))]
-        assert!(!sysinfo::IS_SUPPORTED);
+        assert!(!sysinfo::IS_SUPPORTED_SYSTEM);
     }
 }
 
@@ -103,7 +103,7 @@ fn check_hostname_has_no_nuls() {
 #[test]
 fn check_uptime() {
     let uptime = System::uptime();
-    if sysinfo::IS_SUPPORTED {
+    if sysinfo::IS_SUPPORTED_SYSTEM {
         std::thread::sleep(std::time::Duration::from_millis(1000));
         let new_uptime = System::uptime();
         assert!(uptime < new_uptime);
@@ -112,7 +112,7 @@ fn check_uptime() {
 
 #[test]
 fn check_boot_time() {
-    if sysinfo::IS_SUPPORTED {
+    if sysinfo::IS_SUPPORTED_SYSTEM {
         assert_ne!(System::boot_time(), 0);
     }
 }
@@ -127,7 +127,7 @@ fn test_consecutive_cpu_usage_update() {
     use std::time::Duration;
     use sysinfo::{Pid, ProcessRefreshKind, System};
 
-    if !sysinfo::IS_SUPPORTED {
+    if !sysinfo::IS_SUPPORTED_SYSTEM {
         return;
     }
 
@@ -182,7 +182,7 @@ fn test_consecutive_cpu_usage_update() {
 
 #[test]
 fn test_refresh_memory() {
-    if !sysinfo::IS_SUPPORTED {
+    if !sysinfo::IS_SUPPORTED_SYSTEM {
         return;
     }
     // On linux, since it's the same file, memory information are always retrieved.