Repository: jinengandhi-intel/graphene_local_ci
Pull request #444: Skipping LTP tests for centos
Author: login: KiranSukhavasi
Created: 2025-04-22T08:37:20Z | Merged: 2025-04-23T01:41:03Z



Diff:
diff --git a/ci/lib/stage-test-direct.jenkinsfile b/ci/lib/stage-test-direct.jenkinsfile
index 6c195f75..e62eae81 100644
--- a/ci/lib/stage-test-direct.jenkinsfile
+++ b/ci/lib/stage-test-direct.jenkinsfile
@@ -5,34 +5,34 @@ stage('test-direct') {
             cut -d':' -f1 | \
             xargs -L1 .ci/check-rwx.py
     '''
-
-    try {
-        timeout(time: 30, unit: 'MINUTES') {
-            sh '''
-                cd libos/test/ltp
-                make ${MAKEOPTS} -f Makefile.LTP all
-            '''
-            // Run tests in a separate block, so that Jenkins measures build time and run time
-            // separately
-            sh '''
-                cd libos/test/ltp
-                python3 -m pytest -v  --junit-xml=ltp.xml
-            '''
-            /*
-            sh '''
-                cd libos/shim/test/ltp
-                export CFG=ltp-sudo-syscalls.cfg
-                export LTPSCENARIO=$PWD/install/runtest/syscalls-sudo
-                make -f Makefile.LTP ltp_results_2.xml LTPCFG=$CFG LTPTESTFILE=$LTPSCENARIO
-            '''
-            */
+    if (!env.os_release_id.contains("centos")) {
+        try {
+            timeout(time: 30, unit: 'MINUTES') {
+                sh '''
+                    cd libos/test/ltp
+                    make ${MAKEOPTS} -f Makefile.LTP all
+                '''
+                // Run tests in a separate block, so that Jenkins measures build time and run time
+                // separately
+                sh '''
+                    cd libos/test/ltp
+                    python3 -m pytest -v  --junit-xml=ltp.xml
+                '''
+                /*
+                sh '''
+                    cd libos/shim/test/ltp
+                    export CFG=ltp-sudo-syscalls.cfg
+                    export LTPSCENARIO=$PWD/install/runtest/syscalls-sudo
+                    make -f Makefile.LTP ltp_results_2.xml LTPCFG=$CFG LTPTESTFILE=$LTPSCENARIO
+                '''
+                */
+            }
+        } catch (Exception e) {
+        } finally {
+            archiveArtifacts 'libos/test/ltp/ltp.xml'
+            junit 'libos/test/ltp/ltp.xml'
         }
-    } catch (Exception e) {
-    } finally {
-        archiveArtifacts 'libos/test/ltp/ltp.xml'
-        junit 'libos/test/ltp/ltp.xml'
     }
-
     try {
         timeout(time: 5, unit: 'MINUTES') {
             sh '''
diff --git a/ci/lib/stage-test-sgx.jenkinsfile b/ci/lib/stage-test-sgx.jenkinsfile
index f8df2a40..f37e8e98 100644
--- a/ci/lib/stage-test-sgx.jenkinsfile
+++ b/ci/lib/stage-test-sgx.jenkinsfile
@@ -14,34 +14,34 @@ stage('test-sgx') {
             .ci/check-no-syscall.sh "$GRAMINE_PKGLIBDIR"/runtime/musl/libc.so
         fi
     '''
-
-    try {
-        timeout(time: 60, unit: 'MINUTES') {
-            sh '''
-                cd libos/test/ltp
-                make ${MAKEOPTS} -f Makefile.LTP SGX=1 all
-            '''
-            // Run tests in a separate block, so that Jenkins measures build time and run time
-            // separately
-            sh '''
-                cd libos/test/ltp
-                python3 -m pytest -v  --junit-xml=ltp-sgx.xml
-            '''
-            /*
-            sh '''
-                cd LibOS/shim/test/ltp
-                export CFG=ltp-sudo-syscalls.cfg
-                export LTPSCENARIO=$PWD/install-sgx/runtest/syscalls-sudo
-                make -f Makefile.LTP ltp-sgx_results_2.xml LTPCFG=$CFG LTPTESTFILE=$LTPSCENARIO
-            '''
-            */
+    if (!env.os_release_id.contains("centos")) {
+        try {
+            timeout(time: 60, unit: 'MINUTES') {
+                sh '''
+                    cd libos/test/ltp
+                    make ${MAKEOPTS} -f Makefile.LTP SGX=1 all
+                '''
+                // Run tests in a separate block, so that Jenkins measures build time and run time
+                // separately
+                sh '''
+                    cd libos/test/ltp
+                    python3 -m pytest -v  --junit-xml=ltp-sgx.xml
+                '''
+                /*
+                sh '''
+                    cd LibOS/shim/test/ltp
+                    export CFG=ltp-sudo-syscalls.cfg
+                    export LTPSCENARIO=$PWD/install-sgx/runtest/syscalls-sudo
+                    make -f Makefile.LTP ltp-sgx_results_2.xml LTPCFG=$CFG LTPTESTFILE=$LTPSCENARIO
+                '''
+                */
+            }
+        } catch (Exception e) {
+        } finally {
+            archiveArtifacts 'libos/test/ltp/ltp-sgx.xml'
+            junit 'libos/test/ltp/ltp-sgx.xml'
         }
-    } catch (Exception e) {
-    } finally {
-        archiveArtifacts 'libos/test/ltp/ltp-sgx.xml'
-        junit 'libos/test/ltp/ltp-sgx.xml'
     }
-
     try{
         timeout(time: (env.EDMM ? 120 : 10), unit: 'MINUTES') {
             sh '''


Reviews:
user: login: anjalirai-intel
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-22T08:40:53Z
user: login: KiranSukhavasi
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-22T08:51:18Z
user: login: KiranSukhavasi
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-22T08:51:24Z
user: login: SSWAMIN1SSS
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-04-22T08:52:22Z
user: login: anjalirai-intel
body: Can you attach some jenkins runs with this branch/commit
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-04-22T08:54:42Z

Review comments:
diff_hunk: @@ -5,34 +5,37 @@ stage('test-direct') {
             cut -d':' -f1 | \
             xargs -L1 .ci/check-rwx.py
     '''
-
-    try {
-        timeout(time: 30, unit: 'MINUTES') {
-            sh '''
-                cd libos/test/ltp
-                make ${MAKEOPTS} -f Makefile.LTP all
-            '''
-            // Run tests in a separate block, so that Jenkins measures build time and run time
-            // separately
-            sh '''
-                cd libos/test/ltp
-                python3 -m pytest -v  --junit-xml=ltp.xml
-            '''
-            /*
-            sh '''
-                cd libos/shim/test/ltp
-                export CFG=ltp-sudo-syscalls.cfg
-                export LTPSCENARIO=$PWD/install/runtest/syscalls-sudo
-                make -f Makefile.LTP ltp_results_2.xml LTPCFG=$CFG LTPTESTFILE=$LTPSCENARIO
-            '''
-            */
+    if (env.os_release_id.contains("centos")) {
path: ci/lib/stage-test-direct.jenkinsfile
user: login: anjalirai-intel
body: Use negation here, https://github.com/jinengandhi-intel/graphene_local_ci/blob/master/ci/lib/stage-test-examples.jenkinsfile#L73
created_at: 2025-04-22T08:39:37Z
author_association: COLLABORATOR
diff_hunk: @@ -14,34 +14,37 @@ stage('test-sgx') {
             .ci/check-no-syscall.sh "$GRAMINE_PKGLIBDIR"/runtime/musl/libc.so
         fi
     '''
-
-    try {
-        timeout(time: 60, unit: 'MINUTES') {
-            sh '''
-                cd libos/test/ltp
-                make ${MAKEOPTS} -f Makefile.LTP SGX=1 all
-            '''
-            // Run tests in a separate block, so that Jenkins measures build time and run time
-            // separately
-            sh '''
-                cd libos/test/ltp
-                python3 -m pytest -v  --junit-xml=ltp-sgx.xml
-            '''
-            /*
-            sh '''
-                cd LibOS/shim/test/ltp
-                export CFG=ltp-sudo-syscalls.cfg
-                export LTPSCENARIO=$PWD/install-sgx/runtest/syscalls-sudo
-                make -f Makefile.LTP ltp-sgx_results_2.xml LTPCFG=$CFG LTPTESTFILE=$LTPSCENARIO
-            '''
-            */
+    if (env.os_release_id.contains("centos")) {
path: ci/lib/stage-test-sgx.jenkinsfile
user: login: anjalirai-intel
body: Above comment applicable here also
created_at: 2025-04-22T08:40:41Z
author_association: COLLABORATOR
diff_hunk: @@ -5,34 +5,37 @@ stage('test-direct') {
             cut -d':' -f1 | \
             xargs -L1 .ci/check-rwx.py
     '''
-
-    try {
-        timeout(time: 30, unit: 'MINUTES') {
-            sh '''
-                cd libos/test/ltp
-                make ${MAKEOPTS} -f Makefile.LTP all
-            '''
-            // Run tests in a separate block, so that Jenkins measures build time and run time
-            // separately
-            sh '''
-                cd libos/test/ltp
-                python3 -m pytest -v  --junit-xml=ltp.xml
-            '''
-            /*
-            sh '''
-                cd libos/shim/test/ltp
-                export CFG=ltp-sudo-syscalls.cfg
-                export LTPSCENARIO=$PWD/install/runtest/syscalls-sudo
-                make -f Makefile.LTP ltp_results_2.xml LTPCFG=$CFG LTPTESTFILE=$LTPSCENARIO
-            '''
-            */
+    if (env.os_release_id.contains("centos")) {
path: ci/lib/stage-test-direct.jenkinsfile
user: login: KiranSukhavasi
body: updated
created_at: 2025-04-22T08:51:18Z
author_association: COLLABORATOR
diff_hunk: @@ -14,34 +14,37 @@ stage('test-sgx') {
             .ci/check-no-syscall.sh "$GRAMINE_PKGLIBDIR"/runtime/musl/libc.so
         fi
     '''
-
-    try {
-        timeout(time: 60, unit: 'MINUTES') {
-            sh '''
-                cd libos/test/ltp
-                make ${MAKEOPTS} -f Makefile.LTP SGX=1 all
-            '''
-            // Run tests in a separate block, so that Jenkins measures build time and run time
-            // separately
-            sh '''
-                cd libos/test/ltp
-                python3 -m pytest -v  --junit-xml=ltp-sgx.xml
-            '''
-            /*
-            sh '''
-                cd LibOS/shim/test/ltp
-                export CFG=ltp-sudo-syscalls.cfg
-                export LTPSCENARIO=$PWD/install-sgx/runtest/syscalls-sudo
-                make -f Makefile.LTP ltp-sgx_results_2.xml LTPCFG=$CFG LTPTESTFILE=$LTPSCENARIO
-            '''
-            */
+    if (env.os_release_id.contains("centos")) {
path: ci/lib/stage-test-sgx.jenkinsfile
user: login: KiranSukhavasi
body: updated
created_at: 2025-04-22T08:51:24Z
author_association: COLLABORATOR

PR comments:
user: login: KiranSukhavasi
created_at: 2025-04-22T09:28:44Z
body: sure Anjali
author_association: COLLABORATOR
user: login: KiranSukhavasi
created_at: 2025-04-22T11:27:41Z
body: http://10.99.116.103:8080/job/Kiran_Test_CentOS_SKIP_LTP/2/consoleFull 
author_association: COLLABORATOR