vfs: fix vfs tests
This commit is contained in:
parent
ac84a7e027
commit
281b280e8d
@ -1,4 +1,5 @@
|
||||
#![no_std]
|
||||
#![cfg_attr(not(test), no_std)]
|
||||
#![cfg_attr(test, allow(unused_imports))]
|
||||
#![allow(clippy::new_without_default)]
|
||||
#![feature(
|
||||
maybe_uninit_slice,
|
||||
|
@ -311,7 +311,7 @@ impl<'a, D: NgBlockDevice + 'a> BlockDevice for NgBlockDeviceWrapper<'a, D> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::device::BlockChunk;
|
||||
use crate::vfs::block::device::BlockChunk;
|
||||
|
||||
use super::BlockChunkIter;
|
||||
|
||||
|
@ -577,7 +577,7 @@ mod tests {
|
||||
util::FixedString,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
use crate::vfs::{
|
||||
device::CharDevice,
|
||||
file::DirectoryOpenPosition,
|
||||
impls::const_value_node,
|
||||
|
@ -415,8 +415,8 @@ mod tests {
|
||||
path::Path,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
impls::{const_value_node, f_symlink, mdir, value_node},
|
||||
use crate::vfs::{
|
||||
impls::{const_value_node, fixed_symlink, mdir, value_node},
|
||||
node::AccessToken,
|
||||
Read,
|
||||
};
|
||||
@ -558,7 +558,7 @@ mod tests {
|
||||
#[test]
|
||||
fn symlink_resolution() {
|
||||
let f1 = const_value_node("file1");
|
||||
let l1 = f_symlink(f1.clone());
|
||||
let l1 = fixed_symlink(f1.clone());
|
||||
let root = mdir([("l1", l1.clone())]);
|
||||
|
||||
let mut ioctx = IoContext::new(root.clone());
|
||||
|
@ -1,18 +1,5 @@
|
||||
//! Virtual filesystem interfaces and driver implementation
|
||||
|
||||
// #![cfg_attr(not(test), no_std)]
|
||||
// #![cfg_attr(test, allow(unused_imports))]
|
||||
// #![allow(clippy::new_ret_no_self, clippy::new_without_default)]
|
||||
// #![deny(missing_docs)]
|
||||
// #![feature(
|
||||
// if_let_guard,
|
||||
// maybe_uninit_slice,
|
||||
// trait_alias,
|
||||
// let_chains,
|
||||
// new_uninit,
|
||||
// trait_upcasting
|
||||
// )]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
pub mod block;
|
||||
|
@ -351,7 +351,7 @@ mod tests {
|
||||
use core::any::Any;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::node::NodeFlags;
|
||||
use crate::vfs::node::NodeFlags;
|
||||
|
||||
use super::{CommonImpl, DirectoryImpl, Node, RegularImpl};
|
||||
|
||||
|
@ -102,7 +102,7 @@ pub fn check_all(env: BuildEnv, action: CheckAction) -> Result<(), Error> {
|
||||
}
|
||||
|
||||
pub fn test_all(env: BuildEnv) -> Result<(), Error> {
|
||||
for path in ["kernel/lib/vfs", "kernel/driver/fs/memfs", "lib/abi"] {
|
||||
for path in ["kernel/driver/fs/memfs", "lib/abi", "kernel/libk"] {
|
||||
CargoBuilder::Host.run(env.workspace_root.join(path), "test")?;
|
||||
}
|
||||
Ok(())
|
||||
|
Loading…
x
Reference in New Issue
Block a user