Project

General

Profile

Actions

Bug #13765

closed

zfs_clone_010_pos fails with newer python

Added by Jason King about 2 years ago. Updated 6 months ago.

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

0%

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

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.


Related issues

Has duplicate illumos gate - Bug #15245: zfs_clone_010_pos: fix python statementClosedToomas Soome

Actions
Actions #1

Updated by Yuri Pankov about 2 years 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 about 2 years ago

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

Actions #3

Updated by Andy Fiddaman 6 months ago

  • Has duplicate Bug #15245: zfs_clone_010_pos: fix python statement added
Actions #4

Updated by Toomas Soome 6 months ago

  • Status changed from New to Closed

Fixed in #15245

Actions

Also available in: Atom PDF