Bug 635 - branch conditional unit (ctr) test failure
Summary: branch conditional unit (ctr) test failure
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Linux
: High blocker
Assignee: Luke Kenneth Casson Leighton
URL:
Depends on:
Blocks:
 
Reported: 2021-04-30 01:33 BST by Luke Kenneth Casson Leighton
Modified: 2021-04-30 11:26 BST (History)
3 users (show)

See Also:
NLnet milestone: ---
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation:
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments
get branch test running (14.83 KB, patch)
2021-04-30 11:09 BST, Luke Kenneth Casson Leighton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2021-04-30 01:33:58 BST
AssertionError: 0 != 2163462288 : int reg 0 not equal 'bc 16, 23, 23792'

case_bc_ctr
regs [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
sprs {9: SelectableInt(value=0x80f3d090, bits=64)}
cr 2289399665
mem {}
msr 0
assem bc 16, 23, 23792
Comment 1 Luke Kenneth Casson Leighton 2021-04-30 01:50:06 BST
ah.

i went back as far as this:

  git checkout 2e6d284

and the bug's still there.  needs urgent investigation.
Comment 2 Jacob Lifshay 2021-04-30 03:16:24 BST
Idk if it will help much, but before I got all mixed up in fixing build scripts, I tested ceaccd7654256c46dfb208fc8e1d785f45ad052d
and, assuming I ran the right test, it works!
Comment 3 Cesar Strauss 2021-04-30 10:45:37 BST
The whole branch test was commented-out for a long time, so it wasn't being run. It was commented-in very recently.
Try "git log -p src/soc/simple/test/test_issuer.py" to see it.
Comment 4 Cesar Strauss 2021-04-30 10:53:21 BST
(In reply to Cesar Strauss from comment #3)
> The whole branch test was commented-out for a long time, so it wasn't being
> run. It was commented-in very recently.
> Try "git log -p src/soc/simple/test/test_issuer.py" to see it.

More precisely, some tests were commented-out here:
https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=a33622f1bd8405aea675d44aa204385ba664caaf

Note that the Branch test was already commented-out.

Then here, it was commented-in along with the others.

https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=d35789291066f88794dae477a9f4a6aa993962e2
Comment 5 Luke Kenneth Casson Leighton 2021-04-30 11:09:30 BST
Created attachment 132 [details]
get branch test running

i've gone back to e52937, it requires manual patching to enable the
Branch unit tests.

these were commented out from TestIssuer in order to save time.
Branch unit tests were not converted over to a common format during
a reorganisation.  they still work - they're just not quite the
same.

however this shows up *different* failures (which do not show
up in the current master branch)

FAIL: run_all (soc.simple.test.test_runner.TestRunner) [case_bc_reg]
FAIL: run_all (soc.simple.test.test_runner.TestRunner) [case_bc_microwatt_2_regression]

this is probably going to have to be investigated the hard way.
Comment 6 Luke Kenneth Casson Leighton 2021-04-30 11:11:44 BST
that's interesting.  neither Branch test_pipe_caller.py nor
fu/compunits/test/test_branch_compunit.py exhibit the failure.
something else is going on.
Comment 7 Luke Kenneth Casson Leighton 2021-04-30 11:26:12 BST
https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=efebdc90f6872a43a91e8a30bebf072a180bc827

whew, thank goodness - turned out to be very simple: the unit
test setup function introduced a bug last week, when initialising
the SPR regfile the initial values were accidentally put into
the INT regfile due to a cut/paste error.