-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
bugIncorrect behavior in the current implementation that needs fixingIncorrect behavior in the current implementation that needs fixingwasiIssues pertaining to WASIIssues pertaining to WASIwasi:implIssues pertaining to WASI implementation in WasmtimeIssues pertaining to WASI implementation in Wasmtime
Description
async fn test_flags_and_type(dir: &Descriptor) {
let open = |path: &str, oflags: OpenFlags, fdflags: DescriptorFlags| -> _ {
dir.open_at(PathFlags::empty(), path.to_string(), oflags, fdflags)
};
let d = open(".", OpenFlags::empty(), DescriptorFlags::MUTATE_DIRECTORY).await.unwrap();
assert_eq!(d.get_flags().await,
Ok(DescriptorFlags::READ | DescriptorFlags::MUTATE_DIRECTORY));
}
I would expect that the directory is opened with MUTATE_DIRECTORY
. However it seems it is not:
openat2(3, ".", {flags=O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC, resolve=RESOLVE_NO_MAGICLINKS|RESOLVE_BENEATH}, 24) = 12
statx(12, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0
fcntl(12, F_GETFL) = 0x28000 (flags O_RDONLY|O_LARGEFILE|O_NOFOLLOW)
It seems we only have READ
:
thread '<unnamed>' (1) panicked at src/bin/filesystem.rs:620:5:
assertion `left == right` failed
left: Ok(DescriptorFlags(READ))
right: Ok(DescriptorFlags(READ | MUTATE_DIRECTORY))
Metadata
Metadata
Assignees
Labels
bugIncorrect behavior in the current implementation that needs fixingIncorrect behavior in the current implementation that needs fixingwasiIssues pertaining to WASIIssues pertaining to WASIwasi:implIssues pertaining to WASI implementation in WasmtimeIssues pertaining to WASI implementation in Wasmtime