Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[guest-test] New Test: add tdx guest mem ebizzy func and unaccepted mem accept time TCs #142

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions guest-test/guest.test_executor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,56 @@ case "$TESTCASE" in
guest_tsm_attest "tsm.get_quote.negative" || \
die "Failed on $TESTCASE"
;;
TD_MEM_EBIZZY_FUNC)
guest_test_prepare tdx/tdx_mem_test.sh
guest_test_source_code tdx/tdx_ebizzy_test_suite ebizzy || \
{ die "Failed to prepare guest test source code of tdx_ebizzy_test_suite"; return 1; }
guest_test_entry tdx_mem_test.sh "-t EBIZZY_FUNC" || \
{ die "Failed on $TESTCASE tdx_mem_test.sh -t EBIZZY_FUNC"; return 1; }
if [[ $GCOV == "off" ]]; then
guest_test_close
fi
;;
TD_MEM_ACCEPT_TIME_4G)
guest_test_prepare tdx/tdx_mem_test.sh
guest_test_entry tdx_mem_test.sh "-t MEM_ACCEPT_TIME_4G" || \
{ die "Failed on $TESTCASE tdx_mem_test.sh -t MEM_ACCEPT_TIME_4G"; return 1; }
if [[ $GCOV == "off" ]]; then
guest_test_close
fi
;;
TD_MEM_ACCEPT_TIME_16G)
guest_test_prepare tdx/tdx_mem_test.sh
guest_test_entry tdx_mem_test.sh "-t MEM_ACCEPT_TIME_16G" || \
{ die "Failed on $TESTCASE tdx_mem_test.sh -t MEM_ACCEPT_TIME_16G"; return 1; }
if [[ $GCOV == "off" ]]; then
guest_test_close
fi
;;
TD_MEM_ACCEPT_TIME_32G)
guest_test_prepare tdx/tdx_mem_test.sh
guest_test_entry tdx_mem_test.sh "-t MEM_ACCEPT_TIME_32G" || \
{ die "Failed on $TESTCASE tdx_mem_test.sh -t MEM_ACCEPT_TIME_32G"; return 1; }
if [[ $GCOV == "off" ]]; then
guest_test_close
fi
;;
TD_MEM_ACCEPT_TIME_64G)
guest_test_prepare tdx/tdx_mem_test.sh
guest_test_entry tdx_mem_test.sh "-t MEM_ACCEPT_TIME_64G" || \
{ die "Failed on $TESTCASE tdx_mem_test.sh -t MEM_ACCEPT_TIME_64G"; return 1; }
if [[ $GCOV == "off" ]]; then
guest_test_close
fi
;;
TD_MEM_ACCEPT_TIME_96G)
guest_test_prepare tdx/tdx_mem_test.sh
guest_test_entry tdx_mem_test.sh "-t MEM_ACCEPT_TIME_96G" || \
{ die "Failed on $TESTCASE tdx_mem_test.sh -t MEM_ACCEPT_TIME_96G"; return 1; }
if [[ $GCOV == "off" ]]; then
guest_test_close
fi
;;
:)
test_print_err "Must specify the test scenario option by [-t]"
usage && exit 1
Expand Down
1 change: 1 addition & 0 deletions guest-test/tdx/tdx_ebizzy_test_suite/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ebizzy
22 changes: 22 additions & 0 deletions guest-test/tdx/tdx_ebizzy_test_suite/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# MakeFile function :: MakeFile for tdx_ebizzy_test_suite

CC := gcc

VAR_CFLAGS := $(shell pkg-config --cflags libtracefs 2>/dev/null)
VAR_LDLIBS := $(shell pkg-config --libs libtracefs 2>/dev/null)

CFLAGS += -static -Wall -Wextra -g -O2 $(VAR_CFLAGS)
LDFLAGS += -lpthread $(VAR_LDLIBS)
INCLUDES = -I include

#List of source files- Update this on adding a new C file
SOURCES := \
ebizzy.c \

MAKE_TARGETS := ebizzy

tdx_guest_test:
$(CC) $(CFLAGS) $(LDFLAGS) -o ${MAKE_TARGETS} ${INCLUDES} ${SOURCES}

clean:
rm -rf ${MAKE_TARGETS}
Loading
Loading