it: track whether objects have been deleted
This commit is contained in:
parent
cdab4d4cad
commit
6af9d909b8
22 changed files with 167 additions and 45 deletions
|
|
@ -1,8 +1,12 @@
|
|||
use {
|
||||
crate::{
|
||||
it::{
|
||||
test_error::TestError, test_ifs::test_shm_pool::TestShmPool, test_mem::TestMem,
|
||||
test_object::TestObject, test_transport::TestTransport, testrun::ParseFull,
|
||||
test_error::TestError,
|
||||
test_ifs::test_shm_pool::TestShmPool,
|
||||
test_mem::TestMem,
|
||||
test_object::{Deleted, TestObject},
|
||||
test_transport::TestTransport,
|
||||
testrun::ParseFull,
|
||||
},
|
||||
utils::{buffd::MsgParser, clonecell::CloneCell, copyhashmap::CopyHashMap},
|
||||
wire::{wl_shm::*, WlShmId},
|
||||
|
|
@ -15,6 +19,7 @@ pub struct TestShm {
|
|||
pub tran: Rc<TestTransport>,
|
||||
pub formats: CopyHashMap<u32, ()>,
|
||||
pub formats_awaited: Cell<bool>,
|
||||
pub deleted: Deleted,
|
||||
}
|
||||
|
||||
impl TestShm {
|
||||
|
|
@ -32,7 +37,9 @@ impl TestShm {
|
|||
tran: self.tran.clone(),
|
||||
mem: CloneCell::new(mem.clone()),
|
||||
destroyed: Cell::new(false),
|
||||
deleted: Default::default(),
|
||||
});
|
||||
self.deleted.check()?;
|
||||
self.tran.send(CreatePool {
|
||||
self_id: self.id,
|
||||
id: pool.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue