Hi! > >> There is one more issue with tbio. :( > >> > >> Sometimes it may fail with: > >> > >> ltp_tbio 0 TINFO : Device opened successfully > >> ltp_tbio 1 TPASS : success on LTP_TBIO_ALLOC test > >> ltp_tbio 2 TPASS : success on LTP_TBIO_CLONE test > >> ltp_tbio 3 TPASS : success on LTP_TBIO_GET_NR_VECS test > >> ltp_tbio 4 TPASS : success on LTP_TBIO_ADD_PAGE test > >> ltp_tbio 5 TPASS : success on LTP_TBIO_SPLIT:write to dev > >> ltp_tbio 6 TPASS : success on LTP_TBIO_DO_IO:write to dev > >> ltp_tbio 7 TPASS : success on LTP_TBIO_DO_IO:read from dev > >> ltp_tbio 8 TPASS : success on LTP_TBIO_PUT test > >> ERROR: Module ltp_tbio is in use > >> ltp_tbio 9 TBROK : tst_run_cmd.c:84: failed to exec cmd 'rmmod' at > >> tst_run_cmd.c:84 > >> ltp_tbio 10 TBROK : tst_run_cmd.c:84: Remaining cases broken > > > > Hmm, would switch to modprobe -r fix that? > > > > I've been told several times that rrmod should not be used anymore > > because modprobe handles things better... > > > > Or will modprobe -r fail the same way? > > Yes, modprobe -r will fail the same way. And using modprobe complicates > the module loading/unloading wrappers, because we will need to place > modules in /lib/modules/`uname-r`.
Ok, then we need this patchset to fix that. Just side note, for modprobe -r the path for loading modules should not matter and for loading modules we pass right path with -d. > >> This is a rfc patch which fixes this problem. > >> > >> The main idea is to execute rmmod up to a timeout, and check if the module > >> has been unloaded after each execution of rmmod. > >> > >> Summary of changes: > >> * introduce tst_module_is_loaded() - checks if the module is in > >> /proc/modules > >> * change a bit interfaces of tst_run_cmd and cmd_run_cmd_fds (to > >> conditionally > >> check the program exit code to be able to continue the test if the > >> program failed) > >> * introducing a loop into tst_module_unload > >> > > > > That sounds reasonably. > > > >> I would like somebody to review the general idea. If it's ok, I'll split > >> this patch > >> into several logically coupled ones and resend them. > >> > >> I'm really unsure if the changes to tst_run_cmd and cmd_run_cmd_fds are > >> acceptable. > > > > I'm OK with adding the flag, it would need a better name though. > > > > int check_exit_status ? check if it's set to a non-zero value Maybe we can change the functions to pass the exit value (return int) in case that it's not used internally and name the flag pass_exit_val. -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
