On Sun, Jun 14, 2026 at 12:46:36PM +0800, Qian Yun wrote:
> On 6/11/26 8:10 AM, Waldek Hebisch wrote:
> > On Thu, Jun 11, 2026 at 06:36:11AM +0800, Qian Yun wrote:
> >> On 6/11/26 5:37 AM, Waldek Hebisch wrote:
> >>>
> >>> One possibility is to allow this test to fail. IIUC this currently
> >>> causes CI failure but I hope it is possibile to ignore this test in CI.
> >>>
> >>> I used file in root directory in hope of getting test independent
> >>> of operating system. So another way is to use test depending on
> >>> OS (on Unix using touch + chmod to get desired permissions) and use
> >>> assertions to activate it or choose correct version.
> >>>
> >>
> >> OK, two workarounds:
> >>
> >> 1. open an existing directory as file will fail.
> >>
> >> 2. open a file which parent directory does not exist will fail.
>
> I tried this approach, to open "/foo/bar" in the test.
> This fixes for sbcl, but still fails for CCL.
>
> That's because we pass ":if-does-not-exist :create" to "open".
>
> For CCL, on windows, normal user, openIfCan("/foo", "output")
> fails because of permission failure, but it succeeds for
> "/foo/bar"!
>
> Anyway, CCL's behavior is different, because it can create
> directories. Shall we try to make different Lisps consistent here?
CCL behavior is not nice, but I do not think we should fight with
it. Given CCL behaviour I think that best way is to make the
test conditional.
First version in the attachement. It is possible that we
may need more complicated condition in 's_supp.lisp' to
distinguish Unix from non-Unix.
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/fricas-devel/ajNC9Hssdp93LjGX%40fricas.org.
diff --git a/src/input/files.input b/src/input/files.input
index 9aaeb52b..f8f1b416 100644
--- a/src/input/files.input
+++ b/src/input/files.input
@@ -86,6 +86,10 @@ testEquals("a11", "r11")
testcase "openIfCan"
-testTrue("openIfCan(_"/foo/bar_", _"output_")$BASFILE case _"failed_"")
+testTrue("openIfCan(_"foo.bar_", _"input_")$BASFILE case _"failed_"")
+)if Unix
+)system (touch foo.out; chmod 400 foo.out)
+testTrue("openIfCan(_"foo.out_", _"output_")$BASFILE case _"failed_"")
+)endif
statistics()
diff --git a/src/interp/int-top.boot b/src/interp/int-top.boot
index d5ed37c7..c21c972e 100644
--- a/src/interp/int-top.boot
+++ b/src/interp/int-top.boot
@@ -144,7 +144,7 @@ int_loop () ==
SpadInterpretStream(step_num, source, interactive?) ==
pile? := not interactive?
- $inclAssertions: local := ["AIX", "CommonLisp"] -- Jan 28/90
+ $inclAssertions : local := $sys_assertions
$lastPos : local := $nopos ------------>!!!
diff --git a/src/interp/s_supp.lisp b/src/interp/s_supp.lisp
index c1b41371..a4ccb5a1 100644
--- a/src/interp/s_supp.lisp
+++ b/src/interp/s_supp.lisp
@@ -126,3 +126,6 @@
(defun |search_str| (pat str start)
(search pat str :start2 start))
+
+(setf |$sys_assertions| (list '|CommonLisp|
+ #+:unix '|Unix|))