SQLite Forum

Test ext/session/sessionrebase.test:2.1.1 fails on HPPA architecture
Login

Test ext/session/sessionrebase.test:2.1.1 fails on HPPA architecture

(1) By Arfrever Frehtes Taifersar Arahesis (Arfrever) on 2020-10-21 18:58:59 [link]

Test ext/session/sessionrebase.test:2.1.1 fails on HPPA architecture.
This problem was not reported on any other architecture.

Original bug report: https://bugs.gentoo.org/658912

I do not have many ideas, but one thing which is different on HPPA than almost all other architectures is that stack grows up, instead of down.

Output of test suite:

```
...
./testfixture: wrong # args: should be "R rebase CHANGESET"
    while executing
"R delete"
    (procedure "do_rebase_test" line 55)
    invoked from within
"do_rebase_test 2.1.1 {
  UPDATE t1 SET b = 'two.1' WHERE a=2
} {
  UPDATE t1 SET b = 'two.2' WHERE a=2;
} {
  OMIT
} { SELECT * FROM t1 } {1 one 2 two..."
    (file "/var/tmp/portage/dev-db/sqlite-3.33.0/work/sqlite-src-3330000-.hppa/test/../ext/session/sessionrebase.test" line 238)
    invoked from within
"source /var/tmp/portage/dev-db/sqlite-3.33.0/work/sqlite-src-3330000-.hppa/test/../ext/session/sessionrebase.test"
    invoked from within
"interp eval tinterp $script"
    (procedure "slave_test_script" line 30)
    invoked from within
"slave_test_script [list source $zFile] "
    invoked from within
"time { slave_test_script [list source $zFile] }"
    (procedure "slave_test_file" line 23)
    invoked from within
"slave_test_file $file"
    (procedure "run_tests" line 19)
    invoked from within
"run_tests veryquick -presql {} -files {shared3.test writecrash.test vacuum5.test func4.test tkt3731.test /var/tmp/portage/dev-db/sqlite-3.33.0/work/sq..."
    ("uplevel" body line 1)
    invoked from within
"uplevel run_tests $name $::testspec($name)"
    (procedure "run_test_suite" line 5)
    invoked from within
"run_test_suite veryquick"
    (file "/var/tmp/portage/dev-db/sqlite-3.33.0/work/sqlite-src-3330000-.hppa/test/veryquick.test" line 16)
    invoked from within
"source $argv0"
    invoked from within
"if {[llength $argv]>=1} {
set argv0 [lindex $argv 0]
set argv [lrange $argv 1 end]
source $argv0
} else {
set line {}
while {![eof stdin]} {
if {$line..."
```

(2) By Dan Kennedy (dan) on 2020-10-22 15:38:53 in reply to 1 [link]

This error, from Tcl, doesn't really make sense:

        ./testfixture: wrong # args: should be "R rebase CHANGESET"
            while executing
        "R delete"

Could be a bug in the C code used to bind the sessions module API to Tcl, or could be some problem in Tcl itself. The bug report doesn't say which Tcl version is in use. Do you know how we can find out? 

8.6.8 is a good Tcl version for SQLite testing.

Dan.

(3) By Arfrever Frehtes Taifersar Arahesis (Arfrever) on 2020-10-22 17:13:51 in reply to 2 [link]

Reporter of problem said that he currently has Tcl 8.6.8 installed.

(4) By Arfrever Frehtes Taifersar Arahesis (Arfrever) on 2020-10-22 17:15:41 in reply to 2 [link]

Another HPPA user confirmed problem with Tcl 8.6.9.

(5) By Dan Kennedy (dan) on 2020-10-22 20:23:05 in reply to 3 [link]

Fair enough. Does the command:

        ./testfixture ./ext/session/sessionrebase.test

fail when run by itself?

Assuming so, does:

        valgrind ./testfixture ./ext/session/sessionrebase.test

find any errors in Tcl or SQLite?

Dan.

(6) By Arfrever Frehtes Taifersar Arahesis (Arfrever) on 2020-10-24 21:55:35 in reply to 5 [link]

Yes.

From https://bugs.gentoo.org/658912#c8:
```
./testfixture ./ext/session/sessionrebase.test
sessionrebase-1.0... Ok
sessionrebase-1.1.1... Ok
sessionrebase-1.1.2... Ok
sessionrebase-1.2.1... Ok
sessionrebase-1.2.2... Ok
sessionrebase-1.3.1... Ok
sessionrebase-1.3.2... Ok
sessionrebase-2.1.0... Ok
./testfixture: wrong # args: should be "R rebase CHANGESET"
    while executing
"R delete"
    (procedure "do_rebase_test" line 55)
    invoked from within
"do_rebase_test 2.1.1 {
  UPDATE t1 SET b = 'two.1' WHERE a=2
} {
  UPDATE t1 SET b = 'two.2' WHERE a=2;
} {
  OMIT
} { SELECT * FROM t1 } {1 one 2 two..."
    (file "./ext/session/sessionrebase.test" line 238)
    invoked from within
"source $argv0"
    invoked from within
"if {[llength $argv]>=1} {
set argv0 [lindex $argv 0]
set argv [lrange $argv 1 end]
source $argv0
} else {
set line {}
while {![eof stdin]} {
if {$line..."
```

Valgrind does not support HPPA: https://www.valgrind.org/info/platforms.html

(7) By Dan Kennedy (dan) on 2020-10-26 16:24:19 in reply to 6 [link]

Thanks for testing. Can you try with this patch?

[](https://sqlite.org/src/info/80eba105d6d1b49b)

Thanks,
Dan.

(8) By Arfrever Frehtes Taifersar Arahesis (Arfrever) on 2020-11-13 17:48:29 in reply to 7

Reporter of problem confirmed that this patch works.