Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
67df0065
Unverified
Commit
67df0065
authored
Feb 04, 2026
by
Yan Ru Pei
Committed by
GitHub
Feb 04, 2026
Browse files
chore: linux gate lib/memory (#5942)
Signed-off-by:
PeaBrane
<
yanrpei@gmail.com
>
parent
76e0e207
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
lib/memory/src/lib.rs
lib/memory/src/lib.rs
+2
-0
lib/memory/src/tests.rs
lib/memory/src/tests.rs
+6
-1
No files found.
lib/memory/src/lib.rs
View file @
67df0065
...
...
@@ -17,6 +17,7 @@ pub mod pool;
pub
mod
prelude
;
mod
device
;
#[cfg(target_os
=
"linux"
)]
mod
disk
;
mod
pinned
;
mod
system
;
...
...
@@ -27,6 +28,7 @@ mod tests;
pub
use
arena
::{
ArenaAllocator
,
ArenaBuffer
,
ArenaError
};
pub
use
device
::
DeviceStorage
;
#[cfg(target_os
=
"linux"
)]
pub
use
disk
::
DiskStorage
;
pub
use
pinned
::
PinnedStorage
;
pub
use
system
::
SystemStorage
;
...
...
lib/memory/src/tests.rs
View file @
67df0065
...
...
@@ -55,6 +55,7 @@ fn test_system_storage_zero_size() {
));
}
#[cfg(target_os
=
"linux"
)]
#[test]
fn
test_disk_storage_temp
()
{
let
storage
=
DiskStorage
::
new
(
4096
)
.unwrap
();
...
...
@@ -65,6 +66,7 @@ fn test_disk_storage_temp() {
assert
!
(
storage
.path
()
.exists
());
}
#[cfg(target_os
=
"linux"
)]
#[test]
fn
test_disk_storage_at_path
()
{
let
temp_dir
=
tempfile
::
tempdir
()
.unwrap
();
...
...
@@ -98,6 +100,7 @@ fn test_system_storage_unregistered_no_nixl_descriptor() {
assert
!
(
storage
.nixl_descriptor
()
.is_none
());
}
#[cfg(target_os
=
"linux"
)]
#[test]
fn
test_disk_storage_unregistered_no_nixl_descriptor
()
{
let
storage
=
DiskStorage
::
new
(
4096
)
.unwrap
();
...
...
@@ -197,7 +200,8 @@ mod nixl_tests {
// The current implementation uses mem::zeroed() which is invalid for types with NonNull
// TODO: Fix NixlRegistered::into_storage() implementation
// Disk Storage Tests
// Disk Storage Tests (Linux only)
#[cfg(target_os
=
"linux"
)]
#[test]
fn
test_disk_storage_registration
()
{
let
storage
=
DiskStorage
::
new
(
4096
)
.unwrap
();
...
...
@@ -210,6 +214,7 @@ mod nixl_tests {
assert
!
(
registered
.is_registered
());
}
#[cfg(target_os
=
"linux"
)]
#[test]
fn
test_disk_storage_descriptor_consistency
()
{
let
storage
=
DiskStorage
::
new
(
8192
)
.unwrap
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment