Skip to content

Commit

Permalink
gard: Add support to run gard tests on FSP platform
Browse files Browse the repository at this point in the history
gard tool is not supported on FSP based system. But we can still
run gard tests on FSP based system.

Acked-by: Stewart Smith <stewart@flamingspork.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
Vasant Hegde authored and oohal committed Oct 22, 2019
1 parent a0c996e commit 49be337
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions external/gard/gard.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,12 +821,6 @@ int main(int argc, char **argv)
memset(ctx, 0, sizeof(*ctx));
memset(&blank_record, 0xff, sizeof(blank_record));

if (is_fsp()) {
fprintf(stderr, "This is the OpenPower gard tool which does "
"not support FSP systems\n");
return EXIT_FAILURE;
}

/* process global options */
for (;;) {
int c;
Expand Down Expand Up @@ -866,6 +860,12 @@ int main(int argc, char **argv)
}


if (is_fsp() && !filename) {
fprintf(stderr, "This is the OpenPower gard tool which does "
"not support FSP systems\n");
return EXIT_FAILURE;
}


/*
* It doesn't make sense to specify that we have the gard partition but
Expand Down
5 changes: 5 additions & 0 deletions external/gard/test/tests/02-usage
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#! /bin/sh

# This test fails on FSP based system. Hence skip this test.
if [ -d "/proc/device-tree/fsps" ] ; then
return 0
fi

run_binary "./opal-gard"
if [ "$?" -ne 1 ] ; then
fail_test
Expand Down

0 comments on commit 49be337

Please sign in to comment.