>>>>> Starting test022-ppolicy for mdb... running defines.sh Starting slapd on TCP/IP port 9011... Using ldapsearch to check that slapd is running... Testing redundant ppolicy instance... Using ldapadd to populate the database... Testing account lockout... Waiting 13 seconds for lockout to reset... Testing password expiration Waiting seconds for password to expire... sleep: missing operand Try 'sleep --help' for more information. Password expiration test failed >>>>> test022-ppolicy failed for mdb after 43 seconds (exit 1) The issue here is apparently that line 122-123 failed to populate the DELAY variable. 121 122 DELAY=`$LDAPSEARCH -D "$MANAGERDN" -H $URI1 -w $PASSWD \ 123 -b "$USER" -E accountUsability 1.1 | sed -n -e 's/.*expire=\(\d*\)/\1/p'` 124 125 echo "Testing password expiration" 126 echo "Waiting $DELAY seconds for password to expire..." 127 sleep $DELAY 128 sleep 1
If you add a "tee -a $TESTOUT", what is the output of ldapsearch here? Might be a legitimate failure for all we know ;)
Script changed to save the output from $LDAPSEARCH so it can be examined in case of failures. https://git.openldap.org/openldap/openldap/-/merge_requests/431
• f07f8c20 by Howard Chu at 2021-11-01T17:15:05+00:00 ITS#9718 test022: preserve DELAY search output
RE26: fce2a2d2 by Howard Chu at 2021-11-01T19:54:44+00:00 ITS#9718 test022: preserve DELAY search output
This commit broke test022 on BSD OSes as it uses non portable SED syntax: Running ./scripts/test022-ppolicy for mdb... running defines.sh Starting slapd on TCP/IP port 9011... Using ldapsearch to check that slapd is running... Testing redundant ppolicy instance... Using ldapadd to populate the database... Testing account lockout... sed: 1: "s/.*seconds_before_unlo ...": RE error: trailing backslash (\) ldapsearch failed (49)!
head: • b220ba10 by Quanah Gibson-Mount at 2023-01-30T22:06:06+00:00 ITS#9718 - Fix nonportable sed usage RE26: • cc5d35f8 by Quanah Gibson-Mount at 2023-01-30T22:59:19+00:00 ITS#9718 - Fix nonportable sed usage RE25: • 0d8122cd by Quanah Gibson-Mount at 2023-01-30T23:00:30+00:00 ITS#9718 - Fix nonportable sed usage