spacewander commented on code in PR #8074:
URL: https://github.com/apache/apisix/pull/8074#discussion_r995349466
##########
t/cli/test_main.sh:
##########
@@ -446,13 +446,13 @@ git checkout conf/config.yaml
make init
-grep -E "worker_cpu_affinity" conf/nginx.conf > /dev/null
-if [ ! $? -eq 0 ]; then
- echo "failed: nginx.conf file is missing worker_cpu_affinity configuration"
+count=`grep -c "worker_cpu_affinity" conf/nginx.conf || true`
+if [ $count -ne 0 ]; then
+ echo "failed: nginx.conf file found worker_cpu_affinity when disable it"
Review Comment:
```suggestion
echo "failed: nginx.conf file found worker_cpu_affinity when disabling
it"
```
##########
t/cli/test_main.sh:
##########
@@ -446,13 +446,13 @@ git checkout conf/config.yaml
make init
-grep -E "worker_cpu_affinity" conf/nginx.conf > /dev/null
-if [ ! $? -eq 0 ]; then
- echo "failed: nginx.conf file is missing worker_cpu_affinity configuration"
+count=`grep -c "worker_cpu_affinity" conf/nginx.conf || true`
+if [ $count -ne 0 ]; then
+ echo "failed: nginx.conf file found worker_cpu_affinity when disable it"
exit 1
fi
-echo "passed: nginx.conf file contains worker_cpu_affinity configuration"
+echo "passed: nginx.conf file disable cpu affinity"
Review Comment:
```suggestion
echo "passed: nginx.conf file disables cpu affinity"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]