Project

General

Profile

Developer Request #10013

Переопределение секций в шаблонах

Added by Alexander Protsenko 10 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
Test Engine
Target version:
Start date:
12/25/2019
Due date:
% Done:

0%

Estimated time:
Published in build:
2.5.1-beta-200127

Description

Есть определение секции в базовом шаблоне:

  def pre
    ...
    section_data(:pa => 0x8002_2000, :va => 0x8002_2000) {}
    ...
  end

Чтобы переопределить секцию в шаблоне-потомке надо делать так:

  def pre
    section_data(:pa => 0x8002_8000, :va => 0x8002_8000) {}
    super()
  end

Вариант:
  def pre
    super()
    section_data(:pa => 0x8002_8000, :va => 0x8002_8000) {}
  end

не работает.

Этот нюанс надо либо зафиксировать в документации, либо исправить, если это ошибка.

History

#1

Updated by Alexander Protsenko 10 months ago

Все же ошибка. Но необходимо уточнить: ошибка в шаблоне или инструменте.

java.lang.AssertionError: ********************************************************************************
ATTENTION! An unexpected error has occurred:
java.lang.AssertionError: Warning: Changing section attributes is not allowed: .data [pa=0x0000000080028000, va=0x0000000080028000].

The program will be terminated. Please contact us at: 
microtesk-support@ispras.ru
We are sorry for the inconvenience.

Exception stack:

java.lang.AssertionError: Warning: Changing section attributes is not allowed: .data [pa=0x0000000080028000, va=0x0000000080028000].
    at org.junit.Assert.fail(org/junit/Assert.java:88)
    at ru.ispras.microtesk.model.riscv.RiscVTest.onEventLogged(ru/ispras/microtesk/model/riscv/RiscVTest.java:197)
    at ru.ispras.castle.util.Logger.print(ru/ispras/castle/util/Logger.java:176)
    at ru.ispras.castle.util.Logger.print(ru/ispras/castle/util/Logger.java:169)
    at ru.ispras.castle.util.Logger.warning(ru/ispras/castle/util/Logger.java:70)
    at ru.ispras.microtesk.test.template.Template.checkSectionRedefined(ru/ispras/microtesk/test/template/Template.java:1302)
    at ru.ispras.microtesk.test.template.Template.beginSectionData(ru/ispras/microtesk/test/template/Template.java:1283)
    at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
    at RUBY.section_data(/srv/jenkins/workspace/MicroTESK_RISCV/build/target/lib/ruby/template.rb:900)
    at RUBY.pre(/srv/jenkins/workspace/MicroTESK_RISCV/build/target/arch/riscv/templates/riscv_base.rb:125)
    at RUBY.pre(/srv/jenkins/workspace/MicroTESK_RISCV/build/target/arch/riscv/templates/compliance/rv32uv/rv32v_x_vl32e32m4d1_selfcheck.rb:28)
    at RUBY.generate(/srv/jenkins/workspace/MicroTESK_RISCV/build/target/lib/ruby/template.rb:1007)
    at RUBY.main(/srv/jenkins/workspace/MicroTESK_RISCV/build/target/lib/ruby/microtesk.rb:33)
    at org.jruby.RubyHash.each(org/jruby/RubyHash.java:1342)
    at RUBY.main(/srv/jenkins/workspace/MicroTESK_RISCV/build/target/lib/ruby/microtesk.rb:29)
    at RUBY.(root)(/srv/jenkins/workspace/MicroTESK_RISCV/build/target/lib/ruby/microtesk.rb:52)
    at ru.ispras.microtesk.RubyRunner.run(ru/ispras/microtesk/RubyRunner.java:68)
    at ru.ispras.microtesk.ScriptRunner.run(ru/ispras/microtesk/ScriptRunner.java:43)
    at ru.ispras.microtesk.test.TestEngine.generate(ru/ispras/microtesk/test/TestEngine.java:172)
    at ru.ispras.microtesk.MicroTESK.generate(ru/ispras/microtesk/MicroTESK.java:284)
    at ru.ispras.microtesk.MicroTESK.runTask(ru/ispras/microtesk/MicroTESK.java:131)
    at ru.ispras.microtesk.MicroTESK.main(ru/ispras/microtesk/MicroTESK.java:79)
    at ru.ispras.microtesk.test.testutils.TemplateTest.run(ru/ispras/microtesk/test/testutils/TemplateTest.java:86)
    at ru.ispras.microtesk.model.riscv.RiscVTest.run(ru/ispras/microtesk/model/riscv/RiscVTest.java:224)
    at ru.ispras.microtesk.model.riscv.compliance.Rv32uvTestCase.test(ru/ispras/microtesk/model/riscv/compliance/Rv32uvTestCase.java:30)
    at ru.ispras.microtesk.model.riscv.compliance.Rv32uvTestCase.testVsubVl32e32m4d1(ru/ispras/microtesk/model/riscv/compliance/Rv32uvTestCase.java:51)
    at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(org/junit/runners/model/FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(org/junit/internal/runners/model/ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(org/junit/runners/model/FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(org/junit/internal/runners/statements/InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(org/junit/internal/runners/statements/RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(org/junit/internal/runners/statements/RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(org/junit/runners/ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(org/junit/runners/BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(org/junit/runners/BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(org/junit/runners/ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(org/junit/runners/ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(org/junit/runners/ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(org/junit/runners/ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(org/junit/runners/ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(org/junit/runners/ParentRunner.java:363)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(org/gradle/api/internal/tasks/testing/junit/JUnitTestClassExecutor.java:106)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(org/gradle/api/internal/tasks/testing/junit/JUnitTestClassExecutor.java:58)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(org/gradle/api/internal/tasks/testing/junit/JUnitTestClassExecutor.java:38)
    at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(org/gradle/api/internal/tasks/testing/junit/AbstractJUnitTestClassProcessor.java:66)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(org/gradle/api/internal/tasks/testing/SuiteTestClassProcessor.java:51)
    at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(org/gradle/internal/dispatch/ReflectionDispatch.java:35)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(org/gradle/internal/dispatch/ReflectionDispatch.java:24)
    at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(org/gradle/internal/dispatch/ContextClassLoaderDispatch.java:32)
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(org/gradle/internal/dispatch/ProxyDispatchAdapter.java:93)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(org/gradle/api/internal/tasks/testing/worker/TestWorker.java:117)
    at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(org/gradle/internal/dispatch/ReflectionDispatch.java:35)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(org/gradle/internal/dispatch/ReflectionDispatch.java:24)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(org/gradle/internal/remote/internal/hub/MessageHubBackedObjectConnection.java:155)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(org/gradle/internal/remote/internal/hub/MessageHubBackedObjectConnection.java:137)
    at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(org/gradle/internal/remote/internal/hub/MessageHub.java:404)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(org/gradle/internal/concurrent/ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(org/gradle/internal/concurrent/ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:624)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(org/gradle/internal/concurrent/ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(java/lang/Thread.java:748)

#2

Updated by Alexander Kamkin 9 months ago

  • Target version set to 2.5
  • Status changed from New to Open
  1. Добавить в документацию, что нельзя переопределять секции.
  2. Добавить в документацию, как "переопределять" секции через перегрузку методов.
  3. При переопределении секции выдавать диагностику: где секция переопределяется, где секция определяется.
#3

Updated by Alexander Kamkin 9 months ago

Документация обновлена.

#4

Updated by Alexander Kamkin 9 months ago

  • Status changed from Open to Resolved
#5

Updated by Alexander Kamkin 9 months ago

  • Status changed from Resolved to Closed
#6

Updated by Alexander Kamkin 9 months ago

  • Published in build set to 2.5.1-beta-200127

Also available in: Atom PDF