[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb" |
Date: |
Mon, 17 Oct 2022 11:48:02 -0400 (EDT) |
Follow-up Comment #20, bug #61393 (project octave):
wrt http://hg.code.sf.net/p/octave/sparsersb/rev/a488e13d19f7
If the tests that unlink those temporary files happen to fail, the files would
remain in the temporary directory. That might not be a big deal. But you could
also use the following pattern to remove those files when the tests are done
(untested!):
diff -r 1d90e1beaf00 src/sparsersb.cc
--- a/src/sparsersb.cc Mon Oct 17 17:02:09 2022 +0200
+++ b/src/sparsersb.cc Mon Oct 17 17:46:49 2022 +0200
@@ -3494,12 +3494,15 @@
%!test
%! s=sparsersb([11,0;21,22]);
%! assert(sparsersb(s,"RSB_MIF_TOTAL_SIZE__TO__SIZE_T") ==
sparsersb(s,"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
+
+%!share sparsersb_temporary_matrix_file tmf_unlink
+%! sparsersb_temporary_matrix_file =
fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx");
+%! tmf_unlink = onCleanup(@() unlink(sparsersb_temporary_matrix_file));
+
%!test
%! s=sparsersb([1]);
-%! sparsersb_temporary_matrix_file =
fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx");
%! sparsersb(sparsersb([11,0;21,22]),"save",sparsersb_temporary_matrix_file)
%!test
-%! sparsersb_temporary_matrix_file =
fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx");
%! [S, NROWS, NCOLS, NNZ, REPINFO, FIELD, SYMMETRY] =
sparsersb(sparsersb_temporary_matrix_file );
%! assert(NROWS==2)
%! assert(NCOLS==2)
@@ -3509,12 +3512,11 @@
%%! test # case for RSBOI_WANT_MTX_LOAD=0
%%! try
%%! wvt=-1;
-%%! sparsersb_temporary_matrix_file =
fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx");
%%! [S, NROWS, NCOLS, NNZ, REPINFO, FIELD, SYMMETRY] =
sparsersb(sparsersb_temporary_matrix_file, "Z");
%%! wvt=0;
%%! end_try_catch;
%%! assert(wvt==-1);
-%! sparsersb_temporary_matrix_file =
fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx");
+%!test
%! [S, NROWS, NCOLS, NNZ, REPINFO, FIELD, SYMMETRY] =
sparsersb(sparsersb_temporary_matrix_file, "Z");
%! assert(NROWS==2);
%! assert(NCOLS==2);
@@ -3522,7 +3524,6 @@
%! assert(FIELD=="complex");
%! assert(SYMMETRY=='U');
%!test
-%! sparsersb_temporary_matrix_file =
fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx");;
%! [S, NROWS, NCOLS, NNZ, REPINFO, FIELD, SYMMETRY] =
sparsersb(sparsersb_temporary_matrix_file, "Z");
%! assert(NROWS==2);
%! assert(NCOLS==2);
@@ -3530,38 +3531,35 @@
%! assert(FIELD=="complex");
%! assert(SYMMETRY=='U');
%!test
-%! sparsersb_temporary_matrix_file =
fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx");
%! [S, NROWS, NCOLS, NNZ, REPINFO, FIELD] =
sparsersb(sparsersb_temporary_matrix_file, "D");
%! assert(NROWS==2);
%! assert(NCOLS==2);
%! assert(NNZ==3);
%! assert(FIELD=="real");
%!test
-%! sparsersb_temporary_matrix_file =
fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx");
%! [S, NROWS, NCOLS, NNZ, REPINFO] =
sparsersb(sparsersb_temporary_matrix_file, "D");
%! assert(NROWS==2);
%! assert(NCOLS==2);
%! assert(NNZ==3);
%!test
-%! sparsersb_temporary_matrix_file =
fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx");
%! [S, NROWS, NCOLS] = sparsersb(sparsersb_temporary_matrix_file, "D");
%! assert(NROWS==2);
%! assert(NCOLS==2);
%!test
-%! sparsersb_temporary_matrix_file =
fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx");
%! [S, NROWS] = sparsersb(sparsersb_temporary_matrix_file, "D");
%! assert(NROWS==2);
-%! unlink(sparsersb_temporary_matrix_file);
+
+%!share sparsersb_temporary_render_file trf_unlink
+%! sparsersb_temporary_render_file =
fullfile(tempdir(),"sparsersb_temporary_render.eps");
+%! trf_unlink = onCleanup(@() unlink(sparsersb_temporary_render_file));
+
%!test
%! rrm=sparsersb(sprand(1000,1000,0.001));
-%! sparsersb_temporary_render_file =
fullfile(tempdir(),"sparsersb_temporary_render.eps");
%! sparsersb(rrm,"render", sparsersb_temporary_render_file, 1024); # will use
defaults for rWidth
%!test
%! rrm=sparsersb(sprand(1000,1000,0.001));
-%! sparsersb_temporary_render_file =
fullfile(tempdir(),"sparsersb_temporary_render.eps");
%! sparsersb(rrm,"render", sparsersb_temporary_render_file, 1024, 1024);
%! # sparsersb(rrm,"renderb", sparsersb_temporary_render_file);
sparsersb(rrm,"renders", sparsersb_temporary_render_file); # FIXME
-%! unlink(sparsersb_temporary_render_file);
%!test
%! a=sparsersb(sprand(100,100,0.4));
%! sparsersb(a,"autotune");
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61393>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", (continued)
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", Markus Mützel, 2022/10/15
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", Markus Mützel, 2022/10/15
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", dezperado, 2022/10/16
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", Markus Mützel, 2022/10/16
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", Markus Mützel, 2022/10/17
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", Markus Mützel, 2022/10/17
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", dezperado, 2022/10/17
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", dezperado, 2022/10/17
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", dezperado, 2022/10/17
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", dezperado, 2022/10/17
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb",
Markus Mützel <=
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", dezperado, 2022/10/17
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", Markus Mützel, 2022/10/17
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", dezperado, 2022/10/17
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", Markus Mützel, 2022/10/18
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", Markus Mützel, 2022/10/18
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", Markus Mützel, 2022/10/18
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", dezperado, 2022/10/18
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", Markus Mützel, 2022/10/18
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", dezperado, 2022/10/18
- [Octave-bug-tracker] [bug #61393] [octave forge] (sparsersb) Crash while "pkg test sparsersb", dezperado, 2022/10/18