Skip to content

Commit

Permalink
[guest-test] New Test: add tdx guest mem ebizzy func testcase
Browse files Browse the repository at this point in the history
add new testcase based on tdx_ebizzy_test_suite

[Test Components] tdx
[Test Types] func
[Supported Devices] spr,emr,gnr,srf

Signed-off-by: Hongyu Ning <[email protected]>
  • Loading branch information
hongyuni authored and ysun committed Nov 30, 2023
1 parent 189f232 commit c055a76
Show file tree
Hide file tree
Showing 7 changed files with 649 additions and 1 deletion.
10 changes: 10 additions & 0 deletions guest-test/guest.test_executor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@ 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
;;
:)
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

0 comments on commit c055a76

Please sign in to comment.