You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In tests, calling t.TempDir() leads to an error during cleanup:
testing.go:1225: TempDir RemoveAll cleanup: unlinkat /tmp/TestExample406597298: bad file descriptor
In enclave.json, /tmp has been mounted as memfs. I also had tried using hostfs and mounting the native tmp directory, and also tried mounting the root directory as hostfs.
It worked when I used tmp, _ := os.MkdirTemp("", "*") instead, maybe that is an acceptable fix? Although once I added a defer os.RemoveAll(tmp), it also returned an error (not a panic, though). I didn't want to investigate any further, but it seems to be either a problem in os.Remove/All in general, or with temp directories in the ego file system. A superficial fix for t.TempDir() would be to simply not insist on success of the cleanup operation in the testing.go vendor file.
To reproduce
Steps to reproduce the behavior:
Create a test.
Insert _ = t.TempDir()
ego-go test -c && ego sign *.test && ego run *.test (adjust the enclave.json as necessary, obviously)
Expected behavior
I would have expected this to not panic.
Additional info
I am using OE_SIMULATION=1, although that should not affect anything IMO. I'm on Ubuntu 24.
The text was updated successfully, but these errors were encountered:
Issue description
In tests, calling
t.TempDir()
leads to an error during cleanup:In
enclave.json
,/tmp
has been mounted asmemfs
. I also had tried using hostfs and mounting the native tmp directory, and also tried mounting the root directory as hostfs.It worked when I used
tmp, _ := os.MkdirTemp("", "*")
instead, maybe that is an acceptable fix? Although once I added adefer os.RemoveAll(tmp)
, it also returned an error (not a panic, though). I didn't want to investigate any further, but it seems to be either a problem inos.Remove/All
in general, or with temp directories in the ego file system. A superficial fix fort.TempDir()
would be to simply not insist on success of the cleanup operation in thetesting.go
vendor file.To reproduce
Steps to reproduce the behavior:
_ = t.TempDir()
ego-go test -c && ego sign *.test && ego run *.test
(adjust the enclave.json as necessary, obviously)Expected behavior
I would have expected this to not panic.
Additional info
I am using OE_SIMULATION=1, although that should not affect anything IMO. I'm on Ubuntu 24.
The text was updated successfully, but these errors were encountered: