Date: Thu, 22 Mar 2018 11:49:21 GMT From: Anton Shterenlikht <as@cmplx.uk> To: freebsd-ports@freebsd.org Subject: how to run "make test" as an unprivileged user? Message-ID: <201803221149.w2MBnL8H063864@jail0199.vps.exonetric.net>
next in thread | raw e-mail | index | archive | help
I'm the maintainer of lang/opencoarrays. When the port is built with OpenMPI or OpenMPI2, I cannot run "make test", because their mpiexec thinks it's unsafe: Script started on Thu Mar 22 11:41:05 2018 Command: ctest -VV UpdateCTestConfiguration from :/usr/ports/lang/opencoarrays/work/.build/DartConfiguration.tcl UpdateCTestConfiguration from :/usr/ports/lang/opencoarrays/work/.build/DartConfiguration.tcl Test project /usr/ports/lang/opencoarrays/work/.build Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 1 Start 1: initialize_mpi 1: Test command: /usr/local/bin/bash "/usr/ports/lang/opencoarrays/work/.build/bin/cafrun" "-np" "2" "--hostfile" "/usr/ports/lang/opencoarrays/work/.build/hostfile" "/usr/ports/lang/opencoarrays/work /.build/bin/OpenCoarrays-2.0.0-tests/initialize_mpi" 1: Test timeout computed to be: 9.99988e+06 1: -------------------------------------------------------------------------- 1: mpiexec has detected an attempt to run as root. 1: Running at root is *strongly* discouraged as any mistake (e.g., in 1: defining TMPDIR) or bug can result in catastrophic damage to the OS 1: file system, leaving your system in an unusable state. 1: 1: You can override this protection by adding the --allow-run-as-root 1: option to your cmd line. However, we reiterate our strong advice 1: against doing so - please do so at your own risk. 1: -------------------------------------------------------------------------- This is from running ctest directly under work/.build, so that I can pass it verbose flags. I can do "chown -R user:user work", where user is some unprivileged user, and then the tests do run, but I'm not sure it will always work. There must be a better way. I recall that one of the arguments for staging was that it will make is easier to build ports as unprivileged user. So maybe this has been already implemented in the ports tree? I'd rather not reinvent it. Thanks Anton
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803221149.w2MBnL8H063864>