Skip to content

Conversation

@yejseo01
Copy link
Contributor

@yejseo01 yejseo01 commented Nov 27, 2025

Changes

  • Migrate the simulator binary to the VM. This would remove the file sync issue a lot.
  • Generate the new index of remoteproc for each tests for better isolation. This helps on file system synchronisation delay tempering the next test.
  • change assertion to check the filesystems inside the VMs
  • Implement synchronisation system for tests to wait for simulator to boot.

Checklist

  • 🤖 This change is covered by tests as required.
  • 🤹 All required manual testing has been performed.
  • 📖 All documentation updates are complete.

@yejseo01
Copy link
Contributor Author

this PR is based on - #44

Before this change, the bundle is dependent on the VM mount.
We want to not using mounting in out VMs in the future to stablise
the CI, so removing mount usage by copying the bundle to the VM.

Signed-off-by: Yejin Seo <[email protected]>
Signed-off-by: Yejin Seo <[email protected]>
Signed-off-by: Yejin Seo <[email protected]>
Signed-off-by: Yejin Seo <[email protected]>
@yejseo01 yejseo01 marked this pull request as ready for review December 1, 2025 16:21
@yejseo01 yejseo01 requested a review from a team as a code owner December 1, 2025 16:21
@yejseo01 yejseo01 requested a review from th3james December 8, 2025 16:56
}
defer func() { _ = sim.Stop() }()
t.Cleanup(func() {
_, _, _ = vm.RunCommand("pkill", "-f", "remoteproc-simulator")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this pkill required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because sim.Stop() only stops the limactl command in the host side. it wouldn't stop the process inside of the VM. the current structure also doesn't expose the VM inside the sim, so we can only stop it here. If you prefer that simulator has access to the VM besides from the simulator binary run, that would require bigger changes

"--annotation", fmt.Sprintf("remoteproc.name=%s", "other-processor"),
imageName)
assert.Error(t, err)
assert.Contains(t, stderr, "remote processor other-processor does not exist, available remote processors: a-processor")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's safer this way in case of another file synchronisation delay. If the remoteproc-simulator kill of the previous test was not complete at this point, the previous test's remoteproc name would show here as error message included in the available remote processor list. If we keep the assertion this way, the test doesn't require the error string to ONLY have a-processor

)

downloader := exec.Command("curl", "-L", "-o", filepath.Join(binOutDir, "simulator.tar.gz"), artifactURL)
downloader.Env = os.Environ()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this and line 95 actually necessary? What environment variables do we need?

}
defer func() { _ = sim.Stop() }()
t.Cleanup(func() {
_, _, _ = vm.RunCommand("pkill", "-f", "remoteproc-simulator")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should definitely be inside the sim.Stop() function. This does mean you'll need to store the vm on the Simulator struct, but it's the only way to have a coherent abstraction.
Additionally, never discard errors like this - we have no reason to assume this command should fail, so if it does fail we should at minimum log it so we can debug why the program has violated our expectation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants