Commit c86274bc authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-tcg-plugins-270520-1' into staging



Testing and one plugin fix:

  - support alternates for genisoimage to test/vm
  - add clang++ to clang tests
  - fix record/replay smoke test
  - enable more softfloat tests
  - better detection of hung gdb
  - upgrade aarch64 tcg test x-compile to gcc-10
  - fix plugin cpu_index clash vs threads

# gpg: Signature made Wed 27 May 2020 14:29:20 BST
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-testing-tcg-plugins-270520-1:
  tests/tcg: add new threadcount test
  linux-user: properly "unrealize" vCPU object
  cpus-common: ensure auto-assigned cpu_indexes don't clash
  tests/docker: use a gcc-10 based image for arm64 tests
  tests/docker: add debian11 base image
  tests/tcg: better detect confused gdb which can't connect
  tests/fp: split and audit the conversion tests
  tests/fp: enable extf80_le_quite tests
  tests/tcg: fix invocation of the memory record/replay tests
  travis.yml: Use clang++ in the Clang tests
  tests/vm: pass --genisoimage to basevm script
  configure: add alternate binary for genisoimage

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents b8bee16e 919bfbf5
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -205,14 +205,15 @@ jobs:
    # Test with Clang for compile portability (Travis uses clang-5.0)
    - name: "Clang (user)"
      env:
        - CONFIG="--disable-system"
        - CONFIG="--disable-system --host-cc=clang --cxx=clang++"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
      compiler: clang


    - name: "Clang (main-softmmu)"
      env:
        - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} "
        - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}
                  --host-cc=clang --cxx=clang++"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-sanitize"
      compiler: clang
      before_script:
@@ -222,7 +223,8 @@ jobs:

    - name: "Clang (other-softmmu)"
      env:
        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
        - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}
                  --host-cc=clang --cxx=clang++"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
      compiler: clang

+1 −1
Original line number Diff line number Diff line
@@ -941,7 +941,7 @@ done

# Check for ancillary tools used in testing
genisoimage=
for binary in genisoimage
for binary in genisoimage mkisofs
do
    if has $binary
    then
+5 −5
Original line number Diff line number Diff line
@@ -61,13 +61,15 @@ static bool cpu_index_auto_assigned;
static int cpu_get_free_index(void)
{
    CPUState *some_cpu;
    int cpu_index = 0;
    int max_cpu_index = 0;

    cpu_index_auto_assigned = true;
    CPU_FOREACH(some_cpu) {
        cpu_index++;
        if (some_cpu->cpu_index >= max_cpu_index) {
            max_cpu_index = some_cpu->cpu_index + 1;
        }
    return cpu_index;
    }
    return max_cpu_index;
}

void cpu_list_add(CPUState *cpu)
@@ -90,8 +92,6 @@ void cpu_list_remove(CPUState *cpu)
        return;
    }

    assert(!(cpu_index_auto_assigned && cpu != QTAILQ_LAST(&cpus)));

    QTAILQ_REMOVE_RCU(&cpus, cpu, node);
    cpu->cpu_index = UNASSIGNED_CPU_INDEX;
}
+11 −8
Original line number Diff line number Diff line
@@ -7635,30 +7635,33 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
            return -TARGET_ERESTARTSYS;
        }

        cpu_list_lock();
        pthread_mutex_lock(&clone_lock);

        if (CPU_NEXT(first_cpu)) {
            TaskState *ts;
            TaskState *ts = cpu->opaque;

            /* Remove the CPU from the list.  */
            QTAILQ_REMOVE_RCU(&cpus, cpu, node);
            object_property_set_bool(OBJECT(cpu), false, "realized", NULL);
            object_unref(OBJECT(cpu));
            /*
             * At this point the CPU should be unrealized and removed
             * from cpu lists. We can clean-up the rest of the thread
             * data without the lock held.
             */

            cpu_list_unlock();
            pthread_mutex_unlock(&clone_lock);

            ts = cpu->opaque;
            if (ts->child_tidptr) {
                put_user_u32(0, ts->child_tidptr);
                do_sys_futex(g2h(ts->child_tidptr), FUTEX_WAKE, INT_MAX,
                          NULL, NULL, 0);
            }
            thread_cpu = NULL;
            object_unref(OBJECT(cpu));
            g_free(ts);
            rcu_unregister_thread();
            pthread_exit(NULL);
        }

        cpu_list_unlock();
        pthread_mutex_unlock(&clone_lock);
        preexit_cleanup(cpu_env, arg1);
        _exit(arg1);
        return 0; /* avoid warning */
+32 −12
Original line number Diff line number Diff line
@@ -687,11 +687,26 @@ test-softfloat = $(call quiet-command, \
			(cat $2.out && exit 1;), \
			"FLOAT TEST", $2)

# Conversion Routines:
# Conversion Routines: Float to Float
# FIXME: f32_to_f128 (broken), f64_to_f128 (broken)
# FIXME: f128_to_f32(broken), f128_to_f64 (broken)
# FIXME: f128_to_extF80 (broken)
check-softfloat-conv-f2f: $(FP_TEST_BIN)
	$(call test-softfloat, \
		f16_to_f32 f16_to_f64 \
		f16_to_extF80 f16_to_f128 \
		f32_to_f16 f32_to_f64 \
		f32_to_extF80 \
		f64_to_f16 f64_to_f32 \
		extF80_to_f16 extF80_to_f32 \
		extF80_to_f64 extF80_to_f128 \
		f128_to_f16, \
		float-to-float)

# Conversion Routines: Int and Uint to Float
# FIXME: i32_to_extF80 (broken), i64_to_extF80 (broken)
#        ui32_to_f128 (not implemented), extF80_roundToInt (broken)
#
check-softfloat-conv: $(FP_TEST_BIN)
#        ui32_to_f128 (not implemented)
check-softfloat-conv-to-float: $(FP_TEST_BIN)
	$(call test-softfloat, \
		i32_to_f16 i64_to_f16 \
		i32_to_f32 i64_to_f32 \
@@ -701,7 +716,12 @@ check-softfloat-conv: $(FP_TEST_BIN)
		ui32_to_f16 ui64_to_f16 \
		ui32_to_f32 ui64_to_f32 \
		ui32_to_f64 ui64_to_f64 \
		ui32_to_extF80 ui64_to_extF80 \
		ui64_to_f128, uint-to-float)

# Conversion Routines: Float to integers
# FIXME: extF80_roundToInt (broken)
check-softfloat-conv-to-int: $(FP_TEST_BIN)
	$(call test-softfloat, \
		f16_to_i32 f16_to_i32_r_minMag \
		f32_to_i32 f32_to_i32_r_minMag \
@@ -718,10 +738,12 @@ check-softfloat-conv: $(FP_TEST_BIN)
		f16_to_ui32 f16_to_ui32_r_minMag \
		f32_to_ui32 f32_to_ui32_r_minMag \
		f64_to_ui32 f64_to_ui32_r_minMag \
		extF80_to_ui32 extF80_to_ui32_r_minMag \
		f128_to_ui32 f128_to_ui32_r_minMag \
		f16_to_ui64 f16_to_ui64_r_minMag \
		f32_to_ui64 f32_to_ui64_r_minMag \
		f64_to_ui64 f64_to_ui64_r_minMag \
		extF80_to_ui64 extF80_to_ui64_r_minMag \
		f128_to_ui64 f128_to_ui64_r_minMag, \
		float-to-uint)
	$(call test-softfloat, \
@@ -729,9 +751,14 @@ check-softfloat-conv: $(FP_TEST_BIN)
		f64_roundToInt f128_roundToInt, \
		round-to-integer)

.PHONY: check-softfloat-conv
check-softfloat-conv: check-softfloat-conv-f2f
check-softfloat-conv: check-softfloat-conv-to-float
check-softfloat-conv: check-softfloat-conv-to-int

# Generic rule for all float operations
#
# Some patterns are overidden due to broken or missing tests.
# Some patterns are overridden due to broken or missing tests.
# Hopefully these can be removed over time.

check-softfloat-%: $(FP_TEST_BIN)
@@ -741,13 +768,6 @@ check-softfloat-%: $(FP_TEST_BIN)
SF_COMPARE_OPS=eq eq_signaling le le_quiet lt_quiet
SF_COMPARE_RULES=$(patsubst %,check-softfloat-%, $(SF_COMPARE_OPS))

# FIXME: extF80_le_quiet (broken)
check-softfloat-le_quiet: $(FP_TEST_BIN)
	$(call test-softfloat, 				\
		f16_le_quiet f32_le_quiet f64_le_quiet  \
		f128_le_quiet, 				\
		le_quiet)

# FIXME: extF80_lt_quiet (broken)
check-softfloat-lt_quiet: $(FP_TEST_BIN)
	$(call test-softfloat, 				\
Loading