|
|
64591e7 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
64591e7 |
#
|
|
|
64591e7 |
# Description: memfd_create test
|
|
|
64591e7 |
# Author: Shu Wang <shuwang@redhat.com>
|
|
|
64591e7 |
#
|
|
|
64591e7 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
64591e7 |
#
|
|
|
64591e7 |
# Copyright (c) 2016 Red Hat, Inc.
|
|
|
64591e7 |
#
|
|
|
64591e7 |
# This program is free software: you can redistribute it and/or
|
|
|
64591e7 |
# modify it under the terms of the GNU General Public License as
|
|
|
64591e7 |
# published by the Free Software Foundation, either version 2 of
|
|
|
64591e7 |
# the License, or (at your option) any later version.
|
|
|
64591e7 |
#
|
|
|
64591e7 |
# This program is distributed in the hope that it will be
|
|
|
64591e7 |
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
|
|
64591e7 |
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
64591e7 |
# PURPOSE. See the GNU General Public License for more details.
|
|
|
64591e7 |
#
|
|
|
64591e7 |
# You should have received a copy of the GNU General Public License
|
|
|
64591e7 |
# along with this program. If not, see http://www.gnu.org/licenses/.
|
|
|
64591e7 |
#
|
|
|
64591e7 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
64591e7 |
TENV=_env
|
|
|
64591e7 |
ifeq ($(PKG_TOP_DIR),)
|
|
|
64591e7 |
export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \
|
|
|
64591e7 |
[ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done)
|
|
|
64591e7 |
export _TOP_DIR := $(shell p=$$PWD; while :; do \
|
|
|
64591e7 |
[ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done)
|
|
|
64591e7 |
-include $(PKG_TOP_DIR)/env.mk
|
|
|
64591e7 |
endif
|
|
|
64591e7 |
include $(TENV)
|
|
|
64591e7 |
ifeq ($(_TOP_DIR),)
|
|
|
64591e7 |
_TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE)
|
|
|
64591e7 |
endif
|
|
|
64591e7 |
|
|
|
64591e7 |
export TESTVERSION=1.0
|
|
|
64591e7 |
|
|
|
64591e7 |
BUILT_FILES=
|
|
|
64591e7 |
|
|
|
64591e7 |
FILES=$(METADATA) runtest.sh Makefile PURPOSE _env t_get_seals.c t_memfd_create.c
|
|
|
64591e7 |
|
|
|
64591e7 |
.PHONY: all install download clean
|
|
|
64591e7 |
|
|
|
64591e7 |
run: $(FILES) build
|
|
|
64591e7 |
./runtest.sh
|
|
|
64591e7 |
|
|
|
64591e7 |
build: $(BUILT_FILES)
|
|
|
64591e7 |
test -x runtest.sh || chmod a+x runtest.sh
|
|
|
64591e7 |
|
|
|
64591e7 |
clean:
|
|
|
64591e7 |
rm -f *~ $(BUILT_FILES)
|
|
|
64591e7 |
|
|
|
64591e7 |
|
|
|
64591e7 |
include /usr/share/rhts/lib/rhts-make.include
|
|
|
64591e7 |
|
|
|
64591e7 |
$(METADATA): Makefile
|
|
|
64591e7 |
@echo "Owner: Shu Wang <shuwang@redhat.com>" > $(METADATA)
|
|
|
64591e7 |
@echo "Name: $(TEST)" >> $(METADATA)
|
|
|
64591e7 |
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
|
|
64591e7 |
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
|
|
64591e7 |
@echo "Description: Test for memfd_create syscall." >> $(METADATA)
|
|
|
64591e7 |
@echo "Type: Function" >> $(METADATA)
|
|
|
64591e7 |
@echo "TestTime: 20m" >> $(METADATA)
|
|
|
64591e7 |
@echo "RunFor: kernel" >> $(METADATA)
|
|
|
64591e7 |
@echo "Priority: Normal" >> $(METADATA)
|
|
|
64591e7 |
@echo "License: GPLv2+" >> $(METADATA)
|
|
|
64591e7 |
@echo "Confidential: no" >> $(METADATA)
|
|
|
64591e7 |
@echo "Destructive: no" >> $(METADATA)
|
|
|
64591e7 |
rhts-lint $(METADATA)
|