Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert more tests to sharness #109

Merged
merged 9 commits into from
Jan 31, 2024
Merged

Conversation

garlick
Copy link
Member

@garlick garlick commented Jan 30, 2024

More test conversions!

Copy link
Member

@chu11 chu11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, just small stuff.

printf "unknown: %s\n" $3
}

# This config was adapted from the actual seirra config, where chassis
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo sierra

@@ -82,7 +82,7 @@ redfish_httppower_LDADD = $(common_ldadd)
check_DATA = \
mcr.conf \
t53.conf t54.conf t55.conf t60.conf \
t62.conf t63.conf test4.conf test.conf
t63.conf test4.conf test.conf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like redfish.dev got moved to redfish-supermicro.dev but this test just wasn't updated. Could revive? We do distribute redfish-supermicro.dev still, even though redfishpower stuff has supplanted it.

t/Makefile.am Outdated
@@ -34,7 +34,8 @@ TESTSCRIPTS = \
t0022-bashfun.t \
t0023-sun-microsystems-ilom.t \
t0024-freeipmi.t \
t0025-openbmc.t
t0025-openbmc.t \
t0026-llnl-sierra-cluster.t
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message typo “simlulator”

@@ -29,7 +29,9 @@ TESTSCRIPTS = \
t0017-icebox-v2.t \
t0018-cyclades-pm.t \
t0019-insteon-plm.t \
t0020-digital-loggers-lpc.t
t0020-digital-loggers-lpc.t \
t0021-remote-powerman.t \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added t0021 in wrong commit?

makeoutput "" "t[0-7]" "" >query3.exp &&
test_cmp query3.exp query3.out
'
test_expect_success 'powerman -1 t[0-1] works' '
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a huge deal, but is this supposed to be turn all on and later all off. That's the pattern of most tests.

cat >powerman.conf <<-EOT
listen "$testaddr"
include "$powermandev"
device "p0" "powerman" "$powermand --stdio -c rpowerman.conf -f |&"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily for this PR but --stdio not clear of purpose. Not in manpage.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #110

@garlick garlick mentioned this pull request Jan 31, 2024
Problem: test/t42 and t43 cover the Data Loggers Inc LPC device
using old test infrastructure.

Convert the single-device test to sharness.
Drop the multi-device test as this is not really adding coverage.

Remove the old test scripts and data.
Problem: test/t35 and t36 cover using a remote powermand
as a power controller using old test infrastructure.

Convert t35 to sharness.
Don't bother converting t36 since all it does is rename the plugs,
which is a general powerman feature not related to this device.

Remove the old test scripts and data.
Problem: test/50 covers the bashfun demo using old test infrastructure.

Convert t50 to sharness.

Remove the old test scripts and data.
Problem: test/t44 and t51 cover the Sun Microsystems LOM and
ILOM devices using old test infrastructure.

Convert these tests to sharness.
Instead of two separate tests, combine them in one.

Remove the old test scripts and data.
Problem: test/t47 covers the FreeIPMI ipmipower device
using old test infrastructure.

Convert this test to sharness.

Remove the old test scripts and data.
Problem: test/t61 covers the OpenBMC (via httppower) device
using old test infrastructure.

Convert this test to sharness.

Remove the old test scripts and data.
Problem: all tests listed in test/README have been migrated to
sharness.

Drop test/README.
Problem: test/t52 covers the llnl sierra cluster config
using old test infrastructure, and without actally doing much.

Convert this test to sharness.

Fix the swpdu.c simulator to return the status response expected
by swpdu.dev and add actual power actions to the test.

Remove the old test scripts and data.
Problem: test/t62 covers the redfish-supermicro device
using old test infrastructure.

The test had some problems:
- the config referenced a renamed device script (redfish.dev)
- the redfish-httppower simulator expected "put" not "post"
- t62 set TEST=t61 so the t62 test was not actually being run

Convert this test to sharness, addressing those issues.

Remove the old test scripts and data.
Copy link
Member

@chu11 chu11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes LGTM

@garlick
Copy link
Member Author

garlick commented Jan 31, 2024

Thanks!

@mergify mergify bot merged commit 78ccffd into chaos:master Jan 31, 2024
8 checks passed
@garlick garlick deleted the sharness_conv5 branch January 31, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants