-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow variable substition within Exec functions #4818
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, but I've already reverted such commit: bd1b973
$ sudo ./libtool --mode=execute ./test-execute 2>&1
...
+ perl -e 'exit(!(qq{0} eq qq{\x25U}))'
exec-spec-interpolation.service: Main process exited, code=exited, status=1/FAILURE
exec-spec-interpolation.service: Unit entered failed state.
exec-spec-interpolation.service: Failed with result 'exit-code'.
PID: 11570
Start Timestamp: Sun 2016-12-04 21:09:08 UTC
Exit Timestamp: Sun 2016-12-04 21:09:08 UTC
Exit Code: exited
Exit Status: 1
Assertion 'service->main_exec_status.status == status_expected' failed at src/test/test-execute.c:69, function check(). Aborting.
Aborted
@evverx any good resources for running the test suite? I'm still working my way through the codebase while I look at this. from the test just seems like it can't be applied to later portions of the command because they get processed again later. |
Not sure I understand the question. Also, you can run our tests under
|
basically I havent had a chance to figure out how the mkosi stuff works in conjunction with the compilation process. Ideally I want to run the tests inside a container. atm the process is pretty slow because i'm rebuilding the image each time to manually test the code. a more incremental approach with be ideal. the hacking file has minimal details on that setup. |
and thanks for the example for valgrand, I knew there was a memory leak in initial pr. I'm more interested in getting the logic correct atm. ensure memory cleanup will come after =) |
Fedora tests are broken, rest is green. |
I am pretty sure we should resolve specifiers exclusively when parsing unit files, not when we are about to activate. Hence I figure we should remove any invocation of unit_full_printf_strv() from service.c and socket.c. |
Hmm, so given that moving the stuff away from socket.c/service.c was a bit more complex I prepped a new PR now in #4835 that should replace this one. Please have a look. I am taking the liberty to close this one in favour of the new one. I hope that's OK. |
haha, of course its okay. I will check out the new pr and give it a run. |
Well,
So, you should copy all tests to the container manually. There is no automatic way to do that. |
We should fix that and run "make check" as part of the build... |
implements #3061 interested in getting first pass eyes on this.
open questions
User=soandso
impact the expansion when run by init? what other settings may impact this?config_parse_exec
I should do as part of this? are there different methods for ExecStop, ExecRestart, etc?things I noticed
Examples
@spiette, @rektide, @DrYak would any of you be interested in helping test out this patch since you also seemed interested in the functionality?