anitazha / rpms / ndctl

Forked from rpms/ndctl 2 years ago
Clone

Blame 6e85cac-ndtest-ack-shutdown-count-Skip-the-test-on-ndtest.patch

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