metan-ucw / runltp-ng

Minimalistic LTP testrunner
11 stars 16 forks source link

[WIP] backend: Fix sh_init stop function pointer #47

Open pevik opened 2 years ago

pevik commented 2 years ago

s/ssh_stop/sh_stop/

Obvious typo.

Reported-by: Andrea Cervesato andrea.cervesato@suse.de Signed-off-by: Petr Vorel pvorel@suse.cz

pevik commented 2 years ago

Also backport one commit from https://github.com/metan-ucw/runltp-ng/pull/46/commits to fix CI.

pevik commented 2 years ago

Ah, I overlooked sh_stop does not exists, it was ssh_stop.

metan-ucw commented 2 years ago

Looking at the code it may not be mistake at all.

Notice that both ssh_start and sh_start does set self->{$pid} so stopping a shell backend by running exit command and then waitpid on the $pid looks like it may work actually. Unfortunately I no longer remember if this was a design or if it works by accident.

pevik commented 2 years ago

OK, up to you.

Could you please cherry-pick and merge the first commit which fixes CI? (in case somebody tries to send PR it'd be good CI is working well).

cfconrad commented 2 years ago

Only that this line https://github.com/metan-ucw/runltp-ng/blob/master/backend.pm#L559 will produce a Use of uninitialized value $user in string eq at warning.

I would be for creating the sh_stop() and simply call the exit.