Commit d1d4c018 authored by Ruslan Kuprieiev's avatar Ruslan Kuprieiev Committed by Pavel Emelyanov

test: rpc: run test as a non-root user

It is nice to have non-root user case covered with tests.
Signed-off-by: 's avatarRuslan Kuprieiev <kupruser@gmail.com>
Reported-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4d705e72
all: test-c rpc_pb2.py
all: test-c rpc_pb2.py criu
.PHONY: all
run: all
mkdir -p build
./run.sh
chmod a+rwx build
sudo -g '#1000' -u '#1000' ./run.sh
criu:
cp ../../criu $@
chmod u+s $@
test-c: rpc.pb-c.o test.o
gcc $^ -o $@ -lprotobuf-c
......@@ -18,5 +23,5 @@ rpc.pb-c.c: rpc.proto
protoc-c --proto_path=. --c_out=. rpc.proto
clean:
rm -rf build rpc.pb-c.o test.o test-c rpc.pb-c.c rpc.pb-c.h rpc_pb2.py rpc_pb2.pyc
rm -rf build rpc.pb-c.o test.o test-c rpc.pb-c.c rpc.pb-c.h rpc_pb2.py rpc_pb2.pyc criu
.PHONY: clean
......@@ -2,7 +2,7 @@
set -e
source ../env.sh || exit 1
CRIU=./criu
export PROTODIR=`readlink -f "${PWD}/../../protobuf"`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment