Loading
test/scheduler: Make sure stderr is not O_TRUNCated in move_proc()
Since we are not dup'ing stdout in this case but rather explicitly point at a file we want to write to, we need to make sure said file is not suddenly truncated. In case foo.sh attempts to call to move_proc() and is executed like so: foo.sh >bar.log 2>&1 the redirection to /dev/stderr will cause bar.log to be truncated. This is actually seen under CI after 8571999d got merged as it removed the SILENT_CGROUP_DEBUG silencer - it causes the build.log to suddenly drop the trace until remaining tests are finished. (this happens as jenkins redirects both std{out,err} to a regular file in a similar fashion). This can be simply missed when running these tests with std{out,err} attached to a terminal (as O_TRUNC is ignored there), and so it unfortunately was while working on the aforementioned commit. Change-Id: I9d2d5ab87151c3653b0e162aa72b1409418f6fc3 Signed-off-by:Michal Berger <michal.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22967 Reviewed-by:
Karol Latecki <karol.latecki@intel.com> Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by:
Pawel Piatek <pawelx.piatek@intel.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Kamil Godzwon <kamilx.godzwon@intel.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com>