The agent's half of the refusal is checked where it actually ships
This commit is contained in:
parent
1f30d9a067
commit
82557df51b
@ -80,6 +80,19 @@ test: it names the running program rather than "this host", says the pair would
|
||||
redefined function taking or returning a struct, and — in the LLVM-module direction — says why the program is
|
||||
the half that has to move.
|
||||
|
||||
The agent's two sentences have no unit test of their own, so they were checked the one way that matters: that
|
||||
they are in a binary a user would actually run. `vendor/agent/flan_agent.c` reaches a program through the
|
||||
vendor package's C sources rather than through an embedded-as-a-string module like `Runtime_src`, so an edit to
|
||||
it lands without regenerating anything — but that had to be confirmed rather than assumed, because a repo that
|
||||
embeds one C file that way can embed another.
|
||||
|
||||
```
|
||||
flan build test/programs/agent.flan --dev -o ahost ; strings ahost | grep -c "built by different backends" → 2
|
||||
flan build test/programs/agent.flan --x86 --dev -o ahost ; strings ahost | grep -c "built by different backends" → 2
|
||||
```
|
||||
|
||||
Two, in both configurations: one sentence per direction.
|
||||
|
||||
Two things about the matching that are deliberate. It matches on the *marker's name*, not on `"undefined
|
||||
symbol"`, which is glibc's phrasing and glibc's to change. And `dlerror` is one-shot with a buffer the next
|
||||
`dl` call may clobber, so the pointer is taken once and used for both the test and the reply; the agent's
|
||||
@ -104,6 +117,12 @@ a1 / host 54063108 / a1 / after1 54063108 / a2 / after2 104337044 / counter 12
|
||||
|
||||
from `Emit.redefinition` + `Build.shared` and from `X86.redefinition` + `Build.shared_x86` alike.
|
||||
|
||||
And "a matched pair is unaffected" is checked through the agent as well as through `reload_host.c`, which is
|
||||
worth saying because the two are different code paths and only one of them is what a user meets. The daemon
|
||||
tests in `dune test` — `dev-globals`, `dev-repl`, `dev-watch`, `dev-pause`, `dev-loop` — start a real `flan
|
||||
dev` session, build a real host, and send real redefinition modules to the agent in it over the socket. Every
|
||||
one of those `dlopen`s now has to resolve `flan.abi.llvm`, and every one of those tests passes.
|
||||
|
||||
## `flan reload --x86` did not land, and should not have
|
||||
|
||||
The brief left this to judgement. It is item 3 of `HANDOFF-x86-redef.md`, not a flag.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user