anitazha / rpms / ndctl

Forked from rpms/ndctl 2 years ago
Clone
0dc130
ndtest/ack-shutdown-count: Skip the test on ndtest
0dc130
0dc130
BZ: 
0dc130
Brew: 
0dc130
0dc130
commit 6e85cac1958f920f231b94ff570ac0e434595b7d
0dc130
Author: Shivaprasad G Bhat <sbhat@linux.ibm.com>
0dc130
Date:   Tue Jan 25 02:34:25 2022 +0530
0dc130
0dc130
    ndtest/ack-shutdown-count: Skip the test on ndtest
0dc130
    
0dc130
    The PAPR has non-latched dirty shutdown implementation.
0dc130
    The test is enabling/disabling the LSS latch which is
0dc130
    irrelavent from PAPR pov. Skip the test.
0dc130
    
0dc130
    Link: https://lore.kernel.org/r/20220124210425.1493410-1-vaibhav@linux.ibm.com
0dc130
    Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
0dc130
    Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
0dc130
0dc130
diff --git a/test/ack-shutdown-count-set.c b/test/ack-shutdown-count-set.c
0dc130
index a9e95c6..f091a40 100644
0dc130
--- a/test/ack-shutdown-count-set.c
0dc130
+++ b/test/ack-shutdown-count-set.c
0dc130
@@ -117,6 +117,7 @@ static int test_ack_shutdown_count_set(int loglevel, struct ndctl_test *test,
0dc130
 
0dc130
 int main(int argc, char *argv[])
0dc130
 {
0dc130
+	char *test_env = getenv("NDCTL_TEST_FAMILY");
0dc130
 	struct ndctl_test *test = ndctl_test_new(0);
0dc130
 	struct ndctl_ctx *ctx;
0dc130
 	int rc;
0dc130
@@ -126,6 +127,9 @@ int main(int argc, char *argv[])
0dc130
 		return EXIT_FAILURE;
0dc130
 	}
0dc130
 
0dc130
+	if (test_env && strcmp(test_env, "PAPR") == 0)
0dc130
+		return ndctl_test_result(test, 77);
0dc130
+
0dc130
 	rc = ndctl_new(&ctx;;
0dc130
 	if (rc)
0dc130
 		return ndctl_test_result(test, rc);