Project

General

Profile

Actions

Bug #13765

open

zfs_clone_010_pos fails with newer python

Added by Jason King 8 days ago. Updated 8 days ago.

Status:
New
Priority:
Normal
Assignee:
Category:
tests
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

I noticed that zfs_clone_010_pos fails with:

  File "<string>", line 1
    print "x" * 200
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("x" * 200)?

The cause is the following:

log_must zfs clone $fs@snap $fs/$TESTCLONE$(python -c 'print "x" * 200').$i

The OmniOS VM is running python 3.9.4.

As suggested by the error message, changing this to:

log_must zfs clone $fs@snap $fs/$TESTCLONE$(python -c 'print ("x" * 200)').$i

Eliminates the errors and the test passes. I also ran python2.7 -c 'print ("x" * 200)' (which runs without errors and outputs the expected string) to verify that older python is also happy with the change.

Actions #1

Updated by Yuri Pankov 8 days ago

We just changed it to the following to get rid of python dependency entirely (at least for that test case):

log_must $ZFS clone $fs@snap $fs/$TESTCLONE$(printf "%0.sx" {1..200}).$i

Actions #2

Updated by Jason King 8 days ago

Who/what repo is 'we'? That is not in illumos-gate, and there wasn't an obvious open ticket for this already.

Actions

Also available in: Atom PDF