search for: callback_invok

Displaying 8 results from an estimated 8 matches for "callback_invok".

Did you mean: callback_invoked
2019 Jul 31
0
Re: [PATCH] Rust bindings: Implement Event features
...write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. > + */ > + > +extern crate guestfs; > + > +use std::default::Default; > +use std::sync::{Arc, Mutex}; > + > +#[test] > +fn progress_messages() { > + let callback_invoked = Arc::new(Mutex::new(0)); Ditto as in 410_close_event.rs. > + { > + let mut g = guestfs::Handle::create().expect("create"); > + g.add_drive("/dev/null", Default::default()).unwrap(); > + g.launch().unwrap(); > + > + let eh =...
2019 Aug 05
3
Re: [PATCH] Rust bindings: Implement Event features
...1 Franklin Street, Fifth Floor, Boston, MA > 02110-1301 USA. > > + */ > > + > > +extern crate guestfs; > > + > > +use std::default::Default; > > +use std::sync::{Arc, Mutex}; > > + > > +#[test] > > +fn progress_messages() { > > + let callback_invoked = Arc::new(Mutex::new(0)); > > Ditto as in 410_close_event.rs. > > > + { > > + let mut g = guestfs::Handle::create().expect("create"); > > + g.add_drive("/dev/null", Default::default()).unwrap(); > > + g.launch().unwrap(...
2019 Apr 03
1
[PATCH] Add missing python bindings tests
...l Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +import unittest +import os +import guestfs + +callback_invoked = 0 + + +def callback(ev, eh, buf, array): + global callback_invoked + callback_invoked += 1 + + +class Test430ProgressMessages(unittest.TestCase): + def test_progress_messages(self): + global callback_invoked + g = guestfs.GuestFS(python_return_dict=True) + g.a...
2019 Jul 30
4
[PATCH] Rust bindings: Implement Event features
...al Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +extern crate guestfs; + +use std::default::Default; +use std::sync::{Arc, Mutex}; + +#[test] +fn progress_messages() { + let callback_invoked = Arc::new(Mutex::new(0)); + { + let mut g = guestfs::Handle::create().expect("create"); + g.add_drive("/dev/null", Default::default()).unwrap(); + g.launch().unwrap(); + + let eh = g + .set_event_callback( + |_, _, _, _...
2019 Aug 05
2
[PATCH 2/2] Rust bindings: Implement callback handlers
...General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +extern crate guestfs; + +use std::cell::RefCell; +use std::rc::Rc; +use std::str; + +#[test] +fn log_messages() { + let callback_invoked = Rc::new(RefCell::new(0)); + { + let mut g = guestfs::Handle::create().expect("create"); + g.set_event_callback( + |ev, _, buf, array| { + *callback_invoked.borrow_mut() += 1; + + let event = guestfs::event_to_string(&[ev])....
2020 Jan 10
8
[PATCH 0/7] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python bindings, leaving only an overly length line in setup.py. Add a simple optional pycodestyle-based test to avoid regressions in the future. Pino Toscano (7): python: PEP 8: adapt empty lines python: PEP 8: adapt whitespaces in lines python: tests: catch specific exception python: tests: improve variable naming python: tests:
2020 Jan 10
9
[PATCH v2 0/8] Various Python pycodestyle fixes
Fixes all the pycodestyle issues in the Python bindings, overring one that does not make sense to change (and it's in setup.py, so almost irrelevant). Add a simple optional pycodestyle-based test to avoid regressions in the future. Pino Toscano (8): python: PEP 8: adapt empty lines python: PEP 8: adapt whitespaces in lines python: tests: catch specific exception python: tests:
2015 Oct 06
6
[PATCH 0/4] ocaml: Allow Guestfs.t handle to be garbage collected.
Allow Guestfs.t handle to be garbage collected, and add a regression test.